Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV - 업&다운 그레이드, 복원, 로그기록 #182

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
d4b40aa
[G5-75] 다운그레이드
Mar 30, 2022
cd6fcff
[G5-75] 다운그레이드
Mar 30, 2022
e57bbac
[G5-75] 다운그레이드
Mar 30, 2022
d790acb
[G5-75] 다운그레이드
Mar 31, 2022
e6b2308
[G5-75] 다운그레이드
Mar 31, 2022
17aaf44
[G5-75] 다운그레이드
Mar 31, 2022
9b2330b
[G5-75] 다운그레이드
Apr 4, 2022
bd083b1
[G5-75] 다운그레이드
Apr 4, 2022
9e41f3d
[G5-75] 다운그레이드
Apr 5, 2022
b9742de
[G5-75] 다운그레이드
Apr 6, 2022
e80b57a
[G5-75] 다운그레이드
Apr 6, 2022
208e4ab
[G5-75] 다운그레이드
Apr 6, 2022
b6c2346
[G5-75] 다운그레이드
Apr 7, 2022
7672e3f
[G5-75] 다운그레이드
Apr 7, 2022
68a5224
[G5-78] 파일비교시 cr lf 관련 문제
Apr 11, 2022
f2c9ea5
[G5-79] 파일업로드시 파일권한관련 오류 사항 확인 및 수정
Apr 11, 2022
252b09d
[G5-79] 파일업로드시 파일권한관련 오류 사항 확인 및 수정
Apr 11, 2022
2a2a155
[G5-75] 다운그레이드
Apr 14, 2022
e056f52
[G5-75] 다운그레이드
Apr 14, 2022
d1f03aa
[G5-75] 다운그레이드
Apr 14, 2022
aa22676
[G5-75] 다운그레이드
Apr 14, 2022
f46ace4
[G5-75] 다운그레이드
Apr 14, 2022
d72e9ef
[G5-75] 다운그레이드
Apr 14, 2022
940103f
[G5-75] 다운그레이드
Apr 14, 2022
f1092e9
[G5-71] 롤백 - 업데이트 직전 백업기능 추가
projectSylas Apr 14, 2022
3d20bac
Merge branch 'dev_version' of https://github.com/loves2tu/gnuboard5 i…
projectSylas Apr 14, 2022
197eeab
[G5-75] 다운그레이드
Apr 14, 2022
9f3c396
[G5-71] 롤백
projectSylas Apr 18, 2022
e3d13f7
Merge branch 'dev_version' of https://github.com/loves2tu/gnuboard5 i…
projectSylas Apr 18, 2022
f7c1a26
[G5-71] 롤백 - git token값 제거
projectSylas Apr 18, 2022
299f096
[G5-75] 다운그레이드
Apr 18, 2022
47aaee3
Merge remote-tracking branch 'origin/dev_version' into dev_version
Apr 18, 2022
98512ae
[G5-71]롤백 - dir삭제, 파일 삭제 덮어쓰기 구현
projectSylas Apr 19, 2022
2a52658
[G5-71] 롤백 - 토큰값 제거
projectSylas Apr 19, 2022
9fa4f3b
[G5-75] 다운그레이드
Apr 19, 2022
3599f52
Merge remote-tracking branch 'origin/dev_version' into dev_version
Apr 19, 2022
cb50e82
[G5-71] 롤백 - 복원 후 압축해제한 백업폴더 삭제
projectSylas Apr 19, 2022
df7c81e
[G5-71] 롤백 - ftp dir 삭제, 파일 삭제 로직 추가
projectSylas Apr 19, 2022
cc20a1e
Merge remote-tracking branch 'origin/dev_version' into dev_version
Apr 19, 2022
bd96e8f
[G5-71] 롤백 - 복원 시점 리스트 내림차순 정렬
projectSylas Apr 19, 2022
5fe32cf
[G5-71] 롤백 - git token값 제거
projectSylas Apr 19, 2022
3443ab4
Merge remote-tracking branch 'origin/dev_version' into dev_version
Apr 19, 2022
00c715c
[G5-81] 업데이트 및 롤백 로그 기록 추가
Apr 20, 2022
11440ee
[G5-81] 업데이트 및 롤백 로그 기록 추가
Apr 20, 2022
7077b3b
[G5-81] 업데이트 및 롤백 로그 기록 추가
Apr 20, 2022
b6917f7
[G5-81] 업데이트 및 롤백 로그 기록 추가
Apr 21, 2022
ee008d8
[G5-81] 업데이트 및 롤백 로그 기록 추가
Apr 21, 2022
b3078ac
Merge branch 'master' of https://github.com/gnuboard/gnuboard5 into d…
Apr 22, 2022
9f7ed43
Revert "Merge branch 'master' of https://github.com/gnuboard/gnuboard…
Apr 22, 2022
531d1c1
[G5-81] 업데이트 및 롤백 로그 기록 추가
Apr 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions adm/_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
define('G5_IS_ADMIN', true);
include_once ('../common.php');
include_once(G5_ADMIN_PATH.'/admin.lib.php');
include_once(G5_LIB_PATH.'/update.lib.php');

if( isset($token) ){
$token = @htmlspecialchars(strip_tags($token), ENT_QUOTES);
}

if( !isset($g5['update'])) {
$g5['update'] = new G5Update();
$g5['update']->setNowVersion("v".G5_GNUBOARD_VER);
}

run_event('admin_common');
3 changes: 2 additions & 1 deletion adm/admin.menu100.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
}

$menu['menu100'][] = array('100410', 'DB업그레이드', G5_ADMIN_URL.'/dbupgrade.php', 'db_upgrade');
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
$menu['menu100'][] = array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service');
$menu['menu100'][] = array('100600', '버전업데이트', G5_ADMIN_URL.'/update/', 'update');
26 changes: 26 additions & 0 deletions adm/ajax.connect_check.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
include_once ("./_common.php");

try {
$username = isset($_POST['username']) ? $_POST['username'] : null;
$userpassword = isset($_POST['password']) ? $_POST['password'] : null;
$port = isset($_POST['port']) ? $_POST['port'] : null;

if($username == null) throw new Exception("ftp 계정명을 입력해주세요");
if($userpassword == null) throw new Exception("ftp 비밀번호를 입력해주세요");
if($port == null) throw new Exception("프로토콜을 선택해주세요");

$conn_result = $g5['update']->connect($_SERVER['HTTP_HOST'], $port, $username, $userpassword);
if($conn_result == false) throw new Exception("연결에 실패했습니다.");

$data = array();
$data['error'] = 0;
$data['message'] = "성공적으로 연결되었습니다.";
} catch (Exception $e) {
$data = array();
$data['code'] = $e->getCode();
$data['message'] = $e->getMessage();
}

die(json_encode($data));
?>
36 changes: 36 additions & 0 deletions adm/ajax.version_content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
include_once ("./_common.php");

try {
$version = isset($_POST['version']) ? $_POST['version'] : null;
if($version == null) throw new Exception("버전을 입력해주세요");

$result = $g5['update']->getVersionModifyContent($version);
if($result == false) throw new Exception("정보를 찾을 수 없습니다.");

preg_match_all('/(?:(?:https?|ftp):)?\/\/[a-z0-9+&@#\/%?=~_|!:,.;]*[a-z0-9+&@#\/%=~_|]/i', $result, $match);

$content_url = $match[0];
foreach($content_url as $key => $var) {
$result = str_replace($var, "@".$key."@", $result);
}

$txt = "<p class=\"content_title\">".$version." 버전 수정</p>";
$txt .= "<p style=\"white-space:pre-line; line-height:2;\">";
foreach($content_url as $key => $var) {
$result = str_replace('@'.$key.'@', '<a class="a_style" href="'.$var.'" target="_blank">변경코드확인</a>', $result);
}
$txt .= htmlspecialchars_decode($result, ENT_HTML5);
$txt .= "</p><br>";

$data = array();
$data['error'] = 0;
$data['item'] = $txt;
} catch (Exception $e) {
$data = array();
$data['code'] = $e->getCode();
$data['message'] = $e->getMessage();
}

die(json_encode($data));
?>
20 changes: 20 additions & 0 deletions adm/shop_admin/codedupcheck.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
include_once('./_common.php');

$name = '';

if ($it_id)
{
$row = get_shop_item($it_id, true);
$code = $it_id;
$name = $row['it_name'];
}
else if ($ca_id)
{
$sql = " select ca_name from {$g5['g5_shop_category_table']} where ca_id = '$ca_id' ";
$row = sql_fetch($sql);
$code = $ca_id;
$name = $row['ca_name'];
}

echo '{ "code": "' . $code . '", "name": "' . $name . '" }';
10 changes: 10 additions & 0 deletions adm/update/_common.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php
define('G5_IS_ADMIN', true);
include_once ('../../common.php');
include_once(G5_LIB_PATH.'/update.lib.php');
include_once(G5_ADMIN_PATH.'/admin.lib.php');

if( !isset($g5['update'])) {
$g5['update'] = new G5Update(G5_PATH);
$g5['update']->setNowVersion("v".G5_GNUBOARD_VER);
}
26 changes: 26 additions & 0 deletions adm/update/ajax.connect_check.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
include_once ("./_common.php");

try {
$username = isset($_POST['username']) ? $_POST['username'] : null;
$userpassword = isset($_POST['password']) ? $_POST['password'] : null;
$port = isset($_POST['port']) ? $_POST['port'] : null;

if($username == null) throw new Exception("ftp 계정명을 입력해주세요");
if($userpassword == null) throw new Exception("ftp 비밀번호를 입력해주세요");
if($port == null) throw new Exception("프로토콜을 선택해주세요");

$conn_result = $g5['update']->connect($_SERVER['HTTP_HOST'], $port, $username, $userpassword);
if($conn_result == false) throw new Exception("연결에 실패했습니다.");

$data = array();
$data['error'] = 0;
$data['message'] = "성공적으로 연결되었습니다.";
} catch (Exception $e) {
$data = array();
$data['code'] = $e->getCode();
$data['message'] = $e->getMessage();
}

die(json_encode($data));
?>
24 changes: 24 additions & 0 deletions adm/update/ajax.password_check.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
include_once ("./_common.php");

try {
$admin_password = isset($_POST['admin_password']) ? $_POST['admin_password'] : '';
if($admin_password == '') throw new Exception("관리자패스워드가 입력되지 않았습니다.");

// 관리자 비밀번호 비교
$admin = get_admin('super');
if(!check_password($admin_password, $admin['mb_password'])) throw new Exception("관리자 비밀번호가 일치하지 않습니다.");

$data = array();
$data['error'] = 0;
$data['item'] = "success";

} catch (Exception $e) {
$data = array();
$data['error'] = 1;
$data['code'] = $e->getCode();
$data['message'] = $e->getMessage();
}

die(json_encode($data));
?>
36 changes: 36 additions & 0 deletions adm/update/ajax.version_content.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
include_once ("./_common.php");

try {
$version = isset($_POST['version']) ? $_POST['version'] : null;
if($version == null) throw new Exception("버전을 입력해주세요");

$result = $g5['update']->getVersionModifyContent($version);
if($result == false) throw new Exception("정보를 찾을 수 없습니다.");

preg_match_all('/(?:(?:https?|ftp):)?\/\/[a-z0-9+&@#\/%?=~_|!:,.;]*[a-z0-9+&@#\/%=~_|]/i', $result, $match);

$content_url = $match[0];
foreach($content_url as $key => $var) {
$result = str_replace($var, "@".$key."@", $result);
}

$txt = "<p class=\"content_title\">".$version." 버전 수정</p>";
$txt .= "<p style=\"white-space:pre-line; line-height:2;\">";
foreach($content_url as $key => $var) {
$result = str_replace('@'.$key.'@', '<a class="a_style" href="'.$var.'" target="_blank">변경코드확인</a>', $result);
}
$txt .= htmlspecialchars_decode($result, ENT_HTML5);
$txt .= "</p><br>";

$data = array();
$data['error'] = 0;
$data['item'] = $txt;
} catch (Exception $e) {
$data = array();
$data['code'] = $e->getCode();
$data['message'] = $e->getMessage();
}

die(json_encode($data));
?>