예제 #1
0
function buttonAvail($name)
{
    global $buttons, $buttonInfo, $buttonAttr;
    if (!in_array($name, $buttons)) {
        return false;
    }
    readButtons();
    if ($buttonInfo[$name]['nextAvail'] <= time()) {
        return true;
    }
    return false;
}
<?php

include_once "buttons.php";
readButtons();
$data['time'] = time();
$data['buttons'] = $buttonInfo;
echo json_encode($data);