PDA

View Full Version : Recruit Form


Acedeal
November 22nd, 2002, 10:28
Ok,
Got stuck at this point.
What I want to do is check the info in MySql, against what they enter as their forum name. If no forum name, then they have to go to forums, create a user name, then continue on with this page.

<?php
<html>
<head>
<title>-=DoW=- Recruiting Forms</title>
<link rel="stylesheet" href="css/pof/green.css" type="text/css">
</head>
<bgcolor="#000000">
<body>
<div align="center">
<?php

require "lib/FormProcessor.class.php";
include "inc/countries.inc.php";

// Initialize
$fp = new FormProcessor("lib/");

// Import the needed elements
$fp->importElements(array(
FPText, FPTextField, FPTextArea, FPPassword, FPSelect,
FPFile, FPCheckBox, FPRadio, FPSubmitButton,
'extra/FPConfirmPassword'
));
$fp->importLayouts(array( FPColLayout, FPRowLayout, FPGridLayout, FPGroup ));
$fp->importWrappers(array( FPLeftTitleWrapper ));


// Create the form object
$myForm = new FPForm(array(
title => '-=DoW=- Recruiting',
name => 'myForm',
action => $PHP_SELF,
display_outer_table => true,
refine_owners => true,
table_align => 'center',
table_width => '500'
));


// Wrappers
$leftWrapper = new FPLeftTitleWrapper(array());



//$WEAPONS = ;

// Construct a grid of radio elements
$radioGrid = new FPGridLayout(array(
table_padding => 7,
columns => 3,
));


$i = 0;
foreach (
array(
'SVD', 'M24', 'M82', 'MOS',
'M16', 'Nade Laucher', 'Saw')
as $weapon
)
$radioGrid->addElement(
new FPRadio(
array(
group_name => 'radio_group',
item_value => $i,
title => $weapon,
checked => ($i++ == 0)
))
);


// Construct a grid of checkbox elements
$checkboxGrid = new FPGridLayout(array(
table_padding => 5,
columns => 2,
));

$i = 0;
foreach (
array(
'DoW_1','DoW_II','DoW_III','DoW_IV','DOW_V','DOW_V I',
'DOW_VII','Homelan','Other Private Servers','Only -=DoW=-' )
as $server
)
$checkboxGrid->addElement(
new FPCheckBox(
array(
name => 'checkbox'.$i,
title => $server,
table_align => 'left',
table_padding => 0,
checked => (++$i)%2,
comment => 'Check it if you if you play on it!'
))
);


// Password field
// We have to create an explicit reference to this object to use it
// in the FPConfirmPassword object constructor
$passwordField = new FPPassword(
array(
name => 'password',
title => 'Password',
required => true,
size => 20,
valid_RE => FP_VALID_PASSWORD,
max_length => 36,
wrapper => &amp;$leftWrapper,
comment =>
'Password is case sensitive and must be '.
'at least 6 characters!'
));


// Define form elements
$myForm->setBaseLayout(

new FPColLayout(array(

table_padding => 5,
element_align => center,
elements => array(

new FPText(
array(
text =>
'<div align="left">'.
'Please, fill in the following fields.'.'
'.
'Read the comments carefully before submitting '.
'your data!'.
'</div>'
)),


new FPGroup(array(
title => '-=DoW=-
Recruiting Application',
elements => array(new FPRowLayout(array(
elements => array(
new FPTextField(array(
name => forum_name,
title => 'Forum_Name',
wrapper => &amp;$leftWrapper,
size => 20,
css_style => 'width:150px;',
required => true,
max_length => 256
)),

),
comment =>
'You first need to '.
'<a href="/forum/profile.php?mode=register&sid=b869f3bf803a1a4a960852e56d095beflogin.php">'.
'have a Forum Account'.
'</a> '.
'before sending
an Application to Recruitment'
))),
)),

new FPTextField(
array(
name => 'game_name',
title => 'Game Name',
required => true,
size => 33,
max_length => 256,
wrapper => &amp;$leftWrapper
)),



new FPTextField(
array(
name => 'email',
title => 'E-mail Address',
comment => 'We do not Accept any Applications from @yahoo or @hotmail Accounts'.
' or any other Free Email Type Accounts.'.
'
'.
'You will need to have a Real Email Account',
required => true,
size => 33,
max_length => 256,
wrapper => &amp;$leftWrapper
)),

new FPTextField(
array(
name => 'first_name',
title => 'First Name',
comment =>
'First name must be shorter than 36 '.
'symbols and start with a letter',
required => true,
size => 25,
max_length => 36,
wrapper => &amp;$leftWrapper
)),

new FPTextField(
array(
name => 'last_name',
title => 'Last Name',
required => true,
size => 25,
valid_RE => FP_VALID_NAME,
max_length => 36,
wrapper => &amp;$leftWrapper,
)),

new FPSelect(
array(
name => 'country',
title => 'Your Country',
multiple => false,
options => $COUNTRIES,
selected => array("RUS"),
css_style => 'width:200px;',
wrapper => &amp;$leftWrapper
)),

new FPSelect(
array(
name => 'favourite_countries',
title => 'Your Favourite Countries',
multiple => true,
min_options_selection => 2,
max_options_selection => 4,
comment => 'You must select between 2 and 4 options',
options => $COUNTRIES,
selected => array("GBR"),
css_style => 'width:200px;',
wrapper => &amp;$leftWrapper
)),

new FPGroup(
array(
title => 'Choose Your Favourite Weapon',
table_align => center,
table_padding => 7,
elements => array(
&amp;$radioGrid
)
)),

new FPTextArea(
array(
name => 'comments',
title => 'Reason Why you Think you would be a good fit in -=DoW=-',
max_length => 2048,
required => true,
wrapper => &amp;$leftWrapper
)),

new FPGroup(
array(
title => 'What Server or Servers do you Normally Play on',
table_align => center,
table_padding => 7,
elements => array(
&amp;$checkboxGrid,
)
// )),
//
//new FPFile(
//array(
//name => 'image',
// title => 'Your Image (optional)',
//size => '20',
/* destination_file =>
'/var/www/html/tests/pof/upload/upload.gif', */
//allowable_content_types => array('image/gif'),
//max_file_size => 20480,
//wrapper => &amp;$leftWrapper,
//comment =>
//'Only GIF images with size less than 20K '.
//'are allowed for uploading'
)),

new FPCheckBox(
array(
name => 'subscribe_chkbox',
title => 'Have you Read and Understand all of -=DoW=- Rules',
table_align => 'center',
checked => False
)),

new FPRowLayout(array(
table_align => center,
table_padding => 20,
elements => array(
new FPSubmitButton(
array(
name => 'submit',
title => ' Submit '
)),
)
)),

)
))
);


// Obtain submitted data and check the values correctness
if ($myForm->getSubmittedData() &amp;&amp; $myForm->isDataValid()) {

$elements = $myForm->getElementValues();
echo
'<div align="left">'.
'Thank you, your data is valid!'.
'<pre>'
;
var_dump($elements);
echo
'</pre>'.
'</div>';
} else
$myForm->display();

?>
</div>
</body>
</html>


Somewhere in here, i need to get the post/send to get the data to sendmail, so that we can get the email of new appl.

http://www.dow-sniper.net/recruiting/sample_recruit1.php

Here is the form, still in beta, but getting there.

Acedeal
November 22nd, 2002, 10:54
Not sure if this part will work like i want it too or not


<?php
//MySQL Part

else if($db==1)
{
//echo $hostname.$username.$password.$dbname.$table;
$db_con = mysql_connect($hostname,$username, $password) or die("Connetion to database failed!");
mysql_select_db($dbname);
$query = "select * from ".$table;
$result = mysql_query($query);
$i = 0;
while ($i < mysql_num_fields($result))
{
$meta = mysql_fetch_field($result);
$columns[$i] = $meta->name;
$i++;
}

echo "<table border=1 width=90%>";
echo "<tr><td colspan=".(sizeof($columns)).">";
echo "<table border=0 width='100%'><tr><td class='small' bgcolor='#000000'>";
echo "<font color='#ffffff'><center>Records Table </td></tr></table></td></tr><tr>";
for($i=1;$i&lt;sizeof($columns);$i++)
{
echo "<td class='small'><center>[b]".$columns[$i]."</td>";
}
echo "<td class='small'><center>Delete Record</td></tr>";

$query = "select * from ".$table;
$result = mysql_query($query);
$j=0;
while($row=mysql_fetch_array($result))
{
echo "<tr>";

for($i=1;$i&lt;sizeof($columns);$i++)
echo "<td class='small'><center>".$row[$columns[$i]]."</td>";

$j=$row[$columns[0]];
echo "<td class='small'><center>delete</tr>";
}


echo "</table>";
}

//MySQL ends
//

What this should do (have not tested it yet), is hopefully grab the table, then display back to the user, wether they have a user name or existing app in the database

-(Oc)-Mavric
November 22nd, 2002, 16:40
I'll Copy it down and look it over... To get the E-Mail addy of the recruit you can do one of 2 things, if you are getting info from the forums regestered members you can import it from there. Or you can ask them for it in the form I've been meaning to do something like this for a while my self I'll Help you get it working.

Acedeal
November 22nd, 2002, 16:45
You'll need the rest of it also.
I am pulling some includes and requires.

It will not would without the php.class stuff

an example would be the password stuff.
I am using an element, Have about 6 elements and 7-8 includes.

[php:1:119d88f73c]
&lt;?php

class FPPassword extends FPElement {

var $_size;

function FPPassword($params)
{
FPElement::FPElement(&amp;$params);
$this->_size = $params[size];
if (!isset($this->_size)) $this->_size = 16;
$this->_resendValueAfterSubmit = $params[resend_value] ? true : false;
}


function echoSource()
{
echo
'&lt;input type="password"'.
' name="'.$this->_name.'"'.
($this->_resendValueAfterSubmit ?
' value="'.
htmlspecialchars($this->_value).
'"' : ' value=""'
).
' size="'.$this->_size.'"'.
(isset($this->_cssStyle) ?
' style="'.$this->_cssStyle.'"' : ''
).
'>'
;
}


function setValue($value)
{
$this->_value =
// htmlspecialchars(
stripslashes($value)
// )
;
}
}


?>[/php:1:119d88f73c]

Acedeal
November 22nd, 2002, 16:50
here is where I make the buttons.

[php:1:f54ba1b509]&lt;?php

class FPButton extends FPElement {

var $_width;
var $_caption;
var $_onClick;

function FPButton($params)
{
FPElement::FPElement(&amp;$params);
$this->_size = $params[size];
if (!isset($this->_width)) $this->_width = 16;
$this->_caption = isset($params[caption]) ?
$params[caption] : $this->_title;
$this->_onClick = $params[on_click];
}


function echoSource()
{
echo
'&lt;input type="button"'.
' name="'.$this->_name.'"'.
' value="'.$this->_caption.'"'.
(isset($this->_cssStyle) ?
' style="'.$this->_cssStyle.'"' : ''
).
' onclick="'.$this->_onClick.'"'.
' class="'.$this->_owner->getCssClassPrefix().'Button"'.
'>'."\n"
;
}


function validate() {
// ...
$this->_errCode = FP_SUCCESS;
return true;
}

}

?>[/php:1:f54ba1b509]

-(Oc)-Mavric
November 22nd, 2002, 17:03
The way I was going to make mine was so it askes if they have already regestered in the forums if they check yes I already regestered in the forums , have it make a a field for the user name and password, make it check the database for their user name and pass, check info against the database, load the users E-mail Address and take some info off of them, and post it in the apps forum. If they havent regestered take the info needed to regester them sumit regestration, go on to the next page and collect the info and post it on the apps forum... I havent gotten around to it yet. after both are complete I wanted it to send out a standard E-Mail to confirm to the user that there app has been sent and some one will be getting touch with them... :) This should not be too difficult to do... Is this what you are trying as well?

Acedeal
November 22nd, 2002, 18:04
In a nut shell, yes.
But with a few more added details, Like mail me when complete.
And a few others little bells and whistles that I am still debating on putting in.
[php:1:89df8419a6]
&lt;?php
$errors=0;
$error="The following errors occured while processing your form input.<ul>";
$asdasd=preg_replace("/(\015\012)|(\015)|(\012)/","&amp;nbsp;
", $asdasd);$asda=preg_replace("/(\015\012)|(\015)|(\012)/","&amp;nbsp;
", $asda);$asdasdasd=preg_replace("/(\015\012)|(\015)|(\012)/","&amp;nbsp;
", $asdasdasd);if($WhatisyourRealName=="" || $asdasdad=="" || $asdasd=="" || $asdasd=="" || $asda=="" || $asdasdasd=="" || $asdasda=="" || $asdasdasd=="" ){
$errors=1;
$error.=" You did not enter one or more of the required fields. Please go back and try again.";
}
if($errors==1) echo $error;
else{
$where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
$message="What is your Real Name: ".$WhatisyourRealName."
asdasdad: ".$asdasdad."
asdasd: ".$asdasd."
asdasd: ".$asdasd."
asda: ".$asda."
asdasdasd: ".$asdasdasd."
asdasda: ".$asdasda."
asdasdasd: ".$asdasdasd."
";
//mail("acedeal@dow-sniper.net","Form Submitted at your
//website",$message,"From: phpForm");

$link = mysql_connect("localhost","root","");
mysql_select_db("mysql",$link);
$query="insert into recruit_test_4 (real_name,Email,what,what2,what3,what4,what5,what 6) values ('".$WhatisyourRealName."','".$asdasdad."','".$asdasd."','".$asdasd."','".$asda."','".$asdasdasd."','".$asdasda."','".$asdasdasd."')";
mysql_query($query);
$make=fopen("admin/data.dat","a");
$to_put="";
$to_put .= $WhatisyourRealName."|".$asdasdad."|".$asdasd."|".$asdasd."|".$asda."|".$asdasdasd."|".$asdasda."|".$asdasdasd."
";
fwrite($make,$to_put);
header("Refresh: 0;url=http://localhost/");
}
?>
[/php:1:89df8419a6]

Something like that

IsZi
November 23rd, 2002, 02:11
Umm... I'm no PHP coder or anything, and you've probably already noticed this, but I thought I'd point it out. (Even though it has nothing to do with the code itself.

Ace, don't forget to use the CODE tag instead of the QUOTE tag. You did one time (look up), and it appears that the website processed a bit of that form, and presented it as it would normally appear on a page, instead of code.

Also, any chance of getting a forum section for WinBot scripting? I've got one hell of a script in my head, but it's going to take a bit to crank it out and some help may be nice. (Also, I plan on making an OpBot for the -=DoW=- channel, to send to VSpring, so he can host it. Might end up needing help there, too.)

Acedeal
November 23rd, 2002, 12:05
Wild,
Not sure why it's running the php code in the forums..
Guess I could make some really wild pages doing the /quote instead of /code.. :)..

Yea. I'll make that forum for ya right now.

-(Oc)-Mavric
November 23rd, 2002, 16:29
Coby I have a few IRC bots that I can send you, Some are better then others, All do diffrent things, just let me know wht you need and I'll send the bot that does it... :)

I guess we were posting at the same time.. I'll Copy the rest to look over as well...

-(Oc)-Mavric
December 2nd, 2002, 11:02
ok Whats with the Favrit Countrys and also you need to add the M4A1 in to the weapon list, to get it to send a e-Mail you will have to set up a page that does a mail to, a set address and use the send data post method, I'm working on almost the same problem with the App I was making for the Oc site. But I want it to post it to the forums instead of just sending a E-Mail... :) you can check it out at www.theoutcasts.org/app.php. I have some cosmetic work I will be doing to it once it is done, and I know how to get it to make the post it self. I plan on making it a flash Application... check it out. let me know what you think... I'll get the code I have for it so far and post it here... :)

-(Oc)-Mavric
December 2nd, 2002, 11:03
Code for the page I have made so far...

&lt;html>
&lt;head>
&lt;title>Application to The Outcasts Clan&lt;/title>
&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
&lt;link rel="stylesheet" href="/themes/PBM1/style/style.css" type="text/css">
&lt;/head>

&lt;body bgcolor="#696969" text="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF">
&lt;table width="98%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#003366" bgcolor="#969696">
&lt;tr>
&lt;td colspan=2>&lt;table width=100% >
&lt;tr>
&lt;td width="99%">&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="32" height="32">
&lt;param name="movie" value="http://www.theoutcasts.org/themes/PBM1/flash/PBM1.swf">
&lt;param name="quality" value="high">
&lt;embed src="http://www.theoutcasts.org/themes/PBM1/flash/PBM1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="32" height="32">&lt;/embed>&lt;/object>&lt;/td>
&lt;td width="1%" align=right>&amp;nbsp;&lt;/td>
&lt;/tr>
&lt;/table>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td colspan=2 bgcolor="#003366" height="12">&lt;font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF" size="2">&lt;b>Application
To The Outcasts Clan Form&lt;/b>&lt;/font>&lt;font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">&amp;nbsp;
&lt;/font>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td colspan="2" height=700 valign=top>
&lt;p>&lt;br>
&lt;/p>
&lt;table height=650 width="100%" border="0" cellspacing="0" cellpadding="0">
&lt;tr>
&lt;td width="1%"> &lt;br>
&lt;br>
&lt;/td>
&lt;td width="1%" valign="top"> &lt;br>
&lt;/td>
&lt;td width="98%" valign="top" align="center">

&lt;table width="98%" border="1" cellspacing="0" cellpadding="0" bordercolor="#003366">
&lt;tr>
&lt;td bgcolor="#003366">
&lt;div align="left">&lt;font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF" size="2">Note:
you must be regestered and logged on to our forums before
submitting your application&lt;/font>&lt;/div>
&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td colspan=1> &lt;font face="Verdana, Arial, Helvetica, sans-serif" color="#FFFFFF" size="2">&lt;br>
&lt;table width=95% align=center border="1" bgcolor="#21609A" cellspacing="0" cellpadding="0" bordercolor="#003366">&lt;tr>
&lt;td>&lt;font face="verdana" size="2"> &lt;b>
&lt;center>
&lt;p>&amp;nbsp;&lt;/p>
&lt;p>Read the following information. If you have any questions,
please post in the public forum. Rules and regulations
may change without notice. The Outcasts staff will
make an effort to alert the Clan when there are changes
to the rules and regulations, however it is the responsibility
of each member to keep up to date on the rules and
regulations. &lt;/p>
&lt;p>&lt;br>
--------------------------------------------------------------------------------
&lt;/p>
&lt;p>The Outcasts Rules and Regulations &lt;/p>
&lt;p>The following general rules and regulations apply
to any member in The Outcasts regardless of standing.
Failure to abide by any of the following rules may
result action taken against the member including,
but not limited to loss of standing, probation, or
ejection from The Outcasts Clan. &lt;/p>
&lt;p>Conduct: Members must conduct themselves in a professional
and respectful manner in any publicly viewable web
site, forum, game server, or any other location or
medium that a non-member of The Outcasts can view
and/or listen to. This includes, but is not limited
to, cursing, derogatory remarks, racial slurs, flaming,
and/or warring. &lt;/p>
&lt;p>&lt;br>
Cheating: Cheating or using exploits in any game is
expressly prohibited. &lt;/p>
&lt;p>&lt;br>
Confidentiality: Members may not release confidential
information to non-members without express permission.
&lt;/p>
&lt;p>&lt;br>
Multiple Clans: Members of The Outcasts may not be
a member of another clan, unless the other clan is
a non-competitive clan. Members of The Outcasts may
participate in another competitive clan if The Outcasts
are not involved in any game the other clan is involved
in. If The Outcasts subsequently becomes involved
in a game that the other clan is involved in, or the
other clan becomes involved in a game in which The
Outcasts are involved in, you must resign from either
The Outcasts or the other clan. Members must inform
The Outcasts Staff and/or Admins if they are currently
or become involved in another clan. &lt;/p>
&lt;p>&lt;br>
Messenger: Members of The Outcasts are encouraged
to obtain an ICQ number, AIM, YahooIM, and/or MSNIM
account (s) if you do not have one already. You may
download ICQ from www.ICQ.com, AIM from AOL, YahooIM
from Yahoo, and MSNIM from MSN, However I suggest
Downloading Trillian from www.Trillian.cc it has all
of the above in one program (to use Trillian you will
have to have accounts with the above IM services first,
and Trillian may not support all options of separate
IM programs. We Do use Roger Wilco and/or TeamSpeek
in some games, We Highly encouraged getting both of
these programs even if you do not have a mike, at
least you can hear whats going on in the game. &lt;/p>
&lt;p>&lt;br>
E-Mail: Applicants and Members are required to provide
their real e-mail address and are required to register
on these forums. &lt;/p>
&lt;p>&lt;br>
Forums: Members are encouraged to read the forums
on a daily basis. Members post here often, and clan
issues are talked about here. &lt;/p>
&lt;p>Definitions: &lt;/p>
&lt;p>Clan: An association of people with similar interests
or pursuits. &lt;/p>
&lt;p>Member: Any person who belongs to The Outcasts. &lt;/p>
&lt;p>Rank: We Do not have Ranks. However, we do have an
award and a recognition system . &lt;/p>
&lt;p>Tribe: A clan. &lt;/p>
&lt;p>Guild: A clan &lt;/p>
&lt;p>NOTE: If you are coming to us from America's Army
you will need to open a new account with the -(Oc)-
Tag, this means you will have to re-do all of your
Training.&lt;br>
&lt;/p>
&lt;br>
&lt;br>
&lt;/center>
&lt;/b>&lt;/td>
&lt;/tr>&lt;/table>
&lt;br>
Player info.&lt;br>
&lt;form enctype="multipart/form-data" method=post action=http://www.theoutcasts.org/phpBB2/posting.php?mode=newtopic&amp;f=6>

&lt;table>
&lt;tr>
&lt;td align=right>OnLine Player Name&lt;/td>
&lt;td>
&lt;input name=PlayerN type=text class=loginfields id="PlayerN" size=30 maxlength=50>&lt;/td>&lt;/tr>

&lt;tr>
&lt;td align=right>Real Name&lt;/td>
&lt;td> &lt;input name="Name" type="text" id="Name" size="30" maxlength="60">&lt;/td>
&lt;/tr>



&lt;tr>
&lt;td align=right>Conncetion Speed&lt;/td>
&lt;td>
&lt;select name=Connection class=loginfields id="Connection">
&lt;option value="Dial-Up">Dial-Up&lt;/option>
&lt;option value="Cable">Cable&lt;/option>
&lt;option value="DSL">DSL&lt;/option>
&lt;option value="T1">T1&lt;/option>
&lt;/select>&lt;/td>&lt;/tr>

&lt;tr>
&lt;td align=right>Over or Under 18&lt;/td>
&lt;td>
&lt;select name=age class=loginfields id="age">
&lt;option value="Over 18">Over 18&lt;/option>
&lt;option value="Under 18">Under 18&lt;/option>
&lt;/select>&lt;/td>&lt;/tr>

&lt;tr>
&lt;td align=right>Who Recruited You&lt;/td>
&lt;td>
&lt;select name=class class=loginfields>
&lt;option value="No one sent me here">No one sent me
here&lt;/option>
&lt;option value="-(Oc)-Mavric">-(Oc)- Mavric&lt;/option>
&lt;option value="-(Oc)- MajorKickass">-(Oc)- MajorKickass&lt;/option>
&lt;option value="-(Oc)- Webb">-(Oc)- Webb&lt;/option>
&lt;option value="-(Oc)- Bradmanchu">-(Oc)- Bradmanchu&lt;/option>
&lt;option value="-(Oc)- Jordy">-(Oc)- Jordy&lt;/option>
&lt;option value="Non staff member sent me here">Non
staff member sent me here&lt;/option>
&lt;/select>&lt;/td>&lt;/tr>

&lt;tr>
&lt;td align=right>Have you read the rules? &lt;/td>
&lt;td>
&lt;select name=Read class=loginfields id="Read">
&lt;option value="No">No&lt;/option>
&lt;option value="Yes">Yes&lt;/option>
&lt;/select>&lt;/td>&lt;/tr>

&lt;tr>
&lt;td align=right>Do you aggree with our rules?&lt;/td>
&lt;td>
&lt;select name=Aggree class=loginfields id="Aggree">
&lt;option value="No">No&lt;/option>
&lt;option value="Yes">Yes&lt;/option>
&lt;/select>&lt;/td>&lt;/tr>

&lt;tr>
&lt;td align=right>Whould you say you are a &amp;quot;Team Player&amp;quot;?&lt;/td>
&lt;td>
&lt;select name=Teamplayer class=loginfields id="Teamplayer">
&lt;option value="Yes">Yes&lt;/option>
&lt;option value="No">No&lt;/option>
&lt;/select>&lt;/td>&lt;/tr>
&lt;/table>

&lt;br>&lt;br>
&lt;b>What Games Do you play?&lt;/b>
&lt;table width=100%>
&lt;tr>
&lt;td width="26%" height="154" valign=top> &lt;b>Offical &lt;/b>-(Oc)- Games&lt;br>
&lt;input name="Games" type=checkbox id="Games" value="BattleZone">
- BattleZone&lt;br>
&lt;input name="Games" type=checkbox id="Games" value="America's Army">
- America's Army&lt;br>
&lt;input name="Games" type=checkbox id="Games" value="SubSpace">
- SubSpace&lt;br>
&lt;input name="Games" type=checkbox id="Games" value="MOH">
- Medal Of Honor &lt;br>
&lt;input name="Games" type=checkbox id="Games" value="Tribes II">
- Tribes II&lt;br>
&lt;br>
&lt;/td>
&lt;td width="34%" valign=top>&lt;b>Other Games Some of us &lt;/b>&lt;br>
&lt;input name="Games" type=checkbox id="Games" value="UT">
- Unreal Tournament&lt;br>
&lt;input name="Games" type=checkbox id="Games" value="UT2k3">
- Unreal Tournament 2003&lt;br>
&lt;input name="Games4" type=checkbox id="Games4" value="JK2">
- Jedi Knight II&lt;br>
&lt;br>
&lt;br>
&lt;/td>
&lt;td width="40%" valign=top>&lt;p>&lt;b>play&lt;/b> &lt;/p>
&lt;p>
&lt;input name="Games2" type=checkbox id="Games2" value="STBC">
- StarTrek Bridge Commander
&lt;input name="Games3" type=checkbox id="Games33" value="STV">
- StarTrek Voyager Elite Force &lt;/p>
&lt;p>&amp;nbsp; &lt;/p>&lt;/td>
&lt;/tr>&lt;/table>
&lt;br>&lt;br>
&lt;b>Anything else that you would like to add: &lt;/b> &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;n bsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbs p;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;n bsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbs p;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;n bsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br>
&amp;nbsp;&lt;textarea name=longd class=loginfields rows=10 cols=90>&lt;/textarea>&lt;br>&lt;Br>
&lt;Br>
&lt;br>
&lt;center>&lt;input type=submit class=loginfields value="Submit Your App">&lt;/center>
&lt;/form>
&lt;/td>
&lt;/tr>
&lt;/table>



&lt;/td>
&lt;/tr>
&lt;/table>
&lt;p align="center">&lt;font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#003366">&lt;img src="spacer.gif" width="600" height="1">&lt;br>
&amp;copy;2003 The Outcasts Clan&lt;/font>&lt;/p>
&lt;/td>
&lt;/tr>
&lt;/table>
&lt;/body>
&lt;/html>

Acedeal
December 4th, 2002, 00:46
From what I see of it, looks like a lot of time and work went into it.
:) What happen, thought you were going to do it in PHP?

Almost done with ours,
Using an HTML frame to input the php form into it.

The Form http://www.dow-sniper.net/recruiting/recruit_form.htm
and the
php page http://www.dow-sniper.net/recruiting/sample_recruit3.php

Still working on the database coding and the submit parts but getting there. Have to make sure that the database connects are secure and the if else / while statements are working :)

(Of couse lonely will hate it) :spank:

Acedeal
December 4th, 2002, 00:48
Found a great PHP editor, lot better then dreamweavers php editor

http://www.dzsoft.com/

Acedeal
December 4th, 2002, 01:15
ok Whats with the Favrit Countrys and also you need to add the M4A1 in to the weapon list, to get it to send a e-Mail you will have to set up a page that does a mail to, a set address and use the send data post method, I'm working on almost the same problem with the App I was making for the Oc site. But I want it to post it to the forums instead of just sending a E-Mail... :) you can check it out at www.theoutcasts.org/app.php. I have some cosmetic work I will be doing to it once it is done, and I know how to get it to make the post it self. I plan on making it a flash Application... check it out. let me know what you think... I'll get the code I have for it so far and post it here... :)


:) I always add a few extra's in my stuff, just to make sure that the boyz and girlz really do read this stuff, ergo the county, city, etc...


I have a perl script that will do that for you. Take a look at my contact.htm. it's html frame calling cantact_5.htm which is all done with a perl script.

The good thing a like about it, is the email address are hidden, so those damn spiders can not collect them.

&lt;/style>
&lt;body bgcolor="#000000" topmargin="7" leftmargin="0" text="#808080">

&lt;form method="post" action="/cgi-bin/FormMail.pl">
&lt;input type="hidden" name="subject" value="Comments or Questions about -=DoW=-" />
&lt;input type="hidden" name="recipient" value="1" />
&lt;div align="right">
&lt;table width="538" height="243" align="right" style="border-collapse: collapse" cellpadding="0" cellspacing="0">
&lt;tbody>
&lt;tr>
&lt;td width="156" height="38" align="left">&lt;font face="Tahoma" size="2">Name&lt;/font>&lt;/td>
&lt;td width="386" height="38" align="left">
&lt;input type="text" name="real_name" size="34" class="textfield" />&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td width="156" height="38" align="left">&lt;font face="Tahoma" size="2">Game
Name&lt;/font>&lt;/td>
&lt;td width="386" height="38" align="left">
&lt;input type="text" name="gamename" size="34" class="textfield" />&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td width="156" height="38" align="left">&lt;font face="Tahoma" size="2">eMail&lt;/font>&lt;/td>
&lt;td width="386" height="38" align="left">&lt;input type="text" name="email" size="34" class="textfield"> &lt;/textarea>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td width="156" height="38" align="left">&lt;font face="Tahoma" size="2">Comment or Question
&lt;/font> &lt;/td>
&lt;td width="386" height="38" align="left">
&lt;textarea name="comment_question" cols="36" rows="6" class="textfield"> &lt;/textarea>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td width="156" height="38" align="left">&lt;font face="Tahoma" size="2">Any other Comments&lt;/font>&lt;/td>
&lt;td width="386" height="38" align="left">
&lt;textarea name="comments_other" cols="36" rows="6" class="textfield">&lt;/textarea>&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td colspan="2" width="348" height="26" align="left">
&lt;p align="left">&lt;input type="submit" value="Send" />&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;input type="hidden" name="required" value="real_name,email,comment_question,comments_other,ga mename" />
&lt;input type="hidden" name="env_report" value="REMOTE_HOST, REMOTE_ADDR, REMOTE_USER, HTTP_USER_AGENT" />
&lt;input type="hidden" name="bgcolor" value="000000" />
&lt;input type="hidden" name="text_color" value="808080" />
&lt;/form>

&lt;/body>

It also collects most of the info I need to track any lamers down, that piss me off.

I coule take your form and edit it so that the perl script's that run in the background would parse it for ya.. It collects the data, then present the data to the user, then mails the users and whomever else I have it setup to mail..

-(Oc)-Mavric
December 4th, 2002, 05:15
So this E-Mails the info to you then? We use a vote in method for new members where 3 staff have to vote in new members, members are usualy vouched for by a staff member or 2. This seemed to get rid of unwanted members, that were recruited by members who did not know what we were looking for... I have the flash 70% done on my recruiting form, now I'm just working on the action scritping that will post the data in the forum. I know I have to send the data to a php script that will post the info on the forum, but I'm still stuck on for to get it there... :) Ive been doing a lot of reading in both of my book on forms and what can be done with them, so far I can get it to send the data to a php page but it will only display it, I havent worked out actualy saving the data yet. I may try to adding SQL tables just for this, instead of posting it in the forum just have a page that the staff can log into and vote on... Basicly I'm being pulled in two directions at the moment, I have to see what will work better... The current page on the link I gave before is not working at all now... but I plan on pputting up the flash page soon. I think I may have an Idea on how to get it to post, I need to do a little testing... :)

Acedeal
December 4th, 2002, 11:28
So this E-Mails the info to you then?
Yes, this uses the sendmail functions on the server, it mails the results to the user, and a mail group I have setup.

Here is just a small snipet of the code, as you can see it's very easy to setup. Only about 5/6 lines of code that you have to change to get it to run on your system. You can find this at
http://nms-cgi.sourceforge.net/ if you wanted to try it for a form mailer replacement to the standard one that is on most apache servers.
-----------------------------

#!/usr/bin/perl -wT
#
# $Id: FormMail.pl,v 2.17 2002/10/10 08:00:15 nickjc Exp $
#

use strict;
use POSIX qw(locale_h strftime);
use Text::Wrap; # Er for wrapping :)
use Socket; # for the inet_aton()
use CGI qw(:standard);
use vars qw(
$DEBUGGING $emulate_matts_code $secure
$allow_empty_ref $max_recipients $mailprog @referers
@allow_mail_to @recipients %recipient_alias
@valid_ENV $date_fmt $style $send_confirmation_mail
$confirmation_text $locale $charset $no_content
$double_spacing $wrap_text $wrap_style
);
#
# USER CONFIGURATION SECTION
# --------------------------
#
BEGIN
{
$DEBUGGING = 0;
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 5;
$mailprog = '/usr/sbin/sendmail -oi -t';
@referers = qw(www.dow-sniper.net 64.176.221.28 localhost);
@allow_mail_to = qw(dow-sniper.net localhost);
@recipients = ();
%recipient_alias = ('1' => 'bcg@dow-sniper.net', //here is where you hide your email addresses
'2' => 'acedeal@dow-sniper.net',
'3' => 'lonely@dow-sniper.net',
);
@valid_ENV = qw(REMOTE_HOST REMOTE_ADDR REMOTE_USER HTTP_USER_AGENT);
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = '/css/text.css';
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$send_confirmation_mail = 0;
$confirmation_text = &lt;&lt;'END_OF_CONFIRMATION';
From: you@your.com
Subject: form submission

Thank you for your comments and form submission. If you were requesting information someone at Battalion Command Group will get back to you as soon as possible.
And Thank You agin.
-=DoW=- BCG

END_OF_CONFIRMATION
#
# USER CONFIGURATION &lt;&lt; END >>
# ----------------------------
#

Here is what the finished email page looks like when it is sent to me

X-POP3-Rcpt: acedeal@dow-sniper.net
Date: Wed, 4 Dec 2002 03:00:55 -0500
X-HTTP-Referer: [http://www.dow-sniper.net/contact_5.htm]
X-HTTP-Client: [213.93.189.15]
X-Mailer: NMS FormMail.pl (FormMail.pl) v2.17[http://nms-cgi.sourceforge.net/]
To: bcg@dow-sniper.net
From: mike@terstege.com
Subject: Comments or Questions about -=DoW=-

Below is the result of your feedback form. It was submitted by
(mike@terstege.com) on Wednesday, December 04, 2002 at 03:00:54
---------------------------------------------------------------------------

real_name: Mike ter Stege

gamename: Killa_Bee

comment_question: Hi,

I watched every day on the recruiting page because early december would be the date to recruite but now i read that recruiting stopped ..... did i miss something ??
Will recruiting be possible in the near future ??

With ragrds,
Mike ter Stege

comments_other: I really love to fight on any DOW server :-D

---------------------------------------------------------------------------
REMOTE_ADDR: 213.93.189.15
HTTP_USER_AGENT: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Acedeal
December 4th, 2002, 15:15
This might do the trick that you and I are trying to accomplish

http://www.oreilly.de/catalog/webdbapps/chapter/ch08.html

not sure, if it will do all that is needed but some of the sniplets of code are a code start to head in the right direction.

Lonely
December 6th, 2002, 08:59
Hey Ace.

I saw the recruitment form. It's OK so far. But I think you need to change a few details.

You first need to have a Forum Account before sending an Application to Recruitment
Why do they have to create an account b4 joining? It would be better to do that (and this is a must) after they are member.
So there's no need to change the account-name.
I suggest that all DoW members have an account name like this:
-=DoW=-Player-Name
This makes it easier to delete them from the dow-member-group
(in case they left etc. DoW).
And it's possible for them to use their without dow-tag acoount to post in our forum.

We do not Accept any Applications from
@yahoo or @hotmail Accounts or any other
Free Email Type Accounts.
You will need to have a Real Email Account
Did you validate the email field? In case they put in a mail free address, the form skould not work.

Your Favourite Countries
No idea what this is for ;-)

The Age field is missing. Ask when they are born.

-(Oc)-Mavric
December 6th, 2002, 09:30
Ok I have a Flash Form that will E-Mail the info to you, All I have left with that version is a little cosmetic work, I'm still working on getting it to send the info to the forum... I'll check out the link you gave as soon as I get finished making this post If you are interested in the flash form let me know I can customize a copy for you. :)

Acedeal
December 6th, 2002, 10:52
Fav Country.

If the dont pick USA as their fav Country they don't join -=DoW=- :)

-(Oc)-Mavric
December 6th, 2002, 11:31
LOL I had to Pick two To get the forum to go through If I remember right... :)

Father-Time.
March 12th, 2003, 03:09
Fav Country.

If the dont pick USA as their fav Country they don't join -=DoW=- :)

Now thats HARSH!! :D :P :D

Father

BTW nice coding there guys. Very impressive