| Server IP : 202.61.199.114 / Your IP : 216.73.217.139 Web Server : nginx/1.22.1 System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64 User : web20 ( 1018) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /tmp/ |
Upload File : |
import subprocess
from playwright.sync_api import sync_playwright
TOK="c4a81bb30fa894bf59087614"; url="https://seaside.pacim.de/day-list.php?t="+TOK
def db(sql):
code='require_once("/var/www/seaside.pacim.de/web/includes/config.inc.php");$d=new MysqliDb(MYSQL_HOST,MYSQL_USER,MYSQL_PASS,MYSQL_DB);$d->rawQuery("'+sql+'");'
subprocess.run(["php","-r",code],check=True,capture_output=True)
def vis(pg): return pg.eval_on_selector_all('#dl-body tr[data-out="0"]','rs=>rs.filter(r=>r.style.display!=="none").length')
with sync_playwright() as p:
b=p.chromium.launch(); pg=b.new_context(viewport={"width":440,"height":820}).new_page()
pg.goto(url, wait_until="networkidle"); pg.wait_for_timeout(500)
oid=pg.eval_on_selector('#dl-body tr:not(.st-in)','e=>e.getAttribute("data-id")')
# activate 'offen' filter
pg.click('#filt-open'); pg.wait_for_timeout(300)
v0=vis(pg); print("offen filter visible:",v0)
# external check-in of an open vehicle -> should disappear from 'offen' view
db("UPDATE pacim_booking SET booking_checkin='2026-06-27 10:00:00' WHERE booking_id="+oid)
pg.evaluate("document.dispatchEvent(new Event('visibilitychange'))"); pg.wait_for_timeout(2200)
v1=vis(pg); shown_open=pg.eval_on_selector('#dl-body tr[data-id="%s"]'%oid,'e=>e.style.display!=="none"')
print("after external check-in -> offen visible:",v1,"(",v0,"->",v1,") vehicle still in offen view:",shown_open)
# switch to 'angereist' -> the vehicle should appear
pg.click('#filt-arr'); pg.wait_for_timeout(300)
shown_arr=pg.eval_on_selector('#dl-body tr[data-id="%s"]'%oid,'e=>e.style.display!=="none"')
print("angereist filter: vehicle visible:",shown_arr,"| total visible:",vis(pg))
db("UPDATE pacim_booking SET booking_checkin=NULL WHERE booking_id="+oid)
b.close()