-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagreement.php
66 lines (60 loc) · 1.44 KB
/
agreement.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?
include_once('header.php');
$agreement="";
$agreementSQL ="SELECT agreement FROM tbldesign";
if(false !== $agreementRes = mysql_query($agreementSQL,get_db_conn())){
$rowcount = mysql_num_rows($agreementRes);
if($rowcount>0){
$row=mysql_fetch_object($agreementRes);
$agreement=$row->agreement;
}else{
$fa = fopen($Dir.AdminDir."agreement.txt","r");
if($fa){
while(!feof($fa)){
$fbuffer .=fgets($fa,1024);
}
}
fclose($fa);
$agreement = $fbuffer;
}
mysql_free_result($agreementRes);
}
if(strlen($agreement) <= 0){
echo '<script>alert("이용약관 설정이 되어 있지 않습니다.");history.go(-1);</script>';exit;
}
$pattern=array("(\[SHOP\])","(\[COMPANY\])");
$replace=array($_data->shopname, $_data->companyname);
$agreement = preg_replace($pattern,$replace,$agreement);
?>
<style>
#sec_agreement_wrap div{
margin: 20px;
}
div span{
font-weight: 500;
color: black;
}
div p{
margin: 15px;
}
</style>
<div id="content">
<div class="h_area2">
<h2>이용약관</h2>
<a href="main.php" class="btn_home" rel="external"><span class="vc">홈</span></a>
<a href="javascript:history.back()" class="btn_prev" rel="external"><span>이전</span></a>
</div>
<section id="sec_agreement_wrap">
<?=$agreement?>
</section>
</div>
<script>
$(document).ready(function(){
$("#gnb_button").hide();
$("#prsearch").hide();
$("#basket").hide();
});
</script>
<?
include_once('footer.php');
?>