<?
//print_r($_SESSION['selected_user_row']);
?>
<!-- Dashboard content -->
<div class="row">
    <?
    include 'extra/member_head.php';
    ?>

    <div class="col-lg-6"> 

       <!-- Form horizontal -->
        <div class="panel panel-flat">


            <div class="panel-body">

                <form name="mprofile"  class="form-horizontal" method="POST" action="/members/profile">
                    <fieldset class="content-group">
                        <legend class="text-bold"><?= $_SESSION['selected_user_row']->firstname ?> <?= $_SESSION['selected_user_row']->lastname ?></legend>


                        <div class="form-group">
                            <label class="control-label col-lg-2">Username</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="Enter your username..."  value="<?= $_SESSION['selected_user_row']->username ?>" readonly="readonly">
                            </div>
                        </div>

                     

                    
                        
                        <div class="form-group">
                            <label class="control-label col-lg-2">Firstname</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" name='firstname' value='<?=$firstname ?>'>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-lg-2">Lastname</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" name='lastname' value='<?= $lastname ?>' >
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-lg-2">Email</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="Email..." name='email' value="<?= $email ?>">
                            </div>
                        </div>

                         <div class="form-group">
                            <label class="control-label col-lg-2">Address </label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" name='street1' placeholder="Enter user street..."  value="<?=$street1?>">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-lg-2">City</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" name='city' value='<?=$city ?>'>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-lg-2">Zipcode</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" name='zipcode' value='<?= $zipcode ?>' >
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="control-label col-lg-2">State</label>
                            <div class="col-lg-10">                               
                                <select name="state" class="form-control">
                                    <option value="GA">Georgia</option>                                                                 
                                </select>
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="control-label col-lg-2">Phone</label>
                            <div class="col-lg-10">
                                <input type="text" class="form-control" placeholder="Enter user phone" name='phone' value="<?=$phone ?>">
                            </div>
                        </div>

                        

                        <div class="text-right">
                            <button type="submit" class="btn btn-primary btn-xs">Update <i class="icon-arrow-right14 position-right"></i></button>
                        </div>

                </form>
            </div>
        </div>
        <!-- /form horizontal -->


    </div>

    <div class="col-lg-6">
        <!-- Recent Members -->
        <div class="panel panel-flat">


            <div class="panel-body">

                
                               <table class="table">
                    <thead>
                        <tr>
                            <td colspan="5"><b> Recent Service Request(s)</b></td>
                        </tr>


                        <tr>
                            <th style="width: 50px">Due Days</th>
                            <th style="width: 180px;">User</th>
                            <th>Agent</th>
                              <th style="width: 180px;">Service Type</th>
                            <th style="width: 180px;">Miles/<br>Date & Time</th>
                            <th class="text-center" style="width: 20px;"><i class="icon-arrow-down12"></i></th>
                        </tr>
                    </thead>
                    <tbody>

                        <?
                        foreach ($transport_request as $rect) {
                            ?>

                            <tr>
                                <td class="text-center">
                                    <h6 class="no-margin"><?= $rect->day_gap ?> days </h6>
                                </td>
                                <td>


                                    <div class="media-body">
                                        <a href="#" onclick="openMemberID(<? echo $rect->member_id; ?>);" class="display-inline-block text-default text-semibold letter-icon-title"><? echo $rect->firstname; ?> <? echo $rect->lastname; ?></a>
                                        <!-- div class="text-muted text-size-small"><span class="status-mark border-blue position-left"></span> Active</div --> - 
                                    </div>
                                </td>
                                <td>
                                    <a href="#" class="text-default display-inline-block" onclick="showTranspModal(<? echo $rect->service_request_id; ?>);">
                                        <span class="text-semibold"><? echo $rect->agent_name; ?> </span>
                                        <span class="display-block text-muted"></span>
                                    </a>
                                </td>
                                <td>
                                    <? echo $rect->service_type_text; ?> 
                                    
                                </td>
                                
                                <td>
                                    <? echo $rect->miles; ?>
                                    <small class="display-block text-size-small no-margin"><b><?= date("Y-m-d h:i a",strtotime( $rect->service_date))?></b></small>
                                </td>
                                <td class="text-center">
                                    <ul class="icons-list">
                                        <li class="dropdown">
                                            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu7"></i></a>
                                            <ul class="dropdown-menu dropdown-menu-right">
                                                <li><a href="#" onclick="openMemberID(<? echo $rect->member_id; ?>);"><i class="icon-undo"></i><? echo $rect->firstname; ?> <? echo $rect->lastname; ?> Profile</a></li>
                                                <li><a href="#"><i class="icon-history"></i> Payments</a></li>
                                                <li class="divider"></li>
                                                <li><a href="#" onclick="processPendTransp(<?= $rect->id ?>);"  ><i class="icon-checkmark3 text-success"></i>Manage Request</a></li>
                                            </ul>
                                        </li>
                                    </ul>
                                </td>
                            </tr>                      

                            <?
                        }
                        ?>
                    </tbody>
                </table>
                
     
            </div>
        </div>
        <!-- /form horizontal -->


    </div>
        <!-- /Recent Members -->
    </div>
</div>
<!-- /dashboard content -->

