<?php 
require_once '_admin_setting.php'; 

if ($_GET['id']) {
	$sql = "SELECT * FROM categories WHERE id = {$_GET['id']}";
	$category = $nsodb->get_row($sql, ARRAY_A);
	$action = 'update';
} else {
	$action = 'add';
}

require_once '_top.php';
require_once '_header.php';
require_once '_menuPane.php';
?>
<div id="godContentContainer">
    <div class="content_part">
    	<div class="content">
            <form action="category_edit_action.php" method="post" enctype="multipart/form-data">
                图片：<input type="file" name="Filedata" />
                名称：<input type="text" name="name" value="<?php echo $category['name']?>" />
                排序：<input type="text" name="od" value="<?php echo $category['od']?>" />
                <input type="hidden" name="cat" value="<?php echo $_GET['cat']?>" />
                <input type="hidden" name="parent" value="<?php echo $_GET['parent']?>" />
                <input type="hidden" name="id" value="<?php echo $_GET['id']?>" />
                <input type="hidden" name="action" value="<?php echo $action?>" />
                <input type="submit" value="OK" />
            </form>
            <img src="<?php echo '../' . NSO_UPLOAD_DIR_NAME . '/' . getImagePathBySize($category['image'], 'thumb');?>" />
        </div>
    </div>
</div>
<!-- zerich.cn Baidu tongji analytics -->
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");

document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fc61567174bd57bec1e0d3dde43a87025' type='text/javascript'%3E%3C/script%3E"));

</script>
</body>
</html>