print $Usage;
    }
}
/** get upload id through uploadtree id */
if (is_numeric($item) && !is_numeric($upload)) {
    $upload = GetUploadID($item);
}
/** check if parameters are valid */
if (!is_numeric($upload) || !empty($item) && !is_numeric($item)) {
    print "Upload ID or Uploadtree ID is not digital number\n";
    print $Usage;
    return 1;
}
account_check($user, $passwd);
// check username/password
$return_value = read_permission($upload, $user);
// check if the user has the permission to read this upload
if (empty($return_value)) {
    $text = _("The user '{$user}' has no permission to read the information of upload {$upload}\n");
    echo $text;
    return 1;
}
/**
 * @brief get monk license list of one specified uploadtree_id
 *
 * @param int $uploadtree_pk - uploadtree id
 * @param int $upload_pk - upload id
 * @param int $showContainer - include container or not, 1: yes, 0: no 
 * @param string $excluding
 * @param bool $ignore ignore files without license
 */
示例#2
0
文件: api.php 项目: Ereaey/Cloud
function get_table_elements($key, $id_cloud, $name_table)
{
    if (read_permission($key, $id_cloud)) {
        echo action_get_table_elements($id_cloud, $name_table);
    } else {
        echo json_encode(array('success' => false, 'error' => 'permission incorrect'));
    }
}