<?php
require_once(dirname(__FILE__)."/config.php");
CheckRank(0,0);
if(!isset($action)) $action = '';
$dsql = new DedeSql(false);

//读取所有栏目
$dsql->SetQuery("Select id,classname,pid,rank,booktype From #@__story_catalog order by rank asc");
$dsql->Execute();
$ranks = Array();
$btypes = Array();
$stypes = Array();
$booktypes = Array();
while($row = $dsql->GetArray()){
	if($row['pid']==0) $btypes[$row['id']] = $row['classname'];
	else $stypes[$row['pid']][$row['id']] = $row['classname'];
	$ranks[$row['id']] = $row['rank'];
	if($row['booktype']=='0') $booktypes[$row['id']] = '小说';
	else $booktypes[$row['id']] = '漫画';
}
$lastid = $row['id'];

$msg = '';

require_once(dirname(__FILE__)."/templets/story_add.htm");

//ClearAllLink();

?>