Upload all the files to your server, then simply run the Install Wizard.
A link to the wizard can be found on the home.php page, or just open the /install/ folder on your server.
See protected_2.php or protected_3.php for an example.
<?php include_once('classes/class.check.php'); ?>
<?php protect("1, 2, 3"); ?>
With this, your page will only be visible to level 1, 2, and 3 users.
See my-account.php for an example.
Use a wildcard to require signing in before viewing a page.
<?php include_once('classes/class.check.php'); ?>
<?php protect("*"); ?>
This will show your page to all signed in members.
See protected.php for an example.
<?php include_once('classes/class.check.php'); ?>
<?php if( protectThis("1, 2, 3") ) : ?>
<p>This html text is viewable only to levels 1, 2, or 3 </p>
<?php endif; ?>
<p>The text here can be seen by any user, guest or not!</p>
Checks if the user is logged in
<?php
if (!isset($_SESSION)) session_start();
if(isset($_SESSION['jigowatt']['username'])) {
echo "You're logged in!";
}
?>
Returns the logged in user's username
<?php
if (!isset($_SESSION)) session_start();
if(isset($_SESSION['jigowatt']['username'])) {
echo "You're username is: " . $_SESSION['jigowatt']['username'];
}
?>
Checks if the current user is an admin
<?php
if (!isset($_SESSION)) session_start();
if(in_array(1, $_SESSION['jigowatt']['user_level'])) {
echo "You're an admin! Howdy";
}
?>
In our example, we will use German (de_DE)
Note: You will have troubles using translations on a Windows environment. It is recommended that you use a Linux server.
phplogin.pot file, located in /languages/ of our script.
phplogin.po in the following directory: /languages/de_DE/LC_MESSAGES/We saved it under de_DE for German. Click here to find your locale (abbreviation).
phplogin.mo file.
/classes/class.translate.php and change en_US to de_DE and English to German.