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/fix_ellis.py
import json
from datetime import datetime

db = json.load(open("/home/rmlac2fmr/public_html/jn.com/ops/data/db.json"))
r = next((r for r in db["travelRequests"] if "ellis" in r.get("submittedName","").lower()), None)
if r:
    pd = next((p for p in db["perDiems"] if p.get("reqId") == r["id"]), None)
    if pd:
        checkIn = pd.get("pdCheckIn") or pd.get("checkIn") or ""
        checkOut = pd.get("pdCheckOut") or pd.get("checkOut") or ""
        if checkIn and checkOut:
            ci = datetime.strptime(checkIn, "%Y-%m-%d")
            co = datetime.strptime(checkOut, "%Y-%m-%d")
            nights = (co - ci).days
            print(f"Ellis PD: {checkIn} to {checkOut} = {nights} nights + 1 = {nights+1} days")
            print(f"  Was: autoDays={pd['autoDays']}")
            pd["autoDays"] = nights + 1
            pd["autoNights"] = nights
            print(f"  Now: autoDays={pd['autoDays']}")
            json.dump(db, open("/home/rmlac2fmr/public_html/jn.com/ops/data/db.json", "w"), indent=2)
            print("Fixed!")

Youez - 2016 - github.com/yon3zu
LinuXploit