# THIS FILE DISPLAYS GUTS OF: Control Panel, User Search Form

&FormStart("$vars_config{CGIURL}/cp.cgi", "$Hiddens");

my ($thissearchstatus, $thisadvancedwording, $thislink, $refresher);


if ($in{'advanced'} eq "true") {
	$thissearchstatus    = " - Advanced";
	$thisadvancedwording = "To return to the quick search screen, ";
	$thislink            = "<a href='$vars_config{CGIURL}/cp.cgi?ubb=user_settings&'>click here</a>.";
	$refresher           = "";
} else {
	$thissearchstatus    = " ";
	$thisadvancedwording = "For extended search options, ";
	$thislink            = "<a href='$vars_config{CGIURL}/cp.cgi?ubb=user_settings&advanced=true'>click here</a>.";
	$refresher           = qq(<input type="hidden" name="refresher" value="250" />);
}


&TBT;

&HeaderRow("$vars_wordlets_cp{search_users_header} $thissearchstatus", "2", "#5d7790", "#FFFFFF", "center", "2");

print <<THEVERYENDOFYOU;

<tr><td colspan="2" bgcolor="white"><font face="Verdana, Arial, sans-serif" size="2">

<p>$thisadvancedwording $thislink</p>
</td></tr>

<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>$vars_wordlets{login_name}</b>
</td>
<td bgcolor="white" width="67%" align="left">
<input type="text" size="25" maxlength="25"  name="login_name" />
</td>
</tr>

<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>$vars_wordlets{email_field}</b>
</td>
<td bgcolor="white" width="67%" align="left">
<input type="text" size="35" maxlength="80"  name="email" />
</td>
</tr>

<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>$vars_wordlets{user_number}</b>
<small><br /><!-- Don't Panic! -->
Results will show only the member number you enter.  If you enter <b>42</b>, only member number <b>42</b> will be displayed.
</small></font></td>
<td bgcolor="white" width="67%" align="left" valign="top">
<input type="text" size="8" maxlength="8"  name="user_number" />
</td>
</tr>

THEVERYENDOFYOU

if ($in{'advanced'} eq "true") {

	&HeaderRow("Extended Search Options", "2", "#5d7790", "#FFFFFF", "center", "2");

	print <<VERTIGO;

<tr><td colspan="2" bgcolor="white"><font face="Verdana, Arial, sans-serif" size="2">
<b>Warning</b>: Searching using the following options will require the UBB to open each
user profile file, which will slow down the search considerably!  For faster
and more accurate results, fill in at least one of the two options above.
</td></tr>


<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>Current Display Name</b>
<small><br />If you upgraded from a 5.x version: Users who have not updated their profiles since
you upgraded might not have a Display Name!  Users without Display Names will not be displayed.
</small></font></td>
<td bgcolor="white" width="67%" align="left">
<input type="text" size="35" maxlength="35"  name="displayname" />
</td>
</tr>


<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>Member Status</b>
</td>
<td bgcolor="white" width="67%" align="left">
<select size="1" name="user_status">
<option value="None" selected="selected">Any Status</option>
<option value="Mem">Member</option>
<option value="COPPA">COPPA Member</option>
<option value="Mod">Moderator</option>
<option value="Admin">Administrator</option>
</select>
</td>
</tr>


<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>Number of Posts</b>
<br /><small><b>Both fields are required</b>.
</small>
</td>
<td bgcolor="white" width="67%" align="left">
<select size="1" name="postsmath">
<option value="none" selected="selected"> N/A </option>
<option value="GT">Greater Than</option>
<option value="EQ">Exactly</option>
<option value="LT">Less Than</option>
</select>
<input type="text" size="6" maxlength="10"  name="num_posts" />
</td>
</tr>

<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>Registration Date</b>
<br /><small><b>Both fields are required</b>.<br />Enter date as <b>YYYY-MM-DD</b> (include dashes).
</small></font>
</td>
<td bgcolor="white" width="67%" align="left">
<select size="1" name="regmath">
<option value="None" selected="selected"> N/A </option>
<option value="GT">After</option>
<option value="EQ">On</option>
<option value="LT">Before</option>
</select>
<input type="text" size="10" maxlength="10"  name="regdate" value="YYYY-MM-DD" />
</td>
</tr>


<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>User May Post</b>
<small><br />This only searches the user's permission to create new posts.
This will not search a user's permission to send new private messages.
</small></font></td>
<td bgcolor="white" width="67%" align="left">
<select size="1" name="canpost">
<option value="None" selected="selected"> N/A      </option>
<option value="YES">Yes &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</option>
<option value="NO">    No     </option>
</select>
</td>
</tr>

<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>Private Forum Access</b>
<small><br />Administrators have access to all private forums, and will not be listed.
</small></font></td>
<td bgcolor="white" width="67%" align="left">
<select size="1" name="private_forum">
<option value="none" selected="selected"> N/A </option>
$private_forum_options
</select>
</td>
</tr>

<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>Last Post Date</b>
<br /><small><b>Both fields are required</b>.<br />Enter date as <b>YYYY-MM-DD</b> (include dashes).
</small>
<small><br />If a user has not made any posts, or you have not Updated
the Member Post Histories recently, searching by last post date may not produce
accurate results!
</small></font></td>
<td bgcolor="white" width="67%" align="left">
<select size="1" name="lpostmath">
<option value="None" selected="selected"> N/A </option>
<option value="GT">After</option>
<option value="EQ">On</option>
<option value="LT">Before</option>
</select>
<input type="text" size="10" maxlength="10"  name="lastpost" value="YYYY-MM-DD" />
</td>
</tr>
VERTIGO

	&HeaderRow("Other Options", "2", "#5d7790", "#FFFFFF", "center", "2");

	print <<THEBADPLACE;
<tr>
<td bgcolor="white" width="33%" align="right"><font face="Verdana, Arial, sans-serif" size="2">
<b>Members Per Refresh</b>
<small><br />The number of member profiles to open per search per refresh.
We advise keeping this number low to ease load on the server.
</small></font></td>
<td bgcolor="white" width="67%" align="left">
<select size="1" name="refresher">
<option value="100">100</option>
<option value="250" selected="selected">250</option>
<option value="500">500</option>
</select>
</td>
</tr>

THEBADPLACE

}    #endif
else {
	&HeaderRow("Other Options", "2", "#5d7790", "#FFFFFF", "center", "2");
}

print <<THEBADPLACE;
$refresher
<tr><td colspan="2" bgcolor="white"><font face="Verdana, Arial, sans-serif" size="2">
<input type="checkbox"  name="ViewEntire" value="Yes" />
Ignore search parameters - display all registered members.
</td></tr>

THEBADPLACE

&TBB;


&Submit("$vars_wordlets_cp{search_users_submit}");

# Nothing below this line should be changed.. and there is no more code!

# This entire program is copyright Infopop Corporation.
# For more info on the Ultimate Bulletin Board and other Infopop
# Products/Services, visit: http://www.infopop.com

# You may not distribute this program in any manner, modified or otherwise.

#You make modifications, but only for your own use and within the confines of the UBB License Agreement.

# DANGER: Do not remove the following line!
1;
