Full source code website bán hàng thương mại điện tử gần giống shopee
467.134 lượt xem;
1
2 <?require("system/model/config.php") ?>
3 <? require("system/model/common_start.php") ?>
4 <? require("system/model/function.php") ?>
5 <? require("system/model/tiengviet.php") ?>
6 <?php
7 //META and FACEBOOK
8
9 ?>
10 <?php
11 $url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . $_SERVER['QUERYSTRING'];
12 $urlParts = explode('.', $_SERVER['HTTP_HOST']);
13 if(strpos($url, 'www'))
14 {
15 $subdomain_value = $urlParts[1]; // có “www”
16 }
17 else
18 {
19 $subdomain_value = $urlParts[0]; // không có “www”
20 }
21 if($subdomain_value == 'dev' || $subdomain_value == 'DEV')
22 {
23 // viết hàm thực thi riêng cho subdomain gianhang.shopcantho.vn
24 }
25 else
26 {
27 // viết hàm thực thi riêng cho domain chính shopcantho.vn
28 } ?>
29 <?php
30 $ok1=array("www.");
31 $ok2=array("");
32 ?>
33 <?php
34 if($_SERVER['SERVER_NAME']=='localhost')
35 {?>
36
37 <?}else{?>
38
39 <?}?>
40 <?
41 if($row['domain']==str_replace($ok1,$ok2,$_SERVER["SERVER_NAME"]))
42 {?>
43 <!--kiem tra khi co ten mien-->
44 <?if($tem=='')
45 {?>
46 <?include("template/mobile/index.php");?>
47 <?}else{?>
48 <?php if($row_mobile['mobile']=='0')
49 {?>
50 <?include($tem);?>
51 <?}else{?>
52 <?include("system/model/mobile.php");?>
53 <?}?>
54 <?}?>
55 <!--end kiem tra khi co ten mien-->
56 <?}elseif($subdomain_value==$user){?>
57 <!--kiem tra khi co subdomain-->
58 <?if($tem=='')
59 {?>
60 <?include("template/mobile/index.php");?>
61 <?}else{?>
62 <?php if($row_mobile['mobile']=='0')
63 {?>
64 <?include($tem);?>
65 <?}else{?>
66 <?include("system/model/mobile.php");?>
67 <?}?>
68 <?}?>
69 <!--end kiem tra subdomain-->
70
71 <?}else{?>
72 <?php include("system/model/mobile_home1.php");?>
73 <?}?>
74 <?require("system/model/common_end.php") ?>
2 <?require("system/model/config.php") ?>
3 <? require("system/model/common_start.php") ?>
4 <? require("system/model/function.php") ?>
5 <? require("system/model/tiengviet.php") ?>
6 <?php
7 //META and FACEBOOK
8
9 ?>
10 <?php
11 $url = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . $_SERVER['QUERYSTRING'];
12 $urlParts = explode('.', $_SERVER['HTTP_HOST']);
13 if(strpos($url, 'www'))
14 {
15 $subdomain_value = $urlParts[1]; // có “www”
16 }
17 else
18 {
19 $subdomain_value = $urlParts[0]; // không có “www”
20 }
21 if($subdomain_value == 'dev' || $subdomain_value == 'DEV')
22 {
23 // viết hàm thực thi riêng cho subdomain gianhang.shopcantho.vn
24 }
25 else
26 {
27 // viết hàm thực thi riêng cho domain chính shopcantho.vn
28 } ?>
29 <?php
30 $ok1=array("www.");
31 $ok2=array("");
32 ?>
33 <?php
34 if($_SERVER['SERVER_NAME']=='localhost')
35 {?>
36
37 <?}else{?>
38
39 <?}?>
40 <?
41 if($row['domain']==str_replace($ok1,$ok2,$_SERVER["SERVER_NAME"]))
42 {?>
43 <!--kiem tra khi co ten mien-->
44 <?if($tem=='')
45 {?>
46 <?include("template/mobile/index.php");?>
47 <?}else{?>
48 <?php if($row_mobile['mobile']=='0')
49 {?>
50 <?include($tem);?>
51 <?}else{?>
52 <?include("system/model/mobile.php");?>
53 <?}?>
54 <?}?>
55 <!--end kiem tra khi co ten mien-->
56 <?}elseif($subdomain_value==$user){?>
57 <!--kiem tra khi co subdomain-->
58 <?if($tem=='')
59 {?>
60 <?include("template/mobile/index.php");?>
61 <?}else{?>
62 <?php if($row_mobile['mobile']=='0')
63 {?>
64 <?include($tem);?>
65 <?}else{?>
66 <?include("system/model/mobile.php");?>
67 <?}?>
68 <?}?>
69 <!--end kiem tra subdomain-->
70
71 <?}else{?>
72 <?php include("system/model/mobile_home1.php");?>
73 <?}?>
74 <?require("system/model/common_end.php") ?>