<?php
	$topdir = '..';
	require $topdir."/dacode.php3";

	$html = LoadClass('Html');
	//  Those classes are used in templates
	$comments = LoadClass('Comments',1);  // NOT optimized if "add" :(
	$user = LoadClass('User');
	$news = LoadClass('News');
	$sidebox = LoadClass('Sidebox');

	if (isset($op) &&
		$op == lecho("Change")) {
		if (isset($HTTP_POST_VARS['hide_sig']) &&
			$HTTP_POST_VARS['hide_sig']=="on") {
			$config->hide_sig=1;
		} else {
			$config->hide_sig=0;
		}

		header("Location: ".$session->newsurls($news_id,$section,$topic,$year,$month,$day,$score));
		exit;
	}

	$table = ($HTTP_POST_VARS['table']?$HTTP_POST_VARS['table']:"");
	if (is_array($table)) {
		$news_id = $table['news_id'];
		$com_id = $table['com_id'];
	}
	$html->parsetemplate('submitcom.tmpl');
?>
