<?
//v3.1 www.exoops.info 2006/03
##################################################################################
# Friend Finder for e-xoops  Version 3.02 beta                                 #
#                                                                                #
# Script design  : PhpMeet  :   Copyright 2002 Jeremy Ross-webmaster@phprank.com #
# Created 15/01/02              Last Modified 15/01/02                           #
# Scripts Home              :   http://www.jrscripts.com                         #
#                                                                                #
# Xoops-RC2 French Version  :   jokerman@free.fr                                 #
# Web Home                     :   http://www.webetfric.com                      #
#                                                                                #
# Xoops-RC2 English Version :          Neon@neon.qldgamers.com                   #
# Web Home                  :   http://neon.qldgamers.com                        #
#                                                                                #
#                 Redesigned and new improvemends by                             #
#        eagle81 Manuel Caballero       Manuel@dancepartner.net                  #
#                    http://www.dancepartner.net                                 #
#                             2002-09-12                                         #
##################################################################################
include("admin_header.php");
include(XOOPS_ROOT_PATH"/modules/friendfinder/cache/config.php");
function Conf() {
global $xoopsUser, $bcoosConfig, $xoopsModule;
global $dateformat, $autoactive, $imagesize, $heightunit, $weightunit;
                echo "<br />\n";
    OpenTable();
echo "<FORM ACTION=\"pref.php?pa=ConfOk\" METHOD=POST>";
echo "<table width = \"100%\" border = \"0\">
<td>"._TEXTDATEFORMAT." </td>
<td><SELECT  class='select' name=\"dateformatS\" size=\"1\">
<OPTION value=\"0\">"._ttmmjjjj."</OPTION>
<OPTION value=\"1\">"._jjjjmmtt."</OPTION></SELECT>
</td>
</tr>
<tr>
<td>"._TEXTAUTOACTIVE." </td>
<td><SELECT  class='select' name=\"autoactiveS\" size=\"1\">
<OPTION value=\"0\">"._ff_no."</OPTION>
<OPTION value=\"1\">"._ff_yes."</OPTION></SELECT>
</td></tr>
<tr><td>"._TEXTIMAGESIZE." </td>
<td><input type=\"text\" class=\"text\" name=\"imagesizeS\" value=\"$imagesize\" size=\"10\" maxlength=\"10\"></td>
</tr>
<tr><td>"._TEXTHEIGHTUNIT." </td>
<td><input type=\"text\" class=\"text\" name=\"heightunitS\" value=\"$heightunit\" size=\"3\" maxlength=\"2\"></td>
</tr>
<tr><td>"._TEXTWEIGHTUNIT." </td>
<td><input type=\"text\" class=\"text\" name=\"weightunitS\" value=\"$weightunit\" size=\"3\" maxlength=\"2\"></td>
</tr>
</table><br />
<input type=\"submit\" class=\"button\" value=\""._PREFBUTTON."\">
</form>";
CloseTable();
include("admin_footer.php");
}
//if ($dateformat=="german"){
//}else{
//$cacheday = "(8,2)";
//$cachemonth ="(5,2)";
//$cacheyear ="(0,4)"; }
function ConfOK($dateformatS,$autoactiveS,$imagesizeS,$heightunitS,$weightunitS) {
  $file = fopen("../cache/config.php",'w');
  $content = "<?\n";
  $content .= "\$dateformat=\"$dateformatS\";\n\n";
  $content .= "\$autoactive=\"$autoactiveS\";\n\n";
  $content .= "\$imagesize = \"$imagesizeS\";\n\n";
  $content .= "\$heightunit = \"$heightunitS\";\n\n";
  $content .= "\$weightunit = \"$weightunitS\";\n\n";
  $content .= "?>";
    fwrite($file, $content);
    fclose($file);
redirect_header("index.php",1,_CONFSAVE);
exit();
}
switch($pa){
        case "ConfOk":
                ConfOk($dateformatS,$autoactiveS,$imagesizeS,$heightunitS,$weightunitS);
        break;
        default:
                Conf();
        break;
}
?>
