Exemple #1
0
        header("Location /");
    } elseif ($usr_info['mail2'] == $fetch2['mail']) {
        header("Location /");
    } else {
        Transaction::query("INSERT INTO users (username,password,motto,mail,rank,fb_id) VALUES ('" . $usr_name2 . "', 'f09927c417e569baaeaa561f501d3e77', 'Registrei por facebook', '" . $usr_name . "', '2', '" . $usr_info . "');");
        $q = "SELECT * FROM users WHERE fb_id='" . $user_info['id'] . "'";
        $result = @Transaction::query($q);
        $row = Transaction::fetch($result);
    }
}
$q = "SELECT fb_id FROM users WHERE fb_id='" . $user_info['id'] . "'";
$result = @Transaction::query($q);
$row = Transaction::fetch($result);
$user_ida = $row['fb_id'];
$_SESSION['fb_id'] = $user_ida;
$user_id = $facebook->getUser();
if ($user_ida) {
    try {
        $ret_obj = $facebook->api('/me/feed', 'POST', array('link' => $msg, 'message' => $url));
    } catch (FacebookApiException $e) {
        $login_url = $facebook->getLoginUrl(array('scope' => 'publish_stream'));
        echo 'Please <a href="' . $login_url . '">login.</a>';
        error_log($e->getType());
        error_log($e->getMessage());
    }
} else {
    echo 'Voce nao esta Logado Corretamente no Facebook Acesse Primeiramente www.facebook.com Apos Isso Tente Logar Novamente';
    exit;
}
logs::mobbo_log("facebook");
header("Location: /me?connect=true&disableFriendLinking=false&next=");
Exemple #2
0
        $ticketsql = Transaction::query("SELECT auth_ticket FROM users WHERE id = '" . $id . "'") or die(mysql_error());
        $ticketrow = Transaction::fetch($ticketsql);
    }
} else {
    $SQL = Transaction::query("SELECT auth_ticket FROM users WHERE fb_id = '" . $fb_id . "'");
    echo mysql_error();
    $N = Transaction::num_rows($SQL);
    if ($N == 0) {
        Transaction::query("UPDATE `users` SET `auth_ticket` = '" . Security::GenerateTicket() . "', `ip_last` = '" . $myrealip . "' WHERE fb_id = '" . $fb_id . "'") or die(mysql_error());
    } else {
        Transaction::query("UPDATE `users` SET `auth_ticket` = '" . Security::GenerateTicket() . "', `ip_last` = '" . $myrealip . "' WHERE fb_id = '" . $fb_id . "'") or die(mysql_error());
    }
    $ticketsql = Transaction::query("SELECT auth_ticket FROM users WHERE fb_id = '" . $fb_id . "'") or die(mysql_error());
    $ticketrow = Transaction::fetch($ticketsql);
}
logs::mobbo_log("client");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
        <title><?php 
echo $sitename;
?>
</title>

        <script type="text/javascript">
            var andSoItBegins = (new Date ()).getTime ();
        </script>
Exemple #3
0
    // Se no houver erro
    if (!$erro) {
        // Gerando um nome aleatrio para a imagem
        $nomeAleatorio = md5(uniqid(time())) . strrchr($nome, ".");
        // Movendo arquivo para servidor
        if (!move_uploaded_file($temp, $caminho . $nomeAleatorio)) {
            $erro = 'Não foi possível anexar o arquivo';
        }
        $path_info = pathinfo("uploads/{$nomeAleatorio}");
        if ($path_info['extension'] == 'xml') {
            $xml = simplexml_load_file("uploads/{$nomeAleatorio}");
            Transaction::query("INSERT INTO mobbo_plugins (id, plugin_name, plugin_version, plugin_author, mobbo_code) VALUES\n(NULL, '" . $xml->name . "', '" . $xml->version . "', '" . $xml->author . "', '" . $xml->code . "')");
            $install = $xml->mysql_query;
            eval($install);
            echo "Plugin " . $xml->plugin_name . " installed.";
            logs::mobbo_log("pluginsdb");
        } else {
            echo 'Error.';
        }
    }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />

        <script type="text/javascript" src="web-gallery/js/jquery.js"></script>