<?php
//v1.0.4 www.bcoos.net 2006/10 GPL
//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                                         #
##################################################################################
// ORIGINAL FILE INFO
include("../../mainfile.php");
$bcoosConfig['title'] .= " - ". _XFF;
include(XOOPS_ROOT_PATH."/header.php");
include(XOOPS_ROOT_PATH."/modules/friendfinder/header.php");
$xoopsOption['show_rblock'] =1;
        OpenTable();
//************************************************************
include "admin/head.php";
if (isset($id)) {
if ($page == send) {
$sql = "SELECT * FROM ".$db->prefix("friendfinder")." WHERE id = '$id'";
$result = $db->query($sql);
while ($i = $db->fetchArray($result))
 {
mail($i[email], _TEXTMAILSUBJECT, $message,
     "From: $mail\nReply-To: $mail\nX-Mailer: PHP/" . phpversion());
}
echo _TEXTTHANKSMAIL;
} else {
 echo"
<form action=email.php method=post>
<input type=hidden name=id value=". $id.">
<input type=hidden name=page value=send>
  <table border=0 align=center cellpadding=5 width=450>
    <tr><td>"._TEXTEMAILSENDER."</td>
         <td><input type=text class='text' name=name></td></tr>
     <tr><td>"._TEXTEMAILSENDERADDRESS."</td>
         <td><input type=text class='text' name=mail></td></tr>
     <tr><td>"._TEXTEMAILMESSAGE."</td>
         <td><textarea class='textarea' name=message cols=40 rows=15></textarea></td></tr>
     <tr><td colspan=2><div align=center>
         <input type=submit class='button' value="._TEXTEMAILBUTTON.">
        </div>
      </td>
    </tr>
  </table>
</form> ";
}
} else {
echo _TEXTPLEASECHOOSEMEMBER;
}
include "admin/foot.php";
//************************************************************
        CloseTable();
include("../../footer.php");
?>
