0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.119.112.208


Current Path : /var/www/html/oums/
Upload File :
Current File : /var/www/html/oums/work_entry_form.php

<?php
include("src/sys_session.php");
include("src/sys_connect.php");
?>

<div id="page-container-form" class="form-horizontal">
    <div id="lblpagemode" class="page_mode"></div>
    <input type="hidden" id="txtpagemode" readonly="readonly" />
    <input type="hidden" id="txtworkcode" style="text-align:center; width:auto;" />
    <div class="panel panel-primary" style="width:1024px;margin-left:auto;margin-right:auto;">
        <div class="panel-heading">Work Details</div>
        <div class="panel-body" style="position: relative;">
            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Date</label>
                <div class="col-sm-2">
                    <input type="text" class="form-control text-center text-uppercase" id="txtworkdate" maxlength="10" placeholder="DD/MM/YYYY" onblur="work_date_check();" />
                </div>

                <label for="" class="col-sm-4 control-label">Reporting Head</label>
                <div class="col-sm-4">
                    <?php
                    $mysql = "select e1.frepthead,e2.femplname from masempl e1
                    inner join masempl e2 on e2.femplcode = e1.frepthead
                    where e1.femplcode ='$empl_id'";
                    $myres = mysqli_query($mycon, $mysql);
                    echo "<select id='txtrepthead' class='form-control'>";
                    if (mysqli_num_rows($myres) > 1) {
                        echo "<option value=0>--Select--</option>";
                    }
                    while ($myrow = mysqli_fetch_assoc($myres)) {
                        echo "<option value='$myrow[frepthead]'>$myrow[femplname]</option>";
                    }
                    echo "</select>";
                    ?>
                </div>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Assigned Work?</label>
                <div class="col-sm-10">
                    <?php
                    $mysql = "select * from workassign where fworkempl='$empl_id' and fworkstat='PENDING' order by fassncode desc";
                    $myres = mysqli_query($mycon, $mysql);
                    echo "<select id='txtassncode' name='txtassncode' class='form-control' onChange='show_assignment()'>";
                    echo "<option value=0>NOT ASSIGNED</option>";
                    while ($myrow = mysqli_fetch_assoc($myres)) {
                        $selected = "";
                        echo "<option value='$myrow[fassncode]' $selected>$myrow[fassnname]</option>";
                    }
                    echo "</select>";
                    ?>
                </div>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Work Title</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="txtworkname" maxlength="100" placeholder="Work Title" />
                </div>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Work Type</label>
                <div class="col-sm-4">
                    <?php
                    $mysql = "select * from maswork_type order by ftypeordr,ftypedesc";
                    $myres = mysqli_query($mycon, $mysql);
                    echo "<select id='txtworktype' name='txtworktype' class='form-control'>";
                    if (mysqli_num_rows($myres) > 1) {
                        echo "<option value=0>--Select--</option>";
                    }
                    while ($myrow = mysqli_fetch_assoc($myres)) {
                        echo "<option value='$myrow[fworktype]'>$myrow[ftypedesc]</option>";
                    }
                    echo "</select>";
                    ?>
                </div>

                <label for="" class="col-sm-2 control-label">Planned work?</label>
                <div class="col-sm-2">
                    <select id="txtworkplan" class="form-control">
                        <option value="F">No</option>
                        <option value="T">Yes</option>
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Place of work</label>
                <div class="col-sm-4">
                    <?php
                    $mysql = "select * from mastown order by ftownname";
                    $myres = mysqli_query($mycon, $mysql);
                    echo "<select id='txtworkplce' name='txtworkplce' class='form-control'>";
                    if (mysqli_num_rows($myres) > 1) {
                        echo "<option value=0>--Select--</option>";
                    }
                    while ($myrow = mysqli_fetch_assoc($myres)) {
                        $selected = "";
                        if ($myrow['ftownname'] == $town_id) {
                            $selected = "selected";
                        }
                        echo "<option value='$myrow[ftownname]' $selected>$myrow[ftownname]</option>";
                    }
                    echo "</select>";
                    ?>
                </div>
                <span class="hidden">
                    <label for="" class="col-sm-2 control-label">Time Taken (Approx.)</label>
                    <div class="col-sm-1">
                        <input type="text" class="form-control text-center" id="txtworkhour" maxlength="2" placeholder="Hrs." min="0" max="12" data-bind="value:txtworkhour" value="0" />
                    </div>
                    <div class="col-sm-1">
                        <input type="text" class="form-control text-center" id="txtworkmins" maxlength="2" placeholder="Min." min="0" max="59" data-bind="value:txtworkmins" value="0" />
                    </div>
                </span>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Client</label>
                <div class="col-sm-10">
                    <?php
                    $mysql = "select * from masclient order by fclntname";
                    $myres = mysqli_query($mycon, $mysql);
                    echo "<select id='txtclntcode' name='txtclntcode' class='form-control'>";
                    if (mysqli_num_rows($myres) > 1) {
                        echo "<option value=0>--Select--</option>";
                    }
                    while ($myrow = mysqli_fetch_assoc($myres)) {
                        $selected = "";
                        if ($myrow['fclntcode'] == $dept_id) {
                            $selected = "selected";
                        }
                        echo "<option value='$myrow[fclntcode]' $selected>$myrow[fclntname] [$myrow[fclntcode]]</option>";
                    }
                    echo "</select>";
                    ?>
                </div>
            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Work Details</label>
                <div class="col-sm-10">
                    <textarea id="txtworkdetl" class="form-control" rows="3" wrap="hard"></textarea>
                </div>
            </div>


            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Work Status</label>
                <div class="col-sm-4">
                    <select id="txtworkstat" class="form-control">
                        <option value="PENDING">PENDING</option>
                        <option value="COMPLETED">COMPLETED</option>
                    </select>
                </div>

            </div>

            <div class="form-group">
                <label for="" class="col-sm-2 control-label">Remarks (if any)</label>
                <div class="col-sm-10">
                    <textarea id="txtworkremk" class="form-control" rows="2"></textarea>
                </div>
            </div>
        </div>
    </div>

</div>