<?php
require_once( "../inc/session.php" );
require_once( "../inc/common.inc" );         // 공통 함수 모음
require_once( "../inc/db_pgsql.inc" ); // 데이터베이스 인터페이스

$AdminLevel = 1; 
//$suid = $HTTP_COOKIE_VARS[SUID];
$suid = $_COOKIE[SUID];

if ($suid != "guru222")
{
    AlertBack("전체관리자만 접근할 수 있습니다.");
    exit;
}

$objConn = new DB_Sql;
?>

<html>
<head><title>System Administration</title><meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=euc-kr"><link href="../css/style.css" rel="stylesheet" type="text/css"><script language="javascript" type="text/javascript" src="rc_add.js"></script><style>BODY,TABLE,TR,TD {font-size:12px;}select{behavior: url('../css/selectbox.htc');}TD{line-height:150%;}</style>
<link rel="stylesheet" href="img/style.css" type="text/css">
</head>

<?php
//PrintHtmlHeader( "$DOC_ROOT/rcmng/rc_add.js" );
?>

<script language="javascript">
function winopen_update()
{
	if (confirm("모든 서버 목록이 갱신됩니다. 진행 하시겠습니까?"))
	{
	    window.open("../servListUpdate.html", "slu_popup", "width=400, height=100");
	}
	else
		return;
}

function winopen_raid()
{
    //window.open("http://cc-raid.ktsh.co.kr/index.html", "_blank");
    window.open("http://cs-raid.myskcdn.co.kr/index.html", "_blank");
}
</script>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="focus();">
<?php
    require_once( "../inc/top_1.html" );
?>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  
  <tr>
    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="169" bgcolor="#F1F1F1" valign="top">
		   <table width=100% border=0 cellpadding=0 cellspacing=0>
              <tr height=12>
                <td></td>
              </tr>
              <tr height=1>
                <td bgcolor="#B9B9B9"></td>
              </tr>
              <!-- menu title -->
              <tr height=30>
                <td align=center class="LeftMenuTitle"> RC Management </td>
              </tr>
              <tr height=1>
                <td bgcolor="#B9B9B9"></td>
              </tr>
              <!-- submenu -->
              <tr height=30>
                <td align=center class=LeftMenu style="padding-top:10;padding-bottom:10"><a href='javascript:winopen_update();'><img src='img/Btnupdate.gif' border='0'></a></td>
              </tr>
              <tr height=30>
                <td align=center class=LeftMenu height="17"><a href='rc_list.html'>RC
                  목록</a></td>
              </tr>
              <tr height=30>
                <td align=center class=LeftMenu bgcolor=#CDCDCD><a href='rc_add.html'>RC
                  추가</a></td>
              </tr>
              <tr height=30>
                <td align=center class=LeftMenu height="50">&nbsp;</td>
              </tr>
              <tr height=1>
                <td bgcolor="#B9B9B9"></td>
              </tr>
              <!-- menu title -->
              <tr height=30>
                <td align=center class="LeftMenuTitle"> SMS Management </td>
              </tr>
              <tr height=1>
                <td bgcolor="#B9B9B9"></td>
              </tr>
              <tr height=30>
                <td align=center class=LeftMenu><a href='sms_list.html'>수신 목록</a></td>
              </tr>
			  <tr height=30>
                <td align=center class=LeftMenu height="50">&nbsp;</td>
              </tr>
              <tr height=1>
                <td bgcolor="#B9B9B9"></td>
              </tr>
              <tr height=30>
                <td align=center class="LeftMenuTitle"> Monitor Page </td>
              </tr>
              <tr height=1>
                <td bgcolor="#B9B9B9"></td>
              </tr>
              <tr height=20>
                <td align=center class=LeftMenu><a href='../monitor.html'>서버 상태</a></td>
              </tr>
              <tr height=20>
                <td align=center class=LeftMenu><a href="javascript:winopen_raid();">RAID 상태</a></td>
              </tr>
            </table> 
          </td>
          <td width="1" bgcolor="#CECECE"></td>
          <td width="30" bgcolor="#FFFFFF"></td>
          <td>
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr height="12">
                <td></td>
              </tr>
              <tr height="28">
                <td class="ContentSummary">>> RC Management</td>
              </tr>
              <tr height="1">
                <td height="1" background="<?echo("$DOC_ROOT")?>/image/bg_line_dash.gif"></td>
              </tr>
              <tr height="24">
                <td></td>
              </tr>
              <tr>
                <td valign=top>

                  <!-- CONTENT TABLE START -->
                  <form name="form_rc_add" method="post" action="<?echo("$DOC_ROOT")?>/rcmng/rc_add_process.html" onSubmit="return check_submit(this);">
                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td valign="top">
                        <!-- content subtitle -->
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ContentSubtitle">
                          <tr>
                            <td width="10" height="25"><img src="<?echo("$DOC_ROOT")?>/image/icon_arrow.gif"></td>
                            <td>RC 추가</td>
                          </tr>
                        </table>
                        
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ContentTable">
                          <tr>
                            <td>
                            
                              <!-- RC 추가 TABLE START -->
                              <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ContentTable">
                              
                                <tr>
                                  <td colspan="4" height="2" bgcolor="#B9B9B9"></td>
                                </tr>
                              
                                <tr>
                                  <td colspan="4" height="27" align="center" bgcolor="#F6F5F2" class="ContentTableTitle">RC 추가</td>
                                </tr>
                                <tr>
                                  <td colspan="4" height="1" bgcolor="E1E1E1"></td>
                                </tr>
                              
                                <tr>
                                  <td width="20" height="27" bgcolor="#F6F5F2"></td>
                                  <td width="155" bgcolor="#F6F5F2">RC ID </td>
                                  <td width="20"></td>
                                  <td><input type="text" name="rcid" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:208px; height:19px;" value="" maxlength="32"> 영문 대소문자, 숫자 입력 가능(특수문자 - 만가능) </td>
                                </tr>
                                <tr>
                                  <td colspan="4" height="1" bgcolor="E1E1E1"></td>
                                </tr>

                                <tr>
                                  <td width="20" height="27" bgcolor="#F6F5F2"></td>
                                  <td width="155" bgcolor="#F6F5F2">RC 이름</td>
                                  <td width="20"></td>
                                  <td><input type="text" name="rc_name" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:208px; height:19px;" value="" maxlength="32"> RC에 대한 이름 또는 설명을 적어주세요.</td>
                                </tr>
                                <tr>
                                  <td colspan="4" height="1" bgcolor="E1E1E1"></td>
                                </tr>
                              
                                <tr>
                                  <td width="20" height="27" bgcolor="#F6F5F2"></td>
                                  <td width="155" bgcolor="#F6F5F2">RC 제어서버 주소(RCTS)</td>
                                  <td width="20"></td>
                                  <td><input type="text" name="rcts_addr" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:208px; height:19px;" value="" maxlength="32"> </td>
                                </tr>
                                <tr>
                                  <td colspan="4" height="1" bgcolor="E1E1E1"></td>
                                </tr>
                              
                                <tr>
                                  <td width="20" height="27" bgcolor="#F6F5F2"></td>
                                  <td width="155" bgcolor="#F6F5F2">RC 대표 주소(RTS)</td>
                                  <td width="20"></td>
                                  <td><input type="text" name="fhs_addr" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:208px; height:19px;" value="" maxlength="32"></td>
                                </tr>
                                <tr>
                                  <td colspan="4" height="1" bgcolor="E1E1E1"></td>
                                </tr>
								<tr>
                                  <td rowspan="6" width="20" height="27" bgcolor="#F6F5F2"></td>
                                  <td rowspan="6" width="155" bgcolor="#F6F5F2">RC인증(RCACCT)</td>
                                  <td rowspan="6" width="20"></td>
                                </tr>
								<tr>
                                  <td><input type=text value="서비스ID" style="border:0px" size="10" readonly>&nbsp;:&nbsp;<input type="text" name="acct1" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:150px; height:19px;" value="" maxlength="32"></td>
                                </tr>
                                <tr>
                                  <td><input type=text value="SP ID" style="border:0px" size="10" readonly>&nbsp;:&nbsp;<input type="text" name="acct2" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:150px; height:19px;" value="" maxlength="32"></td>
                                </tr>
                                <tr>
                                  <td><input type=text value="비번" style="border:0px" size="10" readonly>&nbsp;:&nbsp;<input type="text" name="acct3" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:150px; height:19px;" value="" maxlength="32"></td>
                                </tr>
                                <tr>
                                  <td><input type=text value="인증키" style="border:0px" size="10" readonly>&nbsp;:&nbsp;<input type="text" name="acct4" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:150px; height:19px;" value="" maxlength="50"></td>
                                </tr>
                                <tr>
                                  <td><input type=text value="위치" style="border:0px" size="10" readonly>&nbsp;:&nbsp;<input type="text" name="acct5" style="background-color:#FAFAFA; border:1px solid #CCCCCC; width:300px; height:19px;" value="" maxlength="100"></td>
                                </tr>
                                <tr>
                                  <td colspan="4" height="1" bgcolor="E1E1E1"></td>
                                </tr> 
                              </table>
                              <!-- RC 추가 TABLE END -->
                              
                            </td>
                          </tr>
                        </table>
                        
                        <!-- divider -->
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="20"></td>
                          </tr>
                        </table>
                  
                        <!-- form button panel -->
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ContentTable">
                          <tr>
                            <td height="30" align=center>
                              <input type="image" src="<?echo("$DOC_ROOT")?>/image/icon_add_pop.gif" alt="추가" border="0" width="89" height="21" align="absmiddle"> 
                              <img src="<?echo("$DOC_ROOT")?>/image/icon_reset.gif" border=0 align="absmiddle" onclick="reset();" align="absmiddle" style="cursor:hand">
                              <img src="<?echo("$DOC_ROOT")?>/image/icon_cancel.gif" border=0 align="absmiddle" onclick="history.go(-1);" align="absmiddle" style="cursor:hand">
                            </td>
                          </tr>
                        </table>
                  
                        <!-- divider -->
                        <table width="100%" border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="25"></td>
                          </tr>
                        </table>
                  
                      </td>
                    </tr>
                  </table>
                  </form>
                  <!-- CONTENT TABLE END -->
                
                </td>
              </tr>
            </table>
          </td>
          <td width="30" bgcolor="#FFFFFF"></td>
        </tr>
      </table>
    </td>
  </tr>
  
  <tr>
    <td>
      <?php
      require_once( "../inc/foot.html" );
      ?>
    </td>
  </tr>
  
</table>

</body>

</html>

<?php
$objConn->close();
?>
