<{assert_admin}>
<{header}>

<div class = 'main'>

<h1><{@"Admin"}></h1>

<h2><{@"Configuration"}></h2>
<a href = '<{url 'EDIT_CONFIG'}>'><{@"Edit"}></a>

<h2><{@"Templates"}></h2>

<form method = 'post' action = '<{url}>'>
	<select name = 'id'>
		<{option '[]' @"[New]"}>
		<{foreach templates {option $0}}>
	</select>

	<input type = 'submit' class = 'button' value = '<{@"Edit template"}>'>
	<input type = 'hidden' name = 't'       value = 'EDIT_TEMPLATE'>
</form>

<h2><{@"Uploads"}></h2>

<form method = 'post' enctype = 'multipart/form-data' action = '<{url}>'>
	<{@"Directory:"}><br>

	<select name = 'updir'>
		<{foreach upload_dirs {option $0}}>
	</select>

	<br>

	File:<br>
	<input type = 'file'   name = 'file'><br>
	<input type = 'submit' class = 'button' value = '<{@"Send"}>'>
	<input type = 'hidden' name = 't'       value = 'UPLOAD'>
</form>

<h2><{@"Search image by name"}></h2>

<{search_image_form}>

<h2><{@"Topics"}></h2>

<form method = 'post' action = '<{url}>'>

	<select name = 'topic'>
		<{option '[]' @"[New]"}>
		<{foreach topics {option $0 {topic_name $0}}}>
	</select>

	<input type = 'submit' class = 'button' value = '<{@"Edit topic"}>'>
	<input type = 'hidden' name = 't'       value = 'EDIT_TOPIC'>
</form>

<h2><{@"Users"}></h2>

<form method = 'post' action = '<{url}>'>

	<select name = 'userid'>
		<{option '[]' @"[New]"}>
		<{foreach users {option $0}}>
	</select>

	<input type = 'submit' class = 'button' value = '<{@"Edit user"}>'>
	<input type = 'hidden' name = 't'       value = 'EDIT_USER'>
</form>

<{if {not cfg_disable_comments} {
	'<h2>' @"Comments" '</h2>'

	{link {url 'PENDING_COMMENTS'} @"Pending comments"}
	' (' {size pending_comments} ')'
	}
}>

</div>

<{footer}>
