<?php
	include "db_connection/db_connection.php";
	include "config/config.php";
	
	if($_SESSION['admin_login_id'] == '')
	{
		echo "<script>window.location='index.php';</script>";
	}
	$SLCT	=	"SELECT * FROM admin WHERE admin_id = '$_SESSION[admin_login_id]'";
	$QRY	=	mysqli_query($connect,$SLCT);
	$FTCH	=	mysqli_fetch_object($QRY);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<title><?php echo $PROJECT_TITLE ?></title>

<script type="text/javascript" src="js/change_password_JS.js"></script>
<link href="css/styles.css" rel="stylesheet" type="text/css" />
<!--[if IE]> <link href="css/ie.css" rel="stylesheet" type="text/css"> <![endif]-->

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>

<script type="text/javascript" src="js/plugins/forms/ui.spinner.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.mousewheel.js"></script>
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript" src="js/plugins/charts/excanvas.min.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.orderBars.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.pie.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.flot.resize.js"></script>
<script type="text/javascript" src="js/plugins/charts/jquery.sparkline.min.js"></script>

<script type="text/javascript" src="js/plugins/tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.sortable.js"></script>
<script type="text/javascript" src="js/plugins/tables/jquery.resizable.js"></script>

<script type="text/javascript" src="js/plugins/forms/autogrowtextarea.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.uniform.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.inputlimiter.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.maskedinput.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.autotab.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.chosen.min.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.dualListBox.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.cleditor.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.ibutton.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine-en.js"></script>
<script type="text/javascript" src="js/plugins/forms/jquery.validationEngine.js"></script>

<script type="text/javascript" src="js/plugins/uploader/plupload.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html4.js"></script>
<script type="text/javascript" src="js/plugins/uploader/plupload.html5.js"></script>
<script type="text/javascript" src="js/plugins/uploader/jquery.plupload.queue.js"></script>

<script type="text/javascript" src="js/plugins/wizards/jquery.form.wizard.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.validate.js"></script>
<script type="text/javascript" src="js/plugins/wizards/jquery.form.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.collapsible.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.breadcrumbs.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.tipsy.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.progress.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.colorpicker.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.jgrowl.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fancybox.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.fileTree.js"></script>
<script type="text/javascript" src="js/plugins/ui/jquery.sourcerer.js"></script>

<script type="text/javascript" src="js/plugins/others/jquery.fullcalendar.js"></script>
<script type="text/javascript" src="js/plugins/others/jquery.elfinder.js"></script>

<script type="text/javascript" src="js/plugins/ui/jquery.easytabs.min.js"></script>
<script type="text/javascript" src="js/files/bootstrap.js"></script>
<script type="text/javascript" src="js/files/functions.js"></script>

<!-- Shared on MafiaShare.net  --><!-- Shared on MafiaShare.net  --></head>

<body <?php /*?>onload="document.getElementById('listpage').focus();"<?php */?>>

<!-- Top line begins -->
<?php include "header_footer/header.php"; ?>
<!-- Top line ends -->


<!-- Sidebar begins -->
<?php include "menus/left_menu.php"; ?>
<!-- Sidebar ends -->
<div id="content">
    
<?php include "menus/top_menu.php"; ?>    
    <!-- Breadcrumbs line -->
    <div class="breadLine">
        <div class="bc">
            <ul id="breadcrumbs" class="breadcrumbs">
                <li><a href="home.php">Dashboard</a></li>
                <li><a href="javascript:">Change Password</a></li> 
                    
            </ul>
        </div>
	<?php include "menus/top_left_menu.php"; ?>            
        
    </div>
    <!-- Main content -->
    <div class="wrapper">
        <ul class="middleNavR">
            <!--<li><a href="#" title="Add an article" class="tipN"><img src="images/icons/middlenav/create.png" alt="" /></a></li>
            <li><a href="#" title="Upload files" class="tipN"><img src="images/icons/middlenav/upload.png" alt="" /></a></li>
            <li><a href="#" title="Add something" class="tipN"><img src="images/icons/middlenav/add.png" alt="" /></a></li>
            <li><a href="#" title="Messages" class="tipN"><img src="images/icons/middlenav/dialogs.png" alt="" /></a><strong>8</strong></li>-->
            <!--<li><a href="employee_list.php" title="List Employee" id="listpage" class="tipN"><img src="images/icons/middlenav/stats.png" alt="" /></a></li>
-->        </ul>
    	<?php
		//$page_id= base64_encode(base64_encode(base64_encode(1))); //THIS IS FOR PAGE IDENTIFICATION IN BL FILE for add		 
		$enc_id = base64_encode(base64_encode(base64_encode(base64_encode("edit"))));			 
		?>

        <div class="fluid"><!--style="width:600px; margin-left:150px;"-->
            <form id="validate" name="fm" class="main" method="post" action="bl/change_password_BL.php?action=<?php echo $enc_id; ?>" enctype="multipart/form-data">
                <fieldset>
                <?php
					$SLCT = "SELECT * FROM admin WHERE admin_id='$_SESSION[admin_login_id]'";
					$QURY = mysqli_query($connect,$SLCT);
					$FTCH = mysqli_fetch_object($QURY);
				?> 
				
                <input type="hidden" id="cur_user" value="<?php echo $FTCH->user_name?>" />
                <input type="hidden" id="cur_pass" value="<?php echo $FTCH->pass_word?>" />
                
                
				<div class="widget">
                        <div class="whead"><h6>Change Password</h6><div class="clear"></div></div>
                        <div class="formRow">
                            
                            
                            
                            <div class="grid2"><label>Current User Name:<span class="req">*</span></label></div>
                            <div class="grid4"><input type="text" class="" name="curr_name" id="c_name" value="<?php echo $FTCH->user_name;?>" readonly="readonly"/></div>
                            
                            <div class="clear"></div>
                        </div>
                        
                    	<!--<div class="formRow">
                            </div><div class="clear"></div>
                        </div>-->
                        
                        <div class="formRow">
                       
                        
                        <div class="grid2"><label>Current Password:<span class="req">*</span></label></div>
                        <div class="grid4"><input type="password" class="" name="c_pass" id="current_password"/></div>
                        
                        <div class="clear"></div>
                    	</div>
                        
                        <div class="formRow">
                            <div class="grid2"><label>New Password:<span class="req">*</span></label></div>
                          <div class="grid4"><input type="password" class="" name="new_pass" id="new_password"/></div>
                            
                           
                            <div class="clear"></div>
                        </div>
                        
                        <div class="formRow">
                            <div class="grid2"><label>Confirm Password:<span class="req">*</span></label></div>
                            <div class="grid4"><input type="password" class="" name="cpass" id="confirm_password"/></div><div class="clear"></div>
                        </div>                       
                                               
                         <!--<div class="formRow">
                            <div class="grid3"><label>Address:<span class="req">*</span></label></div>
                            <div class="grid6"><textarea rows="6" cols="" name="add" id="add"></textarea> </div>
                            <div class="clear"></div>
                        </div>-->
                        
                        <!--  <div class="formRow">
                                    <div class="grid2"><label>Perminant Address:<span class="req">*</span></label></div>
                                    <div class="grid4"><input type="text" class="" name="e_id" id="e_id"/> </div>
                                    
                            <div class="clear"></div>
                          </div>
						-->
						 <div style="border: #949494 solid 1px; "></div>
                        
                        <div class="formRow">
                        <input type="button" value="Submit" class="buttonM bBlack formSubmit" onclick="validate_pass();" style="float: right; margin-left:20px;"/>
                        <input type="button" value="Reset" class="buttonM bRed" style="float: right; margin-left:20px;" onclick="clearField();"/>                        
                        <div class="clear"></div></div>
                        <div class="clear"></div>
                </div>
                </fieldset>
            </form>
        
            <form id="usualValidate" class="main" method="post" action="">
                <fieldset>
                </fieldset>
            </form>
        </div>
    </div>
</div>
<!-- Content ends -->    
        
</body>
</html>