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 require(
'dms_imp_val.i');
15 $dms_ok=array(
'tname'=>
'string',
'generate'=>
'string');
19 $helpicon=
"<img src='/monitor/images/q1.gif' border=0 alt='View Help' valign='top'>";
20 $helpdoc=
"$infourl/hcuadm/TicketHashes.html";
25 if (trim($tname) ==
"" ) {
26 $msg =
'Please enter ticket name / price';
28 $tname = trim($tname);
29 $hash = htmlspecialchars(`/usr/local/bin/tickethash.pl
"$tname"`);
30 list ($name,$price) = explode(
"@", $tname);
31 $price = sprintf(
"%f",$price);
32 $price = preg_replace(
'/0*$/',
'',$price);
33 $price = preg_replace(
'/\.$/',
'',$price);
34 $showhash =
"<input type='hidden' name='H_$name' value='${price}_${hash}'>";
37 cu_header(
"Generate Ticket Hash");
40 <script language=
"javascript">
41 <!-- Hide Javascript from older browsers
42 function show_help(marker)
44 helpwin=window.open(marker,
"_Help",
"toolbar=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=600,height=340");
53 <table width=
"540" border=
"3" cellpadding=
"3" cellspacing=
"3" bordercolor=
"#666666">
55 <td
class=
'bar'>Ticket Sales Hash Generator
56 <a href=
'javascript:show_help("$helpdoc");'>$helpicon</a>
60 <td bgcolor=
"#CCCCFF"> </td>
63 <td
class=
'hdr'>Enter ticket name / price below and click generate hash:</td>
67 if (trim($msg) >
"") { print <<<EOF
68 <td
class=
'ahd'>$msg:</td>
74 <td
class=
'dtl'><br> <form name=
"form1" method=
"post" action=
"TicketHash.prg">
76 <input name=
"tname" type=
"text" size=
"50" value=
"$tname">
77 <input type=
"submit" name=
"Submit" value=
"Generate Hash">
78 <input type=
"hidden" name=
"generate" value=
"go">
83 <td bgcolor=
"#CCCCFF"> </td>
86 <td
class=
'dtl'>Copy & Paste generated hidden field below:</td>
95 <td
class=
'dtl' align=
'center'><p><input type=
"button" value=
"Close Window" onClick=
"window.close()"></p></td>