<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/

	incoh();
	menu('1');
	br('1');
	Max_OpenTable();
	$transfertitle = ereg_replace ("_", " ", $ttitle);
	$displaytitle = $transfertitle;
	$ip = $_SERVER["REMOTE_HOST"];
	if (empty($ip)) {
		$ip = $_SERVER["REMOTE_ADDR"];
	}
	echo "<b>".htmlentities($displaytitle)."</b>"
	."<ul><font class=\"content\">"
	."<li>"._RATENOTE1.""
	."<li>"._RATENOTE2.""
	."<li>"._RATENOTE3.""
	."<li>"._RATENOTE4.""
	."<li>"._RATENOTE5."";
	if(defined('USER_ALLOW')) {
		$user2 = base64_decode($user);
		$user2 = addslashes($user2);
		$cookie = explode(":", $user2);
		echo "<li>"._YOUAREREGGED.""
		."<li>"._FEELFREE2ADD."";
		cookiedecode($user);
		$auth_name = $cookie[1];
	} else {
		echo "<li>"._YOUARENOTREGGED.""
		."<li>"._IFYOUWEREREG."";
		$auth_name = "$anonymous";
	}
	echo "</ul>"
	."<form method=\"post\" action=\"modules.php?name=$module_name\">"
	."<table border=\"0\" cellpadding=\"1\" cellspacing=\"0\" width=\"100%\">"
	."<tr><td width=\"25\" nowrap></td>"
	."<tr><td width=\"25\" nowrap></td><td width=\"550\">"
	."<input type=\"hidden\" name=\"ratinglid\" value=\"$lid\" />"
	."<input type=\"hidden\" name=\"ratinguser\" value=\"$auth_name\" />"
	."<input type=\"hidden\" name=\"ratinghost_name\" value=\"$ip\" />"
	."<font class=content>"._RATETHISSITE.""
	."<select name=\"rating\">"
	."<option>--</option>"
	."<option>10</option>"
	."<option>9</option>"
	."<option>8</option>"
	."<option>7</option>"
	."<option>6</option>"
	."<option>5</option>"
	."<option>4</option>"
	."<option>3</option>"
	."<option>2</option>"
	."<option>1</option>"
	."</select></font>"
	."<font class=\"content\"><input type=\"submit\" value=\""._RATETHISSITE."\" /></font>"
	."<br /><br />";
    $karma = $db->sql_fetchrow($db->sql_query("SELECT karma FROM ".TABLE_USERS." WHERE user_id='$cookie[0]'"));
    if(defined('USER_ALLOW') AND $karma[karma] != 3 AND $karma[karma] != 4) {
		echo "<b>"._SCOMMENTS.":</b><br /><textarea wrap=\"virtual\" cols=\"70\" rows=\"15\" name=\"ratingcomments\"></textarea>"
		."<br /><br /><br />"
		."</font></td>";
	} else {
		echo"<input type=\"hidden\" name=\"ratingcomments\" value=\"\" />";
	}
	echo "</tr></table></form>";
	echo "<center>";
	linkfooterchild($lid);
	echo "</center>";
	Max_CloseTable();
	incof();