Porządki
This commit is contained in:
@@ -0,0 +1,122 @@
|
||||
const fs = require('fs');
|
||||
const css = `
|
||||
/* Wariant 2: Uciekająca Kura */
|
||||
.anim-run {
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.anim-run .chicken {
|
||||
position: absolute;
|
||||
font-size: 24px;
|
||||
animation: runLeft 3s infinite linear;
|
||||
}
|
||||
.anim-run .chef {
|
||||
position: absolute;
|
||||
font-size: 28px;
|
||||
animation: runLeftChef 3s infinite linear;
|
||||
}
|
||||
@keyframes runLeft {
|
||||
0% { transform: translateX(100px); }
|
||||
100% { transform: translateX(-40px); }
|
||||
}
|
||||
@keyframes runLeftChef {
|
||||
0% { transform: translateX(140px); }
|
||||
100% { transform: translateX(0px); }
|
||||
}
|
||||
|
||||
/* Wariant 3: Kura w garnku */
|
||||
.anim-pot {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
}
|
||||
.anim-pot .pot-emoji {
|
||||
font-size: 32px;
|
||||
z-index: 2;
|
||||
}
|
||||
.anim-pot .chicken-head {
|
||||
position: absolute;
|
||||
font-size: 24px;
|
||||
bottom: 10px;
|
||||
z-index: 1;
|
||||
animation: peekaboo 4s infinite ease-in-out;
|
||||
}
|
||||
@keyframes peekaboo {
|
||||
0%, 100%, 80% { transform: translateY(15px); opacity: 0; }
|
||||
30%, 50% { transform: translateY(0px); opacity: 1; }
|
||||
}
|
||||
|
||||
/* Wariant 4: Latająca pizza */
|
||||
.anim-pizza {
|
||||
position: relative;
|
||||
width: 50px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.anim-pizza .chef-pizza {
|
||||
font-size: 28px;
|
||||
z-index: 1;
|
||||
}
|
||||
.anim-pizza .pizza-emoji {
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
animation: spinPizza 2s infinite ease-in-out;
|
||||
}
|
||||
@keyframes spinPizza {
|
||||
0%, 100% { transform: translateY(0) rotate(0deg); }
|
||||
50% { transform: translateY(-15px) rotate(360deg); }
|
||||
}
|
||||
|
||||
/* Wariant 5: Nerwowa świnka */
|
||||
.anim-pig {
|
||||
position: relative;
|
||||
width: 60px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.anim-pig .pig-emoji {
|
||||
font-size: 28px;
|
||||
animation: nervous 0.2s infinite;
|
||||
}
|
||||
.anim-pig .sweat-emoji {
|
||||
position: absolute;
|
||||
font-size: 16px;
|
||||
top: 0;
|
||||
right: 15px;
|
||||
animation: sweatDrop 1s infinite;
|
||||
}
|
||||
.anim-pig .knife-emoji {
|
||||
position: absolute;
|
||||
font-size: 20px;
|
||||
right: -10px;
|
||||
animation: knifeStab 2s infinite ease-in-out;
|
||||
}
|
||||
@keyframes nervous {
|
||||
0%, 100% { transform: translateX(0); }
|
||||
50% { transform: translateX(2px); }
|
||||
}
|
||||
@keyframes sweatDrop {
|
||||
0% { transform: translateY(0); opacity: 1; }
|
||||
100% { transform: translateY(10px); opacity: 0; }
|
||||
}
|
||||
@keyframes knifeStab {
|
||||
0%, 100% { transform: translateX(10px); opacity: 0; }
|
||||
50% { transform: translateX(0px); opacity: 1; }
|
||||
}
|
||||
`;
|
||||
fs.appendFileSync('public/assets/css/stolik2_api.css', css);
|
||||
console.log("Appended CSS");
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
$serverName = '192.168.20.20';
|
||||
$connectionOptions = ['Database' => 'Gastro', 'Uid' => 'sa', 'PWD' => 'karczma!@#26', 'CharacterSet' => 'UTF-8'];
|
||||
$conn = sqlsrv_connect($serverName, $connectionOptions);
|
||||
|
||||
$tsql = "
|
||||
SELECT
|
||||
rp.ID AS PozycjaID,
|
||||
rp.TowarID,
|
||||
rp.ZestawID,
|
||||
rp.GrupaZestawuID,
|
||||
rp.FlgPozycjaNadrzedna,
|
||||
rp.RolaWKompozycji,
|
||||
rp.StatusRealizacji,
|
||||
rp.DataDodania,
|
||||
t.NazwaTowaru AS TowarNazwa,
|
||||
tz.NazwaTowaru AS ZestawNazwa
|
||||
FROM dbo.NGastroDTRachunekPozycja rp
|
||||
INNER JOIN dbo.NGastroDTRachunek r ON r.ID = rp.DTRachunekID
|
||||
LEFT JOIN dbo.NGastroTowar t ON t.ID = rp.TowarID
|
||||
LEFT JOIN dbo.NGastroTowar tz ON tz.ID = rp.ZestawID
|
||||
WHERE r.Numer = 4094
|
||||
";
|
||||
|
||||
$stmt = sqlsrv_query($conn, $tsql);
|
||||
$results = [];
|
||||
while ($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
|
||||
if ($row['DataDodania'] instanceof DateTime) {
|
||||
$row['DataDodania'] = $row['DataDodania']->format('Y-m-d H:i:s');
|
||||
}
|
||||
$results[] = $row;
|
||||
}
|
||||
echo json_encode($results, JSON_PRETTY_PRINT);
|
||||
?>
|
||||
@@ -0,0 +1,24 @@
|
||||
const fs = require('fs');
|
||||
const html = fs.readFileSync('public/stolik2_api.html', 'utf8');
|
||||
|
||||
// Match first style and script tags
|
||||
const cssMatch = html.match(/<style>([\s\S]*?)<\/style>/);
|
||||
const jsMatch = html.match(/<script>([\s\S]*?)<\/script>/);
|
||||
|
||||
if(cssMatch) {
|
||||
fs.writeFileSync('public/assets/css/stolik2_api.css', cssMatch[1].trim());
|
||||
}
|
||||
if(jsMatch) {
|
||||
fs.writeFileSync('public/assets/js/stolik2_api.js', jsMatch[1].trim());
|
||||
}
|
||||
|
||||
let newHtml = html;
|
||||
if(cssMatch) {
|
||||
newHtml = newHtml.replace(/<style>[\s\S]*?<\/style>/, '<link rel="stylesheet" href="assets/css/stolik2_api.css">');
|
||||
}
|
||||
if(jsMatch) {
|
||||
newHtml = newHtml.replace(/<script>[\s\S]*?<\/script>/, '<script src="assets/js/stolik2_api.js"></script>');
|
||||
}
|
||||
|
||||
fs.writeFileSync('public/stolik2_api.html', newHtml);
|
||||
console.log("Extraction complete.");
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
$serverName = '192.168.20.20';
|
||||
$connectionOptions = ['Database' => 'Gastro', 'Uid' => 'sa', 'PWD' => 'karczma!@#26', 'CharacterSet' => 'UTF-8'];
|
||||
$conn = sqlsrv_connect($serverName, $connectionOptions);
|
||||
|
||||
if (!$conn) {
|
||||
die(print_r(sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
$tsql = "
|
||||
SELECT TABLE_NAME, COLUMN_NAME
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE COLUMN_NAME LIKE '%KDS%'
|
||||
OR COLUMN_NAME LIKE '%Druk%'
|
||||
OR COLUMN_NAME LIKE '%Kierun%'
|
||||
OR COLUMN_NAME LIKE '%Stanowisk%'
|
||||
OR COLUMN_NAME LIKE '%Ekran%'
|
||||
OR COLUMN_NAME LIKE '%Wydruk%'
|
||||
";
|
||||
|
||||
$stmt = sqlsrv_query($conn, $tsql);
|
||||
if (!$stmt) {
|
||||
die(print_r(sqlsrv_errors(), true));
|
||||
}
|
||||
|
||||
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
|
||||
// Only care about related tables like NGastroTowar, NGastroDTRachunekPozycja, etc.
|
||||
if (strpos($row['TABLE_NAME'], 'NGastro') === 0) {
|
||||
echo $row['TABLE_NAME'] . " -> " . $row['COLUMN_NAME'] . "\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
$serverName = '192.168.20.20';
|
||||
$connectionOptions = ['Database' => 'Gastro', 'Uid' => 'sa', 'PWD' => 'karczma!@#26', 'CharacterSet' => 'UTF-8'];
|
||||
$conn = sqlsrv_connect($serverName, $connectionOptions);
|
||||
|
||||
$tables = ['NGastroDTRachunek', 'NGastroDTRachunekPozycja', 'NGastroKonfiguracjaDrukowaniaZamowien'];
|
||||
|
||||
foreach ($tables as $table) {
|
||||
echo "--- $table ---\n";
|
||||
$tsql = "SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '$table'";
|
||||
$stmt = sqlsrv_query($conn, $tsql);
|
||||
$cols = [];
|
||||
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
|
||||
$cols[] = $row['COLUMN_NAME'] . " (" . $row['DATA_TYPE'] . ")";
|
||||
}
|
||||
echo implode(", ", $cols) . "\n\n";
|
||||
}
|
||||
Reference in New Issue
Block a user