2 $monLibrary= dirname(__FILE__) .
"/../library";
3 require_once(
"$monLibrary/cu_top.i");
4 require_once(
"$monLibrary/ck_hticket.i");
6 if (!CheckPerm($link, $Hu, basename($_SERVER[
'SCRIPT_NAME']), $_SERVER[
'REMOTE_ADDR'])) {
9 header(
"Location: /hcuadm/hcu_noperm.prg");
13 $dms_ok=array(
'edress'=>
'string',
'generate'=>
'string');
18 if (trim($edress) ==
"" ) {
19 $msg =
'Please enter an email address';
21 $edress = trim($edress);
23 $secret =
'nO_mOrE_sPaM';
24 $captcha_secret =
'No_MoRe_SpAm';
26 $hash = md5($secret . md5(implode(
':', Array($secret, $edress))));
27 $captcha_hash = md5($captcha_secret . md5(implode(
':', Array($captcha_secret, $edress))));
29 $input = htmlentities(
"<input type='hidden' name='key' value='$hash'>");
30 $captcha_input = htmlentities(
"<input type='hidden' name='key' value='$captcha_hash'>");
33 cu_header(
"Generate Email Key");
36 <table width=
"540" border=
"3" cellpadding=
"3" cellspacing=
"3" bordercolor=
"#666666">
38 <td
class=
'bar'>Contact Form Key Generator</td>
41 <td bgcolor=
"#CCCCFF"> </td>
44 <td
class=
'hdr'>Enter user email below and click generate key:</td>
48 if (trim($msg) >
"") { print <<<EOF
49 <td
class=
'ahd'>$msg:</td>
55 <td
class=
'dtl'><br> <form name=
"form1" method=
"post" action=
"GenKey.prg">
57 <input name=
"edress" type=
"text" size=
"50" value=
"$edress">
58 <input type=
"submit" name=
"Submit" value=
"Generate Key">
59 <input type=
"hidden" name=
"generate" value=
"go">
64 <td bgcolor=
"#CCCCFF"> </td>
67 <td
class=
'dtl'>Copy & Paste generated key below
for the appropriate usage:</td>
71 <h4>Key used WITH a captcha</h4>
75 <h4>Key used with NO captcha</h4>
82 <td
class=
'dtl' align=
'center'><p><input type=
"button" value=
"Close Window" onClick=
"window.close()"></p></td>