403Webshell
Server IP : 216.92.14.13  /  Your IP : 216.73.217.126
Web Server : Apache
System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
User : rmlac2fmr ( 1040637)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/home/rmlac2fmr/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/home/rmlac2fmr/diag_craft_halstead.py
#!/usr/bin/env python3
"""
JBT Travel Ops — Diagnose Marc Craft and Alex Halstead records
Read-only. Shows what exists for both crew members so we can decide
how to convert them from "in database" to "hotel-grid only".
"""
import json
import os
import sys

candidates = ['db.json', './data/db.json', os.path.expanduser('~/public_html/jn.com/ops/data/db.json')]
db_path = next((c for c in candidates if os.path.exists(c)), None)
if not db_path: print("ERROR: db.json not found"); sys.exit(1)

with open(db_path, 'r') as f:
    db = json.load(f)

print(f"Reading: {db_path}\n")

TARGETS = [('craft', 'marc'), ('halstead', 'alex')]

for last, first in TARGETS:
    print("=" * 70)
    print(f"{last.upper()}, {first.upper()}")
    print("=" * 70)

    # Find person
    matched = []
    for p in db.get('persons', []):
        ln = (p.get('lastName','') or '').lower()
        fn = (p.get('firstName','') or '').lower()
        if last in ln and first in fn:
            matched.append(p)

    if not matched:
        print(f"  NO PERSON RECORD FOUND.\n")
        continue

    for p in matched:
        pid = p.get('id')
        print(f"\n  Person ID: {pid}")
        print(f"    Name:  {p.get('firstName')} {p.get('lastName')}")
        print(f"    Title: {p.get('title','(none)')}")
        print(f"    Dept:  {p.get('dept','(none)')}")
        print(f"    Email: {p.get('email','(none)')}")
        print(f"    Phone: {p.get('phone','(none)')}")
        print(f"    Created: {p.get('created','(unknown)')}")

        # Travel requests
        reqs = [r for r in db.get('travelRequests', []) if r.get('personId') == pid]
        print(f"\n    Travel requests: {len(reqs)}")
        for r in reqs:
            print(f"      - {r.get('id')} on {r.get('showId')} (status={r.get('status')}, method={r.get('travelMethod')})")

        # Assignments
        assigns = [a for a in db.get('assignments', []) if a.get('personId') == pid]
        print(f"    Assignments: {len(assigns)}")
        for a in assigns:
            print(f"      - {a.get('id')} → {a.get('showId')}")

        # Hotel bookings
        hotels = [h for h in db.get('hotelBookings', []) if h.get('personId') == pid]
        print(f"    Hotel bookings: {len(hotels)}")
        for h in hotels:
            print(f"      - {h.get('id')} on {h.get('showId')}: {h.get('hotel','?')} {h.get('checkIn','?')} → {h.get('checkOut','?')} (assigned={h.get('assigned')}, conf={h.get('conf','none')})")

        # Per diems
        pds = [pd for pd in db.get('perDiems', []) if pd.get('personId') == pid]
        print(f"    Per diems: {len(pds)}")
        for pd in pds:
            print(f"      - {pd.get('id')} on {pd.get('showId')}: rate={pd.get('autoRate')} delivery={pd.get('delivery','none')}")

Youez - 2016 - github.com/yon3zu
LinuXploit