<?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 okone_basic ", false)) {
    sql_query(" CREATE TABLE IF NOT EXISTS `okone_basic` (
   				  `idx` int(5) NOT NULL default '1',
                  `okone_company` varchar(255) NOT NULL default '',
                  `okone_facebook` varchar(255) NOT NULL default '',
                  `okone_twitter` varchar(255) NOT NULL default '',
                  `okone_youtube` varchar(255) NOT NULL default '',
                  `okone_map` text NOT NULL,
				          `okone_file_name` varchar(255) NOT NULL default '',
				  `okone_file_source` varchar(255) NOT NULL default '',
				  `okone_file_type` varchar(255) NOT NULL default '',
                  PRIMARY KEY (`idx`)
                ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);

	sql_query(" INSERT INTO `okone_basic` VALUES (1, '365OK', 'http://facebook.com', 'http://twitter.com', 'http://youtube.com', '<iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3161.660661425396!2d126.97262231579636!3d37.58660757979412!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x357ca2b7ef94a16b%3A0xb16d5f135eaaddc!2z7LKt7JmA64yA!5e0!3m2!1sko!2skr!4v1523367674858\" width=\"100%\" height=\"100%\" frameborder=\"0\" style=\"border:0\" allowfullscreen></iframe>', '', '', '') ");

}


$okone_bn = sql_fetch(" select * from okone_basic where idx='1' ");

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

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

?>


<form name="ftjbasic" id="ftjbasic" action="./okone_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="okone_company">회사명</label></th>
        <td><input type="text" name="okone_company" value="<?php echo $okone_bn['okone_company']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="okone_facebook">페이스북</label></th>
        <td><input type="text" name="okone_facebook" value="<?php echo $okone_bn['okone_facebook']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="okone_twitter">트위터</label></th>
        <td><input type="text" name="okone_twitter" value="<?php echo $okone_bn['okone_twitter']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="okone_youtube">유튜브</label></th>
        <td><input type="text" name="okone_youtube" value="<?php echo $okone_bn['okone_youtube']; ?>"></td>
    </tr>
    <tr>
        <th scope="row"><label for="okone_map">회사주소</label></th>
        <td><textarea name="okone_map" rows=2 style="width:90%"><?php echo $okone_bn['okone_map']; ?></textarea><br>
        고객센터에 들어가는 구글지도입니다. 예: &#x3C;iframe src=&#x22;https://www.google.com/maps/embed?~~~~674858&#x22; width=&#x22;100%&#x22; height=&#x22;100%&#x22; frameborder=&#x22;0&#x22; style=&#x22;border:0&#x22; allowfullscreen&#x3E;&#x3C;/iframe&#x3E;<br>
      구글지도 얻는 방법은 <a href="https://365ok.co.kr/bbs/board.php?bo_table=okdown&wr_id=1109" target="_blank">여기</a>를 참조하세요.</td>
    </tr>
    <tr>
        <th scope="row"><label for="okone_logo">회사로고</label></th>
        <td><input type=file name='okone_file'> g5기본사이즈 : 189 x 40(단위:픽셀, 권장사항)
<br><br><?php if($okone_bn['okone_file_name']){?><input type=checkbox name='okone_file_chk'> <img src="../../data/file/<?php echo $okone_bn['okone_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');
?>
