HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/awaldron/_domains/phlibrary.alanwaldron.com/wp-content/themes/phlibrary/admin/phlib_hours.php
<?php
function phlib_hours() {
    date_default_timezone_set('America/New_York');

    if (isset($_POST['submit_hrs'])) {
        $data = array(
            'ph' => array($_POST['ph_sun'],$_POST['ph_mon'],$_POST['ph_tue'],$_POST['ph_wed'],$_POST['ph_thu'],$_POST['ph_fri'],$_POST['ph_sat']),
            'lp' => array($_POST['lp_sun'],$_POST['lp_mon'],$_POST['lp_tue'],$_POST['lp_wed'],$_POST['lp_thu'],$_POST['lp_fri'],$_POST['lp_sat'])
        );
        update_option('phlib_hours', serialize($data));
    }
    $hrs = unserialize(get_option('phlib_hours'));
    ?>
    <style>
        label { width: 100px; display:inline-block; }
        input { width: 400px; }
        h4 { margin-bottom: 5px; margin-top:35px; font-size:18px;}
        .wp-submit {
            background-color: #0A246A;
            color: #FFFFFF;
            padding: 8px 20px;
            width: initial;
        }
        .wp-heading {
            border-bottom: solid 1px #999;
            display: block;
        }
    </style>

    <div class="wrap">
        <h1 class="wp-heading">Library Hours</h1><br><br>

        <form action="" method="post">
            <table class="table">
                <tr>
                    <th></th>
                    <th>Main Branch</th>
                    <th>Lincoln Park</th>
                </tr>
                <tr>
                    <td><b>Monday</b></td>
                    <td><b><input type="text" name="ph_mon" value="<?=$hrs['ph']['1']?>" /></b></td>
                    <td><b><input type="text" name="lp_mon" value="<?=$hrs['lp']['1']?>" /></b></td>
                </tr>
                <tr>
                    <td><b>Tuesday</b></td>
                    <td><b><input type="text" name="ph_tue" value="<?=$hrs['ph']['2']?>" /></b></td>
                    <td><b><input type="text" name="lp_tue" value="<?=$hrs['lp']['2']?>" /></b></td>
                </tr>
                <tr>
                    <td><b>Wednesday</b></td>
                    <td><b><input type="text" name="ph_wed" value="<?=$hrs['ph']['3']?>" /></b></td>
                    <td><b><input type="text" name="lp_wed" value="<?=$hrs['lp']['3']?>" /></b></td>
                </tr>
                <tr>
                    <td><b>Thursday</b></td>
                    <td><b><input type="text" name="ph_thu" value="<?=$hrs['ph']['4']?>" /></b></td>
                    <td><b><input type="text" name="lp_thu" value="<?=$hrs['lp']['4']?>" /></b></td>
                </tr>
                <tr>
                    <td><b>Friday</b></td>
                    <td><b><input type="text" name="ph_fri" value="<?=$hrs['ph']['5']?>" /></b></td>
                    <td><b><input type="text" name="lp_fri" value="<?=$hrs['lp']['5']?>" /></b></td>
                </tr>
                <tr>
                    <td><b>Saturday</b></td>
                    <td><b><input type="text" name="ph_sat" value="<?=$hrs['ph']['6']?>" /></b></td>
                    <td><b><input type="text" name="lp_sat" value="<?=$hrs['lp']['6']?>" /></b></td>
                </tr>
                <tr>
                    <td><b>Sunday</b></td>
                    <td><b><input type="text" name="ph_sun" value="<?=$hrs['ph']['0']?>" /></b></td>
                    <td><b><input type="text" name="lp_sun" value="<?=$hrs['lp']['0']?>" /></b></td>
                </tr>
            </table>
            <br><br>
            <p><input type="submit" class="wp-submit" name="submit_hrs" value="Save Hours" /></p>
        </form>

    </div>
    <?php
}