D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home3
/
encodto1
/
salvation.incrediblebengal.com
/
admin
/
Filename :
function.php
back
Copy
<?php if (!isset($_SESSION['restroUser'])) {echo '<script> window.location.href = "index.php";</script>';} // else{ echo '<script> window.location.href = "abcdef.php";</script>';} 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']; } } function getOrderDateTime(){ $datetime = new DateTime('now', new DateTimeZone('Asia/Kolkata')); return $datetime->format('Y-m-d H:i'); } function getOrderDate(){ $date = new DateTime('now', new DateTimeZone('Asia/Kolkata')); return $date->format('Y-m-d'); } function getOrderTime(){ $time = new DateTime('now', new DateTimeZone('Asia/Kolkata')); return $time->format('H:i:s'); } function redirect($link){ echo "<script>window.location.href='<?php echo $link ?>'</script>"; } function DisplayData($table, $rows="*",$where=null,$order=null){ global $conn; $table = $table; $info_query = "SELECT $rows FROM $table"; if ($where != null) {$info_query .= " WHERE $where";} if ($order != null) {$info_query .= " ORDER BY $order";} $dine_orderlist = mysqli_query($conn, $info_query); $dinedata=mysqli_num_rows($dine_orderlist); return $dinedata; } function pr($arr){ echo '<pre>'; print_r($arr); } function prd($var){ echo "<pre>"; print_r($var); die(); } ?>