<?php

session_name("SIGNADMAUTH");
session_start();

include "common/config/config.php";
include "common/config/dbconfig.php";
include "common/functions/funcconnect.php";
openDB();

include "common/functions/funcselectdb.php";
include "common/functions/funcauthen.php";
include "common/functions/funcvalidateinput.php";

if (!authen())
{ header ("location: login.php");
		}
else
{ $mcp=isset($_GET['mcp']) ? cleanval($_GET['mcp']) : NULL;
		$content="<table border='0' cellpadding='6px' cellspacing='0' width='100%'>
													<tr>
														<td align='left' valign='top' width='100%'>
															<b class='title'>My Account &gt; Ubah Password</b>
															<br><hr size='1' color='#000000'><br>
															<table border='0' cellpadding='0' cellspacing='0'>
																<tr>
																	<td align='left' valign='top'>
																		";
		if ($mcp==1)																
		{ $content.="Mohon merubah password Anda sebelum menggunakan aplikasi ini lebih lanjut.<br><br>
															Berikut ini adalah ketentuan password yang diterapkan	dalam aplikasi ini:
															<ul style='margin-top:9px; line-height:21px'>
																<li>Password wajib diubah setiap 30 hari.</li>
																<li>Password tidak boleh kurang dari 6 karakter, dapat berupa huruf, angka dan simbol.</li>
															</ul><br>
															";
				}										
		$content.="Masukan password baru Anda di bawah ini, lalu klik tombol &quot;Simpan&quot;.<br><br>
													<form method='post' action='changepassword_process.php' style='padding:0; margin:0'>
														<table border='0' cellpadding='8px' cellspacing='1px'>
															<tr>
																<td align='left' valign='middle' nowrap>
																	Password Baru
																</td>
																<td align='left' valign='middle'>
																	<input type='password' name='password1' size='50'>
																</td>
															</tr>
															<tr>
																<td align='left' valign='middle' nowrap>
																	Pastikan Password Baru
																</td>
																<td align='left' valign='middle'>
																	<input type='password' name='password2' size='50'>
																</td>
															</tr>
															<tr>	
																<td></td>
																<td align='left' valign='middle'>
																	<input type='submit' value='Simpan'>
																</td>
															</tr>
														</table>
													</form>	
												</td>
											</tr>
										</table>		
									</td>
								</tr>
							</table>
							";
		
		include "webmenu.php";
		include "common/include/template.php";
		$temp=new template;
		$temp->define_theme("themes/theme1.html");
		$temp->define_tag("{PAGETITLE}", $namaaplikasi);
$temp->define_tag("{NAMAUSER}", strtoupper($_SESSION['SES_FULLNAME']));
		$temp->define_tag("{APPMENU}", $webmenu);
		$temp->define_tag("{APPCONTENT}", $content);
		$temp->parse();
		$temp->printproses();
		}

closeDB();

?>