<?php

class InsertSiteLinkPage extends CMSWebPageBase{

    function InsertSiteLinkPage() {

    	//ASPでは使用不可
    	if(defined("SOYCMS_ASP_MODE")) exit;

    	SOY2DAOConfig::Dsn(ADMIN_DB_DSN);

		$logic = SOY2Logic::createInstance("logic.admin.Site.SiteLogic");

		WebPage::WebPage();

		$this->createAdd("prototypejs","HTMLModel",array(
			"type" => "text/JavaScript",
			"src" => SOY2PageController::createRelativeLink("./js/prototype.js")
		));
		$this->createAdd("commonjs","HTMLModel",array(
			"type" => "text/JavaScript",
			"src" => SOY2PageController::createRelativeLink("./js/common.js")
		));

		$this->createAdd("urls","HTMLScript",array(
			"type" => "text/JavaScript",
			"script" => 'var link_url = "'.SOY2PageController::createLink("Page.Editor.InsertLink").'";'
		));

		$this->createAdd("site_list","HTMLSelect",array(
			"options"=>$logic->getSiteOnly(),
			"property"=>"siteName",
			"indexOrder"=>true
		));

    }
}
?>