MINI MINI MANI MO
<?
include_once "../inc/sub_top.php";
$id="qna";
if ($cookie_user_no) $member=mysql_fetch_array(mysql_query("select * from js_member where seq_num='$cookie_user_no'"));
# °ü¸®ÀÚ / B2B üũ
if ($member[user_level]<=3&&$member[user_level]) $u_admin=true;
elseif ($member[user_level]==6) $u_b2b=true;
elseif ($member[user_level]==5) {
$u_b2b=true;
$u_b2bp=true;
}
if(!$_SESSION[login_level]){
//·Î±×ÀÎÀü ·¹º§¼¼¼ÇÀ̾øÀ¸¸é ºñȸ¿ø 10À¸·Î ¸ÂÃçÁÜ
$_SESSION[login_level]=10;
}
$sql="select * from admin_table where a_name='$id'";
$result=mysql_query($sql);
$data=mysql_fetch_array($result);
$skinDir="/board/skin/".$data[a_skinname]."/";
$table_width="100%";
$a_insert="<a href='".$_SERVER['PHP_SELF']."?id=".$id."&mode=write'>";
if($_POST["mode"]=="pwconfirm" && !$passed){
$pwd_ok=@mysql_fetch_row(mysql_query("select pwd,ridx,list from $id where no='".$_POST["no"]."'"));
if($pwd_ok[1]=='1'){
$pwd_ok=@mysql_fetch_row(mysql_query("select pwd,ridx from $id where list='".$pwd_ok[2]."'"));
}
if($_POST["confirm_pwd"]==$pwd_ok[0]){
$mode="write";
$sub_mode="edit";
} else {
echo "<script>alert('ºñ¹Ð¹øÈ£°¡ Ʋ·Ç½À´Ï´Ù3');</script>";
$mode="pwchk";
}
}
if(!$_POST["confirm_pwd"] && $mode=="view" && !$u_admin){
$passwChk = mysql_fetch_array(mysql_query(" select * from $id where no='$no' "));
if($passwChk["security"]=="Y"){
$passed="pwview";
}
}
if($passed=="pwview" && $_POST["mode"]=="pwconfirm"){
$pwd_ok=@mysql_fetch_row(mysql_query("select pwd,userno,ridx,list from $id where no='".$no."'"));
if($pwd_ok[0]){
if($_POST["confirm_pwd"]==$pwd_ok[0]){
$mode="view";
$passed="";
} else {
echo "<script>alert('ºñ¹Ð¹øÈ£°¡ Ʋ·Ç½À´Ï´Ù1');</script>";
}
} else if($pwd_ok[2]=='1'){
$pwd_ok2=@mysql_fetch_row(mysql_query("select pwd,ridx,userno from $id where list='".$pwd_ok[3]."' and ridx='0'"));
if($pwd_ok2[0]){
if($_POST["confirm_pwd"]==$pwd_ok2[0]){
$mode="view";
$passed="";
} else {
echo "<script>alert('ºñ¹Ð¹øÈ£°¡ Ʋ·Ç½À´Ï´Ù');</script>";
}
} else {
$pwd_user=@mysql_fetch_row(mysql_query("select user_pw from js_member where user_id='".$pwd_ok2[2]."'"));
if($_POST["confirm_pwd"]==$pwd_user[0]){
$mode="view";
$passed="";
} else {
echo "<script>alert('ºñ¹Ð¹øÈ£°¡ Ʋ·Ç½À´Ï´Ù2');</script>";
}
}
} else {
$pwd_ok=@mysql_fetch_row(mysql_query("select user_pw from js_member where user_id='".$pwd_ok[1]."'"));
if($_POST["confirm_pwd"]==$pwd_ok[0]){
$mode="view";
$passed="";
} else {
echo "<script>alert('ºñ¹Ð¹øÈ£°¡ Ʋ·Ç½À´Ï´Ù2');</script>";
}
}
}
$qcommon="id=".$id;
?>
<table width="1000" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="5" colspan="3"></td>
</tr>
<tr>
<td width="191" valign="top"><? include "../inc/left_customer.php";?>
<? include "../inc/left_01.php";?>
<!--ÁÂÃø¸Þ´º ½ÃÀÛ-->
<!--ÁÂÃø¸Þ´º³¡--></td>
<td width="11"> </td>
<td width="799" valign="top"><table width="798" border="0" cellspacing="0" cellpadding="0">
<input type="hidden" name="p_no" value="<?=$p_no?>" />
<tr>
<td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="img/top_qna.jpg" alt="" width="798" height="183" /></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="10"><img src="img/qna_title.gif" alt="" width="798" height="30"></td>
</tr>
</table>
<?
if($passed=="pwview"){
include_once "$_SERVER[DOCUMENT_ROOT]/board/view_secret.php";
} else if(!$mode || $mode=="list"){
include_once "$_SERVER[DOCUMENT_ROOT]/board/skin/".$data[a_skinname]."/list_header.php";
include_once "$_SERVER[DOCUMENT_ROOT]/board/skin/".$data[a_skinname]."/list_main2.php";
include_once "$_SERVER[DOCUMENT_ROOT]/board/skin/".$data[a_skinname]."/list_footer.php";
} else if($mode=="write"){
include_once "$_SERVER[DOCUMENT_ROOT]/board/skin/".$data[a_skinname]."/write.php";
} else if($mode=="view"){
include_once "$_SERVER[DOCUMENT_ROOT]/board/skin/$data[a_skinname]/view_main.php";
include_once "$_SERVER[DOCUMENT_ROOT]/board/skin/$data[a_skinname]/view_write_comment.php";
} else if($mode=="pwchk"){
include_once "$_SERVER[DOCUMENT_ROOT]/board/view_secret.php";
}
?>
</td>
</tr>
</form>
</table></td>
</tr>
</table>
<? include_once "../inc/sub_footer.php";?>
OHA YOOOO