Ejemplo n.º 1
0
/**
The actual Activity Check functionality
*/
function run_activitycheck()
{
    global $mybb, $db, $cache;
    $masterclass = new RPGSuite($mybb, $db, $cache);
    $grouplist = $masterclass->get_icgroups_members('activitycheck = 1');
    foreach ($grouplist as $id => $group) {
        foreach ($group->get_members() as $member) {
            $user = $member->get_info();
            if (inactive($member)) {
                $group->hard_remove_member($user['uid']);
            }
        }
    }
}
Ejemplo n.º 2
0
include_once '../includes/functions.php';
if (!loggedinadmin()) {
    die("<script>location.href = 'login.php'</script>");
}
if (isset($_GET['del'])) {
    $no = $_GET['del'];
    delete($no);
} elseif (isset($_GET['acpt'])) {
    $no = $_GET['acpt'];
    accept($no);
} elseif (isset($_GET['actv'])) {
    $no = $_GET['actv'];
    active($no);
} elseif (isset($_GET['inac'])) {
    $no = $_GET['inac'];
    inactive($no);
}
function delete($no)
{
    require_once "../includes/sql.php";
    $conexion = db_connect();
    $sql = "DELETE FROM user WHERE user_id='" . $no . "'";
    $result = $conexion->query($sql) or die("oopsy, error when tryin to delete ");
}
function accept($no)
{
    require_once "../includes/sql.php";
    $conexion = db_connect();
    $sql = "UPDATE `user` SET `is_active` = '1' WHERE `user_id` = " . $no;
    $result = $conexion->query($sql) or die("oopsy, error when tryin to delete ");
}