Soon, we’ll be announcing a fresh new marketplace for TastyIgniter developers.

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Private admin connection for restaurant owner

#1 ludenpark Offline Newbie
Hi,
I would like to know if it is possible that a owner of a restaurant can have a private connection 
The owner could only see his order and settings and reservation and not all of others restaurant !
Regards
Frank
#2 Tanbir Offline Junior Member
Hey,


If you want only the restaurants that received the order to view that one order and not any other order to other restaurants i would not know how to do that other than going to the admin panel->systems->putting order mail ''To Location''

----------------
If you want even more security to your admin panel to prevent people from accessing it while they are not at your restaurant,

The follow code will only let listed IP access the admin page.

Create file ip-blocker.php
Code:
<?php
// enter the IP numbers here, who you want to have access
$allowed_ips = array(
"IP address 1",
"IP address 2");

// set the loops to 0 before we start the check
$a = 0;
$i = 0;

// start checking the ip numbers to see if they are allowed
while ($allowed_ips[$i+1] !== null)
{
if (preg_match($allowed_ips[$i], $_SERVER['REMOTE_ADDR']))
{ $a=$a+1; }
 $i=$i+1;
}

// if ip address is not found send them somewhere else ...
if ($a == 0)   {
echo ("Sorry, you do not have access to this page.");
exit();
}
?>

Paste the following code in the header.php in partials folder.

Code:
<?php include ("ip-blocker.php"); ?>


Make sure to test the tastyigniter system in case the code interferes with any features/processes.

Possibly Related Threads...

Thread / Author
Forum Jump:

Users browsing this thread: 1 Guest(s)