diff --git a/g4s/.gitignore b/g4s/.gitignore
new file mode 100644
index 000000000..132ef02f0
--- /dev/null
+++ b/g4s/.gitignore
@@ -0,0 +1,11 @@
+.htaccess
+data
+config.php
+test
+sirgle
+sr_*
+google*
+skin/latest/basic2
+Rankiss*
+thumb.lib.php
+test.php
diff --git a/g4s/LICENSE.txt b/g4s/LICENSE.txt
new file mode 100644
index 000000000..9aba762af
--- /dev/null
+++ b/g4s/LICENSE.txt
@@ -0,0 +1,208 @@
+소프트웨어 제품은 저작권법 및 국제저작권 협약을 비롯하여, 기타 지적재산권법 및 협약의 보호를 받습니다.
+
+프로그램 명칭 : 그누보드4S (GNUBoard 4 Second Edition)
+
+저작자 : (주)에스아이알소프트 http://sir.co.kr
+
+라이센스 (License)
+
+번역문 아래에 원문이 있습니다.
+
+주의 )
+1. 번역문과 원문의 내용상 차이가 있는 경우 원문의 내용을 우선으로 따릅니다.
+2. 법적인 분쟁이 발생한 경우 저작자의 회사 소재지를 관할하는 관할법원에서 분쟁을 해결합니다.
+3. 이 라이센스 파일 및 내용은 저작자를 제외한 어느 누구도 추가, 수정, 삭제할 수 없습니다.
+
+----- GPL 번역문 --------------------------------------------------------
+
+GNU 일반 공중 사용 허가서
+2판, 1991년 6월
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+누구든지 본 사용 허가서를 있는 그대로 복제하고 배포할 수
+있습니다. 그러나 본문에 대한 수정은 허용되지 않습니다.
+
+
+
+
+전 문
+소프트웨어에 적용되는 대부분의 사용 허가서(license)들은 소프트웨어에 대한 수정과 공유의 자유를 제한하려는 것을 그 목적으로 합니다. 그러나 GNU 일반 공중 사용 허가서(이하, ``GPL''이라고 칭합니다.)는 자유 소프트웨어에 대한 수정과 공유의 자유를 모든 사용자들에게 보장하기 위해서 성립된 것입니다. 자유 소프트웨어 재단이 제공하는 대부분의 소프트웨어들은 GPL에 의해서 관리되고 있으며, 몇몇 소프트웨어에는 별도의 사용 허가서인 GNU 라이브러리 일반 공중 사용 허가서(GNU Library General Public License)를 대신 적용하기도 합니다. 자유 소프트웨어란, 이를 사용하려고 하는 모든 사람에 대해서 동일한 자유와 권리가 함께 양도되는 소프트웨어를 말하며 프로그램 저작자의 의지에 따라 어떠한 종류의 프로그램에도 GPL을 적용할 수 있습니다. 따라서 여러분이 만든 프로그램에도 GPL을 적용할 수 있습니다.
+
+자유 소프트웨어를 언급할 때 사용되는 ``자유''라는 단어는 무료(無料)를 의미하는 금전적인 측면의 자유가 아니라 구속되지 않는다는 관점에서의 자유를 의미하며, GPL은 자유 소프트웨어를 이용한 복제와 개작, 배포와 수익 사업 등의 가능한 모든 형태의 자유를 실질적으로 보장하고 있습니다. 여기에는 원시 코드(source code)의 전부 또는 일부를 원용해서 개선된 프로그램을 만들거나 새로운 프로그램을 창작할 수 있는 자유가 포함되며, 자신에게 양도된 이러한 자유와 권리를 보다 명확하게 인식할 수 있도록 하기 위한 규정도 포함되어 있습니다.
+
+GPL은 GPL 안에 소프트웨어를 양도받을 사용자의 권리를 제한하는 조항과 단서를 별항으로 추가시키지 못하게 함으로써 사용자들의 자유와 권리를 실제적으로 보장하고 있습니다. 자유 소프트웨어의 개작과 배포에 관계하고 있는 사람들은 이러한 무조건적인 권리 양도 규정을 준수해야만 합니다.
+
+예를 들어 GPL 프로그램을 배포할 경우에는 프로그램의 유료 판매나 무료 배포에 관계없이 자신이 해당 프로그램에 대해서 가질 수 있었던 모든 권리를, 프로그램을 받게될 사람에게 그대로 양도해 주어야 합니다. 이 경우, 프로그램의 원시 코드를 함께 제공하거나 원시 코드를 구할 수 있는 방법을 확실히 알려주어야 하고 이러한 모든 사항들을 사용자들이 분명히 알 수 있도록 명시해야 합니다.
+
+자유 소프트웨어 재단은 다음과 같은 두 가지 단계를 통해서 사용자들을 권리를 보호합니다. (1) 소프트웨어에 저작권을 설정합니다. (2) 저작권의 양도에 관한 실정법에 의해서 유효한 법률적 효력을 갖는 GPL을 통해 소프트웨어를 복제하거나 개작 및 배포할 수 있는 권리를 사용자들에게 부여합니다.
+
+자유 소프트웨어를 사용하는 사람들은 반복적인 재배포 과정을 통해 소프트웨어 자체에 수정과 변형이 일어날 수도 있으며, 이는 최초의 저작자가 만든 소프트웨어가 갖고 있는 문제가 아닐 수 있다는 개연성을 인식하고 있어야 합니다. 우리는 개작과 재배포 과정에서 다른 사람에 의해 발생된 문제로 인해 프로그램 원저작자들의 신망이 훼손되는 것을 원하지 않습니다. GPL에 자유 소프트웨어에 대한 어떠한 형태의 보증도 규정하지 않는 이유는 이러한 점들이 고려되었기 때문이며, 이는 프로그램 원저작자와 자유 소프트웨어 재단의 자유로운 활동을 보장하는 현실적인 수단이기도 합니다.
+
+특허 제도는 자유 소프트웨어의 발전을 위협하는 요소일 수밖에 없습니다. 자유 프로그램을 재배포하는 사람들이 개별적으로 특허를 취득하게 되면, 결과적으로 그 프로그램이 독점 소프트웨어가 될 가능성이 있습니다. 자유 소프트웨어 재단은 이러한 문제에 대처하기 위해서 어떠한 특허에 대해서도 그 사용 권리를 모든 사람들(이하, ``공중(公衆)''이라고 칭합니다.)에게 자유롭게 허용하는 경우에 한해서만 자유 소프트웨어와 함께 사용할 수 있다는 것을 명확히 밝히고 있습니다.
+
+복제(copying)와 개작(modification) 및 배포(distribution)에 관련된 구체적인 조건과 규정은 다음과 같습니다.
+
+
+복제와 개작 및 배포에 관한 조건과 규정
+
+제 0 조. 본 허가서는 GNU 일반 공중 사용 허가서의 규정에 따라 배포될 수 있다는 사항이 저작권자에 의해서 명시된 모든 컴퓨터 프로그램 저작물에 대해서 동일하게 적용됩니다. 컴퓨터 프로그램 저작물(이하, ``프로그램''이라고 칭합니다.)이란 특정한 결과를 얻기 위해서 컴퓨터 등의 정보 처리 능력을 가진 장치(이하, ``컴퓨터''라고 칭합니다.) 내에서 직접 또는 간접으로 사용되는 일련의 지시 및 명령으로 표현된 창작물을 의미하고, ``2차적 프로그램''이란 전술한 프로그램 자신 또는 저작권법의 규정에 따라 프로그램의 전부 또는 상당 부분을 원용하거나 다른 언어로의 번역을 포함할 수 있는 개작 과정을 통해서 창작된 새로운 프로그램과 이와 관련된 저작물을 의미합니다. (이후로 다른 언어로의 번역은 별다른 제한없이 개작의 범위에 포함되는 것으로 간주합니다.) ``피양도자''란 GPL의 규정에 따라 프로그램을 양도받은 사람을 의미하고, ``원(原)프로그램''이란 프로그램을 개작하거나 2차적 프로그램을 만들기 위해서 사용된 최초의 프로그램을 의미합니다.
+
+본 허가서는 프로그램에 대한 복제와 개작 그리고 배포 행위에 대해서만 적용됩니다. 따라서 프로그램을 실행시키는 행위에 대한 제한은 없습니다. 프로그램의 결과물(output)에는, 그것이 프로그램을 실행시켜서 생성된 것인지 아닌지의 여부에 상관없이 결과물의 내용이 원프로그램으로부터 파생된 2차적 프로그램을 구성했을 때에 한해서 본 허가서의 규정들이 적용됩니다. 2차적 프로그램의 구성 여부는 2차적 프로그램 안에서의 원프로그램의 역할을 토대로 판단합니다.
+
+제 1 조. 적절한 저작권 표시와 프로그램에 대한 보증이 제공되지 않는다는 사실을 각각의 복제물에 명시하는 한, 피양도자는 프로그램의 원시 코드를 자신이 양도받은 상태 그대로 어떠한 매체를 통해서도 복제하고 배포할 수 있습니다. 복제와 배포가 이루어 질 때는 본 허가서와 프로그램에 대한 보증이 제공되지 않는다는 사실에 대해서 언급되었던 모든 내용을 그대로 유지시켜야 하며, 영문판 GPL을 함께 제공해야 합니다.
+
+배포자는 복제물을 물리적으로 인도하는데 소요된 비용을 청구할 수 있으며, 선택 사항으로 독자적인 유료 보증을 설정할 수 있습니다.
+
+제 2 조. 피양도자는 자신이 양도받은 프로그램의 전부나 일부를 개작할 수 있으며, 이를 통해서 2차적 프로그램을 창작할 수 있습니다. 개작된 프로그램이나 창작된 2차적 프로그램은 다음의 사항들을 모두 만족시키는 조건에 한해서, 제1조의 규정에 따라 또다시 복제되고 배포될 수 있습니다.
+
+제 1 항. 파일을 개작할 때는 파일을 개작한 사실과 그 날짜를 파일 안에 명시해야 합니다.
+
+제 2 항. 배포하거나 공표하려는 저작물의 전부 또는 일부가 양도받은 프로그램으로부터 파생된 것이라면, 저작물 전체에 대한 사용 권리를 본 허가서의 규정에 따라 공중에게 무상으로 허용해야 합니다.
+
+제 3 항. 개작된 프로그램의 일반적인 실행 형태가 대화형 구조로 명령어를 읽어 들이는 방식을 취하고 있을 경우에는, 적절한 저작권 표시와 프로그램에 대한 보증이 제공되지 않는다는 사실, (별도의 보증을 설정한 경우라면 해당 내용) 그리고 양도받은 프로그램을 본 규정에 따라 재배포할 수 있다는 사실과 GPL 사본을 참고할 수 있는 방법이 함께 포함된 문구가 프로그램이 대화형 구조로 평이하게 실행된 직후에 화면 또는 지면으로 출력되도록 작성되어야 합니다. (예외 규정: 양도받은 프로그램이 대화형 구조를 갖추고 있다 하더라도 통상적인 실행 환경에서 전술한 사항들이 출력되지 않는 형태였을 경우에는 이를 개작한 프로그램 또한 관련 사항들을 출력시키지 않아도 무방합니다.)
+
+위의 조항들은 개작된 프로그램 전체에 적용됩니다. 만약, 개작된 프로그램에 포함된 특정 부분이 원프로그램으로부터 파생된 것이 아닌 별도의 독립 저작물로 인정될 만한 상당한 이유가 있을 경우에는 해당 저작물의 개별적인 배포에는 본 허가서의 규정들이 적용되지 않습니다. 그러나 이러한 저작물이 2차적 프로그램의 일부로서 함께 배포된다면 개별적인 저작권과 배포 기준에 상관없이 저작물 모두에 본 허가서가 적용되어야 하며, 전체 저작물에 대한 사용 권리는 공중에게 무상으로 양도됩니다.
+
+이러한 규정은 개별적인 저작물에 대한 저작자의 권리를 침해하거나 인정하지 않으려는 것이 아니라, 원프로그램으로부터 파생된 2차적 프로그램이나 수집 저작물의 배포를 일관적으로 규제할 수 있는 권리를 행사하기 위한 것입니다.
+
+원프로그램이나 원프로그램으로부터 파생된 2차적 프로그램을 이들로부터 파생되지 않은 다른 저작물과 함께 단순히 저장하거나 배포할 목적으로 동일한 매체에 모아 놓은 집합물의 경우에는, 원프로그램으로부터 파생되지 않은 다른 저작물에는 본 허가서의 규정들이 적용되지 않습니다.
+
+제 3 조. 피양도자는 다음 중 하나의 항목을 만족시키는 조건에 한해서 제1조와 제2조의 규정에 따라 프로그램(또는 제2조에서 언급된 2차적 프로그램)을 목적 코드(object code)나 실행물(executable form)의 형태로 복제하고 배포할 수 있습니다.
+
+제 1 항. 목적 코드나 실행물에 상응하는 컴퓨터가 인식할 수 있는 완전한 원시 코드를 함께 제공해야 합니다. 원시 코드는 제1조와 제2조의 규정에 따라 배포될 수 있어야 하며, 소프트웨어의 교환을 위해서 일반적으로 사용되는 매체를 통해 제공되어야 합니다.
+
+제 2 항. 배포에 필요한 최소한의 비용만을 받고 목적 코드나 실행물에 상응하는 완전한 원시 코드를 배포하겠다는, 최소한 3년간 유효한 약정서를 함께 제공해야 합니다. 이 약정서는 약정서를 갖고 있는 어떠한 사람에 대해서도 유효해야 합니다. 원시 코드는 컴퓨터가 인식할 수 있는 형태여야 하고 제1조와 제2조의 규정에 따라 배포될 수 있어야 하며, 소프트웨어의 교환을 위해서 일반적으로 사용되는 매체를 통해 제공되어야 합니다.
+
+제 3 항. 목적 코드나 실행물에 상응하는 원시 코드를 배포하겠다는 약정에 대해서 자신이 양도받은 정보를 함께 제공해야 합니다. (제3항은 위의 제2항에 따라 원시 코드를 배포하겠다는 약정을 프로그램의 목적 코드나 실행물과 함께 제공 받았고, 동시에 비상업적인 배포를 하고자 할 경우에 한해서만 허용됩니다.)
+
+저작물에 대한 원시 코드란 해당 저작물을 개작하기에 적절한 형식을 의미합니다. 실행물에 대한 완전한 원시 코드란 실행물에 포함된 모든 모듈들의 원시 코드와 이와 관련된 인터페이스 정의 파일 모두, 그리고 실행물의 컴파일과 설치를 제어하는데 사용된 스크립트 전부를 의미합니다. 그러나 특별한 예외의 하나로서, 실행물이 실행될 운영체제의 주요 부분(컴파일러나 커널 등)과 함께 (원시 코드나 바이너리의 형태로) 일반적으로 배포되는 구성 요소들은 이러한 구성 요소 자체가 실행물에 수반되지 않는 한 원시 코드의 배포 대상에서 제외되어도 무방합니다.
+
+목적 코드나 실행물을 지정한 장소로부터 복제해 갈 수 있게 하는 방식으로 배포할 경우, 동일한 장소로부터 원시 코드를 복제할 수 있는 동등한 접근 방법을 제공한다면 이는 원시 코드를 목적 코드와 함께 복제되도록 설정하지 않았다고 하더라도 원시 코드를 배포하는 것으로 간주됩니다.
+
+제 4 조. 본 허가서에 의해 명시적으로 이루어 지지 않는 한 프로그램에 대한 복제와 개작 및 하위 허가권 설정과 배포가 성립될 수 없습니다. 이와 관련된 어떠한 행위도 무효이며 본 허가서가 보장한 권리는 자동으로 소멸됩니다. 그러나 본 허가서의 규정에 따라 프로그램의 복제물이나 권리를 양도받았던 제3자는 본 허가서의 규정들을 준수하는 한, 배포자의 권리 소멸에 관계없이 사용상의 권리를 계속해서 유지할 수 있습니다.
+
+제 5 조. 본 허가서는 서명이나 날인이 수반되는 형식을 갖고 있지 않기 때문에 피양도자가 본 허가서의 내용을 반드시 받아들여야 할 필요는 없습니다. 그러나 프로그램이나 프로그램에 기반한 2차적 프로그램에 대한 개작 및 배포를 허용하는 것은 본 허가서에 의해서만 가능합니다. 만약 본 허가서에 동의하지 않을 경우에는 이러한 행위들이 법률적으로 금지됩니다. 따라서 프로그램(또는 프로그램에 기반한 2차적 프로그램)을 개작하거나 배포하는 행위는 이에 따른 본 허가서의 내용에 동의한다는 것을 의미하며, 복제와 개작 및 배포에 관한 본 허가서의 조건과 규정들을 모두 받아들이겠다는 의미로 간주됩니다.
+
+제 6 조. 피양도자에 의해서 프로그램(또는 프로그램에 기반한 2차적 프로그램)이 반복적으로 재배포될 경우, 각 단계에서의 피양도자는 본 허가서의 규정에 따른 프로그램의 복제와 개작 및 배포에 대한 권리를 최초의 양도자로부터 양도받은 것으로 자동적으로 간주됩니다. 프로그램(또는 프로그램에 기반한 2차적 프로그램)을 배포할 때는 피양도자의 권리의 행사를 제한할 수 있는 어떠한 사항도 추가할 수 없습니다. 그러나 피양도자에게, 재배포가 일어날 시점에서의 제3의 피양도자에게 본 허가서를 준수하도록 강제할 책임은 부과되지 않습니다.
+
+제 7 조. 법원의 판결이나 특허권 침해에 대한 주장 또는 특허 문제에 국한되지 않은 그밖의 이유들로 인해서 본 허가서의 규정에 배치되는 사항이 발생한다 하더라도 그러한 사항이 선행하거나 본 허가서의 조건과 규정들이 면제되는 것은 아닙니다. 따라서 법원의 명령이나 합의 등에 의해서 본 허가서에 위배되는 사항들이 발생한 상황이라도 양측 모두를 만족시킬 수 없다면 프로그램은 배포될 수 없습니다. 예를 들면, 특정한 특허 관련 허가가 프로그램의 복제물을 직접 또는 간접적인 방법으로 양도받은 임의의 제3자에게 해당 프로그램을 무상으로 재배포할 수 있게 허용하지 않는다면, 그러한 허가와 본 사용 허가를 동시에 만족시키면서 프로그램을 배포할 수 있는 방법은 없습니다.
+
+본 조항은 특정한 상황에서 본 조항의 일부가 유효하지 않거나 적용될 수 없을 경우에도 본 조항의 나머지 부분들을 적용하기 위한 의도로 만들어 졌습니다. 따라서 그 이외의 상황에서는 본 조항을 전체적으로 적용하면 됩니다.
+
+본 조항의 목적은 특허나 저작권 침해 등의 행위를 조장하거나 해당 권리를 인정하지 않으려는 것이 아니라, GPL을 통해서 구현되어 있는 자유 소프트웨어의 배포 체계를 통합적으로 보호하기 위한 것입니다. 많은 사람들이 배포 체계에 대한 신뢰있는 지원을 계속해 줌으로써 소프트웨어의 다양한 분야에 많은 공헌을 해 주었습니다. 소프트웨어를 어떠한 배포 체계로 배포할 것인가를 결정하는 것은 전적으로 저작자와 기증자들의 의지에 달려있는 것이지, 일반 사용자들이 강요할 수 있는 문제는 아닙니다.
+
+본 조항은 본 허가서의 다른 조항들에서 무엇이 중요하게 고려되어야 하는 지를 명확하게 설명하기 위한 목적으로 만들어진 것입니다.
+
+제 8 조. 특허나 저작권이 설정된 인터페이스로 인해서 특정 국가에서 프로그램의 배포와 사용이 함께 또는 개별적으로 제한되어 있는 경우, 본 사용 허가서를 프로그램에 적용한 최초의 저작권자는 문제가 발생하지 않는 국가에 한해서 프로그램을 배포한다는 배포상의 지역적 제한 조건을 명시적으로 설정할 수 있으며, 이러한 사항은 본 허가서의 일부로 간주됩니다.
+
+제 9 조. 자유 소프트웨어 재단은 때때로 본 사용 허가서의 개정판이나 신판을 공표할 수 있습니다. 새롭게 공표될 판은 당면한 문제나 현안을 처리하기 위해서 세부적인 내용에 차이가 발생할 수 있지만, 그 근본 정신에는 변함이 없을 것입니다.
+
+각각의 판들은 판번호를 사용해서 구별됩니다. 특정한 판번호와 그 이후 판을 따른다는 사항이 명시된 프로그램에는 해당 판이나 그 이후에 발행된 어떠한 판을 선택해서 적용해도 무방하고, 판번호를 명시하고 있지 않은 경우에는 자유 소프트웨어 재단이 공표한 어떠한 판번호의 판을 적용해도 무방합니다.
+
+제 10 조. 프로그램의 일부를 본 허가서와 배포 기준이 다른 자유 프로그램과 함께 결합하고자 할 경우에는 해당 프로그램의 저작자로부터 서면 승인을 받아야 합니다. 자유 소프트웨어 재단이 저작권을 갖고 있는 소프트웨어의 경우에는 자유 소프트웨어 재단의 승인을 얻어야 합니다. 우리는 이러한 요청을 수락하기 위해서 때때로 예외 기준을 만들기도 합니다. 자유 소프트웨어 재단은 일반적으로 자유 소프트웨어의 2차적 저작물들을 모두 자유로운 상태로 유지시키려는 목적과 소프트웨어의 공유와 재활용을 증진시키려는 두가지 목적을 기준으로 승인 여부를 결정할 것입니다.
+
+보증의 결여 (제11조, 제12조)
+
+제 11 조. 본 허가서를 따르는 프로그램은 무상으로 양도되기 때문에 관련 법률이 허용하는 한도 내에서 어떠한 형태의 보증도 제공되지 않습니다. 프로그램의 저작권자와 배포자가 공동 또는 개별적으로 별도의 보증을 서면으로 제공할 때를 제외하면, 특정한 목적에 대한 프로그램의 적합성이나 상업성 여부에 대한 보증을 포함한 어떠한 형태의 보증도 명시적이나 묵시적으로 설정되지 않은 ``있는 그대로의'' 상태로 이 프로그램을 배포합니다. 프로그램과 프로그램의 실행에 따라 발생할 수 있는 모든 위험은 피양도자에게 인수되며 이에 따른 보수 및 복구를 위한 제반 경비 또한 피양도자가 모두 부담해야 합니다.
+
+제 12 조. 저작권자나 배포자가 프로그램의 손상 가능성을 사전에 알고 있었다 하더라도 발생된 손실이 관련 법규에 의해 보호되고 있거나 이에 대한 별도의 서면 보증이 설정된 경우가 아니라면, 저작권자나 프로그램을 원래의 상태 또는 개작한 상태로 제공한 배포자는 프로그램의 사용이나 비작동으로 인해 발생된 손실이나 프로그램 자체의 손실에 대해 책임지지 않습니다. 이러한 면책 조건은 사용자나 제3자가 프로그램을 조작함으로써 발생된 손실이나 다른 소프트웨어와 프로그램을 함께 동작시키는 것으로 인해서 발생된 데이터의 상실 및 부정확한 산출 결과에만 국한되는 것이 아닙니다. 발생된 손실의 일반성이나 특수성 뿐 아니라 원인의 우발성 및 필연성도 전혀 고려되지 않습니다.
+
+복제와 개작 및 배포에 관한 조건과 규정의 끝.
+
+
+
+----- GPL 원문 --------------------------------------------------------
+
+GNU GENERAL PUBLIC LICENSE
+Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+Preamble
+The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+
+
+a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+
+b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+
+c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+
+3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+
+a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+
+c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+
+If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+
+5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+
+9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+
+END OF TERMS AND CONDITIONS
+
+----- 끝 --------------------------------------------------------
diff --git a/g4s/README.md b/g4s/README.md
new file mode 100644
index 000000000..b12d99bd8
--- /dev/null
+++ b/g4s/README.md
@@ -0,0 +1,4 @@
+g4s
+===
+
+gnuboard 4 standard
\ No newline at end of file
diff --git a/g4s/_common.php b/g4s/_common.php
new file mode 100644
index 000000000..2ed94c3fb
--- /dev/null
+++ b/g4s/_common.php
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/g4s/_head.php b/g4s/_head.php
new file mode 100644
index 000000000..d67f96ad2
--- /dev/null
+++ b/g4s/_head.php
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/g4s/_tail.php b/g4s/_tail.php
new file mode 100644
index 000000000..89b2c1c70
--- /dev/null
+++ b/g4s/_tail.php
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/g4s/adm/_common.php b/g4s/adm/_common.php
new file mode 100644
index 000000000..10d75360f
--- /dev/null
+++ b/g4s/adm/_common.php
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/g4s/adm/admin.head.php b/g4s/adm/admin.head.php
new file mode 100644
index 000000000..4ecd231d3
--- /dev/null
+++ b/g4s/adm/admin.head.php
@@ -0,0 +1,157 @@
+";
+ for($i=1; $i'.$menu[$key][$i][1].'';
+
+ $auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
+ }
+ $str .= "";
+
+ return $str;
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 관리자 주메뉴
+
+ ";
+ foreach($amenu as $key=>$value) {
+ $href1 = $href2 = '';
+ if ($menu['menu'.$key][0][2]) {
+ $href1 = '';
+ $href2 = ' ';
+ } else {
+ continue;
+ }
+ $current_class = "";
+ if (isset($sub_menu) && (substr($sub_menu, 0, 2) == substr($menu['menu'.$key][0][0], 0, 2)))
+ $current_class = " gnb_1depth_air";
+ $gnb_str .= "";
+ $gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
+ $gnb_str .= print_menu1('menu'.$key, 1);
+ $gnb_str .= " ";
+ if ($current_class) $current_class = ""; // 클래스 반복부여 방지
+ }
+ $gnb_str .= "";
+ echo $gnb_str;
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ 작게
+ 기본
+ 크게
+
+
diff --git a/g4s/adm/admin.js b/g4s/adm/admin.js
new file mode 100644
index 000000000..e5c2a3e04
--- /dev/null
+++ b/g4s/adm/admin.js
@@ -0,0 +1,66 @@
+function check_all(f)
+{
+ var chk = document.getElementsByName("chk[]");
+
+ for (i=0; i
\n";
+ for ($i=0; $i선택";
+ $str .= option_selected($skins[$i], $selected);
+ }
+ $str .= "";
+ return $str;
+}
+
+// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
+function get_mobile_skin_select($skin_gubun, $id, $name, $selected='', $event='')
+{
+ $skins = get_skin_dir($skin_gubun, G4_MOBILE_PATH.'/'.G4_SKIN_DIR);
+ $str = "\n";
+ for ($i=0; $i선택";
+ $str .= option_selected($skins[$i], $selected);
+ }
+ $str .= " ";
+ return $str;
+}
+
+
+// 스킨경로를 얻는다
+function get_skin_dir($skin, $skin_path=G4_SKIN_PATH)
+{
+ global $g4;
+
+ $result_array = array();
+
+ $dirname = $skin_path.'/'.$skin.'/';
+ $handle = opendir($dirname);
+ while ($file = readdir($handle)) {
+ if($file == '.'||$file == '..') continue;
+
+ if (is_dir($dirname.$file)) $result_array[] = $file;
+ }
+ closedir($handle);
+ sort($result_array);
+
+ return $result_array;
+}
+
+
+// 회원 삭제
+function member_delete($mb_id)
+{
+ global $config;
+ global $g4;
+
+ $sql = " select mb_name, mb_nick, mb_ip, mb_recommend, mb_memo, mb_level from {$g4['member_table']} where mb_id= '".$mb_id."' ";
+ $mb = sql_fetch($sql);
+ if ($mb['mb_recommend']) {
+ $row = sql_fetch(" select count(*) as cnt from {$g4['member_table']} where mb_id = '".addslashes($mb['mb_recommend'])."' ");
+ if ($row['cnt'])
+ insert_point($mb['mb_recommend'], $config['cf_recommend_point'] * (-1), $mb_id.'님의 회원자료 삭제로 인한 추천인 포인트 반환', "@member", $mb['mb_recommend'], $mb_id.' 추천인 삭제');
+ }
+
+ // 회원자료는 정보만 없앤 후 아이디는 보관하여 다른 사람이 사용하지 못하도록 함 : 061025
+ $sql = " update {$g4['member_table']} set mb_jumin = '', mb_password = '', mb_level = 1, mb_email = '', mb_homepage = '', mb_password_q = '', mb_password_a = '', mb_tel = '', mb_hp = '', mb_zip1 = '', mb_zip2 = '', mb_addr1 = '', mb_addr2 = '', mb_birth = '', mb_sex = '', mb_signature = '', mb_memo = '".date('Ymd', G4_SERVER_TIME)." 삭제함\n{$mb['mb_memo']}', mb_leave_date = '".date('Ymd', G4_SERVER_TIME)."' where mb_id = '{$mb_id}' ";
+ sql_query($sql);
+}
+
+
+// 회원권한을 SELECT 형식으로 얻음
+function get_member_level_select($name, $start_id=0, $end_id=10, $selected="", $event="")
+{
+ global $g4;
+
+ $str = "\n= '{$level}' ";
+ $result = sql_query($sql);
+ $str = '선택안함 ';
+ for ($i=0; $row=sql_fetch_array($result); $i++)
+ {
+ $str .= '';
+ }
+ $str .= ' ';
+ return $str;
+}
+
+// 권한 검사
+function auth_check($auth, $attr)
+{
+ global $is_admin;
+
+ if ($is_admin == 'super') return;
+
+ if (!trim($auth))
+ alert('이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.');
+
+ $attr = strtolower($attr);
+
+ if (!strstr($auth, $attr)) {
+ if ($attr == 'r')
+ alert('읽을 권한이 없습니다.');
+ else if ($attr == 'w')
+ alert('입력, 추가, 생성, 수정 권한이 없습니다.');
+ else if ($attr == 'd')
+ alert('삭제 권한이 없습니다.');
+ else
+ alert('속성이 잘못 되었습니다.');
+ }
+}
+
+
+// 작업아이콘 출력
+function icon($act, $link='', $target='_parent')
+{
+ global $g4;
+
+ $img = array('입력'=>'insert', '추가'=>'insert', '생성'=>'insert', '수정'=>'modify', '삭제'=>'delete', '이동'=>'move', '그룹'=>'move', '보기'=>'view', '미리보기'=>'view', '복사'=>'copy');
+ $icon = ' ';
+ if ($link)
+ $s = ''.$icon.' ';
+ else
+ $s = $icon;
+ return $s;
+}
+
+
+// rm -rf 옵션 : exec(), system() 함수를 사용할 수 없는 서버 또는 win32용 대체
+// www.php.net 참고 : pal at degerstrom dot com
+function rm_rf($file)
+{
+ if (file_exists($file)) {
+ @chmod($file,0777);
+ if (is_dir($file)) {
+ $handle = opendir($file);
+ while($filename = readdir($handle)) {
+ if ($filename != '.' && $filename != '..')
+ rm_rf($file.'/'.$filename);
+ }
+ closedir($handle);
+ rmdir($file);
+ } else
+ unlink($file);
+ }
+}
+
+// 입력 폼 안내문
+function help($help="")
+{
+ global $g4;
+
+ $str = ''.str_replace("\n", " ", $help).' ';
+
+ return $str;
+}
+
+// 출력순서
+function order_select($fld, $sel='')
+{
+ $s = '';
+ for ($i=1; $i<=100; $i++) {
+ $s .= '';
+ }
+ $s .= ' ';
+
+ return $s;
+}
+
+// 접근 권한 검사
+if (!$member['mb_id'])
+{
+ //alert('로그인 하십시오.', '$g4['bbs_path']/login.php?url=' . urlencode('$_SERVER['PHP_SELF']?w=$w&mb_id=$mb_id'));
+ alert('로그인 하십시오.', G4_BBS_URL.'/login.php?url=' . urlencode($_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']));
+}
+else if ($is_admin != 'super')
+{
+ $auth = array();
+ $sql = " select au_menu, au_auth from {$g4['auth_table']} where mb_id = '{$member['mb_id']}' ";
+ $result = sql_query($sql);
+ for($i=0; $row=sql_fetch_array($result); $i++)
+ {
+ $auth[$row['au_menu']] = $row['au_auth'];
+ }
+
+ if (!$i)
+ {
+ alert('최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.', G4_URL);
+ }
+}
+
+// 관리자의 아이피, 브라우저와 다르다면 세션을 끊고 관리자에게 메일을 보낸다.
+$admin_key = md5($member['mb_datetime'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
+if (get_session('ss_mb_key') !== $admin_key) {
+
+ session_destroy();
+
+ include_once(G4_LIB_PATH.'/mailer.lib.php');
+ // 메일 알림
+ mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'].' 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n'.G4_URL, 0);
+
+ alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
+}
+
+@ksort($auth);
+
+// 가변 메뉴
+unset($auth_menu);
+unset($menu);
+unset($amenu);
+$tmp = dir(G4_ADMIN_PATH);
+while ($entry = $tmp->read()) {
+ if (!preg_match('/^admin.menu([0-9]{3}).*\.php$/', $entry, $m))
+ continue; // 파일명이 menu 으로 시작하지 않으면 무시한다.
+
+ $amenu[$m[1]] = $entry;
+ include_once(G4_ADMIN_PATH.'/'.$entry);
+}
+@ksort($amenu);
+
+$arr_query = array();
+if (isset($sst)) $arr_query[] = 'sst='.$sst;
+if (isset($sod)) $arr_query[] = 'sod='.$sod;
+if (isset($sfl)) $arr_query[] = 'sfl='.$sfl;
+if (isset($stx)) $arr_query[] = 'stx='.$stx;
+if (isset($page)) $arr_query[] = 'page='.$page;
+$qstr = implode("&", $arr_query);
+
+// 관리자에서는 추가 스크립트는 사용하지 않는다.
+$config['cf_add_script'] = '';
+?>
\ No newline at end of file
diff --git a/g4s/adm/admin.menu100.php b/g4s/adm/admin.menu100.php
new file mode 100644
index 000000000..dfc91e73b
--- /dev/null
+++ b/g4s/adm/admin.menu100.php
@@ -0,0 +1,16 @@
+
\ No newline at end of file
diff --git a/g4s/adm/admin.menu200.php b/g4s/adm/admin.menu200.php
new file mode 100644
index 000000000..206356f99
--- /dev/null
+++ b/g4s/adm/admin.menu200.php
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/g4s/adm/admin.menu300.php b/g4s/adm/admin.menu300.php
new file mode 100644
index 000000000..bce69e9e9
--- /dev/null
+++ b/g4s/adm/admin.menu300.php
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/g4s/adm/admin.tail.php b/g4s/adm/admin.tail.php
new file mode 100644
index 000000000..9a800ba01
--- /dev/null
+++ b/g4s/adm/admin.tail.php
@@ -0,0 +1,101 @@
+
+
+
+
+ 귀하께서 사용하시는 브라우저는 현재 자바스크립트를 사용하지 않음 으로 설정되어 있습니다.
+ 자바스크립트를 사용하지 않음 으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/g4s/adm/auth_list.php b/g4s/adm/auth_list.php
new file mode 100644
index 000000000..66b60279d
--- /dev/null
+++ b/g4s/adm/auth_list.php
@@ -0,0 +1,235 @@
+전체목록';
+
+$g4['title'] = "관리권한설정";
+include_once('./admin.head.php');
+
+$colspan = 5;
+?>
+
+
+
+
+ 설정된 관리권한 내역
+ 권한 r 은 읽기권한, w 는 쓰기권한, d 는 삭제권한입니다.
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/auth_list_delete.php b/g4s/adm/auth_list_delete.php
new file mode 100644
index 000000000..ce47761c9
--- /dev/null
+++ b/g4s/adm/auth_list_delete.php
@@ -0,0 +1,22 @@
+
diff --git a/g4s/adm/auth_update.php b/g4s/adm/auth_update.php
new file mode 100644
index 000000000..9b4b9ca44
--- /dev/null
+++ b/g4s/adm/auth_update.php
@@ -0,0 +1,34 @@
+
diff --git a/g4s/adm/board_copy.php b/g4s/adm/board_copy.php
new file mode 100644
index 000000000..5881f0a45
--- /dev/null
+++ b/g4s/adm/board_copy.php
@@ -0,0 +1,70 @@
+
+
+
+
기존 게시판을 새 게시판으로 복사
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/board_copy_update.php b/g4s/adm/board_copy_update.php
new file mode 100644
index 000000000..eb2f2aee3
--- /dev/null
+++ b/g4s/adm/board_copy_update.php
@@ -0,0 +1,203 @@
+read()) {
+ if ($entry == '.' || $entry == '..') continue;
+
+ // 김선용 201007 :
+ if(is_dir(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry)){
+ $dd = dir(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry);
+ @mkdir(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
+ @chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
+ while ($entry2 = $dd->read()) {
+ if ($entry2 == '.' || $entry2 == '..') continue;
+ @copy(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry.'/'.$entry2, G4_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2);
+ @chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, 0707);
+ $copy_file++;
+ }
+ $dd->close();
+ }
+ else {
+ @copy(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry, G4_DATA_PATH.'/file/'.$target_table.'/'.$entry);
+ @chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
+ $copy_file++;
+ }
+ }
+ $d->close();
+
+ // 글복사
+ $sql = " insert into {$g4['write_prefix']}$target_table select * from {$g4['write_prefix']}$bo_table ";
+ sql_query($sql);
+
+ // 게시글수 저장
+ $sql = " select bo_count_write, bo_count_comment from {$g4['board_table']} where bo_table = '$bo_table' ";
+ $row = sql_fetch($sql);
+ $sql = " update {$g4['board_table']} set bo_count_write = '{$row['bo_count_write']}', bo_count_comment = '{$row['bo_count_comment']}' where bo_table = '$target_table' ";
+ sql_query($sql);
+
+ // 4.00.01
+ // 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
+ $sql = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' ";
+ $result = sql_query($sql);
+ for ($i=0; $row=sql_fetch_array($result); $i++)
+ $file_copy[$i] = $row;
+}
+
+if (count($file_copy)) {
+ for ($i=0; $iopener.document.location.reload();";
+
+alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
+?>
\ No newline at end of file
diff --git a/g4s/adm/board_delete.inc.php b/g4s/adm/board_delete.inc.php
new file mode 100644
index 000000000..442cc8bb6
--- /dev/null
+++ b/g4s/adm/board_delete.inc.php
@@ -0,0 +1,36 @@
+
\ No newline at end of file
diff --git a/g4s/adm/board_delete.php b/g4s/adm/board_delete.php
new file mode 100644
index 000000000..00a66b0b3
--- /dev/null
+++ b/g4s/adm/board_delete.php
@@ -0,0 +1,28 @@
+
diff --git a/g4s/adm/board_form.php b/g4s/adm/board_form.php
new file mode 100644
index 000000000..d9affee10
--- /dev/null
+++ b/g4s/adm/board_form.php
@@ -0,0 +1,1235 @@
+필수';
+
+ $board['bo_count_delete'] = 1;
+ $board['bo_count_modify'] = 1;
+ $board['bo_read_point'] = $config['cf_read_point'];
+ $board['bo_write_point'] = $config['cf_write_point'];
+ $board['bo_comment_point'] = $config['cf_comment_point'];
+ $board['bo_download_point'] = $config['cf_download_point'];
+
+ $board['bo_gallery_cols'] = 4;
+ $board['bo_gallery_width'] = 174;
+ $board['bo_gallery_height'] = 124;
+ $board['bo_mobile_gallery_cols'] = 3;
+ $board['bo_mobile_gallery_width'] = 125;
+ $board['bo_mobile_gallery_height'] = 100;
+ $board['bo_table_width'] = 100;
+ $board['bo_page_rows'] = $config['cf_page_rows'];
+ $board['bo_mobile_page_rows'] = $config['cf_page_rows'];
+ $board['bo_subject_len'] = 60;
+ $board['bo_mobile_subject_len'] = 30;
+ $board['bo_new'] = 24;
+ $board['bo_hot'] = 100;
+ $board['bo_image_width'] = 600;
+ $board['bo_upload_count'] = 2;
+ $board['bo_upload_size'] = 1048576;
+ $board['bo_reply_order'] = 1;
+ $board['bo_use_search'] = 1;
+ $board['bo_skin'] = 'basic';
+ $board['bo_mobile_skin'] = 'basic';
+ $board['gr_id'] = $gr_id;
+ $board['bo_use_secret'] = 0;
+ $board['bo_include_head'] = '_head.php';
+ $board['bo_include_tail'] = '_tail.php';
+ $board['bo_show_menu'] = true;
+
+} else if ($w == 'u') {
+
+ $html_title .= ' 수정';
+
+ if (!$board['bo_table'])
+ alert('존재하지 않은 게시판 입니다.');
+
+ if ($is_admin == 'group') {
+ if ($member['mb_id'] != $group['gr_admin'])
+ alert('그룹이 틀립니다.');
+ }
+
+ $readonly = 'readonly';
+
+}
+
+if ($is_admin != 'super') {
+ $group = get_group($board['gr_id']);
+ $is_admin = is_admin($member['mb_id']);
+}
+
+$g4['title'] = $html_title;
+include_once ('./admin.head.php');
+
+$pg_anchor = '';
+?>
+
+
+
+
+
+
diff --git a/g4s/adm/board_form_update.php b/g4s/adm/board_form_update.php
new file mode 100644
index 000000000..4c98c8a4a
--- /dev/null
+++ b/g4s/adm/board_form_update.php
@@ -0,0 +1,400 @@
+
diff --git a/g4s/adm/board_list.php b/g4s/adm/board_list.php
new file mode 100644
index 000000000..1ab007b9e
--- /dev/null
+++ b/g4s/adm/board_list.php
@@ -0,0 +1,206 @@
+전체목록';
+
+$g4['title'] = '게시판관리';
+include_once('./admin.head.php');
+
+$colspan = 15;
+?>
+
+
+
+ 게시판 검색
+
+
+ 생성된 게시판수 개
+
+
+ >TABLE
+ >제목
+ >그룹ID
+
+
+
+
+
+
+
+ 생성된 게시판 목록
+ 여러개의 게시판 설정을 한번에 바꾸실 때는 게시판 체크기능을 이용하세요.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/board_list_update.php b/g4s/adm/board_list_update.php
new file mode 100644
index 000000000..01aacb020
--- /dev/null
+++ b/g4s/adm/board_list_update.php
@@ -0,0 +1,72 @@
+
diff --git a/g4s/adm/boardgroup_delete.php b/g4s/adm/boardgroup_delete.php
new file mode 100644
index 000000000..f59eb4fdf
--- /dev/null
+++ b/g4s/adm/boardgroup_delete.php
@@ -0,0 +1,35 @@
+
diff --git a/g4s/adm/boardgroup_form.php b/g4s/adm/boardgroup_form.php
new file mode 100644
index 000000000..b997d0d80
--- /dev/null
+++ b/g4s/adm/boardgroup_form.php
@@ -0,0 +1,159 @@
+필수';
+ $gr['gr_use_access'] = 0;
+ $html_title .= ' 생성';
+} else if ($w == 'u') {
+ $gr_id_attr = 'readonly';
+ $gr = sql_fetch(" select * from {$g4['group_table']} where gr_id = '$gr_id' ");
+ $html_title .= ' 수정';
+}
+else
+ alert('제대로 된 값이 넘어오지 않았습니다.');
+
+if (!isset($group['gr_device'])) {
+ sql_query(" ALTER TABLE `{$g4['group_table']}` ADD `gr_device` ENUM('both','pc','mobile') NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
+}
+
+if (!isset($group['gr_show_menu'])) {
+ sql_query(" ALTER TABLE `{$g4['group_table']}` ADD `gr_show_menu` TINYINT NOT NULL DEFAULT '0' AFTER `gr_use_access`, ADD `gr_order` INT NOT NULL DEFAULT '0' AFTER `gr_show_menu` ", false);
+}
+
+$g4['title'] = $html_title;
+include_once('./admin.head.php');
+?>
+
+
+
+ 게시판을 생성하시려면 1개 이상의 게시판그룹이 필요합니다.
+ 게시판그룹을 이용하시면 더 효과적으로 게시판을 관리할 수 있습니다.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 작성하신 내용을 제출하시려면 확인 버튼을, 작성을 취소하고 목록으로 돌아가시려면 목록 링크를 누르세요.
+
+
+
목록
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/boardgroup_form_update.php b/g4s/adm/boardgroup_form_update.php
new file mode 100644
index 000000000..5ed3cb5a9
--- /dev/null
+++ b/g4s/adm/boardgroup_form_update.php
@@ -0,0 +1,73 @@
+
diff --git a/g4s/adm/boardgroup_list.php b/g4s/adm/boardgroup_list.php
new file mode 100644
index 000000000..ad21fa82d
--- /dev/null
+++ b/g4s/adm/boardgroup_list.php
@@ -0,0 +1,205 @@
+처음';
+
+$g4['title'] = '게시판그룹설정';
+include_once('./admin.head.php');
+
+$colspan = 8;
+?>
+
+
+
+ 그룹 검색
+
+
+ 생성된 그룹수 개
+
+
+ >제목
+ >ID
+ >그룹관리자
+
+
+
+
+
+
+
+ 게시판그룹 목록
+
+ 접근사용 옵션을 설정하시면 관리자가 지정한 회원만 해당 그룹에 접근할 수 있습니다.
+ 접근사용 옵션은 해당 그룹에 속한 모든 게시판에 적용됩니다.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/boardgroup_list_update.php b/g4s/adm/boardgroup_list_update.php
new file mode 100644
index 000000000..81419b8b3
--- /dev/null
+++ b/g4s/adm/boardgroup_list_update.php
@@ -0,0 +1,47 @@
+
diff --git a/g4s/adm/boardgroupmember_form.php b/g4s/adm/boardgroupmember_form.php
new file mode 100644
index 000000000..f3bf434dc
--- /dev/null
+++ b/g4s/adm/boardgroupmember_form.php
@@ -0,0 +1,126 @@
+
+
+
+
아이디 , 이름 , 별명 님이 접근가능한 그룹 목록
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 님 접근가능그룹 추가
+ 그룹지정
+
+ 접근가능 그룹을 선택하세요.
+ ".$row['gr_subject']."";
+ }
+ ?>
+
+
+ 게시판 그룹이 존재하지 않는다면 게시판그룹생성하기
+
+
+
+
+
+
diff --git a/g4s/adm/boardgroupmember_list.php b/g4s/adm/boardgroupmember_list.php
new file mode 100644
index 000000000..3cd6d783c
--- /dev/null
+++ b/g4s/adm/boardgroupmember_list.php
@@ -0,0 +1,151 @@
+
+
+
+
+
+ (아이디 )에서 검색
+ 검색대상
+
+ >회원아이디
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/boardgroupmember_update.php b/g4s/adm/boardgroupmember_update.php
new file mode 100644
index 000000000..c4e01cb08
--- /dev/null
+++ b/g4s/adm/boardgroupmember_update.php
@@ -0,0 +1,70 @@
+
diff --git a/g4s/adm/cache_file_delete.php b/g4s/adm/cache_file_delete.php
new file mode 100644
index 000000000..fd8738a76
--- /dev/null
+++ b/g4s/adm/cache_file_delete.php
@@ -0,0 +1,47 @@
+
+
+
+
+ 완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
+
+ 캐시디렉토리를 열지못했습니다.';
+ }
+
+ $cnt=0;
+ echo '
'.PHP_EOL;
+
+ $files = glob(G4_DATA_PATH.'/cache/latest-*');
+ if (is_array($files)) {
+ foreach ($files as $cache_file) {
+ $cnt++;
+ unlink($cache_file);
+ echo ''.$cache_file.' '.PHP_EOL;
+
+ flush();
+
+ if ($cnt%10==0)
+ echo PHP_EOL;
+ }
+ }
+
+ echo '완료됨 '.PHP_EOL;
+ echo '
최신글 캐시파일 '.$cnt.'건 삭제가 완료됐습니다. 프로그램의 실행을 끝마치셔도 좋습니다.
'.PHP_EOL;
+ ?>
+
+
+
\ No newline at end of file
diff --git a/g4s/adm/config_form.php b/g4s/adm/config_form.php
new file mode 100644
index 000000000..e981a1163
--- /dev/null
+++ b/g4s/adm/config_form.php
@@ -0,0 +1,769 @@
+
+ 기본환경
+ 게시판기본
+ 회원가입
+ 본인확인
+ 기본메일환경
+ 글작성메일
+ 가입메일
+ 투표메일
+ 여분필드
+';
+?>
+
+
+
+
+
+
+
+ 게시판 기본 설정
+
+ 각 게시판 관리에서 개별적으로 설정 가능합니다.
+
+
+
+
+
+ 회원가입 설정
+
+ 회원가입 시 사용할 스킨과 입력 받을 정보 등을 설정할 수 있습니다.
+
+
+
+
+
+ 본인확인
+
+
+ 회원가입 시 본인확인 수단을 설정합니다.
+ 실명과 휴대폰 번호 그리고 본인확인 당시에 성인인지의 여부만을 저장하며 생일, 성별 등의 정보는 저장하지 않습니다.
+ 게시판의 경우 본인확인 또는 성인여부를 따져 게시물을 조회할 수 권한을 줄 수 있습니다.
+
+
+
+
+
+
+
+
+ 게시판 글 작성 시 메일 설정
+
+
+
+
+
+
+
+
+
+ 투표 기타의견 작성시 메일 설정
+
+
+
+
+
+
+
+
+ XSS 혹은 CSRF 방지
+ 관리자 권한을 탈취당하는 경우를 대비하여 패스워드를 다시 한번 확인합니다.
+ 관리자 패스워드필수
+
+
+
+
+
+ 작성하신 내용을 제출하시려면 확인 버튼을, 작성을 취소하고 목록으로 돌아가시려면 목록 링크를 누르세요.
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/config_form_update.php b/g4s/adm/config_form_update.php
new file mode 100644
index 000000000..fa050ba99
--- /dev/null
+++ b/g4s/adm/config_form_update.php
@@ -0,0 +1,135 @@
+
\ No newline at end of file
diff --git a/g4s/adm/gcaptcha_file_delete.php b/g4s/adm/gcaptcha_file_delete.php
new file mode 100644
index 000000000..3a9930550
--- /dev/null
+++ b/g4s/adm/gcaptcha_file_delete.php
@@ -0,0 +1,52 @@
+
+
+
+
+ 완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
+
+ 캐시디렉토리를 열지못했습니다.';
+ }
+
+ $cnt=0;
+ echo '
'.PHP_EOL;
+
+ $files = glob(G4_DATA_PATH.'/cache/gcaptcha-*');
+ if (is_array($files)) {
+ $before_time = G4_SERVER_TIME - 3600; // 한시간전
+ foreach ($files as $gcaptcha_file) {
+ $modification_time = filemtime($gcaptcha_file); // 파일접근시간
+
+ if ($modification_time > $before_time) continue;
+
+ $cnt++;
+ unlink($gcaptcha_file);
+ echo ''.$gcaptcha_file.' '.PHP_EOL;
+
+ flush();
+
+ if ($cnt%10==0)
+ echo PHP_EOL;
+ }
+ }
+
+ echo '완료됨 '.PHP_EOL;
+ echo '
캡챠파일 '.$cnt.'건의 삭제가 완료됐습니다. 프로그램의 실행을 끝마치셔도 좋습니다.
'.PHP_EOL;
+ ?>
+
+
+
\ No newline at end of file
diff --git a/g4s/adm/img/hd_bg.jpg b/g4s/adm/img/hd_bg.jpg
new file mode 100644
index 000000000..345d89cc5
Binary files /dev/null and b/g4s/adm/img/hd_bg.jpg differ
diff --git a/g4s/adm/img/logo.jpg b/g4s/adm/img/logo.jpg
new file mode 100644
index 000000000..d822183d2
Binary files /dev/null and b/g4s/adm/img/logo.jpg differ
diff --git a/g4s/adm/img/qnb_board.jpg b/g4s/adm/img/qnb_board.jpg
new file mode 100644
index 000000000..617c89152
Binary files /dev/null and b/g4s/adm/img/qnb_board.jpg differ
diff --git a/g4s/adm/img/qnb_log.jpg b/g4s/adm/img/qnb_log.jpg
new file mode 100644
index 000000000..aa6f915e8
Binary files /dev/null and b/g4s/adm/img/qnb_log.jpg differ
diff --git a/g4s/adm/img/qnb_mb.jpg b/g4s/adm/img/qnb_mb.jpg
new file mode 100644
index 000000000..75e2ed3cc
Binary files /dev/null and b/g4s/adm/img/qnb_mb.jpg differ
diff --git a/g4s/adm/img/snb_home.jpg b/g4s/adm/img/snb_home.jpg
new file mode 100644
index 000000000..5cbbfd010
Binary files /dev/null and b/g4s/adm/img/snb_home.jpg differ
diff --git a/g4s/adm/img/snb_logout.jpg b/g4s/adm/img/snb_logout.jpg
new file mode 100644
index 000000000..428052e45
Binary files /dev/null and b/g4s/adm/img/snb_logout.jpg differ
diff --git a/g4s/adm/img/snb_modify.jpg b/g4s/adm/img/snb_modify.jpg
new file mode 100644
index 000000000..8deb73deb
Binary files /dev/null and b/g4s/adm/img/snb_modify.jpg differ
diff --git a/g4s/adm/index.php b/g4s/adm/index.php
new file mode 100644
index 000000000..58505131d
--- /dev/null
+++ b/g4s/adm/index.php
@@ -0,0 +1,307 @@
+ '' {$sql_order} ";
+$row = sql_fetch($sql);
+$leave_count = $row['cnt'];
+
+// 차단회원수
+$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
+$row = sql_fetch($sql);
+$intercept_count = $row['cnt'];
+
+$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
+$result = sql_query($sql);
+
+$colspan = 12;
+?>
+
+
+ 신규가입회원 건 목록
+ 총회원수 명 중 차단 명, 탈퇴 : 명
+
+
+
+
+ 회원아이디
+ 이름
+ 별명
+ 권한
+ 포인트
+ 수신
+ 공개
+ 인증
+ 차단
+ 그룹
+
+
+
+ '.$row2['cnt'].'';
+
+ if ($is_admin == 'group')
+ {
+ $s_mod = '';
+ $s_del = '';
+ }
+ else
+ {
+ $s_mod = '수정 ';
+ $s_del = '삭제 ';
+ }
+ $s_grp = '그룹 ';
+
+ $leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G4_SERVER_TIME);
+ $intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G4_SERVER_TIME);
+
+ $mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
+
+ $mb_id = $row['mb_id'];
+ if ($row['mb_leave_date'])
+ $mb_id = $mb_id;
+ else if ($row['mb_intercept_date'])
+ $mb_id = $mb_id;
+
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ ?>
+
+
+
+
+
+
+
+ a.wr_parent ";
+}
+$sql_order = " order by a.bn_id desc ";
+
+$sql = " select count(*) as cnt {$sql_common} ";
+$row = sql_fetch($sql);
+$total_count = $row['cnt'];
+
+$colspan = 5;
+?>
+
+
+ 최근게시물
+ 사이트 전체게시물 중 최근게시물 건 목록
+
+
+
+
+ 그룹
+ 게시판
+ 제목
+ 이름
+ 일시
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ ?>
+
+
+
+
+
+
+
+
+
+ 최근 포인트 발생내역
+ 전체 건 중 건 목록
+
+
+
+
+ 회원아이디
+ 이름
+ 별명
+ 일시
+ 포인트 내용
+ 포인트
+ 포인트합
+
+
+
+ ';
+ $link2 = '';
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ ?>
+
+
+
+
+
+
+
diff --git a/g4s/adm/mail_delete.php b/g4s/adm/mail_delete.php
new file mode 100644
index 000000000..cc8ce6b30
--- /dev/null
+++ b/g4s/adm/mail_delete.php
@@ -0,0 +1,24 @@
+
\ No newline at end of file
diff --git a/g4s/adm/mail_form.php b/g4s/adm/mail_form.php
new file mode 100644
index 000000000..fc1df022a
--- /dev/null
+++ b/g4s/adm/mail_form.php
@@ -0,0 +1,83 @@
+
+
+
+
메일 내용에 {이름} , {별명} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.
+
+
+
+
+
+
+
+
+
+ 작성하신 내용을 제출하시려면 확인 버튼을 누르세요.
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/mail_list.php b/g4s/adm/mail_list.php
new file mode 100644
index 000000000..97da65781
--- /dev/null
+++ b/g4s/adm/mail_list.php
@@ -0,0 +1,103 @@
+
+
+
+ 등록된 메일내용 목록
+
+ 테스트 는 등록된 최고관리자의 이메일로 테스트 메일을 발송합니다.
+ 현재 등록된 메일은 총 건입니다.
+
+
+
+
+
+
+
+
+ 선택삭제
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/g4s/adm/mail_preview.php b/g4s/adm/mail_preview.php
new file mode 100644
index 000000000..c1e324686
--- /dev/null
+++ b/g4s/adm/mail_preview.php
@@ -0,0 +1,34 @@
+▶ 더 이상 정보 수신을 원치 않으시면 [수신거부 ] 해 주십시오.
";
+?>
+
+
+
+
+
+그누보드 메일발송 테스트
+
+
+
+
+
+
+
+
+
+
+
+ 주의! 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
+
+
+
+
\ No newline at end of file
diff --git a/g4s/adm/mail_select_form.php b/g4s/adm/mail_select_form.php
new file mode 100644
index 000000000..466e9cc62
--- /dev/null
+++ b/g4s/adm/mail_select_form.php
@@ -0,0 +1,124 @@
+ '' ";
+$row = sql_fetch($sql);
+$finish_cnt = $row['cnt'];
+
+$last_option = explode('||', $ma['ma_last_option']);
+for ($i=0; $i
+
+
+ 메일발송대상 선택
+
+ 전체회원 명 , 탈퇴대기회원 명, 정상회원 명 중 메일 발송 대상 선택
+
+
+
+
+
+
+
+
+
+ 메일발송대상 선택을 완료하시려면 확인 버튼을, 작성을 취소하고 목록으로 돌아가시려면 목록 링크를 누르세요.
+
+
+
목록
+
+
+
+
+
diff --git a/g4s/adm/mail_select_list.php b/g4s/adm/mail_select_list.php
new file mode 100644
index 000000000..186e46ead
--- /dev/null
+++ b/g4s/adm/mail_select_list.php
@@ -0,0 +1,124 @@
+
+
+
+
조건에 따라 선택된 메일발송 대상자 목록입니다.
+
+
+
+
+
+
+
+
+ 번호
+ 회원아이디
+ 이름
+ 별명
+ 생일
+ E-mail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/mail_select_update.php b/g4s/adm/mail_select_update.php
new file mode 100644
index 000000000..162135dbf
--- /dev/null
+++ b/g4s/adm/mail_select_update.php
@@ -0,0 +1,89 @@
+";
+echo "메일 발송중 ...
[끝] 이라는 단어가 나오기 전에는 중간에 중지하지 마세요.
";
+echo "";
+?>
+
+
+
+
+
+
▶ 더 이상 정보 수신을 원치 않으시면 [수신거부 ] 해 주십시오.
";
+
+ mailer($config['cf_title'], $from_email, $email, $subject, $content, 1);
+
+ echo "\n";
+ //echo "+";
+ flush();
+ ob_flush();
+ ob_end_flush();
+ usleep($sleepsec);
+ if ($cnt % $countgap == 0)
+ {
+ echo "\n";
+ }
+
+ // 화면을 지운다... 부하를 줄임
+ if ($cnt % $maxscreen == 0)
+ echo "\n";
+ }
+}
+?>
+
diff --git a/g4s/adm/mail_test.php b/g4s/adm/mail_test.php
new file mode 100644
index 000000000..3c712176e
--- /dev/null
+++ b/g4s/adm/mail_test.php
@@ -0,0 +1,39 @@
+더 이상 정보 수신을 원치 않으시면 [수신거부 ] 해 주십시오.
';
+
+mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
+
+alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
+?>
diff --git a/g4s/adm/mail_update.php b/g4s/adm/mail_update.php
new file mode 100644
index 000000000..534e89508
--- /dev/null
+++ b/g4s/adm/mail_update.php
@@ -0,0 +1,39 @@
+
diff --git a/g4s/adm/member_form.php b/g4s/adm/member_form.php
new file mode 100644
index 000000000..7aa3186e9
--- /dev/null
+++ b/g4s/adm/member_form.php
@@ -0,0 +1,307 @@
+필수';
+
+ $mb['mb_mailling'] = 1;
+ $mb['mb_open'] = 1;
+ $mb['mb_level'] = $config['cf_register_level'];
+ $html_title = '추가';
+}
+else if ($w == 'u')
+{
+ $mb = get_member($mb_id);
+ if (!$mb['mb_id'])
+ alert('존재하지 않는 회원자료입니다.');
+
+ if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level'])
+ alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
+
+ $required_mb_id = 'readonly';
+ $required_mb_password = '';
+ $html_title = '수정';
+
+ $mb['mb_email'] = get_text($mb['mb_email']);
+ $mb['mb_homepage'] = get_text($mb['mb_homepage']);
+ $mb['mb_password_q'] = get_text($mb['mb_password_q']);
+ $mb['mb_password_a'] = get_text($mb['mb_password_a']);
+ $mb['mb_birth'] = get_text($mb['mb_birth']);
+ $mb['mb_tel'] = get_text($mb['mb_tel']);
+ $mb['mb_hp'] = get_text($mb['mb_hp']);
+ $mb['mb_addr1'] = get_text($mb['mb_addr1']);
+ $mb['mb_addr2'] = get_text($mb['mb_addr2']);
+ $mb['mb_signature'] = get_text($mb['mb_signature']);
+ $mb['mb_recommend'] = get_text($mb['mb_recommend']);
+ $mb['mb_profile'] = get_text($mb['mb_profile']);
+ $mb['mb_1'] = get_text($mb['mb_1']);
+ $mb['mb_2'] = get_text($mb['mb_2']);
+ $mb['mb_3'] = get_text($mb['mb_3']);
+ $mb['mb_4'] = get_text($mb['mb_4']);
+ $mb['mb_5'] = get_text($mb['mb_5']);
+ $mb['mb_6'] = get_text($mb['mb_6']);
+ $mb['mb_7'] = get_text($mb['mb_7']);
+ $mb['mb_8'] = get_text($mb['mb_8']);
+ $mb['mb_9'] = get_text($mb['mb_9']);
+ $mb['mb_10'] = get_text($mb['mb_10']);
+}
+else
+ alert('제대로 된 값이 넘어오지 않았습니다.');
+
+$mailling_no_checked = '';
+$sms_no_checked = '';
+$open_no_checked = '';
+if ($mb['mb_mailling'] == 1) {
+ $mailling_checked = 'checked="checked"'; //메일수신
+} else {
+ $mailing_checked = '';
+ $mailling_no_checked = 'checked="checked"';
+}
+
+if ($mb['mb_sms']) {
+ $sms_checked = 'checked="checked"'; // SMS 수신
+} else {
+ $sms_checked = '';
+ $sms_no_checked = 'checked="checked"';
+}
+
+if ($mb['mb_open']) {
+ $open_checked = 'checked="checked"'; // 정보 공개
+} else {
+ $open_checked = '';
+ $open_no_checked = 'checked="checked"';
+}
+
+if(!isset($mb['mb_adult'])) {
+ sql_query(" ALTER TABLE `{$g4['member_table']}`
+ ADD `mb_adult` ENUM('Y', 'N') NOT NULL DEFAULT 'N' AFTER `mb_birth`,
+ ADD `mb_hp_certify` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `mb_lost_certify` ", FALSE);
+}
+
+if ($mb['mb_intercept_date']) $g4['title'] = "차단된 ";
+else $g4['title'] .= "";
+$g4['title'] .= '회원 '.$html_title;
+include_once('./admin.head.php');
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ XSS 혹은 CSRF 방지
+ 관리자 권한을 탈취 당하는 경우를 대비하여 관리자의 패스워드를 다시 한번 확인합니다.
+ 관리자 패스워드필수
+
+
+
+
+
+ 작성하신 내용을 제출하시려면 확인 버튼을, 작성을 취소하고 목록으로 돌아가시려면 목록 링크를 누르세요.
+
+
+
목록
+
+
+
+
+
+
diff --git a/g4s/adm/member_form_update.php b/g4s/adm/member_form_update.php
new file mode 100644
index 000000000..d8f50f95f
--- /dev/null
+++ b/g4s/adm/member_form_update.php
@@ -0,0 +1,143 @@
+= $member['mb_level'])
+ alert('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
+
+ if ($_POST['mb_id'] == $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
+ alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
+
+ // 이메일중복체크
+ $sql = " select count(*) as cnt from {$g4['member_table']} where mb_email = '{$_POST['mb_email']}' and mb_id <> '$mb_id' ";
+ $row = sql_fetch($sql);
+ if($row['cnt'])
+ alert('다른 회원이 사용 중인 이메일입니다.');
+
+ $mb_dir = substr($mb_id,0,2);
+
+ // 회원 아이콘 삭제
+ if ($del_mb_icon)
+ @unlink(G4_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
+
+ // 아이콘 업로드
+ if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
+ if (!preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
+ alert($_FILES['mb_icon']['name'] . '은(는) gif 파일이 아닙니다.');
+ }
+
+ if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
+ @mkdir(G4_DATA_PATH.'/member/'.$mb_dir, 0707);
+ @chmod(G4_DATA_PATH.'/member/'.$mb_dir, 0707);
+
+ $dest_path = G4_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
+
+ move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
+ chmod($dest_path, 0606);
+
+ if (file_exists($dest_path)) {
+ $size = getimagesize($dest_path);
+ // 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
+ if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) {
+ @unlink($dest_path);
+ }
+ }
+ }
+ }
+
+ if ($mb_password)
+ $sql_password = " , mb_password = '".sql_password($mb_password)."' ";
+ else
+ $sql_password = "";
+
+ if ($passive_certify)
+ $sql_certify = " , mb_email_certify = '".G4_TIME_YMDHIS."' ";
+ else
+ $sql_certify = "";
+
+ $sql = " update {$g4['member_table']}
+ set {$sql_common}
+ {$sql_password}
+ {$sql_certify}
+ where mb_id = '{$mb_id}' ";
+ sql_query($sql);
+}
+else
+ alert('제대로 된 값이 넘어오지 않았습니다.');
+
+goto_url('./member_form.php?'.$qstr.'&w=u&mb_id='.$mb_id, false);
+?>
\ No newline at end of file
diff --git a/g4s/adm/member_list.php b/g4s/adm/member_list.php
new file mode 100644
index 000000000..28afd87fb
--- /dev/null
+++ b/g4s/adm/member_list.php
@@ -0,0 +1,244 @@
+= '{$stx}') ";
+ break;
+ case 'mb_level' :
+ $sql_search .= " ({$sfl} = '{$stx}') ";
+ break;
+ case 'mb_tel' :
+ case 'mb_hp' :
+ $sql_search .= " ({$sfl} like '%{$stx}') ";
+ break;
+ default :
+ $sql_search .= " ({$sfl} like '{$stx}%') ";
+ break;
+ }
+ $sql_search .= " ) ";
+}
+
+if ($is_admin != 'super')
+ $sql_search .= " and mb_level <= '{$member['mb_level']}' ";
+
+if (!$sst) {
+ $sst = "mb_datetime";
+ $sod = "desc";
+}
+
+$sql_order = " order by {$sst} {$sod} ";
+
+$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
+$row = sql_fetch($sql);
+$total_count = $row['cnt'];
+
+$rows = $config['cf_page_rows'];
+$total_page = ceil($total_count / $rows); // 전체 페이지 계산
+if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+$from_record = ($page - 1) * $rows; // 시작 열을 구함
+
+// 탈퇴회원수
+$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_leave_date <> '' {$sql_order} ";
+$row = sql_fetch($sql);
+$leave_count = $row['cnt'];
+
+// 차단회원수
+$sql = " select count(*) as cnt {$sql_common} {$sql_search} and mb_intercept_date <> '' {$sql_order} ";
+$row = sql_fetch($sql);
+$intercept_count = $row['cnt'];
+
+$listall = "";
+if (isset($sfl) || isset($stx)) // 검색일 때만 처음 버튼을 보여줌
+ $listall = '전체목록 ';
+
+$g4['title'] = '회원관리';
+include_once('./admin.head.php');
+
+$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
+$result = sql_query($sql);
+
+$colspan = 15;
+?>
+
+
+
+ 회원검색
+
+
+ 총회원수 명 중,
+ 차단 명,
+ 탈퇴 명
+
+
+ >회원아이디
+ >별명
+ >이름
+ >권한
+ >E-MAIL
+ >전화번호
+ >핸드폰번호
+ >포인트
+ >가입일시
+ >IP
+ >추천인
+
+
+
+
+
+
+
+ 회원 목록
+ 회원자료 삭제 시 다른 회원이 기존 회원아이디를 사용하지 못하도록 회원아이디, 이름, 별명은 삭제하지 않고 영구 보관합니다.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/member_list_update.php b/g4s/adm/member_list_update.php
new file mode 100644
index 000000000..a64979f4c
--- /dev/null
+++ b/g4s/adm/member_list_update.php
@@ -0,0 +1,66 @@
+= $member['mb_level']) {
+ $msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
+ } else if ($member['mb_id'] == $mb['mb_id']) {
+ $msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
+ } else {
+ $sql = " update {$g4['member_table']}
+ set mb_level = '{$_POST['mb_level'][$k]}',
+ mb_intercept_date = '{$_POST['mb_intercept_date'][$k]}'
+ where mb_id = '{$_POST['mb_id'][$k]}' ";
+ sql_query($sql);
+ }
+ }
+
+} else if ($_POST['act_button'] == "선택삭제") {
+
+ for ($i=0; $i= $member['mb_level']) {
+ $msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
+ } else {
+ // 회원자료 삭제
+ member_delete($mb['mb_id']);
+ }
+ }
+}
+
+if ($msg)
+ //echo '';
+ alert($msg);
+
+goto_url('./member_list.php?'.$qstr);
+?>
diff --git a/g4s/adm/phpinfo.php b/g4s/adm/phpinfo.php
new file mode 100644
index 000000000..a7f01a149
--- /dev/null
+++ b/g4s/adm/phpinfo.php
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/g4s/adm/point_clear.php b/g4s/adm/point_clear.php
new file mode 100644
index 000000000..38d205cc5
--- /dev/null
+++ b/g4s/adm/point_clear.php
@@ -0,0 +1,64 @@
+';
+include_once('./admin.tail.php');
+flush();
+
+echo ''."\n";
+flush();
+
+$max_count = 50;
+
+// 테이블 락을 걸고
+$sql = " LOCK TABLES {$g4['member_table']} WRITE, {$g4['point_table']} WRITE ";
+sql_query($sql);
+
+$sql = " select mb_id, count(po_point) as cnt
+ from {$g4['point_table']}
+ group by mb_id
+ having cnt > {$max_count}+1
+ order by cnt ";
+$result = sql_query($sql);
+for ($i=0; $row=sql_fetch_array($result); $i++)
+{
+ $count = 0;
+ $total = 0;
+ $sql2 = " select po_id, po_point
+ from {$g4['point_table']}
+ where mb_id = '{$row['mb_id']}'
+ order by po_id desc
+ limit {$max_count}, {$row['cnt']} ";
+ $result2 = sql_query($sql2);
+ for ($k=0; $row2=sql_fetch_array($result2); $k++)
+ {
+ $count++;
+ $total += $row2['po_point'];
+
+ sql_query(" delete from {$g4['point_table']} where po_id = '{$row2['po_id']}' ");
+ }
+
+ insert_point($row['mb_id'], $total, '포인트 {$count}건 정리', '@clear', $row['mb_id'], G4_TIME_YMD."-".uniqid(""));
+
+ $str = $row['mb_id']."님 포인트 내역 ".number_format($count)."건 ".number_format($total)."점 정리 ";
+ echo ''."\n";
+ flush();
+}
+
+// 테이블 락을 풀고
+$sql = " UNLOCK TABLES ";
+sql_query($sql);
+
+echo ''."\n";
+?>
diff --git a/g4s/adm/point_list.php b/g4s/adm/point_list.php
new file mode 100644
index 000000000..c9c5a241c
--- /dev/null
+++ b/g4s/adm/point_list.php
@@ -0,0 +1,227 @@
+전체목록';
+
+$mb = array();
+if ($sfl == 'mb_id' && $stx)
+ $mb = get_member(isset($stx));
+
+$g4['title'] = '포인트관리';
+include_once ('./admin.head.php');
+
+$colspan = 8;
+?>
+
+
+
+
+
+
+
+ 포인트 내역 검색
+
+
+ 전체 건
+
+
+
+
+ >회원아이디
+ >내용
+
+
+
+
+
+
+
+ 포인트 내역
+
+
+
+
+
+
+
+
+
+
+
+
+ 선택삭제
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/point_list_delete.php b/g4s/adm/point_list_delete.php
new file mode 100644
index 000000000..9a42102dd
--- /dev/null
+++ b/g4s/adm/point_list_delete.php
@@ -0,0 +1,32 @@
+
diff --git a/g4s/adm/point_update.php b/g4s/adm/point_update.php
new file mode 100644
index 000000000..365cabbab
--- /dev/null
+++ b/g4s/adm/point_update.php
@@ -0,0 +1,28 @@
+ $mb['mb_point']))
+ alert('포인트를 깎는 경우 현재 포인트보다 작으면 안됩니다.', './point_list.php?'.$qstr);
+
+insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id']."-".uniqid(""));
+
+goto_url('./point_list.php?'.$qstr);
+?>
diff --git a/g4s/adm/poll_delete.php b/g4s/adm/poll_delete.php
new file mode 100644
index 000000000..1252e4329
--- /dev/null
+++ b/g4s/adm/poll_delete.php
@@ -0,0 +1,27 @@
+
\ No newline at end of file
diff --git a/g4s/adm/poll_form.php b/g4s/adm/poll_form.php
new file mode 100644
index 000000000..088702e15
--- /dev/null
+++ b/g4s/adm/poll_form.php
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 작성하신 내용을 제출하시려면 확인 버튼을, 작성을 취소하고 목록으로 돌아가시려면 목록 링크를 누르세요.
+
+
+
목록
+
+
+
+
+
diff --git a/g4s/adm/poll_form_update.php b/g4s/adm/poll_form_update.php
new file mode 100644
index 000000000..e47ba0bd8
--- /dev/null
+++ b/g4s/adm/poll_form_update.php
@@ -0,0 +1,70 @@
+
diff --git a/g4s/adm/poll_list.php b/g4s/adm/poll_list.php
new file mode 100644
index 000000000..37fda7e8d
--- /dev/null
+++ b/g4s/adm/poll_list.php
@@ -0,0 +1,157 @@
+전체목록';
+
+$g4['title'] = '투표관리';
+include_once('./admin.head.php');
+
+$colspan = 6;
+?>
+
+
+
+ 투표검색
+
+
+ 투표수 : 개
+
+
+ >제목
+
+
+
+
+
+
+
+ 투표목록
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 선택삭제
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/g4s/adm/popular_list.php b/g4s/adm/popular_list.php
new file mode 100644
index 000000000..b5160cd24
--- /dev/null
+++ b/g4s/adm/popular_list.php
@@ -0,0 +1,165 @@
+전체목록';
+
+$g4['title'] = '인기검색어관리';
+include_once('./admin.head.php');
+
+$colspan = 4;
+?>
+
+
+
+
+
+ 인기검색어 검색
+
+
+ 건수 : 개
+
+
+ >검색어
+ >등록일
+
+
+
+
+
+
+
+ 인기검색어 목록
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 선택삭제
+
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/popular_rank.php b/g4s/adm/popular_rank.php
new file mode 100644
index 000000000..2082cf146
--- /dev/null
+++ b/g4s/adm/popular_rank.php
@@ -0,0 +1,110 @@
+ '' and pp_date between '{$fr_date}' and '{$to_date}' ";
+$sql_group = " group by pp_word ";
+$sql_order = " order by cnt desc ";
+
+$sql = " select pp_word {$sql_common} {$sql_search} {$sql_group} ";
+$result = sql_query($sql);
+$total_count = mysql_num_rows($result);
+
+$rows = $config['cf_page_rows'];
+$total_page = ceil($total_count / $rows); // 전체 페이지 계산
+if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
+$from_record = ($page - 1) * $rows; // 시작 열을 구함
+
+$sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} ";
+$result = sql_query($sql);
+
+$listall = '';
+if (!empty($_GET['fr_date']) || !empty($_GET['to_date']))
+ $listall = '전체목록 ';
+
+$g4['title'] = '인기검색어순위';
+include_once('./admin.head.php');
+
+$colspan = 3;
+?>
+
+
+
+
+
+ 인기검색어 검색
+
+
+ 건수 개
+
+ 기간설정
+ 부터
+ 까지
+
+
+
+
+
+ 인기검색어 순위 및 내역
+
+
+
+
+
+
+
+
+
+
+ 순위
+ 검색어
+ 검색회수
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ ?>
+
+
+
+
+
+
+
+
+
diff --git a/g4s/adm/sendmail_test.php b/g4s/adm/sendmail_test.php
new file mode 100644
index 000000000..43a8e9f00
--- /dev/null
+++ b/g4s/adm/sendmail_test.php
@@ -0,0 +1,66 @@
+[메일검사] 내용이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.
'.date("Y-m-d H:i:s").'
이 메일 주소로는 회신되지 않습니다.', 1);
+
+ echo '';
+ echo '결과메세지 ';
+ echo '';
+ echo '다음 '.count($email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
+ echo '
';
+ echo '';
+ for ($i=0;$i'.$email[$i].'';
+ }
+ echo ' ';
+ echo '';
+ echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오. ';
+ echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오. ';
+ echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오. ';
+ echo '
';
+ echo ' ';
+}
+?>
+
+
+
+
diff --git a/g4s/adm/session_file_delete.php b/g4s/adm/session_file_delete.php
new file mode 100644
index 000000000..30b5c661e
--- /dev/null
+++ b/g4s/adm/session_file_delete.php
@@ -0,0 +1,62 @@
+
+
+
+
+ 완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
+
+
+ 세션 디렉토리를 열지못했습니다.";
+ } else {
+ $list_tag_st = "
\n완료됨 \n";
+ $list_tag_end = " \n";
+ }
+
+ $cnt=0;
+ echo $list_tag_st;
+ while($file=readdir($dir)) {
+
+ if (!strstr($file,'sess_')) continue;
+ if (strpos($file,'sess_')!=0) continue;
+
+ $session_file = G4_DATA_PATH.'/session/'.$file;
+
+ if (!$atime=@fileatime($session_file)) {
+ continue;
+ }
+ if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
+ $cnt++;
+ $return = unlink($session_file);
+ //echo "\n";
+ echo "
{$session_file} \n";
+
+ flush();
+
+ if ($cnt%10==0)
+ //echo "\n";
+ echo "\n";
+ }
+ }
+ echo $list_tag_end;
+ //echo "\n";
+ echo "
세션데이터 {$cnt}건 삭제 완료. 프로그램의 실행을 끝마치셔도 좋습니다.
\n";
+?>
+
+
+
diff --git a/g4s/adm/sql_write.sql b/g4s/adm/sql_write.sql
new file mode 100644
index 000000000..63e86974e
--- /dev/null
+++ b/g4s/adm/sql_write.sql
@@ -0,0 +1,42 @@
+CREATE TABLE `__TABLE_NAME__` (
+ `wr_id` int(11) NOT NULL auto_increment,
+ `wr_num` int(11) NOT NULL default '0',
+ `wr_reply` varchar(10) NOT NULL default '',
+ `wr_parent` int(11) NOT NULL default '0',
+ `wr_is_comment` tinyint(4) NOT NULL default '0',
+ `wr_comment` int(11) NOT NULL default '0',
+ `wr_comment_reply` varchar(5) NOT NULL default '',
+ `ca_name` varchar(255) NOT NULL default '',
+ `wr_option` set('html1','html2','secret','mail') NOT NULL default '',
+ `wr_subject` varchar(255) NOT NULL default '',
+ `wr_content` text NOT NULL,
+ `wr_link1` text NOT NULL,
+ `wr_link2` text NOT NULL,
+ `wr_link1_hit` int(11) NOT NULL default '0',
+ `wr_link2_hit` int(11) NOT NULL default '0',
+ `wr_trackback` varchar(255) NOT NULL default '',
+ `wr_hit` int(11) NOT NULL default '0',
+ `wr_good` int(11) NOT NULL default '0',
+ `wr_nogood` int(11) NOT NULL default '0',
+ `mb_id` varchar(255) NOT NULL default '',
+ `wr_password` varchar(255) NOT NULL default '',
+ `wr_name` varchar(255) NOT NULL default '',
+ `wr_email` varchar(255) NOT NULL default '',
+ `wr_homepage` varchar(255) NOT NULL default '',
+ `wr_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
+ `wr_last` varchar(19) NOT NULL default '',
+ `wr_ip` varchar(255) NOT NULL default '',
+ `wr_1` varchar(255) NOT NULL default '',
+ `wr_2` varchar(255) NOT NULL default '',
+ `wr_3` varchar(255) NOT NULL default '',
+ `wr_4` varchar(255) NOT NULL default '',
+ `wr_5` varchar(255) NOT NULL default '',
+ `wr_6` varchar(255) NOT NULL default '',
+ `wr_7` varchar(255) NOT NULL default '',
+ `wr_8` varchar(255) NOT NULL default '',
+ `wr_9` varchar(255) NOT NULL default '',
+ `wr_10` varchar(255) NOT NULL default '',
+ PRIMARY KEY (`wr_id`),
+ KEY `wr_num_reply_parent` (`wr_num`,`wr_reply`,`wr_parent`),
+ KEY `wr_is_comment` (`wr_is_comment`,`wr_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\ No newline at end of file
diff --git a/g4s/adm/thumbnail_file_delete.php b/g4s/adm/thumbnail_file_delete.php
new file mode 100644
index 000000000..b170eabb6
--- /dev/null
+++ b/g4s/adm/thumbnail_file_delete.php
@@ -0,0 +1,67 @@
+
+
+
+
+ 완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
+
+ 썸네일디렉토리를 열지못했습니다.';
+ }
+
+ $cnt=0;
+ echo '
'.PHP_EOL;
+
+ foreach($directory as $dir) {
+ $files = glob($dir.'/thumb-*');
+ if (is_array($files)) {
+ foreach($files as $thumbnail) {
+ $cnt++;
+ @unlink($thumbnail);
+
+ echo ''.$thumbnail.' '.PHP_EOL;
+
+ flush();
+
+ if ($cnt%10==0)
+ echo PHP_EOL;
+ }
+ }
+ }
+
+ echo '완료됨 '.PHP_EOL;
+ echo '
썸네일 '.$cnt.'건의 삭제가 완료됐습니다. 프로그램의 실행을 끝마치셔도 좋습니다.
'.PHP_EOL;
+ ?>
+
+
+
\ No newline at end of file
diff --git a/g4s/adm/visit.sub.php b/g4s/adm/visit.sub.php
new file mode 100644
index 000000000..0bc01cfcc
--- /dev/null
+++ b/g4s/adm/visit.sub.php
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+ 기간별 접속자집계 검색
+ 부터
+ 까지
+
+
+
+
+
diff --git a/g4s/adm/visit_browser.php b/g4s/adm/visit_browser.php
new file mode 100644
index 000000000..be27555c2
--- /dev/null
+++ b/g4s/adm/visit_browser.php
@@ -0,0 +1,94 @@
+ $max) $max = $arr[$s];
+
+ $sum_count++;
+}
+?>
+
+
+ 브라우저별 접속자 수
+
+
+
+
+ 순위
+ 브라우저
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+ $value) {
+ $count = $arr[$key];
+ if ($save_count != $count) {
+ $i++;
+ $no = $i;
+ $save_count = $count;
+ } else {
+ $no = "";
+ }
+
+ $rate = ($count / $sum_count * 100);
+ $s_rate = number_format($rate, 1);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
diff --git a/g4s/adm/visit_date.php b/g4s/adm/visit_date.php
new file mode 100644
index 000000000..73548d2ca
--- /dev/null
+++ b/g4s/adm/visit_date.php
@@ -0,0 +1,84 @@
+ $max) $max = $row['cnt'];
+
+ $sum_count += $row['cnt'];
+}
+?>
+
+
+ 일별 접속자 수
+
+
+
+
+ 년-월-일
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+ $value) {
+ $count = $value;
+
+ $rate = ($count / $sum_count * 100);
+ $s_rate = number_format($rate, 1);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
diff --git a/g4s/adm/visit_domain.php b/g4s/adm/visit_domain.php
new file mode 100644
index 000000000..6cc4501dc
--- /dev/null
+++ b/g4s/adm/visit_domain.php
@@ -0,0 +1,103 @@
+ $max) $max = $arr[$s];
+
+ $sum_count++;
+}
+?>
+
+
+ 도메인별 접속자 수
+
+
+
+
+ 순위
+ 접속 도메인
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+ $value) {
+ $count = $arr[$key];
+ if ($save_count != $count) {
+ $i++;
+ $no = $i;
+ $save_count = $count;
+ } else {
+ $no = '';
+ }
+
+ if (!$key) {
+ $link = '';
+ $link2 = '';
+ $key = '직접';
+ } else {
+ $link = '';
+ $link2 = ' ';
+ }
+
+ $rate = ($count / $sum_count * 100);
+ $s_rate = number_format($rate, 1);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
diff --git a/g4s/adm/visit_hour.php b/g4s/adm/visit_hour.php
new file mode 100644
index 000000000..4ab7f6783
--- /dev/null
+++ b/g4s/adm/visit_hour.php
@@ -0,0 +1,81 @@
+ $max) $max = $row['cnt'];
+
+ $sum_count += $row['cnt'];
+}
+?>
+
+
+ 시간대별 접속자 수
+
+
+
+
+ 시간
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
diff --git a/g4s/adm/visit_list.php b/g4s/adm/visit_list.php
new file mode 100644
index 000000000..2613ef8bb
--- /dev/null
+++ b/g4s/adm/visit_list.php
@@ -0,0 +1,110 @@
+
+
+
+ 접속자 개요
+ IP, 경로, 브라우저, 운영체제, 일시
+
+
+
+
+ IP
+ 접속 경로
+ 브라우저
+ 운영체제
+ 일시
+
+
+
+ ', '&'), array("<", ">", "&"), $referer);
+ $link = '';
+ $link = str_replace('&', "&", $link);
+ $link2 = ' ';
+ }
+
+ if ($is_admin == 'super')
+ $ip = $row['vi_ip'];
+ else
+ $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']);
+
+ if ($brow == '기타') { $brow = ''.$brow.' '; }
+ if ($os == '기타') { $os = ''.$os.' '; }
+
+ ?>
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ ?>
+
+
+
+
+
diff --git a/g4s/adm/visit_month.php b/g4s/adm/visit_month.php
new file mode 100644
index 000000000..031c7debf
--- /dev/null
+++ b/g4s/adm/visit_month.php
@@ -0,0 +1,88 @@
+ $max) $max = $row['cnt'];
+
+ $sum_count += $row['cnt'];
+}
+?>
+
+
+ 월별 접속자 수
+
+
+
+
+ 년-월
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+ $value) {
+ $count = $value;
+
+ $rate = ($count / $sum_count * 100);
+ $s_rate = number_format($rate, 1);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
+
diff --git a/g4s/adm/visit_os.php b/g4s/adm/visit_os.php
new file mode 100644
index 000000000..dc9d7ee66
--- /dev/null
+++ b/g4s/adm/visit_os.php
@@ -0,0 +1,98 @@
+ $max) $max = $arr[$s];
+
+ $sum_count++;
+}
+?>
+
+
+ 운영체제별 접속자 수
+
+
+
+
+ 순위
+ OS
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+ $value) {
+ $count = $arr[$key];
+ if ($save_count != $count) {
+ $i++;
+ $no = $i;
+ $save_count = $count;
+ } else {
+ $no = '';
+ }
+
+ if (!$key) {
+ $key = '직접';
+ }
+
+ $rate = ($count / $sum_count * 100);
+ $s_rate = number_format($rate, 1);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
diff --git a/g4s/adm/visit_week.php b/g4s/adm/visit_week.php
new file mode 100644
index 000000000..7b1402270
--- /dev/null
+++ b/g4s/adm/visit_week.php
@@ -0,0 +1,80 @@
+
+
+
+ 요일별 접속자 수
+
+
+
+
+ 요일
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
diff --git a/g4s/adm/visit_year.php b/g4s/adm/visit_year.php
new file mode 100644
index 000000000..7732ead55
--- /dev/null
+++ b/g4s/adm/visit_year.php
@@ -0,0 +1,85 @@
+ $max) $max = $row['cnt'];
+
+ $sum_count += $row['cnt'];
+}
+?>
+
+
+ 연간 접속자 수
+
+
+
+
+ 년
+ 그래프
+ 접속자수
+ 비율(%)
+
+
+
+
+ 합계
+
+ 100%
+
+
+
+ $value) {
+ $count = $value;
+
+ $rate = ($count / $sum_count * 100);
+ $s_rate = number_format($rate, 1);
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ }
+ ?>
+
+
+
+
+
diff --git a/g4s/bbs/_common.php b/g4s/bbs/_common.php
new file mode 100644
index 000000000..b556cc9d3
--- /dev/null
+++ b/g4s/bbs/_common.php
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/_head.php b/g4s/bbs/_head.php
new file mode 100644
index 000000000..3a0ffc1f8
--- /dev/null
+++ b/g4s/bbs/_head.php
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/_head.sub.php b/g4s/bbs/_head.sub.php
new file mode 100644
index 000000000..63c8bec50
--- /dev/null
+++ b/g4s/bbs/_head.sub.php
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/_tail.php b/g4s/bbs/_tail.php
new file mode 100644
index 000000000..71b49a5ea
--- /dev/null
+++ b/g4s/bbs/_tail.php
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/_tail.sub.php b/g4s/bbs/_tail.sub.php
new file mode 100644
index 000000000..c279b8547
--- /dev/null
+++ b/g4s/bbs/_tail.sub.php
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/ajax.mb_email.php b/g4s/bbs/ajax.mb_email.php
new file mode 100644
index 000000000..38de70660
--- /dev/null
+++ b/g4s/bbs/ajax.mb_email.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/ajax.mb_hp.php b/g4s/bbs/ajax.mb_hp.php
new file mode 100644
index 000000000..7d09efcf8
--- /dev/null
+++ b/g4s/bbs/ajax.mb_hp.php
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/ajax.mb_id.php b/g4s/bbs/ajax.mb_id.php
new file mode 100644
index 000000000..71ffa090b
--- /dev/null
+++ b/g4s/bbs/ajax.mb_id.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/ajax.mb_nick.php b/g4s/bbs/ajax.mb_nick.php
new file mode 100644
index 000000000..cbb0c88e1
--- /dev/null
+++ b/g4s/bbs/ajax.mb_nick.php
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/alert.php b/g4s/bbs/alert.php
new file mode 100644
index 000000000..9b31f0a42
--- /dev/null
+++ b/g4s/bbs/alert.php
@@ -0,0 +1,107 @@
+", $msg);
+
+if (!$url) $url = $_SERVER['HTTP_REFERER'];
+
+if($error) {
+ $header2 = "다음 항목에 오류가 있습니다.";
+} else {
+ $header2 = "다음 내용을 확인해 주세요.";
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+ $value) {
+ if(strlen($value) < 1)
+ continue;
+
+ if(preg_match("/pass|pwd|capt|url/", $key))
+ continue;
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
돌아가기
+
+*/ ?>
+
+
+
+
\ No newline at end of file
diff --git a/g4s/bbs/alert_close.php b/g4s/bbs/alert_close.php
new file mode 100644
index 000000000..9c609fff9
--- /dev/null
+++ b/g4s/bbs/alert_close.php
@@ -0,0 +1,61 @@
+", $msg);
+
+if($error) {
+ $header2 = "다음 항목에 오류가 있습니다.";
+ $msg3 = "새창을 닫으시고 이전 작업을 다시 시도해 주세요.";
+} else {
+ $header2 = "다음 내용을 확인해 주세요.";
+ $msg3 = "새창을 닫으신 후 서비스를 이용해 주세요.";
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+*/ ?>
+
+
+
+
\ No newline at end of file
diff --git a/g4s/bbs/board.php b/g4s/bbs/board.php
new file mode 100644
index 000000000..436017da0
--- /dev/null
+++ b/g4s/bbs/board.php
@@ -0,0 +1,213 @@
+ ".$board['bo_subject'];
+} else {
+ if ($member['mb_level'] < $board['bo_list_level']) {
+ if ($member['mb_id'])
+ alert('목록을 볼 권한이 없습니다.', G4_URL);
+ else
+ alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
+ }
+
+ if (!isset($page) || (isset($page) && $page == 0)) $page = 1;
+
+ $g4['title'] = $board['bo_subject']." ".$page." 페이지";
+}
+
+include_once(G4_PATH.'/head.sub.php');
+
+$width = $board['bo_table_width'];
+if ($width <= 100)
+ $width .= '%';
+else
+ $width .='px';
+
+// IP보이기 사용 여부
+$ip = "";
+$is_ip_view = $board['bo_use_ip_view'];
+if ($is_admin) {
+ $is_ip_view = true;
+ if (array_key_exists('wr_ip', $write)) {
+ $ip = $write['wr_ip'];
+ }
+} else {
+ // 관리자가 아니라면 IP 주소를 감춘후 보여줍니다.
+ if (isset($write['wr_ip'])) {
+ $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $write['wr_ip']);
+ }
+}
+
+// 분류 사용
+$is_category = false;
+$category_name = '';
+if ($board['bo_use_category']) {
+ $is_category = true;
+ if (array_key_exists('ca_name', $write)) {
+ $category_name = $write['ca_name']; // 분류명
+ }
+}
+
+// 추천 사용
+$is_good = false;
+if ($board['bo_use_good'])
+ $is_good = true;
+
+// 비추천 사용
+$is_nogood = false;
+if ($board['bo_use_nogood'])
+ $is_nogood = true;
+
+$admin_href = "";
+// 최고관리자 또는 그룹관리자라면
+if ($member['mb_id'] && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id']))
+ $admin_href = G4_ADMIN_URL.'/board_form.php?w=u&bo_table='.$bo_table;
+
+include_once('./board_head.php');
+
+// 게시물 아이디가 있다면 게시물 보기를 INCLUDE
+if (isset($wr_id) && $wr_id) {
+ include_once('./view.php');
+}
+
+// 전체목록보이기 사용이 "예" 또는 wr_id 값이 없다면 목록을 보임
+//if ($board['bo_use_list_view'] || empty($wr_id))
+if ($member['mb_level'] >= $board['bo_list_level'] && $board['bo_use_list_view'] || empty($wr_id))
+ include_once ('./list.php');
+
+include_once('./board_tail.php');
+
+echo "\n\n";
+
+include_once(G4_PATH.'/tail.sub.php');
+?>
diff --git a/g4s/bbs/board_head.php b/g4s/bbs/board_head.php
new file mode 100644
index 000000000..41597e5e3
--- /dev/null
+++ b/g4s/bbs/board_head.php
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/board_list_update.php b/g4s/bbs/board_list_update.php
new file mode 100644
index 000000000..a43924024
--- /dev/null
+++ b/g4s/bbs/board_list_update.php
@@ -0,0 +1,21 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/board_tail.php b/g4s/bbs/board_tail.php
new file mode 100644
index 000000000..ee6981e1a
--- /dev/null
+++ b/g4s/bbs/board_tail.php
@@ -0,0 +1,13 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/confirm.php b/g4s/bbs/confirm.php
new file mode 100644
index 000000000..b0a47775e
--- /dev/null
+++ b/g4s/bbs/confirm.php
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ 아래 내용을 확인해 주세요.
+
+
+
+
+
+
+확인
+취소
+돌아가기
+
+
+
\ No newline at end of file
diff --git a/g4s/bbs/current_connect.php b/g4s/bbs/current_connect.php
new file mode 100644
index 000000000..9fc7e0f97
--- /dev/null
+++ b/g4s/bbs/current_connect.php
@@ -0,0 +1,32 @@
+ '{$config['cf_admin']}'
+ order by a.lo_datetime desc ";
+$result = sql_query($sql);
+for ($i=0; $row=sql_fetch_array($result); $i++) {
+ $list[$i] = $row;
+
+ if ($row['mb_id']) {
+ $list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']);
+ } else {
+ if ($is_admin)
+ $list[$i]['name'] = $row[lo_ip];
+ else
+ $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['lo_ip']);
+ }
+
+ $list[$i]['num'] = sprintf('%03d',$i+1);
+}
+
+include_once($connect_skin_path.'/current_connect.skin.php');
+
+include_once('./_tail.php');
+?>
\ No newline at end of file
diff --git a/g4s/bbs/delete.php b/g4s/bbs/delete.php
new file mode 100644
index 000000000..166c198af
--- /dev/null
+++ b/g4s/bbs/delete.php
@@ -0,0 +1,138 @@
+ '{$write['wr_id']}'
+ and wr_num = '{$write['wr_num']}'
+ and wr_is_comment = 0 ";
+$row = sql_fetch($sql);
+if ($row['cnt'] && !$is_admin)
+ alert('이 글과 관련된 답변글이 존재하므로 삭제 할 수 없습니다.\\n\\n우선 답변글부터 삭제하여 주십시오.');
+
+// 코멘트 달린 원글의 삭제 여부
+$sql = " select count(*) as cnt from $write_table
+ where wr_parent = '$wr_id'
+ and mb_id <> '{$member['mb_id']}'
+ and wr_is_comment = 1 ";
+$row = sql_fetch($sql);
+if ($row['cnt'] >= $board['bo_count_delete'] && !$is_admin)
+ alert('이 글과 관련된 코멘트가 존재하므로 삭제 할 수 없습니다.\\n\\n코멘트가 '.$board['bo_count_delete'].'건 이상 달린 원글은 삭제할 수 없습니다.');
+
+
+// 사용자 코드 실행
+@include_once($board_skin_path.'/delete.skin.php');
+
+
+// 나라오름님 수정 : 원글과 코멘트수가 정상적으로 업데이트 되지 않는 오류를 잡아 주셨습니다.
+//$sql = " select wr_id, mb_id, wr_comment from $write_table where wr_parent = '$write[wr_id]' order by wr_id ";
+$sql = " select wr_id, mb_id, wr_is_comment, wr_content from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id ";
+$result = sql_query($sql);
+while ($row = sql_fetch_array($result))
+{
+ // 원글이라면
+ if (!$row['wr_is_comment'])
+ {
+ // 원글 포인트 삭제
+ if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '쓰기'))
+ insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글삭제");
+
+ // 업로드된 파일이 있다면 파일삭제
+ $sql2 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
+ $result2 = sql_query($sql2);
+ while ($row2 = sql_fetch_array($result2)) {
+ @unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
+ // 썸네일삭제
+ if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
+ delete_board_thumbnail($bo_table, $row2['bf_file']);
+ }
+ }
+
+ // 에디터 썸네일 삭제
+ delete_editor_thumbnail($row['wr_content']);
+
+ // 파일테이블 행 삭제
+ sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
+
+ // syndication ping
+ include G4_SYNDI_PATH.'/include/include.bbs.delete.php';
+
+ $count_write++;
+ }
+ else
+ {
+ // 코멘트 포인트 삭제
+ if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '코멘트'))
+ insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 코멘트삭제");
+
+ $count_comment++;
+ }
+}
+
+// 게시글 삭제
+sql_query(" delete from $write_table where wr_parent = '{$write['wr_id']}' ");
+
+// 최근게시물 삭제
+sql_query(" delete from {$g4['board_new_table']} where bo_table = '$bo_table' and wr_parent = '{$write['wr_id']}' ");
+
+// 스크랩 삭제
+sql_query(" delete from {$g4['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' ");
+
+// 공지사항 삭제
+$notice_array = explode("\n", trim($board['bo_notice']));
+$bo_notice = "";
+for ($k=0; $k 0 || $count_comment > 0)
+ sql_query(" update {$g4['board_table']} set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' ");
+
+@include_once($board_skin_path.'/delete.tail.skin.php');
+
+delete_cache_latest($bo_table);
+
+goto_url('./board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
+?>
diff --git a/g4s/bbs/delete_all.php b/g4s/bbs/delete_all.php
new file mode 100644
index 000000000..5de1ae4fc
--- /dev/null
+++ b/g4s/bbs/delete_all.php
@@ -0,0 +1,154 @@
+=0; $i--)
+{
+ $write = sql_fetch(" select * from $write_table where wr_id = '$tmp_array[$i]' ");
+
+ if ($is_admin == 'super') // 최고관리자 통과
+ ;
+ else if ($is_admin == 'group') // 그룹관리자
+ {
+ $mb = get_member($write['mb_id']);
+ if ($member['mb_id'] == $group['gr_admin']) // 자신이 관리하는 그룹인가?
+ {
+ if ($member['mb_level'] >= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
+ ;
+ else
+ continue;
+ }
+ else
+ continue;
+ }
+ else if ($is_admin == 'board') // 게시판관리자이면
+ {
+ $mb = get_member($write['mb_id']);
+ if ($member['mb_id'] == $board['bo_admin']) // 자신이 관리하는 게시판인가?
+ if ($member['mb_level'] >= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
+ ;
+ else
+ continue;
+ else
+ continue;
+ }
+ else if ($member['mb_id'] && $member['mb_id'] == $write['mb_id']) // 자신의 글이라면
+ {
+ ;
+ }
+ else if ($wr_password && !$write['mb_id'] && sql_password($wr_password) == $write['wr_password']) // 패스워드가 같다면
+ {
+ ;
+ }
+ else
+ continue; // 나머지는 삭제 불가
+
+ $len = strlen($write['wr_reply']);
+ if ($len < 0) $len = 0;
+ $reply = substr($write['wr_reply'], 0, $len);
+
+ // 원글만 구한다.
+ $sql = " select count(*) as cnt from $write_table
+ where wr_reply like '$reply%'
+ and wr_id <> '{$write['wr_id']}'
+ and wr_num = '{$write['wr_num']}'
+ and wr_is_comment = 0 ";
+ $row = sql_fetch($sql);
+ if ($row['cnt'])
+ continue;
+
+ // 나라오름님 수정 : 원글과 코멘트수가 정상적으로 업데이트 되지 않는 오류를 잡아 주셨습니다.
+ //$sql = " select wr_id, mb_id, wr_comment from {$write_table} where wr_parent = '{$write[wr_id]}' order by wr_id ";
+ $sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id ";
+ $result = sql_query($sql);
+ while ($row = sql_fetch_array($result))
+ {
+ // 원글이라면
+ if (!$row['wr_is_comment'])
+ {
+ // 원글 포인트 삭제
+ if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '쓰기'))
+ insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글 삭제");
+
+ // 업로드된 파일이 있다면
+ $sql2 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
+ $result2 = sql_query($sql2);
+ while ($row2 = sql_fetch_array($result2)) {
+ // 파일삭제
+ @unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
+
+ // 썸네일삭제
+ if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
+ delete_board_thumbnail($bo_table, $row2['bf_file']);
+ }
+ }
+
+ // 에디터 썸네일 삭제
+ delete_editor_thumbnail($row['wr_content']);
+
+ // 파일테이블 행 삭제
+ sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
+
+ // syndication ping
+ include G4_SYNDI_PATH.'/include/include.bbs.delete_all.php';
+
+ $count_write++;
+ }
+ else
+ {
+ // 코멘트 포인트 삭제
+ if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '코멘트'))
+ insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 코멘트삭제");
+
+ $count_comment++;
+ }
+ }
+
+ // 게시글 삭제
+ sql_query(" delete from $write_table where wr_parent = '{$write['wr_id']}' ");
+
+ // 최근게시물 삭제
+ sql_query(" delete from {$g4['board_new_table']} where bo_table = '$bo_table' and wr_parent = '{$write['wr_id']}' ");
+
+ // 스크랩 삭제
+ sql_query(" delete from {$g4['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' ");
+
+ // 공지사항 삭제
+ $notice_array = explode(',', trim($board['bo_notice']));
+ $bo_notice = "";
+ for ($k=0; $k 0 || $count_comment > 0)
+ sql_query(" update {$g4['board_table']} set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' ");
+
+// 4.11
+@include_once($board_skin_path.'/delete_all.tail.skin.php');
+
+delete_cache_latest($bo_table);
+
+goto_url('./board.php?bo_table='.$bo_table.'&page='.$page.$qstr);
+?>
diff --git a/g4s/bbs/delete_comment.php b/g4s/bbs/delete_comment.php
new file mode 100644
index 000000000..2f9762725
--- /dev/null
+++ b/g4s/bbs/delete_comment.php
@@ -0,0 +1,88 @@
+= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
+ ;
+ else
+ alert('그룹관리자의 권한보다 높은 회원의 코멘트이므로 삭제할 수 없습니다.');
+ } else
+ alert('자신이 관리하는 그룹의 게시판이 아니므로 코멘트를 삭제할 수 없습니다.');
+} else if ($is_admin == 'board') { // 게시판관리자이면
+ $mb = get_member($write['mb_id']);
+ if ($member['mb_id'] == $board['bo_admin']) { // 자신이 관리하는 게시판인가?
+ if ($member['mb_level'] >= $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
+ ;
+ else
+ alert('게시판관리자의 권한보다 높은 회원의 코멘트이므로 삭제할 수 없습니다.');
+ } else
+ alert('자신이 관리하는 게시판이 아니므로 코멘트를 삭제할 수 없습니다.');
+} else if ($member['mb_id']) {
+ if ($member['mb_id'] != $write['mb_id'])
+ alert('자신의 글이 아니므로 삭제할 수 없습니다.');
+} else {
+ if (sql_password($wr_password) != $write['wr_password'])
+ alert('패스워드가 틀립니다.');
+}
+
+$len = strlen($write['wr_comment_reply']);
+if ($len < 0) $len = 0;
+$comment_reply = substr($write['wr_comment_reply'], 0, $len);
+
+$sql = " select count(*) as cnt from {$write_table}
+ where wr_comment_reply like '{$comment_reply}%'
+ and wr_id <> '{$comment_id}'
+ and wr_parent = '{$write[wr_parent]}'
+ and wr_comment = '{$write[wr_comment]}'
+ and wr_is_comment = 1 ";
+$row = sql_fetch($sql);
+if ($row['cnt'] && !$is_admin)
+ alert('이 코멘트와 관련된 답변코멘트가 존재하므로 삭제 할 수 없습니다.');
+
+// 코멘트 삭제
+if (!delete_point($write['mb_id'], $bo_table, $comment_id, '코멘트'))
+ insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제");
+
+// 코멘트 삭제
+sql_query(" delete from {$write_table} where wr_id = '{$comment_id}' ");
+
+// 코멘트가 삭제되므로 해당 게시물에 대한 최근 시간을 다시 얻는다.
+$sql = " select max(wr_datetime) as wr_last from {$write_table} where wr_parent = '{$write['wr_parent']}' ";
+$row = sql_fetch($sql);
+
+// 원글의 코멘트 숫자를 감소
+sql_query(" update {$write_table} set wr_comment = wr_comment - 1, wr_last = '{$row['wr_last']}' where wr_id = '{$write['wr_parent']}' ");
+
+// 코멘트 숫자 감소
+sql_query(" update {$g4['board_table']} set bo_count_comment = bo_count_comment - 1 where bo_table = '{$bo_table}' ");
+
+// 새글 삭제
+sql_query(" delete from {$g4['board_new_table']} where bo_table = '{$bo_table}' and wr_id = '{$comment_id}' ");
+
+// 사용자 코드 실행
+@include_once($board_skin_path.'/delete_comment.skin.php');
+@include_once($board_skin_path.'/delete_comment.tail.skin.php');
+
+delete_cache_latest($bo_table);
+
+goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'&page='.$page. $qstr);
+?>
diff --git a/g4s/bbs/download.php b/g4s/bbs/download.php
new file mode 100644
index 000000000..9687fed04
--- /dev/null
+++ b/g4s/bbs/download.php
@@ -0,0 +1,114 @@
+ 1) // 회원이상 다운로드가 가능하다면
+ {
+ // 다운로드 포인트가 음수이고 회원의 포인트가 0 이거나 작다면
+ if ($member['mb_point'] + $board['bo_download_point'] < 0)
+ alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 다운로드('.number_format($board['bo_download_point']).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 다운로드 해 주십시오.');
+
+ // 게시물당 한번만 차감하도록 수정
+ insert_point($member['mb_id'], $board['bo_download_point'], "{$board['bo_subject']} $wr_id 파일 다운로드", $bo_table, $wr_id, "다운로드");
+ }
+
+ // 다운로드 카운트 증가
+ $sql = " update {$g4['board_file_table']} set bf_download = bf_download + 1 where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$no' ";
+ sql_query($sql);
+
+ set_session($ss_name, TRUE);
+}
+
+$g4['title'] = '다운로드 > '.conv_subject($write['wr_subject'], 255);
+
+$original = urlencode($file['bf_source']);
+
+@include_once($board_skin_path.'/download.tail.skin.php');
+
+if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
+ header("content-type: doesn/matter");
+ header("content-length: ".filesize("$filepath"));
+ header("content-disposition: attachment; filename=\"$original\"");
+ header("content-transfer-encoding: binary");
+} else {
+ header("content-type: file/unknown");
+ header("content-length: ".filesize("$filepath"));
+ header("content-disposition: attachment; filename=\"$original\"");
+ header("content-description: php generated data");
+}
+header("pragma: no-cache");
+header("expires: 0");
+flush();
+
+$fp = fopen($filepath, 'rb');
+
+// 4.00 대체
+// 서버부하를 줄이려면 print 나 echo 또는 while 문을 이용한 방법보다는 이방법이...
+//if (!fpassthru($fp)) {
+// fclose($fp);
+//}
+
+$download_rate = 10;
+
+while(!feof($fp)) {
+ //echo fread($fp, 100*1024);
+ /*
+ echo fread($fp, 100*1024);
+ flush();
+ */
+
+ print fread($fp, round($download_rate * 1024));
+ flush();
+ usleep(1000);
+}
+fclose ($fp);
+flush();
+?>
diff --git a/g4s/bbs/email_certify.php b/g4s/bbs/email_certify.php
new file mode 100644
index 000000000..8ae489c50
--- /dev/null
+++ b/g4s/bbs/email_certify.php
@@ -0,0 +1,21 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/email_stop.php b/g4s/bbs/email_stop.php
new file mode 100644
index 000000000..d94b7a7e9
--- /dev/null
+++ b/g4s/bbs/email_stop.php
@@ -0,0 +1,21 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/filter.ajax.php b/g4s/bbs/filter.ajax.php
new file mode 100644
index 000000000..14e2850e8
--- /dev/null
+++ b/g4s/bbs/filter.ajax.php
@@ -0,0 +1,33 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/formmail.php b/g4s/bbs/formmail.php
new file mode 100644
index 000000000..4d99cbe97
--- /dev/null
+++ b/g4s/bbs/formmail.php
@@ -0,0 +1,43 @@
+ 3)
+ alert_close('한번 접속후 일정수의 메일만 발송할 수 있습니다.\\n\\n계속해서 메일을 보내시려면 다시 로그인 또는 접속하여 주십시오.');
+
+$g4['title'] = '메일 쓰기';
+include_once(G4_PATH.'/head.sub.php');
+
+if (!$name)
+ $name = base64_decode($email);
+
+if (!isset($type))
+ $type = 0;
+
+$type_checked[0] = $type_checked[1] = $type_checked[2] = "";
+$type_checked[$type] = 'checked';
+
+include_once($member_skin_path.'/formmail.skin.php');
+
+include_once(G4_PATH.'/tail.sub.php');
+?>
diff --git a/g4s/bbs/formmail_send.php b/g4s/bbs/formmail_send.php
new file mode 100644
index 000000000..d557a48d6
--- /dev/null
+++ b/g4s/bbs/formmail_send.php
@@ -0,0 +1,51 @@
+ 1)
+ alert_close('한번에 한사람에게만 메일을 발송할 수 있습니다.');
+
+
+if (!chk_captcha()) {
+ alert('자동등록방지 숫자가 틀렸습니다.');
+}
+
+
+for ($i=1; $i<=$attach; $i++) {
+ if ($_FILES['file'.$i]['name'])
+ $file[] = attach_file($_FILES['file'.$i]['name'], $_FILES['file'.$i]['tmp_name']);
+}
+
+$content = stripslashes($content);
+if ($type == 2) {
+ $type = 1;
+ $content = preg_replace("/\n/", " ", $content);
+}
+
+// html 이면
+if ($type) {
+ $current_url = G4_URL;
+ $mail_content = '메일보내기 '.$content.'';
+}
+else
+ $mail_content = $content;
+
+mailer($fnick, $fmail, $to, $subject, $mail_content, $type, $file);
+
+//$html_title = $tmp_to . "님께 메일발송";
+$html_title = '메일 발송중';
+include_once(G4_PATH.'/head.sub.php');
+
+alert_close('메일을 정상적으로 발송하였습니다.');
+
+include_once(G4_PATH.'/tail.sub.php');
+?>
\ No newline at end of file
diff --git a/g4s/bbs/good.php b/g4s/bbs/good.php
new file mode 100644
index 000000000..31997f5c3
--- /dev/null
+++ b/g4s/bbs/good.php
@@ -0,0 +1,154 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/group.php b/g4s/bbs/group.php
new file mode 100644
index 000000000..caf1d13a4
--- /dev/null
+++ b/g4s/bbs/group.php
@@ -0,0 +1,45 @@
+
+
+
+
+ 'mobile' order by bo_order ";
+$result = sql_query($sql);
+for ($i=0; $row=sql_fetch_array($result); $i++) {
+ $lt_style = "";
+ if ($i%2==1) $lt_style = "margin-left:20px";
+ else $lt_style = "";
+?>
+
+ 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
+
+ // 사용방법
+ // latest(스킨, 게시판아이디, 출력라인, 글자수);
+ echo latest('basic', $row['bo_table'], 5, 70);
+ ?>
+
+
+
+
+
diff --git a/g4s/bbs/link.php b/g4s/bbs/link.php
new file mode 100644
index 000000000..cdf6b0dc9
--- /dev/null
+++ b/g4s/bbs/link.php
@@ -0,0 +1,27 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/list.php b/g4s/bbs/list.php
new file mode 100644
index 000000000..76a5746b3
--- /dev/null
+++ b/g4s/bbs/list.php
@@ -0,0 +1,188 @@
+';
+ }
+}
+
+$sop = strtolower($sop);
+if ($sop != 'and' && $sop != 'or')
+ $sop = 'and';
+
+// 분류 선택 또는 검색어가 있다면
+$stx = trim($stx);
+if ($sca || $stx) {
+ $sql_search = get_sql_search($sca, $sfl, $stx, $sop);
+
+ // 가장 작은 번호를 얻어서 변수에 저장 (하단의 페이징에서 사용)
+ $sql = " select MIN(wr_num) as min_wr_num from {$write_table} ";
+ $row = sql_fetch($sql);
+ $min_spt = (int)$row['min_wr_num'];
+
+ if (!$spt) $spt = $min_spt;
+
+ $sql_search .= " and (wr_num between {$spt} and ({$spt} + {$config['cf_search_part']})) ";
+
+ // 원글만 얻는다. (코멘트의 내용도 검색하기 위함)
+ $sql = " select distinct wr_parent from {$write_table} where {$sql_search} ";
+ $result = sql_query($sql);
+ $total_count = mysql_num_rows($result);
+} else {
+ $sql_search = "";
+
+ $total_count = $board['bo_count_write'];
+}
+
+if(G4_IS_MOBILE) {
+ $page_rows = $board['bo_mobile_page_rows'];
+} else {
+ $page_rows = $board['bo_page_rows'];
+}
+
+$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
+if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
+$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
+
+// 관리자라면 CheckBox 보임
+$is_checkbox = false;
+if ($is_member && ($is_admin == 'super' || $group['gr_admin'] == $member['mb_id'] || $board['bo_admin'] == $member['mb_id']))
+ $is_checkbox = true;
+
+// 정렬에 사용하는 QUERY_STRING
+$qstr2 = 'bo_table='.$bo_table.'&sop='.$sop;
+
+// 0 으로 나눌시 오류를 방지하기 위하여 값이 없으면 1 로 설정
+$bo_gallery_cols = $board['bo_gallery_cols'] ? $board['bo_gallery_cols'] : 1;
+$td_width = (int)(100 / $bo_gallery_cols);
+
+// 정렬
+// 인덱스 필드가 아니면 정렬에 사용하지 않음
+//if (!$sst || ($sst && !(strstr($sst, 'wr_id') || strstr($sst, "wr_datetime")))) {
+if (!$sst) {
+ if ($board['bo_sort_field']) {
+ $sst = $board['bo_sort_field'];
+ } else {
+ $sst = "wr_num, wr_reply";
+ $sod = "";
+ }
+} else {
+ // 게시물 리스트의 정렬 대상 필드가 아니라면 공백으로 (nasca 님 09.06.16)
+ // 리스트에서 다른 필드로 정렬을 하려면 아래의 코드에 해당 필드를 추가하세요.
+ // $sst = preg_match("/^(wr_subject|wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : "";
+ $sst = preg_match("/^(wr_datetime|wr_hit|wr_good|wr_nogood)$/i", $sst) ? $sst : "";
+}
+
+if ($sst) {
+ $sql_order = " order by {$sst} {$sod} ";
+}
+
+if ($sca || $stx) {
+ $sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows ";
+} else {
+ $sql = " select * from {$write_table} where wr_is_comment = 0 {$sql_order} limit {$from_record}, $page_rows ";
+}
+$result = sql_query($sql);
+
+// 년도 2자리
+$today2 = G4_TIME_YMD;
+
+$list = array();
+$i = 0;
+
+if (!$sca && !$stx) {
+ $arr_notice = explode(',', trim($board['bo_notice']));
+ for ($k=0; $k= $min_spt)
+ $prev_spt = $spt - $config['cf_search_part'];
+ if (isset($min_spt) && $prev_spt >= $min_spt) {
+ $prev_part_href = './board.php?bo_table='.$bo_table.$qstr.'&spt='.$prev_spt.'&page=1';
+ $write_pages = page_insertbefore($write_pages, '이전검색 ');
+ }
+
+ $next_spt = $spt + $config['cf_search_part'];
+ if ($next_spt < 0) {
+ $next_part_href = './board.php?bo_table='.$bo_table.$qstr.'&spt='.$next_spt.'&page=1';
+ $write_pages = page_insertafter($write_pages, '다음검색 ');
+ }
+}
+
+
+$write_href = '';
+if ($member['mb_level'] >= $board['bo_write_level']) {
+ $write_href = './write.php?bo_table='.$bo_table;
+}
+
+$nobr_begin = $nobr_end = "";
+if (preg_match("/gecko|firefox/i", $_SERVER['HTTP_USER_AGENT'])) {
+ $nobr_begin = '';
+ $nobr_end = ' ';
+}
+
+// RSS 보기 사용에 체크가 되어 있어야 RSS 보기 가능 061106
+$rss_href = '';
+if ($board['bo_use_rss_view']) {
+ $rss_href = './rss.php?bo_table='.$bo_table;
+}
+
+$stx = get_text(stripslashes($stx));
+include_once($board_skin_path.'/list.skin.php');
+?>
diff --git a/g4s/bbs/login.php b/g4s/bbs/login.php
new file mode 100644
index 000000000..31f1ada32
--- /dev/null
+++ b/g4s/bbs/login.php
@@ -0,0 +1,57 @@
+
diff --git a/g4s/bbs/login_check.php b/g4s/bbs/login_check.php
new file mode 100644
index 000000000..760974eee
--- /dev/null
+++ b/g4s/bbs/login_check.php
@@ -0,0 +1,78 @@
+$value) {
+ if ($key != 'mb_id' && $key != 'mb_password' && $key != 'x' && $key != 'y' && $key != 'url') {
+ $link .= "$split$key=$value";
+ $split = "&";
+ }
+ }
+} else {
+ $link = G4_URL;
+}
+
+goto_url($link);
+?>
diff --git a/g4s/bbs/logout.php b/g4s/bbs/logout.php
new file mode 100644
index 000000000..f3c5bff41
--- /dev/null
+++ b/g4s/bbs/logout.php
@@ -0,0 +1,27 @@
+
diff --git a/g4s/bbs/member_confirm.php b/g4s/bbs/member_confirm.php
new file mode 100644
index 000000000..2b16ef5c6
--- /dev/null
+++ b/g4s/bbs/member_confirm.php
@@ -0,0 +1,20 @@
+
diff --git a/g4s/bbs/member_leave.php b/g4s/bbs/member_leave.php
new file mode 100644
index 000000000..04fba74e5
--- /dev/null
+++ b/g4s/bbs/member_leave.php
@@ -0,0 +1,25 @@
+
diff --git a/g4s/bbs/memo.php b/g4s/bbs/memo.php
new file mode 100644
index 000000000..b4891868a
--- /dev/null
+++ b/g4s/bbs/memo.php
@@ -0,0 +1,80 @@
+
diff --git a/g4s/bbs/memo_delete.php b/g4s/bbs/memo_delete.php
new file mode 100644
index 000000000..5c0ed9b12
--- /dev/null
+++ b/g4s/bbs/memo_delete.php
@@ -0,0 +1,26 @@
+
diff --git a/g4s/bbs/memo_form.php b/g4s/bbs/memo_form.php
new file mode 100644
index 000000000..b7bbfb6e5
--- /dev/null
+++ b/g4s/bbs/memo_form.php
@@ -0,0 +1,42 @@
+'
+ ."\n".' >'
+ ."\n".' >'.preg_replace("/\n/", "\n> ", get_text($row['me_memo'], 0))
+ ."\n".' >'
+ .' >';
+
+ }
+}
+
+$g4['title'] = '쪽지 보내기';
+include_once(G4_PATH.'/head.sub.php');
+
+$memo_action_url = G4_HTTPS_BBS_URL."/memo_form_update.php";
+include_once($member_skin_path.'/memo_form.skin.php');
+
+include_once(G4_PATH.'/tail.sub.php');
+?>
diff --git a/g4s/bbs/memo_form_update.php b/g4s/bbs/memo_form_update.php
new file mode 100644
index 000000000..6c587a064
--- /dev/null
+++ b/g4s/bbs/memo_form_update.php
@@ -0,0 +1,81 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/memo_view.php b/g4s/bbs/memo_view.php
new file mode 100644
index 000000000..337af8a7c
--- /dev/null
+++ b/g4s/bbs/memo_view.php
@@ -0,0 +1,71 @@
+ '{$me_id}'
+ and me_{$kind}_mb_id = '{$member['mb_id']}'
+ order by me_id asc
+ limit 1 ";
+$prev = sql_fetch($sql);
+if ($prev['me_id'])
+ $prev_link = './memo_view.php?kind='.$kind.'&me_id='.$prev['me_id'];
+else
+ //$prev_link = 'javascript:alert(\'쪽지의 처음입니다.\');';
+ $prev_link = '';
+
+
+// 다음 쪽지
+$sql = " select * from {$g4[memo_table]}
+ where me_id < '{$me_id}'
+ and me_{$kind}_mb_id = '{$member[mb_id]}'
+ order by me_id desc
+ limit 1 ";
+$next = sql_fetch($sql);
+if ($next[me_id])
+ $next_link = './memo_view.php?kind='.$kind.'&me_id='.$next[me_id];
+else
+ //$next_link = 'javascript:alert(\'쪽지의 마지막입니다.\');';
+ $next_link = '';
+
+$mb = get_member($memo['me_'.$unkind.'_mb_id']);
+
+include_once($member_skin_path.'/memo_view.skin.php');
+
+include_once(G4_PATH.'/tail.sub.php');
+?>
diff --git a/g4s/bbs/memocall.php b/g4s/bbs/memocall.php
new file mode 100644
index 000000000..2abd139b3
--- /dev/null
+++ b/g4s/bbs/memocall.php
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+ 아래 내용을 확인해 주세요.
+
+
+
+ ", $memo_msg); ?>
+
+
+확인
+취소
+
+
+
+
\ No newline at end of file
diff --git a/g4s/bbs/move.php b/g4s/bbs/move.php
new file mode 100644
index 000000000..adda3c89f
--- /dev/null
+++ b/g4s/bbs/move.php
@@ -0,0 +1,138 @@
+ '$bo_table' ";
+if ($is_admin == 'group')
+ $sql .= " and b.gr_admin = '{$member['mb_id']}' ";
+else if ($is_admin == 'board')
+ $sql .= " and a.bo_admin = '{$member['mb_id']}' ";
+$sql .= " order by a.gr_id, a.bo_order, a.bo_table ";
+$result = sql_query($sql);
+for ($i=0; $row=sql_fetch_array($result); $i++)
+{
+ $list[$i] = $row;
+}
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/g4s/bbs/move_update.php b/g4s/bbs/move_update.php
new file mode 100644
index 000000000..de33c4620
--- /dev/null
+++ b/g4s/bbs/move_update.php
@@ -0,0 +1,198 @@
+[이 게시물은 '.$nick.'님에 의해 '.G4_TIME_YMDHIS.' '.$board['bo_subject'].'에서 '.($sw == 'copy' ? '복사' : '이동').' 됨]';
+
+ $sql = " insert into $move_write_table
+ set wr_num = '$next_wr_num',
+ wr_reply = '{$row2['wr_reply']}',
+ wr_is_comment = '{$row2['wr_is_comment']}',
+ wr_comment = '{$row2['wr_comment']}',
+ wr_comment_reply = '{$row2['wr_comment_reply']}',
+ ca_name = '".addslashes($row2['ca_name'])."',
+ wr_option = '{$row2['wr_option']}',
+ wr_subject = '".addslashes($row2['wr_subject'])."',
+ wr_content = '".addslashes($row2['wr_content'])."',
+ wr_link1 = '".addslashes($row2['wr_link1'])."',
+ wr_link2 = '".addslashes($row2['wr_link2'])."',
+ wr_link1_hit = '{$row2['wr_link1_hit']}',
+ wr_link2_hit = '{$row2['wr_link2_hit']}',
+ wr_hit = '{$row2['wr_hit']}',
+ wr_good = '{$row2['wr_good']}',
+ wr_nogood = '{$row2['wr_nogood']}',
+ mb_id = '{$row2['mb_id']}',
+ wr_password = '{$row2['wr_password']}',
+ wr_name = '".addslashes($row2['wr_name'])."',
+ wr_email = '".addslashes($row2['wr_email'])."',
+ wr_homepage = '".addslashes($row2['wr_homepage'])."',
+ wr_datetime = '{$row2['wr_datetime']}',
+ wr_last = '{$row2['wr_last']}',
+ wr_ip = '{$row2['wr_ip']}',
+ wr_1 = '".addslashes($row2['wr_1'])."',
+ wr_2 = '".addslashes($row2['wr_2'])."',
+ wr_3 = '".addslashes($row2['wr_3'])."',
+ wr_4 = '".addslashes($row2['wr_4'])."',
+ wr_5 = '".addslashes($row2['wr_5'])."',
+ wr_6 = '".addslashes($row2['wr_6'])."',
+ wr_7 = '".addslashes($row2['wr_7'])."',
+ wr_8 = '".addslashes($row2['wr_8'])."',
+ wr_9 = '".addslashes($row2['wr_9'])."',
+ wr_10 = '".addslashes($row2['wr_10'])."' ";
+ sql_query($sql);
+
+ $insert_id = mysql_insert_id();
+
+ // 코멘트가 아니라면
+ if (!$row2['wr_is_comment'])
+ {
+ $save_parent = $insert_id;
+
+ $sql3 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' order by bf_no ";
+ $result3 = sql_query($sql3);
+ for ($k=0; $row3 = sql_fetch_array($result3); $k++)
+ {
+ if ($row3['bf_file'])
+ {
+ // 원본파일을 복사하고 퍼미션을 변경
+ @copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$row3['bf_file']);
+ @chmod($dst_dir/$row3['bf_file'], 0606);
+ }
+
+ $sql = " insert into {$g4['board_file_table']}
+ set bo_table = '$move_bo_table',
+ wr_id = '$insert_id',
+ bf_no = '{$row3['bf_no']}',
+ bf_source = '{$row3['bf_source']}',
+ bf_file = '{$row3['bf_file']}',
+ bf_download = '{$row3['bf_download']}',
+ bf_content = '".addslashes($row3['bf_content'])."',
+ bf_filesize = '{$row3['bf_filesize']}',
+ bf_width = '{$row3['bf_width']}',
+ bf_height = '{$row3['bf_height']}',
+ bf_type = '{$row3['bf_type']}',
+ bf_datetime = '{$row3['bf_datetime']}' ";
+ sql_query($sql);
+
+ if ($sw == 'move' && $row3['bf_file'])
+ $save[$cnt]['bf_file'][$k] = $src_dir.'/'.$row3['bf_file'];
+ }
+
+ $count_write++;
+
+ if ($sw == 'move' && $i == 0)
+ {
+ // 스크랩 이동
+ sql_query(" update {$g4['scrap_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");
+
+ // 최신글 이동
+ sql_query(" update {$g4['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$save_parent', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");
+ }
+ }
+ else
+ {
+ $count_comment++;
+
+ if ($sw == 'move')
+ {
+ // 최신글 이동
+ sql_query(" update {$g4['board_new_table']} set bo_table = '$move_bo_table', wr_id = '$insert_id', wr_parent = '$save_parent' where bo_table = '$bo_table' and wr_id = '{$row2['wr_id']}' ");
+ }
+ }
+
+ sql_query(" update $move_write_table set wr_parent = '$save_parent' where wr_id = '$insert_id' ");
+
+ if ($sw == 'move')
+ $save[$cnt]['wr_id'] = $row2['wr_parent'];
+
+ $cnt++;
+ }
+
+ sql_query(" update {$g4['board_table']} set bo_count_write = bo_count_write + '$count_write' where bo_table = '$move_bo_table' ");
+ sql_query(" update {$g4['board_table']} set bo_count_comment = bo_count_comment + '$count_comment' where bo_table = '$move_bo_table' ");
+
+ delete_cache_latest($move_bo_table);
+ }
+
+ $save_count_write += $count_write;
+ $save_count_comment += $count_comment;
+}
+
+delete_cache_latest($bo_table);
+
+if ($sw == 'move')
+{
+ for ($i=0; $i
+
+
+
+ "$msg"
+
+돌아가기
+
+HEREDOC;
+?>
diff --git a/g4s/bbs/new.php b/g4s/bbs/new.php
new file mode 100644
index 000000000..027574785
--- /dev/null
+++ b/g4s/bbs/new.php
@@ -0,0 +1,111 @@
+ a.wr_parent ";
+
+$mb_id = isset($_GET['mb_id']) ? $_GET['mb_id'] : "";
+if ($mb_id) {
+ $sql_common .= " and a.mb_id = '{$mb_id}' ";
+}
+$sql_order = " order by a.bn_id desc ";
+
+$sql = " select count(*) as cnt {$sql_common} ";
+$row = sql_fetch($sql);
+$total_count = $row['cnt'];
+
+$rows = $config['cf_new_rows'];
+$total_page = ceil($total_count / $rows); // 전체 페이지 계산
+if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+$from_record = ($page - 1) * $rows; // 시작 열을 구함
+
+$group_select = '전체그룹';
+$sql = " select gr_id, gr_subject from {$g4['group_table']} order by gr_id ";
+$result = sql_query($sql);
+for ($i=0; $row=sql_fetch_array($result); $i++) {
+ $group_select .= " ".$row['gr_subject'];
+}
+$group_select .= ' ';
+
+$list = array();
+$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$from_record}, {$rows} ";
+$result = sql_query($sql);
+for ($i=0; $row=sql_fetch_array($result); $i++) {
+ $tmp_write_table = $g4['write_prefix'].$row['bo_table'];
+
+ if ($row['wr_id'] == $row['wr_parent']) {
+
+ // 원글
+ $comment = "";
+ $comment_link = "";
+ $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '$row[wr_id]' ");
+ $list[$i] = $row2;
+
+ $name = get_sideview($row2['mb_id'], cut_str($row2['wr_name'], $config['cf_cut_name']), $row2['wr_email'], $row2['wr_homepage']);
+ // 당일인 경우 시간으로 표시함
+ $datetime = substr($row2['wr_datetime'],0,10);
+ $datetime2 = $row2['wr_datetime'];
+ if ($datetime == G4_TIME_YMD) {
+ $datetime2 = substr($datetime2,11,5);
+ } else {
+ $datetime2 = substr($datetime2,5,5);
+ }
+
+ } else {
+
+ // 코멘트
+ $comment = '[코] ';
+ $comment_link = '#c_'.$row['wr_id'];
+ $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_parent']}' ");
+ $row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
+ $list[$i] = $row2;
+ $list[$i]['mb_id'] = $row3['mb_id'];
+ $list[$i]['wr_name'] = $row3['wr_name'];
+ $list[$i]['wr_email'] = $row3['wr_email'];
+ $list[$i]['wr_homepage'] = $row3['wr_homepage'];
+
+ $name = get_sideview($row3['mb_id'], cut_str($row3['wr_name'], $config['cf_cut_name']), $row3['wr_email'], $row3['wr_homepage']);
+ // 당일인 경우 시간으로 표시함
+ $datetime = substr($row3['wr_datetime'],0,10);
+ $datetime2 = $row3['wr_datetime'];
+ if ($datetime == G4_TIME_YMD) {
+ $datetime2 = substr($datetime2,11,5);
+ } else {
+ $datetime2 = substr($datetime2,5,5);
+ }
+
+ }
+
+ $list[$i]['gr_id'] = $row['gr_id'];
+ $list[$i]['bo_table'] = $row['bo_table'];
+ $list[$i]['name'] = $name;
+ $list[$i]['comment'] = $comment;
+ $list[$i]['href'] = './board.php?bo_table='.$row['bo_table'].'&wr_id='.$row2['wr_id'].$comment_link;
+ $list[$i]['datetime'] = $datetime;
+ $list[$i]['datetime2'] = $datetime2;
+
+ $list[$i]['gr_subject'] = $row['gr_subject'];
+ $list[$i]['bo_subject'] = $row['bo_subject'];
+ $list[$i]['wr_subject'] = $row2['wr_subject'];
+}
+
+$write_pages = get_paging(G4_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "?gr_id=$gr_id&view=$view&mb_id=$mb_id&page=");
+
+include_once($new_skin_path.'/new.skin.php');
+
+include_once('./_tail.php');
+?>
diff --git a/g4s/bbs/password.php b/g4s/bbs/password.php
new file mode 100644
index 000000000..af6ca6156
--- /dev/null
+++ b/g4s/bbs/password.php
@@ -0,0 +1,53 @@
+
diff --git a/g4s/bbs/password_check.php b/g4s/bbs/password_check.php
new file mode 100644
index 000000000..9f1198ec6
--- /dev/null
+++ b/g4s/bbs/password_check.php
@@ -0,0 +1,22 @@
+
diff --git a/g4s/bbs/password_lost.php b/g4s/bbs/password_lost.php
new file mode 100644
index 000000000..fd9d5ebf4
--- /dev/null
+++ b/g4s/bbs/password_lost.php
@@ -0,0 +1,16 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/password_lost2.php b/g4s/bbs/password_lost2.php
new file mode 100644
index 000000000..a99635255
--- /dev/null
+++ b/g4s/bbs/password_lost2.php
@@ -0,0 +1,73 @@
+ 1)
+ alert('동일한 메일주소가 2개 이상 존재합니다.\\n\\n관리자에게 문의하여 주십시오.');
+
+$sql = " select mb_no, mb_id, mb_name, mb_nick, mb_email, mb_datetime from {$g4['member_table']} where mb_email = '$email' ";
+$mb = sql_fetch($sql);
+if (!$mb['mb_id'])
+ alert('존재하지 않는 회원입니다.');
+else if (is_admin($mb['mb_id']))
+ alert('관리자 아이디는 접근 불가합니다.');
+
+// 난수 발생
+srand(time());
+$change_password = rand(100000, 999999);
+$mb_lost_certify = sql_password($change_password);
+$mb_datetime = sql_password($mb['mb_datetime']);
+
+$sql = " update {$g4['member_table']} set mb_lost_certify = '$mb_lost_certify' where mb_id = '{$mb['mb_id']}' ";
+sql_query($sql);
+
+$href = G4_BBS_URL.'/password_lost_certify.php?mb_no='.$mb['mb_no'].'&mb_datetime='.$mb_datetime.'&mb_lost_certify='.$mb_lost_certify;
+
+$subject = "[".$config['cf_title']."] 요청하신 회원 아이디/패스워드 정보입니다.";
+
+$content = "";
+
+$content .= '';
+$content .= '
';
+$content .= '
';
+$content .= '회원 패스워드가 변경되었습니다.';
+$content .= ' ';
+$content .= '
';
+$content .= ''.$config['cf_title'].' ';
+$content .= ' ';
+$content .= '
';
+$content .= addslashes($mb['mb_name'])." (".addslashes($mb['mb_nick']).")"." 회원님은 ".G4_TIME_YMDHIS." 에 회원정보 찾기 요청을 하셨습니다. ";
+$content .= '저희 사이트는 관리자라도 회원님의 비밀번호를 알 수 없기 때문에, 비밀번호를 알려드리는 대신 새로운 비밀번호를 생성하여 안내 해드리고 있습니다. ';
+$content .= '아래에서 변경될 패스워드를 확인하신 후, 패스워드 변경 링크를 클릭 하십시오. ';
+$content .= '패스워드가 변경되었다는 인증 메세지가 출력되면, 홈페이지에서 회원아이디와 변경된 패스워드를 입력하시고 로그인 하십시오. ';
+$content .= '로그인 후에는 정보수정 메뉴에서 새로운 패스워드로 변경해 주십시오.';
+$content .= '
';
+$content .= '
';
+$content .= '회원아이디 '.$mb['mb_id'].' ';
+$content .= '변경될 패스워드 '.$change_password.' ';
+$content .= '
';
+$content .= '
패스워드 변경 ';
+$content .= '
';
+$content .= '
';
+
+$admin = get_admin('super');
+mailer($admin['mb_nick'], $admin['mb_email'], $mb['mb_email'], $subject, $content, 1);
+
+alert_close($email.' 메일로 회원아이디와 패스워드를 인증할 수 있는 메일이 발송 되었습니다.\\n\\n메일을 확인하여 주십시오.');
+?>
\ No newline at end of file
diff --git a/g4s/bbs/password_lost_certify.php b/g4s/bbs/password_lost_certify.php
new file mode 100644
index 000000000..4a69b2940
--- /dev/null
+++ b/g4s/bbs/password_lost_certify.php
@@ -0,0 +1,27 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/point.php b/g4s/bbs/point.php
new file mode 100644
index 000000000..6e7d8b1b4
--- /dev/null
+++ b/g4s/bbs/point.php
@@ -0,0 +1,112 @@
+= 0) {
+ $sum_point1 += $row['po_point'];
+ } else {
+ $sum_point2 += $row['po_point'];
+ }
+}
+?>
+
+
+
+
+
+ 포인트 사용내역 목록
+
+
+ 일시
+ 내용
+ 지급포인트
+ 사용포인트
+
+
+
+
+ 소계
+
+
+
+
+ 보유포인트
+
+
+
+
+ 0) {
+ $point1 = '+' .number_format($row['po_point']);
+ $sum_point1 += $row['po_point'];
+ } else {
+ $point2 = number_format($row['po_point']);
+ $sum_point2 += $row['po_point'];
+ }
+
+ ?>
+
+
+
+
+
+
+ 자료가 없습니다. ';
+ else {
+ if ($sum_point1 > 0)
+ $sum_point1 = "+" . number_format($sum_point1);
+ $sum_point2 = number_format($sum_point2);
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/g4s/bbs/poll_etc_update.php b/g4s/bbs/poll_etc_update.php
new file mode 100644
index 000000000..bc7f24727
--- /dev/null
+++ b/g4s/bbs/poll_etc_update.php
@@ -0,0 +1,55 @@
+
diff --git a/g4s/bbs/poll_etc_update_mail.php b/g4s/bbs/poll_etc_update_mail.php
new file mode 100644
index 000000000..141decc87
--- /dev/null
+++ b/g4s/bbs/poll_etc_update_mail.php
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+설문조사 기타의견 메일
+
+
+
+
+
+
+
+
+
+
+ 작성자 ()
+
+
+
+
+
+
+
+
+
diff --git a/g4s/bbs/poll_result.php b/g4s/bbs/poll_result.php
new file mode 100644
index 000000000..adce95ba7
--- /dev/null
+++ b/g4s/bbs/poll_result.php
@@ -0,0 +1,102 @@
+ $max)
+ $max = $count;
+}
+$nf_total_po_cnt = number_format($total_po_cnt);
+
+$list = array();
+
+for ($i=1; $i<=9; $i++) {
+ $poll = $po['po_poll'.$i];
+ if ($poll == '') { break; }
+
+ $list[$i]['content'] = $poll;
+ $list[$i]['cnt'] = $po['po_cnt'.$i];
+ if ($total_po_cnt > 0)
+ $list[$i]['rate'] = ($list[$i]['cnt'] / $total_po_cnt) * 100;
+
+ $bar = (int)($list[$i]['cnt'] / $max * 100);
+
+ $list[$i]['bar'] = $bar;
+ $list[$i]['num'] = $i;
+}
+
+$list2 = array();
+
+// 기타의견 리스트
+$sql = " select a.*, b.mb_open
+ from {$g4['poll_etc_table']} a
+ left join {$g4['member_table']} b on (a.mb_id = b.mb_id)
+ where po_id = '{$po_id}' order by pc_id desc ";
+$result = sql_query($sql);
+for ($i=0; $row=sql_fetch_array($result); $i++) {
+ $list2[$i]['pc_name'] = $row['pc_name'];
+ $list2[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['pc_name'],10), '', '', $row['mb_open']);
+ $list2[$i]['idea'] = get_text(cut_str($row['pc_idea'], 255));
+ $list2[$i]['datetime'] = $row['pc_datetime'];
+
+ $list2[$i]['del'] = '';
+ if ($is_admin == 'super' || ($row['mb_id'] == $member['mb_id'] && $row['mb_id']))
+ $list2[$i]['del'] = '';
+}
+
+// 기타의견 입력
+$is_etc = false;
+if ($po['po_etc']) {
+ $is_etc = true;
+ $po_etc = $po['po_etc'];
+ if ($member['mb_id'])
+ $name = ''.$member['mb_nick'].' ';
+ else
+ $name = ' ';
+}
+
+$list3 = array();
+
+// 다른투표
+$sql = " select po_id, po_subject, po_date from {$g4['poll_table']} order by po_id desc ";
+$result = sql_query($sql);
+for ($i=0; $row2=sql_fetch_array($result); $i++) {
+ $list3[$i]['po_id'] = $row2['po_id'];
+ $list3[$i]['date'] = substr($row2['po_date'],2,8);
+ $list3[$i]['subject'] = cut_str($row2['po_subject'],60,"…");
+}
+
+if (G4_IS_MOBILE) {
+ $poll_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/poll/'.$skin_dir;
+ $poll_skin_url = G4_MOBILE_URL.'/'.G4_SKIN_DIR.'/poll/'.$skin_dir;
+} else {
+ $poll_skin_path = G4_SKIN_PATH.'/poll/'.$skin_dir;
+ $poll_skin_url = G4_SKIN_URL.'/poll/'.$skin_dir;
+}
+
+include_once(G4_PATH.'/head.sub.php');
+
+if (!file_exists($poll_skin_path.'/poll_result.skin.php')) die('skin error');
+include_once ($poll_skin_path.'/poll_result.skin.php');
+
+include_once(G4_PATH.'/tail.sub.php');
+?>
diff --git a/g4s/bbs/poll_update.php b/g4s/bbs/poll_update.php
new file mode 100644
index 000000000..9df689e6a
--- /dev/null
+++ b/g4s/bbs/poll_update.php
@@ -0,0 +1,60 @@
+
diff --git a/g4s/bbs/profile.php b/g4s/bbs/profile.php
new file mode 100644
index 000000000..906f199ab
--- /dev/null
+++ b/g4s/bbs/profile.php
@@ -0,0 +1,33 @@
+
diff --git a/g4s/bbs/register.php b/g4s/bbs/register.php
new file mode 100644
index 000000000..5c17c6d6a
--- /dev/null
+++ b/g4s/bbs/register.php
@@ -0,0 +1,19 @@
+
diff --git a/g4s/bbs/register_form.php b/g4s/bbs/register_form.php
new file mode 100644
index 000000000..d5c4930fd
--- /dev/null
+++ b/g4s/bbs/register_form.php
@@ -0,0 +1,117 @@
+
\ No newline at end of file
diff --git a/g4s/bbs/register_form_update.php b/g4s/bbs/register_form_update.php
new file mode 100644
index 000000000..297be4d4f
--- /dev/null
+++ b/g4s/bbs/register_form_update.php
@@ -0,0 +1,350 @@
+ date("Y-m-d", G4_SERVER_TIME - ($config['cf_nick_modify'] * 86400)))
+ $mb_nick = $member['mb_nick'];
+ // 회원정보의 메일을 이전 메일로 옮기고 아래에서 비교함
+ $old_email = $member['mb_email'];
+ }
+
+ if ($msg = exist_mb_nick($mb_nick, $mb_id)) alert($msg, "", true, true);
+ if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg, "", true, true);
+}
+
+// 사용자 코드 실행
+@include_once($member_skin_path.'/register_form_update.head.skin.php');
+
+$mb_dir = G4_DATA_PATH.'/member/'.substr($mb_id,0,2);
+
+// 아이콘 삭제
+if (isset($_POST['del_mb_icon'])) {
+ @unlink($mb_dir.'/'.$mb_id.'.gif');
+}
+
+$msg = "";
+
+// 아이콘 업로드
+$mb_icon = '';
+if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
+ if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
+ // 아이콘 용량이 설정값보다 이하만 업로드 가능
+ if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) {
+ @mkdir($mb_dir, 0707);
+ @chmod($mb_dir, 0707);
+ $dest_path = $mb_dir.'/'.$mb_id.'.gif';
+ move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
+ chmod($dest_path, 0606);
+ if (file_exists($dest_path)) {
+ //=================================================================\
+ // 090714
+ // gif 파일에 악성코드를 심어 업로드 하는 경우를 방지
+ // 에러메세지는 출력하지 않는다.
+ //-----------------------------------------------------------------
+ $size = getimagesize($dest_path);
+ if ($size[2] != 1) // gif 파일이 아니면 올라간 이미지를 삭제한다.
+ @unlink($dest_path);
+ else
+ // 아이콘의 폭 또는 높이가 설정값 보다 크다면 이미 업로드 된 아이콘 삭제
+ if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height'])
+ @unlink($dest_path);
+ //=================================================================\
+ }
+ }
+
+ } else {
+ $msg .= $_FILES['mb_icon']['name'].'은(는) gif 파일이 아닙니다.';
+ }
+}
+
+
+// 관리자님 회원정보
+$admin = get_admin('super');
+
+
+if ($w == '') {
+
+ $sql = " insert into {$g4['member_table']}
+ set mb_id = '{$mb_id}',
+ mb_password = '".sql_password($mb_password)."',
+ mb_name = '{$mb_name}',
+ mb_sex = '{$mb_sex}',
+ mb_birth = '{$mb_birth}',
+ mb_nick = '{$mb_nick}',
+ mb_nick_date = '".G4_TIME_YMD."',
+ mb_email = '{$mb_email}',
+ mb_homepage = '{$mb_homepage}',
+ mb_tel = '{$mb_tel}',
+ mb_hp = '{$mb_hp}',
+ mb_zip1 = '{$mb_zip1}',
+ mb_zip2 = '{$mb_zip2}',
+ mb_addr1 = '{$mb_addr1}',
+ mb_addr2 = '{$mb_addr2}',
+ mb_signature = '{$mb_signature}',
+ mb_profile = '{$mb_profile}',
+ mb_today_login = '".G4_TIME_YMDHIS."',
+ mb_datetime = '".G4_TIME_YMDHIS."',
+ mb_ip = '{$_SERVER['REMOTE_ADDR']}',
+ mb_level = '{$config['cf_register_level']}',
+ mb_recommend = '{$mb_recommend}',
+ mb_login_ip = '{$_SERVER['REMOTE_ADDR']}',
+ mb_mailling = '{$mb_mailling}',
+ mb_sms = '{$mb_sms}',
+ mb_open = '{$mb_open}',
+ mb_open_date = '".G4_TIME_YMD."',
+ mb_1 = '{$mb_1}',
+ mb_2 = '{$mb_2}',
+ mb_3 = '{$mb_3}',
+ mb_4 = '{$mb_4}',
+ mb_5 = '{$mb_5}',
+ mb_6 = '{$mb_6}',
+ mb_7 = '{$mb_7}',
+ mb_8 = '{$mb_8}',
+ mb_9 = '{$mb_9}',
+ mb_10 = '{$mb_10}' ";
+ // 이메일 인증을 사용하지 않는다면 이메일 인증시간을 바로 넣는다
+ if (!$config['cf_use_email_certify'])
+ $sql .= " , mb_email_certify = '".G4_TIME_YMDHIS."' ";
+ sql_query($sql);
+
+ // 회원가입 포인트 부여
+ insert_point($mb_id, $config['cf_register_point'], '회원가입 축하', '@member', $mb_id, '회원가입');
+
+ // 추천인에게 포인트 부여
+ if ($config['cf_use_recommend'] && $mb_recommend)
+ insert_point($mb_recommend, $config['cf_recommend_point'], $mb_id.'의 추천인', '@member', $mb_recommend, $mb_id.' 추천');
+
+ // 회원님께 메일 발송
+ if ($config['cf_email_mb_member']) {
+ $subject = '['.$config['cf_title'].'] 회원가입을 축하드립니다.';
+
+ $mb_md5 = md5($mb_id.$mb_email.G4_TIME_YMDHIS);
+ $certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
+
+ ob_start();
+ include_once ('./register_form_update_mail1.php');
+ $content = ob_get_contents();
+ ob_end_clean();
+
+ mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
+ }
+
+ // 최고관리자님께 메일 발송
+ if ($config['cf_email_mb_super_admin']) {
+ $subject = '['.$config['cf_title'].'] '.$mb_nick .' 님께서 회원으로 가입하셨습니다.';
+
+ ob_start();
+ include_once ('./register_form_update_mail2.php');
+ $content = ob_get_contents();
+ ob_end_clean();
+
+ mailer($mb_nick, $mb_email, $admin['mb_email'], $subject, $content, 1);
+ }
+
+ // 메일인증 사용하지 않는 경우에만 로그인
+ if (!$config['cf_use_email_certify'])
+ set_session('ss_mb_id', $mb_id);
+
+ set_session('ss_mb_reg', $mb_id);
+
+} else if ($w == 'u') {
+
+ if (!trim($_SESSION['ss_mb_id']))
+ alert('로그인 되어 있지 않습니다.');
+
+ if ($_SESSION['ss_mb_id'] != $mb_id)
+ alert("로그인된 정보와 수정하려는 정보가 틀리므로 수정할 수 없습니다.\\n만약 올바르지 않은 방법을 사용하신다면 바로 중지하여 주십시오.");
+
+ $sql_password = "";
+ if ($mb_password)
+ $sql_password = " , mb_password = '".sql_password($mb_password)."' ";
+
+ $sql_icon = "";
+ if ($mb_icon)
+ $sql_icon = " , mb_icon = '{$mb_icon}' ";
+
+ $sql_nick_date = "";
+ if ($mb_nick_default != $mb_nick)
+ $sql_nick_date = " , mb_nick_date = '".G4_TIME_YMD."' ";
+
+ $sql_open_date = "";
+ if ($mb_open_default != $mb_open)
+ $sql_open_date = " , mb_open_date = '".G4_TIME_YMD."' ";
+
+ $sql_sex = "";
+ if (isset($mb_sex))
+ $sql_sex = " , mb_sex = '{$mb_sex}' ";
+
+ // 이전 메일주소와 수정한 메일주소가 틀리다면 인증을 다시 해야하므로 값을 삭제
+ $sql_email_certify = '';
+ if ($old_email != $mb_email && $config['cf_use_email_certify'])
+ $sql_email_certify = " , mb_email_certify = '' ";
+
+ // set mb_name = '$mb_name', 제거
+ $sql = " update {$g4['member_table']}
+ set mb_nick = '{$mb_nick}',
+ mb_mailling = '{$mb_mailling}',
+ mb_sms = '{$mb_sms}',
+ mb_open = '{$mb_open}',
+ mb_email = '{$mb_email}',
+ mb_homepage = '{$mb_homepage}',
+ mb_tel = '{$mb_tel}',
+ mb_hp = '{$mb_hp}',
+ mb_zip1 = '{$mb_zip1}',
+ mb_zip2 = '{$mb_zip2}',
+ mb_addr1 = '{$mb_addr1}',
+ mb_addr2 = '{$mb_addr2}',
+ mb_signature = '{$mb_signature}',
+ mb_profile = '{$mb_profile}',
+ mb_1 = '{$mb_1}',
+ mb_2 = '{$mb_2}',
+ mb_3 = '{$mb_3}',
+ mb_4 = '{$mb_4}',
+ mb_5 = '{$mb_5}',
+ mb_6 = '{$mb_6}',
+ mb_7 = '{$mb_7}',
+ mb_8 = '{$mb_8}',
+ mb_9 = '{$mb_9}',
+ mb_10 = '{$mb_10}'
+ {$sql_password}
+ {$sql_icon}
+ {$sql_nick_date}
+ {$sql_open_date}
+ {$sql_sex}
+ {$sql_email_certify}
+ where mb_id = '$mb_id' ";
+ sql_query($sql);
+
+ // 인증메일 발송
+ if ($old_email != $mb_email && $config['cf_use_email_certify']) {
+ $subject = '['.$config['cf_title'].'] 인증확인 메일입니다.';
+
+ $mb_md5 = md5($mb_id.$mb_email.$member['mb_datetime']);
+ $certify_href = G4_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5;
+
+ ob_start();
+ include_once ('./register_form_update_mail3.php');
+ $content = ob_get_contents();
+ ob_end_clean();
+
+ mailer($admin['mb_nick'], $admin['mb_email'], $mb_email, $subject, $content, 1);
+ }
+}
+
+
+// 사용자 코드 실행
+@include_once ($member_skin_path.'/register_form_update.tail.skin.php');
+
+
+if ($msg)
+ echo '';
+
+if ($w == "") {
+ goto_url(G4_BBS_URL.'/register_result.php');
+} else if ($w == 'u') {
+ $row = sql_fetch(" select mb_password from {$g4['member_table']} where mb_id = '{$member['mb_id']}' ");
+ $tmp_password = $row['mb_password'];
+
+ if ($old_email != $mb_email && $config['cf_use_email_certify']) {
+ set_session("ss_mb_id", "");
+ alert('회원 정보가 수정 되었습니다.\n\nE-mail 주소가 변경되었으므로 다시 인증하셔야 합니다.', G4_URL);
+ } else {
+ alert('회원 정보가 수정 되었습니다.', G4_URL);
+ /*
+ echo '
+ 회원정보수정
+
+
+
+
+
+
+
+
+