コード例 #1
0
    }
    if ($_POST['upload'] == 0 || $_POST['upload'] == "") {
        $uploadspeed = "No Limit";
        $up = "";
    } else {
        $uploadspeed = $_POST['upload'];
        $up = $_POST['upload'];
    }
    if ($_POST['quota'] == 0 || $_POST['quota'] == "") {
        $quota = "No Limit";
        $mb = "";
    } else {
        $quota = $_POST['quota'];
        $mb = $_POST['quota'];
    }
    $vouchers = $unifidata->create_voucher($voucherlength, $_POST['number'], $_POST['notes'], $up, $down, $mb);
    ?>
				
				<br><br><br><br>
<table width="896" border="1" align="center" cellpadding="5">
				  <tbody>
				    <tr>
				      <td width="166" align="center" style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;">Code</td>
				      <td width="160" align="center" style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;">Create Time</td>
				      <td width="225" align="center" style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;">Note</td>
				      <td width="105" align="center" style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;">Duration</td>
							<td width="80" align="center" style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;">Download</td>
							<td width="80" align="center" style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;">Upload</td>
							<td width="80" align="center" style="font-family: Cambria, 'Hoefler Text', 'Liberation Serif', Times, 'Times New Roman', serif;">Quota</td>
				    </tr>
				    
コード例 #2
0
*/
$timeafterlogin = $time_1 - $time_start;
if ($action != '') {
    $objectscount = count($data);
}
$time_2 = microtime(true);
$timeafterload = $time_2 - $time_start;
/*
calculate all the timings/percentages
*/
$time_end = microtime(true);
$timetotal = $time_end - $time_start;
$loginperc = $timeafterlogin / $timetotal * 100;
$loadperc = ($timeafterload - $timeafterlogin) / $timetotal * 100;
$remainperc = 100 - $loginperc - $loadperc;
$unifidata->create_voucher(55, $number_of_vouchers_to_create = 1, "t5t5t5t5t5");
?>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Unifi API browser</title>
    <!-- Latest compiled and minified Bootstrap and Font-awesome CSS loaded from CDN -->
    <link rel="stylesheet" href="<?php 
echo $cssurl;
?>
">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.0.0/styles/default.min.css">
    <style>
    body {