<?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");
?>
<!-- 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 $headerLBL["changePassword"];?> SMS</h5>
								<form action="smsSettings2.php" name="pageEditForm" id="pageEditForm" method="POST" class="formAlign" onsubmit="return checkChangePass();">
                               
                                    <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="password" class="form-control" name="newPassword" id="newPassword"  onchange="this.setAttribute('value', this.value);">
                                                <label for="chargeOrderNumber"><?php echo $changePasswordLBL["newPassword"]?></label>
                                            </div>
                                            <div class="form-group form-group-custom mb-4">
                                                <input type="password" class="form-control" name="confirmPassword" id="confirmPassword"  onchange="this.setAttribute('value', this.value);">
                                                <label for="chargeOrderNumber"><?php echo $changePasswordLBL["confirmPassword"]?></label>
                                            </div>
                                                                                         
                                            <div class="mt-4">
                                                <button class="btn btn-success btn-block waves-effect waves-light" type="submit"><?php echo $button["change"]?></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 type="text/javascript">
function checkChangePass()
{
	if($('#newPassword').val() == "")
	{
		alert("<?php echo sprintf($insert,$changePasswordLBL["newPassword"]);?>");
		$('#newPassword').focus();
		return false;
	}
	if($('#confirmPassword').val() == "")
	{
		alert("<?php echo sprintf($insert,$changePasswordLBL["confirmPassword"]);?>");
		$('#confirmPassword').focus();
		return false;
	}
	if($('#newPassword').val() != $('#confirmPassword').val())
	{
		alert("<?php echo $changePasswordLBL["passNotMatch"];?>");
		$('#confirmPassword').focus();
		return false;
	}								
	return true;
}
</script>
<?php
include("footer.php");
ob_end_flush();
?>
