loading image bits prep

This commit is contained in:
awesomeuser 2023-08-04 16:40:17 +00:00
parent 2d8b74f6a1
commit 3ae452806b

View file

@ -94,6 +94,12 @@
cursor: pointer;
}
</style>
<script>
function loadImageBits(canvasId, bits) {
alert(canvasId);
}
</script>
</head>
<body>
@ -202,11 +208,13 @@
// show content
$myfile = fopen("posts.txt", "r") or die("Unable to open file!");
if ($myfile) {
$index = 0;
while (($line = fgets($myfile)) !== false) {
echo "<div class='post'><h2>" . $line . "</h2>";
echo "<i>" . fgets($myfile) . "</i>";
echo "<div>" . fgets($myfile) . "</div></div>";
// <canvas style="width: 100%;" width="128" height="64"></canvas>
echo "<canvas id=\"c" . $index . "\" onload='loadImageBits(\"c" . $index . "\", " . fgets($myfile) . ")' style='width: 100%;' width='128' height='64'></canvas></div>";
index++;
}
fclose($myfile);