<?php include('include/auth.php');?>
<!doctype html>
<html class="fixed dark">
<?php 
	$pagerole="user";
	 $fid=$_GET['id'];

	include('include/head.php');

		?>

<body>
    <style>
        .colorstatus{color:<?php echo $colorst;?>;}
        </style>

    <section class="body">

        <!-- start: header -->
        <header class="header">
            <div class="logo-container">
                <a href="index.php" class="logo">
                    <img src="img/logo-light.png" width="75" height="35" alt="Web Voyage" />
                </a>
                <div class="d-md-none toggle-sidebar-left" data-toggle-class="sidebar-left-opened" data-target="html"
                    data-fire-event="sidebar-left-opened">
                    <i class="fas fa-bars" aria-label="Toggle sidebar"></i>
                </div>
            </div>

            <!-- start: search & user box -->
            <div class="header-right">
                <?php include('include/search.php');?>


                <span class="separator"></span>
                <?php include('include/notifications.php');?>


                <span class="separator"></span>
                <?php include('include/userbox.php');?>

            </div>
            <!-- end: search & user box -->
        </header>
        <!-- end: header -->

        <div class="inner-wrapper">
            <!-- start: sidebar -->
            <?php include('include/nav.php');?>
            <!-- end: sidebar -->

            <section role="main" class="content-body">
                <header class="page-header">
                    <h2>New Task </h2>

                    <div class="right-wrapper text-right">
                        <ol class="breadcrumbs">
                            <li>
                                <a href="index.php">
                                    <i class="fas fa-home"></i>
                                </a>
                            </li>
                            <li><span>WV Admin</span></li>
                            <li><span>New Task</span></li>
                        </ol>

                        <a class="sidebar-right-toggle" data-open="sidebar-right"><i
                                class="fas fa-chevron-left"></i></a>
                    </div>
                </header>

                               <!-- start: page -->
                       
                <form class="order-details action-buttons-fixed" action="actions/newtask.php"
                    method="post" name="form1">

                    <div class="row">
                        <div class="col-xl-12 mb-3 ">
                            <div class="card card ">
                                <div class="card-header">
                                    <h2 class="card-title">Actions: </h2>
                                </div>
                                <div class="card-body">


                                  
                                    <div class="form-row">
                                    <div class="form-group col-xl-3 mb-3" style="border-top:none;padding-top:0rem;">
                                            <label>Task Start Date</label>
                                            <input class="form-control" type="text" name="task_start_date" id="task_start_date"
                                            value="">
                                        </div>
                                        <div class="form-group col-xl-2 mb-3" style="border-top:none;padding-top:0rem;">
                                            <label>Task Start Time (24hr ie 17:32)</label>
                                            <input class="form-control" type="text" name="task_start_time" id="task_start_time"
                                            value="">
                                        </div>
                                        <div class="form-group col-xl-3 mb-3" style="border-top:none;padding-top:0rem;">
                                            <label>Task End Date</label>
                                            <input class="form-control" type="text" name="task_end_date" id="task_end_date"
                                            value="">
                                        </div>
                                        <div class="form-group col-xl-2 mb-3" style="border-top:none;padding-top:0rem;">
                                            <label>Task End Time (24hr ie 17:32)</label>
                                            <input class="form-control" type="text" name="task_end_time" id="task_end_time"
                                            value="">
                                        </div>
                                        <div class="form-group col-xl-2 mb-3" style="border-top:none;padding-top:0rem;">
                                        <label>All Day?</label>
                                 <select data-plugin-selectTwo class="form-control populate" name=task_allday
                                 <?php if($row3['task_allday']==1) { echo "selected";} ?> >
                                                        
                            <option value="1">
                                Yes</option>
                                <option value="0">
                                No</option>

                        </select>
                                        </div>
                                    <div class="form-group col-xl-8 mb-3" style="border-top:none;padding-top:0rem;">
                                            <label>Task Title</label>
                                            <input type="text" class="form-control form-control" name="task_name"
                                                value="" />
                                        </div>
                                    <div class="form-group col-xl-4 mb-3" style="border-top:none;padding-top:0rem;">
                                            <label>Recipient</label>
                                        <select data-plugin-selectTwo class="form-control form-control-modern populate"
                                            name="task_to">
                                            <?php $sqlcat = "SELECT * FROM users";
                                                    $result = mysqli_query($db,$sqlcat);
                                                    while($rowcat = mysqli_fetch_array($result)) {?>

                                            <option value="<?php echo $rowcat['id'];?>"
                                               >
                                                <?php echo $rowcat['username'];?></option>


                                            <?php } ?>

                                        </select>
                                        </div>
                                   
                                        <div class="form-group col-xl-12 mb-3" style="border-top:none;padding-top:0rem;">
                                            <label>Task Details</label>
                                            <textarea class="form-control" name="task_details" rows="10" 
                                                id="task_details"></textarea>
                                        </div>

                                       
                                        


                                   
                                </div>
                            </div>

                        </div>
                     
               
                    </div>
                 
                    
                    <div class="row action-buttons">

                        <div class="col-12 col-md-auto">
                            <button type="submit"
                                class="submit-button btn btn-primary btn-px-4 py-3 d-flex align-items-center font-weight-semibold line-height-1"
                                data-loading-text="Loading...">
                                <i class="bx bx-save text-4 mr-2"></i> Save
                            </button>
                        </div>

                        <div class="col-12 col-md-auto px-md-0 mt-3 mt-md-0">
                            <a href="fleet.php"
                                class="cancel-button btn btn-light btn-px-4 py-3 d-flex align-items-center font-weight-semibold line-height-1">Return</a>
                        </div>

                    </div>

                </form>
                <!-- end: page -->
            </section>
        </div>

        <?php include('include/aside.php');?>

    </section>


    <!-- Vendor -->
    <script src="vendor/jquery/jquery.js"></script>
    <script src="vendor/jquery-browser-mobile/jquery.browser.mobile.js"></script>
    <script src="vendor/popper/umd/popper.min.js"></script>
    <script src="vendor/bootstrap/js/bootstrap.js"></script>
    <script src="vendor/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
    <script src="vendor/common/common.js"></script>
    <script src="vendor/nanoscroller/nanoscroller.js"></script>
    <script src="vendor/magnific-popup/jquery.magnific-popup.js"></script>
    <script src="vendor/jquery-placeholder/jquery.placeholder.js"></script>

    <!-- Specific Page Vendor -->
    <script src="vendor/select2/js/select2.js"></script>
    <script src="vendor/pnotify/pnotify.custom.js"></script>

    <!--(remove-empty-lines-end)-->

    <!-- Theme Base, Components and Settings -->
    <script src="js/theme.js"></script>

    <!-- Theme Custom -->
    <script src="js/custom.js"></script>

    <!-- Theme Initialization Files -->
    <script src="js/theme.init.js"></script>

    <!-- Examples -->
    <script src="js/examples/examples.header.menu.js"></script>
    <script src="js/examples/examples.ecommerce.orders.detail.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"
        integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ=="
        crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/rome/3.0.2/rome.standalone.min.js"
        integrity="sha512-cJ4aSZY0xBXrcH65MOwCloQAiTNCBm2F8/KlcBTlczgn4txZkT7h3YSXULN06pkUnsySMEg5BU4QCHAr97U7ng=="
        crossorigin="anonymous"></script>
    <script>
        const options = {
            "appendTo": document.body,
            "autoClose": true,
            "autoHideOnBlur": true,
            "autoHideOnClick": true,
            "date": true,
            "dateValidator": Function.prototype,
            "dayFormat": "DD",
            "initialValue": null,
            "inputFormat": "YYYY-MM-DD",
            "invalidate": true,
            "max": null,
            "min": null,
            "monthFormat": "MMMM YYYY",
            "monthsInCalendar": 1,
            "required": false,
            "strictParse": false,
            "styles": {
                "back": "rd-back",
                "container": "rd-container",
                "date": "rd-date",
                "dayBody": "rd-days-body",
                "dayBodyElem": "rd-day-body",
                "dayConcealed": "rd-day-concealed",
                "dayDisabled": "rd-day-disabled",
                "dayHead": "rd-days-head",
                "dayHeadElem": "rd-day-head",
                "dayRow": "rd-days-row",
                "dayTable": "rd-days",
                "month": "rd-month",
                "next": "rd-next",
                "positioned": "rd-container-attachment",
                "selectedDay": "rd-day-selected",
                "selectedTime": "rd-time-selected",
                "time": "rd-time",
                "timeList": "rd-time-list",
                "timeOption": "rd-time-option"
            },
            "time": false,
            "timeFormat": "HH:mm",
            "timeInterval": 900,
            "timeValidator": Function.prototype,
            "weekdayFormat": "min",
            "weekStart": moment().weekday(0).day()
        }
        rome(task_start_date, options);
        rome(task_end_date, options);
     
    </script>

</body>

</html>
<?php include('include/footer.php');?>