<?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                                 */
/************************************************************************/
defined('MAXIMUS') or Header("Location: index.php");

	incoh();
	Max_OpenTable();
	echo "
    <b>"._WRITEREVIEWFOR." $sitename</b><br /><br />
    <i>"._ENTERINFO."</i><br /><br />
    <form method=\"post\" action=\"modules.php?name=$module_name\">
    <b>"._PRODUCTTITLE.":</b><br />
    <input type=\"text\" name=\"title\" size=\"50\" maxlength=\"150\"><br />
    <i>"._NAMEPRODUCT."</i><br />";
	if ($multilingual == 1) {
		echo "<br /><b>"._LANGUAGE.": </b>"
		."<select name=\"rlanguage\">";
		$handle=opendir('language');
		while ($file = readdir($handle)) {
			if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
				$langFound = $matches[1];
				$languageslist .= "$langFound ";
			}
		}
		closedir($handle);
		$languageslist = explode(" ", $languageslist);
		for ($i=0; $i < sizeof($languageslist); $i++) {
			if($languageslist[$i]!="") {
				echo "<option value=\"$languageslist[$i]\" ";
				if($languageslist[$i]==strtolower($currentlang)) echo "selected";
				echo ">$languageslist[$i]</option>\n";
			}
		}
		echo "</select>";
		br('2');
	} else {
		echo "<input type=\"hidden\" name=\"rlanguage\" value=\"$language\" /><br /><br />";
	}
	echo "<b>"._REVIEW.":</b><br />
    <textarea name='text' rows='15' wrap='virtual' cols='60'></textarea><br />";
	if (defined('ADMIN_ALLOW')) {
		echo "<font class='content'>"._PAGEBREAK."</font><br />";
	}
	echo "
    <i>"._CHECKREVIEW."</i><br /><br />
    <b>"._YOURNAME.":</b><br />";
	if (defined('USER_ALLOW')) {
		$result = $db->sql_query("select name, user_email from ".TABLE_USERS." where username='$cookie[1]'");
		list($rname, $email) = $db->sql_fetchrow($result);
		$rname = stripslashes(check_html($rname, "nohtml"));
		$email = stripslashes(check_html($email, "nohtml"));
	}
	echo "<input type=\"text\" name=\"reviewer\" size=\"41\" maxlength=\"40\" value=\"$rname\" /><br />
	    <i>"._FULLNAMEREQ."</i><br /><br />
	    <b>"._REMAIL.":</b><br />
	    <input type=\"text\" name=\"email\" size=\"40\" maxlength=\"80\" value=\"$email\" /><br />
	    <i>"._REMAILREQ."</i><br /><br />
	    <b>"._SCORE."</b><br />
	    <select name=\"score\">
	    <option name=\"score\" value=\"10\">10</option>
	    <option name=\"score\" value=\"9\">9</option>
	    <option name=\"score\" value=\"8\">8</option>
	    <option name=\"score\" value=\"7\">7</option>
	    <option name=\"score\" value=\"6\">6</option>
	    <option name=\"score\" value=\"5\">5</option>
	    <option name=\"score\" value=\"4\">4</option>
	    <option name=\"score\" value=\"3\">3</option>
	    <option name=\"score\" value=\"2\">2</option>
	    <option name=\"score\" value=\"1\">1</option>
	    </select>
	    <i>"._SELECTSCORE."</i><br /><br />
	    <b>"._RELATEDLINK.":</b><br />
	    <input type=\"text\" name=\"url\" size=\"40\" maxlength=\"100\" value=\"http://\" /><br />
	    <i>"._PRODUCTSITE."</i><br /><br />
	    <b>"._LINKTITLE.":</b><br />
	    <input type=\"text\" name=\"url_title\" size=\"40\" maxlength=\"50\" /><br />
	    <i>"._LINKTITLEREQ."</i><br /><br />
	";
	if(defined('ADMIN_ALLOW')) {
		echo "<b>"._RIMAGEFILE.":</b><br />
			<input type=\"text\" name=\"cover\" size=\"40\" maxlength=\"100\" /><br />
			<i>"._RIMAGEFILEREQ."</i><br /><br />
		";
	}
	echo "<i>"._CHECKINFO."</i><br /><br />
    	<input type=\"hidden\" name=\"rop\" value=\"preview_review\" />
    	<input type=\"submit\" value=\""._PREVIEW."\" /> <input type=\"button\" onClick=\"history.go(-1)\" value=\""._CANCEL."\" /></form>
    ";
	Max_CloseTable();
	incof(); 
