D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
kk.encodersunlimited.com
/
Filename :
function.php
back
Copy
<?php if (!function_exists('stringModify')) { function stringModify($action){ $action_title = str_replace("_", " ", $action); return $action_title; } } if (!function_exists('getUserIP')) { function getUserIP(){ switch (true) { case (!empty($_SERVER['HTTP_X_REAL_IP'])): return $_SERVER['HTTP_X_REAL_IP']; case (!empty($_SERVER['HTTP_CLIENT_IP'])): return $_SERVER['HTTP_CLIENT_IP']; case (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])): return $_SERVER['HTTP_X_FORWARDED_FOR']; default: return $_SERVER['REMOTE_ADDR']; } } } if (!function_exists('DisplayData')) { function DisplayData($table, $rows="*", $where=null, $order=null){ global $conn; $info_query = "SELECT $rows FROM $table"; if ($where != null) { $info_query .= " WHERE $where"; } if ($order != null) { $info_query .= " ORDER BY $order"; } $data_res = mysqli_query($conn, $info_query); return $data_res; } } if (!function_exists('DataCount')) { function DataCount($table){ global $conn; $query = mysqli_query($conn, "SELECT * FROM $table"); $data = mysqli_num_rows($query); return $data; } } if (!function_exists('redirect')) { function redirect($link){ echo "<script>window.location.href='$link'</script>"; } } if (!function_exists('pr')) { function pr($arr){ echo '<pre>'; print_r($arr); echo '</pre>'; } } if (!function_exists('prd')) { function prd($var){ echo "<pre>"; print_r($var); echo "</pre>"; // die(); } } if (!function_exists('get_safeStr')) { function get_safeStr($str){ global $conn; $data = stripcslashes($str); $str = mysqli_real_escape_string($conn, $data); return $str; } } ?>