game/adminion/test.php

54 lines
1.1 KiB
PHP
Raw Normal View History

2024-12-17 08:40:25 +00:00
<?php
use Battle\Fighter;
use Core\Db;
require_once $_SERVER['DOCUMENT_ROOT'] . '/_incl_data/autoload.php';
$a = ['foo' => 'eta', 'bar' => 'bingo', 'baz' => 'quatro', 'mill' => 'buratino erra stupido'];
\Core\Debug::x();
//$f1 = new Fighter(27319412, 4);
$f2 = new Fighter(27205347, 2);
//echo $f1;
echo $f2;
//var_dump($f1);
$u = User::start(27205347);
var_dump($u->stats['items'], $u->stats);
?>
<!--<div id="test"></div>
<div id="app">{{ message }}</div>
-->
<script type="module">
const a = <?= json_encode(['bar' => 'bingo', 'baz' => 'quatro', 'mill' => 'buratino erra stupido']) ?>;
if (a["mill"]) {
const div = document.getElementById('test');
if (a['bar']) {
div.className = a['bar'];
}
div.innerHTML = a["mill"];
document.body.append(div);
}
import { createApp, ref } from 'https://unpkg.com/vue@3/dist/vue.esm-browser.js'
createApp({
setup() {
const message = ref('Hello Vue!')
return {
message
}
}
}).mount('#app')
</script>