alert("DB 설정 파일이 존재하지 않습니다.\\n\\n프로그램 설치 후 실행하시기 바랍니다.");
@@ -280,7 +280,7 @@ unset($my); // DB 설정값을 클리어 해줍니다.
ini_set("session.use_trans_sid", 0); // PHPSESSID를 자동으로 넘기지 않음
ini_set("url_rewriter.tags",""); // 링크에 PHPSESSID가 따라다니는것을 무력화함 (해뜰녘님께서 알려주셨습니다.)
-session_save_path("{$g4['path']}/data/session");
+session_save_path($g4['path'].'/data/session');
if (isset($SESSION_CACHE_LIMITER))
@session_cache_limiter($SESSION_CACHE_LIMITER);
@@ -292,7 +292,7 @@ else
//==============================================================================
// 기본환경설정
// 기본적으로 사용하는 필드만 얻은 후 상황에 따라 필드를 추가로 얻음
-$config = sql_fetch(" select * from $g4[config_table] ");
+$config = sql_fetch(" select * from {$g4['config_table']} ");
ini_set("session.cache_expire", 180); // 세션 캐쉬 보관시간 (분)
ini_set("session.gc_maxlifetime", 10800); // session data의 garbage collection 존재 기간을 지정 (초)
@@ -312,53 +312,53 @@ if (strpos($_SERVER[PHP_SELF], $g4['admin']) === false)
// 4.00.03 : [보안관련] PHPSESSID 가 틀리면 로그아웃한다.
if ($_REQUEST['PHPSESSID'] && $_REQUEST['PHPSESSID'] != session_id())
- goto_url("{$g4['bbs_path']}/logout.php");
+ goto_url($g4['bbs_path'].'/logout.php');
// QUERY_STRING
-$qstr = "";
+$qstr = '';
/*
if (isset($bo_table)) $qstr .= 'bo_table=' . urlencode($bo_table);
if (isset($wr_id)) $qstr .= '&wr_id=' . urlencode($wr_id);
*/
if (isset($sca)) {
$sca = mysql_real_escape_string($sca);
- $qstr .= '&sca=' . urlencode($sca);
+ $qstr .= '&sca=' . urlencode($sca);
}
if (isset($sfl)) {
$sfl = mysql_real_escape_string($sfl);
//$sfl = preg_replace("/[^\w\,\|]+/", "", $sfl);
- $qstr .= '&sfl=' . urlencode($sfl); // search field (검색 필드)
+ $qstr .= '&sfl=' . urlencode($sfl); // search field (검색 필드)
}
if (isset($stx)) { // search text (검색어)
$stx = mysql_real_escape_string($stx);
- $qstr .= '&stx=' . urlencode($stx);
+ $qstr .= '&stx=' . urlencode($stx);
}
if (isset($sst)) {
$sst = mysql_real_escape_string($sst);
- $qstr .= '&sst=' . urlencode($sst); // search sort (검색 정렬 필드)
+ $qstr .= '&sst=' . urlencode($sst); // search sort (검색 정렬 필드)
}
if (isset($sod)) { // search order (검색 오름, 내림차순)
- $sod = preg_match("/^(asc|desc)$/i", $sod) ? $sod : "";
- $qstr .= '&sod=' . urlencode($sod);
+ $sod = preg_match("/^(asc|desc)$/i", $sod) ? $sod : '';
+ $qstr .= '&sod=' . urlencode($sod);
}
if (isset($sop)) { // search operator (검색 or, and 오퍼레이터)
- $sop = preg_match("/^(or|and)$/i", $sop) ? $sop : "";
- $qstr .= '&sop=' . urlencode($sop);
+ $sop = preg_match("/^(or|and)$/i", $sop) ? $sop : '';
+ $qstr .= '&sop=' . urlencode($sop);
}
if (isset($spt)) { // search part (검색 파트[구간])
$spt = (int)$spt;
- $qstr .= '&spt=' . urlencode($spt);
+ $qstr .= '&spt=' . urlencode($spt);
}
if (isset($page)) { // 리스트 페이지
$page = (int)$page;
- $qstr .= '&page=' . urlencode($page);
+ $qstr .= '&page=' . urlencode($page);
}
if ($wr_id) {
@@ -366,7 +366,7 @@ if ($wr_id) {
}
if ($bo_table) {
- $bo_table = preg_match("/^[a-zA-Z0-9_]+$/", $bo_table) ? $bo_table : "";
+ $bo_table = preg_match("/^[a-zA-Z0-9_]+$/", $bo_table) ? $bo_table : '';
}
// URL ENCODING
@@ -376,7 +376,7 @@ if (isset($url)) {
else {
// 2008.01.25 Cross Site Scripting 때문에 수정
//$urlencode = $_SERVER['REQUEST_URI'];
- $urlencode = urlencode($_SERVER[REQUEST_URI]);
+ $urlencode = urlencode($_SERVER['REQUEST_URI']);
}
//===================================
@@ -402,7 +402,7 @@ else
{
// 자동로그인 ---------------------------------------
// 회원아이디가 쿠키에 저장되어 있다면 (3.27)
- if ($tmp_mb_id = get_cookie("ck_mb_id"))
+ if ($tmp_mb_id = get_cookie('ck_mb_id'))
{
$tmp_mb_id = substr(preg_replace("/[^a-zA-Z0-9_]*/", "", $tmp_mb_id), 0, 20);
// 최고관리자는 자동로그인 금지
@@ -412,16 +412,16 @@ else
$row = sql_fetch($sql);
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $row['mb_password']);
// 쿠키에 저장된 키와 같다면
- $tmp_key = get_cookie("ck_auto");
+ $tmp_key = get_cookie('ck_auto');
if ($tmp_key == $key && $tmp_key)
{
// 차단, 탈퇴가 아니고 메일인증이 사용이면서 인증을 받았다면
- if ($row['mb_intercept_date'] == "" &&
- $row['mb_leave_date'] == "" &&
+ if ($row['mb_intercept_date'] == '' &&
+ $row['mb_leave_date'] == '' &&
(!$config['cf_use_email_certify'] || preg_match('/[1-9]/', $row['mb_email_certify'])) )
{
// 세션에 회원아이디를 저장하여 로그인으로 간주
- set_session("ss_mb_id", $tmp_mb_id);
+ set_session('ss_mb_id', $tmp_mb_id);
// 페이지를 재실행
echo "";
@@ -437,8 +437,8 @@ else
// 첫방문 쿠키
// 1년간 저장
-if (!get_cookie("ck_first_call")) set_cookie("ck_first_call", $g4[server_time], 86400 * 365);
-if (!get_cookie("ck_first_referer")) set_cookie("ck_first_referer", $_SERVER[HTTP_REFERER], 86400 * 365);
+if (!get_cookie('ck_first_call')) set_cookie('ck_first_call', $g4['server_time'], 86400 * 365);
+if (!get_cookie('ck_first_referer')) set_cookie('ck_first_referer', $_SERVER['HTTP_REFERER'], 86400 * 365);
// 회원이 아니라면 권한을 방문객 권한으로 함
if (!($member['mb_id']))
@@ -448,7 +448,7 @@ else
//$member['mb_level_title'] = $g4['member_level'][$member['mb_level']]; // 권한명
-$write_table = "";
+$write_table = '';
if (isset($bo_table)) {
$board = sql_fetch(" select * from {$g4['board_table']} where bo_table = '$bo_table' ");
if ($board['bo_table']) {
@@ -473,7 +473,7 @@ else
$is_admin = is_admin($member['mb_id']);
-if ($is_admin != "super") {
+if ($is_admin != 'super') {
// 접근가능 IP
$cf_possible_ip = trim($config['cf_possible_ip']);
if ($cf_possible_ip) {
@@ -514,17 +514,17 @@ if ($is_admin != "super") {
// 스킨경로
$board_skin_path = '';
if (isset($board['bo_skin']))
- $board_skin_path = "{$g4['path']}/skin/board/{$board['bo_skin']}"; // 게시판 스킨 경로
+ $board_skin_path = $g4['path'].'/skin/board/'.$board['bo_skin']; // 게시판 스킨 경로
// 방문자수의 접속을 남김
-include_once("{$g4['bbs_path']}/visit_insert.inc.php");
+include_once($g4['bbs_path'].'/visit_insert.inc.php');
// common.php 파일을 수정할 필요가 없도록 확장합니다.
-$tmp = dir("$g4[path]/extend");
+$tmp = dir($g4['path'].'/extend');
while ($entry = $tmp->read()) {
// php 파일만 include 함
if (preg_match("/(\.php)$/i", $entry))
- include_once("$g4[path]/extend/$entry");
+ include_once($g4['path'].'/extend/'.$entry);
}
?>
\ No newline at end of file
diff --git a/config.php b/config.php
index 3a6faa40e..f319b31b3 100644
--- a/config.php
+++ b/config.php
@@ -6,24 +6,24 @@ if (function_exists("date_default_timezone_set"))
date_default_timezone_set("Asia/Seoul");
// 디렉토리
-$g4['bbs'] = "bbs";
-$g4['bbs_path'] = $g4['path'] . "/" . $g4['bbs'];
-$g4['bbs_img'] = "img";
-$g4['bbs_img_path'] = $g4['path'] . "/" . $g4['bbs'] . "/" . $g4['bbs_img'];
+$g4['bbs'] = 'bbs';
+$g4['bbs_path'] = $g4['path'] . '/' . $g4['bbs'];
+$g4['bbs_img'] = 'img';
+$g4['bbs_img_path'] = $g4['path'] . '/' . $g4['bbs'] . '/' . $g4['bbs_img'];
-$g4['admin'] = "adm";
-$g4['admin_path'] = $g4['path'] . "/" . $g4['admin'];
+$g4['admin'] = 'adm';
+$g4['admin_path'] = $g4['path'] . '/' . $g4['admin'];
-$g4['editor'] = "cheditor";
-$g4['editor_path'] = $g4['path'] . "/" . $g4['editor'];
+$g4['editor'] = 'cheditor';
+$g4['editor_path'] = $g4['path'] . '/' . $g4['editor'];
-$g4['cheditor4'] = "cheditor4";
-$g4['cheditor4_path'] = $g4['path'] . "/" . $g4['cheditor4'];
+$g4['cheditor4'] = 'cheditor4';
+$g4['cheditor4_path'] = $g4['path'] . '/' . $g4['cheditor4'];
$g4['is_cheditor5'] = true;
-$g4['geditor'] = "geditor";
-$g4['geditor_path'] = $g4['path'] . "/" . $g4['geditor'];
+$g4['geditor'] = 'geditor';
+$g4['geditor_path'] = $g4['path'] . '/' . $g4['geditor'];
// 자주 사용하는 값
// 서버의 시간과 실제 사용하는 시간이 틀린 경우 수정하세요.
@@ -39,29 +39,29 @@ $g4['time_ymdhis'] = date("Y-m-d H:i:s", $g4['server_time']);
// 테이블 명
// (상수로 선언한것은 함수에서 global 선언을 하지 않아도 바로 사용할 수 있기 때문)
//
-$g4['table_prefix'] = "g4_"; // 테이블명 접두사
-$g4['write_prefix'] = $g4['table_prefix'] . "write_"; // 게시판 테이블명 접두사
+$g4['table_prefix'] = 'g4_'; // 테이블명 접두사
+$g4['write_prefix'] = $g4['table_prefix'] . 'write_'; // 게시판 테이블명 접두사
-$g4['auth_table'] = $g4['table_prefix'] . "auth"; // 관리권한 설정 테이블
-$g4['config_table'] = $g4['table_prefix'] . "config"; // 기본환경 설정 테이블
-$g4['group_table'] = $g4['table_prefix'] . "group"; // 게시판 그룹 테이블
-$g4['group_member_table'] = $g4['table_prefix'] . "group_member"; // 게시판 그룹+회원 테이블
-$g4['board_table'] = $g4['table_prefix'] . "board"; // 게시판 설정 테이블
-$g4['board_file_table'] = $g4['table_prefix'] . "board_file"; // 게시판 첨부파일 테이블
-$g4['board_good_table'] = $g4['table_prefix'] . "board_good"; // 게시물 추천,비추천 테이블
-$g4['board_new_table'] = $g4['table_prefix'] . "board_new"; // 게시판 새글 테이블
-$g4['login_table'] = $g4['table_prefix'] . "login"; // 로그인 테이블 (접속자수)
-$g4['mail_table'] = $g4['table_prefix'] . "mail"; // 회원메일 테이블
-$g4['member_table'] = $g4['table_prefix'] . "member"; // 회원 테이블
-$g4['memo_table'] = $g4['table_prefix'] . "memo"; // 메모 테이블
-$g4['poll_table'] = $g4['table_prefix'] . "poll"; // 투표 테이블
-$g4['poll_etc_table'] = $g4['table_prefix'] . "poll_etc"; // 투표 기타의견 테이블
-$g4['point_table'] = $g4['table_prefix'] . "point"; // 포인트 테이블
-$g4['popular_table'] = $g4['table_prefix'] . "popular"; // 인기검색어 테이블
-$g4['scrap_table'] = $g4['table_prefix'] . "scrap"; // 게시글 스크랩 테이블
-$g4['visit_table'] = $g4['table_prefix'] . "visit"; // 방문자 테이블
-$g4['visit_sum_table'] = $g4['table_prefix'] . "visit_sum"; // 방문자 합계 테이블
-$g4['token_table'] = $g4['table_prefix'] . "token"; // 토큰 테이블
+$g4['auth_table'] = $g4['table_prefix'] . 'auth'; // 관리권한 설정 테이블
+$g4['config_table'] = $g4['table_prefix'] . 'config'; // 기본환경 설정 테이블
+$g4['group_table'] = $g4['table_prefix'] . 'group'; // 게시판 그룹 테이블
+$g4['group_member_table'] = $g4['table_prefix'] . 'group_member'; // 게시판 그룹+회원 테이블
+$g4['board_table'] = $g4['table_prefix'] . 'board'; // 게시판 설정 테이블
+$g4['board_file_table'] = $g4['table_prefix'] . 'board_file'; // 게시판 첨부파일 테이블
+$g4['board_good_table'] = $g4['table_prefix'] . 'board_good'; // 게시물 추천,비추천 테이블
+$g4['board_new_table'] = $g4['table_prefix'] . 'board_new'; // 게시판 새글 테이블
+$g4['login_table'] = $g4['table_prefix'] . 'login'; // 로그인 테이블 (접속자수)
+$g4['mail_table'] = $g4['table_prefix'] . 'mail'; // 회원메일 테이블
+$g4['member_table'] = $g4['table_prefix'] . 'member'; // 회원 테이블
+$g4['memo_table'] = $g4['table_prefix'] . 'memo'; // 메모 테이블
+$g4['poll_table'] = $g4['table_prefix'] . 'poll'; // 투표 테이블
+$g4['poll_etc_table'] = $g4['table_prefix'] . 'poll_etc'; // 투표 기타의견 테이블
+$g4['point_table'] = $g4['table_prefix'] . 'point'; // 포인트 테이블
+$g4['popular_table'] = $g4['table_prefix'] . 'popular'; // 인기검색어 테이블
+$g4['scrap_table'] = $g4['table_prefix'] . 'scrap'; // 게시글 스크랩 테이블
+$g4['visit_table'] = $g4['table_prefix'] . 'visit'; // 방문자 테이블
+$g4['visit_sum_table'] = $g4['table_prefix'] . 'visit_sum'; // 방문자 합계 테이블
+$g4['token_table'] = $g4['table_prefix'] . 'token'; // 토큰 테이블
//
// 기타
@@ -69,25 +69,25 @@ $g4['token_table'] = $g4['table_prefix'] . "token"; // 토큰
// www.sir.co.kr 과 sir.co.kr 도메인은 서로 다른 도메인으로 인식합니다. 쿠키를 공유하려면 .sir.co.kr 과 같이 입력하세요.
// 이곳에 입력이 없다면 www 붙은 도메인과 그렇지 않은 도메인은 쿠키를 공유하지 않으므로 로그인이 풀릴 수 있습니다.
-$g4['cookie_domain'] = "";
+$g4['cookie_domain'] = '';
// 게시판에서 링크의 기본갯수를 말합니다.
// 필드를 추가하면 이 숫자를 필드수에 맞게 늘려주십시오.
$g4['link_count'] = 2;
-$g4['charset'] = "utf-8";
+$g4['charset'] = 'utf-8';
-$g4['phpmyadmin_dir'] = $g4['admin'] . "/phpMyAdmin/";
+$g4['phpmyadmin_dir'] = $g4['admin'] . '/phpMyAdmin/';
$g4['token_time'] = 3; // 토큰 유효시간
// config.php 가 있는곳의 웹경로. 뒤에 / 를 붙이지 마세요.
// 예) http://g4.sir.co.kr
-$g4['url'] = "";
-$g4['https_url'] = "";
+$g4['url'] = '';
+$g4['https_url'] = '';
// 입력예
//$g4['url'] = "http://www.sir.co.kr";
//$g4['https_url'] = "https://www.sir.co.kr";
-$g4['dbconfig'] = "data/dbconfig.php";
+$g4['dbconfig'] = 'data/dbconfig.php';
?>
diff --git a/head.php b/head.php
index 7175917ed..938a3f777 100644
--- a/head.php
+++ b/head.php
@@ -1,12 +1,12 @@
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
-include_once("$g4[path]/head.sub.php");
-include_once("$g4[path]/lib/outlogin.lib.php");
-include_once("$g4[path]/lib/poll.lib.php");
-include_once("$g4[path]/lib/visit.lib.php");
-include_once("$g4[path]/lib/connect.lib.php");
-include_once("$g4[path]/lib/popular.lib.php");
+include_once($g4['path'].'/head.sub.php');
+include_once($g4['path'].'/lib/outlogin.lib.php');
+include_once($g4['path'].'/lib/poll.lib.php');
+include_once($g4['path'].'/lib/visit.lib.php');
+include_once($g4['path'].'/lib/connect.lib.php');
+include_once($g4['path'].'/lib/popular.lib.php');
//print_r2(get_defined_constants());
@@ -141,15 +141,15 @@ function fsearchbox_submit(f)
|
- =outlogin("basic"); // 외부 로그인 ?>
+ =outlogin('basic'); // 외부 로그인 ?>
- =poll("basic"); // 설문조사 ?>
+ =poll('basic'); // 설문조사 ?>
- =visit("basic"); // 방문자수 ?>
+ =visit('basic'); // 방문자수 ?>
diff --git a/head.sub.php b/head.sub.php
index d8e381313..55ca13e7d 100644
--- a/head.sub.php
+++ b/head.sub.php
@@ -9,10 +9,10 @@ if (!$g4['title'])
// 쪽지를 받았나?
if ($member['mb_memo_call']) {
- $mb = get_member($member[mb_memo_call], "mb_nick");
- sql_query(" update {$g4[member_table]} set mb_memo_call = '' where mb_id = '$member[mb_id]' ");
+ $mb = get_member($member['mb_memo_call'], "mb_nick");
+ sql_query(" update {$g4['member_table']} set mb_memo_call = '' where mb_id = '{$member['mb_id']}' ");
- alert($mb[mb_nick]."님으로부터 쪽지가 전달되었습니다.", $_SERVER[REQUEST_URI]);
+ alert($mb['mb_nick'].'님으로부터 쪽지가 전달되었습니다.', $_SERVER['REQUEST_URI']);
}
@@ -25,7 +25,7 @@ if (!$lo_location)
$lo_location = $_SERVER['REQUEST_URI'];
//$lo_url = $g4[url] . $_SERVER['REQUEST_URI'];
$lo_url = $_SERVER['REQUEST_URI'];
-if (strstr($lo_url, "/$g4[admin]/") || $is_admin == "super") $lo_url = "";
+if (strstr($lo_url, "/$g4[admin]/") || $is_admin == 'super') $lo_url = '';
// 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면
// 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음
diff --git a/index.php b/index.php
index ad68d3695..96b4518fb 100644
--- a/index.php
+++ b/index.php
@@ -1,9 +1,9 @@
-include_once("./_common.php");
-include_once("$g4[path]/lib/latest.lib.php");
+include_once('./_common.php');
+include_once($g4['path'].'/lib/latest.lib.php');
-$g4['title'] = "";
-include_once("./_head.php");
+$g4['title'] = '';
+include_once('./_head.php');
?>
강좌홈페이지 작업 중입니다.
@@ -12,5 +12,5 @@ chicpro 님도 참가합니다.
반갑습니다.
-include_once("./_tail.php");
+include_once('./_tail.php');
?>
diff --git a/install/index.php b/install/index.php
index 72c92fa20..097485fbd 100644
--- a/install/index.php
+++ b/install/index.php
@@ -1,10 +1,10 @@
-include_once ("../config.php");
-include_once ("./install.inc.php");
+include_once ('../config.php');
+include_once ('./install.inc.php');
?>
-
+
그누보드4 설치 (1/3) - 라이센스(License)
|