<?php
/**
 * HTML Change Password Form
 *
 * PHP version 7.3
 *
 * @package        SMS
 * @version        Release 1.0.0
 * @create_by      Mohammad aljaouni
 * @create_date    17-08-2020
 * @edited_by
 * @last_edit_date
 * @todo           Nothing
 */
ob_start();
session_start();
$chain = "AWdrh78y892Djk*^523*%$#ghgHGHia&%$*)AsfdsLJnLaad";
include("validateLogin.php");
include("includeInformation.php");
include("header.php");
$query  = "select * from cpanel ";
$result = mysqli_query($conn, $query);
$num = mysqli_num_rows($result);
$row = mysqli_fetch_array($result);
if(!@$num)
{
	$queryInsert  = "insert into cpanel (id) values ('1')";
	$resultInsert = mysqli_query($conn, $queryInsert);
}
?>
<!-- Start Dashboard page -->
    <!-- start main-content -->
    <div class="main-content">
        <!-- Start Page-content -->
        <div class="page-content">
        <!-- Page-Title -->
        <div class="page-title-box">
            <div class="container-fluid">
                <div class="row align-items-center">
                    <?php echo breadcrumbs(basename($_SERVER['PHP_SELF']));?>
                </div>
            </div>
        </div>
        <!-- end page title end breadcrumb -->
        <div class="page-content-wrapper">
            <div class="container-fluid">
                <div class="row justify-content-center align-items-center">
                    <div class="col-sm-12 col-lg-4 ">
                        <div class="card">
                            <div class="card-body">
                                <h5 class="mb-5 text-center"><?php echo $workeSettingLBL["workeSetting"];?></h5>
								<form action="workeSetting2.php" name="pageEditForm" id="pageEditForm" method="POST" class="formAlign" >
                               
                                    <div class="row">
                                        <?php
                                        if(!empty($_GET["res"]))
                                            echo result($_GET["res"]);
                                        ?>
                                        <div class="col-md-12">
                                            
                                            <div class="form-group form-group-custom mb-4">
                                                <input type="text" class="form-control" name="userSender" id="userSender" value="<?php echo $row["userSender"]?>" onchange="this.setAttribute('value', this.value);">
                                                <label for="chargeOrderNumber"><?php echo $workeSettingLBL["sender"]?></label>
                                            </div>
                                            
                                            <div class="form-group form-group-custom mb-4">
                                                <input type="text" class="form-control" name="start_ip" id="start_ip" value="<?php echo $row["start_ip"]?>" style="margin-bottom:10px" onchange="this.setAttribute('value', this.value);" placeholder="<?php echo $workeSettingLBL["from"];?>">
                                                
                                                 <input type="text" class="form-control" name="end_ip" id="end_ip" value="<?php echo $row["start_ip"]?>" onchange="this.setAttribute('value', this.value);" placeholder="<?php echo $workeSettingLBL["to"];?>">
                                                <label for="chargeOrderNumber"><?php echo $workeSettingLBL["rangeIp"]?></label>
                                            </div>
                                            
                                            <div class="form-group form-group-custom mb-4">
                                                <input type="text" class="form-control" name="report_email" id="report_email" value="<?php echo $row["report_email"]?>" onchange="this.setAttribute('value', this.value);">
                                                <label for="chargeOrderNumber"><?php echo $workeSettingLBL["report_email"]?></label>
                                            </div>
                                            
                                             <div class="form-group form-group-custom mb-4">
                                                <input  type=checkbox name=active value='checked' <?php echo $row["active"]?>> &nbsp;<b><?php echo $workeSettingLBL["sendOtp"];?></b>
                                            </div>
                                             
                                            <div class="mt-4">
                                                <button class="btn btn-success btn-block waves-effect waves-light" type="submit"><?php echo $button["save"]?></button>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- end row -->
            </div>
            <!-- end container-fluid -->
        </div>
        <!-- end page-content-wrapper -->
    </div>
        <!-- End Page-content -->
</div>
    <!-- end main content -->
<!-- End Dashboard page -->
<script language="javascript" type="text/javascript">
</script>
<?php
include("footer.php");
ob_end_flush();
?>
