0) ) { $found = true; } } // ref = actual_link $ref = $_SERVER["REQUEST_URI"]; // 18-9-2018 "union" vanwege b.v: include(pages/hololens\\' union 0x5e2526, $blocks = array("union"); // foreach ($blocks as $block) { if (strpos($ref, $block > 0) ) { $found = true; } } if ($found) { include "autoban.php"; exit; } ?> query($query); return $result; } } } if (!function_exists('mysql_fetch_array')) { function mysql_fetch_array($result){ if($result){ $row = $result->fetch_assoc(); return $row; } } } if (!function_exists('mysql_fetch_assoc')) { function mysql_fetch_assoc($result){ if($result){ $row = $result->fetch_assoc(); return $row; } } } if (!function_exists('mysql_num_rows')) { function mysql_num_rows($result){ if($result){ $row_cnt = $result->num_rows;; return $row_cnt; } } } if (!function_exists('mysql_free_result')) { function mysql_free_result($result){ if($result){ global $mysqli; $result->free(); } } } if (!function_exists('mysql_data_seek')) { function mysql_data_seek($result, $offset){ if($result){ global $mysqli; return $result->data_seek($offset); } } } if (!function_exists('mysql_close')) { function mysql_close(){ global $mysqli; return $mysqli->close(); } } if (!function_exists('mysql_insert_id')) { function mysql_insert_id(){ global $mysqli; $lastInsertId = $mysqli->insert_id; return $lastInsertId; } } if (!function_exists('mysql_error')) { function mysql_error(){ global $mysqli; $error = $mysqli->error; return $error; } } /* old php $con = mysql_connect('localhost', 'sndrvnl', '12database!'); mysql_select_db("sndrvnl-2", $con); */ $q = "select NOW() as moment"; $result = mysql_query( $q ); $row = mysqli_fetch_assoc($result); $nowmoment = $row['moment']; $now = strtotime($row['moment']); function humandate($arg) { global $now; $mom = strtotime($arg); $ret = ''; $diff = $now-$mom; $minutes = round($diff/60); $hours = round($minutes/60); $days = round($hours/24); if ($minutes < 60) { $ret = $minutes; if ($minutes == 0) { $ret = "1 minute ago"; } else if ($minutes == 1) { $ret .= " minute ago"; } else { $ret .= " minutes ago"; } } else if (($minutes > 59) && ($minutes < 1440)) { if ($hours == 1) { $ret .= $hours.' hour ago'; } else { $ret .= $hours.' hours ago'; } } else if ($days < 7) { if ($days == 1) { $ret .= $days.' day ago'; } else { $ret .= $days.' days ago'; } } else { $ret = $arg; } return $ret; } function ChangetoIntLoc( $value_Dec ) { return $value_Dec * 1000000; } function ChangetoBool( $value_Tinyint ) { if ( strlen( trim( $value_Tinyint ) ) != 0 ) { if ( $value_Tinyint == 1 ) $value_Bool = TRUE; else $value_Bool = FALSE; return $value_Bool; } else return NULL; } function ChangetoInt( $string ) { if ( strlen( trim( $string ) ) != 0 ) { return (int)$string; } else return NULL; } function ChangetoFloat( $string ) { if ( strlen( trim( $string ) ) != 0 ) { return (float)$string; } else return NULL; } function makesafe($hack) { $hack = htmlspecialchars($hack); $hack = strip_tags($hack); $hack = str_replace("select", "", $hack); $hack = str_replace("SELECT", "", $hack); $hack = str_replace("update", "", $hack); $hack = str_replace("UPDATE", "", $hack); $hack = str_replace("delete", "", $hack); $hack = str_replace("DELETE", "", $hack); $hack = str_replace("drop", "", $hack); $hack = str_replace("DROP", "", $hack); $hack = str_replace(";", "", $hack); $hack = str_replace("--", "", $hack); $hack = str_replace("\0", "", $hack); //Finish filtering $hack of html tags and dangerous funcs //Begin filtering $hack of non alphanumeric characters // $hack = preg_replace("/[^0-9a-z -#]/i",'', $hack); $hack = addslashes($hack); return $hack; } function detect_mobile() { $_SERVER['ALL_HTTP'] = isset($_SERVER['ALL_HTTP']) ? $_SERVER['ALL_HTTP'] : ''; $mobile_browser = '0'; if(preg_match('/(up.browser|up.link|mmp|symbian|smartphone|midp|wap|phone|iphone|ipad|android|xoom)/i', strtolower($_SERVER['HTTP_USER_AGENT']))) $mobile_browser++; if((isset($_SERVER['HTTP_ACCEPT'])) and (strpos(strtolower($_SERVER['HTTP_ACCEPT']),'application/vnd.wap.xhtml+xml') !== false)) $mobile_browser++; if(isset($_SERVER['HTTP_X_WAP_PROFILE'])) $mobile_browser++; if(isset($_SERVER['HTTP_PROFILE'])) $mobile_browser++; $mobile_ua = strtolower(substr($_SERVER['HTTP_USER_AGENT'],0,4)); $mobile_agents = array( 'w3c ','acs-','alav','alca','amoi','audi','avan','benq','bird','blac', 'blaz','brew','cell','cldc','cmd-','dang','doco','eric','hipt','inno', 'ipaq','java','jigs','kddi','keji','leno','lg-c','lg-d','lg-g','lge-', 'maui','maxo','midp','mits','mmef','mobi','mot-','moto','mwbp','nec-', 'newt','noki','oper','palm','pana','pant','phil','play','port','prox', 'qwap','sage','sams','sany','sch-','sec-','send','seri','sgh-','shar', 'sie-','siem','smal','smar','sony','sph-','symb','t-mo','teli','tim-', 'tosh','tsm-','upg1','upsi','vk-v','voda','wap-','wapa','wapi','wapp', 'wapr','webc','winw','winw','xda','xda-' ); if(in_array($mobile_ua, $mobile_agents)) $mobile_browser++; if(strpos(strtolower($_SERVER['ALL_HTTP']), 'operamini') !== false) $mobile_browser++; // Pre-final check to reset everything if the user is on Windows if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows') !== false) $mobile_browser=0; // But WP7 is also Windows, with a slightly different characteristic if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'windows phone') !== false) $mobile_browser++; if($mobile_browser>0) return true; else return false; } ?>