Author Topic: Website integration  (Read 3436 times)

0 Members and 1 Guest are viewing this topic.

Offline Bodzio

  • Newbie
  • *
  • Posts: 36
  • BJ Fan
    • View Profile
    • Always - Bon Jovi Portal Gallery
Website integration
« on: January 09, 2007, 09:44:09 PM »
Greets!

I am trying to intergate my website with 4images.

How can I know about user perrmisions? I would like to give only registered and logged in users acces to few external webpages (php files), so I need to add a code to each file, for example:

if(logged_in=TRUE)
{
"acces granted"
}
else
{
"bye bye"
}
You know what I mean...

How can I do this?
---
Best regards / Pozdrawiam serdecznie

Artur "Bodzio" Bogdański

Offline Bodzio

  • Newbie
  • *
  • Posts: 36
  • BJ Fan
    • View Profile
    • Always - Bon Jovi Portal Gallery
Re: Website integration
« Reply #1 on: January 09, 2007, 10:22:42 PM »
I am an idiot, sorry:

I have to add:

define('GET_CACHES', 1);
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$user_access = get_permission();

and then check the users permissions by:

<?
if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
echo("BYE");
}
else
{
echo("OK");
}
?>

Sorry for a spam topic.
---
Best regards / Pozdrawiam serdecznie

Artur "Bodzio" Bogdański