コード例 #1
0
ファイル: kernel-action.php プロジェクト: kelubo/OpenQRM
        if ($kernel->id > 0) {
            $event->log("{$kernel_command}", $_SERVER['REQUEST_TIME'], 5, "kernel-action", "Kernel name must be unique! Not adding new kernel " . $kernel_name, "", "", 0, 0, 0);
        } else {
            if ($kernel_name == 'default') {
                $kernel_fields["kernel_id"] = 1;
            } else {
                $kernel_fields["kernel_id"] = (int) str_replace(".", "", str_pad(microtime(true), 15, "0"));
            }
            $kernel->add($kernel_fields);
        }
        break;
    case 'update':
        $kernel = new kernel();
        $kernel->update($kernel_id, $kernel_fields);
        break;
    case 'remove':
        $kernel = new kernel();
        $kernel->remove($kernel_id);
        break;
    case 'remove_by_name':
        $kernel = new kernel();
        $kernel->remove_by_name($kernel_name);
        break;
    default:
        $event->log("{$kernel_command}", $_SERVER['REQUEST_TIME'], 3, "kernel-action", "No such kernel command ({$kernel_command})", "", "", 0, 0, 0);
        break;
}
?>

</body>