$font ".BACK."

"; function xxx(&$str){ $approvedtags = array( "p"=>array('align'), "b"=>array(), "i"=>array(), "a"=>array('href', 'target'), "em"=>array(), "br"=>array(), "strong"=>array(), "blockquote"=>array(), "tt"=>array(), "hr"=>array('align', 'width', 'size', 'noshade'), "li"=>array('type'), "ol"=>array('type', 'start'), "ul"=>array('type'), "pre"=>array() ); $keys = array_keys($approvedtags); $text=split('<',$str); $first = 1; foreach($text as $value){ $temp=split('>',$value); if(count($temp) > 1){ $end=''; $tag=split(' ',$temp[0]); if($tag[0][0] == '/'){ $end='/'; $tag[0]=substr($tag[0],1); } if(in_array($tag[0],$keys)){ $string.='<'.$end.$tag[0]; for($i=1; $i<=count($tag); $i++){ $attributes=split('=',$tag[$i]); if(in_array($attributes[0], $approvedtags[$tag[0]])){ $string.=' '.$tag[$i]; } } $string.='>'; }else{ $string.='<'.htmlentities($value); } $string.=htmlentities($temp[1]); }else{ if( ! $first){ $string.='<'; } $string .= htmlentities($value); } $first = 0; } $str = $string; return $str; } include_once 'db.php'; $d = new dbC(); $d->connect($db_host, $db_username, $db_password, $db); if(!eregi("admin/index.php", $_SERVER['SCRIPT_NAME'])){ $checko=$d->query("select * from $db_prefix"."options where id='1'"); if($checko){ $GetOptions=$d->query("select * from $db_prefix"."options where id='1'"); $GetArray=$d->fetch_array($GetOptions); $admin=$GetArray[admin]; $sortby=$GetArray[sortby]; $url=$GetArray[url]; $title=$GetArray[title]; $title=xxx($title); $notify_email=$GetArray[notify_email]; $showonlyyourgroup=$GetArray[group_setting]; $allowdelete=$GetArray[allow_delete]; $files=$GetArray[file_types]; $filesize=$GetArray[file_size]; $action_amount=$GetArray[action_ticket_list]; $support_email=$GetArray[reply_email]; $font_face=$GetArray[font_face]; $font_face=xxx($font_face); $font_size=$GetArray[font_size]; $font_size=xxx($font_size); $font_color=$GetArray[font_color]; $font_color=xxx($font_color); $allowgive=$GetArray[allowgive]; $allowmsg=$GetArray[allow_msg]; $openreg=$GetArray[open_reg]; $color_rows=$GetArray[color_rows]; $font=""; $font_table_top=""; } } function head(){ global $title; echo "$title "; echo "
"; } function foot(){ global $font,$ver,$showcopyright; echo "
"; if($showcopyright == "yes"){ echo "


$font (c) 2003 - * phpSupport ".$ver." * <Chris S>
This program is released under the GNU General Public License.
"; } echo "
"; } ?> 0) { $rest = ($diff % 86400); $days = ($diff - $rest) / 86400; if( $rest % 3600 > 0 ) { $rest1 = ($rest % 3600); $hours = ($rest - $rest1) / 3600; if( $rest1 % 60 > 0 ) { $rest2 = ($rest1 % 60); $minutes = ($rest1 - $rest2) / 60; $seconds = $rest2; }else $minutes = $rest1 / 60; }else $hours = $rest / 3600; }else $days = $diff / 86400; return array( "days" => $days, "hours" => $hours, "minutes" => $minutes, "seconds" => $seconds); } function recover_form($username,$current_email){ global $dbselect,$query,$mresults,$close,$numrows, $font; echo "

"; echo "
$font Recover lost password.

 
  "; echo "
$font Username:
$font Email Address:
 
"; echo "
 
 
"; } function loginf(){ echo "

"; echo "
 
  "; global $dbselect,$query,$mresults,$close,$numrows, $db_prefix, $font; echo "
$font ".USER_NAME."
$font ".PASS_WORD."
"; global $mresults,$close,$numrows, $db_prefix, $openreg; if($openreg == "1"){ echo "$font
".REG_NOW."
"; } echo "
 
 
"; } // end of login // start of signup function signup_form($name,$email,$username){ global $dbselect,$query,$mresults,$close,$numrows, $font; echo "
"; echo "
 
  "; echo "
$font ".NAME."
$font ".EMAIL."
$font ".USER_NAME."
$font ".PASS_WORD."
$font ".CPASS_WORD."
 
"; echo "
 
 
"; } // end of signup // start of email check function MailVal($Addr, $Level, $Timeout = 15000) { $gTLDs = "com:net:org:edu:gov:mil:int:arpa:"; $CCs = "ad:ae:af:ag:ai:al:am:an:ao:aq:ar:as:at:au:aw:az:ba:bb:bd:be:bf:". "bg:bh:bi:bj:bm:bn:bo:br:bs:bt:bv:bw:by:bz:ca:cc:cf:cd:cg:ch:ci:". "ck:cl:cm:cn:co:cr:cs:cu:cv:cx:cy:cz:de:dj:dk:dm:do:dz:ec:ee:eg:". "eh:er:es:et:fi:fj:fk:fm:fo:fr:fx:ga:gb:gd:ge:gf:gh:gi:gl:gm:gn:". "gp:gq:gr:gs:gt:gu:gw:gy:hk:hm:hn:hr:ht:hu:id:ie:il:in:io:iq:ir:". "is:it:jm:jo:jp:ke:kg:kh:ki:km:kn:kp:kr:kw:ky:kz:la:lb:lc:li:lk:". "lr:ls:lt:lu:lv:ly:ma:mc:md:mg:mh:mk:ml:mm:mn:mo:mp:mq:mr:ms:mt:". "mu:mv:mw:mx:my:mz:na:nc:ne:nf:ng:ni:nl:no:np:nr:nt:nu:nz:om:pa:". "pe:pf:pg:ph:pk:pl:pm:pn:pr:pt:pw:py:qa:re:ro:ru:rw:sa:sb:sc:sd:". "se:sg:sh:si:sj:sk:sl:sm:sn:so:sr:st:su:sv:sy:sz:tc:td:tf:tg:th:". "tj:tk:tm:tn:to:tp:tr:tt:tv:tw:tz:ua:ug:uk:um:us:uy:uz:va:vc:ve:". "vg:vi:vn:vu:wf:ws:ye:yt:yu:za:zm:zr:zw:"; $cTLDs = "com:net:org:edu:gov:mil:co:ne:or:ed:go:mi:"; $fail = 0; $Addr = strtolower($Addr); $UD = explode("@", $Addr); if (sizeof($UD) != 2 || !$UD[0]) $fail = 1; $Levels = explode(".", $UD[1]); $sLevels = sizeof($Levels); if ($sLevels < 2) $fail = 1; $tld = $Levels[$sLevels-1]; $tld = ereg_replace("[>)}]$|]$", "", $tld); if (strlen($tld) < 2 || strlen($tld) > 3 && $tld != "arpa") $fail = 1; $Level--; if ($Level && !$fail) { $Level--; if (!ereg($tld.":", $gTLDs) && !ereg($tld.":", $CCs)) $fail = 2; } if ($Level && !$fail) { $cd = $sLevels - 2; $domain = $Levels[$cd].".".$tld; if (ereg($Levels[$cd].":", $cTLDs)) { $cd--; $domain = $Levels[$cd].".".$domain; } } if ($Level && !$fail) { $Level--; if (!getmxrr($domain, $mxhosts, $weight)) $fail = 3; } if ($Level && !$fail) { $Level--; while (!$sh && list($nul, $mxhost) = each($mxhosts)) $sh = fsockopen($mxhost, 25); if (!$sh) $fail = 4; } if ($Level && !$fail) { $Level--; set_socket_blocking($sh, false); $out = ""; $t = 0; while ($t++ < $Timeout && !$out) $out = fgets($sh, 256); if (!ereg("^220", $out)) $fail = 5; } if ($sh) fclose($sh); return $fail; } // end of email check // clean up code function cleanup ($comment) { $comment = trim ($comment); for ($c = 1; $c <= 4; $c++) $comment = str_replace ("\n\n\n", "\n\n", $comment); $comment = str_replace ("\n", '', nl2br ($comment)); $comment = str_replace ("\\'", '\'', nl2br ($comment)); # $comment = str_replace ("
", '', ($comment)); list ($words) = array (explode (' ', $comment)); // $words array formed $comment = ''; foreach ($words as $c => $word) { if (strlen ($word) > 60 and !ereg ("[\[|\]|\/\/|\.com]", $word)) $word = wordwrap ($word, 60, '
', 1); $comment .= ' ' . $word; } $comment = str_replace (array ('
', '
', '
'), '
', $comment); return trim ($comment); } // end of clean up // create ticket form function create_ticket_form($userid,$ticket_short_description,$ticket_full_description,$ticket_severity){ echo "
"; echo "
 
  "; global $font,$files,$db,$filesize; global $db_prefix,$db,$db_host,$db_username,$db_password; $d = new dbC(); $d->connect($db_host, $db_username, $db_password, $db); echo "

$font ".C_NEW."

"; echo " "; echo " "; if($files != ""){ echo " "; } echo "
$font ".C_TITLE."
$font ".T_S."
$font ".T_T." "; $checkgroups="select * from $db_prefix"."groups"; $check_results=$d->query($checkgroups); $amount_groups=$d->numrows($check_results); if($amount_groups != "" || $amount_groups != "0"){ echo ""; } $d->close(); echo "
$font ".T_D."
$font ".ATTACH."
 
"; if($files != ""){ echo "$font ".SUPPORT_FILES."
"; $gettypes=explode("," , $files); $array_count=count($gettypes); $countit=0; while($countit < $array_count){ echo "$gettypes[$countit], "; ++$countit; } echo "

"; } echo "
 
 
"; } //end of create form function newpassform(){ global $dbselect,$query,$mresults,$close,$numrows, $db_prefix, $font; echo "
 $font ".O_PASS."
 $font ".N_PASS."
 $font ".CPASS_WORD."
 
"; } function searchform(){ echo "

"; global $dbselect,$query,$mresults,$close,$numrows, $db_prefix, $font; echo "
 
  "; echo "
 $font ".SEARCH."   $font ".FOR_i."  
"; echo "
 
 
"; } function createuser($new_name,$new_email,$new_username,$new_password){ global $mresults,$close,$numrows, $db_prefix, $font; echo "
"; echo ""; echo "
$font ".NAME."
$font ".EMAIL."
$font ".USER_NAME."
$font ".PASS_WORD."
$font ".GROUP.":"; global $db_username,$db_host,$db_password,$close,$numrows, $db_prefix, $db,$mysql_access; $d = new dbC(); $d->connect($db_host, $db_username, $db_password, $db); $checkgroups="select * from $db_prefix"."groups"; $check_results=$d->query($checkgroups); $amount_groups=$d->numrows($check_results); if($amount_groups != "" || $amount_groups != "0"){ echo ""; } $d->close(); echo "

"; } function edituser($users_id,$user_name,$users_email,$users_username,$admin_rights,$group_id,$levels){ global $dbselect,$query,$mresults,$close,$numrows, $db_prefix, $font,$groupid; echo "
$font ".NAME."
$font ".EMAIL."
$font ".USER_NAME." $font $users_username
$font ".ADMIN_RIGHT." "; if($admin_rights == "1"){ echo " "; } else { echo " "; } echo "$font ".CADMIN_RIGHT."
$font ".STAFF." "; if($levels == "5"){ echo " "; } else { echo " "; } echo "$font ".STAFF_O."
$font ".PASS_WORD."
(".PASS_FIELD.")
$font ".GROUP." "; global $dbselect,$query,$mresults,$close,$db_host,$db_username,$db_password,$numrows, $db_prefix, $db,$mysql_access; $d = new dbC(); $d->connect($db_host, $db_username, $db_password, $db); $checkgroups="select * from $db_prefix"."groups"; $check_results=$d->query($checkgroups); $amount_groups=$d->numrows($check_results); if($amount_groups != "" || $amount_groups != "0"){ echo ""; } $d->close(); echo "


"; } function safeHTML(&$str){ $approvedtags = array( "p"=>array('align'), "b"=>array(), "i"=>array(), "a"=>array('href', 'target'), "em"=>array(), "br"=>array(), "strong"=>array(), "blockquote"=>array(), "tt"=>array(), "hr"=>array('align', 'width', 'size', 'noshade'), "li"=>array('type'), "ol"=>array('type', 'start'), "ul"=>array('type'), "pre"=>array() ); $keys = array_keys($approvedtags); $text=split('<',$str); $first = 1; foreach($text as $value){ $temp=split('>',$value); if(count($temp) > 1){ $end=''; $tag=split(' ',$temp[0]); if($tag[0][0] == '/'){ $end='/'; $tag[0]=substr($tag[0],1); } if(in_array($tag[0],$keys)){ $string.='<'.$end.$tag[0]; for($i=1; $i<=count($tag); $i++){ $attributes=split('=',$tag[$i]); if(in_array($attributes[0], $approvedtags[$tag[0]])){ $string.=' '.$tag[$i]; } } $string.='>'; }else{ $string.='<'.htmlentities($value); } $string.=htmlentities($temp[1]); }else{ if( ! $first){ $string.='<'; } $string .= htmlentities($value); } $first = 0; } $str = $string; return $str; } function sendpmg($subject,$message){ global $dbselect,$query,$mresults,$close,$numrows,$db_prefix,$fetch,$db,$font,$db_host,$db_username,$db_password; $d = new dbC(); $d->connect($db_host, $db_username, $db_password, $db); echo "
$font ".TO."
$font ".SUBJECT."
$font ".MESSAGE."
 
 

"; echo "$font
*".ALLFIELD."
"; } ?> ERROR5