credit.css
3.67 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
header('Content-Type: text/css; charset=utf-8');
$file = file("../image.log");
foreach ($file as $value) {
$array = split(",", $value);
if ($array[0] == "credit_1") {
$ex_1 = $array[1];
}
if ($array[0] == "credit_2") {
$ex_2 = $array[1];
}
if ($array[0] == "credit_3") {
$ex_3 = $array[1];
}
if ($array[0] == "credit_4") {
$ex_4 = $array[1];
}
if ($array[0] == "credit_5") {
$ex_5 = $array[1];
}
if ($array[0] == "credit_6") {
$ex_6 = $array[1];
}
if ($array[0] == "credit_global") {
$ex_global = $array[1];
}
}
if (isset($_GET['cms'])) $cms = $_GET['cms'];
if ($cms=="testselesite") {
$dbhost = "192.168.1.208";
$dbname = "cms_testselesite_com";
} elseif ($cms=="selesite") {
$dbhost = "db-int.wp.systec2000.com";
$dbname = "sele2_cms_selesite_com";
} elseif ($cms=="yadokari_cms") {
$dbhost = "db-int.wp.systec2000.com";
$dbname = "sele_cms_yadokari_co_jp";
} elseif ($cms=="otegaru_web") {
$dbhost = "db-int.wp.systec2000.com";
$dbname = "sele_cms_otegaru_web_jp";
} elseif ($cms=="testing_environment") {
$dbhost = "db-int.wp.systec2000.com";
$dbname = "cms_testing_environment";
} elseif ($cms=="estate") {
$dbhost = "db-int.wp.systec2000.com";
$dbname = "sele_estate_selesite_com";
} else {
$dbhost = "db-int.wp.systec2000.com";
$dbname = "sele2_cms_selesite_com";
}
$dbuser = "sele2_cms";
$dbpass = "cVY7hvaX6V47qFYY";
$t_blog = "mt_blog";
$t_tmpl = "mt_template";
$con = mysql_connect($dbhost, $dbuser, $dbpass);
$getchara = mysql_client_encoding($con);
if ($getchara != "utf8") {
$set_name = "SET NAMES utf8";
mysql_query($set_name, $con);
}
$home_url = 'http://'.$_SERVER["HTTP_HOST"].$_SERVER['PHP_SELF'];
$home_url = str_replace("functions/util/credit.css", "", $home_url);
$select = "select template_text, template_name from {$t_tmpl} where template_blog_id = 0 and template_name like '%SETTING%' and template_text like '%{$home_url}\n%';";
$result = mysql_db_query($dbname, $select, $con);
while ($row = mysql_fetch_array($result)) {
$setting_text = $row["template_text"];
}
$setting_text = explode("\n", $setting_text);
foreach ($setting_text as $val) {
if (ereg("^contents_class_1", $val)) {
$contents_class_1 = ereg_replace("contents_class_1=", '', $val);
}
if (ereg("^contents_class_2", $val)) {
$contents_class_2 = ereg_replace("contents_class_2=", '', $val);
}
if (ereg("^contents_class_3", $val)) {
$contents_class_3 = ereg_replace("contents_class_3=", '', $val);
}
if (ereg("^contents_class_4", $val)) {
$contents_class_4 = ereg_replace("contents_class_4=", '', $val);
}
if (ereg("^contents_class_5", $val)) {
$contents_class_5 = ereg_replace("contents_class_5=", '', $val);
}
if (ereg("^contents_class_6", $val)) {
$contents_class_6 = ereg_replace("contents_class_6=", '', $val);
}
}
echo '// '.$cms."\n";
?>
.home p.credit {
background-image : url(../../images/credit/home.jpg);
}
.<?php echo $contents_class_1; ?> p.credit {
background-image : url(../../images/credit/contents1.<?php echo $ex_1; ?>);
}
.<?php echo $contents_class_2; ?> p.credit {
background-image : url(../../images/credit/contents2.<?php echo $ex_2; ?>);
}
.<?php echo $contents_class_3; ?> p.credit {
background-image : url(../../images/credit/contents3.<?php echo $ex_3; ?>);
}
.<?php echo $contents_class_4; ?> p.credit {
background-image : url(../../images/credit/contents4.<?php echo $ex_4; ?>);
}
.<?php echo $contents_class_5; ?> p.credit {
background-image : url(../../images/credit/contents5.<?php echo $ex_5; ?>);
}
.<?php echo $contents_class_6; ?> p.credit {
background-image : url(../../images/credit/contents6.<?php echo $ex_6; ?>);
}
.global p.credit {
background-image : url(../../images/credit/global.<?php echo $ex_global; ?>);
}