<?php
if ( !defined( "SAXUE_CORE_INCLUDE" ) ) {
		include "../../core.php";
} 
saxue_checkpower( 'artadd' );
saxue_getconfigs( "cate", "article" );
$categorys = array();
foreach ( $saxueCate['article'] as $cid => $cat ) {
		if ( $cat['child'] ) {
				$cat['disabled'] = 'disabled';
		} else {
				$cat['disabled'] = '';
		}
		$categorys[$cid] = $cat;
}
include SAXUE_ROOT_PATH . "/lib/util/tree.php";
$tree = new tree;
$tree -> icon = array( '&nbsp;│&nbsp;', '&nbsp;├&nbsp;', '&nbsp;└&nbsp;' );
$tree -> nbsp = '&nbsp;';
$tree -> mid = 'cid';
$tree -> pid = 'pid';
$tree -> init( $categorys );
$str = "<option value=\$cid \$disabled>\$spacer\$cname</option>";
$cates = $tree -> get_tree( 0, $str );
include SAXUE_ADMIN_PATH . "/header.php";
$saxueTpl -> assign( "cates", $cates );
$saxueTset['saxue_contents_template'] = SAXUE_WEB_PATH . "/article/templates/addarticle_cate.html";
include SAXUE_ADMIN_PATH . "/footer.php";