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/check_pd_dupes.py
import json
db = json.load(open("/home/rmlac2fmr/public_html/jn.com/ops/data/db.json"))

# Search by name for the suspected duplicates
search_names = ["baltzell", "ahl"]

for name in search_names:
    print(f"\n=== Searching for '{name}' ===")
    
    # Find all person records
    persons = [p for p in db.get("persons", []) if name in (p.get("lastName","")).lower()]
    print(f"Profiles found: {len(persons)}")
    for p in persons:
        print(f"  PersonID: {p['id']}, Name: {p.get('firstName','')} {p.get('lastName','')}, Email: {p.get('email','')}")
        
        # Find PD records for this person
        pds = [pd for pd in db.get("perDiems", []) if pd.get("personId") == p["id"] and pd.get("showId") == "S2"]
        for pd in pds:
            days = pd.get("manualDays") if pd.get("manualDays") is not None else pd.get("autoDays", 0)
            rate = pd.get("manualRate") if pd.get("manualRate") is not None else pd.get("autoRate", 0)
            total = (days or 0) * (rate or 0)
            print(f"    PD: {pd['id']}, Days: {days}, Rate: {rate}, Total: ${total}, Dates: {pd.get('checkIn','')}-{pd.get('checkOut','')}")
        
        # Find travel requests
        reqs = [r for r in db.get("travelRequests", []) if r.get("personId") == p["id"] and r.get("showId") == "S2"]
        for r in reqs:
            print(f"    Req: {r['id']}, Status: {r.get('status','')}")
        
        # Find assignments
        assigns = [a for a in db.get("assignments", []) if a.get("personId") == p["id"]]
        for a in assigns:
            print(f"    Assignment: showId={a.get('showId','')}")
        
        if not pds and not reqs:
            print(f"    (no PD or requests for S2)")

# Show current total
grand = 0
count = 0
for pd in db.get("perDiems", []):
    if pd.get("showId") != "S2":
        continue
    req = next((r for r in db["travelRequests"] if r["id"] == pd.get("reqId") and r.get("showId") == "S2"), None)
    if req and req.get("bookingDetails", {}).get("pdEligible") == False:
        continue
    days = pd.get("manualDays") if pd.get("manualDays") is not None else pd.get("autoDays", 0)
    rate = pd.get("manualRate") if pd.get("manualRate") is not None else pd.get("autoRate", 0)
    grand += (days or 0) * (rate or 0)
    count += 1

print(f"\nOps PD Total: ${grand:,} ({count} eligible records)")

Youez - 2016 - github.com/yon3zu
LinuXploit