예제 #1
0
    $member->save();
    $_SESSION['logged'] = true;
    $_SESSION["user"]['email'] = $member->email;
    $_SESSION["user"]['name'] = $member->name;
    if (isset($returnURL)) {
        unset($_SESSION['returnURL']);
        header('Location: ' . $returnURL);
    } else {
        header('Location: ' . $ROOT);
    }
}
// Register $_GET
if (isset($_SESSION["user"]['meetup_id']) && !isset($_SESSION['logged'])) {
    $GeodevDB = new GeodevDB(array("meetup_id" => $member->meetup_id));
    $userprofile = $GeodevDB->getUser(array("type" => "userprofile"));
    if ($userprofile) {
        //User is in the database
        $smarty->assign('USER', $userprofile);
    } elseif (isset($_SESSION["meetup_member"])) {
        $smarty->assign('USER', array("name" => $_SESSION["meetup_member"]->name, "joined" => $member->parseEpoch($_SESSION["meetup_member"]->joined), "photo_url" => $_SESSION['photo_url']));
    }
    $smarty->assign('GEOSKILLS', $GeodevDB->getSkills(array("type" => "geo")));
    $smarty->assign("SESSION", $_SESSION);
    $smarty->display('register.tpl');
} else {
    if (isset($_GET['returnURL'])) {
        header('Location: ' . $_GET['returnURL']);
    } else {
        header('Location: ' . $ROOT);
    }
}
예제 #2
0
<?php

require_once '../config.php';
require_once 'init.php';
$GeodevDB = new GeodevDB();
if (isset($_GET['tech']) && $_GET['tech']) {
    $users = $GeodevDB->getExperts(array("tech" => $_GET['tech']));
    $smarty->assign('TECH', $_GET['tech']);
} else {
    $users = $GeodevDB->getMembers();
}
$smarty->assign('SKILLS', $GeodevDB->getSkills(array("type" => "all")));
$smarty->assign('OTHERSKILLS', $GeodevDB->getSkills(array("type" => "other")));
$smarty->assign('GEOSKILLS', $GeodevDB->getSkills(array("type" => "geo")));
$smarty->assign('TOTALUSERS', $db->getValue("profiles", "count(meetup_id)"));
$smarty->assign('USERS', $users);
$smarty->display('miembros.tpl');