Array ( [rewrite-url] => logout/ ) '."\r\n"; foreach($field_array as $key => $value) { if($key==$field_selected) { $select.= "\t".''."\r\n"; } else { $select.= "\t".''."\r\n"; } } $select.= "\r\n"; echo($select); } function logged() { if($_SESSION["client_id"]=="") { return false; } else { return true; } } function check_login() { if(!logged()) { header("Location:http://pingdown.com/"); } } function getMonthRange(&$start_date, &$end_date, $offset=0) { $start_date = ''; $end_date = ''; $date = date('Y-m-d'); list($yr, $mo, $da) = explode('-', $date); $start_date = date('Y-m-d', mktime(0, 0, 0, $mo - $offset, 1, $yr)); $i = 2; list($yr, $mo, $da) = explode('-', $start_date); while(date('d', mktime(0, 0, 0, $mo, $i, $yr)) > 1) { $end_date = date('Y-m-d', mktime(0, 0, 0, $mo, $i, $yr)); $i++; } } /************************************/ function __autoload($class_name) { switch($class_name) { case "Rdbms": include_once(SITE_MODULE_PATH.'/Rdbms/rdbms_loadmod.php'); break; case "PHPMailer": include_once(SITE_ROOT_PATH.'/lib/phpmailer/class.phpmailer.php'); break; case "EmpSalary": include_once(SITE_MODULE_PATH.'/salary/employeesalary_loadmod.php'); break; case "EmpPf": include_once(SITE_MODULE_PATH.'/pf/employeepf_loadmod.php'); break; case "EmpEsi": include_once(SITE_MODULE_PATH.'/esi/employesi_loadmod.php'); break; case "Investment": include_once(SITE_MODULE_PATH.'/investment/investment_loadmod.php'); break; case "InvestmentType": include_once(SITE_MODULE_PATH.'/investment_type/investment_type_loadmod.php'); break; case "Client": include_once(SITE_MODULE_PATH.'/Client/client_loadmod.php'); break; case "Contact": include_once(SITE_MODULE_PATH.'/Contact/contact_loadmod.php'); break; case "Device": include_once(SITE_MODULE_PATH.'/Device/device_loadmod.php'); break; case "DeviceStats": include_once(SITE_MODULE_PATH.'/DeviceStats/devicestats_loadmod.php'); break; case "Notify": include_once(SITE_MODULE_PATH.'/Notify/notify_loadmod.php'); break; case "Alert": include_once(SITE_MODULE_PATH.'/Alert/alert_loadmod.php'); break; case "Check": include_once(SITE_MODULE_PATH.'/Check/check_loadmod.php'); break; case "Invite": include_once(SITE_MODULE_PATH.'/Invite/invite_loadmod.php'); break; case "InviteOut": include_once(SITE_MODULE_PATH.'/InviteOut/inviteout_loadmod.php'); break; case "Session": include_once(SITE_MODULE_PATH.'/Session/session_loadmod.php'); break; case "Quickcheck": include_once(SITE_MODULE_PATH.'/Quickcheck/quickcheck_loadmod.php'); break; case "QuickcheckResult": include_once(SITE_MODULE_PATH.'/QuickcheckResult/quickcheckresult_loadmod.php'); break; case "QuickcheckAV": include_once(SITE_MODULE_PATH.'/QuickcheckAV/quickcheckav_loadmod.php'); break; case "QuickcheckAVResult": include_once(SITE_MODULE_PATH.'/QuickcheckAVResult/quickcheckavresult_loadmod.php'); break; case "QuickcheckAS": include_once(SITE_MODULE_PATH.'/QuickcheckAS/quickcheckas_loadmod.php'); break; case "QuickcheckASResult": include_once(SITE_MODULE_PATH.'/QuickcheckASResult/quickcheckasresult_loadmod.php'); break; case "BlackHead": include_once(SITE_MODULE_PATH.'/BlackHead/blackhead_loadmod.php'); break; case "BlackData": include_once(SITE_MODULE_PATH.'/BlackData/blackdata_loadmod.php'); break; case "MalwareHead": include_once(SITE_MODULE_PATH.'/MalwareHead/malwarehead_loadmod.php'); break; case "MalwareData": include_once(SITE_MODULE_PATH.'/MalwareData/malwaredata_loadmod.php'); break; case "Billing": include_once(SITE_MODULE_PATH.'/Billing/billing_loadmod.php'); break; case "Ticket": include_once(SITE_MODULE_PATH.'/Ticket/ticket_loadmod.php'); break; case "TicketDetail": include_once(SITE_MODULE_PATH.'/TicketDetail/ticketdetail_loadmod.php'); break; case "PayPal": include_once(SITE_MODULE_PATH.'/PayPal/paypal_loadmod.php'); break; case "WebsiteAV": include_once(SITE_MODULE_PATH.'/WebsiteAV/websiteav_loadmod.php'); break; case "WebsitePageAV": include_once(SITE_MODULE_PATH.'/WebsitePageAV/websitepageav_loadmod.php'); break; case "ServerAS": include_once(SITE_MODULE_PATH.'/ServerAS/serveras_loadmod.php'); break; case "NotifyAS": include_once(SITE_MODULE_PATH.'/NotifyAS/notifyas_loadmod.php'); break; case "NotifyAH": include_once(SITE_MODULE_PATH.'/NotifyAH/notifyah_loadmod.php'); break; case "Twitter": include_once(SITE_MODULE_PATH.'/Twitter/twitter_loadmod.php'); break; default: // include_once(SITE_ROOT_PATH.'/lib/dompdf/dompdf_config.inc.php'); //DOMPDF_autoload($class_name); } } function generate_key($length,$blnApha) { $random= ""; $strset =""; srand((double)microtime()*1000000); if($blnApha!="") { $strset .= "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $strset .= "abcdefghijklmnopqrstuvwxyz"; } $strset .= "1234567890"; // Add the special characters to $char_list if needed for($i = 0; $i < $length; $i++) { $random .= substr($strset,(rand()%(strlen($strset))), 1); } return $random; } function cURL($url, $header, $cookie, $p) { $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, $header); curl_setopt($ch, CURLOPT_NOBODY, $header); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_COOKIE, $cookie); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if ($p) { curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $p); } $result = curl_exec($ch); curl_close($ch); if ($result) { return $result; } else { return curl_error($ch); } } class Normalizer { function Normalizer($url){ $parts = parse_url($url); $this->host = $this->clean_host($parts['host']); if($this->is_ip($this->host)){ $this->host = normalize_ip($this->host); } if(isset($parts['path'])) { $this->path = $this->clean_path($parts['path']); } else { $this->path = '/'; } if(isset($parts['query'])) { $this->query = $parts['query']; } else { $this->query = ''; } } function clean_host($host){ $host = preg_replace('`\.+`','.', $host); $host = preg_replace('`^\.`', '', $host); $host = preg_replace('`\.$`', '', $host); $host = strtolower($host); return urlencode($host); } function clean_path($path){ while(preg_match('`%[0-9a-fA-f]{2}`', $path)) { $path = urldecode($path); } $old = ''; while($old != $path){ $old = $path; $path = str_replace('/./','/',$path); } $path = preg_replace('`/+`','/',$path); $parts = explode("/", $path); $i = 0; $j = 0; $segs = array(); while($i < count($parts)) { if($parts[$i] == '..'){ unset($parts[$i]); unset($parts[$i-1]); $i--; $j++; continue; } $segs[$i] = urlencode($parts[$j]); $i++; $j++; } return implode("/", $segs); } function is_ip($host){ $parts = explode(".", $host); // too many parts to the IP if(count($parts) > 4) { return false; } // all parts are valid numbers foreach($parts as $segment) { if(preg_match("`^\d+$`", $segment) == false && preg_match("`^0x(\d|[a-fA-F])+$`", $segment) == false){ return false; } } return true; } function normalize_ip($host){ $parts = explode(".", $host); $count = count($parts); $int = 0; $i = 0; foreach($parts as $segment) { $i++; if(substr($segment, 0, 2) == "0x"){ // hex $value = base_convert(substr($segment, 2),16,10); } else if(substr($segment, 0, 1) == "0"){ // octal $value = base_convert($segment,8,10); } else { // decimal $value = base_convert($segment,10,10); } if($count == 1) { // only one number while($value > (pow(2,32)-1)) { // bring it down into the right bit range $value = $value - pow(2,32); } $int |= $value; } else if($i == $count) { // if it is the last bit $int |= $value & (pow(2,8*($count-1))-1); } else { $int |= ($value & 255) << (4-$i)*8; } } return (($int>>24)&255) . "." . (($int>>16)&255) . "." . (($int>>8)&255) . "." . ($int&255); } function path_possibilities() { $pos = array(); $pos[] = $this->path; if($this->query){ $pos[] = $this->path . "?" . $this->query; } $parts = explode("/", $this->path); $i = 0; while($i < 4 && $i < count($parts)-1) { if($i == 0){ $pos[] = "/"; } else if($i < (count($parts)-1)){ $pos[] = $pos[count($pos)-1] . $parts[$i] . "/"; } else { $pos[] = $pos[count($pos)-1] . $parts[$i]; } $i++; } return $pos; } function host_possibilities() { $pos = array(); $pos[] = $this->host; $parts = explode('.',$this->host); $host = array_pop($parts); for($i = 2;$i < 6 && count($parts) > 1; $i++) { $host = array_pop($parts) . "." . $host; $pos[] = $host; } return $pos; } function link_possibilities() { $hosts = $this->host_possibilities(); $paths = $this->path_possibilities(); $pos = array(); foreach($hosts as $host){ foreach($paths as $path){ $pos[] = $host . $path; } } return $pos; } function hash_possibilities() { $hosts = $this->host_possibilities(); $paths = $this->path_possibilities(); $pos = array(); foreach($hosts as $host){ foreach($paths as $path){ // echo $host . $path."
"; $pos[] = md5($host . $path); } } return $pos; } } ?>