<?php
$sub_menu = "550100";
include_once('./_common.php');

auth_check($auth[$sub_menu], 'r');

$token = get_token();

if ($is_admin != 'super')
    alert('최고관리자만 접근 가능합니다.');

if(!sql_query(" DESCRIBE `oksite_basic` ", false)) {
    sql_query(" CREATE TABLE IF NOT EXISTS `oksite_basic` (
   				  `idx` int(5) NOT NULL default '1',
                  `oksite_company` varchar(255) NOT NULL default '',
                  `oksite_tel` varchar(255) NOT NULL default '',
                  `oksite_open` varchar(255) NOT NULL default '',
                  `oksite_facebook` varchar(255) NOT NULL default '',
                  `oksite_twitter` varchar(255) NOT NULL default '',
                  `oksite_instagram` varchar(255) NOT NULL default '',
                  `oksite_googleplus` varchar(255) NOT NULL default '',
				          `oksite_file_name` varchar(255) NOT NULL default '',
				  `oksite_file_source` varchar(255) NOT NULL default '',
				  `oksite_file_type` varchar(255) NOT NULL default '',
                  PRIMARY KEY (`idx`)
                ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);

	sql_query(" INSERT INTO `oksite_basic` VALUES (1, '365OK', '010-3254-5402', '09:00 ~ 22:00', 'https://facebook.com', 'https://twitter.com', 'https://www.instagram.com/', 'https://plus.google.com/', '', '', '') ");

}


$oksite_bn = sql_fetch(" select * from oksite_basic where idx='1' ");

$g5['title'] = "OKsite기본설정";

include_once(G5_ADMIN_PATH.'/admin.head.php');

?>


<form name="ftjbasic" id="ftjbasic" action="./oksite_update.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="token" value="<?php echo $token ?>">


<div class="tbl_frm01 tbl_wrap">

    <table>
    <caption><?php echo $g5['title']; ?></caption>
    <tbody>
    <tr>
        <th scope="row"><label for="oksite_company">회사명</label></th>
        <td><input type="text" size="70" maxlength="120" name="oksite_company" value="<?php echo $oksite_bn['oksite_company']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="oksite_tel">전화번호</label></th>
        <td><input type="text" size="70" maxlength="120" name="oksite_tel" value="<?php echo $oksite_bn['oksite_tel']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="oksite_open">영업시간</label></th>
        <td><input type="text" size="70" maxlength="120" name="oksite_open" value="<?php echo $oksite_bn['oksite_open']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="oksite_facebook">페이스북</label></th>
        <td><input type="text" size="70" maxlength="120" name="oksite_facebook" value="<?php echo $oksite_bn['oksite_facebook']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="oksite_twitter">트위터</label></th>
        <td><input type="text" size="70" maxlength="120" name="oksite_twitter" value="<?php echo $oksite_bn['oksite_twitter']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="oksite_instagram">인스타그램</label></th>
        <td><input type="text" size="70" maxlength="120" name="oksite_instagram" value="<?php echo $oksite_bn['oksite_instagram']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="oksite_googleplus">구글플러스</label></th>
        <td><input type="text" size="70" maxlength="120" name="oksite_googleplus" value="<?php echo $oksite_bn['oksite_googleplus']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="oksite_logo">회사로고</label></th>
        <td><input type=file name='oksite_file'> g5기본사이즈 : 189 x 40(단위:픽셀, 권장사항)
<br><br><?php if($oksite_bn['oksite_file_name']){?><input type=checkbox name='oksite_file_chk'> <img src="../../data/file/<?php echo $oksite_bn['oksite_file_name']?>"> 삭제시 체크<?php }?></td>
    </tr>
    </tbody>
</table>

</div>

<div class="btn_confirm01 btn_confirm">
    <input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>

</form>

<div class="local_desc01 local_desc">
    <p>문의 : <a href="https://365ok.co.kr" target="_blank">https://365ok.co.kr</a>,  HP. 010-3254-5402</p>
</div>

<?php
include_once(G5_ADMIN_PATH.'/admin.tail.php');
?>
