<?php

if ( ! @include_once( './mainfile.php' ) ) { exit( '!! INCLUDE ERROR. ACCESS DENIED !!' ); }
error_reporting( _E_VALUE );


/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | myPHPNuke Version 188_8 RC2                                          |
// +----------------------------------------------------------------------+
// | License: GNU/GPL - http://www.gnu.org/copyleft/gpl.html              |
// +----------------------------------------------------------------------+
// | Support: http://myphpnuke.com/                                       |
// +----------------------------------------------------------------------+
// | Author: myPHPNuke Dev Team                                           |
// +----------------------------------------------------------------------+
// | Copyright: © 2001-2004 myPHPNuke Dev Team                            |
// +----------------------------------------------------------------------+
// $Id: contact.php,v 1.6.2.5 2004/08/27 16:02:54 kirilt Exp $




################################################################################
# Filename: contact.php
# Author: John Hoke
# Purpose: Cheap and dirty User Comment emailer. This script passes the form data
#          to contactmailer.php for processing and mailing.
# email: admin@slapd.net
# version: 0.5 beta
#
# Install Instructions:
# Pretty idiot proof. Place this file and contactmailer.php in your main
# Website directory and edit the two variables in contactmailer.php and
# you are done. If there are any problems, email me slapd@users.sourceforge.net
#
################################################################################
#
# 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, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
# USA.
#
################################################################################

/*2001-03-29    jeffx       - Improved HTML to 4.01 standards.
                            - Rearranged layout of source code to look cleaner.*/

//include("extention.inc");
//if (!isset($mainfile)) { include("mainfile.$phpEx"); }
include("header.$phpEx");
?>
<SCRIPT LANGUAGE="JavaScript">

function CheckForm(form)
{
    if ( form.usersName.value == "" ){
            alert( "Please enter your Name." )
            form.usersName.focus()
            return false
    }
    else if ( form.usersEmail.value ==""){
            alert( "Please enter your e-mail address." )
            form.usersEmail.focus()
            return false
    }
    else if ( form.usersSubject.value ==""){
            alert( "Please enter your Subject." )
            form.usersSubject.focus()
            return false
    }
    else if ( form.usersComments.value == "" ){
            alert( "Please enter a comment or message to send." )
            form.usersComments.focus()
            return false
    }
    else {
        document.Comment.submit()
        return true
    }
}
//--->

</script>

<?php

OpenTable();
?>
<TABLE align="center" border="0" cellPadding="0" cellSpacing="0" width="70%">
 <TR>
   <TD vAlign="absmiddle">
     <h3>&nbsp;<?php echo translate("Send your Comments to")." $sitename"; ?></h3></TD>
 </TR>
 <TR>
<td><br>
<form name="Comment" action="contactmailer.php" method="post">
<table align="center" width="100%">
<tr>
 <td align="left"><b><?php echo translate("Your Name:"); ?>*</b></td>
<td><input name="usersName" size="28" value="<?PHP echo $GLOBALS['uinf']['uname']; ?>"></td>
</tr>
<tr>
 <td align="left"><b><?php echo translate("Your E-Mail:"); ?>*</b></td>
 <td><input name="usersEmail" size="28" value="<?PHP echo $GLOBALS['uinf']['email']; ?>"></td>
</tr>
<tr>
 <td align="left"><b><?php echo translate("Website URL:"); ?></b></td>
 <td><input name="usersSite" size="28" value="<?PHP echo $GLOBALS['uinf']['url']; ?>"></td>
</tr>
<tr>
 <td align="left"><b><?php echo translate("Your ICQ:"); ?></b></td>
 <td><input name="usersICQ" size="28" value="<?PHP echo $GLOBALS['uinf']['user_icq']; ?>"></td>
</tr>
<tr>
 <td align="left"><b><?php echo translate("Company Name:"); ?></b></td>
 <td><input name="usersCompanyName" size="28" value=""></td>
</tr>
<tr>
 <td align="left"><b><?php echo translate("Your Location:"); ?></b></td>
 <td><input name="usersCompanyLocation" size="28" value="<?PHP echo $GLOBALS['uinf']['user_from']; ?>"></td>
</tr>
<tr>
 <td>&nbsp;</td>
 <td>&nbsp;</td>
</tr>
<tr>
 <td>&nbsp;</td>
 <td>&nbsp;</td>
</tr>
<tr>
 <td align="left"><b><?php echo translate("Subject:"); ?>*</b></td>
 <td><input name="usersSubject" size="28" value=""></td>
</tr>
<tr>
 <td>&nbsp;</td>
 <td>&nbsp;</td>
</tr>
<tr>
 <td align="left" valign="top"><b><?php echo translate("Comments/Questions:"); ?>*</b></td>
 <td><textarea name="usersComments" cols="40" rows="8" wrap="soft"></textarea></td>
</tr>
<tr>
 <td>&nbsp;</td>
 <td>&nbsp;</td>
</tr>
<tr>
 <td colspan="2" align="center"><input class='button' type="button" value="<?php echo translate("Send Comment"); ?>" onClick="CheckForm(this.form)"></td>
</tr>
</table>

<?php

// Kiril: New Sanitizer

echo "<input type='hidden' name='stripit_form' value='usersName|usersEmail|usersSite|usersICQ|usersCompanyName|usersCompanyLocation|usersSubject|usersComments' />\n";
echo "<input type='hidden' name='mpn_sectype' value='1' />\n";

// End Sanitizer

?>

</form>
<?PHP echo translate("* indicates required fields"); ?>
</td></tr></table>
<?php CloseTable();
include("footer.$phpEx");

?>
