Skip to main content
Recent Posts
11
Chit Chat / Re: Spuds PC
Last post by Zioclive -
 :cheesy:

It's perfect for tropical fishes acquarium  owners, you could use the patato-pc and at the same time warm up a  the fishes's water...
13
Chit Chat / Re: Spuds PC
Last post by radu81 -
can't believe I watched this video, anyway that mini PC is very powerful for those dimensions.
14
Site Feedback / Re: Server Change
Last post by Spuds -
Good old Post By Email (PBE, or should that be PbE) ... anyway all those mail list functions.  On the new server I could do it all local, but to keep testing as many things as  I can it will continue to use Imap via Gmail functions.
15
Chit Chat / Re: Spuds PC
Last post by Spuds -
boil-em, mash-em, stick them in a stew !

That pretty much looks like my home monitor:potato::fries:
16
Site Feedback / Re: Server Change
Last post by radu81 -
Back in 2013-2014 when I started to use a VPS and sending emails from that vps my result on mail-tester.com was something like 2-3 / 10: "Your email will never see the light of an inbox" or something similar. :embarrassed:
It took me some time to arrive at 9.5 / 10.
Quote from: Spuds – Still need to do some PBE testing as well, but at least registration style emails look good.
what is PBE testing?
19
Support / Re: External PHP page (on same domain) only accessible for logged in members.
Last post by Esteffano -
Thank you again,

it really worked well.

I made a little function based on you code to simplify working with the mechanism.

Code: [Select]
<?php

$ssi_guest_access = false;

// Include the SSI file.
require(__DIR__ . '/SSI.php');


/**
 * isVisitorLoggedIntoGroup
 *
 * Check whether or not visitor is in at least one of specified groups
 * @param mixed $mGroups may be string or array
 * @return bool TRUE if is in any of the groups, FALSE if in none at all
 */
function isVisitorLoggedIntoGroup($mGroups) {
    global $user_info;

    // Ensure $mGroups is always an array
    $groupsToCheck = (is_array($mGroups)) ? $mGroups : [$mGroups];

    // Check if the user is in any of the specified groups
    foreach ($groupsToCheck as $group) {
        if (in_array($group, $user_info['groups'], true)) {
            return true;
        }
    }

    // If none of the specified groups match, return false
    return false;
}

echo 'Something anyone can see.<br>';

// Check if the user in any of the specified groups
$allowedGroup = isVisitorLoggedIntoGroup([1, 2, 99]);
if($allowedGroup){
echo 'Something that\'s only meant to be seen by $allowedGroup.';
} else {
echo '<a href="#">Login</a>';
}

Best regards,
Esteffano