Ejemplo n.º 1
0
 public function index()
 {
     error_reporting(0);
     $options['clientId'] = '3622387872526969';
     $options['clientSecret'] = 'nM7RptdRoXtrD8DTAXkqQAVw6JlDDJmL';
     $options['redirectUri'] = 'https://github.com/ayudaresfacil/ayudaresfacil';
     $options['code'] = "TG-549513b5e4b0a8540f891937-171261795";
     $auth = CI_MercadoPago::auth($options);
     echo "auth";
     ma($auth);
     $auth = json_decode($auth);
     $options['refreshToken'] = $auth->{refresh_token};
     $token = CI_MercadoPago::token($options);
     echo "token";
     ma($token);
     $token = json_decode($token);
     $options['accessToken'] = $token->{access_token};
     $options['fee'] = 0;
     $item['title'] = "Donacion";
     $item['description'] = "Donacion";
     $item['quantity'] = 1;
     $item['unit_price'] = 1;
     $item['currency_id'] = "\$";
     $item['picture_url'] = "";
     $options['items'][0] = $item;
     $checkout = CI_MercadoPago::integrateCheckout($options);
     ma($checkout);
 }
Ejemplo n.º 2
0
<?php

/**
 * @author easyvn.net
 * @copyright 2015
 */
$id = $_REQUEST["id"];
include 'config.inc.php';
include 'ConDatabase.php';
function ma()
{
    $t0 = rand(0, 9);
    $t1 = rand(1, 9);
    $t2 = rand(0, 9);
    $t3 = rand(0, 9);
    $ma = 10000 * $t3 + 1000 * $t2 + 100 * $t1 + 10 * $t0;
    return $ma;
}
$result = mysqli_query($con, "SELECT * FROM users WHERE id={$id};");
while ($row = mysqli_fetch_array($result)) {
    $math = $row["math"];
}
if ($math == 0) {
    $math = ma();
    mysqli_query($con, "UPDATE users SET math={$math} WHERE id={$id}");
}
echo $math;
mysqli_free_result($result);
mysqli_close($con);
Ejemplo n.º 3
0
<?php

$pass = $_REQUEST["pass"];
$mail = $_REQUEST["mail"];
$name = $_REQUEST["name"];
$gio = $_REQUEST["gio"];
$date = $_REQUEST["date"];
require 'radomID.php';
include 'config.inc.php';
include 'ConDatabase.php';
$result = mysqli_query($con, " SELECT * FROM users WHERE mail={$mail}");
$count = mysqli_num_rows($result);
if ($pass == null and strlen($pass) >= 6) {
    echo 1;
} elseif ($count != 0) {
    echo 0;
} else {
    selectID();
    ma();
    mysqli_query($con, " INSERT INTO users(id,name,inchat,online,math,datet,mail,pass,reg,gio,date) VALUES({$userId},{$name},'N',0,{$ma},now(),{$mail},{$pass},1,{$gio},{$date})");
    $val = 1000000000 * $ma + $userId;
    echo $val;
}
mysqli_free_result($result);
mysqli_close($con);
Ejemplo n.º 4
0
    $t3 = rand(0, 9);
    $ma = 10000 * $t3 + 1000 * $t2 + 100 * $t1 + 10 * $t0;
    return $ma;
}
function selectID($con)
{
    $userId = rd();
    $result = mysqli_query($con, "SELECT * FROM users WHERE id={$userId};");
    while (mysqli_num_rows($result) != 0) {
        $userId = rd();
        $result = mysqli_query($con, "SELECT * FROM users WHERE id={$userId};");
    }
    return $userId;
}
if ($userId == 0) {
    $ma = ma();
    $userId = selectID($con);
    //mysqli_query($con,"INSERT INTO using(id, ) VALUES($userId,$ma);");
    mysqli_query($con, "INSERT INTO users(id,name,inchat,online,math,datet) VALUES({$userId},'n','N',1,{$ma},now());");
} else {
    $rest = mysqli_query($con, "SELECT * FROM users WHERE id={$userId};");
    if (mysqli_num_rows($rest) > 0) {
        $re = mysqli_query($con, "SELECT * FROM users WHERE id={$userId} AND math={$ma};");
        if (mysqli_num_rows($re) > 0) {
        } else {
            //..
            $userId = selectID($con);
            mysqli_query($con, "INSERT INTO users(id,name,inchat,online,math,datet) VALUES({$userId},'n','N',1,{$ma},now());");
        }
    } else {
        mysqli_query($con, "INSERT INTO users(id,name,inchat,online,math,datet) VALUES({$userId},'n','N',1,{$ma},now());");