Exemplo n.º 1
0
function file_add_info($name, $size, $type)
{
    $user_id = $_SESSION['user_id'];
    $result = mybox_users_get_by_id($user_id);
    $result = $result[0]->user_username;
    mybox_file_add($result, $name, $size, $type);
}
Exemplo n.º 2
0
function mybox_handel_uploaded_file($name, $size, $type, $tmp_name)
{
    include 'APIuser.php';
    include 'core.inc.php';
    $target_loaction = 'uploads/';
    if (isset($name)) {
        if (!empty($name)) {
            move_uploaded_file($tmp_name, $target_loaction . $name);
            echo 'File uploaded successfully.';
            $user_id = $_SESSION['user_id'];
            $result = mybox_users_get_by_id($user_id);
            $result = $result[0]->user_username;
            mybox_file_add($result, $name, $size, $type);
        } else {
            echo 'Please choose a file.';
        }
    }
}
Exemplo n.º 3
0
<?php

require 'core.inc.php';
require 'connect.inc.php';
require 'APIuser.php';
require 'APIip.php';
$get_result = mybox_users_get_by_id($_SESSION['user_id']);
$result = $get_result[0];
$username = $result->user_username;
$phone = $result->user_phone;
$add_result = mybox_ip_add($ip_address, $username, $phone);
if ($add_result) {
    header("Location: dirpage.php");
}