Skip to content

Commit de81661

Browse files
author
ditto
committed
저장소 개편 끝.
1 parent a8e77b4 commit de81661

File tree

765 files changed

+47913
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

765 files changed

+47913
-0
lines changed

converters/zb4/converter.css

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@charset "utf-8";
2+
3+
body {
4+
font-family: Verdana, 굴림, sans-serif;
5+
font-size: 0.8em;
6+
color: black;
7+
background-color: white;
8+
}
9+
10+
#wrap {
11+
width: 500px;
12+
margin: 0 auto;
13+
}
14+
15+
h2 {
16+
font-size: 1.2em;
17+
padding-bottom: 0;
18+
border-bottom: 1px solid #ddd;
19+
}
20+
21+
#step {
22+
font-size: 0.8em;
23+
font-weight: normal;
24+
color: #c00;
25+
}
26+
27+
label {
28+
display: block;
29+
float: left;
30+
width: 12em;
31+
}
32+
33+
p {
34+
margin: 0.2em;
35+
}
36+
37+
input[type=text] {
38+
border: 1px solid #ddd;
39+
}
40+
41+
#copyright {
42+
text-align: right;
43+
color: #999;
44+
font-size: 0.8em;
45+
}
46+
47+
.hidden { display:none; }
48+
49+
.msg {
50+
padding: 4px;
51+
margin: 4px;
52+
border: 1px solid #999;
53+
background-color: #f4f4f4;
54+
}
55+
56+
.error {
57+
border-color: #c00;
58+
background-color: #fcc;
59+
}
60+
61+
.warning {
62+
border-color: #cc0;
63+
background-color: #ffc;
64+
}
65+
66+
.ok {
67+
border-color: #0c0;
68+
background-color: #cfc;
69+
}

converters/zb4/converter.php

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
// Converter Library
3+
4+
function print_header($step) {
5+
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
6+
<html lang="ko">
7+
<head>
8+
<title>Zb2Metabbs Converter</title>
9+
<link rel="stylesheet" type="text/css" href="converter.css" />
10+
</head>
11+
<body>
12+
<div id="wrap">
13+
<div id="header">
14+
<h1>Zeroboard to MetaBBS <span id="step">Step <?=$step?></span></h1>
15+
</div>
16+
<div id="content">
17+
<?php
18+
}
19+
20+
function print_footer() {
21+
?>
22+
</div>
23+
<div id="footer">
24+
<p id="copyright">Copyright&copy; MetaBBS Team</p>
25+
</div>
26+
</div>
27+
</body>
28+
</html>
29+
<?php
30+
}
31+
32+
function section($text) {
33+
echo "<h2>$text</h2>\n";
34+
}
35+
36+
function error($msg) {
37+
echo "<div class=\"msg error\">$msg</div>\n";
38+
}
39+
40+
function warning($msg) {
41+
echo "<div class=\"msg warning\">$msg</div>\n";
42+
}
43+
44+
function ok($msg) {
45+
echo "<div class=\"msg ok\">$msg</div>\n";
46+
}
47+
48+
function msg($msg) {
49+
echo "<div class=\"msg\">$msg</div>\n";
50+
}
51+
52+
function form_start($next_step) {
53+
echo "<form action=\"{$_SERVER['SCRIPT_NAME']}\" method=\"post\">\n";
54+
input_hidden('step', $next_step);
55+
}
56+
57+
function form_end() {
58+
echo "</form>\n";
59+
}
60+
61+
function input_hidden($name, $value) {
62+
echo "<p class=\"hidden\"><input type=\"hidden\" name=\"$name\" value=\"$value\" /></p>\n";
63+
}
64+
65+
function input_general($label, $type, $name, $value) {
66+
echo "<p>";
67+
if ($label != '') echo "<label>$label</label>";
68+
echo "<input type=\"$type\" name=\"$name\" value=\"$value\" /></p>\n";
69+
}
70+
71+
function get_mysql_version() {
72+
preg_match('/[0-9]+\.[0-9]+(\.[0-9]+)?/', mysql_get_server_info(), $matches);
73+
return $matches[0];
74+
}
75+
76+
?>

converters/zb4/zb2meta.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
include('converter.php');
3+
4+
if (!isset($_POST['step'])) $step = 1;
5+
else $step = $_POST['step'];
6+
7+
print_header($step);
8+
9+
switch ($step) {
10+
case 1:
11+
12+
section("PHP 환경 검사...");
13+
14+
$charset_converter = '';
15+
16+
if(function_exists('iconv')) {
17+
ok('iconv 함수 확인됨');
18+
$charset_converter = 'iconv';
19+
} elseif(function_exists('mb_convert_encoding')) {
20+
ok('mb_convert_encoding 함수 확인됨');
21+
$charset_converter = 'mbstr';
22+
} else {
23+
error('Encoding 변환 함수를 사용할 수 없습니다.');
24+
break;
25+
}
26+
27+
msg("변환에 필요한 환경 확인 완료");
28+
29+
section("경고");
30+
31+
warning("이 변환기는 기존 제로보드의 DB를 지우거나 덮어쓰는 작업을 하지 않습니다.<br/>그러나 이를 사용함으로써 발생하는 모든 피해는 사용자의 책임 하에 있습니다.");
32+
warning("변환기를 사용하기에 앞서 깨끗한 MetaBBS 설치본이 존재해야 합니다.");
33+
34+
section("기본 정보 입력");
35+
36+
form_start(2);
37+
input_hidden('charsetconv', $charset_converter);
38+
input_general('MySQL 사용자 이름', 'text', 'mysql_user', '');
39+
input_general('MySQL 암호', 'text', 'mysql_pw', '');
40+
input_general('MetaBBS 테이블 식별자', 'text', 'prefix', '');
41+
form_end();
42+
43+
break;
44+
45+
case 2:
46+
47+
section("MySQL 환경 검사...");
48+
49+
section("변환 옵션");
50+
51+
break;
52+
case 3:
53+
54+
break;
55+
default:
56+
error("Invalid query.");
57+
}
58+
59+
print_footer();
60+
?>

0 commit comments

Comments
 (0)