그누보드5
This commit is contained in:
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.htaccess
|
||||||
|
data
|
||||||
|
test
|
||||||
|
config.php
|
||||||
|
sirgle
|
||||||
|
sr_*
|
||||||
|
google*
|
||||||
|
skin/latest/basic2
|
||||||
|
rankiss*
|
||||||
|
thumb.lib.php
|
||||||
|
test.php
|
||||||
|
itzimara*
|
||||||
|
nemoluv*
|
||||||
|
cheditor*
|
||||||
|
*.key
|
||||||
|
*.sh
|
||||||
208
LICENSE.txt
Normal file
208
LICENSE.txt
Normal file
@ -0,0 +1,208 @@
|
|||||||
|
소프트웨어 제품은 저작권법 및 국제저작권 협약을 비롯하여, 기타 지적재산권법 및 협약의 보호를 받습니다.
|
||||||
|
|
||||||
|
프로그램 명칭 : 그누보드5 ( GNU Board 5 )
|
||||||
|
|
||||||
|
저작자 : (주)에스아이알소프트 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
|
||||||
|
|
||||||
|
----- 끝 --------------------------------------------------------
|
||||||
3
_common.php
Normal file
3
_common.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./common.php');
|
||||||
|
?>
|
||||||
5
_head.php
Normal file
5
_head.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
include_once(G5_PATH.'/head.php');
|
||||||
|
?>
|
||||||
5
_tail.php
Normal file
5
_tail.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
include_once(G5_PATH.'/tail.php');
|
||||||
|
?>
|
||||||
5
adm/_common.php
Normal file
5
adm/_common.php
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
define('G5_IS_ADMIN', true);
|
||||||
|
include_once ('../common.php');
|
||||||
|
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||||
|
?>
|
||||||
126
adm/admin.head.php
Normal file
126
adm/admin.head.php
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
|
|
||||||
|
$begin_time = get_microtime();
|
||||||
|
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
|
function print_menu1($key, $no)
|
||||||
|
{
|
||||||
|
global $menu;
|
||||||
|
|
||||||
|
$str = print_menu2($key, $no);
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
function print_menu2($key, $no)
|
||||||
|
{
|
||||||
|
global $menu, $auth_menu, $is_admin, $auth, $g5;
|
||||||
|
|
||||||
|
$str .= "<ul class=\"gnb_2dul\">";
|
||||||
|
for($i=1; $i<count($menu[$key]); $i++)
|
||||||
|
{
|
||||||
|
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ($menu[$key][$i][4] == 1 && $gnb_grp_style == false) $gnb_grp_div = 'gnb_grp_div';
|
||||||
|
else if ($menu[$key][$i][4] != 1 && $gnb_grp_style == true) $gnb_grp_div = 'gnb_grp_div';
|
||||||
|
else $gnb_grp_div = '';
|
||||||
|
|
||||||
|
if ($menu[$key][$i][4] == 1) $gnb_grp_style = 'gnb_grp_style';
|
||||||
|
else $gnb_grp_style = '';
|
||||||
|
|
||||||
|
$str .= '<li class="gnb_2dli"><a href="'.$menu[$key][$i][2].'" class="gnb_2da '.$gnb_grp_style.' '.$gnb_grp_div.'">'.$menu[$key][$i][1].'</a></li>';
|
||||||
|
|
||||||
|
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
|
||||||
|
}
|
||||||
|
$str .= "</ul>";
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var tempX = 0;
|
||||||
|
var tempY = 0;
|
||||||
|
|
||||||
|
function imageview(id, w, h)
|
||||||
|
{
|
||||||
|
|
||||||
|
menu(id);
|
||||||
|
|
||||||
|
var el_id = document.getElementById(id);
|
||||||
|
|
||||||
|
//submenu = eval(name+".style");
|
||||||
|
submenu = el_id.style;
|
||||||
|
submenu.left = tempX - ( w + 11 );
|
||||||
|
submenu.top = tempY - ( h / 2 );
|
||||||
|
|
||||||
|
selectBoxVisible();
|
||||||
|
|
||||||
|
if (el_id.style.display != 'none')
|
||||||
|
selectBoxHidden(id);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div id="to_content"><a href="#container">본문 바로가기</a></div>
|
||||||
|
|
||||||
|
<header id="hd">
|
||||||
|
<div id="hd_wrap">
|
||||||
|
<h1><?php echo $config['cf_title'] ?></h1>
|
||||||
|
|
||||||
|
<div id="logo"><a href="<?php echo G5_ADMIN_URL ?>"><img src="<?php echo G5_ADMIN_URL ?>/img/logo.jpg" alt="<?php echo $config['cf_title'] ?> 관리자"></a></div>
|
||||||
|
|
||||||
|
<ul id="tnb">
|
||||||
|
<li><a href="<?php echo G5_ADMIN_URL ?>/member_form.php?w=u&mb_id=<?php echo $member['mb_id'] ?>">관리자정보</a></li>
|
||||||
|
<li><a href="<?php echo G5_ADMIN_URL ?>/config_form.php">환경설정</a></li>
|
||||||
|
<li><a href="<?php echo G5_URL ?>/">홈페이지</a></li>
|
||||||
|
<li><a href="<?php echo G5_BBS_URL ?>/logout.php">로그아웃</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<nav id="gnb">
|
||||||
|
<h2>관리자 주메뉴</h2>
|
||||||
|
<script>$('#gnb').addClass('gnb_js');</script>
|
||||||
|
<?php
|
||||||
|
$gnb_str = "<ul id=\"gnb_1dul\">";
|
||||||
|
foreach($amenu as $key=>$value) {
|
||||||
|
$href1 = $href2 = '';
|
||||||
|
if ($menu['menu'.$key][0][2]) {
|
||||||
|
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">';
|
||||||
|
$href2 = '</a>';
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$current_class = "";
|
||||||
|
if (isset($sub_menu) && (substr($sub_menu, 0, 2) == substr($menu['menu'.$key][0][0], 0, 2)))
|
||||||
|
$current_class = " gnb_1dli_air";
|
||||||
|
$gnb_str .= '<li class="gnb_1dli'.$current_class.'">'.PHP_EOL;
|
||||||
|
$gnb_str .= $href1 . $menu['menu'.$key][0][1] . $href2;
|
||||||
|
$gnb_str .= print_menu1('menu'.$key, 1);
|
||||||
|
$gnb_str .= "</li>";
|
||||||
|
if ($current_class) $current_class = ""; // 클래스 반복부여 방지
|
||||||
|
}
|
||||||
|
$gnb_str .= "</ul>";
|
||||||
|
echo $gnb_str;
|
||||||
|
?>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div id="wrapper">
|
||||||
|
|
||||||
|
<!-- <ul id="qnb">
|
||||||
|
<li><a href="<?php echo G5_ADMIN_URL ?>/member_list.php">회원</a></li>
|
||||||
|
<li><a href="<?php echo G5_ADMIN_URL ?>/board_list.php">게시판</a></li>
|
||||||
|
<li><a href="<?php echo G5_ADMIN_URL ?>/visit_list.php">접속자</a></li>
|
||||||
|
</ul> -->
|
||||||
|
|
||||||
|
<div id="container">
|
||||||
|
<div id="text_size">
|
||||||
|
<button class="no_text_resize" onclick="font_resize('container', 'default');">기본</button>
|
||||||
|
<button class="no_text_resize" onclick="font_resize('container', 'large');">크게</button>
|
||||||
|
<button class="no_text_resize" onclick="font_resize('container', 'larger');">더크게</button>
|
||||||
|
</div>
|
||||||
|
<h1><?php echo $g5['title'] ?></h1>
|
||||||
66
adm/admin.js
Normal file
66
adm/admin.js
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
function check_all(f)
|
||||||
|
{
|
||||||
|
var chk = document.getElementsByName("chk[]");
|
||||||
|
|
||||||
|
for (i=0; i<chk.length; i++)
|
||||||
|
chk[i].checked = f.chkall.checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
function btn_check(f, act)
|
||||||
|
{
|
||||||
|
if (act == "update") // 선택수정
|
||||||
|
{
|
||||||
|
f.action = list_update_php;
|
||||||
|
str = "수정";
|
||||||
|
}
|
||||||
|
else if (act == "delete") // 선택삭제
|
||||||
|
{
|
||||||
|
f.action = list_delete_php;
|
||||||
|
str = "삭제";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
|
||||||
|
var chk = document.getElementsByName("chk[]");
|
||||||
|
var bchk = false;
|
||||||
|
|
||||||
|
for (i=0; i<chk.length; i++)
|
||||||
|
{
|
||||||
|
if (chk[i].checked)
|
||||||
|
bchk = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bchk)
|
||||||
|
{
|
||||||
|
alert(str + "할 자료를 하나 이상 선택하세요.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (act == "delete")
|
||||||
|
{
|
||||||
|
if (!confirm("선택한 자료를 정말 삭제 하시겠습니까?"))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
f.submit();
|
||||||
|
}
|
||||||
|
|
||||||
|
function is_checked(elements_name)
|
||||||
|
{
|
||||||
|
var checked = false;
|
||||||
|
var chk = document.getElementsByName(elements_name);
|
||||||
|
for (var i=0; i<chk.length; i++) {
|
||||||
|
if (chk[i].checked) {
|
||||||
|
checked = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
function delete_confirm()
|
||||||
|
{
|
||||||
|
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?"))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
269
adm/admin.lib.php
Normal file
269
adm/admin.lib.php
Normal file
@ -0,0 +1,269 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
|
|
||||||
|
/*
|
||||||
|
// 081022 : CSRF 방지를 위해 코드를 작성했으나 효과가 없어 주석처리 함
|
||||||
|
if (!get_session('ss_admin')) {
|
||||||
|
set_session('ss_admin', true);
|
||||||
|
goto_url('.');
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 스킨디렉토리를 SELECT 형식으로 얻음
|
||||||
|
function get_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||||
|
{
|
||||||
|
$skins = get_skin_dir($skin_gubun);
|
||||||
|
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||||
|
for ($i=0; $i<count($skins); $i++) {
|
||||||
|
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||||
|
$str .= option_selected($skins[$i], $selected);
|
||||||
|
}
|
||||||
|
$str .= "</select>";
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 모바일 스킨디렉토리를 SELECT 형식으로 얻음
|
||||||
|
function get_mobile_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||||
|
{
|
||||||
|
$skins = get_skin_dir($skin_gubun, G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||||
|
$str = "<select id=\"$id\" name=\"$name\" $event>\n";
|
||||||
|
for ($i=0; $i<count($skins); $i++) {
|
||||||
|
if ($i == 0) $str .= "<option value=\"\">선택</option>";
|
||||||
|
$str .= option_selected($skins[$i], $selected);
|
||||||
|
}
|
||||||
|
$str .= "</select>";
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 스킨경로를 얻는다
|
||||||
|
function get_skin_dir($skin, $skin_path=G5_SKIN_PATH)
|
||||||
|
{
|
||||||
|
global $g5;
|
||||||
|
|
||||||
|
$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 $g5;
|
||||||
|
|
||||||
|
$sql = " select mb_name, mb_nick, mb_ip, mb_recommend, mb_memo, mb_level from {$g5['member_table']} where mb_id= '".$mb_id."' ";
|
||||||
|
$mb = sql_fetch($sql);
|
||||||
|
if ($mb['mb_recommend']) {
|
||||||
|
$row = sql_fetch(" select count(*) as cnt from {$g5['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 {$g5['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', G5_SERVER_TIME)." 삭제함\n{$mb['mb_memo']}', mb_leave_date = '".date('Ymd', G5_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 $g5;
|
||||||
|
|
||||||
|
$str = "\n<select id=\"{$name}\" name=\"{$name}\"";
|
||||||
|
if ($event) $str .= " $event";
|
||||||
|
$str .= ">\n";
|
||||||
|
for ($i=$start_id; $i<=$end_id; $i++) {
|
||||||
|
$str .= '<option value="'.$i.'"';
|
||||||
|
if ($i == $selected)
|
||||||
|
$str .= ' selected="selected"';
|
||||||
|
$str .= ">{$i}</option>\n";
|
||||||
|
}
|
||||||
|
$str .= "</select>\n";
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 회원아이디를 SELECT 형식으로 얻음
|
||||||
|
function get_member_id_select($name, $level, $selected="", $event="")
|
||||||
|
{
|
||||||
|
global $g5;
|
||||||
|
|
||||||
|
$sql = " select mb_id from {$g5['member_table']} where mb_level >= '{$level}' ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
$str = '<select id="'.$name.'" name="'.$name.'" '.$event.'><option value="">선택안함</option>';
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
$str .= '<option value="'.$row['mb_id'].'"';
|
||||||
|
if ($row['mb_id'] == $selected) $str .= ' selected';
|
||||||
|
$str .= '>'.$row['mb_id'].'</option>';
|
||||||
|
}
|
||||||
|
$str .= '</select>';
|
||||||
|
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 $g5;
|
||||||
|
|
||||||
|
$img = array('입력'=>'insert', '추가'=>'insert', '생성'=>'insert', '수정'=>'modify', '삭제'=>'delete', '이동'=>'move', '그룹'=>'move', '보기'=>'view', '미리보기'=>'view', '복사'=>'copy');
|
||||||
|
$icon = '<img src="'.G5_ADMIN_PATH.'/img/icon_'.$img[$act].'.gif" title="'.$act.'">';
|
||||||
|
if ($link)
|
||||||
|
$s = '<a href="'.$link.'">'.$icon.'</a>';
|
||||||
|
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, G5_FILE_PERMISSION);
|
||||||
|
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 $g5;
|
||||||
|
|
||||||
|
$str = '<span class="adm_field_explain">'.str_replace("\n", "<br>", $help).'</span>';
|
||||||
|
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 출력순서
|
||||||
|
function order_select($fld, $sel='')
|
||||||
|
{
|
||||||
|
$s = '<select name="'.$fld.'">';
|
||||||
|
for ($i=1; $i<=100; $i++) {
|
||||||
|
$s .= '<option value="'.$i.'" ';
|
||||||
|
if ($sel) {
|
||||||
|
if ($i == $sel) {
|
||||||
|
$s .= 'selected';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($i == 50) {
|
||||||
|
$s .= 'selected';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$s .= '>'.$i.'</option>';
|
||||||
|
}
|
||||||
|
$s .= '</select>';
|
||||||
|
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 접근 권한 검사
|
||||||
|
if (!$member['mb_id'])
|
||||||
|
{
|
||||||
|
//alert('로그인 하십시오.', '$g5['bbs_path']/login.php?url=' . urlencode('$_SERVER['PHP_SELF']?w=$w&mb_id=$mb_id'));
|
||||||
|
alert('로그인 하십시오.', G5_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 {$g5['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('최고관리자 또는 관리권한이 있는 회원만 접근 가능합니다.', G5_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(G5_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'.G5_URL, 0);
|
||||||
|
|
||||||
|
alert_close('정상적으로 로그인하여 접근하시기 바랍니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
@ksort($auth);
|
||||||
|
|
||||||
|
// 가변 메뉴
|
||||||
|
unset($auth_menu);
|
||||||
|
unset($menu);
|
||||||
|
unset($amenu);
|
||||||
|
$tmp = dir(G5_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(G5_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'] = '';
|
||||||
|
?>
|
||||||
18
adm/admin.menu100.php
Normal file
18
adm/admin.menu100.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
$menu['menu100'] = array (
|
||||||
|
array('100000', '환경설정', G5_ADMIN_URL.'/config_form.php', 'config'),
|
||||||
|
array('', '기본환경설정', G5_ADMIN_URL.'/config_form.php', 'cf_basic'),
|
||||||
|
array('', '관리권한설정', G5_ADMIN_URL.'/auth_list.php', 'cf_auth'),
|
||||||
|
array('100300', '메일 테스트', G5_ADMIN_URL.'/sendmail_test.php', 'cf_mailtest'),
|
||||||
|
//array('100400', '버전정보', G5_ADMIN_URL.'/version.php', 'cf_version'),
|
||||||
|
array('100800', '세션파일 일괄삭제',G5_ADMIN_URL.'/session_file_delete.php', 'cf_session', 1),
|
||||||
|
array('100900', '캐쉬파일 일괄삭제',G5_ADMIN_URL.'/cache_file_delete.php', 'cf_cache', 1),
|
||||||
|
array('100910', '캡챠파일 일괄삭제',G5_ADMIN_URL.'/gcaptcha_file_delete.php', 'cf_captcha', 1),
|
||||||
|
array('100920', '썸네일파일 일괄삭제',G5_ADMIN_URL.'/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
||||||
|
array('100930', '네이버 신디케이션 핑',G5_SYNDI_URL.'/ping.php', 'cf_syndi_ping', 1),
|
||||||
|
array('100500', 'phpinfo()', G5_ADMIN_URL.'/phpinfo.php', 'cf_phpinfo'),
|
||||||
|
//array('100600', '업그레이드', G5_ADMIN_URL.'/upgrade.php', 'cf_upgrade'),
|
||||||
|
//array('100700', '복구/최적화', G5_ADMIN_URL.'/repair.php', 'cf_repair'),
|
||||||
|
//array('', 'phpMyAdmin', ''.$g5['path'].'/'.$g5['phpmyadmin_dir'].'', 'cf_phpmyadmin')
|
||||||
|
);
|
||||||
|
?>
|
||||||
10
adm/admin.menu200.php
Normal file
10
adm/admin.menu200.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
$menu['menu200'] = array (
|
||||||
|
array('200000', '회원관리', G5_ADMIN_URL.'/member_list.php', 'member'),
|
||||||
|
array('200100', '회원관리', G5_ADMIN_URL.'/member_list.php', 'mb_list'),
|
||||||
|
array('200300', '회원메일발송', G5_ADMIN_URL.'/mail_list.php', 'mb_mail'),
|
||||||
|
array('200800', '접속자집계', G5_ADMIN_URL.'/visit_list.php', 'mb_visit', 1),
|
||||||
|
array('200200', '포인트관리', G5_ADMIN_URL.'/point_list.php', 'mb_point'),
|
||||||
|
array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', 'mb_poll')
|
||||||
|
);
|
||||||
|
?>
|
||||||
9
adm/admin.menu300.php
Normal file
9
adm/admin.menu300.php
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?php
|
||||||
|
$menu['menu300'] = array (
|
||||||
|
array('300000', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'board'),
|
||||||
|
array('300100', '게시판관리', ''.G5_ADMIN_URL.'/board_list.php', 'bbs_board'),
|
||||||
|
array('300200', '게시판그룹관리', ''.G5_ADMIN_URL.'/boardgroup_list.php', 'bbs_group'),
|
||||||
|
array('300300', '인기검색어관리', ''.G5_ADMIN_URL.'/popular_list.php', 'bbs_poplist', 1),
|
||||||
|
array('300400', '인기검색어순위', ''.G5_ADMIN_URL.'/popular_rank.php', 'bbs_poprank', 1),
|
||||||
|
);
|
||||||
|
?>
|
||||||
130
adm/admin.tail.php
Normal file
130
adm/admin.tail.php
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<p>
|
||||||
|
귀하께서 사용하시는 브라우저는 현재 <strong>자바스크립트를 사용하지 않음</strong>으로 설정되어 있습니다.<br>
|
||||||
|
<strong>자바스크립트를 사용하지 않음</strong>으로 설정하신 경우는 수정이나 삭제시 별도의 경고창이 나오지 않으므로 이점 주의하시기 바랍니다.
|
||||||
|
</p>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer id="ft">
|
||||||
|
<p>
|
||||||
|
Copyright © 소유하신 도메인. All rights reserved.<br>
|
||||||
|
<a href="#">상단으로</a>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- <p>실행시간 : <?php echo get_microtime() - $begin_time; ?> -->
|
||||||
|
|
||||||
|
<script src="<?php echo G5_ADMIN_URL ?>/admin.js"></script>
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
var hide_menu = false;
|
||||||
|
var mouse_event = false;
|
||||||
|
var oldX = oldY = 0;
|
||||||
|
|
||||||
|
$(document).mousemove(function(e) {
|
||||||
|
if(oldX == 0) {
|
||||||
|
oldX = e.pageX;
|
||||||
|
oldY = e.pageY;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(oldX != e.pageX || oldY != e.pageY) {
|
||||||
|
mouse_event = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 주메뉴
|
||||||
|
var $gnb = $(".gnb_1dli > a");
|
||||||
|
$gnb.mouseover(function() {
|
||||||
|
if(mouse_event) {
|
||||||
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
|
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||||
|
menu_rearrange($(this).parent());
|
||||||
|
hide_menu = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$gnb.mouseout(function() {
|
||||||
|
hide_menu = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".gnb_2dli").mouseover(function() {
|
||||||
|
hide_menu = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".gnb_2dli").mouseout(function() {
|
||||||
|
hide_menu = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$gnb.focusin(function() {
|
||||||
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
|
$(this).parent().addClass("gnb_1dli_over gnb_1dli_on");
|
||||||
|
menu_rearrange($(this).parent());
|
||||||
|
hide_menu = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$gnb.focusout(function() {
|
||||||
|
hide_menu = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".gnb_2da").focusin(function() {
|
||||||
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
|
var $gnb_li = $(this).closest(".gnb_1dli").addClass("gnb_1dli_over gnb_1dli_on");
|
||||||
|
menu_rearrange($(this).closest(".gnb_1dli"));
|
||||||
|
hide_menu = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".gnb_2da").focusout(function() {
|
||||||
|
hide_menu = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#gnb_1dul>li').bind('mouseleave',function(){
|
||||||
|
submenu_hide();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).bind('click focusin',function(){
|
||||||
|
if(hide_menu) {
|
||||||
|
submenu_hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 폰트 리사이즈 쿠키있으면 실행
|
||||||
|
var font_resize_act = get_cookie("ck_font_resize_act");
|
||||||
|
if(font_resize_act != "") {
|
||||||
|
font_resize("container", font_resize_act);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function submenu_hide() {
|
||||||
|
$(".gnb_1dli").removeClass("gnb_1dli_over gnb_1dli_over2 gnb_1dli_on");
|
||||||
|
}
|
||||||
|
|
||||||
|
function menu_rearrange(el)
|
||||||
|
{
|
||||||
|
var width = $("#gnb_1dul").width();
|
||||||
|
var left = w1 = w2 = 0;
|
||||||
|
var idx = $(".gnb_1dli").index(el);
|
||||||
|
|
||||||
|
for(i=0; i<=idx; i++) {
|
||||||
|
w1 = $(".gnb_1dli:eq("+i+")").outerWidth();
|
||||||
|
w2 = $(".gnb_2dli > a:eq("+i+")").outerWidth(true);
|
||||||
|
|
||||||
|
if((left + w2) > width) {
|
||||||
|
el.removeClass("gnb_1dli_over").addClass("gnb_1dli_over2");
|
||||||
|
}
|
||||||
|
|
||||||
|
left += w1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
242
adm/auth_list.php
Normal file
242
adm/auth_list.php
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['auth_table']} a left join {$g5['member_table']} b on (a.mb_id=b.mb_id) ";
|
||||||
|
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
if ($stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
default :
|
||||||
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$sql_search .= " ) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$sst) {
|
||||||
|
$sst = "a.mb_id, au_menu";
|
||||||
|
$sod = "";
|
||||||
|
}
|
||||||
|
$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 *
|
||||||
|
{$sql_common}
|
||||||
|
{$sql_search}
|
||||||
|
{$sql_order}
|
||||||
|
limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$listall = '';
|
||||||
|
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌 : 지운아빠 2012-10-31
|
||||||
|
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||||
|
|
||||||
|
$g5['title'] = "관리권한설정";
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 5;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="fsearch" id="fsearch" method="get">
|
||||||
|
<input type="hidden" name="sfl" value="a.mb_id" id="sfl">
|
||||||
|
<fieldset>
|
||||||
|
<legend>관리권한 검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
설정된 관리권한 <?php echo number_format($total_count) ?>건
|
||||||
|
</span>
|
||||||
|
<strong id="msg_stx" class="msg_sound_only"></strong>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" title="회원아이디(필수)" required class="required frm_input">
|
||||||
|
<input type="submit" value="검색" id="fsearch_submit" class="btn_submit">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>설정된 관리권한 내역</h2>
|
||||||
|
<p>권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.</p>
|
||||||
|
|
||||||
|
<ul class="sort_odr">
|
||||||
|
<li><?php echo subject_sort_link('a.mb_id') ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_nick') ?>별명<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form name="fauthlist" id="fauthlist" method="post" action="./auth_list_delete.php" onsubmit="return fauthlist_submit(this);">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
<label for="chkall" class="sound_only">전체</label>
|
||||||
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
|
</th>
|
||||||
|
<th scope="col">회원아이디</th>
|
||||||
|
<th scope="col">별명</th>
|
||||||
|
<th scope="col">메뉴</th>
|
||||||
|
<th scope="col">권한</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||||
|
|
||||||
|
// 메뉴번호가 바뀌는 경우에 현재 없는 저장된 메뉴는 삭제함
|
||||||
|
if (!isset($auth_menu[$row['au_menu']]))
|
||||||
|
{
|
||||||
|
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$list = $i%2;
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk">
|
||||||
|
<input type="hidden" name="au_menu[<?php echo $i ?>]" value="<?php echo $row['au_menu'] ?>">
|
||||||
|
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?>님 권한</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td class="td_mbid"><a href="?sfl=a.mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||||
|
<td class="td_auth_mbnick"><?php echo $mb_nick ?></td>
|
||||||
|
<td class="td_menu">
|
||||||
|
<?php echo $row['au_menu'] ?>
|
||||||
|
<?php echo $auth_menu[$row['au_menu']] ?>
|
||||||
|
</td>
|
||||||
|
<td class="td_auth"><?php echo $row['au_auth'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i==0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page=');
|
||||||
|
echo $pagelist;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
//if (isset($stx))
|
||||||
|
// echo '<script>document.fsearch.sfl.value = "'.$sfl.'";</script>'."\n";
|
||||||
|
|
||||||
|
if (strstr($sfl, 'mb_id'))
|
||||||
|
$mb_id = $stx;
|
||||||
|
else
|
||||||
|
$mb_id = '';
|
||||||
|
?>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<form name="fauthlist2" id="fauthlist2" action="./auth_update.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
|
<section id="add_admin" class="cbox">
|
||||||
|
<h2>관리권한 추가</h2>
|
||||||
|
<p>다음 양식에서 회원에게 관리권한을 부여하실 수 있습니다.</p>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<strong id="msg_mb_id" class="msg_sound_only"></strong>
|
||||||
|
<input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" title="회원아이디" required class="required frm_input">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="au_menu">접근가능메뉴<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select id="au_menu" name="au_menu" required class="required" title="접근가능메뉴">
|
||||||
|
<option value=''>선택하세요</option>
|
||||||
|
<?php
|
||||||
|
foreach($auth_menu as $key=>$value)
|
||||||
|
{
|
||||||
|
if (!(substr($key, -3) == '000' || $key == '-' || !$key))
|
||||||
|
echo '<option value="'.$key.'">'.$key.' '.$value.'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">권한지정</th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="r" value="r" id="r" checked>
|
||||||
|
<label for="r">r (읽기)</label>
|
||||||
|
<input type="checkbox" name="w" value="w" id="w">
|
||||||
|
<label for="w">w (쓰기)</label>
|
||||||
|
<input type="checkbox" name="d" value="d" id="d">
|
||||||
|
<label for="d">d (삭제)</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<input type="submit" value="완료" class="btn_submit">
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fauthlist_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
27
adm/auth_list_delete.php
Normal file
27
adm/auth_list_delete.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$count = count($_POST['chk']);
|
||||||
|
|
||||||
|
if (!$count)
|
||||||
|
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
|
|
||||||
|
for ($i=0; $i<$count; $i++)
|
||||||
|
{
|
||||||
|
// 실제 번호를 넘김
|
||||||
|
$k = $chk[$i];
|
||||||
|
|
||||||
|
$sql = " delete from {$g5['auth_table']} where mb_id = '{$_POST['mb_id'][$k]}' and au_menu = '{$_POST['au_menu'][$k]}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
goto_url('./auth_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
30
adm/auth_update.php
Normal file
30
adm/auth_update.php
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
$mb = get_member($mb_id);
|
||||||
|
if (!$mb['mb_id'])
|
||||||
|
alert('존재하는 회원아이디가 아닙니다.');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$sql = " insert into {$g5['auth_table']}
|
||||||
|
set mb_id = '{$_POST['mb_id']}',
|
||||||
|
au_menu = '{$_POST['au_menu']}',
|
||||||
|
au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}' ";
|
||||||
|
$result = sql_query($sql, FALSE);
|
||||||
|
if (!$result) {
|
||||||
|
$sql = " update {$g5['auth_table']}
|
||||||
|
set au_auth = '{$_POST['r']},{$_POST['w']},{$_POST['d']}'
|
||||||
|
where mb_id = '{$_POST['mb_id']}'
|
||||||
|
and au_menu = '{$_POST['au_menu']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
//sql_query(" OPTIMIZE TABLE `$g5['auth_table']` ");
|
||||||
|
|
||||||
|
goto_url('./auth_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
70
adm/board_copy.php
Normal file
70
adm/board_copy.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300100";
|
||||||
|
include_once("./_common.php");
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$g5['title'] = '게시판 복사';
|
||||||
|
$administrator = 1;
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="new_win">
|
||||||
|
<h1>기존 게시판을 새 게시판으로 복사</h1>
|
||||||
|
|
||||||
|
<form name="fboardcopy" id="fboardcopy" action="./board_copy_update.php" onsubmit="return fboardcopy_check(this);" method="post">
|
||||||
|
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>" id="bo_table">
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">원본 테이블명</th>
|
||||||
|
<td><?php echo $bo_table ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><label for="target_table">복사 테이블명<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="target_table" id="target_table" required class="required alnum_ frm_input" maxlength="20">영문자, 숫자, _ 만 가능 (공백없이)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><label for="target_subject">게시판 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="target_subject" value="[복사본] <?php echo $board['bo_subject'] ?>" id="target_subject" required class="required frm_input" maxlength="120"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">복사 유형</th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="copy_case" value="schema_only" id="copy_case" checked>
|
||||||
|
<label for="copy_case">구조만</label>
|
||||||
|
<input type="radio" name="copy_case" value="schema_data_both" id="copy_case2">
|
||||||
|
<label for="copy_case2">구조와 데이터</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<p>
|
||||||
|
게시판을 복사하시려면 <strong>복사</strong> 버튼을, 작성을 취소하고 창을 닫으시려면 <strong>창닫기</strong> 버튼을 누르세요.
|
||||||
|
</p>
|
||||||
|
<input type="submit" class="btn_submit" value="복사">
|
||||||
|
<input type="button" class="btn_cancel" value="창닫기" onclick="window.close();">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fboardcopy_check(f)
|
||||||
|
{
|
||||||
|
if (f.bo_table.value == f.target_table.value) {
|
||||||
|
alert("원본 테이블명과 복사할 테이블명이 달라야 합니다.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
205
adm/board_copy_update.php
Normal file
205
adm/board_copy_update.php
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '300100';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$target_table = escape_trim($_POST['target_table']);
|
||||||
|
$target_subject = escape_trim($_POST['target_subject']);
|
||||||
|
|
||||||
|
if (!preg_match('/[A-Za-z0-9_]{1,20}/', $target_table)) {
|
||||||
|
alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)');
|
||||||
|
}
|
||||||
|
|
||||||
|
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '$target_table' ");
|
||||||
|
if ($row['cnt'])
|
||||||
|
alert($target_table.'은(는) 이미 존재하는 게시판 테이블명 입니다.\\n복사할 테이블명으로 사용할 수 없습니다.');
|
||||||
|
|
||||||
|
// 게시판 테이블 생성
|
||||||
|
$sql = get_table_define($g5['write_prefix'] . $bo_table);
|
||||||
|
$sql = str_replace($g5['write_prefix'] . $bo_table, $g5['write_prefix'] . $target_table, $sql);
|
||||||
|
sql_query($sql, false);
|
||||||
|
|
||||||
|
$file_copy = array();
|
||||||
|
|
||||||
|
// 구조만 복사시에는 공지사항 번호는 복사하지 않는다.
|
||||||
|
if ($copy_case == 'schema_only') {
|
||||||
|
$board['bo_notice'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
// 게시판 정보
|
||||||
|
$sql = " insert into {$g5['board_table']}
|
||||||
|
set bo_table = '$target_table',
|
||||||
|
gr_id = '{$board['gr_id']}',
|
||||||
|
bo_subject = '$target_subject',
|
||||||
|
bo_device = '{$board['bo_device']}',
|
||||||
|
bo_admin = '{$board['bo_admin']}',
|
||||||
|
bo_list_level = '{$board[bo_list_level]}',
|
||||||
|
bo_read_level = '{$board[bo_read_level]}',
|
||||||
|
bo_write_level = '{$board[bo_write_level]}',
|
||||||
|
bo_reply_level = '{$board[bo_reply_level]}',
|
||||||
|
bo_comment_level = '{$board[bo_comment_level]}',
|
||||||
|
bo_upload_level = '{$board[bo_upload_level]}',
|
||||||
|
bo_download_level = '{$board[bo_download_level]}',
|
||||||
|
bo_html_level = '{$board[bo_html_level]}',
|
||||||
|
bo_link_level = '{$board[bo_link_level]}',
|
||||||
|
bo_trackback_level = '{$board[bo_trackback_level]}',
|
||||||
|
bo_count_modify = '{$board[bo_count_modify]}',
|
||||||
|
bo_count_delete = '{$board[bo_count_delete]}',
|
||||||
|
bo_read_point = '{$board[bo_read_point]}',
|
||||||
|
bo_write_point = '{$board[bo_write_point]}',
|
||||||
|
bo_comment_point = '{$board[bo_comment_point]}',
|
||||||
|
bo_download_point = '{$board[bo_download_point]}',
|
||||||
|
bo_use_category = '{$board[bo_use_category]}',
|
||||||
|
bo_category_list = '{$board['bo_category_list']}',
|
||||||
|
bo_disable_tags = '{$board['bo_disable_tags']}',
|
||||||
|
bo_use_sideview = '{$board[bo_use_sideview]}',
|
||||||
|
bo_use_file_content = '{$board[bo_use_file_content]}',
|
||||||
|
bo_use_secret = '{$board[bo_use_secret]}',
|
||||||
|
bo_use_dhtml_editor = '{$board[bo_use_dhtml_editor]}',
|
||||||
|
bo_use_rss_view = '{$board[bo_use_rss_view]}',
|
||||||
|
bo_use_good = '{$board[bo_use_good]}',
|
||||||
|
bo_use_nogood = '{$board[bo_use_nogood]}',
|
||||||
|
bo_use_signature = '{$board[bo_use_signature]}',
|
||||||
|
bo_use_ip_view = '{$board[bo_use_ip_view]}',
|
||||||
|
bo_use_list_view = '{$board['o_use_list_view']}',
|
||||||
|
bo_use_list_content = '{$board[bo_use_list_content]}',
|
||||||
|
bo_table_width = '{$board[bo_table_width]}',
|
||||||
|
bo_subject_len = '{$board[bo_subject_len]}',
|
||||||
|
bo_mobile_subject_len = '{$board[bo_mobile_subject_len]}',
|
||||||
|
bo_page_rows = '{$board[bo_page_rows]}',
|
||||||
|
bo_mobile_page_rows = '{$board[bo_mobile_page_rows]}',
|
||||||
|
bo_new = '{$board[bo_new]}',
|
||||||
|
bo_hot = '{$board[bo_hot]}',
|
||||||
|
bo_image_width = '{$board[bo_image_width]}',
|
||||||
|
bo_skin = '{$board['bo_skin']}',
|
||||||
|
bo_mobile_skin = '{$board['bo_mobile_skin']}',
|
||||||
|
bo_include_head = '{$board['bo_include_head']}',
|
||||||
|
bo_include_tail = '{$board['bo_include_tail']}',
|
||||||
|
bo_content_head = '".addslashes($board['bo_content_head'])."',
|
||||||
|
bo_content_tail = '".addslashes($board['bo_content_tail'])."',
|
||||||
|
bo_mobile_content_head = '".addslashes($board['bo_mobile_content_head'])."',
|
||||||
|
bo_mobile_content_tail = '".addslashes($board['bo_mobile_content_tail'])."',
|
||||||
|
bo_insert_content = '".addslashes($board['bo_insert_content'])."',
|
||||||
|
bo_gallery_cols = '{$board[bo_gallery_cols]}',
|
||||||
|
bo_gallery_width = '{$board[bo_gallery_width]}',
|
||||||
|
bo_gallery_height = '{$board[bo_gallery_height]}',
|
||||||
|
bo_mobile_gallery_cols = '{$board[bo_mobile_gallery_cols]}',
|
||||||
|
bo_mobile_gallery_width = '{$board[bo_mobile_gallery_width]}',
|
||||||
|
bo_mobile_gallery_height = '{$board[bo_mobile_gallery_height]}',
|
||||||
|
bo_upload_size = '{$board[bo_upload_size]}',
|
||||||
|
bo_reply_order = '{$board[bo_reply_order]}',
|
||||||
|
bo_use_search = '{$board[bo_use_search]}',
|
||||||
|
bo_show_menu = '{$board[bo_show_menu]}',
|
||||||
|
bo_order = '{$board[bo_order]}',
|
||||||
|
bo_notice = '{$board['bo_notice']}',
|
||||||
|
bo_upload_count = '{$board[bo_upload_count]}',
|
||||||
|
bo_use_email = '{$board[bo_use_email]}',
|
||||||
|
bo_use_cert = '{$board[bo_use_cert]}',
|
||||||
|
bo_use_sns = '{$board[bo_use_sns]}',
|
||||||
|
bo_sort_field = '{$board['bo_sort_field']}',
|
||||||
|
bo_1_subj = '{$board['bo_1_subj']}',
|
||||||
|
bo_2_subj = '{$board['bo_2_subj']}',
|
||||||
|
bo_3_subj = '{$board['bo_3_subj']}',
|
||||||
|
bo_4_subj = '{$board['bo_4_subj']}',
|
||||||
|
bo_5_subj = '{$board['bo_5_subj']}',
|
||||||
|
bo_6_subj = '{$board['bo_6_subj']}',
|
||||||
|
bo_7_subj = '{$board['bo_7_subj']}',
|
||||||
|
bo_8_subj = '{$board['bo_8_subj']}',
|
||||||
|
bo_9_subj = '{$board['bo_9_subj']}',
|
||||||
|
bo_10_subj = '{$board['bo_10_subj']}',
|
||||||
|
bo_1 = '{$board['bo_1']}',
|
||||||
|
bo_2 = '{$board['bo_2']}',
|
||||||
|
bo_3 = '{$board['bo_3']}',
|
||||||
|
bo_4 = '{$board['bo_4']}',
|
||||||
|
bo_5 = '{$board['bo_5']}',
|
||||||
|
bo_6 = '{$board['bo_6']}',
|
||||||
|
bo_7 = '{$board['bo_7']}',
|
||||||
|
bo_8 = '{$board['bo_8']}',
|
||||||
|
bo_9 = '{$board['bo_9']}',
|
||||||
|
bo_10 = '{$board['bo_10']}' ";
|
||||||
|
sql_query($sql, false);
|
||||||
|
|
||||||
|
// 게시판 폴더 생성
|
||||||
|
@mkdir(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||||
|
@chmod(G5_DATA_PATH.'/file/'.$target_table, G5_DIR_PERMISSION);
|
||||||
|
|
||||||
|
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||||
|
$board_path = G5_DATA_PATH.'/file/'.$target_table;
|
||||||
|
$file = $board_path . '/index.php';
|
||||||
|
$f = @fopen($file, 'w');
|
||||||
|
@fwrite($f, '');
|
||||||
|
@fclose($f);
|
||||||
|
@chmod($file, G5_FILE_PERMISSION);
|
||||||
|
|
||||||
|
$copy_file = 0;
|
||||||
|
if ($copy_case == 'schema_data_both') {
|
||||||
|
$d = dir(G5_DATA_PATH.'/file/'.$bo_table);
|
||||||
|
while ($entry = $d->read()) {
|
||||||
|
if ($entry == '.' || $entry == '..') continue;
|
||||||
|
|
||||||
|
// 김선용 201007 :
|
||||||
|
if(is_dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry)){
|
||||||
|
$dd = dir(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry);
|
||||||
|
@mkdir(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||||
|
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||||
|
while ($entry2 = $dd->read()) {
|
||||||
|
if ($entry2 == '.' || $entry2 == '..') continue;
|
||||||
|
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry.'/'.$entry2, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
||||||
|
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, G5_DIR_PERMISSION);
|
||||||
|
$copy_file++;
|
||||||
|
}
|
||||||
|
$dd->close();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
@copy(G5_DATA_PATH.'/file/'.$bo_table.'/'.$entry, G5_DATA_PATH.'/file/'.$target_table.'/'.$entry);
|
||||||
|
@chmod(G5_DATA_PATH.'/file/'.$target_table.'/'.$entry, G5_DIR_PERMISSION);
|
||||||
|
$copy_file++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$d->close();
|
||||||
|
|
||||||
|
// 글복사
|
||||||
|
$sql = " insert into {$g5['write_prefix']}$target_table select * from {$g5['write_prefix']}$bo_table ";
|
||||||
|
sql_query($sql, false);
|
||||||
|
|
||||||
|
// 게시글수 저장
|
||||||
|
$sql = " select bo_count_write, bo_count_comment from {$g5['board_table']} where bo_table = '$bo_table' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$sql = " update {$g5['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, false);
|
||||||
|
|
||||||
|
// 4.00.01
|
||||||
|
// 위의 코드는 같은 테이블명을 사용하였다는 오류가 발생함. (희한하네 ㅡㅡ;)
|
||||||
|
$sql = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' ";
|
||||||
|
$result = sql_query($sql, false);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
$file_copy[$i] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count($file_copy)) {
|
||||||
|
for ($i=0; $i<count($file_copy); $i++) {
|
||||||
|
$sql = " insert into {$g5['board_file_table']}
|
||||||
|
set bo_table = '$target_table',
|
||||||
|
wr_id = '{$file_copy[$i]['wr_id']}',
|
||||||
|
bf_no = '{$file_copy[$i]['bf_no']}',
|
||||||
|
bf_source = '{$file_copy[$i]['bf_source']}',
|
||||||
|
bf_file = '{$file_copy[$i]['bf_file']}',
|
||||||
|
bf_download = '{$file_copy[$i]['bf_download']}',
|
||||||
|
bf_content = '{$file_copy[$i]['bf_content']}',
|
||||||
|
bf_filesize = '{$file_copy[$i]['bf_filesize']}',
|
||||||
|
bf_width = '{$file_copy[$i]['bf_width']}',
|
||||||
|
bf_height = '{$file_copy[$i]['bf_height']}',
|
||||||
|
bf_type = '{$file_copy[$i]['bf_type']}',
|
||||||
|
bf_datetime = '{$file_copy[$i]['bf_datetime']}' ";
|
||||||
|
sql_query($sql, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete_cache_latest($bo_table);
|
||||||
|
delete_cache_latest($target_table);
|
||||||
|
|
||||||
|
echo "<script>opener.document.location.reload();</script>";
|
||||||
|
|
||||||
|
alert("복사에 성공 했습니다.", './board_copy.php?bo_table='.$bo_table.'&'.$qstr);
|
||||||
|
?>
|
||||||
36
adm/board_delete.inc.php
Normal file
36
adm/board_delete.inc.php
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일
|
||||||
|
|
||||||
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
|
if (!defined('_BOARD_DELETE_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
// $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함
|
||||||
|
if (!$tmp_bo_table) { return; }
|
||||||
|
|
||||||
|
// 게시판 1개는 삭제 불가 (게시판 복사를 위해서)
|
||||||
|
//$row = sql_fetch(" select count(*) as cnt from $g5['board_table'] ");
|
||||||
|
//if ($row['cnt'] <= 1) { return; }
|
||||||
|
|
||||||
|
// 게시판 설정 삭제
|
||||||
|
sql_query(" delete from {$g5['board_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||||
|
|
||||||
|
// 최신글 삭제
|
||||||
|
sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||||
|
|
||||||
|
// 스크랩 삭제
|
||||||
|
sql_query(" delete from {$g5['scrap_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||||
|
|
||||||
|
// 파일 삭제
|
||||||
|
sql_query(" delete from {$g5['board_file_table']} where bo_table = '{$tmp_bo_table}' ");
|
||||||
|
|
||||||
|
// 게시판 테이블 DROP
|
||||||
|
sql_query(" drop table {$g5['write_prefix']}{$tmp_bo_table} ", FALSE);
|
||||||
|
|
||||||
|
delete_cache_latest($tmp_bo_table);
|
||||||
|
|
||||||
|
// 게시판 폴더 전체 삭제
|
||||||
|
rm_rf(G5_DATA_PATH.'/file/'.$tmp_bo_table);
|
||||||
|
|
||||||
|
// syndication ping
|
||||||
|
include G5_SYNDI_PATH.'/include/include.adm.board_delete.inc.php';
|
||||||
|
?>
|
||||||
1298
adm/board_form.php
Normal file
1298
adm/board_form.php
Normal file
File diff suppressed because it is too large
Load Diff
398
adm/board_form_update.php
Normal file
398
adm/board_form_update.php
Normal file
@ -0,0 +1,398 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($w == 'u')
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
if (!$_POST['gr_id']) { alert('그룹 ID는 반드시 선택하세요.'); }
|
||||||
|
if (!$bo_table) { alert('게시판 TABLE명은 반드시 입력하세요.'); }
|
||||||
|
if (!preg_match("/^([A-Za-z0-9_]{1,20})$/", $bo_table)) { alert('게시판 TABLE명은 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (20자 이내)'); }
|
||||||
|
if (!$_POST['bo_subject']) { alert('게시판 제목을 입력하세요.'); }
|
||||||
|
|
||||||
|
if ($file = $_POST['bo_include_head']) {
|
||||||
|
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||||
|
alert('상단 파일 경로가 php, html 파일이 아닙니다.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($file = $_POST['bo_include_tail']) {
|
||||||
|
if (!preg_match("/\.(php|htm['l']?)$/i", $file)) {
|
||||||
|
alert('하단 파일 경로가 php, html 파일이 아닙니다.');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$board_path = G5_DATA_PATH.'/file/'.$bo_table;
|
||||||
|
|
||||||
|
// 게시판 디렉토리 생성
|
||||||
|
@mkdir($board_path, G5_DIR_PERMISSION);
|
||||||
|
@chmod($board_path, G5_DIR_PERMISSION);
|
||||||
|
|
||||||
|
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||||
|
$file = $board_path . '/index.php';
|
||||||
|
$f = @fopen($file, 'w');
|
||||||
|
@fwrite($f, '');
|
||||||
|
@fclose($f);
|
||||||
|
@chmod($file, G5_FILE_PERMISSION);
|
||||||
|
|
||||||
|
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
||||||
|
$src_char = array('&', '=');
|
||||||
|
$dst_char = array('&', '〓');
|
||||||
|
$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||||
|
|
||||||
|
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||||
|
bo_subject = '{$_POST['bo_subject']}',
|
||||||
|
bo_mobile_subject = '{$_POST['bo_mobile_subject']}',
|
||||||
|
bo_device = '{$_POST['bo_device']}',
|
||||||
|
bo_admin = '{$_POST['bo_admin']}',
|
||||||
|
bo_list_level = '{$_POST['bo_list_level']}',
|
||||||
|
bo_read_level = '{$_POST['bo_read_level']}',
|
||||||
|
bo_write_level = '{$_POST['bo_write_level']}',
|
||||||
|
bo_reply_level = '{$_POST['bo_reply_level']}',
|
||||||
|
bo_comment_level = '{$_POST['bo_comment_level']}',
|
||||||
|
bo_html_level = '{$_POST['bo_html_level']}',
|
||||||
|
bo_link_level = '{$_POST['bo_link_level']}',
|
||||||
|
bo_count_modify = '{$_POST['bo_count_modify']}',
|
||||||
|
bo_count_delete = '{$_POST['bo_count_delete']}',
|
||||||
|
bo_upload_level = '{$_POST['bo_upload_level']}',
|
||||||
|
bo_download_level = '{$_POST['bo_download_level']}',
|
||||||
|
bo_read_point = '{$_POST['bo_read_point']}',
|
||||||
|
bo_write_point = '{$_POST['bo_write_point']}',
|
||||||
|
bo_comment_point = '{$_POST['bo_comment_point']}',
|
||||||
|
bo_download_point = '{$_POST['bo_download_point']}',
|
||||||
|
bo_use_category = '{$_POST['bo_use_category']}',
|
||||||
|
bo_category_list = '{$_POST['bo_category_list']}',
|
||||||
|
bo_use_sideview = '{$_POST['bo_use_sideview']}',
|
||||||
|
bo_use_file_content = '{$_POST['bo_use_file_content']}',
|
||||||
|
bo_use_secret = '{$_POST['bo_use_secret']}',
|
||||||
|
bo_use_dhtml_editor = '{$_POST['bo_use_dhtml_editor']}',
|
||||||
|
bo_use_rss_view = '{$_POST['bo_use_rss_view']}',
|
||||||
|
bo_use_good = '{$_POST['bo_use_good']}',
|
||||||
|
bo_use_nogood = '{$_POST['bo_use_nogood']}',
|
||||||
|
bo_use_name = '{$_POST['bo_use_name']}',
|
||||||
|
bo_use_signature = '{$_POST['bo_use_signature']}',
|
||||||
|
bo_use_ip_view = '{$_POST['bo_use_ip_view']}',
|
||||||
|
bo_use_list_view = '{$_POST['bo_use_list_view']}',
|
||||||
|
bo_use_list_file = '{$_POST['bo_use_list_file']}',
|
||||||
|
bo_use_list_content = '{$_POST['bo_use_list_content']}',
|
||||||
|
bo_use_email = '{$_POST['bo_use_email']}',
|
||||||
|
bo_use_cert = '{$_POST['bo_use_cert']}',
|
||||||
|
bo_use_sns = '{$_POST['bo_use_sns']}',
|
||||||
|
bo_table_width = '{$_POST['bo_table_width']}',
|
||||||
|
bo_subject_len = '{$_POST['bo_subject_len']}',
|
||||||
|
bo_mobile_subject_len = '{$_POST['bo_mobile_subject_len']}',
|
||||||
|
bo_page_rows = '{$_POST['bo_page_rows']}',
|
||||||
|
bo_mobile_page_rows = '{$_POST['bo_mobile_page_rows']}',
|
||||||
|
bo_new = '{$_POST['bo_new']}',
|
||||||
|
bo_hot = '{$_POST['bo_hot']}',
|
||||||
|
bo_image_width = '{$_POST['bo_image_width']}',
|
||||||
|
bo_skin = '{$_POST['bo_skin']}',
|
||||||
|
bo_mobile_skin = '{$_POST['bo_mobile_skin']}',
|
||||||
|
bo_include_head = '{$_POST['bo_include_head']}',
|
||||||
|
bo_include_tail = '{$_POST['bo_include_tail']}',
|
||||||
|
bo_content_head = '{$_POST['bo_content_head']}',
|
||||||
|
bo_content_tail = '{$_POST['bo_content_tail']}',
|
||||||
|
bo_mobile_content_head = '{$_POST['bo_mobile_content_head']}',
|
||||||
|
bo_mobile_content_tail = '{$_POST['bo_mobile_content_tail']}',
|
||||||
|
bo_insert_content = '{$_POST['bo_insert_content']}',
|
||||||
|
bo_gallery_cols = '{$_POST['bo_gallery_cols']}',
|
||||||
|
bo_gallery_width = '{$_POST['bo_gallery_width']}',
|
||||||
|
bo_gallery_height = '{$_POST['bo_gallery_height']}',
|
||||||
|
bo_mobile_gallery_cols = '{$_POST['bo_mobile_gallery_cols']}',
|
||||||
|
bo_mobile_gallery_width = '{$_POST['bo_mobile_gallery_width']}',
|
||||||
|
bo_mobile_gallery_height= '{$_POST['bo_mobile_gallery_height']}',
|
||||||
|
bo_upload_count = '{$_POST['bo_upload_count']}',
|
||||||
|
bo_upload_size = '{$_POST['bo_upload_size']}',
|
||||||
|
bo_reply_order = '{$_POST['bo_reply_order']}',
|
||||||
|
bo_use_search = '{$_POST['bo_use_search']}',
|
||||||
|
bo_order = '{$_POST['bo_order']}',
|
||||||
|
bo_show_menu = '{$_POST['bo_show_menu']}',
|
||||||
|
bo_write_min = '{$_POST['bo_write_min']}',
|
||||||
|
bo_write_max = '{$_POST['bo_write_max']}',
|
||||||
|
bo_comment_min = '{$_POST['bo_comment_min']}',
|
||||||
|
bo_comment_max = '{$_POST['bo_comment_max']}',
|
||||||
|
bo_sort_field = '{$_POST['bo_sort_field']}',
|
||||||
|
bo_1_subj = '{$_POST['bo_1_subj']}',
|
||||||
|
bo_2_subj = '{$_POST['bo_2_subj']}',
|
||||||
|
bo_3_subj = '{$_POST['bo_3_subj']}',
|
||||||
|
bo_4_subj = '{$_POST['bo_4_subj']}',
|
||||||
|
bo_5_subj = '{$_POST['bo_5_subj']}',
|
||||||
|
bo_6_subj = '{$_POST['bo_6_subj']}',
|
||||||
|
bo_7_subj = '{$_POST['bo_7_subj']}',
|
||||||
|
bo_8_subj = '{$_POST['bo_8_subj']}',
|
||||||
|
bo_9_subj = '{$_POST['bo_9_subj']}',
|
||||||
|
bo_10_subj = '{$_POST['bo_10_subj']}',
|
||||||
|
bo_1 = '{$_POST['bo_1']}',
|
||||||
|
bo_2 = '{$_POST['bo_2']}',
|
||||||
|
bo_3 = '{$_POST['bo_3']}',
|
||||||
|
bo_4 = '{$_POST['bo_4']}',
|
||||||
|
bo_5 = '{$_POST['bo_5']}',
|
||||||
|
bo_6 = '{$_POST['bo_6']}',
|
||||||
|
bo_7 = '{$_POST['bo_7']}',
|
||||||
|
bo_8 = '{$_POST['bo_8']}',
|
||||||
|
bo_9 = '{$_POST['bo_9']}',
|
||||||
|
bo_10 = '{$_POST['bo_10']}' ";
|
||||||
|
|
||||||
|
if ($w == '') {
|
||||||
|
|
||||||
|
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '{$bo_table}' ");
|
||||||
|
if ($row['cnt'])
|
||||||
|
alert($bo_table.' 은(는) 이미 존재하는 TABLE 입니다.');
|
||||||
|
|
||||||
|
$sql = " insert into {$g5['board_table']}
|
||||||
|
set bo_table = '{$bo_table}',
|
||||||
|
bo_count_write = '0',
|
||||||
|
bo_count_comment = '0',
|
||||||
|
$sql_common ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
// 게시판 테이블 생성
|
||||||
|
$file = file('./sql_write.sql');
|
||||||
|
$sql = implode($file, "\n");
|
||||||
|
|
||||||
|
$create_table = $g5['write_prefix'] . $bo_table;
|
||||||
|
|
||||||
|
// sql_board.sql 파일의 테이블명을 변환
|
||||||
|
$source = array('/__TABLE_NAME__/', '/;/');
|
||||||
|
$target = array($create_table, '');
|
||||||
|
$sql = preg_replace($source, $target, $sql);
|
||||||
|
sql_query($sql, FALSE);
|
||||||
|
|
||||||
|
} else if ($w == 'u') {
|
||||||
|
|
||||||
|
// 게시판의 글 수
|
||||||
|
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$bo_count_write = $row['cnt'];
|
||||||
|
|
||||||
|
// 게시판의 코멘트 수
|
||||||
|
$sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 1 ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$bo_count_comment = $row['cnt'];
|
||||||
|
|
||||||
|
// 글수 조정
|
||||||
|
/*
|
||||||
|
엔피씨님의 팁으로 교체합니다. 130308
|
||||||
|
http://sir.co.kr/bbs/board.php?bo_table=g5_tiptech&wr_id=27207
|
||||||
|
*/
|
||||||
|
if (isset($_POST['proc_count'])) {
|
||||||
|
// 원글을 얻습니다.
|
||||||
|
//$sql = " select wr_id from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 ";
|
||||||
|
$sql = " select a.wr_id, (count(b.wr_parent) - 1) as cnt from {$g5['write_prefix']}{$bo_table} a, {$g5['write_prefix']}{$bo_table} b where a.wr_id=b.wr_parent and a.wr_is_comment=0 group by a.wr_id ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
/*
|
||||||
|
// 코멘트수를 얻습니다.
|
||||||
|
$sql2 = " select count(*) as cnt from {$g5['write_prefix']}$bo_table where wr_parent = '{$row['wr_id']}' and wr_is_comment = 1 ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
*/
|
||||||
|
|
||||||
|
sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_comment = '{$row['cnt']}' where wr_id = '{$row['wr_id']}' ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 공지사항에는 등록되어 있지만 실제 존재하지 않는 글 아이디는 삭제합니다.
|
||||||
|
$bo_notice = "";
|
||||||
|
$lf = "";
|
||||||
|
if ($board['bo_notice']) {
|
||||||
|
$tmp_array = explode("\n", $board['bo_notice']);
|
||||||
|
for ($i=0; $i<count($tmp_array); $i++) {
|
||||||
|
$tmp_wr_id = trim($tmp_array[$i]);
|
||||||
|
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_id = '{$tmp_wr_id}' ");
|
||||||
|
if ($row['cnt'])
|
||||||
|
{
|
||||||
|
$bo_notice .= $lf . $tmp_wr_id;
|
||||||
|
$lf = "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " update {$g5['board_table']}
|
||||||
|
set bo_notice = '{$bo_notice}',
|
||||||
|
bo_count_write = '{$bo_count_write}',
|
||||||
|
bo_count_comment = '{$bo_count_comment}',
|
||||||
|
{$sql_common}
|
||||||
|
where bo_table = '{$bo_table}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 같은 그룹내 게시판 동일 옵션 적용
|
||||||
|
$grp_fields = '';
|
||||||
|
if (is_checked('chk_grp_device')) $grp_fields .= " , bo_device = '{$bo_device}' ";
|
||||||
|
if (is_checked('chk_grp_admin')) $grp_fields .= " , bo_admin = '{$bo_admin}' ";
|
||||||
|
if (is_checked('chk_grp_list_level')) $grp_fields .= " , bo_list_level = '{$bo_list_level}' ";
|
||||||
|
if (is_checked('chk_grp_read_level')) $grp_fields .= " , bo_read_level = '{$bo_read_level}' ";
|
||||||
|
if (is_checked('chk_grp_write_level')) $grp_fields .= " , bo_write_level = '{$bo_write_level}' ";
|
||||||
|
if (is_checked('chk_grp_reply_level')) $grp_fields .= " , bo_reply_level = '{$bo_reply_level}' ";
|
||||||
|
if (is_checked('chk_grp_comment_level')) $grp_fields .= " , bo_comment_level = '{$bo_comment_level}' ";
|
||||||
|
if (is_checked('chk_grp_link_level')) $grp_fields .= " , bo_link_level = '{$bo_link_level}' ";
|
||||||
|
if (is_checked('chk_grp_upload_level')) $grp_fields .= " , bo_upload_level = '{$bo_upload_level}' ";
|
||||||
|
if (is_checked('chk_grp_download_level')) $grp_fields .= " , bo_download_level = '{$bo_download_level}' ";
|
||||||
|
if (is_checked('chk_grp_html_level')) $grp_fields .= " , bo_html_level = '{$bo_html_level}' ";
|
||||||
|
if (is_checked('chk_grp_count_modify')) $grp_fields .= " , bo_count_modify = '{$bo_count_modify}' ";
|
||||||
|
if (is_checked('chk_grp_count_delete')) $grp_fields .= " , bo_count_delete = '{$bo_count_delete}' ";
|
||||||
|
if (is_checked('chk_grp_read_point')) $grp_fields .= " , bo_read_point = '{$bo_read_point}' ";
|
||||||
|
if (is_checked('chk_grp_write_point')) $grp_fields .= " , bo_write_point = '{$bo_write_point}' ";
|
||||||
|
if (is_checked('chk_grp_comment_point')) $grp_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||||
|
if (is_checked('chk_grp_download_point')) $grp_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||||
|
if (is_checked('chk_grp_category_list')) {
|
||||||
|
$grp_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||||
|
$grp_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||||
|
}
|
||||||
|
if (is_checked('chk_grp_use_sideview')) $grp_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||||
|
if (is_checked('chk_grp_use_file_content')) $grp_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||||
|
if (is_checked('chk_grp_use_secret')) $grp_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||||
|
if (is_checked('chk_grp_use_dhtml_editor')) $grp_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||||
|
if (is_checked('chk_grp_use_rss_view')) $grp_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||||
|
if (is_checked('chk_grp_use_good')) $grp_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||||
|
if (is_checked('chk_grp_use_nogood')) $grp_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||||
|
if (is_checked('chk_grp_use_name')) $grp_fields .= " , bo_use_name = '{$bo_use_name}' ";
|
||||||
|
if (is_checked('chk_grp_use_signature')) $grp_fields .= " , bo_use_signature = '{$bo_use_signature}' ";
|
||||||
|
if (is_checked('chk_grp_use_ip_view')) $grp_fields .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
|
||||||
|
if (is_checked('chk_grp_use_list_view')) $grp_fields .= " , bo_use_list_view = '{$bo_use_list_view}' ";
|
||||||
|
if (is_checked('chk_grp_use_list_file')) $grp_fields .= " , bo_use_list_file = '{$bo_use_list_file}' ";
|
||||||
|
if (is_checked('chk_grp_use_list_content')) $grp_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||||
|
if (is_checked('chk_grp_use_email')) $grp_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||||
|
if (is_checked('chk_grp_use_cert')) $grp_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||||
|
if (is_checked('chk_grp_use_sns')) $grp_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||||
|
if (is_checked('chk_grp_skin')) $grp_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_skin')) $grp_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||||
|
if (is_checked('chk_grp_gallery_cols')) $grp_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||||
|
if (is_checked('chk_grp_gallery_width')) $grp_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
||||||
|
if (is_checked('chk_grp_gallery_height')) $grp_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_gallery_cols')) $grp_fields .= " , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_gallery_width')) $grp_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_gallery_height'))$grp_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||||
|
if (is_checked('chk_grp_table_width')) $grp_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||||
|
if (is_checked('chk_grp_page_rows')) $grp_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_page_rows')) $grp_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||||
|
if (is_checked('chk_grp_subject_len')) $grp_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_subject_len')) $grp_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||||
|
if (is_checked('chk_grp_new')) $grp_fields .= " , bo_new = '{$bo_new}' ";
|
||||||
|
if (is_checked('chk_grp_hot')) $grp_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||||
|
if (is_checked('chk_grp_image_width')) $grp_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||||
|
if (is_checked('chk_grp_reply_order')) $grp_fields .= " , bo_reply_order = '{$bo_reply_order}' ";
|
||||||
|
if (is_checked('chk_grp_sort_field')) $grp_fields .= " , bo_sort_field = '{$bo_sort_field}' ";
|
||||||
|
if (is_checked('chk_grp_write_min')) $grp_fields .= " , bo_write_min = '{$bo_write_min}' ";
|
||||||
|
if (is_checked('chk_grp_write_max')) $grp_fields .= " , bo_write_max = '{$bo_write_max}' ";
|
||||||
|
if (is_checked('chk_grp_comment_min')) $grp_fields .= " , bo_comment_min = '{$bo_comment_min}' ";
|
||||||
|
if (is_checked('chk_grp_comment_max')) $grp_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||||
|
if (is_checked('chk_grp_upload_count')) $grp_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||||
|
if (is_checked('chk_grp_upload_size')) $grp_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||||
|
if (is_checked('chk_grp_include_head')) $grp_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||||
|
if (is_checked('chk_grp_include_tail')) $grp_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||||
|
if (is_checked('chk_grp_content_head')) $grp_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||||
|
if (is_checked('chk_grp_content_tail')) $grp_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_content_head')) $grp_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||||
|
if (is_checked('chk_grp_mobile_content_tail')) $grp_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||||
|
if (is_checked('chk_grp_insert_content')) $grp_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||||
|
if (is_checked('chk_grp_use_search')) $grp_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||||
|
if (is_checked('chk_grp_order')) $grp_fields .= " , bo_order = '{$bo_order}' ";
|
||||||
|
if (is_checked('chk_grp_show_menu')) $grp_fields .= " , bo_show_menu = '{$bo_show_menu}' ";
|
||||||
|
for ($i=1; $i<=10; $i++) {
|
||||||
|
if (is_checked('chk_grp_'.$i)) {
|
||||||
|
$grp_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||||
|
$grp_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($grp_fields) {
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_table = bo_table {$grp_fields} where gr_id = '$gr_id' ");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 모든 게시판 동일 옵션 적용
|
||||||
|
$all_fields = '';
|
||||||
|
if (is_checked('chk_all_device')) $all_fields .= " , bo_device = '{$bo_device}' ";
|
||||||
|
if (is_checked('chk_all_admin')) $all_fields .= " , bo_admin = '{$bo_admin}' ";
|
||||||
|
if (is_checked('chk_all_list_level')) $all_fields .= " , bo_list_level = '{$bo_list_level}' ";
|
||||||
|
if (is_checked('chk_all_read_level')) $all_fields .= " , bo_read_level = '{$bo_read_level}' ";
|
||||||
|
if (is_checked('chk_all_write_level')) $all_fields .= " , bo_write_level = '{$bo_write_level}' ";
|
||||||
|
if (is_checked('chk_all_reply_level')) $all_fields .= " , bo_reply_level = '{$bo_reply_level}' ";
|
||||||
|
if (is_checked('chk_all_comment_level')) $all_fields .= " , bo_comment_level = '{$bo_comment_level}' ";
|
||||||
|
if (is_checked('chk_all_link_level')) $all_fields .= " , bo_link_level = '{$bo_link_level}' ";
|
||||||
|
if (is_checked('chk_all_upload_level')) $all_fields .= " , bo_upload_level = '{$bo_upload_level}' ";
|
||||||
|
if (is_checked('chk_all_download_level')) $all_fields .= " , bo_download_level = '{$bo_download_level}' ";
|
||||||
|
if (is_checked('chk_all_html_level')) $all_fields .= " , bo_html_level = '{$bo_html_level}' ";
|
||||||
|
if (is_checked('chk_all_count_modify')) $all_fields .= " , bo_count_modify = '{$bo_count_modify}' ";
|
||||||
|
if (is_checked('chk_all_count_delete')) $all_fields .= " , bo_count_delete = '{$bo_count_delete}' ";
|
||||||
|
if (is_checked('chk_all_read_point')) $all_fields .= " , bo_read_point = '{$bo_read_point}' ";
|
||||||
|
if (is_checked('chk_all_write_point')) $all_fields .= " , bo_write_point = '{$bo_write_point}' ";
|
||||||
|
if (is_checked('chk_all_comment_point')) $all_fields .= " , bo_comment_point = '{$bo_comment_point}' ";
|
||||||
|
if (is_checked('chk_all_download_point')) $all_fields .= " , bo_download_point = '{$bo_download_point}' ";
|
||||||
|
if (is_checked('chk_all_category_list')) {
|
||||||
|
$all_fields .= " , bo_category_list = '{$bo_category_list}' ";
|
||||||
|
$all_fields .= " , bo_use_category = '{$bo_use_category}' ";
|
||||||
|
}
|
||||||
|
if (is_checked('chk_all_use_sideview')) $all_fields .= " , bo_use_sideview = '{$bo_use_sideview}' ";
|
||||||
|
if (is_checked('chk_all_use_file_content')) $all_fields .= " , bo_use_file_content = '{$bo_use_file_content}' ";
|
||||||
|
if (is_checked('chk_all_use_secret')) $all_fields .= " , bo_use_secret = '{$bo_use_secret}' ";
|
||||||
|
if (is_checked('chk_all_use_dhtml_editor')) $all_fields .= " , bo_use_dhtml_editor = '{$bo_use_dhtml_editor}' ";
|
||||||
|
if (is_checked('chk_all_use_rss_view')) $all_fields .= " , bo_use_rss_view = '{$bo_use_rss_view}' ";
|
||||||
|
if (is_checked('chk_all_use_good')) $all_fields .= " , bo_use_good = '{$bo_use_good}' ";
|
||||||
|
if (is_checked('chk_all_use_nogood')) $all_fields .= " , bo_use_nogood = '{$bo_use_nogood}' ";
|
||||||
|
if (is_checked('chk_all_use_name')) $all_fields .= " , bo_use_name = '{$bo_use_name}' ";
|
||||||
|
if (is_checked('chk_all_use_signature')) $all_fields .= " , bo_use_signature = '{$bo_use_signature}' ";
|
||||||
|
if (is_checked('chk_all_use_ip_view')) $all_fields .= " , bo_use_ip_view = '{$bo_use_ip_view}' ";
|
||||||
|
if (is_checked('chk_all_use_list_view')) $all_fields .= " , bo_use_list_view = '{$bo_use_list_view}' ";
|
||||||
|
if (is_checked('chk_all_use_list_file')) $all_fields .= " , bo_use_list_view = '{$bo_use_list_file}' ";
|
||||||
|
if (is_checked('chk_all_use_list_content')) $all_fields .= " , bo_use_list_content = '{$bo_use_list_content}' ";
|
||||||
|
if (is_checked('chk_all_use_email')) $all_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||||
|
if (is_checked('chk_all_use_cert')) $all_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||||
|
if (is_checked('chk_all_use_sns')) $all_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||||
|
if (is_checked('chk_all_skin')) $all_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||||
|
if (is_checked('chk_all_mobile_skin')) $all_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||||
|
if (is_checked('chk_all_gallery_cols')) $all_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||||
|
if (is_checked('chk_all_gallery_width')) $all_fields .= " , bo_gallery_width = '{$bo_gallery_width}' ";
|
||||||
|
if (is_checked('chk_all_gallery_height')) $all_fields .= " , bo_gallery_height = '{$bo_gallery_height}' ";
|
||||||
|
if (is_checked('chk_all_mobile_gallery_cols')) $all_fields .= " , bo_mobile_gallery_cols = '{$bo_mobile_gallery_cols}' ";
|
||||||
|
if (is_checked('chk_all_mobile_gallery_width')) $all_fields .= " , bo_mobile_gallery_width = '{$bo_mobile_gallery_width}' ";
|
||||||
|
if (is_checked('chk_all_mobile_gallery_height'))$all_fields .= " , bo_mobile_gallery_height = '{$bo_mobile_gallery_height}' ";
|
||||||
|
if (is_checked('chk_all_table_width')) $all_fields .= " , bo_table_width = '{$bo_table_width}' ";
|
||||||
|
if (is_checked('chk_all_page_rows')) $all_fields .= " , bo_page_rows = '{$bo_page_rows}' ";
|
||||||
|
if (is_checked('chk_all_mobile_page_rows')) $all_fields .= " , bo_mobile_page_rows = '{$bo_mobile_page_rows}' ";
|
||||||
|
if (is_checked('chk_all_subject_len')) $all_fields .= " , bo_subject_len = '{$bo_subject_len}' ";
|
||||||
|
if (is_checked('chk_all_mobile_subject_len')) $all_fields .= " , bo_mobile_subject_len = '{$bo_mobile_subject_len}' ";
|
||||||
|
if (is_checked('chk_all_new')) $all_fields .= " , bo_new = '{$bo_new}' ";
|
||||||
|
if (is_checked('chk_all_hot')) $all_fields .= " , bo_hot = '{$bo_hot}' ";
|
||||||
|
if (is_checked('chk_all_image_width')) $all_fields .= " , bo_image_width = '{$bo_image_width}' ";
|
||||||
|
if (is_checked('chk_all_reply_order')) $all_fields .= " , bo_reply_order = '{$bo_reply_order}' ";
|
||||||
|
if (is_checked('chk_all_sort_field')) $all_fields .= " , bo_sort_field = '{$bo_sort_field}' ";
|
||||||
|
if (is_checked('chk_all_write_min')) $all_fields .= " , bo_write_min = '{$bo_write_min}' ";
|
||||||
|
if (is_checked('chk_all_write_max')) $all_fields .= " , bo_write_max = '{$bo_write_max}' ";
|
||||||
|
if (is_checked('chk_all_comment_min')) $all_fields .= " , bo_comment_min = '{$bo_comment_min}' ";
|
||||||
|
if (is_checked('chk_all_comment_max')) $all_fields .= " , bo_comment_max = '{$bo_comment_max}' ";
|
||||||
|
if (is_checked('chk_all_upload_count')) $all_fields .= " , bo_upload_count = '{$bo_upload_count}' ";
|
||||||
|
if (is_checked('chk_all_upload_size')) $all_fields .= " , bo_upload_size = '{$bo_upload_size}' ";
|
||||||
|
if (is_checked('chk_all_include_head')) $all_fields .= " , bo_include_head = '{$bo_include_head}' ";
|
||||||
|
if (is_checked('chk_all_include_tail')) $all_fields .= " , bo_include_tail = '{$bo_include_tail}' ";
|
||||||
|
if (is_checked('chk_all_content_head')) $all_fields .= " , bo_content_head = '{$bo_content_head}' ";
|
||||||
|
if (is_checked('chk_all_content_tail')) $all_fields .= " , bo_content_tail = '{$bo_content_tail}' ";
|
||||||
|
if (is_checked('chk_all_mobile_content_head')) $all_fields .= " , bo_mobile_content_head = '{$bo_mobile_content_head}' ";
|
||||||
|
if (is_checked('chk_all_mobile_content_tail')) $all_fields .= " , bo_mobile_content_tail = '{$bo_mobile_content_tail}' ";
|
||||||
|
if (is_checked('chk_all_insert_content')) $all_fields .= " , bo_insert_content = '{$bo_insert_content}' ";
|
||||||
|
if (is_checked('chk_all_use_search')) $all_fields .= " , bo_use_search = '{$bo_use_search}' ";
|
||||||
|
if (is_checked('chk_all_order')) $all_fields .= " , bo_order = '{$bo_order}' ";
|
||||||
|
if (is_checked('chk_all_show_menu')) $all_fields .= " , bo_show_menu = '{$bo_show_menu}' ";
|
||||||
|
for ($i=1; $i<=10; $i++) {
|
||||||
|
if (is_checked('chk_all_'.$i)) {
|
||||||
|
$all_fields .= " , bo_{$i}_subj = '".$_POST['bo_'.$i.'_subj']."' ";
|
||||||
|
$all_fields .= " , bo_{$i} = '".$_POST['bo_'.$i]."' ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($all_fields) {
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_table = bo_table {$all_fields} ");
|
||||||
|
}
|
||||||
|
|
||||||
|
delete_cache_latest($bo_table);
|
||||||
|
|
||||||
|
// syndication ping
|
||||||
|
include G5_SYNDI_PATH.'/include/include.adm.board_form_update.php';
|
||||||
|
|
||||||
|
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||||
|
?>
|
||||||
224
adm/board_list.php
Normal file
224
adm/board_list.php
Normal file
@ -0,0 +1,224 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['board_table']} a ";
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
|
||||||
|
if ($is_admin != "super") {
|
||||||
|
$sql_common .= " , {$g5['group_table']} b ";
|
||||||
|
$sql_search .= " and (a.gr_id = b.gr_id and b.gr_admin = '{$member['mb_id']}') ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
case "bo_table" :
|
||||||
|
$sql_search .= " ($sfl like '$stx%') ";
|
||||||
|
break;
|
||||||
|
case "a.gr_id" :
|
||||||
|
$sql_search .= " ($sfl = '$stx') ";
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
$sql_search .= " ($sfl like '%$stx%') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$sql_search .= " ) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$sst) {
|
||||||
|
$sst = "a.gr_id, a.bo_table";
|
||||||
|
$sod = "asc";
|
||||||
|
}
|
||||||
|
$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 * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$listall = '';
|
||||||
|
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||||
|
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||||
|
|
||||||
|
$g5['title'] = '게시판관리';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 15;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="fsearch" id="fsearch" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>게시판 검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
생성된 게시판수 <?php echo number_format($total_count) ?>개
|
||||||
|
</span>
|
||||||
|
<select name="sfl" title="검색대상">
|
||||||
|
<option value="bo_table"<?php echo get_selected($_GET['sfl'], "bo_subject", true); ?>>TABLE</option>
|
||||||
|
<option value="bo_subject"<?php echo get_selected($_GET['sfl'], "bo_subject"); ?>>제목</option>
|
||||||
|
<option value="a.gr_id"<?php echo get_selected($_GET['sfl'], "a.gr_id"); ?>>그룹ID</option>
|
||||||
|
</select>
|
||||||
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>생성된 게시판 목록</h2>
|
||||||
|
<p>여러개의 게시판 설정을 한번에 바꾸실 때는 게시판 체크기능을 이용하세요.</p>
|
||||||
|
|
||||||
|
<?php if ($is_admin == 'super') { ?>
|
||||||
|
<div class="btn_add sort_with">
|
||||||
|
<a href="./board_form.php" id="bo_add">게시판 추가</a>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<ul class="sort_odr">
|
||||||
|
<li><?php echo subject_sort_link('a.gr_id') ?>그룹<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_table') ?>TABLE<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_mobile_skin', '', 'desc') ?>모바일<span class="sound_only"> 스킨 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_subject') ?>제목<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_use_sns') ?>SNS<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_use_search') ?>검색사용<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_show_menu') ?>메뉴보임<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('bo_order') ?>출력순서<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form name="fboardlist" id="fboardlist" action="./board_list_update.php" onsubmit="return fboardlist_submit(this);" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
<table class="tbl_bo_list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
<label for="chkall" class="sound_only">게시판 전체</label>
|
||||||
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
|
</th>
|
||||||
|
<th scope="col">그룹</th>
|
||||||
|
<th scope="col">TABLE</th>
|
||||||
|
<th scope="col">스킨</th>
|
||||||
|
<th scope="col">모바일<br>스킨</th>
|
||||||
|
<th scope="col">제목</th>
|
||||||
|
<th scope="col">읽기P<span class="sound_only">포인트</span></th>
|
||||||
|
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
|
||||||
|
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
|
||||||
|
<th scope="col">다운P<span class="sound_only">포인트</span></th>
|
||||||
|
<th scope="col">SNS<br>사용</th>
|
||||||
|
<th scope="col">검색<br>사용</th>
|
||||||
|
<th scope="col">메뉴<br>보임</th>
|
||||||
|
<th scope="col">출력<br>순서</th>
|
||||||
|
<th scope="col">접속기기</th>
|
||||||
|
<th scope="col">관리</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$one_update = '<a href="./board_form.php?w=u&bo_table='.$row['bo_table'].'&'.$qstr.'">수정</a>';
|
||||||
|
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy" target="win_board_copy">복사</a>';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php if ($is_admin == 'super'){ ?>
|
||||||
|
<?php echo get_group_select("gr_id[$i]", $row['gr_id']) ?>
|
||||||
|
<?php }else{ ?>
|
||||||
|
<input type="hidden" name="gr_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>"><?php echo $row['gr_subject'] ?>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
<td class="td_boid">
|
||||||
|
<input type="hidden" name="board_table[<?php echo $i ?>]" value="<?php echo $row['bo_table'] ?>">
|
||||||
|
<a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo $row['bo_table'] ?></a>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo get_skin_select('board', 'bo_skin_'.$i, "bo_skin[$i]", $row['bo_skin']); ?>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php echo get_mobile_skin_select('board', 'bo_mobile_skin_'.$i, "bo_mobile_skin[$i]", $row['bo_mobile_skin']); ?>
|
||||||
|
</td>
|
||||||
|
<td><input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject[<?php echo $i ?>]" title="게시판제목" class="required frm_input" size="10" required="required"></td>
|
||||||
|
<td><input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" title="읽기포인트" class="frm_input" size="2"></td>
|
||||||
|
<td><input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" title="쓰기포인트" class="frm_input" size="2"></td>
|
||||||
|
<td><input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" title="댓글포인트" class="frm_input" size="2"></td>
|
||||||
|
<td><input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" title="다운포인트" class="frm_input" size="2"></td>
|
||||||
|
<td><input type="checkbox" name="bo_use_sns[<?php echo $i ?>]" value="1" id="bo_use_sns<?php echo $i ?>" <?php echo $row['bo_use_sns']?"checked":"" ?> title="선택시 SNS 사용"></td>
|
||||||
|
<td><input type="checkbox" name="bo_use_search[<?php echo $i ?>]" value="1" id="bo_use_search_<?php echo $i ?>" <?php echo $row['bo_use_search']?"checked":"" ?> title="선택시 검색사용"></td>
|
||||||
|
<td><input type="checkbox" name="bo_show_menu[<?php echo $i ?>]" value="1" id="bo_show_menu_<?php echo $i ?>" <?php echo $row['bo_show_menu']?"checked":"" ?> title="선택시 메뉴보이기"></td>
|
||||||
|
<td><input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order<?php echo $i ?>" title="출력순서" class="frm_input" size="2"></td>
|
||||||
|
<td>
|
||||||
|
<select name="bo_device[<?php echo $i ?>]" id="bo_device_<?php echo $i ?>" title="접속기기 선택">
|
||||||
|
<option value="both"<?php echo get_selected($row['bo_device'], 'both', true); ?>>모두</option>
|
||||||
|
<option value="pc"<?php echo get_selected($row['bo_device'], 'pc'); ?>>PC</option>
|
||||||
|
<option value="mobile"<?php echo get_selected($row['bo_device'], 'mobile'); ?>>모바일</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td><?php echo $one_update ?> <?php echo $one_copy ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||||
|
<?php if ($is_admin == 'super') { ?>
|
||||||
|
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||||
|
<?php } ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page='); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fboardlist_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$(function(){
|
||||||
|
$(".board_copy").click(function(){
|
||||||
|
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
73
adm/board_list_update.php
Normal file
73
adm/board_list_update.php
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
if (!count($_POST['chk'])) {
|
||||||
|
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_POST['act_button'] == "선택수정") {
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||||
|
|
||||||
|
// 실제 번호를 넘김
|
||||||
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
if ($is_admin != 'super') {
|
||||||
|
$sql = " select count(*) as cnt from {$g5['board_table']} a, {$g5['group_table']} b
|
||||||
|
where a.gr_id = '{$_POST['gr_id'][$k]}'
|
||||||
|
and a.gr_id = b.gr_id
|
||||||
|
and b.gr_admin = '{$member['mb_id']}' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if (!$row['cnt'])
|
||||||
|
alert('최고관리자가 아닌 경우 다른 관리자의 게시판('.$board_table[$k].')은 수정이 불가합니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " update {$g5['board_table']}
|
||||||
|
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||||
|
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||||
|
bo_device = '{$_POST['bo_device'][$k]}',
|
||||||
|
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||||
|
bo_mobile_skin = '{$_POST['bo_mobile_skin'][$k]}',
|
||||||
|
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
||||||
|
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
||||||
|
bo_comment_point = '{$_POST['bo_comment_point'][$k]}',
|
||||||
|
bo_download_point = '{$_POST['bo_download_point'][$k]}',
|
||||||
|
bo_use_search = '{$_POST['bo_use_search'][$k]}',
|
||||||
|
bo_use_sns = '{$_POST['bo_use_sns'][$k]}',
|
||||||
|
bo_show_menu = '{$_POST['bo_show_menu'][$k]}',
|
||||||
|
bo_order = '{$_POST['bo_order'][$k]}'
|
||||||
|
where bo_table = '{$_POST['board_table'][$k]}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ($_POST['act_button'] == "선택삭제") {
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
// _BOARD_DELETE_ 상수를 선언해야 board_delete.inc.php 가 정상 작동함
|
||||||
|
define('_BOARD_DELETE_', true);
|
||||||
|
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||||
|
// 실제 번호를 넘김
|
||||||
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
// include 전에 $bo_table 값을 반드시 넘겨야 함
|
||||||
|
$tmp_bo_table = escape_trim($_POST['board_table'][$k]);
|
||||||
|
include ('./board_delete.inc.php');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
goto_url('./board_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
159
adm/boardgroup_form.php
Normal file
159
adm/boardgroup_form.php
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
$html_title = '게시판그룹';
|
||||||
|
if ($w == '') {
|
||||||
|
$gr_id_attr = 'required';
|
||||||
|
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||||
|
$gr['gr_use_access'] = 0;
|
||||||
|
$html_title .= ' 생성';
|
||||||
|
} else if ($w == 'u') {
|
||||||
|
$gr_id_attr = 'readonly';
|
||||||
|
$gr = sql_fetch(" select * from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||||
|
$html_title .= ' 수정';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
|
||||||
|
if (!isset($group['gr_device'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['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 `{$g5['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);
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = $html_title;
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="cbox">
|
||||||
|
<p>
|
||||||
|
게시판을 생성하시려면 1개 이상의 게시판그룹이 필요합니다.<br>
|
||||||
|
게시판그룹을 이용하시면 더 효과적으로 게시판을 관리할 수 있습니다.
|
||||||
|
</p>
|
||||||
|
<form name="fboardgroup" id="fboardgroup" action="./boardgroup_form_update.php" onsubmit="return fboardgroup_check(this);" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
|
||||||
|
<table id="frm_gr" class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="gr_id">그룹 ID<?php echo $sound_only ?></label></th>
|
||||||
|
<td><input type="text" name="gr_id" value="<?php echo $group['gr_id'] ?>" id="gr_id" class="<?php echo $gr_id_attr ?> alnum_ frm_input" maxlength="10">
|
||||||
|
<?php
|
||||||
|
if ($w=='')
|
||||||
|
echo '영문자, 숫자, _ 만 가능 (공백없이)';
|
||||||
|
else
|
||||||
|
echo '<a href="'.G5_BBS_URL.'/group.php?gr_id='.$group['gr_id'].'" class="btn_frmline">게시판그룹 바로가기</a>';
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="gr_subject">그룹 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="gr_subject" value="<?php echo get_text($group['gr_subject']) ?>" id="gr_subject" required class="required frm_input" size="80">
|
||||||
|
<?php
|
||||||
|
if ($w == 'u')
|
||||||
|
echo '<a href="./board_form.php?gr_id='.$gr_id.'" class="btn_frmline">게시판생성</a>';
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="gr_device">접속기기</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("PC 와 모바일 사용을 구분합니다.") ?>
|
||||||
|
<select id="gr_device" name="gr_device">
|
||||||
|
<option value="both"<?php echo get_selected($group['gr_device'], 'both', true); ?>>PC와 모바일에서 모두 사용</option>
|
||||||
|
<option value="pc"<?php echo get_selected($group['gr_device'], 'pc'); ?>>PC 전용</option>
|
||||||
|
<option value="mobile"<?php echo get_selected($group['gr_device'], 'mobile'); ?>>모바일 전용</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="gr_admin">그룹 관리자</label></th>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
if ($is_admin == 'super')
|
||||||
|
echo '<input type="text" id="gr_admin" name="gr_admin" class="frm_input" value="'.$gr['gr_admin'].'" maxlength="20">';
|
||||||
|
else
|
||||||
|
echo '<input type="hidden" id="gr_admin" name="gr_admin" value="'.$gr['gr_admin'].'">'.$gr['gr_admin'];
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="gr_use_access">접근회원사용</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("사용에 체크하시면 이 그룹에 속한 게시판은 접근가능한 회원만 접근이 가능합니다.") ?>
|
||||||
|
<input type="checkbox" name="gr_use_access" value="1" id="gr_use_access" <?php echo $gr['gr_use_access']?'checked':''; ?>>
|
||||||
|
사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">접근회원수</th>
|
||||||
|
<td>
|
||||||
|
<?php
|
||||||
|
// 접근회원수
|
||||||
|
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$gr_id}' ";
|
||||||
|
$row1 = sql_fetch($sql1);
|
||||||
|
echo '<a href="./boardgroupmember_list.php?gr_id='.$gr_id.'">'.$row1['cnt'].'</a>';
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="gr_show_menu">메뉴보이기</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("사용에 체크하시면 게시판그룹 제목을 메뉴에 출력합니다.") ?>
|
||||||
|
<input type="checkbox" name="gr_show_menu" value="1" id="gr_show_menu" <?php echo $gr['gr_show_menu']?'checked':''; ?>>
|
||||||
|
사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php for ($i=1;$i<=10;$i++) { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">여분필드<?php echo $i ?></th>
|
||||||
|
<td class="td_gr_extra">
|
||||||
|
<label for="gr_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||||
|
<input type="text" name="gr_<?php echo $i ?>_subj" value="<?php echo get_text($group['gr_'.$i.'_subj']) ?>" id="gr_<?php echo $i ?>_subj" class="frm_input">
|
||||||
|
<label for="gr_<?php echo $i ?>">여분필드 <?php echo $i ?> 내용</label>
|
||||||
|
<input type="text" name="gr_<?php echo $i ?>" value="<?php echo $gr['gr_'.$i] ?>" id="gr_<?php echo $i ?>" class="frm_input">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<p>
|
||||||
|
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||||
|
</p>
|
||||||
|
<input type="submit" class="btn_submit" accesskey="s" value="확인">
|
||||||
|
<a href="./boardgroup_list.php?<?php echo $qstr ?>">목록</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fboardgroup_check(f)
|
||||||
|
{
|
||||||
|
f.action = './boardgroup_form_update.php';
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
73
adm/boardgroup_form_update.php
Normal file
73
adm/boardgroup_form_update.php
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($w == 'u')
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
if (!preg_match("/^([A-Za-z0-9_]{1,10})$/", $_POST['gr_id']))
|
||||||
|
alert('그룹 ID는 공백없이 영문자, 숫자, _ 만 사용 가능합니다. (10자 이내)');
|
||||||
|
|
||||||
|
if (!$gr_subject) alert('그룹 제목을 입력하세요.');
|
||||||
|
|
||||||
|
$sql_common = " gr_subject = '{$_POST['gr_subject']}',
|
||||||
|
gr_device = '{$_POST['gr_device']}',
|
||||||
|
gr_admin = '{$_POST['gr_admin']}',
|
||||||
|
gr_show_menu = '{$_POST['gr_show_menu']}',
|
||||||
|
gr_1_subj = '{$_POST['gr_1_subj']}',
|
||||||
|
gr_2_subj = '{$_POST['gr_2_subj']}',
|
||||||
|
gr_3_subj = '{$_POST['gr_3_subj']}',
|
||||||
|
gr_4_subj = '{$_POST['gr_4_subj']}',
|
||||||
|
gr_5_subj = '{$_POST['gr_5_subj']}',
|
||||||
|
gr_6_subj = '{$_POST['gr_6_subj']}',
|
||||||
|
gr_7_subj = '{$_POST['gr_7_subj']}',
|
||||||
|
gr_8_subj = '{$_POST['gr_8_subj']}',
|
||||||
|
gr_9_subj = '{$_POST['gr_9_subj']}',
|
||||||
|
gr_10_subj = '{$_POST['gr_10_subj']}',
|
||||||
|
gr_1 = '{$_POST['gr_1']}',
|
||||||
|
gr_2 = '{$_POST['gr_2']}',
|
||||||
|
gr_3 = '{$_POST['gr_3']}',
|
||||||
|
gr_4 = '{$_POST['gr_4']}',
|
||||||
|
gr_5 = '{$_POST['gr_5']}',
|
||||||
|
gr_6 = '{$_POST['gr_6']}',
|
||||||
|
gr_7 = '{$_POST['gr_7']}',
|
||||||
|
gr_8 = '{$_POST['gr_8']}',
|
||||||
|
gr_9 = '{$_POST['gr_9']}',
|
||||||
|
gr_10 = '{$_POST['gr_10']}' ";
|
||||||
|
if (isset($_POST['gr_use_access']))
|
||||||
|
$sql_common .= ", gr_use_access = '{$_POST['gr_use_access']}' ";
|
||||||
|
else
|
||||||
|
$sql_common .= ", gr_use_access = '' ";
|
||||||
|
|
||||||
|
if ($w == '') {
|
||||||
|
|
||||||
|
$sql = " select count(*) as cnt from {$g5['group_table']} where gr_id = '{$_POST['gr_id']}' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if ($row['cnt'])
|
||||||
|
alert('이미 존재하는 그룹 ID 입니다.');
|
||||||
|
|
||||||
|
$sql = " insert into {$g5['group_table']}
|
||||||
|
set gr_id = '{$_POST['gr_id']}',
|
||||||
|
{$sql_common} ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
} else if ($w == "u") {
|
||||||
|
|
||||||
|
$sql = " update {$g5['group_table']}
|
||||||
|
set {$sql_common}
|
||||||
|
where gr_id = '{$_POST['gr_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// syndication ping
|
||||||
|
include G5_SYNDI_PATH.'/include/include.adm.boardgroup_form_update.php';
|
||||||
|
|
||||||
|
goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr);
|
||||||
|
?>
|
||||||
217
adm/boardgroup_list.php
Normal file
217
adm/boardgroup_list.php
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
if (!isset($group['gr_device'])) {
|
||||||
|
// 게시판 그룹 사용 필드 추가
|
||||||
|
// both : pc, mobile 둘다 사용
|
||||||
|
// pc : pc 전용 사용
|
||||||
|
// mobile : mobile 전용 사용
|
||||||
|
// none : 사용 안함
|
||||||
|
sql_query(" ALTER TABLE `{$g5['board_group_table']}` ADD `gr_device` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `gr_subject` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['group_table']} ";
|
||||||
|
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
$sql_search .= " and (gr_admin = '{$member['mb_id']}') ";
|
||||||
|
|
||||||
|
if ($stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
case "gr_id" :
|
||||||
|
case "gr_admin" :
|
||||||
|
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$sql_search .= " ) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($sst)
|
||||||
|
$sql_order = " order by {$sst} {$sod} ";
|
||||||
|
else
|
||||||
|
$sql_order = " order by gr_id asc ";
|
||||||
|
|
||||||
|
$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 * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$listall = '';
|
||||||
|
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||||
|
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>';
|
||||||
|
|
||||||
|
$g5['title'] = '게시판그룹설정';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 8;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="fsearch" name="fsearch" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>그룹 검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
생성된 그룹수 <?php echo number_format($total_count) ?>개
|
||||||
|
</span>
|
||||||
|
<select name="sfl" title="검색대상">
|
||||||
|
<option value="gr_subject"<?php echo get_selected($_GET['sfl'], "gr_subject"); ?>>제목</option>
|
||||||
|
<option value="gr_id"<?php echo get_selected($_GET['sfl'], "gr_id"); ?>>ID</option>
|
||||||
|
<option value="gr_admin"<?php echo get_selected($_GET['sfl'], "gr_admin"); ?>>그룹관리자</option>
|
||||||
|
</select>
|
||||||
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" required class="required frm_input">
|
||||||
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>게시판그룹 목록</h2>
|
||||||
|
<p>
|
||||||
|
접근사용 옵션을 설정하시면 관리자가 지정한 회원만 해당 그룹에 접근할 수 있습니다.<br>
|
||||||
|
접근사용 옵션은 해당 그룹에 속한 모든 게시판에 적용됩니다.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php if ($is_admin == 'super') { ?>
|
||||||
|
<div class="btn_add sort_with">
|
||||||
|
<a href="./boardgroup_form.php" id="bo_gr_add">게시판그룹 추가</a>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<ul class="sort_odr">
|
||||||
|
<li><?php echo subject_sort_link('gr_id') ?>그룹아이디<span class="sound_only"> 순 정렬</span></a></th>
|
||||||
|
<li><?php echo subject_sort_link('gr_subject') ?>제목<span class="sound_only"> 순 정렬</span></a></th>
|
||||||
|
<?php if ($is_admin == 'super'){ ?><li><?php echo subject_sort_link('gr_admin') ?>그룹관리자<span class="sound_only"> 순 정렬</span></a></th><?php } ?>
|
||||||
|
<li><?php echo subject_sort_link('gr_order') ?>출력순서<span class="sound_only"> 순 정렬</span></a></th>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form name="fboardgrouplist" id="fboardgrouplist" action="./boardgroup_list_update.php" onsubmit="return fboardgrouplist_submit(this);" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
|
<table class="tbl_gr_list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
<label for="chkall" class="sound_only">그룹 전체</label>
|
||||||
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
|
</th>
|
||||||
|
<th scope="col">그룹아이디</th>
|
||||||
|
<th scope="col">제목</th>
|
||||||
|
<?php if ($is_admin == 'super'){ ?><th scope="col">그룹관리자</th><?php } ?>
|
||||||
|
<th scope="col">게시판<br>갯수</th>
|
||||||
|
<th scope="col">접근<br>사용</th>
|
||||||
|
<th scope="col">접근<br>회원수</th>
|
||||||
|
<th scope="col">메뉴<br>보임</th>
|
||||||
|
<th scope="col">출력<br>순서</th>
|
||||||
|
<th scope="col">접속기기</th>
|
||||||
|
<th scope="col">관리</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
// 접근회원수
|
||||||
|
$sql1 = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$row['gr_id']}' ";
|
||||||
|
$row1 = sql_fetch($sql1);
|
||||||
|
|
||||||
|
// 게시판수
|
||||||
|
$sql2 = " select count(*) as cnt from {$g5['board_table']} where gr_id = '{$row['gr_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
|
||||||
|
$s_upd = '<a href="./boardgroup_form.php?'.$qstr.'&w=u&gr_id='.$row['gr_id'].'">수정</a>';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk">
|
||||||
|
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td class="td_grid"><a href="<?php echo G5_BBS_URL ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" title="그룹제목 수정" class="frm_input">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<?php if ($is_admin == 'super'){ ?>
|
||||||
|
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>" id="gr_admin_<?php echo $i ?>" title="그룹관리자 수정" class="frm_input" size="10" maxlength="20">
|
||||||
|
<?php }else{ ?>
|
||||||
|
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>"><td><?php echo $row['gr_admin'] ?>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
<td><a href="./board_list.php?sfl=a.gr_id&stx=<?php echo $row['gr_id'] ?>"><?php echo $row2['cnt'] ?></a></td>
|
||||||
|
<td><input type="checkbox" name="gr_use_access[<?php echo $i ?>]" <?php echo $row['gr_use_access']?'checked':'' ?> value="1" id="gr_use_access_<?php echo $i ?>" title="선택 시 접근회원 사용"></td>
|
||||||
|
<td><a href="./boardgroupmember_list.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row1['cnt'] ?></a></td>
|
||||||
|
<td><input type="checkbox" name="gr_show_menu[<?php echo $i ?>]" <?php echo $row['gr_show_menu']?'checked':'' ?> value="1" id="gr_show_menu_<?php echo $i ?>" title="선택 시 메뉴보이기"></td>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="gr_order[<?php echo $i ?>]" value="<?php echo $row['gr_order'] ?>" id="gr_order_<?php echo $i ?>" title="출력순서 수정" class="frm_input" size="2">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<select id="gr_device_<?php echo $i ?>" name="gr_device[<?php echo $i ?>]" title="접속기기 선택">
|
||||||
|
<option value="both"<?php echo get_selected($row['gr_device'], 'both'); ?>>모두</option>
|
||||||
|
<option value="pc"<?php echo get_selected($row['gr_device'], 'pc'); ?>>PC</option>
|
||||||
|
<option value="mobile"<?php echo get_selected($row['gr_device'], 'mobile'); ?>>모바일</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<td class="td_smallmng"><?php echo $s_upd ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택수정">
|
||||||
|
<input type="submit" name="act_button" onclick="document.pressed=this.value" value="선택삭제">
|
||||||
|
<a href="./boardgroup_form.php">게시판그룹 추가</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$pagelist = get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page=');
|
||||||
|
echo $pagelist;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fboardgrouplist_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
47
adm/boardgroup_list_update.php
Normal file
47
adm/boardgroup_list_update.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
//print_r2($_POST); exit;
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$count = count($_POST['chk']);
|
||||||
|
|
||||||
|
if(!$count)
|
||||||
|
alert($_POST['act_button'].'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||||
|
|
||||||
|
for ($i=0; $i<$count; $i++)
|
||||||
|
{
|
||||||
|
$k = $_POST['chk'][$i];
|
||||||
|
$gr_id = $_POST['group_id'][$k];
|
||||||
|
|
||||||
|
if($_POST['act_button'] == '선택수정') {
|
||||||
|
$sql = " update {$g5['group_table']}
|
||||||
|
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||||
|
gr_device = '{$_POST['gr_device'][$k]}',
|
||||||
|
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||||
|
gr_use_access = '{$_POST['gr_use_access'][$k]}',
|
||||||
|
gr_show_menu = '{$_POST['gr_show_menu'][$k]}',
|
||||||
|
gr_order = '{$_POST['gr_order'][$k]}'
|
||||||
|
where gr_id = '{$gr_id}' ";
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
} else if($_POST['act_button'] == '선택삭제') {
|
||||||
|
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||||
|
if ($row['cnt'])
|
||||||
|
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=gr_id&stx='.$gr_id);
|
||||||
|
|
||||||
|
// 그룹 삭제
|
||||||
|
sql_query(" delete from {$g5['group_table']} where gr_id = '$gr_id' ");
|
||||||
|
|
||||||
|
// 그룹접근 회원 삭제
|
||||||
|
sql_query(" delete from {$g5['group_member_table']} where gr_id = '$gr_id' ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
goto_url('./boardgroup_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
124
adm/boardgroupmember_form.php
Normal file
124
adm/boardgroupmember_form.php
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
$mb = get_member($mb_id);
|
||||||
|
if (!$mb['mb_id'])
|
||||||
|
alert('존재하지 않는 회원입니다.');
|
||||||
|
|
||||||
|
$g5['title'] = '회원별 접근가능그룹';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 4;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="cbox">
|
||||||
|
<p>아이디 <?php echo $mb['mb_id'] ?>, 이름 <?php echo $mb['mb_name'] ?>, 별명 <?php echo $mb['mb_nick'] ?>님이 접근가능한 그룹 목록</p>
|
||||||
|
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>" id="sst">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>" id="sod">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>" id="sfl">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>" id="stx">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>" id="page">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||||
|
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||||
|
<input type="hidden" name="w" value="d" id="w">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 접근가능그룹 전체선택" onclick="check_all(this.form)"></th>
|
||||||
|
<th scope="col">그룹아이디</th>
|
||||||
|
<th scope="col">그룹</th>
|
||||||
|
<th scope="col">처리일시</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$sql = " select * from {$g5['group_member_table']} a, {$g5['group_table']} b
|
||||||
|
where a.mb_id = '{$mb['mb_id']}'
|
||||||
|
and a.gr_id = b.gr_id ";
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
$sql .= " and b.gr_admin = '{$member['mb_id']}' ";
|
||||||
|
$sql .= " order by a.gr_id desc ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$s_del = '<a href="javascript:post_delete(\'boardgroupmember_update.php\', \''.$row['gm_id'].'\');">삭제</a>';
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk"><input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>" title="<?php echo $row['gr_subject'] ?> 그룹 선택"></td>
|
||||||
|
<td class="td_grid"><a href="<?php echo $g5['bbs_path'] ?>/group.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row['gr_id'] ?></a></td>
|
||||||
|
<td class="td_category"><?php echo $row['gr_subject'] ?></td>
|
||||||
|
<td class="td_time"><?php echo $row['gm_datetime'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0) {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">접근가능한 그룹이 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<input type="submit" name="" value="선택삭제">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form name="fboardgroupmember_form" id="fboardgroupmember_form" action="./boardgroupmember_update.php" onsubmit="return boardgroupmember_form_check(this)" method="post">
|
||||||
|
<input type="hidden" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php echo $mb['mb_id'] ?>님 접근가능그룹 추가</legend>
|
||||||
|
<label for="gr_id">그룹지정</label>
|
||||||
|
<select name="gr_id" id="gr_id">
|
||||||
|
<option value="">접근가능 그룹을 선택하세요.</option>
|
||||||
|
<?php
|
||||||
|
$sql = " select *
|
||||||
|
from {$g5['group_table']}
|
||||||
|
where gr_use_access = 1 ";
|
||||||
|
//if ($is_admin == 'group') {
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
$sql .= " and gr_admin = '{$member['mb_id']}' ";
|
||||||
|
$sql .= " order by gr_id ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
echo "<option value=\"".$row['gr_id']."\">".$row['gr_subject']."</option>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
<input type="submit" value="선택" class="btn_submit" accesskey="s">
|
||||||
|
<p>게시판 그룹이 존재하지 않는다면 <a href="./boardgroup_form.php">게시판그룹생성하기</a></p>
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fboardgroupmember_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function boardgroupmember_form_check(f)
|
||||||
|
{
|
||||||
|
if (f.gr_id.value == '') {
|
||||||
|
alert('접근가능 그룹을 선택하세요.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
167
adm/boardgroupmember_list.php
Normal file
167
adm/boardgroupmember_list.php
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$gr = get_group($gr_id);
|
||||||
|
if (!$gr['gr_id']) {
|
||||||
|
alert('존재하지 않는 그룹입니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['group_member_table']} a
|
||||||
|
left outer join {$g5['member_table']} b on (a.mb_id = b.mb_id) ";
|
||||||
|
|
||||||
|
$sql_search = " where gr_id = '{$gr_id}' ";
|
||||||
|
// 회원아이디로 검색되지 않던 오류를 수정
|
||||||
|
if (isset($stx) && $stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
default :
|
||||||
|
$sql_search .= " ($sfl like '%$stx%') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$sql_search .= " ) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$sst) {
|
||||||
|
$sst = "gm_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 *
|
||||||
|
{$sql_common}
|
||||||
|
{$sql_search}
|
||||||
|
{$sql_order}
|
||||||
|
limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$g5['title'] = $gr['gr_subject'].' 그룹 접근가능회원';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 7;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="fsearch" id="fsearch" method="get">
|
||||||
|
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||||
|
<fieldset>
|
||||||
|
<legend><?php echo $gr['gr_subject'] ?>(아이디 <?php echo $gr['gr_id'] ?>)에서 검색</legend>
|
||||||
|
<label for="sfl">검색대상</label>
|
||||||
|
<select id="sfl" name="sfl">
|
||||||
|
<option value="a.mb_id"<?php echo get_selected($_GET['sfl'], "a.mb_id") ?>>회원아이디</option>
|
||||||
|
</select>
|
||||||
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2><?php echo $gr['gr_subject'] ?> 그룹 접근가능 회원 목록 (그룹아이디:<?php echo $gr['gr_id'] ?>)</h2>
|
||||||
|
|
||||||
|
<ul class="sort_odr">
|
||||||
|
<li><?php echo subject_sort_link('b.mb_id', 'gr_id='.$gr_id) ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('b.mb_name', 'gr_id='.$gr_id) ?>이름<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('b.mb_nick', 'gr_id='.$gr_id) ?>별명<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('b.mb_today_login', 'gr_id='.$gr_id) ?>최종접속<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('a.gm_datetime', 'gr_id='.$gr_id) ?>처리일시<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form name="fboardgroupmember" id="fboardgroupmember" action="./boardgroupmember_update.php" onsubmit="return fboardgroupmember_submit(this);" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||||
|
<input type="hidden" name="w" value="ld">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
<label for="chkall" class="sound_only">접근가능회원 전체</label>
|
||||||
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
|
</th>
|
||||||
|
<th scope="col">그룹</th>
|
||||||
|
<th scope="col">회원아이디</th>
|
||||||
|
<th scope="col">이름</th>
|
||||||
|
<th scope="col">별명</th>
|
||||||
|
<th scope="col">최종접속</th>
|
||||||
|
<th scope="col">처리일시</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
// 접근가능한 그룹수
|
||||||
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
$group = "";
|
||||||
|
if ($row2['cnt'])
|
||||||
|
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||||
|
|
||||||
|
//$s_del = '<a href="javascript:post_delete(\'boardgroupmember_update.php\', \''.$row['gm_id'].'\');">삭제</a>';
|
||||||
|
|
||||||
|
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?> 회원</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td class="td_grid"><?php echo $group ?></td>
|
||||||
|
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
||||||
|
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>
|
||||||
|
<td class="td_name sv_use"><?php echo $mb_nick ?></td>
|
||||||
|
<td class="td_time"><?php echo substr($row['mb_today_login'],2,8) ?></td>
|
||||||
|
<td class="td_time"><?php echo $row['gm_datetime'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0)
|
||||||
|
{
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<input type="submit" name="" value="선택삭제">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&gr_id=$gr_id&page="); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fboardgroupmember_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
70
adm/boardgroupmember_update.php
Normal file
70
adm/boardgroupmember_update.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
sql_query(" ALTER TABLE {$g5['group_member_table']} CHANGE `gm_id` `gm_id` INT( 11 ) DEFAULT '0' NOT NULL AUTO_INCREMENT ", false);
|
||||||
|
|
||||||
|
if ($w == '')
|
||||||
|
{
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$mb = get_member($mb_id);
|
||||||
|
if (!$mb['mb_id']) {
|
||||||
|
alert('존재하지 않는 회원입니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$gr = get_group($gr_id);
|
||||||
|
if (!$gr['gr_id']) {
|
||||||
|
alert('존재하지 않는 그룹입니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " select count(*) as cnt
|
||||||
|
from {$g5['group_member_table']}
|
||||||
|
where gr_id = '{$gr_id}'
|
||||||
|
and mb_id = '{$mb_id}' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if ($row['cnt']) {
|
||||||
|
alert('이미 등록되어 있는 자료입니다.');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$sql = " insert into {$g5['group_member_table']}
|
||||||
|
set gr_id = '{$_POST['gr_id']}',
|
||||||
|
mb_id = '{$_POST['mb_id']}',
|
||||||
|
gm_datetime = '".G5_TIME_YMDHIS."' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ($w == 'd' || $w == 'ld')
|
||||||
|
{
|
||||||
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
|
$count = count($_POST['chk']);
|
||||||
|
if(!$count)
|
||||||
|
alert('삭제할 목록을 하나이상 선택해 주세요.');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
for($i=0; $i<$count; $i++) {
|
||||||
|
$gm_id = $_POST['chk'][$i];
|
||||||
|
$sql = " select * from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||||
|
$gm = sql_fetch($sql);
|
||||||
|
if (!$gm['gm_id']) {
|
||||||
|
if($count == 1)
|
||||||
|
alert('존재하지 않는 자료입니다.');
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = " delete from {$g5['group_member_table']} where gm_id = '$gm_id' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($w == 'ld')
|
||||||
|
goto_url('./boardgroupmember_list.php?gr_id='.$gr_id);
|
||||||
|
else
|
||||||
|
goto_url('./boardgroupmember_form.php?mb_id='.$mb_id);
|
||||||
|
?>
|
||||||
47
adm/cache_file_delete.php
Normal file
47
adm/cache_file_delete.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '100900';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||||
|
|
||||||
|
$g5['title'] = '캐시파일 일괄삭제';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="cache_del">
|
||||||
|
<p>
|
||||||
|
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||||
|
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$cnt=0;
|
||||||
|
echo '<ul>'.PHP_EOL;
|
||||||
|
|
||||||
|
$files = glob(G5_DATA_PATH.'/cache/latest-*');
|
||||||
|
if (is_array($files)) {
|
||||||
|
foreach ($files as $cache_file) {
|
||||||
|
$cnt++;
|
||||||
|
unlink($cache_file);
|
||||||
|
echo '<li>'.$cache_file.'</li>'.PHP_EOL;
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if ($cnt%10==0)
|
||||||
|
echo PHP_EOL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||||
|
echo '<p><span>최신글 캐시파일 '.$cnt.'건 삭제가 완료됐습니다.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>'.PHP_EOL;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
965
adm/config_form.php
Normal file
965
adm/config_form.php
Normal file
@ -0,0 +1,965 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
if (!isset($config['cf_include_index'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_include_index` VARCHAR(255) NOT NULL AFTER `cf_admin`,
|
||||||
|
ADD `cf_include_head` VARCHAR(255) NOT NULL AFTER `cf_include_index`,
|
||||||
|
ADD `cf_include_tail` VARCHAR(255) NOT NULL AFTER `cf_include_head`,
|
||||||
|
ADD `cf_add_script` TEXT NOT NULL AFTER `cf_include_tail` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($config['cf_mobile_new_skin'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_mobile_new_skin` VARCHAR(255) NOT NULL AFTER `cf_memo_send_point`,
|
||||||
|
ADD `cf_mobile_search_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_new_skin`,
|
||||||
|
ADD `cf_mobile_connect_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_search_skin`,
|
||||||
|
ADD `cf_mobile_member_skin` VARCHAR(255) NOT NULL AFTER `cf_mobile_connect_skin` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_gcaptcha_mp3'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_gcaptcha_mp3` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_mobile_member_skin` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_editor'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_editor` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_gcaptcha_mp3` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_googl_shorturl_apikey'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_googl_shorturl_apikey` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_gcaptcha_mp3` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_mobile_pages'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_mobile_pages` INT(11) NOT NULL DEFAULT '0' AFTER `cf_write_pages` ", true);
|
||||||
|
sql_query(" UPDATE `{$g5['config_table']}` SET cf_mobile_pages = '5' ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_facebook_appid'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_facebook_appid` VARCHAR(255) NOT NULL AFTER `cf_googl_shorturl_apikey`,
|
||||||
|
ADD `cf_facebook_secret` VARCHAR(255) NOT NULL AFTER `cf_facebook_appid`,
|
||||||
|
ADD `cf_twitter_key` VARCHAR(255) NOT NULL AFTER `cf_facebook_secret`,
|
||||||
|
ADD `cf_twitter_secret` VARCHAR(255) NOT NULL AFTER `cf_twitter_key`,
|
||||||
|
ADD `cf_me2day_key` VARCHAR(255) NOT NULL AFTER `cf_twitter_secret` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// uniqid 테이블이 없을 경우 생성
|
||||||
|
if(!sql_query(" DESC {$g5['uniqid_table']} ", false)) {
|
||||||
|
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['uniqid_table']}` (
|
||||||
|
`uq_id` bigint(20) unsigned NOT NULL,
|
||||||
|
`uq_ip` varchar(255) NOT NULL,
|
||||||
|
PRIMARY KEY (`uq_id`)
|
||||||
|
) ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!sql_query(" SELECT uq_ip from {$g5['uniqid_table']} limit 1 ", false)) {
|
||||||
|
sql_query(" ALTER TABLE {$g5['uniqid_table']} ADD `uq_ip` VARCHAR(255) NOT NULL ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 임시저장 테이블이 없을 경우 생성
|
||||||
|
if(!sql_query(" DESC {$g5['autosave_table']} ", false)) {
|
||||||
|
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['autosave_table']}` (
|
||||||
|
`as_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`mb_id` varchar(20) NOT NULL,
|
||||||
|
`as_uid` bigint(20) unsigned NOT NULL,
|
||||||
|
`as_subject` varchar(255) NOT NULL,
|
||||||
|
`as_content` text NOT NULL,
|
||||||
|
`as_datetime` datetime NOT NULL,
|
||||||
|
PRIMARY KEY (`as_id`),
|
||||||
|
UNIQUE KEY `as_uid` (`as_uid`),
|
||||||
|
KEY `mb_id` (`mb_id`)
|
||||||
|
) ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_admin_email'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_admin_email` VARCHAR(255) NOT NULL AFTER `cf_admin` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_cert_use'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_cert_use` TINYINT(4) NOT NULL DEFAULT '0' AFTER `cf_editor`,
|
||||||
|
ADD `cf_cert_ipin` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_use`,
|
||||||
|
ADD `cf_cert_hp` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_ipin`,
|
||||||
|
ADD `cf_cert_kcb_cd` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_hp`,
|
||||||
|
ADD `cf_cert_kcp_cd` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_kcb_cd`,
|
||||||
|
ADD `cf_cert_limit` INT(11) NOT NULL DEFAULT '0' AFTER `cf_cert_kcp_cd` ", true);
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}`
|
||||||
|
CHANGE `mb_hp_certify` `mb_certify` VARCHAR(20) NOT NULL DEFAULT '' ", true);
|
||||||
|
sql_query(" update {$g5['member_table']} set mb_certify = 'hp' where mb_certify = '1' ");
|
||||||
|
sql_query(" update {$g5['member_table']} set mb_certify = '' where mb_certify = '0' ");
|
||||||
|
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['cert_history_table']}` (
|
||||||
|
`cr_id` int(11) NOT NULL auto_increment,
|
||||||
|
`mb_id` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`cr_company` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`cr_method` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`cr_ip` varchar(255) NOT NULL DEFAULT '',
|
||||||
|
`cr_date` date NOT NULL DEFAULT '0000-00-00',
|
||||||
|
`cr_time` time NOT NULL DEFAULT '00:00:00',
|
||||||
|
PRIMARY KEY (`cr_id`),
|
||||||
|
KEY `mb_id` (`mb_id`)
|
||||||
|
)", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!isset($config['cf_analytics'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['config_table']}`
|
||||||
|
ADD `cf_analytics` TEXT NOT NULL AFTER `cf_intercept_ip` ", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = '환경설정';
|
||||||
|
include_once ('./admin.head.php');
|
||||||
|
|
||||||
|
$pg_anchor = '<ul class="anchor">
|
||||||
|
<li><a href="#anc_cf_basic">기본환경</a></li>
|
||||||
|
<li><a href="#anc_cf_board">게시판기본</a></li>
|
||||||
|
<li><a href="#anc_cf_join">회원가입</a></li>
|
||||||
|
<li><a href="#anc_cf_cert">본인확인</a></li>
|
||||||
|
<li><a href="#anc_cf_mail">기본메일환경</a></li>
|
||||||
|
<li><a href="#anc_cf_article_mail">글작성메일</a></li>
|
||||||
|
<li><a href="#anc_cf_join_mail">가입메일</a></li>
|
||||||
|
<li><a href="#anc_cf_vote_mail">투표메일</a></li>
|
||||||
|
<li><a href="#anc_cf_sns">SNS</a></li>
|
||||||
|
<li><a href="#anc_cf_lay">레이아웃 추가설정</a></li>
|
||||||
|
<li><a href="#anc_cf_extra">여분필드</a></li>
|
||||||
|
</ul>';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="fconfigform" id="fconfigform" method="post" onsubmit="return fconfigform_submit(this);">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||||
|
|
||||||
|
<section id="anc_cf_basic" class="cbox">
|
||||||
|
<h2>홈페이지 기본환경 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_title">홈페이지 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td colspan="3"><input type="text" name="cf_title" value="<?php echo $config['cf_title'] ?>" id="cf_title" required class="required frm_input" size="40"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_admin">최고관리자<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td colspan="3"><?php echo get_member_id_select('cf_admin', 10, $config['cf_admin'], 'required') ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_admin_email">관리자 메일 주소<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('관리자가 보내고 받는 용도로 사용하는 메일 주소를 입력합니다. (회원가입, 인증메일, 테스트, 회원메일발송 등에서 사용)') ?>
|
||||||
|
<input type="text" name="cf_admin_email" value="<?php echo $config['cf_admin_email'] ?>" id="cf_admin_email" required class="required email frm_input" size="40">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_use_point">포인트 사용</label></th>
|
||||||
|
<td colspan="3"><input type="checkbox" name="cf_use_point" value="1" id="cf_use_point" <?php echo $config['cf_use_point']?'checked':''; ?>> 사용</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_login_point">로그인시 포인트<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('회원에게 하루에 한번만 부여') ?>
|
||||||
|
<input type="text" name="cf_login_point" value="<?php echo $config['cf_login_point'] ?>" id="cf_login_point" required class="required frm_input" size="2"> 점
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_memo_send_point">쪽지보낼시 차감 포인트<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('양수로 입력하십시오. 0점은 쪽지 보낼시 포인트를 차감하지 않습니다.') ?>
|
||||||
|
<input type="text" name="cf_memo_send_point" value="<?php echo $config['cf_memo_send_point'] ?>" id="cf_memo_send_point" required class="required frm_input" size="2"> 점
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_cut_name">이름(별명) 표시</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('영숫자 2글자 = 한글 1글자') ?>
|
||||||
|
<input type="text" name="cf_cut_name" value="<?php echo $config['cf_cut_name'] ?>" id="cf_cut_name" class="frm_input" size="2"> 자리만 표시
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_nick_modify">별명 수정</label></th>
|
||||||
|
<td>수정하면 <input type="text" name="cf_nick_modify" value="<?php echo $config['cf_nick_modify'] ?>" id="cf_nick_modify" class="frm_input" size="1"> 일 동안 바꿀 수 없음</td>
|
||||||
|
<th scope="row"><label for="cf_open_modify">정보공개 수정</label></th>
|
||||||
|
<td>수정하면 <input type="text" name="cf_open_modify" value="<?php echo $config['cf_open_modify'] ?>" id="cf_open_modify" class="frm_input" size="1"> 일 동안 바꿀 수 없음</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_new_del">최근게시물 삭제</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('설정일이 지난 최근게시물 자동 삭제') ?>
|
||||||
|
<input type="text" name="cf_new_del" value="<?php echo $config['cf_new_del'] ?>" id="cf_new_del" class="frm_input" size="2"> 일
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_memo_del">쪽지 삭제</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('설정일이 지난 쪽지 자동 삭제') ?>
|
||||||
|
<input type="text" name="cf_memo_del" value="<?php echo $config['cf_memo_del'] ?>" id="cf_memo_del" class="frm_input" size="2"> 일
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_visit_del">접속자로그 삭제</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('설정일이 지난 접속자 로그 자동 삭제') ?>
|
||||||
|
<input type="text" name="cf_visit_del" value="<?php echo $config['cf_visit_del'] ?>" id="cf_visit_del" class="frm_input" size="2"> 일
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_popular_del">인기검색어 삭제</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('설정일이 지난 인기검색어 자동 삭제') ?>
|
||||||
|
<input type="text" name="cf_popular_del" value="<?php echo $config['cf_popular_del'] ?>" id="cf_popular_del" class="frm_input" size="2"> 일
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_login_minutes">현재 접속자</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('설정값 이내의 접속자를 현재 접속자로 인정') ?>
|
||||||
|
<input type="text" name="cf_login_minutes" value="<?php echo $config['cf_login_minutes'] ?>" id="cf_login_minutes" class="frm_input" size="2"> 분
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_page_rows">한페이지당 라인수</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('목록(리스트) 한페이지당 라인수') ?>
|
||||||
|
<input type="text" name="cf_page_rows" value="<?php echo $config['cf_page_rows'] ?>" id="cf_page_rows" class="frm_input" size="2"> 라인
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_new_rows">최근게시물 라인수</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('목록 한페이지당 라인수') ?>
|
||||||
|
<input type="text" name="cf_new_rows" value="<?php echo $config['cf_new_rows'] ?>" id="cf_new_rows" class="frm_input" size="2"> 라인
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_write_pages">페이지 표시 수<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="cf_write_pages" value="<?php echo $config['cf_write_pages'] ?>" id="cf_write_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
|
||||||
|
<th scope="row"><label for="cf_mobile_pages">모바일 페이지 표시 수<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="cf_mobile_pages" value="<?php echo $config['cf_mobile_pages'] ?>" id="cf_mobile_pages" required class="required numeric frm_input" size="3"> 페이지씩 표시</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_new_skin">최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_new_skin" id="cf_new_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('new');
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_mobile_new_skin">모바일<br>최근게시물 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_mobile_new_skin" id="cf_mobile_new_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('new', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_new_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_search_skin">검색 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_search_skin" id="cf_search_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('search');
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_mobile_search_skin">모바일 검색 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_mobile_search_skin" id="cf_mobile_search_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('search', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_search_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_connect_skin">접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_connect_skin" id="cf_connect_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('connect');
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_mobile_connect_skin">모바일 접속자 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_mobile_connect_skin" id="cf_mobile_connect_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('connect', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_mobile_connect_skin'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_editor">에디터 선택</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help(G5_EDITOR_URL.' 밑의 DHTML 에디터 폴더를 선택합니다.') ?>
|
||||||
|
<select name="cf_editor" id="cf_editor">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('', G5_EDITOR_PATH);
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">사용안함</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_editor'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_gcaptcha_mp3">음성캡챠 선택<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help(G5_GCAPTCHA_URL.'/mp3 밑의 음성 폴더를 선택합니다.') ?>
|
||||||
|
<select name="cf_gcaptcha_mp3" id="cf_gcaptcha_mp3" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('mp3', G5_GCAPTCHA_PATH);
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_gcaptcha_mp3'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_use_copy_log">복사, 이동시 로그</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('게시물 아래에 누구로 부터 복사, 이동됨 표시') ?>
|
||||||
|
<input type="checkbox" name="cf_use_copy_log" value="1" id="cf_use_copy_log" <?php echo $config['cf_use_copy_log']?'checked':''; ?>> 남김
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_point_term">포인트 유효기간</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('기간을 0으로 설정시 포인트 유효기간이 적용되지 않습니다.') ?>
|
||||||
|
<input type="text" name="cf_point_term" value="<?php echo $config['cf_point_term']; ?>" id="cf_point_term" required class="required frm_input" size="5"> 일
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_possible_ip">접근가능 IP</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('입력된 IP의 컴퓨터만 접근할 수 있습니다.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||||
|
<textarea name="cf_possible_ip" id="cf_possible_ip"><?php echo $config['cf_possible_ip'] ?> </textarea>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_intercept_ip">접근차단 IP</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('입력된 IP의 컴퓨터는 접근할 수 없음.<br>123.123.+ 도 입력 가능. (엔터로 구분)') ?>
|
||||||
|
<textarea name="cf_intercept_ip" id="cf_intercept_ip"><?php echo $config['cf_intercept_ip'] ?> </textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_analytics">방문자분석 스크립트</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('방문자분석 스크립트 코드를 입력합니다. 예) 구글 애널리스틱'); ?>
|
||||||
|
<textarea name="cf_analytics" id="cf_analytics"><?php echo $config['cf_analytics']; ?> </textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_board" class="cbox">
|
||||||
|
<h2>게시판 기본 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
<p>각 게시판 관리에서 개별적으로 설정 가능합니다.</p>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_delay_sec">글쓰기 간격<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="cf_delay_sec" value="<?php echo $config['cf_delay_sec'] ?>" id="cf_delay_sec" required class="required numeric frm_input" size="3"> 초 지난후 가능</td>
|
||||||
|
<th scope="row"><label for="cf_link_target">새창 링크</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('글내용중 자동 링크되는 타켓을 지정합니다.') ?>
|
||||||
|
<select id="cf_link_target" name="cf_link_target">
|
||||||
|
<option value="_blank"<?php echo get_selected($config['cf_link_target'], '_blank') ?>>_blank</option>
|
||||||
|
<option value="_self"<?php echo get_selected($config['cf_link_target'], '_self') ?>>_self</option>
|
||||||
|
<option value="_top"<?php echo get_selected($config['cf_link_target'], '_top') ?>>_top</option>
|
||||||
|
<option value="_new"<?php echo get_selected($config['cf_link_target'], '_new') ?>>_new</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_read_point">글읽기 포인트<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="cf_read_point" value="<?php echo $config['cf_read_point'] ?>" id="cf_read_point" required class="required frm_input" size="3"> 점</td>
|
||||||
|
<th scope="row"><label for="cf_write_point">글쓰기 포인트</label></th>
|
||||||
|
<td><input type="text" name="cf_write_point" value="<?php echo $config['cf_write_point'] ?>" id="cf_write_point" required class="required frm_input" size="3"> 점</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_comment_point">댓글쓰기 포인트</label></th>
|
||||||
|
<td><input type="text" name="cf_comment_point" value="<?php echo $config['cf_comment_point'] ?>" id="cf_comment_point" required class="required frm_input" size="3"> 점</td>
|
||||||
|
<th scope="row"><label for="cf_download_point">다운로드 포인트</label></th>
|
||||||
|
<td><input type="text" name="cf_download_point" value="<?php echo $config['cf_download_point'] ?>" id="cf_download_point" required class="required frm_input" size="3"> 점</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_search_part">검색 단위</label></th>
|
||||||
|
<td colspan="3"><input type="text" name="cf_search_part" value="<?php echo $config['cf_search_part'] ?>" id="cf_search_part" class="frm_input" size="4"> 건 단위로 검색</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_image_extension">이미지 업로드 확장자</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('게시판 글작성시 이미지 파일 업로드 가능 확장자. | 로 구분') ?>
|
||||||
|
<input type="text" name="cf_image_extension" value="<?php echo $config['cf_image_extension'] ?>" id="cf_image_extension" class="frm_input" size="70">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_flash_extension">플래쉬 업로드 확장자</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('게시판 글작성시 플래쉬 파일 업로드 가능 확장자. | 로 구분') ?>
|
||||||
|
<input type="text" name="cf_flash_extension" value="<?php echo $config['cf_flash_extension'] ?>" id="cf_flash_extension" class="frm_input" size="70">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_movie_extension">동영상 업로드 확장자</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('게시판 글작성시 동영상 파일 업로드 가능 확장자. | 로 구분') ?>
|
||||||
|
<input type="text" name="cf_movie_extension" value="<?php echo $config['cf_movie_extension'] ?>" id="cf_movie_extension" class="frm_input" size="70">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_filter">단어 필터링</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('입력된 단어가 포함된 내용은 게시할 수 없습니다. 단어와 단어 사이는 ,로 구분합니다.') ?>
|
||||||
|
<textarea name="cf_filter" id="cf_filter" rows="7"><?php echo $config['cf_filter'] ?> </textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_join" class="cbox">
|
||||||
|
<h2>회원가입 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
<p>회원가입 시 사용할 스킨과 입력 받을 정보 등을 설정할 수 있습니다.</p>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_member_skin">회원 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_member_skin" id="cf_member_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('member');
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_mobile_member_skin">모바일<br>회원 스킨<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_mobile_member_skin" id="cf_mobile_member_skin" required class="required">
|
||||||
|
<?php
|
||||||
|
$arr = get_skin_dir('member', G5_MOBILE_PATH.'/'.G5_SKIN_DIR);
|
||||||
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
|
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||||
|
echo '<option value="'.$arr[$i].'"'.get_selected($config['cf_mobile_member_skin'], $arr[$i]).'>'.$arr[$i].'</option>'."\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">홈페이지 입력</th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cf_use_homepage" value="1" id="cf_use_homepage" <?php echo $config['cf_use_homepage']?'checked':''; ?>> <label for="cf_use_homepage">보이기</label>
|
||||||
|
<input type="checkbox" name="cf_req_homepage" value="1" id="cf_req_homepage" <?php echo $config['cf_req_homepage']?'checked':''; ?>> <label for="cf_req_homepage">필수입력</label>
|
||||||
|
</td>
|
||||||
|
<th scope="row">주소 입력</th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cf_use_addr" value="1" id="cf_use_addr" <?php echo $config['cf_use_addr']?'checked':''; ?>> <label for="cf_use_addr">보이기</label>
|
||||||
|
<input type="checkbox" name="cf_req_addr" value="1" id="cf_req_addr" <?php echo $config['cf_req_addr']?'checked':''; ?>> <label for="cf_req_addr">필수입력</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">전화번호 입력</th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cf_use_tel" value="1" id="cf_use_tel" <?php echo $config['cf_use_tel']?'checked':''; ?>> <label for="cf_use_tel">보이기</label>
|
||||||
|
<input type="checkbox" name="cf_req_tel" value="1" id="cf_req_tel" <?php echo $config['cf_req_tel']?'checked':''; ?>> <label for="cf_req_tel">필수입력</label>
|
||||||
|
</td>
|
||||||
|
<th scope="row">휴대폰번호 입력</th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cf_use_hp" value="1" id="cf_use_hp" <?php echo $config['cf_use_hp']?'checked':''; ?>> <label for="cf_use_hp">보이기</label>
|
||||||
|
<input type="checkbox" name="cf_req_hp" value="1" id="cf_req_hp" <?php echo $config['cf_req_hp']?'checked':''; ?>> <label for="cf_req_hp">필수입력</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">서명 입력</th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cf_use_signature" value="1" id="cf_use_signature" <?php echo $config['cf_use_signature']?'checked':''; ?>> <label for="cf_use_signature">보이기</label>
|
||||||
|
<input type="checkbox" name="cf_req_signature" value="1" id="cf_req_signature" <?php echo $config['cf_req_signature']?'checked':''; ?>> <label for="cf_req_signature">필수입력</label>
|
||||||
|
</td>
|
||||||
|
<th scope="row">자기소개 입력</th>
|
||||||
|
<td>
|
||||||
|
<input type="checkbox" name="cf_use_profile" value="1" id="cf_use_profile" <?php echo $config['cf_use_profile']?'checked':''; ?>> <label for="cf_use_profile">보이기</label>
|
||||||
|
<input type="checkbox" name="cf_req_profile" value="1" id="cf_req_profile" <?php echo $config['cf_req_profile']?'checked':''; ?>> <label for="cf_req_profile">필수입력</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_register_level">회원가입시 권한</label></th>
|
||||||
|
<td><?php echo get_member_level_select('cf_register_level', 1, 9, $config['cf_register_level']) ?></td>
|
||||||
|
<th scope="row"><label for="cf_register_point">회원가입시 포인트</label></th>
|
||||||
|
<td><input type="text" name="cf_register_point" value="<?php echo $config['cf_register_point'] ?>" id="cf_register_point" class="frm_input" size="5"> 점</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" id="th310"><label for='cf_leave_day'>회원탈퇴후 삭제일</label></th>
|
||||||
|
<td colspan="3"><input type="text" name="cf_leave_day" value="<?php echo $config['cf_leave_day'] ?>" id="cf_leave_day" class="frm_input" size="2"> 일 후 자동 삭제</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_use_member_icon">회원아이콘 사용</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('게시물에 게시자 별명 대신 아이콘 사용') ?>
|
||||||
|
<select id="cf_use_member_icon" name="cf_use_member_icon">
|
||||||
|
<option value="0"<?php echo get_selected($config['cf_use_member_icon'], '0') ?>>미사용
|
||||||
|
<option value="1"<?php echo get_selected($config['cf_use_member_icon'], '1') ?>>아이콘만 표시
|
||||||
|
<option value="2"<?php echo get_selected($config['cf_use_member_icon'], '2') ?>>아이콘+이름 표시
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_icon_level">아이콘 업로드 권한</label></th>
|
||||||
|
<td><?php echo get_member_level_select('cf_icon_level', 1, 9, $config['cf_icon_level']) ?> 이상</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_member_icon_size">회원아이콘 용량</label></th>
|
||||||
|
<td><input type="text" name="cf_member_icon_size" value="<?php echo $config['cf_member_icon_size'] ?>" id="cf_member_icon_size" class="frm_input" size="10"> 바이트 이하</td>
|
||||||
|
<th scope="row">회원아이콘 사이즈</th>
|
||||||
|
<td>
|
||||||
|
<label for="cf_member_icon_width">가로</label>
|
||||||
|
<input type="text" name="cf_member_icon_width" value="<?php echo $config['cf_member_icon_width'] ?>" id="cf_member_icon_width" class="frm_input" size="2">
|
||||||
|
<label for="cf_member_icon_height">세로</label>
|
||||||
|
<input type="text" name="cf_member_icon_height" value="<?php echo $config['cf_member_icon_height'] ?>" id="cf_member_icon_height" class="frm_input" size="2">
|
||||||
|
픽셀 이하
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_use_recommend">추천인제도 사용</label></th>
|
||||||
|
<td><input type="checkbox" name="cf_use_recommend" value="1" id="cf_use_recommend" <?php echo $config['cf_use_recommend']?'checked':''; ?>> 사용</td>
|
||||||
|
<th scope="row"><label for="cf_recommend_point">추천인 포인트</label></th>
|
||||||
|
<td><input type="text" name="cf_recommend_point" value="<?php echo $config['cf_recommend_point'] ?>" id="cf_recommend_point" class="frm_input"> 점</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_prohibit_id">아이디,별명 금지단어</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('회원아이디, 별명으로 사용할 수 없는 단어를 정합니다. 쉼표 (,) 로 구분') ?>
|
||||||
|
<textarea name="cf_prohibit_id" id="cf_prohibit_id" rows="5"><?php echo $config['cf_prohibit_id'] ?></textarea>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_prohibit_email">입력 금지 메일</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('입력 받지 않을 도메인을 지정합니다. 엔터로 구분 ex) hotmail.com') ?>
|
||||||
|
<textarea name="cf_prohibit_email" id="cf_prohibit_email" rows="5"><?php echo $config['cf_prohibit_email'] ?></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_stipulation">회원가입약관</label></th>
|
||||||
|
<td colspan="3"><textarea name="cf_stipulation" id="cf_stipulation" rows="10"><?php echo $config['cf_stipulation'] ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_privacy">개인정보취급방침</label></th>
|
||||||
|
<td colspan="3"><textarea id="cf_privacy" name="cf_privacy" rows="10"><?php echo $config['cf_privacy'] ?> </textarea></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_cert" class="cbox">
|
||||||
|
<h2>본인확인</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
<p>
|
||||||
|
회원가입 시 본인확인 수단을 설정합니다.<br>
|
||||||
|
실명과 휴대폰 번호 그리고 본인확인 당시에 성인인지의 여부를 저장합니다.<br>
|
||||||
|
게시판의 경우 본인확인 또는 성인여부를 따져 게시물 조회 및 쓰기 권한을 줄 수 있습니다.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_cert_use">본인확인</label></th>
|
||||||
|
<td>
|
||||||
|
<select name="cf_cert_use" id="cf_cert_use">
|
||||||
|
<?php echo option_selected("0", $config['cf_cert_use'], "사용안함"); ?>
|
||||||
|
<?php echo option_selected("1", $config['cf_cert_use'], "테스트"); ?>
|
||||||
|
<?php echo option_selected("2", $config['cf_cert_use'], "실서비스"); ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="cf_cert_service"><label for="cf_cert_ipin">아이핀 본인확인</label></th>
|
||||||
|
<td class="cf_cert_service">
|
||||||
|
<select name="cf_cert_ipin" id="cf_cert_ipin">
|
||||||
|
<?php echo option_selected("", $config['cf_cert_ipin'], "사용안함"); ?>
|
||||||
|
<?php echo option_selected("kcb", $config['cf_cert_ipin'], "코리아크레딧뷰로(KCB) 아이핀"); ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="cf_cert_service"><label for="cf_cert_hp">휴대폰 본인확인</label></th>
|
||||||
|
<td class="cf_cert_service">
|
||||||
|
<select name="cf_cert_hp" id="cf_cert_hp">
|
||||||
|
<?php echo option_selected("", $config['cf_cert_hp'], "사용안함"); ?>
|
||||||
|
<?php echo option_selected("kcb", $config['cf_cert_hp'], "코리아크레딧뷰로(KCB) 휴대폰 본인확인"); ?>
|
||||||
|
<?php echo option_selected("kcp", $config['cf_cert_hp'], "한국사이버결제(KCP) 휴대폰 본인확인"); ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcb_cd">코리아크레딧뷰로<br>KCB 회원사ID</label></th>
|
||||||
|
<td class="cf_cert_service">
|
||||||
|
<?php echo help('KCB 회원사ID를 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, KCB와 계약체결 후 회원사ID를 발급 받으실 수 있습니다.<br>이용하시려는 서비스에 대한 계약을 아이핀, 휴대폰 본인확인 각각 체결해주셔야 합니다.<br>아이핀 본인확인 테스트의 경우에는 KCB 회원사ID가 필요 없으나,<br>휴대폰 본인확인 테스트의 경우 KCB 에서 따로 발급 받으셔야 합니다.') ?>
|
||||||
|
<input type="text" name="cf_cert_kcb_cd" value="<?php echo $config['cf_cert_kcb_cd'] ?>" id="cf_cert_kcb_cd" class="frm_input" size="20"> <a href="http://sir.co.kr/main/provider/b_ipin.php" target="_blank" class="btn_frmline">KCB 아이핀 서비스 신청페이지</a>
|
||||||
|
<a href="http://sir.co.kr/main/provider/b_cert.php" target="_blank" class="btn_frmline">KCB 휴대폰 본인확인 서비스 신청페이지</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="cf_cert_service"><label for="cf_cert_kcp_cd">한국사이버결제<br>KCP 사이트코드</label></th>
|
||||||
|
<td class="cf_cert_service">
|
||||||
|
<?php echo help('SM으로 시작하는 5자리 사이트 코드중 뒤의 3자리만 입력해 주십시오.<br>서비스에 가입되어 있지 않다면, 본인확인 서비스 신청페이지에서 서비스 신청 후 사이트코드를 발급 받으실 수 있습니다.') ?>
|
||||||
|
<span class="sitecode">SM</span>
|
||||||
|
<input type="text" name="cf_cert_kcp_cd" value="<?php echo $config['cf_cert_kcp_cd'] ?>" id="cf_cert_kcp_cd" class="frm_input" size="3"> <a href="http://sir.co.kr/main/provider/p_cert.php" target="_blank" class="btn_frmline">KCP 휴대폰 본인확인 서비스 신청페이지</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="cf_cert_service"><label for="cf_cert_limit">본인확인 이용제한</label></th>
|
||||||
|
<td class="cf_cert_service">
|
||||||
|
<?php echo help('하루동안 아이핀과 휴대폰 본인확인 인증 이용회수를 제한할 수 있습니다.<br>회수제한은 실서비스에서 아이핀과 휴대폰 본인확인 인증에 개별 적용됩니다.<br>0 으로 설정하시면 회수제한이 적용되지 않습니다.'); ?>
|
||||||
|
<input type="text" name="cf_cert_limit" value="<?php echo $config['cf_cert_limit']; ?>" id="cf_cert_limit" class="frm_input" size="3"> 회
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_mail" class="cbox">
|
||||||
|
<h2>기본 메일환경 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_use">메일발송 사용</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('체크하지 않으면 메일발송을 아예 사용하지 않습니다. 메일 테스트도 불가합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_use" value="1" id="cf_email_use" <?php echo $config['cf_email_use']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_use_email_certify">메일인증 사용</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('메일에 배달된 인증 주소를 클릭하여야 회원으로 인정합니다.'); ?>
|
||||||
|
<input type="checkbox" name="cf_use_email_certify" value="1" id="cf_use_email_certify" <?php echo $config['cf_use_email_certify']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_formmail_is_member">폼메일 사용 여부</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('체크하지 않으면 비회원도 사용 할 수 있습니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_formmail_is_member" value="1" id="cf_formmail_is_member" <?php echo $config['cf_formmail_is_member']?'checked':''; ?>> 회원만 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_article_mail" class="cbox">
|
||||||
|
<h2>게시판 글 작성 시 메일 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_wr_super_admin">최고관리자</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_wr_super_admin" value="1" id="cf_email_wr_super_admin" <?php echo $config['cf_email_wr_super_admin']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_wr_group_admin">그룹관리자</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('그룹관리자에게 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_wr_group_admin" value="1" id="cf_email_wr_group_admin" <?php echo $config['cf_email_wr_group_admin']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_wr_board_admin">게시판관리자</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('게시판관리자에게 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_wr_board_admin" value="1" id="cf_email_wr_board_admin" <?php echo $config['cf_email_wr_board_admin']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_wr_write">원글작성자</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('게시자님께 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_wr_write" value="1" id="cf_email_wr_write" <?php echo $config['cf_email_wr_write']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_wr_comment_all">댓글작성자</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('원글에 댓글이 올라오는 경우 댓글 쓴 모든 분들께 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_wr_comment_all" value="1" id="cf_email_wr_comment_all" <?php echo $config['cf_email_wr_comment_all']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_join_mail" class="cbox">
|
||||||
|
<h2>회원가입 시 메일 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_mb_super_admin">최고관리자 메일발송</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_mb_super_admin" value="1" id="cf_email_mb_super_admin" <?php echo $config['cf_email_mb_super_admin']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_mb_member">회원님께 메일발송</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('회원가입한 회원님께 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_mb_member" value="1" id="cf_email_mb_member" <?php echo $config['cf_email_mb_member']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section id="anc_cf_vote_mail" class="cbox">
|
||||||
|
<h2>투표 기타의견 작성시 메일 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_email_po_super_admin">최고관리자 메일발송</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('최고관리자에게 메일을 발송합니다.') ?>
|
||||||
|
<input type="checkbox" name="cf_email_po_super_admin" value="1" id="cf_email_po_super_admin" <?php echo $config['cf_email_po_super_admin']?'checked':''; ?>> 사용
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section id="anc_cf_sns" class="cbox">
|
||||||
|
<h2>소셜네트워크서비스(SNS : Social Network Service)</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_facebook_appid">페이스북 앱 ID</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="cf_facebook_appid" value="<?php echo $config['cf_facebook_appid'] ?>" id="cf_facebook_appid" class="frm_input"> <a href="https://developers.facebook.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_facebook_secret">페이스북 앱 Secret</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="cf_facebook_secret" value="<?php echo $config['cf_facebook_secret'] ?>" id="cf_facebook_secret" class="frm_input" size="35">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input"> <a href="https://dev.twitter.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="cf_twitter_secret" value="<?php echo $config['cf_twitter_secret'] ?>" id="cf_twitter_secret" class="frm_input" size="35">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_me2day_key">미투데이 Key</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<input type="text" name="cf_me2day_key" value="<?php echo $config['cf_me2day_key'] ?>" id="cf_me2day_key" class="frm_input"> <a href="http://me2day.net/me2/app/get_appkey" target="_blank" class="btn_frmline">앱 등록하기</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_googl_shorturl_apikey">구글 짧은주소 API Key</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="cf_googl_shorturl_apikey" value="<?php echo $config['cf_googl_shorturl_apikey'] ?>" id="cf_googl_shorturl_apikey" class="frm_input"> <a href="http://code.google.com/apis/console/" target="_blank" class="btn_frmline">API Key 등록하기</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_lay" class="cbox">
|
||||||
|
<h2>레이아웃 추가설정</h2>
|
||||||
|
<?php echo $pg_anchor; ?>
|
||||||
|
<p>기본 설정된 파일 경로 및 script, css 를 추가하거나 변경할 수 있습니다.</p>
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_include_index">초기화면 파일 경로</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('입력이 없으면 index.php가 초기화면 파일의 기본 경로로 설정됩니다.') ?>
|
||||||
|
<input type="text" name="cf_include_index" value="<?php echo $config['cf_include_index'] ?>" id="cf_include_index" class="frm_input" size="50">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_include_head">상단 파일 경로</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('입력이 없으면 head.php가 상단 파일의 기본 경로로 설정됩니다.') ?>
|
||||||
|
<input type="text" name="cf_include_head" value="<?php echo $config['cf_include_head'] ?>" id="cf_include_head" class="frm_input" size="50">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_include_tail">하단 파일 경로</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('입력이 없으면 tail.php가 상단 파일의 기본 경로로 설정됩니다.') ?>
|
||||||
|
<input type="text" name="cf_include_tail" value="<?php echo $config['cf_include_tail'] ?>" id="cf_include_tail" class="frm_input" size="50">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="cf_add_script">추가 script, css</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('HTML의 </HEAD> 태그위로 추가될 JavaScript와 css 코드를 설정합니다.<br>관리자 페이지에서는 이 코드를 사용하지 않습니다.') ?>
|
||||||
|
<textarea name="cf_add_script" id="cf_add_script"><?php echo get_text($config['cf_add_script']); ?></textarea>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="anc_cf_extra" class="cbox">
|
||||||
|
<h2>여분필드 기본 설정</h2>
|
||||||
|
<?php echo $pg_anchor ?>
|
||||||
|
<p>각 게시판 관리에서 개별적으로 설정 가능합니다.</p>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">여분필드<?php echo $i ?></th>
|
||||||
|
<td>
|
||||||
|
<label for="cf_<?php echo $i ?>_subj">여분필드<?php echo $i ?> 제목</label>
|
||||||
|
<input type="text" name="cf_<?php echo $i ?>_subj" value="<?php echo get_text($config['cf_'.$i.'_subj']) ?>" id="cf_<?php echo $i ?>_subj" class="frm_input" size="30">
|
||||||
|
<label for="cf_<?php echo $i ?>">여분필드<?php echo $i ?> 값</label>
|
||||||
|
<input type="text" name="cf_<?php echo $i ?>" value="<?php echo $config['cf_'.$i] ?>" id="cf_<?php echo $i ?>" class="frm_input" size="30">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<p>
|
||||||
|
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||||
|
</p>
|
||||||
|
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
<?php
|
||||||
|
if(!$config['cf_cert_use'])
|
||||||
|
echo '$(".cf_cert_service").addClass("cf_cert_hide");';
|
||||||
|
?>
|
||||||
|
$("#cf_cert_use").change(function(){
|
||||||
|
var cf_cert_sel = $("#cf_cert_use option:selected").val();
|
||||||
|
switch(cf_cert_sel) {
|
||||||
|
case "0":
|
||||||
|
$(".cf_cert_service").addClass("cf_cert_hide");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$(".cf_cert_service").removeClass("cf_cert_hide");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
function fconfigform_submit(f)
|
||||||
|
{
|
||||||
|
f.action = "./config_form_update.php";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
149
adm/config_form_update.php
Normal file
149
adm/config_form_update.php
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.');
|
||||||
|
|
||||||
|
$mb = get_member($cf_admin);
|
||||||
|
if (!$mb['mb_id'])
|
||||||
|
alert('최고관리자 회원아이디가 존재하지 않습니다.');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
// 본인확인을 사용할 경우 아이핀, 휴대폰인증 중 하나는 선택되어야 함
|
||||||
|
if($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'])
|
||||||
|
alert('본인확인을 위해 아이핀 또는 휴대폰 본인학인 서비스를 하나이상 선택해 주십시오');
|
||||||
|
|
||||||
|
$sql = " update {$g5['config_table']}
|
||||||
|
set cf_title = '{$_POST['cf_title']}',
|
||||||
|
cf_admin = '{$_POST['cf_admin']}',
|
||||||
|
cf_admin_email = '{$_POST['cf_admin_email']}',
|
||||||
|
cf_include_index = '{$_POST['cf_include_index']}',
|
||||||
|
cf_include_head = '{$_POST['cf_include_head']}',
|
||||||
|
cf_include_tail = '{$_POST['cf_include_tail']}',
|
||||||
|
cf_add_script = '{$_POST['cf_add_script']}',
|
||||||
|
cf_use_point = '{$_POST['cf_use_point']}',
|
||||||
|
cf_point_term = '{$_POST['cf_point_term']}',
|
||||||
|
cf_use_norobot = '{$_POST['cf_use_norobot']}',
|
||||||
|
cf_use_copy_log = '{$_POST['cf_use_copy_log']}',
|
||||||
|
cf_use_email_certify = '{$_POST['cf_use_email_certify']}',
|
||||||
|
cf_login_point = '{$_POST['cf_login_point']}',
|
||||||
|
cf_cut_name = '{$_POST['cf_cut_name']}',
|
||||||
|
cf_nick_modify = '{$_POST['cf_nick_modify']}',
|
||||||
|
cf_new_skin = '{$_POST['cf_new_skin']}',
|
||||||
|
cf_new_rows = '{$_POST['cf_new_rows']}',
|
||||||
|
cf_search_skin = '{$_POST['cf_search_skin']}',
|
||||||
|
cf_connect_skin = '{$_POST['cf_connect_skin']}',
|
||||||
|
cf_read_point = '{$_POST['cf_read_point']}',
|
||||||
|
cf_write_point = '{$_POST['cf_write_point']}',
|
||||||
|
cf_comment_point = '{$_POST['cf_comment_point']}',
|
||||||
|
cf_download_point = '{$_POST['cf_download_point']}',
|
||||||
|
cf_search_bgcolor = '{$_POST['cf_search_bgcolor']}',
|
||||||
|
cf_search_color = '{$_POST['cf_search_color']}',
|
||||||
|
cf_write_pages = '{$_POST['cf_write_pages']}',
|
||||||
|
cf_mobile_pages = '{$_POST['cf_mobile_pages']}',
|
||||||
|
cf_link_target = '{$_POST['cf_link_target']}',
|
||||||
|
cf_delay_sec = '{$_POST['cf_delay_sec']}',
|
||||||
|
cf_filter = '{$_POST['cf_filter']}',
|
||||||
|
cf_possible_ip = '".trim($_POST['cf_possible_ip'])."',
|
||||||
|
cf_intercept_ip = '".trim($_POST['cf_intercept_ip'])."',
|
||||||
|
cf_analytics = '{$_POST['cf_analytics']}',
|
||||||
|
cf_member_skin = '{$_POST['cf_member_skin']}',
|
||||||
|
cf_use_homepage = '{$_POST['cf_use_homepage']}',
|
||||||
|
cf_req_homepage = '{$_POST['cf_req_homepage']}',
|
||||||
|
cf_use_tel = '{$_POST['cf_use_tel']}',
|
||||||
|
cf_req_tel = '{$_POST['cf_req_tel']}',
|
||||||
|
cf_use_hp = '{$_POST['cf_use_hp']}',
|
||||||
|
cf_req_hp = '{$_POST['cf_req_hp']}',
|
||||||
|
cf_use_addr = '{$_POST['cf_use_addr']}',
|
||||||
|
cf_req_addr = '{$_POST['cf_req_addr']}',
|
||||||
|
cf_use_signature = '{$_POST['cf_use_signature']}',
|
||||||
|
cf_req_signature = '{$_POST['cf_req_signature']}',
|
||||||
|
cf_use_profile = '{$_POST['cf_use_profile']}',
|
||||||
|
cf_req_profile = '{$_POST['cf_req_profile']}',
|
||||||
|
cf_register_level = '{$_POST['cf_register_level']}',
|
||||||
|
cf_register_point = '{$_POST['cf_register_point']}',
|
||||||
|
cf_icon_level = '{$_POST['cf_icon_level']}',
|
||||||
|
cf_use_recommend = '{$_POST['cf_use_recommend']}',
|
||||||
|
cf_recommend_point = '{$_POST['cf_recommend_point']}',
|
||||||
|
cf_leave_day = '{$_POST['cf_leave_day']}',
|
||||||
|
cf_search_part = '{$_POST['cf_search_part']}',
|
||||||
|
cf_email_use = '{$_POST['cf_email_use']}',
|
||||||
|
cf_email_wr_super_admin = '{$_POST['cf_email_wr_super_admin']}',
|
||||||
|
cf_email_wr_group_admin = '{$_POST['cf_email_wr_group_admin']}',
|
||||||
|
cf_email_wr_board_admin = '{$_POST['cf_email_wr_board_admin']}',
|
||||||
|
cf_email_wr_write = '{$_POST['cf_email_wr_write']}',
|
||||||
|
cf_email_wr_comment_all = '{$_POST['cf_email_wr_comment_all']}',
|
||||||
|
cf_email_mb_super_admin = '{$_POST['cf_email_mb_super_admin']}',
|
||||||
|
cf_email_mb_member = '{$_POST['cf_email_mb_member']}',
|
||||||
|
cf_email_po_super_admin = '{$_POST['cf_email_po_super_admin']}',
|
||||||
|
cf_prohibit_id = '{$_POST['cf_prohibit_id']}',
|
||||||
|
cf_prohibit_email = '{$_POST['cf_prohibit_email']}',
|
||||||
|
cf_new_del = '{$_POST['cf_new_del']}',
|
||||||
|
cf_memo_del = '{$_POST['cf_memo_del']}',
|
||||||
|
cf_visit_del = '{$_POST['cf_visit_del']}',
|
||||||
|
cf_popular_del = '{$_POST['cf_popular_del']}',
|
||||||
|
cf_use_jumin = '{$_POST['cf_use_jumin']}',
|
||||||
|
cf_use_member_icon = '{$_POST['cf_use_member_icon']}',
|
||||||
|
cf_member_icon_size = '{$_POST['cf_member_icon_size']}',
|
||||||
|
cf_member_icon_width = '{$_POST['cf_member_icon_width']}',
|
||||||
|
cf_member_icon_height = '{$_POST['cf_member_icon_height']}',
|
||||||
|
cf_login_minutes = '{$_POST['cf_login_minutes']}',
|
||||||
|
cf_image_extension = '{$_POST['cf_image_extension']}',
|
||||||
|
cf_flash_extension = '{$_POST['cf_flash_extension']}',
|
||||||
|
cf_movie_extension = '{$_POST['cf_movie_extension']}',
|
||||||
|
cf_formmail_is_member = '{$_POST['cf_formmail_is_member']}',
|
||||||
|
cf_page_rows = '{$_POST['cf_page_rows']}',
|
||||||
|
cf_stipulation = '{$_POST['cf_stipulation']}',
|
||||||
|
cf_privacy = '{$_POST['cf_privacy']}',
|
||||||
|
cf_open_modify = '{$_POST['cf_open_modify']}',
|
||||||
|
cf_memo_send_point = '{$_POST['cf_memo_send_point']}',
|
||||||
|
cf_mobile_new_skin = '{$_POST['cf_mobile_new_skin']}',
|
||||||
|
cf_mobile_search_skin = '{$_POST['cf_mobile_search_skin']}',
|
||||||
|
cf_mobile_connect_skin = '{$_POST['cf_mobile_connect_skin']}',
|
||||||
|
cf_mobile_member_skin = '{$_POST['cf_mobile_member_skin']}',
|
||||||
|
cf_gcaptcha_mp3 = '{$_POST['cf_gcaptcha_mp3']}',
|
||||||
|
cf_editor = '{$_POST['cf_editor']}',
|
||||||
|
cf_cert_use = '{$_POST['cf_cert_use']}',
|
||||||
|
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
|
||||||
|
cf_cert_hp = '{$_POST['cf_cert_hp']}',
|
||||||
|
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
|
||||||
|
cf_cert_kcp_cd = '{$_POST['cf_cert_kcp_cd']}',
|
||||||
|
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||||
|
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
||||||
|
cf_facebook_appid = '{$_POST['cf_facebook_appid']}',
|
||||||
|
cf_facebook_secret = '{$_POST['cf_facebook_secret']}',
|
||||||
|
cf_twitter_key = '{$_POST['cf_twitter_key']}',
|
||||||
|
cf_twitter_secret = '{$_POST['cf_twitter_secret']}',
|
||||||
|
cf_me2day_key = '{$_POST['cf_me2day_key']}',
|
||||||
|
cf_1_subj = '{$_POST['cf_1_subj']}',
|
||||||
|
cf_2_subj = '{$_POST['cf_2_subj']}',
|
||||||
|
cf_3_subj = '{$_POST['cf_3_subj']}',
|
||||||
|
cf_4_subj = '{$_POST['cf_4_subj']}',
|
||||||
|
cf_5_subj = '{$_POST['cf_5_subj']}',
|
||||||
|
cf_6_subj = '{$_POST['cf_6_subj']}',
|
||||||
|
cf_7_subj = '{$_POST['cf_7_subj']}',
|
||||||
|
cf_8_subj = '{$_POST['cf_8_subj']}',
|
||||||
|
cf_9_subj = '{$_POST['cf_9_subj']}',
|
||||||
|
cf_10_subj = '{$_POST['cf_10_subj']}',
|
||||||
|
cf_1 = '{$_POST['cf_1']}',
|
||||||
|
cf_2 = '{$_POST['cf_2']}',
|
||||||
|
cf_3 = '{$_POST['cf_3']}',
|
||||||
|
cf_4 = '{$_POST['cf_4']}',
|
||||||
|
cf_5 = '{$_POST['cf_5']}',
|
||||||
|
cf_6 = '{$_POST['cf_6']}',
|
||||||
|
cf_7 = '{$_POST['cf_7']}',
|
||||||
|
cf_8 = '{$_POST['cf_8']}',
|
||||||
|
cf_9 = '{$_POST['cf_9']}',
|
||||||
|
cf_10 = '{$_POST['cf_10']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
//sql_query(" OPTIMIZE TABLE `$g5[config_table]` ");
|
||||||
|
|
||||||
|
goto_url('./config_form.php', false);
|
||||||
|
?>
|
||||||
52
adm/gcaptcha_file_delete.php
Normal file
52
adm/gcaptcha_file_delete.php
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '100910';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||||
|
|
||||||
|
$g5['title'] = '캡챠파일 일괄삭제';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="cache_del">
|
||||||
|
<p>
|
||||||
|
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||||
|
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$cnt=0;
|
||||||
|
echo '<ul>'.PHP_EOL;
|
||||||
|
|
||||||
|
$files = glob(G5_DATA_PATH.'/cache/gcaptcha-*');
|
||||||
|
if (is_array($files)) {
|
||||||
|
$before_time = G5_SERVER_TIME - 3600; // 한시간전
|
||||||
|
foreach ($files as $gcaptcha_file) {
|
||||||
|
$modification_time = filemtime($gcaptcha_file); // 파일접근시간
|
||||||
|
|
||||||
|
if ($modification_time > $before_time) continue;
|
||||||
|
|
||||||
|
$cnt++;
|
||||||
|
unlink($gcaptcha_file);
|
||||||
|
echo '<li>'.$gcaptcha_file.'</li>'.PHP_EOL;
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if ($cnt%10==0)
|
||||||
|
echo PHP_EOL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||||
|
echo '<p><span>캡챠파일 '.$cnt.'건의 삭제가 완료됐습니다.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>'.PHP_EOL;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
BIN
adm/img/hd_bg.jpg
Normal file
BIN
adm/img/hd_bg.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
BIN
adm/img/logo.jpg
Normal file
BIN
adm/img/logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.0 KiB |
300
adm/index.php
Normal file
300
adm/index.php
Normal file
@ -0,0 +1,300 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
$g5['title'] = '관리자메인';
|
||||||
|
include_once ('./admin.head.php');
|
||||||
|
|
||||||
|
$new_member_rows = 5;
|
||||||
|
$new_point_rows = 5;
|
||||||
|
$new_write_rows = 5;
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['member_table']} ";
|
||||||
|
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
|
||||||
|
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'];
|
||||||
|
|
||||||
|
// 탈퇴회원수
|
||||||
|
$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'];
|
||||||
|
|
||||||
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_member_rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$colspan = 12;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>신규가입회원 <?php echo $new_member_rows ?>건 목록</h2>
|
||||||
|
<p>총회원수 <?php echo number_format($total_count) ?>명 중 차단 <?php echo number_format($intercept_count) ?>명, 탈퇴 : <?php echo number_format($leave_count) ?>명</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">회원아이디</th>
|
||||||
|
<th scope="col">이름</th>
|
||||||
|
<th scope="col">별명</th>
|
||||||
|
<th scope="col">권한</th>
|
||||||
|
<th scope="col">포인트</th>
|
||||||
|
<th scope="col">수신</th>
|
||||||
|
<th scope="col">공개</th>
|
||||||
|
<th scope="col">인증</th>
|
||||||
|
<th scope="col">차단</th>
|
||||||
|
<th scope="col">그룹</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
// 접근가능한 그룹수
|
||||||
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
$group = "";
|
||||||
|
if ($row2['cnt'])
|
||||||
|
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||||
|
|
||||||
|
if ($is_admin == 'group')
|
||||||
|
{
|
||||||
|
$s_mod = '';
|
||||||
|
$s_del = '';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$s_mod = '<a href="./member_form.php?$qstr&w=u&mb_id='.$row['mb_id'].'">수정</a>';
|
||||||
|
$s_del = '<a href="javascript:del(\'./member_delete.php?'.$qstr.'&w=d&mb_id='.$row['mb_id'].'&url='.$_SERVER['PHP_SELF'].'\');">삭제</a>';
|
||||||
|
}
|
||||||
|
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">그룹</a>';
|
||||||
|
|
||||||
|
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date("Ymd", G5_SERVER_TIME);
|
||||||
|
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date("Ymd", G5_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;
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $mb_id ?></td>
|
||||||
|
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>
|
||||||
|
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
|
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
||||||
|
<td class="td_bignum"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||||
|
<td class="td_boolean"><?php echo $row['mb_mailling']?'예':'아니오'; ?></td>
|
||||||
|
<td class="td_boolean"><?php echo $row['mb_open']?'예':'아니오'; ?></td>
|
||||||
|
<td class="td_boolean"><?php echo preg_match('/[1-9]/', $row['mb_email_certify'])?'예':'아니오'; ?></td>
|
||||||
|
<td class="td_boolean"><?php echo $row['mb_intercept_date']?'예':'아니오'; ?></td>
|
||||||
|
<td class="td_category"><?php echo $group ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_ft">
|
||||||
|
<a href="./member_list.php">회원 전체보기</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql_common = " from {$g5['board_new_table']} a, {$g5['board_table']} b, {$g5['group_table']} c where a.bo_table = b.bo_table and b.gr_id = c.gr_id ";
|
||||||
|
|
||||||
|
if ($gr_id)
|
||||||
|
$sql_common .= " and b.gr_id = '$gr_id' ";
|
||||||
|
if ($view) {
|
||||||
|
if ($view == 'w')
|
||||||
|
$sql_common .= " and a.wr_id = a.wr_parent ";
|
||||||
|
else if ($view == 'c')
|
||||||
|
$sql_common .= " and a.wr_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;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>최근게시물</h2>
|
||||||
|
<p>사이트 전체게시물 중 최근게시물 <?php echo $new_write_rows ?>건 목록</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">그룹</th>
|
||||||
|
<th scope="col">게시판</th>
|
||||||
|
<th scope="col">제목</th>
|
||||||
|
<th scope="col">이름</th>
|
||||||
|
<th scope="col">일시</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$sql = " select a.*, b.bo_subject, c.gr_subject, c.gr_id {$sql_common} {$sql_order} limit {$new_write_rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
$tmp_write_table = $g5['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']}' ");
|
||||||
|
|
||||||
|
$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 == G5_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']}' ");
|
||||||
|
|
||||||
|
$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 == G5_TIME_YMD)
|
||||||
|
$datetime2 = substr($datetime2,11,5);
|
||||||
|
else
|
||||||
|
$datetime2 = substr($datetime2,5,5);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/new.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo cut_str($row['gr_subject'],10) ?></a></td>
|
||||||
|
<td class="td_category"><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>"><?php echo cut_str($row['bo_subject'],20) ?></a></td>
|
||||||
|
<td><a href="<?php echo G5_BBS_URL ?>/board.php?bo_table=<?php echo $row['bo_table'] ?>&wr_id=<?php echo $row2['wr_id'] ?><?php echo $comment_link ?>"><?php echo $comment ?><?php echo conv_subject($row2['wr_subject'], 100) ?></a></td>
|
||||||
|
<td class="td_mbname"><div><?php echo $name ?></div></td>
|
||||||
|
<td class="td_time"><?php echo $datetime ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_ft">
|
||||||
|
<a href="<?php echo G5_BBS_URL ?>/new.php">최근게시물 더보기</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$sql_common = " from {$g5['point_table']} ";
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
$sql_order = " order by po_id desc ";
|
||||||
|
|
||||||
|
$sql = " select count(*) as cnt {$sql_common} {$sql_search} {$sql_order} ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$total_count = $row['cnt'];
|
||||||
|
|
||||||
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$new_point_rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$colspan = 7;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>최근 포인트 발생내역</h2>
|
||||||
|
<p>전체 <?php echo number_format($total_count) ?> 건 중 <?php echo $new_point_rows ?>건 목록</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">회원아이디</th>
|
||||||
|
<th scope="col">이름</th>
|
||||||
|
<th scope="col">별명</th>
|
||||||
|
<th scope="col">일시</th>
|
||||||
|
<th scope="col">포인트 내용</th>
|
||||||
|
<th scope="col">포인트</th>
|
||||||
|
<th scope="col">포인트합</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$row2['mb_id'] = '';
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||||
|
{
|
||||||
|
if ($row2['mb_id'] != $row['mb_id'])
|
||||||
|
{
|
||||||
|
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||||
|
|
||||||
|
$link1 = $link2 = "";
|
||||||
|
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table'])
|
||||||
|
{
|
||||||
|
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||||
|
$link2 = '</a>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_mbid"><a href="./point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||||
|
<td class="td_mbname"><?php echo $row2['mb_name'] ?></td>
|
||||||
|
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
|
<td class="td_time"><?php echo $row['po_datetime'] ?></td>
|
||||||
|
<td><?php echo $link1.$row['po_content'].$link2 ?></td>
|
||||||
|
<td class="td_bignum"><?php echo number_format($row['po_point']) ?></td>
|
||||||
|
<td class="td_bignum"><?php echo number_format($row2['mb_point']) ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_ft">
|
||||||
|
<a href="./point_list.php">포인트내역 전체보기</a>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
24
adm/mail_delete.php
Normal file
24
adm/mail_delete.php
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '200300';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$count = count($_POST['chk']);
|
||||||
|
|
||||||
|
if(!$count)
|
||||||
|
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
||||||
|
|
||||||
|
for($i=0; $i<$count; $i++) {
|
||||||
|
$ma_id = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
$sql = " delete from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
goto_url('./mail_list.php');
|
||||||
|
?>
|
||||||
87
adm/mail_form.php
Normal file
87
adm/mail_form.php
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_EDITOR_LIB);
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
$html_title = '회원메일';
|
||||||
|
|
||||||
|
if ($w == 'u') {
|
||||||
|
$html_title .= '수정';
|
||||||
|
$readonly = ' readonly';
|
||||||
|
|
||||||
|
$sql = " select * from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||||
|
$ma = sql_fetch($sql);
|
||||||
|
if (!$ma['ma_id'])
|
||||||
|
alert('등록된 자료가 없습니다.');
|
||||||
|
} else {
|
||||||
|
$html_title .= '입력';
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = $html_title;
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="cbox">
|
||||||
|
<p>메일 내용에 {이름} , {별명} , {회원아이디} , {이메일} 처럼 내용에 삽입하면 해당 내용에 맞게 변환하여 메일을 발송합니다.</p>
|
||||||
|
|
||||||
|
<form name="fmailform" id="fmailform" action="./mail_update.php" onsubmit="return fmailform_check(this);" method="post">
|
||||||
|
<input type="hidden" name="w" value="<?php echo $w ?>" id="w">
|
||||||
|
<input type="hidden" name="ma_id" value="<?php echo $ma['ma_id'] ?>" id="ma_id">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_15">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="ma_subject">메일 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="ma_subject" value="<?php echo $ma['ma_subject'] ?>" id="ma_subject" required class="required frm_input" size="100"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="ma_content">메일 내용<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><?php echo editor_html("ma_content", $ma['ma_content']); ?></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<p>
|
||||||
|
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을 누르세요.
|
||||||
|
</p>
|
||||||
|
<input type="submit" class="btn_submit" accesskey="s" value="확인">
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fmailform_check(f)
|
||||||
|
{
|
||||||
|
errmsg = "";
|
||||||
|
errfld = "";
|
||||||
|
|
||||||
|
check_field(f.ma_subject, "제목을 입력하세요.");
|
||||||
|
//check_field(f.ma_content, "내용을 입력하세요.");
|
||||||
|
|
||||||
|
if (errmsg != "") {
|
||||||
|
alert(errmsg);
|
||||||
|
errfld.focus();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
<?php echo get_editor_js("ma_content"); ?>
|
||||||
|
<?php echo chk_editor_js("ma_content"); ?>
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.fmailform.ma_subject.focus();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
104
adm/mail_list.php
Normal file
104
adm/mail_list.php
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '200300';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['mail_table']} ";
|
||||||
|
|
||||||
|
// 테이블의 전체 레코드수만 얻음
|
||||||
|
$sql = " select COUNT(*) as cnt {$sql_common} ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$total_count = $row['cnt'];
|
||||||
|
|
||||||
|
$page = 1;
|
||||||
|
|
||||||
|
$sql = " select * {$sql_common} order by ma_id desc ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$g5['title'] = '회원메일발송';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 7;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>등록된 메일내용 목록</h2>
|
||||||
|
<p>
|
||||||
|
<strong>테스트</strong>는 등록된 최고관리자의 이메일로 테스트 메일을 발송합니다.<br>
|
||||||
|
현재 등록된 메일은 총 <?php echo $total_count ?>건입니다.<br>
|
||||||
|
<span class="str_caution">주의) 수신자가 동의하지 않은 대량 메일 발송에는 적합하지 않습니다. 수십건 단위로 발송해 주십시오.</span>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="btn_add">
|
||||||
|
<a href="./mail_form.php" id="mail_add">메일내용추가</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form name="fmaillist" id="fmaillist" action="./mail_delete.php" method="post">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 목록 전체선택" onclick="check_all(this.form)"></th>
|
||||||
|
<th scope="col">번호</th>
|
||||||
|
<th scope="col">제목</th>
|
||||||
|
<th scope="col">작성일시</th>
|
||||||
|
<th scope="col">테스트</th>
|
||||||
|
<th scope="col">보내기</th>
|
||||||
|
<th scope="col">미리보기</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||||
|
//$s_del = '<a href="javascript:post_delete(\'mail_update.php\', '.$row['ma_id'].');">삭제</a>';
|
||||||
|
$s_vie = '<a href="./mail_preview.php?ma_id='.$row['ma_id'].'" target="_blank">미리보기</a>';
|
||||||
|
|
||||||
|
$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk">
|
||||||
|
<input type="checkbox" id="chk_<?php echo $i ?>" name="chk[]" value="<?php echo $row['ma_id'] ?>" title="메일선택">
|
||||||
|
</td>
|
||||||
|
<td class="td_num"><?php echo $num ?></td>
|
||||||
|
<td><a href="./mail_form.php?w=u&ma_id=<?php echo $row['ma_id'] ?>"><?php echo $row['ma_subject'] ?></a></td>
|
||||||
|
<td class="td_time"><?php echo $row['ma_time'] ?></td>
|
||||||
|
<td class="td_test"><a href="./mail_test.php?ma_id=<?php echo $row['ma_id'] ?>">테스트</a></td>
|
||||||
|
<td class="td_send"><a href="./mail_select_form.php?ma_id=<?php echo $row['ma_id'] ?>">보내기</a></td>
|
||||||
|
<td class="td_mng"><?php echo $s_vie ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if (!$i)
|
||||||
|
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<button type="submit">선택삭제</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('#fmaillist').submit(function() {
|
||||||
|
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
34
adm/mail_preview.php
Normal file
34
adm/mail_preview.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$se = sql_fetch("select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ");
|
||||||
|
|
||||||
|
$subject = $se['ma_subject'];
|
||||||
|
$content = $se['ma_content'] . "<hr size=0><p><span style='font-size:9pt; font-family:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='".G5_BBS_URL."/email_stop.php?mb_id=***&mb_md5=***' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title><?php echo G5_VERSION ?> 메일발송 테스트</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1><?php echo $subject ?></h1>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<?php echo $se['ma_content'] ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>주의!</strong> 이 화면에 보여지는 디자인은 실제 내용이 발송되었을 때 디자인과 다를 수 있습니다.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
123
adm/mail_select_form.php
Normal file
123
adm/mail_select_form.php
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if (!$config['cf_email_use'])
|
||||||
|
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$sql = " select * from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||||
|
$ma = sql_fetch($sql);
|
||||||
|
if (!$ma['ma_id'])
|
||||||
|
alert('보내실 내용을 선택하여 주십시오.');
|
||||||
|
|
||||||
|
// 전체회원수
|
||||||
|
$sql = " select COUNT(*) as cnt from {$g5['member_table']} ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$tot_cnt = $row['cnt'];
|
||||||
|
|
||||||
|
// 탈퇴대기회원수
|
||||||
|
$sql = " select COUNT(*) as cnt from {$g5['member_table']} where mb_leave_date <> '' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$finish_cnt = $row['cnt'];
|
||||||
|
|
||||||
|
$last_option = explode('||', $ma['ma_last_option']);
|
||||||
|
for ($i=0; $i<count($last_option); $i++) {
|
||||||
|
$option = explode('=', $last_option[$i]);
|
||||||
|
// 동적변수
|
||||||
|
$var = $option[0];
|
||||||
|
$$var = $option[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($mb_id1)) $mb_id1 = 1;
|
||||||
|
if (!isset($mb_level_from)) $mb_level_from = 1;
|
||||||
|
if (!isset($mb_level_to)) $mb_level_to = 10;
|
||||||
|
if (!isset($mb_mailling)) $mb_mailling = 1;
|
||||||
|
|
||||||
|
$g5['title'] = '회원메일발송';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>메일발송대상 선택</h2>
|
||||||
|
<p>
|
||||||
|
전체회원 <?php echo number_format($tot_cnt) ?>명 , 탈퇴대기회원 <?php echo number_format($finish_cnt) ?>명, 정상회원 <?php echo number_format($tot_cnt - $finish_cnt) ?>명 중 메일 발송 대상 선택
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<form name="frmsendmailselectform" id="frmsendmailselectform" action="./mail_select_list.php" method="post" autocomplete="off">
|
||||||
|
<input type="hidden" name="ma_id" value='<?php echo $ma_id ?>'>
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">회원 ID</th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="mb_id1" value="1" id="mb_id1_all" <?php echo $mb_id1?"checked":""; ?>> <label for="mb_id1_all">전체</label>
|
||||||
|
<input type="radio" name="mb_id1" value="0" id="mb_id1_section" <?php echo !$mb_id1?"checked":""; ?>> <label for="mb_id1_section">구간</label>
|
||||||
|
<input type="text" name="mb_id1_from" value="<?php echo $mb_id1_from ?>" id="mb_id1_from" title="시작구간" class="frm_input"> 에서
|
||||||
|
<input type="text" name="mb_id1_to" value="<?php echo $mb_id1_to ?>" id="mb_id1_to" title="종료구간" class="frm_input"> 까지
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_email">E-mail</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("메일 주소에 단어 포함 (예 : @sir.co.kr)") ?>
|
||||||
|
<input type="text" name="mb_email" value="<?php echo $mb_email ?>" id="mb_email" class="frm_input" size="50">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_mailling">메일링</label></th>
|
||||||
|
<td>
|
||||||
|
<select name="mb_mailling" id="mb_mailling">
|
||||||
|
<option value="1">수신동의한 회원만
|
||||||
|
<option value="">전체
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_level_from">권한</label></th>
|
||||||
|
<td>
|
||||||
|
<select name="mb_level_from" id="mb_level_from" title="최소권한">
|
||||||
|
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||||
|
<option value="<?php echo $i ?>"><?php echo $i ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select> 에서
|
||||||
|
<select name="mb_level_to" id="mb_level_to" title="최대권한">
|
||||||
|
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||||
|
<option value="<?php echo $i ?>"<?php echo $i==10 ? " selected" : ""; ?>><?php echo $i ?></option>
|
||||||
|
<?php } ?>
|
||||||
|
</select> 까지
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="gr_id">게시판그룹회원</label></th>
|
||||||
|
<td>
|
||||||
|
<select id="gr_id" name="gr_id">
|
||||||
|
<option value=''>전체</option>
|
||||||
|
<?php
|
||||||
|
$sql = " select gr_id, gr_subject from {$g5['group_table']} order by gr_subject ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
echo '<option value="'.$row['gr_id'].'">'.$row['gr_subject'].'</option>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<p>
|
||||||
|
메일발송대상 선택을 완료하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||||
|
</p>
|
||||||
|
<input type="submit" value="확인" class="btn_submit">
|
||||||
|
<a href="./mail_list.php">목록 </a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
121
adm/mail_select_list.php
Normal file
121
adm/mail_select_list.php
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
$ma_last_option = "";
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['member_table']} ";
|
||||||
|
$sql_where = " where (1) ";
|
||||||
|
|
||||||
|
// 회원ID ..에서 ..까지
|
||||||
|
if ($mb_id1 != 1)
|
||||||
|
$sql_where .= " and mb_id between '{$mb_id1_from}' and '{$mb_id1_to}' ";
|
||||||
|
|
||||||
|
// E-mail에 특정 단어 포함
|
||||||
|
if ($mb_email != "")
|
||||||
|
$sql_where .= " and mb_email like '%{$mb_email}%' ";
|
||||||
|
|
||||||
|
// 메일링
|
||||||
|
if ($mb_mailling != "")
|
||||||
|
$sql_where .= " and mb_mailling = '{$mb_mailling}' ";
|
||||||
|
|
||||||
|
// 권한
|
||||||
|
$sql_where .= " and mb_level between '{$mb_level_from}' and '{$mb_level_to}' ";
|
||||||
|
|
||||||
|
// 게시판그룹회원
|
||||||
|
if ($gr_id) {
|
||||||
|
$group_member = "";
|
||||||
|
$comma = "";
|
||||||
|
$sql2 = " select mb_id from {$g5['group_member_table']} where gr_id = '{$gr_id}' order by mb_id ";
|
||||||
|
$result2 = sql_query($sql2);
|
||||||
|
for ($k=0; $row2=sql_fetch_array($result2); $k++) {
|
||||||
|
$group_member .= "{$comma}'{$row2['mb_id']}'";
|
||||||
|
$comma = ",";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$group_member)
|
||||||
|
alert('선택하신 게시판 그룹회원이 한명도 없습니다.');
|
||||||
|
|
||||||
|
$sql_where .= " and mb_id in ($group_member) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 탈퇴, 차단된 회원은 제외
|
||||||
|
$sql_where .= " and mb_leave_date = '' and mb_intercept_date = '' ";
|
||||||
|
|
||||||
|
$sql = " select COUNT(*) as cnt {$sql_common} {$sql_where} ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$cnt = $row['cnt'];
|
||||||
|
if ($cnt == 0)
|
||||||
|
alert('선택하신 내용으로는 해당되는 회원자료가 없습니다.');
|
||||||
|
|
||||||
|
// 마지막 옵션을 저장합니다.
|
||||||
|
$ma_last_option .= "mb_id1={$mb_id1}";
|
||||||
|
$ma_last_option .= "||mb_id1_from={$mb_id1_from}";
|
||||||
|
$ma_last_option .= "||mb_id1_to={$mb_id1_to}";
|
||||||
|
$ma_last_option .= "||mb_email={$mb_email}";
|
||||||
|
$ma_last_option .= "||mb_mailling={$mb_mailling}";
|
||||||
|
$ma_last_option .= "||mb_level_from={$mb_level_from}";
|
||||||
|
$ma_last_option .= "||mb_level_to={$mb_level_to}";
|
||||||
|
$ma_last_option .= "||gr_id={$gr_id}";
|
||||||
|
|
||||||
|
sql_query(" update {$g5['mail_table']} set ma_last_option = '{$ma_last_option}' where ma_id = '{$ma_id}' ");
|
||||||
|
|
||||||
|
$g5['title'] = "메일발송 대상 회원";
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="cbox">
|
||||||
|
<p>조건에 따라 선택된 메일발송 대상자 목록입니다.</p>
|
||||||
|
|
||||||
|
<form name="fmailselectlist" id="fmailselectlist" method="post" action="./mail_select_update.php">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
<input type="hidden" name="ma_id" value="<?php echo $ma_id ?>">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">번호</th>
|
||||||
|
<th scope="col">회원아이디</th>
|
||||||
|
<th scope="col">이름</th>
|
||||||
|
<th scope="col">별명</th>
|
||||||
|
<th scope="col">E-mail</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$sql = " select mb_id, mb_name, mb_nick, mb_email, mb_datetime $sql_common $sql_where order by mb_id ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
$i=0;
|
||||||
|
$ma_list = "";
|
||||||
|
$cr = "";
|
||||||
|
while ($row=sql_fetch_array($result)) {
|
||||||
|
$i++;
|
||||||
|
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . $row['mb_name'] . "||" . $row['mb_nick'] . "||" . $row['mb_datetime'];
|
||||||
|
$cr = "\n";
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="td_num"><?php echo $i ?></td>
|
||||||
|
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
|
||||||
|
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>
|
||||||
|
<td class="td_mbnick"><?php echo $row['mb_nick'] ?></td>
|
||||||
|
<td><?php echo $row['mb_email'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<textarea name="ma_list" style="display:none"><?=$ma_list?></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<input type="submit" value="메일보내기" class="btn_submit">
|
||||||
|
<a href="./mail_select_form.php?ma_id=<?php echo $ma_id ?>">뒤로</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
87
adm/mail_select_update.php
Normal file
87
adm/mail_select_update.php
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$html_title = '회원메일 발송';
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
|
$countgap = 10; // 몇건씩 보낼지 설정
|
||||||
|
$maxscreen = 500; // 몇건씩 화면에 보여줄건지?
|
||||||
|
$sleepsec = 200; // 천분의 몇초간 쉴지 설정
|
||||||
|
|
||||||
|
echo "<span style='font-size:9pt;'>";
|
||||||
|
echo "<p>메일 발송중 ...<p><font color=crimson><b>[끝]</b></font> 이라는 단어가 나오기 전에는 중간에 중지하지 마세요.<p>";
|
||||||
|
echo "</span>";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<span id="cont"></span>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
flush();
|
||||||
|
ob_flush();
|
||||||
|
|
||||||
|
$ma_id = trim($_POST['ma_id']);
|
||||||
|
$select_member_list = addslashes(trim($_POST['ma_list']));
|
||||||
|
|
||||||
|
//print_r2($_POST); EXIT;
|
||||||
|
$member_list = explode("\n", $select_member_list);
|
||||||
|
|
||||||
|
// 메일내용 가져오기
|
||||||
|
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '$ma_id' ";
|
||||||
|
$ma = sql_fetch($sql);
|
||||||
|
|
||||||
|
$subject = $ma['ma_subject'];
|
||||||
|
|
||||||
|
$cnt = 0;
|
||||||
|
for ($i=0; $i<count($member_list); $i++)
|
||||||
|
{
|
||||||
|
list($to_email, $mb_id, $name, $nick, $datetime) = explode("||", trim($member_list[$i]));
|
||||||
|
|
||||||
|
$sw = preg_match("/[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*@[0-9a-zA-Z_]+(\.[0-9a-zA-Z_]+)*/", $to_email);
|
||||||
|
// 올바른 메일 주소만
|
||||||
|
if ($sw == true)
|
||||||
|
{
|
||||||
|
$cnt++;
|
||||||
|
|
||||||
|
$mb_md5 = md5($mb_id.$to_email.$datetime);
|
||||||
|
|
||||||
|
$content = $ma['ma_content'];
|
||||||
|
$content = preg_replace("/{이름}/", $name, $content);
|
||||||
|
$content = preg_replace("/{별명}/", $nick, $content);
|
||||||
|
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||||
|
$content = preg_replace("/{이메일}/", $to_email, $content);
|
||||||
|
|
||||||
|
$content = $content . "<hr size=0><p><span style='font-size:9pt; font-familye:굴림'>▶ 더 이상 정보 수신을 원치 않으시면 [<a href='".G5_BBS_URL."/email_stop.php?mb_id={$mb_id}&mb_md5={$mb_md5}' target='_blank'>수신거부</a>] 해 주십시오.</span></p>";
|
||||||
|
|
||||||
|
mailer($config['cf_title'], $config['cf_admin_email'], $to_email, $subject, $content, 1);
|
||||||
|
|
||||||
|
echo "<script> document.all.cont.innerHTML += '$cnt. $to_email ($mb_id : $name)<br>'; </script>\n";
|
||||||
|
//echo "+";
|
||||||
|
flush();
|
||||||
|
ob_flush();
|
||||||
|
ob_end_flush();
|
||||||
|
usleep($sleepsec);
|
||||||
|
if ($cnt % $countgap == 0)
|
||||||
|
{
|
||||||
|
echo "<script> document.all.cont.innerHTML += '<br>'; document.body.scrollTop += 1000; </script>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 화면을 지운다... 부하를 줄임
|
||||||
|
if ($cnt % $maxscreen == 0)
|
||||||
|
echo "<script> document.all.cont.innerHTML = ''; document.body.scrollTop += 1000; </script>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<script> document.all.cont.innerHTML += "<br><br>총 <?php echo number_format($cnt) ?>건 발송<br><br><font color=crimson><b>[끝]</b></font>"; document.body.scrollTop += 1000; </script>
|
||||||
39
adm/mail_test.php
Normal file
39
adm/mail_test.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if (!$config['cf_email_use'])
|
||||||
|
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||||
|
|
||||||
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
$g5['title'] = '회원메일 테스트';
|
||||||
|
|
||||||
|
$name = $member['mb_name'];
|
||||||
|
$nick = $member['mb_nick'];
|
||||||
|
$mb_id = $member['mb_id'];
|
||||||
|
$email = $member['mb_email'];
|
||||||
|
|
||||||
|
$sql = "select ma_subject, ma_content from {$g5['mail_table']} where ma_id = '{$ma_id}' ";
|
||||||
|
$ma = sql_fetch($sql);
|
||||||
|
|
||||||
|
$subject = $ma['ma_subject'];
|
||||||
|
|
||||||
|
$content = $ma['ma_content'];
|
||||||
|
$content = preg_replace("/{이름}/", $name, $content);
|
||||||
|
$content = preg_replace("/{별명}/", $nick, $content);
|
||||||
|
$content = preg_replace("/{회원아이디}/", $mb_id, $content);
|
||||||
|
$content = preg_replace("/{이메일}/", $email, $content);
|
||||||
|
|
||||||
|
$mb_md5 = md5($member['mb_id'].$member['mb_email'].$member['mb_datetime']);
|
||||||
|
|
||||||
|
$content = $content . '<p>더 이상 정보 수신을 원치 않으시면 [<a href="'.G5_BBS_URL.'/email_stop.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5.'" target="_blank">수신거부</a>] 해 주십시오.</p>';
|
||||||
|
|
||||||
|
mailer($config['cf_title'], $member['mb_email'], $member['mb_email'], $subject, $content, 1);
|
||||||
|
|
||||||
|
alert($member['mb_nick'].'('.$member['mb_email'].')님께 테스트 메일을 발송하였습니다. 확인하여 주십시오.');
|
||||||
|
?>
|
||||||
39
adm/mail_update.php
Normal file
39
adm/mail_update.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($w == 'u' || $w == 'd')
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
if ($w == '')
|
||||||
|
{
|
||||||
|
$sql = " insert {$g5['mail_table']}
|
||||||
|
set ma_id = '{$_POST['ma_id']}',
|
||||||
|
ma_subject = '{$_POST['ma_subject']}',
|
||||||
|
ma_content = '{$_POST['ma_content']}',
|
||||||
|
ma_time = '".G5_TIME_YMDHIS."',
|
||||||
|
ma_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
else if ($w == 'u')
|
||||||
|
{
|
||||||
|
$sql = " update {$g5['mail_table']}
|
||||||
|
set ma_subject = '{$_POST['ma_subject']}',
|
||||||
|
ma_content = '{$_POST['ma_content']}',
|
||||||
|
ma_time = '".G5_TIME_YMDHIS."',
|
||||||
|
ma_ip = '{$_SERVER['REMOTE_ADDR']}'
|
||||||
|
where ma_id = '{$_POST['ma_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
else if ($w == 'd')
|
||||||
|
{
|
||||||
|
$sql = " delete from {$g5['mail_table']} where ma_id = '{$_POST['ma_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
goto_url('./mail_list.php');
|
||||||
|
?>
|
||||||
349
adm/member_form.php
Normal file
349
adm/member_form.php
Normal file
@ -0,0 +1,349 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
if ($w == '')
|
||||||
|
{
|
||||||
|
$required_mb_id = 'required';
|
||||||
|
$required_mb_id_class = 'required minlength=3 alnum_';
|
||||||
|
$required_mb_password = 'required';
|
||||||
|
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||||
|
|
||||||
|
$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('제대로 된 값이 넘어오지 않았습니다.');
|
||||||
|
|
||||||
|
// 본인확인방법
|
||||||
|
switch($mb['mb_certify']) {
|
||||||
|
case 'hp':
|
||||||
|
$mb_certify_case = '휴대폰';
|
||||||
|
$mb_certify_val = 'hp';
|
||||||
|
break;
|
||||||
|
case 'ipin':
|
||||||
|
$mb_certify_case = '아이핀';
|
||||||
|
$mb_certify_val = 'ipin';
|
||||||
|
break;
|
||||||
|
case 'admin':
|
||||||
|
$mb_certify_case = '관리자 수정';
|
||||||
|
$mb_certify_val = 'admin';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$mb_certify_case = '';
|
||||||
|
$mb_certify_val = 'admin';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 본인확인
|
||||||
|
$mb_certify_yes = $mb['mb_certify'] ? 'checked="checked"' : '';
|
||||||
|
$mb_certify_no = !$mb['mb_certify'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
|
// 성인인증
|
||||||
|
$mb_adult_yes = $mb['mb_adult'] ? 'checked="checked"' : '';
|
||||||
|
$mb_adult_no = !$mb['mb_adult'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
|
//메일수신
|
||||||
|
$mb_mailling_yes = $mb['mb_mailling'] ? 'checked="checked"' : '';
|
||||||
|
$mb_mailling_no = !$mb['mb_mailling'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
|
// SMS 수신
|
||||||
|
$mb_sms_yes = $mb['mb_sms'] ? 'checked="checked"' : '';
|
||||||
|
$mb_sms_no = !$mb['mb_sms'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
|
// 정보 공개
|
||||||
|
$mb_open_yes = $mb['mb_open'] ? 'checked="checked"' : '';
|
||||||
|
$mb_open_no = !$mb['mb_open'] ? 'checked="checked"' : '';
|
||||||
|
|
||||||
|
if (isset($mb['mb_certify'])) {
|
||||||
|
// 날짜시간형이라면 drop 시킴
|
||||||
|
if (preg_match("/-/", $mb['mb_certify'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}` DROP `mb_certify` ", false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_certify` TINYINT(4) NOT NULL DEFAULT '0' AFTER `mb_hp` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($mb['mb_adult'])) {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}` CHANGE `mb_adult` `mb_adult` TINYINT(4) NOT NULL DEFAULT '0' ", false);
|
||||||
|
} else {
|
||||||
|
sql_query(" ALTER TABLE `{$g5['member_table']}` ADD `mb_adult` TINYINT NOT NULL DEFAULT '0' AFTER `mb_certify` ", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
|
||||||
|
else $g5['title'] .= "";
|
||||||
|
$g5['title'] .= '회원 '.$html_title;
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form name="fmember" id="fmember" action="./member_form_update.php" onsubmit="return fmember_submit(this);" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
|
<div class="cbox">
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
<col class="grid_3">
|
||||||
|
<col class="grid_6">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_id">아이디<?php echo $sound_only ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="mb_id" value="<?php echo $mb['mb_id'] ?>" id="mb_id" <?php echo $required_mb_id ?> class="frm_input <?php echo $required_mb_id_class ?>" size="15" maxlength="20" >
|
||||||
|
<?php if ($w=='u'){ ?><a href="./boardgroupmember_form.php?mb_id=<?php echo $mb['mb_id'] ?>">접근가능그룹보기</a><?php } ?>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="mb_password">패스워드<?php echo $sound_only ?></label></th>
|
||||||
|
<td><input type="password" name="mb_password" id="mb_password" <?php echo $required_mb_password ?> class="frm_input <?php echo $required_mb_password ?>" size="15" maxlength="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_name">이름(실명)<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="mb_name" value="<?php echo $mb['mb_name'] ?>" id="mb_name" required class="required frm_input minlength=2" size="15" maxlength="20"></td>
|
||||||
|
<th scope="row"><label for="mb_nick">별명<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="mb_nick" value="<?php echo $mb['mb_nick'] ?>" id="mb_nick" required class="required frm_input minlength=2" size="15" maxlength="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_level">회원 권한</label></th>
|
||||||
|
<td><?php echo get_member_level_select('mb_level', 1, $member['mb_level'], $mb['mb_level']) ?></td>
|
||||||
|
<th scope="row">포인트</th>
|
||||||
|
<td><a href="./point_list.php?sfl=mb_id&stx=<?php echo $mb['mb_id'] ?>" target="_blank"><?php echo number_format($mb['mb_point']) ?></a> 점</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_email">E-mail<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="mb_email" value="<?php echo $mb['mb_email'] ?>" id="mb_email" maxlength="100" required class="required frm_input email" size="30"></td>
|
||||||
|
<th scope="row"><label for="mb_homepage">홈페이지</label></th>
|
||||||
|
<td><input type="text" name="mb_homepage" value="<?php echo $mb['mb_homepage'] ?>" id="mb_homepage" class="frm_input" maxlength="255" size="15"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_hp">휴대폰번호</label></th>
|
||||||
|
<td><input type="text" name="mb_hp" value="<?php echo $mb['mb_hp'] ?>" id="mb_hp" class="frm_input" size="15" maxlength="20"></td>
|
||||||
|
<th scope="row"><label for="mb_tel">전화번호</label></th>
|
||||||
|
<td><input type="text" name="mb_tel" value="<?php echo $mb['mb_tel'] ?>" id="mb_tel" class="frm_input" size="15" maxlength="20"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">본인확인방법</th>
|
||||||
|
<td colspan="3">
|
||||||
|
<input type="radio" name="mb_certify_case" value="ipin" id="mb_certify_ipin" <?php if($mb['mb_certify'] == 'ipin') echo 'checked="checked"'; ?>>
|
||||||
|
<label for="mb_certify_ipin">아이핀</label>
|
||||||
|
<input type="radio" name="mb_certify_case" value="hp" id="mb_certify_hp" <?php if($mb['mb_certify'] == 'hp') echo 'checked="checked"'; ?>>
|
||||||
|
<label for="mb_certify_hp">휴대폰</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">본인확인</th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="mb_certify" value="1" id="mb_certify_yes" <?php echo $mb_certify_yes; ?>>
|
||||||
|
<label for="mb_certify_yes">예</label>
|
||||||
|
<input type="radio" name="mb_certify" value="" id="mb_certify_no" <?php echo $mb_certify_no; ?>>
|
||||||
|
<label for="mb_certify_no">아니오</label>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="mb_adult">성인인증</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="mb_adult" value="1" id="mb_adult_yes" <?php echo $mb_adult_yes; ?>>
|
||||||
|
<label for="mb_adult_yes">예</label>
|
||||||
|
<input type="radio" name="mb_adult" value="0" id="mb_adult_no" <?php echo $mb_adult_no; ?>>
|
||||||
|
<label for="mb_adult_no">아니오</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_zip1">주소</label></th>
|
||||||
|
<td colspan="3" style="line-height:2em">
|
||||||
|
<input type="text" name="mb_zip1" value="<?php echo $mb['mb_zip1'] ?>" id="mb_zip1" title="우편번호 앞자리" class="frm_input readonly" size="3" maxlength="3"> -
|
||||||
|
<input type="text" name="mb_zip2" value="<?php echo $mb['mb_zip2'] ?>" id="mb_zip2" title="우편번호 뒷자리" class="frm_input readonly" size="3" maxlength="3">
|
||||||
|
<span id="win_zip" style="display:block"></span>
|
||||||
|
<input type="text" name="mb_addr1" value="<?php echo $mb['mb_addr1'] ?>" id="mb_addr1" title="행정기본주소" class="frm_input readonly" size="50"><br>
|
||||||
|
<input type="text" name="mb_addr2" value="<?php echo $mb['mb_addr2'] ?>" id="mb_addr2" title="상세주소" class="frm_input" size="50"> 상세주소 입력
|
||||||
|
<script>
|
||||||
|
// 우편번호 자바스크립트 비활성화 대응을 위한 코드
|
||||||
|
$('<a href="<?php echo G5_BBS_URL ?>/zip.php?frm_name=fmember&frm_zip1=mb_zip1&frm_zip2=mb_zip2&frm_addr1=mb_addr1&frm_addr2=mb_addr2" id="win_zip" class="win_zip_find btn_frmline" target="_blank">우편번호 검색</a><br>').appendTo('#win_zip');
|
||||||
|
$('#win_zip').css('display','inline');
|
||||||
|
$('#mb_zip1,#mb_zip2,#mb_addr1').attr('readonly','readonly');
|
||||||
|
</script>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_icon">회원아이콘</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php echo help('이미지 크기는 <strong>넓이 '.$config['cf_member_icon_width'].'픽셀 높이 '.$config['cf_member_icon_height'].'픽셀</strong>로 해주세요.') ?>
|
||||||
|
<input type="file" name="mb_icon" id="mb_icon">
|
||||||
|
<?php
|
||||||
|
$mb_dir = substr($mb['mb_id'],0,2);
|
||||||
|
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||||
|
if (file_exists($icon_file)) {
|
||||||
|
$icon_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
|
||||||
|
echo '<img src="'.$icon_url.'" alt="">';
|
||||||
|
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">메일 수신</th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="mb_mailling" value="1" id="mb_mailling_yes" <?php echo $mb_mailling_yes; ?>>
|
||||||
|
<label for="mb_mailling_yes">예</label>
|
||||||
|
<input type="radio" name="mb_mailling" value="0" id="mb_mailling_no" <?php echo $mb_mailling_no; ?>>
|
||||||
|
<label for="mb_mailling_no">아니오</label>
|
||||||
|
</td>
|
||||||
|
<th scope="row"><label for="mb_sms_yes">SMS 수신</label></th>
|
||||||
|
<td>
|
||||||
|
<input type="radio" name="mb_sms" value="1" id="mb_sms_yes" <?php echo $mb_sms_yes; ?>>
|
||||||
|
<label for="mb_sms_yes">예</label>
|
||||||
|
<input type="radio" name="mb_sms" value="0" id="mb_sms_no" <?php echo $mb_sms_no; ?>>
|
||||||
|
<label for="mb_sms_no">아니오</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_open">정보 공개</label></th>
|
||||||
|
<td colspan="3">
|
||||||
|
<input type="radio" name="mb_open" value="1" id="mb_open_yes" <?php echo $mb_open_yes; ?>>
|
||||||
|
<label for="mb_open">예</label>
|
||||||
|
<input type="radio" name="mb_open" value="0" id="mb_open_no" <?php echo $mb_open_no; ?>>
|
||||||
|
<label for="mb_open_no">아니오</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_signature">서명</label></th>
|
||||||
|
<td colspan="3"><textarea name="mb_signature" id="mb_signature"><?php echo $mb['mb_signature'] ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_profile">자기 소개</label></th>
|
||||||
|
<td colspan="3"><textarea name="mb_profile" id="mb_profile"><?php echo $mb['mb_profile'] ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_memo">메모</label></th>
|
||||||
|
<td colspan="3"><textarea name="mb_memo" id="mb_memo"><?php echo $mb['mb_memo'] ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php if ($w == 'u') { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">회원가입일</th>
|
||||||
|
<td><?php echo $mb['mb_datetime'] ?></td>
|
||||||
|
<th scope="row">최근접속일</th>
|
||||||
|
<td><?php echo $mb['mb_today_login'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">IP</th>
|
||||||
|
<td colspan="3"><?php echo $mb['mb_ip'] ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php if ($config['cf_use_email_certify']) { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">인증일시</th>
|
||||||
|
<td colspan="3">
|
||||||
|
<?php if ($mb['mb_email_certify'] == '0000-00-00 00:00:00') { ?>
|
||||||
|
<?php echo help('회원님이 메일을 수신할 수 없는 경우 등에 직접 인증처리를 하실 수 있습니다.') ?>
|
||||||
|
<input type="checkbox" id="passive_certify" name="passive_certify">
|
||||||
|
<label>수동인증</label>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?php echo $mb['mb_email_certify'] ?>
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if ($config['cf_use_recommend']) { // 추천인 사용 ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row">추천인</th>
|
||||||
|
<td colspan="3"><?php echo ($mb['mb_recommend'] ? get_text($mb['mb_recommend']) : '없음'); // 081022 : CSRF 보안 결함으로 인한 코드 수정 ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th scope="row">탈퇴일자</th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" class="frm_input" maxlength="8">
|
||||||
|
<input type="checkbox" value="<?php echo date("Ymd"); ?>" title="탈퇴일을 오늘로 지정" onclick="if (this.form.mb_leave_date.value==this.form.mb_leave_date.defaultValue) { this.form.mb_leave_date.value=this.value; } else { this.form.mb_leave_date.value=this.form.mb_leave_date.defaultValue; }"> 오늘
|
||||||
|
</td>
|
||||||
|
<th scope="row">접근차단일자</th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" class="frm_input" maxlength="8">
|
||||||
|
<input type="checkbox" value="<?php echo date("Ymd"); ?>" title="접근차단일을 오늘로 지정" onclick="if (this.form.mb_intercept_date.value==this.form.mb_intercept_date.defaultValue) { this.form.mb_intercept_date.value=this.value; } else { this.form.mb_intercept_date.value=this.form.mb_intercept_date.defaultValue; }"> 오늘
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_<?php echo $i ?>">여분 필드 <?php echo $i ?></label></th>
|
||||||
|
<td colspan="3"><input type="text" id="mb_<?php echo $i ?>" name="mb_<?php echo $i ?>" value="<?php echo $mb['mb_'.$i] ?>" class="frm_input" size="30" maxlength="255"></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<p>
|
||||||
|
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||||
|
</p>
|
||||||
|
<input type="submit" value="확인" class="btn_submit" accesskey='s'>
|
||||||
|
<a href="./member_list.php?<?php echo $qstr ?>">목록</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fmember_submit(f)
|
||||||
|
{
|
||||||
|
if (!f.mb_icon.value.match(/\.(gif|jp['e']g|png)$/i) && f.mb_icon.value) {
|
||||||
|
alert('아이콘이 이미지 파일이 아닙니다. (bmp 제외)');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
150
adm/member_form_update.php
Normal file
150
adm/member_form_update.php
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200100";
|
||||||
|
include_once("./_common.php");
|
||||||
|
include_once(G5_LIB_PATH."/register.lib.php");
|
||||||
|
|
||||||
|
if ($w == 'u')
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$mb_id = escape_trim($_POST['mb_id']);
|
||||||
|
|
||||||
|
// 휴대폰번호 체크
|
||||||
|
$mb_hp = $_POST['mb_hp'];
|
||||||
|
if($mb_hp) {
|
||||||
|
$result = exist_mb_hp($mb_hp, $mb_id);
|
||||||
|
if ($result)
|
||||||
|
alert($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 인증정보처리
|
||||||
|
if($_POST['mb_certify_case'] && $_POST['mb_certify']) {
|
||||||
|
$mb_certify = $_POST['mb_certify_case'];
|
||||||
|
$mb_adult = $_POST['mb_adult'];
|
||||||
|
} else {
|
||||||
|
$mb_certify = '';
|
||||||
|
$mb_adult = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_common = " mb_name = '{$_POST['mb_name']}',
|
||||||
|
mb_nick = '{$_POST['mb_nick']}',
|
||||||
|
mb_email = '{$_POST['mb_email']}',
|
||||||
|
mb_homepage = '{$_POST['mb_homepage']}',
|
||||||
|
mb_tel = '{$_POST['mb_tel']}',
|
||||||
|
mb_hp = '{$_POST['mb_hp']}',
|
||||||
|
mb_certify = '{$mb_certify}',
|
||||||
|
mb_adult = '{$mb_adult}',
|
||||||
|
mb_zip1 = '{$_POST['mb_zip1']}',
|
||||||
|
mb_zip2 = '{$_POST['mb_zip2']}',
|
||||||
|
mb_addr1 = '{$_POST['mb_addr1']}',
|
||||||
|
mb_addr2 = '{$_POST['mb_addr2']}',
|
||||||
|
mb_birth = '{$_POST['mb_birth']}',
|
||||||
|
mb_sex = '{$_POST['mb_sex']}',
|
||||||
|
mb_signature = '{$_POST['mb_signature']}',
|
||||||
|
mb_leave_date = '{$_POST['mb_leave_date']}',
|
||||||
|
mb_intercept_date='{$_POST['mb_intercept_date']}',
|
||||||
|
mb_memo = '{$_POST['mb_memo']}',
|
||||||
|
mb_mailling = '{$_POST['mb_mailling']}',
|
||||||
|
mb_sms = '{$_POST['mb_sms']}',
|
||||||
|
mb_open = '{$_POST['mb_open']}',
|
||||||
|
mb_profile = '{$_POST['mb_profile']}',
|
||||||
|
mb_level = '{$_POST['mb_level']}',
|
||||||
|
mb_1 = '{$_POST['mb_1']}',
|
||||||
|
mb_2 = '{$_POST['mb_2']}',
|
||||||
|
mb_3 = '{$_POST['mb_3']}',
|
||||||
|
mb_4 = '{$_POST['mb_4']}',
|
||||||
|
mb_5 = '{$_POST['mb_5']}',
|
||||||
|
mb_6 = '{$_POST['mb_6']}',
|
||||||
|
mb_7 = '{$_POST['mb_7']}',
|
||||||
|
mb_8 = '{$_POST['mb_8']}',
|
||||||
|
mb_9 = '{$_POST['mb_9']}',
|
||||||
|
mb_10 = '{$_POST['mb_10']}' ";
|
||||||
|
|
||||||
|
if ($w == '')
|
||||||
|
{
|
||||||
|
$mb = get_member($mb_id);
|
||||||
|
if ($mb['mb_id'])
|
||||||
|
alert('이미 존재하는 회원입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n별명 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||||
|
|
||||||
|
if ($mb['mb_nick'] == $mb_nick)
|
||||||
|
alert('이미 존재하는 별명입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n별명 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||||
|
|
||||||
|
if ($mb['mb_email'] == $mb_email)
|
||||||
|
alert('이미 존재하는 E-mail 입니다.\\nID : '.$mb['mb_id'].'\\n이름 : '.$mb['mb_name'].'\\n별명 : '.$mb['mb_nick'].'\\n메일 : '.$mb['mb_email']);
|
||||||
|
|
||||||
|
sql_query(" insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".sql_password($mb_password)."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_email_certify = '".G5_TIME_YMDHIS."', {$sql_common} ");
|
||||||
|
}
|
||||||
|
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('자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.');
|
||||||
|
|
||||||
|
if ($_POST['mb_id'] == $member['mb_id'] && $_POST['mb_level'] != $mb['mb_level'])
|
||||||
|
alert($mb['mb_id'].' : 로그인 중인 관리자 레벨은 수정 할 수 없습니다.');
|
||||||
|
|
||||||
|
// 이메일중복체크
|
||||||
|
$sql = " select count(*) as cnt from {$g5['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(G5_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(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||||
|
@chmod(G5_DATA_PATH.'/member/'.$mb_dir, G5_DIR_PERMISSION);
|
||||||
|
|
||||||
|
$dest_path = G5_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
|
||||||
|
|
||||||
|
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||||
|
chmod($dest_path, G5_FILE_PERMISSION);
|
||||||
|
|
||||||
|
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 = '".G5_TIME_YMDHIS."' ";
|
||||||
|
else
|
||||||
|
$sql_certify = "";
|
||||||
|
|
||||||
|
$sql = " update {$g5['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);
|
||||||
|
?>
|
||||||
307
adm/member_list.php
Normal file
307
adm/member_list.php
Normal file
@ -0,0 +1,307 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['member_table']} ";
|
||||||
|
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
if ($stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
case 'mb_point' :
|
||||||
|
$sql_search .= " ({$sfl} >= '{$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 = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||||
|
|
||||||
|
$g5['title'] = '회원관리';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$colspan = 15;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="fsearch" name="fsearch" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>회원검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
총회원수 <?php echo number_format($total_count) ?>명 중,
|
||||||
|
<a href="?sst=mb_intercept_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>">차단 <?php echo number_format($intercept_count) ?></a>명,
|
||||||
|
<a href="?sst=mb_leave_date&sod=desc&sfl=<?php echo $sfl ?>&stx=<?php echo $stx ?>">탈퇴 <?php echo number_format($leave_count) ?></a>명
|
||||||
|
</span>
|
||||||
|
<label for="sfl" class="sound_only">검색대상</label>
|
||||||
|
<select name="sfl">
|
||||||
|
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||||
|
<option value="mb_nick"<?php echo get_selected($_GET['sfl'], "mb_nick"); ?>>별명</option>
|
||||||
|
<option value="mb_name"<?php echo get_selected($_GET['sfl'], "mb_name"); ?>>이름</option>
|
||||||
|
<option value="mb_level"<?php echo get_selected($_GET['sfl'], "mb_level"); ?>>권한</option>
|
||||||
|
<option value="mb_email"<?php echo get_selected($_GET['sfl'], "mb_email"); ?>>E-MAIL</option>
|
||||||
|
<option value="mb_tel"<?php echo get_selected($_GET['sfl'], "mb_tel"); ?>>전화번호</option>
|
||||||
|
<option value="mb_hp"<?php echo get_selected($_GET['sfl'], "mb_hp"); ?>>휴대폰번호</option>
|
||||||
|
<option value="mb_point"<?php echo get_selected($_GET['sfl'], "mb_point"); ?>>포인트</option>
|
||||||
|
<option value="mb_datetime"<?php echo get_selected($_GET['sfl'], "mb_datetime"); ?>>가입일시</option>
|
||||||
|
<option value="mb_ip"<?php echo get_selected($_GET['sfl'], "mb_ip"); ?>>IP</option>
|
||||||
|
<option value="mb_recommend"<?php echo get_selected($_GET['sfl'], "mb_recommend"); ?>>추천인</option>
|
||||||
|
</select>
|
||||||
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
|
<input type="submit" class="btn_submit" value="검색">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>회원 목록</h2>
|
||||||
|
<p>회원자료 삭제 시 다른 회원이 기존 회원아이디를 사용하지 못하도록 회원아이디, 이름, 별명은 삭제하지 않고 영구 보관합니다.</p>
|
||||||
|
|
||||||
|
<?php if ($is_admin == 'super') { ?>
|
||||||
|
<div class="btn_add sort_with">
|
||||||
|
<a href="./member_form.php" id="member_add">회원추가</a>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<ul id="sort_mb" class="sort_odr">
|
||||||
|
<li><?php echo subject_sort_link('mb_id') ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_name') ?>이름<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_point', '', 'desc') ?> 포인트<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_nick') ?>별명<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_level', '', 'desc') ?>권한<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일인증<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>메일수신<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보공개<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인인증<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근차단<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('mb_datetime', '', 'desc') ?>가입일<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form name="fmemberlist" id="fmemberlist" action="./member_list_update.php" onsubmit="return fmemberlist_submit(this);" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
|
||||||
|
<table class="tbl_mb_list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col" rowspan="2" id="mb_list_chk">
|
||||||
|
<label for="chkall" class="sound_only">회원 전체</label>
|
||||||
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
|
</th>
|
||||||
|
<th scope="col" rowspan="2" id="mb_list_id">아이디</th>
|
||||||
|
<th scope="col" id="mb_list_name">이름</th>
|
||||||
|
<th scope="col" colspan="5" id="mb_list_cert">본인확인</th>
|
||||||
|
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
||||||
|
<th scope="col" id="mb_list_auth">상태/권한</th>
|
||||||
|
<th scope="col" id="mb_list_lastcall">최종접속</th>
|
||||||
|
<th scope="col" rowspan="2" id="mb_list_grp">접근<br>그룹</th>
|
||||||
|
<th scope="col" rowspan="2" id="mb_list_mng">관리</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="col" id="mb_list_nick">별명</th>
|
||||||
|
<th scope="col" id="mb_list_mailr">메일<br>수신</th>
|
||||||
|
<th scope="col" id="mb_list_open">정보<br>공개</th>
|
||||||
|
<th scope="col" id="mb_list_mailc">메일<br>인증</th>
|
||||||
|
<th scope="col" id="mb_list_adultc">성인<br>인증</th>
|
||||||
|
<th scope="col" id="mb_list_deny">접근<br>차단</th>
|
||||||
|
<th scope="col" id="mb_list_tel">전화번호</th>
|
||||||
|
<th scope="col" id="mb_list_point">포인트</th>
|
||||||
|
<th scope="col" id="mb_list_join">가입일</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
// 접근가능한 그룹수
|
||||||
|
$sql2 = " select count(*) as cnt from {$g5['group_member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
$group = '';
|
||||||
|
if ($row2['cnt'])
|
||||||
|
$group = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">'.$row2['cnt'].'</a>';
|
||||||
|
|
||||||
|
if ($is_admin == 'group') {
|
||||||
|
$s_mod = '';
|
||||||
|
$s_del = '';
|
||||||
|
} else {
|
||||||
|
$s_mod = '<a href="./member_form.php?'.$qstr.'&w=u&mb_id='.$row['mb_id'].'">수정</a>';
|
||||||
|
//$s_del = '<a href="javascript:post_delete(\'member_delete.php\', \''.$row['mb_id'].'\');">삭제</a>';
|
||||||
|
}
|
||||||
|
$s_grp = '<a href="./boardgroupmember_form.php?mb_id='.$row['mb_id'].'">그룹</a>';
|
||||||
|
|
||||||
|
$leave_date = $row['mb_leave_date'] ? $row['mb_leave_date'] : date('Ymd', G5_SERVER_TIME);
|
||||||
|
$intercept_date = $row['mb_intercept_date'] ? $row['mb_intercept_date'] : date('Ymd', G5_SERVER_TIME);
|
||||||
|
|
||||||
|
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||||
|
|
||||||
|
$mb_id = $row['mb_id'];
|
||||||
|
$leave_msg = '';
|
||||||
|
$intercept_msg = '';
|
||||||
|
$intercept_title = '';
|
||||||
|
if ($row['mb_leave_date']) {
|
||||||
|
$mb_id = $mb_id;
|
||||||
|
$leave_msg = '<span class="mb_leave_msg">탈퇴함</span>';
|
||||||
|
}
|
||||||
|
else if ($row['mb_intercept_date']) {
|
||||||
|
$mb_id = $mb_id;
|
||||||
|
$intercept_msg = '<span class="mb_intercept_msg">차단됨</span>';
|
||||||
|
$intercept_title = '차단해제';
|
||||||
|
}
|
||||||
|
if ($intercept_title == '')
|
||||||
|
$intercept_title = '차단하기';
|
||||||
|
|
||||||
|
$address = $row['mb_zip1'] ? $row['mb_addr1'].' '.$row['mb_addr2'] : '';
|
||||||
|
|
||||||
|
$tr_bg = '';
|
||||||
|
if ($i%2 == 0) $tr_bg = 'class="tr_bg"';
|
||||||
|
|
||||||
|
switch($row['mb_certify']) {
|
||||||
|
case 'hp':
|
||||||
|
$mb_certify_case = '휴대폰';
|
||||||
|
$mb_certify_val = 'hp';
|
||||||
|
break;
|
||||||
|
case 'ipin':
|
||||||
|
$mb_certify_case = '아이핀';
|
||||||
|
$mb_certify_val = '';
|
||||||
|
break;
|
||||||
|
case 'admin':
|
||||||
|
$mb_certify_case = '관리자';
|
||||||
|
$mb_certify_val = 'admin';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$mb_certify_case = ' ';
|
||||||
|
$mb_certify_val = 'admin';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr <?php echo $tr_bg; ?>>
|
||||||
|
<td headers="mb_list_chk" class="td_chk" rowspan="2">
|
||||||
|
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_name']; ?> <?php echo $row['mb_nick']; ?>님</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_id" rowspan="2" class="td_name sv_use"><?php echo $mb_id ?></td>
|
||||||
|
<td headers="mb_list_name" class="td_mbname"><?php echo $row['mb_name']; ?></td>
|
||||||
|
<td headers="mb_list_cert" colspan="5">
|
||||||
|
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="ipin" id="mb_certify_ipin_<?php echo $i; ?>" <?php echo $row['mb_certify']=='ipin'?'checked':''; ?>>
|
||||||
|
<label for="mb_certify_ipin_<?php echo $i; ?>">아이핀</label>
|
||||||
|
<input type="radio" name="mb_certify[<?php echo $i; ?>]" value="hp" id="mb_certify_hp_<?php echo $i; ?>" <?php echo $row['mb_certify']=='hp'?'checked':''; ?>>
|
||||||
|
<label for="mb_certify_hp_<?php echo $i; ?>">휴대폰</label>
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_mobile" class="td_callnum"><?php echo $row['mb_hp']; ?></td>
|
||||||
|
<td headers="mb_list_auth" class="">
|
||||||
|
<?php
|
||||||
|
if ($leave_msg || $intercept_msg) echo $leave_msg.' '.$intercept_msg;
|
||||||
|
else echo "정상";
|
||||||
|
?>
|
||||||
|
<?php echo get_member_level_select("mb_level[$i]", 1, $member['mb_level'], $row['mb_level']) ?>
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_lastcall" class="td_date"><?php echo substr($row['mb_today_login'],2,8); ?></td>
|
||||||
|
<td headers="mb_list_grp" rowspan="2" class="td_smallnum"><?php echo $group ?></td>
|
||||||
|
<td headers="mb_list_mng" rowspan="2" class="td_smallmng"><?php echo $s_mod ?><br><?php echo $s_grp ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr <?php echo $tr_bg; ?>>
|
||||||
|
<td headers="mb_list_nick" class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
|
<td headers="mb_list_mailc" class="td_chk"><?php echo preg_match('/[1-9]/', $row['mb_email_certify'])?'<span class="txt_true">Yes</span>':'<span class="txt_false">No</span>'; ?></td>
|
||||||
|
<td headers="mb_list_mailr" class="td_chk"><input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling']?'checked':''; ?> value="1"></td>
|
||||||
|
<td headers="mb_list_open" class="td_chk"><input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open']?'checked':''; ?> value="1"></td>
|
||||||
|
<td headers="mb_list_adultc" class="td_chk"><input type="checkbox" name="mb_adult[<?php echo $i; ?>]" <?php echo $row['mb_adult']?'checked':''; ?> value="1"></td>
|
||||||
|
<td headers="mb_list_deny" class="td_chk">
|
||||||
|
<?php if(empty($row['mb_leave_date'])){ ?>
|
||||||
|
<input type="checkbox" name="mb_intercept_date[<?php echo $i; ?>]" <?php echo $row['mb_intercept_date']?'checked':''; ?> value="<?php echo $intercept_date ?>" id="mb_intercept_date_<?php echo $i ?>" title="<?php echo $intercept_title ?>">
|
||||||
|
<?php } ?>
|
||||||
|
</td>
|
||||||
|
<td headers="mb_list_tel"><?php echo $row['mb_tel']; ?></td>
|
||||||
|
<td headers="mb_list_point" class="td_num"><a href="point_list.php?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo number_format($row['mb_point']) ?></a></td>
|
||||||
|
<td headers="mb_list_join"><?php echo substr($row['mb_datetime'],2,8); ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($i == 0)
|
||||||
|
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<input type="submit" name="act_button" value="선택수정" onclick="document.pressed=this.value">
|
||||||
|
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, '?'.$qstr.'&page='); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fmemberlist_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
75
adm/member_list_update.php
Normal file
75
adm/member_list_update.php
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200100";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
if (!count($_POST['chk'])) {
|
||||||
|
alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
if ($_POST['act_button'] == "선택수정") {
|
||||||
|
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||||
|
{
|
||||||
|
// 실제 번호를 넘김
|
||||||
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
$mb = get_member($_POST['mb_id'][$k]);
|
||||||
|
|
||||||
|
if (!$mb['mb_id']) {
|
||||||
|
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||||
|
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||||
|
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n';
|
||||||
|
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||||
|
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n';
|
||||||
|
} else {
|
||||||
|
if($_POST['mb_certify'][$k])
|
||||||
|
$mb_adult = $_POST['mb_adult'][$k];
|
||||||
|
else
|
||||||
|
$mb_adult = 0;
|
||||||
|
|
||||||
|
$sql = " update {$g5['member_table']}
|
||||||
|
set mb_level = '{$_POST['mb_level'][$k]}',
|
||||||
|
mb_intercept_date = '{$_POST['mb_intercept_date'][$k]}',
|
||||||
|
mb_mailling = '{$_POST['mb_mailling'][$k]}',
|
||||||
|
mb_open = '{$_POST['mb_open'][$k]}',
|
||||||
|
mb_certify = '{$_POST['mb_certify'][$k]}',
|
||||||
|
mb_adult = '{$mb_adult}'
|
||||||
|
where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if ($_POST['act_button'] == "선택삭제") {
|
||||||
|
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||||
|
{
|
||||||
|
// 실제 번호를 넘김
|
||||||
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
$mb = get_member($_POST['mb_id'][$k]);
|
||||||
|
|
||||||
|
if (!$mb['mb_id']) {
|
||||||
|
$msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n';
|
||||||
|
} else if ($member['mb_id'] == $mb['mb_id']) {
|
||||||
|
$msg .= $mb['mb_id'].' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n';
|
||||||
|
} else if (is_admin($mb['mb_id']) == 'super') {
|
||||||
|
$msg .= $mb['mb_id'].' : 최고 관리자는 삭제할 수 없습니다.\\n';
|
||||||
|
} else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) {
|
||||||
|
$msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n';
|
||||||
|
} else {
|
||||||
|
// 회원자료 삭제
|
||||||
|
member_delete($mb['mb_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($msg)
|
||||||
|
//echo '<script> alert("'.$msg.'"); </script>';
|
||||||
|
alert($msg);
|
||||||
|
|
||||||
|
goto_url('./member_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
10
adm/phpinfo.php
Normal file
10
adm/phpinfo.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100500";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
phpinfo();
|
||||||
|
?>
|
||||||
64
adm/point_clear.php
Normal file
64
adm/point_clear.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
if (!$ok)
|
||||||
|
alert();
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('포인트 정리는 최고관리자만 가능합니다.');
|
||||||
|
|
||||||
|
$g5['title'] = '포인트 정리';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
echo '<span id="ct"></span>';
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
flush();
|
||||||
|
|
||||||
|
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>포인트 정리중...</p>\';</script>'."\n";
|
||||||
|
flush();
|
||||||
|
|
||||||
|
$max_count = 50;
|
||||||
|
|
||||||
|
// 테이블 락을 걸고
|
||||||
|
$sql = " LOCK TABLES {$g5['member_table']} WRITE, {$g5['point_table']} WRITE ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
$sql = " select mb_id, count(po_point) as cnt
|
||||||
|
from {$g5['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 {$g5['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 {$g5['point_table']} where po_id = '{$row2['po_id']}' ");
|
||||||
|
}
|
||||||
|
|
||||||
|
insert_point($row['mb_id'], $total, '포인트 {$count}건 정리', '@clear', $row['mb_id'], G5_TIME_YMD."-".uniqid(""));
|
||||||
|
|
||||||
|
$str = $row['mb_id']."님 포인트 내역 ".number_format($count)."건 ".number_format($total)."점 정리<br>";
|
||||||
|
echo '<script>document.getElementById(\'ct\').innerHTML += \''.$str.'\';</script>'."\n";
|
||||||
|
flush();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 테이블 락을 풀고
|
||||||
|
$sql = " UNLOCK TABLES ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
echo '<script>document.getElementById(\'ct\').innerHTML += \'<p>총 '.$i.'건의 회원포인트 내역이 정리 되었습니다.</p>\';</script>'."\n";
|
||||||
|
?>
|
||||||
272
adm/point_list.php
Normal file
272
adm/point_list.php
Normal file
@ -0,0 +1,272 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['point_table']} ";
|
||||||
|
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
|
||||||
|
if ($stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
case 'mb_id' :
|
||||||
|
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$sql_search .= " ) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$sst) {
|
||||||
|
$sst = "po_id";
|
||||||
|
$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 *
|
||||||
|
{$sql_common}
|
||||||
|
{$sql_search}
|
||||||
|
{$sql_order}
|
||||||
|
limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$listall = '';
|
||||||
|
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||||
|
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||||
|
|
||||||
|
$mb = array();
|
||||||
|
if ($sfl == 'mb_id' && $stx)
|
||||||
|
$mb = get_member($stx);
|
||||||
|
|
||||||
|
$g5['title'] = '포인트관리';
|
||||||
|
include_once ('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 9;
|
||||||
|
|
||||||
|
$po_expire_term = '';
|
||||||
|
if($config['cf_point_term'] > 0) {
|
||||||
|
$po_expire_term = $config['cf_point_term'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strstr($sfl, "mb_id"))
|
||||||
|
$mb_id = $stx;
|
||||||
|
else
|
||||||
|
$mb_id = "";
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function point_clear()
|
||||||
|
{
|
||||||
|
if (confirm('포인트 정리를 하시면 최근 50건 이전의 포인트 부여 내역을 삭제하므로 포인트 부여 내역을 필요로 할때 찾지 못할 수도 있습니다. 그래도 진행하시겠습니까?'))
|
||||||
|
{
|
||||||
|
document.location.href = "./point_clear.php?ok=1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<form name="fsearch" id="fsearch" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>포인트 내역 검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
전체 <?php echo number_format($total_count) ?> 건
|
||||||
|
<?php
|
||||||
|
if (isset($mb['mb_id']) && $mb['mb_id']) {
|
||||||
|
echo ' (' . $mb['mb_id'] .' 님 포인트 합계 : ' . number_format($mb['mb_point']) . '점)';
|
||||||
|
} else {
|
||||||
|
$row2 = sql_fetch(" select sum(po_point) as sum_point from {$g5['point_table']} ");
|
||||||
|
echo ' (전체 합계 '.number_format($row2['sum_point']).'점)';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?php if ($is_admin == 'super') { ?><!-- <a href="javascript:point_clear();">포인트정리</a> --><?php } ?>
|
||||||
|
</span>
|
||||||
|
<select name="sfl" title="검색대상">
|
||||||
|
<option value="mb_id"<?php echo get_selected($_GET['sfl'], "mb_id"); ?>>회원아이디</option>
|
||||||
|
<option value="po_content"<?php echo get_selected($_GET['sfl'], "po_content"); ?>>내용</option>
|
||||||
|
</select>
|
||||||
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
|
<input type="submit" class="btn_submit" value="검색">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>포인트 내역</h2>
|
||||||
|
|
||||||
|
<ul class="sort_odr">
|
||||||
|
<li><?php echo subject_sort_link('mb_id') ?>회원아이디<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('po_datetime') ?>일시<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('po_content') ?>포인트 내용<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
<li><?php echo subject_sort_link('po_point') ?>포인트<span class="sound_only"> 순 정렬</span></a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form name="fpointlist" id="fpointlist" method="post" action="./point_list_delete.php" onsubmit="return fpointlist_submit(this);">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
|
<table class="tbl_pt_list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">
|
||||||
|
<label for="chkall" class="sound_only">포인트 내역 전체</label>
|
||||||
|
<input type="checkbox" name="chkall" value="1" id="chkall" onclick="check_all(this.form)">
|
||||||
|
</th>
|
||||||
|
<th scope="col">회원아이디</th>
|
||||||
|
<th scope="col">이름</th>
|
||||||
|
<th scope="col">별명</th>
|
||||||
|
<th scope="col">포인트 내용</th>
|
||||||
|
<th scope="col">포인트</th>
|
||||||
|
<th scope="col">일시</th>
|
||||||
|
<th scope="col">만료일</th>
|
||||||
|
<th scope="col">포인트합</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
if ($i==0 || ($row2['mb_id'] != $row['mb_id'])) {
|
||||||
|
$sql2 = " select mb_id, mb_name, mb_nick, mb_email, mb_homepage, mb_point from {$g5['member_table']} where mb_id = '{$row['mb_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mb_nick = get_sideview($row['mb_id'], $row2['mb_nick'], $row2['mb_email'], $row2['mb_homepage']);
|
||||||
|
|
||||||
|
$link1 = $link2 = '';
|
||||||
|
if (!preg_match("/^\@/", $row['po_rel_table']) && $row['po_rel_table']) {
|
||||||
|
$link1 = '<a href="'.G5_BBS_URL.'/board.php?bo_table='.$row['po_rel_table'].'&wr_id='.$row['po_rel_id'].'" target="_blank">';
|
||||||
|
$link2 = '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$expr = '';
|
||||||
|
if($row['po_expired'] == 1)
|
||||||
|
$expr = ' txt_expired';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk">
|
||||||
|
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
|
||||||
|
<input type="hidden" name="po_id[<?php echo $i ?>]" value="<?php echo $row['po_id'] ?>" id="po_id_<?php echo $i ?>">
|
||||||
|
<label for="chk_<?php echo $i; ?>" class="sound_only">내역</label>
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">
|
||||||
|
</td>
|
||||||
|
<td class="td_mbid"><a href="?sfl=mb_id&stx=<?php echo $row['mb_id'] ?>"><?php echo $row['mb_id'] ?></a></td>
|
||||||
|
<td class="td_mbname"><?php echo $row2['mb_name'] ?></td>
|
||||||
|
<td class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||||
|
<td class="td_pt_log"><?php echo $link1 ?><?php echo $row['po_content'] ?><?php echo $link2 ?></td>
|
||||||
|
<td class="td_num td_pt"><?php echo number_format($row['po_point']) ?></td>
|
||||||
|
<td class="td_time"><?php echo $row['po_datetime'] ?></td>
|
||||||
|
<td class="td_date<?php echo $expr; ?>">
|
||||||
|
<?php if ($row['po_expired'] == 1) { ?>
|
||||||
|
만료<?php echo substr(str_replace('-', '', $row['po_expire_date']), 2); ?>
|
||||||
|
<?php } else echo $row['po_expire_date'] == '9999-12-31' ? ' ' : $row['po_expire_date']; ?>
|
||||||
|
</td>
|
||||||
|
<td class="td_num td_pt"><?php echo number_format($row['po_mb_point']) ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||||
|
|
||||||
|
<section id="point_mng" class="cbox">
|
||||||
|
<h2>개별회원 포인트 증감 설정</h2>
|
||||||
|
|
||||||
|
<form name="fpointlist2" method="post" id="fpointlist2" action="./point_update.php" autocomplete="off">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<colgroup>
|
||||||
|
<col class="grid_3">
|
||||||
|
<col>
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_id">회원아이디<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="mb_id" value="<?php echo $mb_id ?>" id="mb_id" class="required frm_input" required></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_content">포인트 내용<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="po_content" id="po_content" required class="required frm_input" size="80"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_point">포인트<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="po_point" id="po_point" required class="required frm_input"></td>
|
||||||
|
</tr>
|
||||||
|
<?php if($config['cf_point_term'] > 0) { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_expire_term">포인트 유효기간</label></th>
|
||||||
|
<td><input type="text" name="po_expire_term" value="<?php echo $po_expire_term; ?>" id="po_expire_term" class="frm_input" size="5"> 일</td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<input type="submit" value="확인" class="btn_submit">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function fpointlist_submit(f)
|
||||||
|
{
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(document.pressed == "선택삭제") {
|
||||||
|
if(!confirm("선택한 자료를 정말 삭제하시겠습니까?")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
59
adm/point_list_delete.php
Normal file
59
adm/point_list_delete.php
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '200200';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$count = count($_POST['chk']);
|
||||||
|
if(!$count)
|
||||||
|
alert($_POST['act_button'].' 하실 항목을 하나 이상 체크하세요.');
|
||||||
|
|
||||||
|
for ($i=0; $i<$count; $i++)
|
||||||
|
{
|
||||||
|
// 실제 번호를 넘김
|
||||||
|
$k = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
// 포인트 내역정보
|
||||||
|
$sql = " select * from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
|
||||||
|
if(!$row['po_id'])
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if($row['po_point'] < 0) {
|
||||||
|
$mb_id = $row['mb_id'];
|
||||||
|
$po_point = abs($row['po_point']);
|
||||||
|
|
||||||
|
if($row['po_rel_table'] == '@expire')
|
||||||
|
delete_expire_point($mb_id, $po_point);
|
||||||
|
else
|
||||||
|
delete_use_point($mb_id, $po_point);
|
||||||
|
} else {
|
||||||
|
if($row['po_use_point'] > 0) {
|
||||||
|
insert_use_point($row['mb_id'], $row['po_use_point'], $row['po_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 포인트 내역삭제
|
||||||
|
$sql = " delete from {$g5['point_table']} where po_id = '{$_POST['po_id'][$k]}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
// po_mb_point에 반영
|
||||||
|
$sql = " update {$g5['point_table']}
|
||||||
|
set po_mb_point = po_mb_point - '{$row['po_point']}'
|
||||||
|
where mb_id = '{$_POST['mb_id'][$k]}'
|
||||||
|
and po_id > '{$_POST['po_id'][$k]}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
// 포인트 UPDATE
|
||||||
|
$sum_point = get_point_sum($_POST['mb_id'][$k]);
|
||||||
|
$sql= " update {$g5['member_table']} set mb_point = '$sum_point' where mb_id = '{$_POST['mb_id'][$k]}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
goto_url('./point_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
25
adm/point_update.php
Normal file
25
adm/point_update.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200200";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$mb_id = $_POST['mb_id'];
|
||||||
|
$po_point = $_POST['po_point'];
|
||||||
|
$po_content = $_POST['po_content'];
|
||||||
|
$expire = preg_replace('/[^0-9]/', '', $_POST['po_expire_term']);
|
||||||
|
|
||||||
|
$mb = get_member($mb_id);
|
||||||
|
|
||||||
|
if (!$mb['mb_id'])
|
||||||
|
alert('존재하는 회원아이디가 아닙니다.', './point_list.php?'.$qstr);
|
||||||
|
|
||||||
|
if (($po_point < 0) && ($po_point * (-1) > $mb['mb_point']))
|
||||||
|
alert('포인트를 깎는 경우 현재 포인트보다 작으면 안됩니다.', './point_list.php?'.$qstr);
|
||||||
|
|
||||||
|
insert_point($mb_id, $po_point, $po_content, '@passive', $mb_id, $member['mb_id'].'-'.uniqid(''), $expire);
|
||||||
|
|
||||||
|
goto_url('./point_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
27
adm/poll_delete.php
Normal file
27
adm/poll_delete.php
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200900";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'd');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
$count = count($_POST['chk']);
|
||||||
|
|
||||||
|
if(!$count)
|
||||||
|
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
|
||||||
|
|
||||||
|
for($i=0; $i<$count; $i++) {
|
||||||
|
$po_id = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
$sql = " delete from {$g5['poll_table']} where po_id = '$po_id' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
$sql = " delete from {$g5['poll_etc_table']} where po_id = '$po_id' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
goto_url('./poll_list.php?'.$qstr);
|
||||||
|
?>
|
||||||
113
adm/poll_form.php
Normal file
113
adm/poll_form.php
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200900";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
$html_title = '투표';
|
||||||
|
if ($w == '')
|
||||||
|
$html_title .= ' 생성';
|
||||||
|
else if ($w == 'u') {
|
||||||
|
$html_title .= ' 수정';
|
||||||
|
$sql = " select * from {$g5['poll_table']} where po_id = '{$po_id}' ";
|
||||||
|
$po = sql_fetch($sql);
|
||||||
|
} else
|
||||||
|
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||||
|
|
||||||
|
$g5['title'] = $html_title;
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="cbox">
|
||||||
|
<form name="fpoll" id="fpoll" action="./poll_form_update.php" method="post" enctype="multipart/form-data">
|
||||||
|
<input type="hidden" name="po_id" value="<?php echo $po_id ?>">
|
||||||
|
<input type="hidden" name="w" value="<?php echo $w ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
<table class="frm_tbl">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_subject">투표 제목<strong class="sound_only">필수</strong></label></th>
|
||||||
|
<td><input type="text" name="po_subject" value="<?php echo $po['po_subject'] ?>" id="po_subject" required class="required frm_input" size="80" maxlength="125"></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
for ($i=1; $i<=9; $i++) {
|
||||||
|
$required = '';
|
||||||
|
if ($i==1 || $i==2) {
|
||||||
|
$required = 'required';
|
||||||
|
$sound_only = '<strong class="sound_only">필수</strong>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$po_poll = get_text($po['po_poll'.$i]);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_poll<?php echo $i ?>">항목 <?php echo $i ?><?php echo $sound_only ?></label></th>
|
||||||
|
<td>
|
||||||
|
<input type="text" name="po_poll<?php echo $i ?>" value="<?php echo $po_poll ?>" id="po_poll<?php echo $i ?>" <?php echo $required ?> class="frm_input <?php echo $required ?>" maxlength="125">
|
||||||
|
<label for="po_cnt<?php echo $i ?>">항목 <?php echo $i ?> 투표수</label>
|
||||||
|
<input type="text" name="po_cnt<?php echo $i ?>" value="<?php echo $po['po_cnt'.$i] ?>" id="po_cnt<?php echo $i ?>" class="frm_input" size="3">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_etc">기타의견</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('기타 의견을 남길 수 있도록 하려면, 간단한 질문을 입력하세요.') ?>
|
||||||
|
<input type="text" name="po_etc" value="<?php echo get_text($po['po_etc']) ?>" id="po_etc" class="frm_input" size="80" maxlength="125">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_level">투표가능 회원레벨</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help("레벨을 1로 설정하면 손님도 투표할 수 있습니다.") ?>
|
||||||
|
<?php echo get_member_level_select('po_level', 1, 10, $po['po_level']) ?> 이상 투표할 수 있음
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_point">포인트</label></th>
|
||||||
|
<td>
|
||||||
|
<?php echo help('투표에 참여한 회원에게 포인트를 부여합니다.') ?>
|
||||||
|
<input type="text" name="po_point" value="<?php echo $po['po_point'] ?>" id="po_point" class="frm_input"> 점
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php if ($w == 'u') { ?>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_date">투표시작일</label></th>
|
||||||
|
<td><input type="text" name="po_date" value="<?php echo $po['po_date'] ?>" id="po_date" class="frm_input" maxlength="10"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="po_ips">투표참가 IP</label></th>
|
||||||
|
<td><textarea name="po_ips" id="po_ips" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['po_ips']) ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row"><label for="mb_ids">투표참가 회원</label></th>
|
||||||
|
<td><textarea name="mb_ids" id="mb_ids" readonly rows="10"><?php echo preg_replace("/\n/", " / ", $po['mb_ids']) ?></textarea></td>
|
||||||
|
</tr>
|
||||||
|
<?php } ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<p>
|
||||||
|
작성하신 내용을 제출하시려면 <strong>확인</strong> 버튼을, 작성을 취소하고 목록으로 돌아가시려면 <strong>목록</strong> 링크를 누르세요.
|
||||||
|
</p>
|
||||||
|
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||||
|
<a href="./poll_list.php?<?php echo $qstr ?>">목록</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
70
adm/poll_form_update.php
Normal file
70
adm/poll_form_update.php
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200900";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
$w = $_POST['w'];
|
||||||
|
if ($w == 'u' || $w == 'd')
|
||||||
|
check_demo();
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
|
check_token();
|
||||||
|
|
||||||
|
if ($w == '')
|
||||||
|
{
|
||||||
|
$sql = " insert {$g5['poll_table']}
|
||||||
|
( po_subject, po_poll1, po_poll2, po_poll3, po_poll4, po_poll5, po_poll6, po_poll7, po_poll8, po_poll9, po_cnt1, po_cnt2, po_cnt3, po_cnt4, po_cnt5, po_cnt6, po_cnt7, po_cnt8, po_cnt9, po_etc, po_level, po_point, po_date )
|
||||||
|
values ( '{$_POST['po_subject']}', '{$_POST['po_poll1']}', '{$_POST['po_poll2']}', '{$_POST['po_poll3']}', '{$_POST['po_poll4']}', '{$_POST['po_poll5']}', '{$_POST['po_poll6']}', '{$_POST['po_poll7']}', '{$_POST['po_poll8']}', '{$_POST['po_poll9']}', '{$_POST['po_cnt1']}', '{$_POST['po_cnt2']}', '{$_POST['po_cnt3']}', '{$_POST['po_cnt4']}', '{$_POST['po_cnt5']}', '{$_POST['po_cnt6']}', '{$_POST['po_cnt7']}', '{$_POST['po_cnt8']}', '{$_POST['po_cnt9']}', '{$_POST['po_etc']}', '{$_POST['po_level']}', '{$_POST['po_point']}', '".G5_TIME_YMDHIS."' ) ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
$po_id = mysql_insert_id();
|
||||||
|
}
|
||||||
|
else if ($w == 'u')
|
||||||
|
{
|
||||||
|
$sql = " update {$g5['poll_table']}
|
||||||
|
set po_subject = '{$_POST['po_subject']}',
|
||||||
|
po_poll1 = '{$_POST['po_poll1']}',
|
||||||
|
po_poll2 = '{$_POST['po_poll2']}',
|
||||||
|
po_poll3 = '{$_POST['po_poll3']}',
|
||||||
|
po_poll4 = '{$_POST['po_poll4']}',
|
||||||
|
po_poll5 = '{$_POST['po_poll5']}',
|
||||||
|
po_poll6 = '{$_POST['po_poll6']}',
|
||||||
|
po_poll7 = '{$_POST['po_poll7']}',
|
||||||
|
po_poll8 = '{$_POST['po_poll8']}',
|
||||||
|
po_poll9 = '{$_POST['po_poll9']}',
|
||||||
|
po_cnt1 = '{$_POST['po_cnt1']}',
|
||||||
|
po_cnt2 = '{$_POST['po_cnt2']}',
|
||||||
|
po_cnt3 = '{$_POST['po_cnt3']}',
|
||||||
|
po_cnt4 = '{$_POST['po_cnt4']}',
|
||||||
|
po_cnt5 = '{$_POST['po_cnt5']}',
|
||||||
|
po_cnt6 = '{$_POST['po_cnt6']}',
|
||||||
|
po_cnt7 = '{$_POST['po_cnt7']}',
|
||||||
|
po_cnt8 = '{$_POST['po_cnt8']}',
|
||||||
|
po_cnt9 = '{$_POST['po_cnt9']}',
|
||||||
|
po_etc = '{$_POST['po_etc']}',
|
||||||
|
po_level = '{$_POST['po_level']}',
|
||||||
|
po_point = '{$_POST['po_point']}',
|
||||||
|
po_date = '{$_POST['po_date']}'
|
||||||
|
where po_id = '{$_POST['po_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
else if ($w == 'd')
|
||||||
|
{
|
||||||
|
$sql = " delete from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
|
||||||
|
$sql = " delete from {$g5['poll_etc_table']} where po_id = '{$_POST['po_id']}' ";
|
||||||
|
sql_query($sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 가장 큰 투표번호를 기본환경설정에 저장하여
|
||||||
|
// 투표번호를 넘겨주지 않았을 경우
|
||||||
|
// 가장 큰 투표번호를 구해야 하는 쿼리를 대체한다
|
||||||
|
$row = sql_fetch(" select max(po_id) as max_po_id from {$g5['poll_table']} ");
|
||||||
|
sql_query(" update {$g5['config_table']} set cf_max_po_id = '{$row['max_po_id']}' ");
|
||||||
|
|
||||||
|
if ($w == 'd')
|
||||||
|
goto_url('./poll_list.php?'.$qstr);
|
||||||
|
else
|
||||||
|
goto_url('./poll_form.php?w=u&po_id='.$po_id.'&'.$qstr);
|
||||||
|
?>
|
||||||
158
adm/poll_list.php
Normal file
158
adm/poll_list.php
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200900";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$token = get_token();
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['poll_table']} ";
|
||||||
|
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
if ($stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
default :
|
||||||
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$sql_search .= " ) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$sst) {
|
||||||
|
$sst = "po_id";
|
||||||
|
$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 *
|
||||||
|
{$sql_common}
|
||||||
|
{$sql_search}
|
||||||
|
{$sql_order}
|
||||||
|
limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
$listall = '';
|
||||||
|
if ($sfl || $stx) // 검색렬일 때만 처음 버튼을 보여줌
|
||||||
|
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||||
|
|
||||||
|
$g5['title'] = '투표관리';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 6;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<form id="fsearch" name="fsearch" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>투표검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
투표수 : <?php echo number_format($total_count) ?>개
|
||||||
|
</span>
|
||||||
|
<select name="sfl" id="sfl" title="검색대상">
|
||||||
|
<option value="po_subject"<?php echo get_selected($_GET['sfl'], "po_subject"); ?>>제목</option>
|
||||||
|
</select>
|
||||||
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
|
<input type="submit" class="btn_submit" value="검색">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>투표목록</h2>
|
||||||
|
|
||||||
|
<div class="btn_add">
|
||||||
|
<a href="./poll_form.php" id="poll_add">투표 추가</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<form name="fpolllist" id="fpolllist" action="./poll_delete.php" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 투표 전체선택" onclick="check_all(this.form)"></th>
|
||||||
|
<th scope="col">번호</th>
|
||||||
|
<th scope="col">제목</th>
|
||||||
|
<th scope="col">투표권한</th>
|
||||||
|
<th scope="col">투표수</th>
|
||||||
|
<th scope="col">기타의견</th>
|
||||||
|
<th scope="col">관리</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$sql2 = " select sum(po_cnt1+po_cnt2+po_cnt3+po_cnt4+po_cnt5+po_cnt6+po_cnt7+po_cnt8+po_cnt9) as sum_po_cnt from {$g5['poll_table']} where po_id = '{$row['po_id']}' ";
|
||||||
|
$row2 = sql_fetch($sql2);
|
||||||
|
$po_etc = ($row['po_etc']) ? "사용" : "미사용";
|
||||||
|
|
||||||
|
$s_mod = '<a href="./poll_form.php?'.$qstr.'&w=u&po_id='.$row['po_id'].'">수정</a>';
|
||||||
|
//$s_del = '<a href="javascript:post_delete(\'poll_form_update.php\', \''.$row['po_id'].'\');">삭제</a>';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk">
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>" title="투표선택">
|
||||||
|
</td>
|
||||||
|
<td class="td_num"><?php echo $row['po_id'] ?></td>
|
||||||
|
<td><?php echo cut_str(get_text($row['po_subject']),70) ?></td>
|
||||||
|
<td class="td_num"><?php echo $row['po_level'] ?></td>
|
||||||
|
<td class="td_num"><?php echo $row2['sum_po_cnt'] ?></td>
|
||||||
|
<td class="td_etc"><?php echo $po_etc ?></td>
|
||||||
|
<td class="td_smallmng"><?php echo $s_mod ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i==0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="btn_list">
|
||||||
|
<button type="submit">선택삭제</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('#fpolllist').submit(function() {
|
||||||
|
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once ('./admin.tail.php');
|
||||||
|
?>
|
||||||
166
adm/popular_list.php
Normal file
166
adm/popular_list.php
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300300";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
// 체크된 자료 삭제
|
||||||
|
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
|
||||||
|
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||||
|
$pp_id = $_POST['chk'][$i];
|
||||||
|
|
||||||
|
sql_query(" delete from {$g5['popular_table']} where pp_id = '$pp_id' ", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['popular_table']} a ";
|
||||||
|
$sql_search = " where (1) ";
|
||||||
|
|
||||||
|
if ($stx) {
|
||||||
|
$sql_search .= " and ( ";
|
||||||
|
switch ($sfl) {
|
||||||
|
case "pp_word" :
|
||||||
|
$sql_search .= " ({$sfl} like '{$stx}%') ";
|
||||||
|
break;
|
||||||
|
case "pp_date" :
|
||||||
|
$sql_search .= " ({$sfl} = '{$stx}') ";
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
$sql_search .= " ({$sfl} like '%{$stx}%') ";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$sql_search .= " ) ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$sst) {
|
||||||
|
$sst = "pp_id";
|
||||||
|
$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 *
|
||||||
|
{$sql_common}
|
||||||
|
{$sql_search}
|
||||||
|
{$sql_order}
|
||||||
|
limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
|
||||||
|
if (isset($stx))
|
||||||
|
$listall = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||||
|
|
||||||
|
$g5['title'] = '인기검색어관리';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 4;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var list_update_php = '';
|
||||||
|
var list_delete_php = 'popular_list.php';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<form id="fsearch" name="fsearch" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>인기검색어 검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
건수 : <?php echo number_format($total_count) ?>개
|
||||||
|
</span>
|
||||||
|
<select name="sfl" title="검색대상">
|
||||||
|
<option value="pp_word"<?php echo get_selected($_GET['sfl'], "pp_word"); ?>>검색어</option>
|
||||||
|
<option value="pp_date"<?php echo get_selected($_GET['sfl'], "pp_date"); ?>>등록일</option>
|
||||||
|
</select>
|
||||||
|
<label for="stx" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||||
|
<input type="text" name="stx" value="<?php echo $stx ?>" id="stx" required class="required frm_input">
|
||||||
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>인기검색어 목록</h2>
|
||||||
|
|
||||||
|
<form name="fpopularlist" id="fpopularlist" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
|
||||||
|
<table class="tbl_pop_list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col"><input type="checkbox" name="chkall" value="1" id="chkall" title="현재 페이지 인기검색어 전체선택" onclick="check_all(this.form)"></th>
|
||||||
|
<th scope="col"><?php echo subject_sort_link('pp_word') ?>검색어</a></th>
|
||||||
|
<th scope="col">등록일</th>
|
||||||
|
<th scope="col">등록IP</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
|
||||||
|
$word = get_text($row['pp_word']);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_chk">
|
||||||
|
<input type="checkbox" name="chk[]" value="<?php echo $row['pp_id'] ?>" id="chk_<?php echo $i ?>" title="<?php echo $word ?> 선택">
|
||||||
|
</td>
|
||||||
|
<td> <a href="<?php echo $_SERVER['PHP_SELF'] ?>?sfl=pp_word&stx=<?php echo $word ?>"><?php echo $word ?></a></td>
|
||||||
|
<td><?php echo $row['pp_date'] ?></td>
|
||||||
|
<td><?php echo $row['pp_ip'] ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<?php if ($is_admin == 'super'){ ?>
|
||||||
|
<div class="btn_list">
|
||||||
|
<button type="submit">선택삭제</button>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page="); ?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function() {
|
||||||
|
$('#fpopularlist').submit(function() {
|
||||||
|
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||||
|
if (!is_checked("chk[]")) {
|
||||||
|
alert("선택삭제 하실 항목을 하나 이상 선택하세요.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
110
adm/popular_rank.php
Normal file
110
adm/popular_rank.php
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "300400";
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||||
|
if (empty($to_date)) $to_date = G5_TIME_YMD;
|
||||||
|
|
||||||
|
$qstr = "fr_date={$fr_date}{&to_date}={$to_date}";
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['popular_table']} a ";
|
||||||
|
$sql_search = " where trim(pp_word) <> '' 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 = '<a href="'.$_SERVER['PHP_SELF'].'">전체목록</a>';
|
||||||
|
|
||||||
|
$g5['title'] = '인기검색어순위';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
$colspan = 3;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<form name="fsearch" id="fsearch" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>인기검색어 검색</legend>
|
||||||
|
<span>
|
||||||
|
<?php echo $listall ?>
|
||||||
|
건수 <?php echo number_format($total_count) ?>개
|
||||||
|
</span>
|
||||||
|
<label for="fr_date">기간설정</label>
|
||||||
|
<input type="text" name="fr_date" value="<?php echo $fr_date ?>" id="fr_date" title="구간시작일" class="frm_input" size="11" maxlength="10"> 부터
|
||||||
|
<input type="text" name="to_date" value="<?php echo $to_date ?>" id="to_date" title="구간종료일" class="frm_input" size="11" maxlength="10"> 까지
|
||||||
|
<input type="submit" class="btn_submit" value="검색">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>인기검색어 순위 및 내역</h2>
|
||||||
|
<form name="fpopularrank" id="fpopularrank" method="post">
|
||||||
|
<input type="hidden" name="sst" value="<?php echo $sst ?>">
|
||||||
|
<input type="hidden" name="sod" value="<?php echo $sod ?>">
|
||||||
|
<input type="hidden" name="sfl" value="<?php echo $sfl ?>">
|
||||||
|
<input type="hidden" name="stx" value="<?php echo $stx ?>">
|
||||||
|
<input type="hidden" name="page" value="<?php echo $page ?>">
|
||||||
|
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||||
|
<table class="tbl_pop_list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">순위</th>
|
||||||
|
<th scope="col">검색어</th>
|
||||||
|
<th scope="col">검색회수</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
|
||||||
|
$word = get_text($row['pp_word']);
|
||||||
|
$rank = ($i + 1 + ($rows * ($page - 1)));
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_num"><?php echo $rank ?></td>
|
||||||
|
<td><?php echo $word ?></td>
|
||||||
|
<td class="td_bignum"><?php echo $row['cnt'] ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
61
adm/sendmail_test.php
Normal file
61
adm/sendmail_test.php
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '100300';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
if (!$config['cf_email_use'])
|
||||||
|
alert('환경설정에서 \'메일발송 사용\'에 체크하셔야 메일을 발송할 수 있습니다.');
|
||||||
|
|
||||||
|
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||||
|
|
||||||
|
$g5['title'] = '메일 테스트';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
if (isset($_POST['email'])) {
|
||||||
|
$email = explode(',', $_POST['email']);
|
||||||
|
for ($i=0; $i<count($email); $i++)
|
||||||
|
mailer($config['cf_title'], $config['cf_admin_email'], trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>'.G5_TIME_YMDHIS.'<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
|
||||||
|
|
||||||
|
echo '<section class=\'cbox\'>';
|
||||||
|
echo '<h2>결과메세지</h2>';
|
||||||
|
echo '<p>';
|
||||||
|
echo '다음 '.count($email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
|
||||||
|
echo '</p>';
|
||||||
|
echo '<ul>';
|
||||||
|
for ($i=0;$i<count($email);$i++) {
|
||||||
|
echo '<li>'.$email[$i].'</li>';
|
||||||
|
}
|
||||||
|
echo '</ul>';
|
||||||
|
echo '<p>';
|
||||||
|
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
|
||||||
|
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
|
||||||
|
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
|
||||||
|
echo '</p>';
|
||||||
|
echo '</section>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2>테스트 메일 발송</h2>
|
||||||
|
<p>
|
||||||
|
메일서버가 정상적으로 동작 중인지 확인할 수 있습니다.<br>
|
||||||
|
아래 입력칸에 테스트 메일을 발송하실 메일 주소를 입력하시면, [메일검사] 라는 제목으로 테스트 메일을 발송합니다.<br>
|
||||||
|
</p>
|
||||||
|
<form name="fsendmailtest" method="post">
|
||||||
|
<fieldset id="fsendmailtest">
|
||||||
|
<legend>테스트메일 발송</legend>
|
||||||
|
<label for="email">받는 메일주소<strong class="sound_only">필수</strong></label>
|
||||||
|
<input type="text" name="email" value="<?php echo $member['mb_email'] ?>" id="email" required class="required email frm_input" size="80">
|
||||||
|
<input type="submit" value="발송" class="btn_submit">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
<p>
|
||||||
|
만약 [메일검사] 라는 내용으로 테스트 메일이 도착하지 않는다면 보내는 메일서버 혹은 받는 메일서버 중 문제가 발생했을 가능성이 있습니다.<br>
|
||||||
|
따라서 보다 정확한 테스트를 원하신다면 여러 곳으로 테스트 메일을 발송하시기 바랍니다.<br>
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
62
adm/session_file_delete.php
Normal file
62
adm/session_file_delete.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "100800";
|
||||||
|
include_once("./_common.php");
|
||||||
|
|
||||||
|
if ($is_admin != "super")
|
||||||
|
alert("최고관리자만 접근 가능합니다.", G5_URL);
|
||||||
|
|
||||||
|
$g5['title'] = "세션파일 일괄삭제";
|
||||||
|
include_once("./admin.head.php");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="session_del">
|
||||||
|
<p>
|
||||||
|
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
flush();
|
||||||
|
|
||||||
|
$list_tag_st = "";
|
||||||
|
$list_tag_end = "";
|
||||||
|
if (!$dir=@opendir(G5_DATA_PATH.'/session')) {
|
||||||
|
echo "<p>세션 디렉토리를 열지못했습니다.</p>";
|
||||||
|
} else {
|
||||||
|
$list_tag_st = "<ul>\n<li>완료됨</li>\n";
|
||||||
|
$list_tag_end = "</ul>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$cnt=0;
|
||||||
|
echo $list_tag_st;
|
||||||
|
while($file=readdir($dir)) {
|
||||||
|
|
||||||
|
if (!strstr($file,'sess_')) continue;
|
||||||
|
if (strpos($file,'sess_')!=0) continue;
|
||||||
|
|
||||||
|
$session_file = G5_DATA_PATH.'/session/'.$file;
|
||||||
|
|
||||||
|
if (!$atime=@fileatime($session_file)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
|
||||||
|
$cnt++;
|
||||||
|
$return = unlink($session_file);
|
||||||
|
//echo "<script>document.getElementById('ct').innerHTML += '{$session_file}<br/>';</script>\n";
|
||||||
|
echo "<li>{$session_file}</li>\n";
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if ($cnt%10==0)
|
||||||
|
//echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
|
||||||
|
echo "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo $list_tag_end;
|
||||||
|
//echo "<script>document.getElementById('ct').innerHTML += '세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
|
||||||
|
echo "<p><span>세션데이터 {$cnt}건 삭제 완료.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>\n";
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once("./admin.tail.php");
|
||||||
|
?>
|
||||||
46
adm/sql_write.sql
Normal file
46
adm/sql_write.sql
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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,
|
||||||
|
`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,
|
||||||
|
`ca_name` varchar(255) NOT NULL,
|
||||||
|
`wr_option` set('html1','html2','secret','mail') NOT NULL,
|
||||||
|
`wr_subject` varchar(255) NOT NULL,
|
||||||
|
`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,
|
||||||
|
`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,
|
||||||
|
`wr_password` varchar(255) NOT NULL,
|
||||||
|
`wr_name` varchar(255) NOT NULL,
|
||||||
|
`wr_email` varchar(255) NOT NULL,
|
||||||
|
`wr_homepage` varchar(255) NOT NULL,
|
||||||
|
`wr_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||||
|
`wr_file` tinyint(4) NOT NULL DEFAULT '0',
|
||||||
|
`wr_last` varchar(19) NOT NULL,
|
||||||
|
`wr_ip` varchar(255) NOT NULL,
|
||||||
|
`wr_facebook_user` varchar(255) NOT NULL,
|
||||||
|
`wr_twitter_user` varchar(255) NOT NULL,
|
||||||
|
`wr_me2day_user` varchar(255) NOT NULL,
|
||||||
|
`wr_1` varchar(255) NOT NULL,
|
||||||
|
`wr_2` varchar(255) NOT NULL,
|
||||||
|
`wr_3` varchar(255) NOT NULL,
|
||||||
|
`wr_4` varchar(255) NOT NULL,
|
||||||
|
`wr_5` varchar(255) NOT NULL,
|
||||||
|
`wr_6` varchar(255) NOT NULL,
|
||||||
|
`wr_7` varchar(255) NOT NULL,
|
||||||
|
`wr_8` varchar(255) NOT NULL,
|
||||||
|
`wr_9` varchar(255) NOT NULL,
|
||||||
|
`wr_10` varchar(255) NOT NULL,
|
||||||
|
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;
|
||||||
67
adm/thumbnail_file_delete.php
Normal file
67
adm/thumbnail_file_delete.php
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = '100920';
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin != 'super')
|
||||||
|
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||||
|
|
||||||
|
$g5['title'] = '썸네일 일괄삭제';
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div id="thumbnail_del">
|
||||||
|
<p>
|
||||||
|
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||||
|
</p>
|
||||||
|
<?php
|
||||||
|
$directory = array();
|
||||||
|
$dl = array('file', 'editor');
|
||||||
|
|
||||||
|
foreach($dl as $val) {
|
||||||
|
if($handle = opendir(G5_DATA_PATH.'/'.$val)) {
|
||||||
|
while(false !== ($entry = readdir($handle))) {
|
||||||
|
if($entry == '.' || $entry == '..')
|
||||||
|
continue;
|
||||||
|
|
||||||
|
$path = G5_DATA_PATH.'/'.$val.'/'.$entry;
|
||||||
|
|
||||||
|
if(is_dir($path))
|
||||||
|
$directory[] = $path;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if (empty($directory)) {
|
||||||
|
echo '<p>썸네일디렉토리를 열지못했습니다.</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$cnt=0;
|
||||||
|
echo '<ul>'.PHP_EOL;
|
||||||
|
|
||||||
|
foreach($directory as $dir) {
|
||||||
|
$files = glob($dir.'/thumb-*');
|
||||||
|
if (is_array($files)) {
|
||||||
|
foreach($files as $thumbnail) {
|
||||||
|
$cnt++;
|
||||||
|
@unlink($thumbnail);
|
||||||
|
|
||||||
|
echo '<li>'.$thumbnail.'</li>'.PHP_EOL;
|
||||||
|
|
||||||
|
flush();
|
||||||
|
|
||||||
|
if ($cnt%10==0)
|
||||||
|
echo PHP_EOL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<li>완료됨</li></ul>'.PHP_EOL;
|
||||||
|
echo '<p><span>썸네일 '.$cnt.'건의 삭제가 완료됐습니다.</span><br>프로그램의 실행을 끝마치셔도 좋습니다.</p>'.PHP_EOL;
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
47
adm/visit.sub.php
Normal file
47
adm/visit.sub.php
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
|
|
||||||
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||||
|
include_once(G5_LIB_PATH.'/visit.lib.php');
|
||||||
|
include_once('./admin.head.php');
|
||||||
|
|
||||||
|
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||||
|
if (empty($to_date)) $to_date = G5_TIME_YMD;
|
||||||
|
|
||||||
|
$qstr = "fr_date=".$fr_date."&to_date=".$to_date;
|
||||||
|
$query_string = $qstr ? '?'.$qstr : '';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<ul class="anchor">
|
||||||
|
<li><a href="./visit_list.php<?php echo $query_string ?>">접속자</a></li>
|
||||||
|
<li><a href="./visit_domain.php<?php echo $query_string ?>">도메인</a></li>
|
||||||
|
<li><a href="./visit_browser.php<?php echo $query_string ?>">브라우저</a></li>
|
||||||
|
<li><a href="./visit_os.php<?php echo $query_string ?>">운영체제</a></li>
|
||||||
|
<li><a href="./visit_hour.php<?php echo $query_string ?>">시간</a></li>
|
||||||
|
<li><a href="./visit_week.php<?php echo $query_string ?>">요일</a></li>
|
||||||
|
<li><a href="./visit_date.php<?php echo $query_string ?>">일</a></li>
|
||||||
|
<li><a href="./visit_month.php<?php echo $query_string ?>">월</a></li>
|
||||||
|
<li><a href="./visit_year.php<?php echo $query_string ?>">년</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<form name="fvisit" id="fvisit" method="get">
|
||||||
|
<fieldset>
|
||||||
|
<legend>기간별 접속자집계 검색</legend>
|
||||||
|
<input type="text" name="fr_date" value="<?php echo $fr_date ?>" id="fr_date" class="frm_input" size="11" maxlength="10"> 부터
|
||||||
|
<input type="text" name="to_date" value="<?php echo $to_date ?>" id="to_date" class="frm_input" size="11" maxlength="10"> 까지
|
||||||
|
<input type="submit" value="검색" class="btn_submit">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(function(){
|
||||||
|
$("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" });
|
||||||
|
});
|
||||||
|
|
||||||
|
function fvisit_submit(act)
|
||||||
|
{
|
||||||
|
var f = document.fvisit;
|
||||||
|
f.action = act;
|
||||||
|
f.submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
94
adm/visit_browser.php
Normal file
94
adm/visit_browser.php
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '브라우저별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 5;
|
||||||
|
|
||||||
|
$max = 0;
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select * from {$g5['visit_table']}
|
||||||
|
where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
while ($row=sql_fetch_array($result)) {
|
||||||
|
$s = get_brow($row['vi_agent']);
|
||||||
|
|
||||||
|
$arr[$s]++;
|
||||||
|
|
||||||
|
if ($arr[$s] > $max) $max = $arr[$s];
|
||||||
|
|
||||||
|
$sum_count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>브라우저별 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">순위</th>
|
||||||
|
<th scope="col">브라우저</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">합계</td>
|
||||||
|
<td><strong><?php echo $sum_count ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
$k = 0;
|
||||||
|
$save_count = -1;
|
||||||
|
$tot_count = 0;
|
||||||
|
if (count($arr)) {
|
||||||
|
arsort($arr);
|
||||||
|
foreach ($arr as $key=>$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);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_num"><?php echo $no ?></td>
|
||||||
|
<td class="td_category"><?php echo $key ?></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo $count ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
84
adm/visit_date.php
Normal file
84
adm/visit_date.php
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '일별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 4;
|
||||||
|
|
||||||
|
$max = 0;
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select vs_date, vs_count as cnt
|
||||||
|
from {$g5['visit_sum_table']}
|
||||||
|
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||||
|
order by vs_date desc ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$arr[$row['vs_date']] = $row['cnt'];
|
||||||
|
|
||||||
|
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||||
|
|
||||||
|
$sum_count += $row['cnt'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>일별 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">년-월-일</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">합계</td>
|
||||||
|
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
$k = 0;
|
||||||
|
$save_count = -1;
|
||||||
|
$tot_count = 0;
|
||||||
|
if (count($arr)) {
|
||||||
|
foreach ($arr as $key=>$value) {
|
||||||
|
$count = $value;
|
||||||
|
|
||||||
|
$rate = ($count / $sum_count * 100);
|
||||||
|
$s_rate = number_format($rate, 1);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><a href="./visit_list.php?fr_date=<?php echo $key ?>&to_date=<?php echo $key ?>"><?php echo $key ?></a></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo number_format($value) ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
103
adm/visit_domain.php
Normal file
103
adm/visit_domain.php
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '도메인별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 5;
|
||||||
|
|
||||||
|
$max = 0;
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select * from {$g5['visit_table']}
|
||||||
|
where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
while ($row=sql_fetch_array($result)) {
|
||||||
|
$str = $row['vi_referer'];
|
||||||
|
preg_match("/^http[s]*:\/\/([\.\-\_0-9a-zA-Z]*)\//", $str, $match);
|
||||||
|
$s = $match[1];
|
||||||
|
$s = preg_replace("/^(www\.|search\.|dirsearch\.|dir\.search\.|dir\.|kr\.search\.|myhome\.)(.*)/", "\\2", $s);
|
||||||
|
$arr[$s]++;
|
||||||
|
|
||||||
|
if ($arr[$s] > $max) $max = $arr[$s];
|
||||||
|
|
||||||
|
$sum_count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>도메인별 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">순위</th>
|
||||||
|
<th scope="col">접속 도메인</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">합계</td>
|
||||||
|
<td><strong><?php echo $sum_count ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
$k = 0;
|
||||||
|
$save_count = -1;
|
||||||
|
$tot_count = 0;
|
||||||
|
if (count($arr)) {
|
||||||
|
arsort($arr);
|
||||||
|
foreach ($arr as $key=>$value) {
|
||||||
|
$count = $arr[$key];
|
||||||
|
if ($save_count != $count) {
|
||||||
|
$i++;
|
||||||
|
$no = $i;
|
||||||
|
$save_count = $count;
|
||||||
|
} else {
|
||||||
|
$no = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$key) {
|
||||||
|
$link = '';
|
||||||
|
$link2 = '';
|
||||||
|
$key = '직접';
|
||||||
|
} else {
|
||||||
|
$link = '<a href="./visit_list.php?'.$qstr.'&domain='.$key.'">';
|
||||||
|
$link2 = '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
$rate = ($count / $sum_count * 100);
|
||||||
|
$s_rate = number_format($rate, 1);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="td_num"><?php echo $no ?></td>
|
||||||
|
<td class="td_category"><?php echo $link ?><?php echo $key ?><?php echo $link2 ?></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo $count ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
81
adm/visit_hour.php
Normal file
81
adm/visit_hour.php
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '시간별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 4;
|
||||||
|
|
||||||
|
$max = 0;
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select SUBSTRING(vi_time,1,2) as vi_hour, count(vi_id) as cnt
|
||||||
|
from {$g5['visit_table']}
|
||||||
|
where vi_date between '{$fr_date}' and '{$to_date}'
|
||||||
|
group by vi_hour
|
||||||
|
order by vi_hour ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$arr[$row['vi_hour']] = $row['cnt'];
|
||||||
|
|
||||||
|
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||||
|
|
||||||
|
$sum_count += $row['cnt'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>시간대별 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">시간</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">합계</td>
|
||||||
|
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$k = 0;
|
||||||
|
if ($i) {
|
||||||
|
for ($i=0; $i<24; $i++) {
|
||||||
|
$hour = sprintf("%02d", $i);
|
||||||
|
$count = (int)$arr[$hour];
|
||||||
|
|
||||||
|
$rate = ($count / $sum_count * 100);
|
||||||
|
$s_rate = number_format($rate, 1);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><?php echo $hour ?></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo number_format($count) ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
110
adm/visit_list.php
Normal file
110
adm/visit_list.php
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 5;
|
||||||
|
|
||||||
|
$sql_common = " from {$g5['visit_table']} ";
|
||||||
|
$sql_search = " where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||||
|
if (isset($domain))
|
||||||
|
$sql_search .= " and vi_referer like '%{$domain}%' ";
|
||||||
|
|
||||||
|
$sql = " select count(*) as cnt
|
||||||
|
{$sql_common}
|
||||||
|
{$sql_search} ";
|
||||||
|
$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 *
|
||||||
|
{$sql_common}
|
||||||
|
{$sql_search}
|
||||||
|
order by vi_id desc
|
||||||
|
limit {$from_record}, {$rows} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>접속자 개요</h2>
|
||||||
|
<p>IP, 경로, 브라우저, 운영체제, 일시</p>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">IP</th>
|
||||||
|
<th scope="col">접속 경로</th>
|
||||||
|
<th scope="col">브라우저</th>
|
||||||
|
<th scope="col">운영체제</th>
|
||||||
|
<th scope="col">일시</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$brow = get_brow($row['vi_agent']);
|
||||||
|
$os = get_os($row['vi_agent']);
|
||||||
|
|
||||||
|
$link = '';
|
||||||
|
$link2 = '';
|
||||||
|
$referer = '';
|
||||||
|
$title = '';
|
||||||
|
if ($row['vi_referer']) {
|
||||||
|
|
||||||
|
$referer = get_text(cut_str($row['vi_referer'], 255, ''));
|
||||||
|
$referer = urldecode($referer);
|
||||||
|
|
||||||
|
if (!is_utf8($referer)) {
|
||||||
|
$referer = iconv_utf8($referer);
|
||||||
|
}
|
||||||
|
|
||||||
|
$title = str_replace(array('<', '>', '&'), array("<", ">", "&"), $referer);
|
||||||
|
$link = '<a href="'.$row['vi_referer'].'" target="_blank">';
|
||||||
|
$link = str_replace('&', "&", $link);
|
||||||
|
$link2 = '</a>';
|
||||||
|
}
|
||||||
|
|
||||||
|
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 = '<span title="'.$row['vi_agent'].'">'.$brow.'</span>'; }
|
||||||
|
if ($os == '기타') { $os = '<span title="'.$row['vi_agent'].'">'.$os.'</span>'; }
|
||||||
|
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><?php echo $ip ?></td>
|
||||||
|
<td><?php echo $link ?><?php echo $title ?><?php echo $link2 ?></td>
|
||||||
|
<td class="td_category"><?php echo $brow ?></td>
|
||||||
|
<td class="td_category"><?php echo $os ?></td>
|
||||||
|
<td class="td_time"><?php echo $row['vi_date'] ?> <?php echo $row['vi_time'] ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
if ($i == 0)
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (isset($domain))
|
||||||
|
$qstr .= "&domain=$domain";
|
||||||
|
$qstr .= "&page=";
|
||||||
|
|
||||||
|
$pagelist = get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr");
|
||||||
|
echo $pagelist;
|
||||||
|
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
88
adm/visit_month.php
Normal file
88
adm/visit_month.php
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '월별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 4;
|
||||||
|
|
||||||
|
$max = 0;
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select SUBSTRING(vs_date,1,7) as vs_month, SUM(vs_count) as cnt
|
||||||
|
from {$g5['visit_sum_table']}
|
||||||
|
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||||
|
group by vs_month
|
||||||
|
order by vs_month desc ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$arr[$row['vs_month']] = $row['cnt'];
|
||||||
|
|
||||||
|
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||||
|
|
||||||
|
$sum_count += $row['cnt'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>월별 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">년-월</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">합계</td>
|
||||||
|
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
$k = 0;
|
||||||
|
$save_count = -1;
|
||||||
|
$tot_count = 0;
|
||||||
|
if (count($arr)) {
|
||||||
|
foreach ($arr as $key=>$value) {
|
||||||
|
$count = $value;
|
||||||
|
|
||||||
|
$rate = ($count / $sum_count * 100);
|
||||||
|
$s_rate = number_format($rate, 1);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><a href="./visit_date.php?fr_date=<?php echo $key ?>-01&to_date=<?php echo $key ?>-31"><?php echo $key ?></a></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo number_format($value) ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
98
adm/visit_os.php
Normal file
98
adm/visit_os.php
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = 'OS별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 5;
|
||||||
|
|
||||||
|
$max = 0;
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select * from {$g5['visit_table']}
|
||||||
|
where vi_date between '$fr_date' and '$to_date' ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
while ($row=sql_fetch_array($result)) {
|
||||||
|
$s = get_os($row['vi_agent']);
|
||||||
|
|
||||||
|
$arr[$s]++;
|
||||||
|
|
||||||
|
if ($arr[$s] > $max) $max = $arr[$s];
|
||||||
|
|
||||||
|
$sum_count++;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>운영체제별 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">순위</th>
|
||||||
|
<th scope="col">OS</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="3">합계</td>
|
||||||
|
<td><strong><?php echo $sum_count ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
$k = 0;
|
||||||
|
$save_count = -1;
|
||||||
|
$tot_count = 0;
|
||||||
|
if (count($arr)) {
|
||||||
|
arsort($arr);
|
||||||
|
foreach ($arr as $key=>$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);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_num"><?php echo $no ?></td>
|
||||||
|
<td class="td_category"><?php echo $key ?></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo $count ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
80
adm/visit_week.php
Normal file
80
adm/visit_week.php
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '요일별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 4;
|
||||||
|
$weekday = array ('월', '화', '수', '목', '금', '토', '일');
|
||||||
|
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select WEEKDAY(vs_date) as weekday_date, SUM(vs_count) as cnt
|
||||||
|
from {$g5['visit_sum_table']}
|
||||||
|
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||||
|
group by weekday_date
|
||||||
|
order by weekday_date ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$arr[$row['weekday_date']] = $row['cnt'];
|
||||||
|
|
||||||
|
$sum_count += $row['cnt'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>요일별 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">요일</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">합계</td>
|
||||||
|
<td><strong><?php echo $sum_count ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$k = 0;
|
||||||
|
if ($i) {
|
||||||
|
for ($i=0; $i<7; $i++) {
|
||||||
|
$count = (int)$arr[$i];
|
||||||
|
|
||||||
|
$rate = ($count / $sum_count * 100);
|
||||||
|
$s_rate = number_format($rate, 1);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><?php echo $weekday[$i] ?></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo $count ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
85
adm/visit_year.php
Normal file
85
adm/visit_year.php
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
$sub_menu = "200800";
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
|
$g5['title'] = '연도별 접속자집계';
|
||||||
|
include_once('./visit.sub.php');
|
||||||
|
|
||||||
|
$colspan = 4;
|
||||||
|
|
||||||
|
$max = 0;
|
||||||
|
$sum_count = 0;
|
||||||
|
$sql = " select SUBSTRING(vs_date,1,4) as vs_year, SUM(vs_count) as cnt
|
||||||
|
from {$g5['visit_sum_table']}
|
||||||
|
where vs_date between '{$fr_date}' and '{$to_date}'
|
||||||
|
group by vs_year
|
||||||
|
order by vs_year desc ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$arr[$row['vs_year']] = $row['cnt'];
|
||||||
|
|
||||||
|
if ($row['cnt'] > $max) $max = $row['cnt'];
|
||||||
|
|
||||||
|
$sum_count += $row['cnt'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<section class="cbox">
|
||||||
|
<h2>연간 접속자 수</h2>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th scope="col">년</th>
|
||||||
|
<th scope="col">그래프</th>
|
||||||
|
<th scope="col">접속자수</th>
|
||||||
|
<th scope="col">비율(%)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">합계</td>
|
||||||
|
<td><strong><?php echo number_format($sum_count) ?></strong></td>
|
||||||
|
<td>100%</td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
$i = 0;
|
||||||
|
$k = 0;
|
||||||
|
$save_count = -1;
|
||||||
|
$tot_count = 0;
|
||||||
|
if (count($arr)) {
|
||||||
|
foreach ($arr as $key=>$value) {
|
||||||
|
$count = $value;
|
||||||
|
|
||||||
|
$rate = ($count / $sum_count * 100);
|
||||||
|
$s_rate = number_format($rate, 1);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="td_category"><a href="./visit_month.php?fr_date=<?php echo $key ?>-01-01&to_date=<?php echo $key ?>-12-31"><?php echo $key ?></a></td>
|
||||||
|
<td>
|
||||||
|
<div class="visit_bar">
|
||||||
|
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td class="td_bignum"><?php echo number_format($value) ?></td>
|
||||||
|
<td class="td_num"><?php echo $s_rate ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once('./admin.tail.php');
|
||||||
|
?>
|
||||||
3
bbs/_common.php
Normal file
3
bbs/_common.php
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
include_once('../common.php');
|
||||||
|
?>
|
||||||
4
bbs/_head.php
Normal file
4
bbs/_head.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
include_once(G5_PATH.'/_head.php');
|
||||||
|
?>
|
||||||
4
bbs/_head.sub.php
Normal file
4
bbs/_head.sub.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
?>
|
||||||
4
bbs/_tail.php
Normal file
4
bbs/_tail.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
include_once(G5_PATH.'/_tail.php');
|
||||||
|
?>
|
||||||
4
bbs/_tail.sub.php
Normal file
4
bbs/_tail.sub.php
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
20
bbs/ajax.autosave.php
Normal file
20
bbs/ajax.autosave.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if (!$is_member) die('0');
|
||||||
|
|
||||||
|
$uid = escape_trim($_REQUEST['uid']);
|
||||||
|
$subject = escape_trim(stripslashes($_REQUEST['subject']));
|
||||||
|
$content = escape_trim(stripslashes($_REQUEST['content']));
|
||||||
|
|
||||||
|
if ($subject && $content) {
|
||||||
|
$sql = " select count(*) as cnt from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' and as_subject = '$subject' and as_content = '$content' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if (!$row['cnt']) {
|
||||||
|
$sql = " insert into {$g5['autosave_table']} set mb_id = '{$member['mb_id']}', as_uid = '{$uid}', as_subject = '$subject', as_content = '$content', as_datetime = '".G5_TIME_YMDHIS."' on duplicate key update as_subject = '$subject', as_content = '$content', as_datetime = '".G5_TIME_YMDHIS."' ";
|
||||||
|
$result = sql_query($sql, false);
|
||||||
|
|
||||||
|
echo autosave_count($member['mb_id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
15
bbs/ajax.autosavedel.php
Normal file
15
bbs/ajax.autosavedel.php
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?php
|
||||||
|
include_once("./_common.php");
|
||||||
|
|
||||||
|
if (!$is_member) die("0");
|
||||||
|
|
||||||
|
$as_id = (int)$_REQUEST['as_id'];
|
||||||
|
|
||||||
|
$sql = " delete from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' and as_id = {$as_id} ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
if (!$result) {
|
||||||
|
echo "-1";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo autosave_count($member['mb_id']);
|
||||||
|
?>
|
||||||
21
bbs/ajax.autosavelist.php
Normal file
21
bbs/ajax.autosavelist.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if (!$is_member) die('');
|
||||||
|
|
||||||
|
$sql = " select as_id, as_uid, as_subject, as_datetime from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' order by as_id desc ";
|
||||||
|
$result = sql_query($sql);
|
||||||
|
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
|
||||||
|
echo "<list>\n";
|
||||||
|
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||||
|
$subject = htmlspecialchars(utf8_strcut($row['as_subject'], 25), ENT_QUOTES);
|
||||||
|
$datetime = substr($row['as_datetime'],2,14);
|
||||||
|
echo "<item>\n";
|
||||||
|
echo "<id>{$row['as_id']}</id>\n";
|
||||||
|
echo "<uid>{$row['as_uid']}</uid>\n";
|
||||||
|
echo "<subject><![CDATA[{$subject}]]></subject>\n";
|
||||||
|
echo "<datetime>{$datetime}</datetime>\n";
|
||||||
|
echo "</item>\n";
|
||||||
|
}
|
||||||
|
echo "</list>";
|
||||||
|
?>
|
||||||
18
bbs/ajax.autosaveload.php
Normal file
18
bbs/ajax.autosaveload.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if (!$is_member) die('');
|
||||||
|
|
||||||
|
$as_id = (int)$_REQUEST['as_id'];
|
||||||
|
|
||||||
|
$sql = " select as_subject, as_content from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' and as_id = {$as_id} ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
$subject = $row['as_subject'];
|
||||||
|
$content = $row['as_content'];
|
||||||
|
|
||||||
|
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
|
||||||
|
echo "<item>\n";
|
||||||
|
echo "<subject><![CDATA[{$subject}]]></subject>\n";
|
||||||
|
echo "<content><![CDATA[{$content}]]></content>\n";
|
||||||
|
echo "</item>\n";
|
||||||
|
?>
|
||||||
31
bbs/ajax.filter.php
Normal file
31
bbs/ajax.filter.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
$subject = strtolower($_POST['subject']);
|
||||||
|
$content = strtolower(strip_tags($_POST['content']));
|
||||||
|
|
||||||
|
//$filter = explode(",", strtolower(trim($config['cf_filter'])));
|
||||||
|
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
|
||||||
|
$filter = explode(",", trim($config['cf_filter']));
|
||||||
|
for ($i=0; $i<count($filter); $i++) {
|
||||||
|
$str = $filter[$i];
|
||||||
|
|
||||||
|
// 제목 필터링 (찾으면 중지)
|
||||||
|
$subj = "";
|
||||||
|
$pos = strpos($subject, $str);
|
||||||
|
if ($pos !== false) {
|
||||||
|
$subj = $str;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 내용 필터링 (찾으면 중지)
|
||||||
|
$cont = "";
|
||||||
|
$pos = strpos($content, $str);
|
||||||
|
if ($pos !== false) {
|
||||||
|
$cont = $str;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
die("{\"subject\":\"$subj\",\"content\":\"$cont\"}");
|
||||||
|
?>
|
||||||
12
bbs/ajax.mb_email.php
Normal file
12
bbs/ajax.mb_email.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_LIB_PATH.'/register.lib.php');
|
||||||
|
|
||||||
|
$mb_email = escape_trim($_POST['reg_mb_email']);
|
||||||
|
$mb_id = escape_trim($_POST['reg_mb_id']);
|
||||||
|
|
||||||
|
if ($msg = empty_mb_email($mb_email)) die($msg);
|
||||||
|
if ($msg = valid_mb_email($mb_email)) die($msg);
|
||||||
|
if ($msg = prohibit_mb_email($mb_email)) die($msg);
|
||||||
|
if ($msg = exist_mb_email($mb_email, $mb_id)) die($msg);
|
||||||
|
?>
|
||||||
10
bbs/ajax.mb_hp.php
Normal file
10
bbs/ajax.mb_hp.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_LIB_PATH.'/register.lib.php');
|
||||||
|
|
||||||
|
$mb_hp = escape_trim($_POST['reg_mb_hp']);
|
||||||
|
$mb_id = escape_trim($_POST['reg_mb_id']);
|
||||||
|
|
||||||
|
if ($msg = valid_mb_hp($mb_hp)) die($msg);
|
||||||
|
if ($msg = exist_mb_hp($mb_hp, $mb_id)) die($msg);
|
||||||
|
?>
|
||||||
12
bbs/ajax.mb_id.php
Normal file
12
bbs/ajax.mb_id.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_LIB_PATH.'/register.lib.php');
|
||||||
|
|
||||||
|
$mb_id = escape_trim($_POST['reg_mb_id']);
|
||||||
|
|
||||||
|
if ($msg = empty_mb_id($mb_id)) die($msg);
|
||||||
|
if ($msg = valid_mb_id($mb_id)) die($msg);
|
||||||
|
if ($msg = count_mb_id($mb_id)) die($msg);
|
||||||
|
if ($msg = exist_mb_id($mb_id)) die($msg);
|
||||||
|
if ($msg = reserve_mb_id($mb_id)) die($msg);
|
||||||
|
?>
|
||||||
12
bbs/ajax.mb_nick.php
Normal file
12
bbs/ajax.mb_nick.php
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_LIB_PATH.'/register.lib.php');
|
||||||
|
|
||||||
|
$mb_nick = escape_trim($_POST['reg_mb_nick']);
|
||||||
|
$mb_id = escape_trim($_POST['reg_mb_id']);
|
||||||
|
|
||||||
|
if ($msg = empty_mb_nick($mb_nick)) die($msg);
|
||||||
|
if ($msg = valid_mb_nick($mb_nick)) die($msg);
|
||||||
|
if ($msg = count_mb_nick($mb_nick)) die($msg);
|
||||||
|
if ($msg = exist_mb_nick($mb_nick, $mb_id)) die($msg);
|
||||||
|
?>
|
||||||
13
bbs/ajax.mb_recommend.php
Normal file
13
bbs/ajax.mb_recommend.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
include_once("./_common.php");
|
||||||
|
include_once(G5_LIB_PATH."/register.lib.php");
|
||||||
|
|
||||||
|
$mb_recommend = escape_trim($_POST["reg_mb_recommend"]);
|
||||||
|
|
||||||
|
if ($msg = valid_mb_id($mb_recommend)) {
|
||||||
|
die("추천인의 아이디는 영문자, 숫자, _ 만 입력하세요.");
|
||||||
|
}
|
||||||
|
if (!($msg = exist_mb_id($mb_recommend))) {
|
||||||
|
die("입력하신 추천인은 존재하지 않는 아이디 입니다.");
|
||||||
|
}
|
||||||
|
?>
|
||||||
107
bbs/alert.php
Normal file
107
bbs/alert.php
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?php
|
||||||
|
global $lo_location;
|
||||||
|
global $lo_url;
|
||||||
|
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if($error) {
|
||||||
|
$g5['title'] = "오류안내 페이지";
|
||||||
|
} else {
|
||||||
|
$g5['title'] = "결과안내 페이지";
|
||||||
|
}
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
// 필수 입력입니다.
|
||||||
|
// 양쪽 공백 없애기
|
||||||
|
// 필수 (선택 혹은 입력)입니다.
|
||||||
|
// 전화번호 형식이 올바르지 않습니다. 하이픈(-)을 포함하여 입력하세요.
|
||||||
|
// 이메일주소 형식이 아닙니다.
|
||||||
|
// 한글이 아닙니다. (자음, 모음만 있는 한글은 처리하지 않습니다.)
|
||||||
|
// 한글이 아닙니다.
|
||||||
|
// 한글, 영문, 숫자가 아닙니다.
|
||||||
|
// 한글, 영문이 아닙니다.
|
||||||
|
// 숫자가 아닙니다.
|
||||||
|
// 영문이 아닙니다.
|
||||||
|
// 영문 또는 숫자가 아닙니다.
|
||||||
|
// 영문, 숫자, _ 가 아닙니다.
|
||||||
|
// 최소 글자 이상 입력하세요.
|
||||||
|
// 이미지 파일이 아닙니다..gif .jpg .png 파일만 가능합니다.
|
||||||
|
// 파일만 가능합니다.
|
||||||
|
// 공백이 없어야 합니다.
|
||||||
|
|
||||||
|
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||||
|
|
||||||
|
if (!$url) $url = $_SERVER['HTTP_REFERER'];
|
||||||
|
|
||||||
|
if($error) {
|
||||||
|
$header2 = "다음 항목에 오류가 있습니다.";
|
||||||
|
} else {
|
||||||
|
$header2 = "다음 내용을 확인해 주세요.";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
alert("<?php echo strip_tags($msg); ?>");
|
||||||
|
//document.location.href = "<?php echo $url; ?>";
|
||||||
|
<?php if ($url) { ?>
|
||||||
|
document.location.replace("<?php echo $url; ?>");
|
||||||
|
<?php } else { ?>
|
||||||
|
//alert('history.back();');
|
||||||
|
history.back();
|
||||||
|
<?php } ?>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<div id="validation_check">
|
||||||
|
<h1><?php echo $header2 ?></h1>
|
||||||
|
<p class="cbg">
|
||||||
|
<?php echo $msg2 ?>
|
||||||
|
</p>
|
||||||
|
<?php if($post) { ?>
|
||||||
|
<form method="post" action="<?php echo $url ?>">
|
||||||
|
<?php
|
||||||
|
foreach($_POST as $key => $value) {
|
||||||
|
if(strlen($value) < 1)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(preg_match("/pass|pwd|capt|url/", $key))
|
||||||
|
continue;
|
||||||
|
?>
|
||||||
|
<input type="hidden" name="<?php echo $key ?>" value="<?php echo $value ?>">
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<input type="submit" value="돌아가기">
|
||||||
|
</form>
|
||||||
|
<?php } else { ?>
|
||||||
|
<div class="btn_confirm">
|
||||||
|
<a href="<?php echo $url ?>">돌아가기</a>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php /*
|
||||||
|
<article id="validation_check">
|
||||||
|
<header>
|
||||||
|
<hgroup>
|
||||||
|
<!-- <h1>회원가입 정보 입력 확인</h1> --> <!-- 수행 중이던 작업 내용 -->
|
||||||
|
<h1><?php echo $header ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||||
|
<h2><?php echo $header2 ?></h2>
|
||||||
|
</hgroup>
|
||||||
|
</header>
|
||||||
|
<p>
|
||||||
|
<!-- <strong>항목</strong> 오류내역 -->
|
||||||
|
<!--
|
||||||
|
<strong>이름</strong> 필수 입력입니다. 한글만 입력할 수 있습니다.<br>
|
||||||
|
<strong>이메일</strong> 올바르게 입력하지 않았습니다.<br>
|
||||||
|
-->
|
||||||
|
<?php echo $msg2 ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="<?php echo $url ?>">돌아가기</a>
|
||||||
|
</article>
|
||||||
|
*/ ?>
|
||||||
|
</div>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
61
bbs/alert_close.php
Normal file
61
bbs/alert_close.php
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
|
||||||
|
$msg2 = str_replace("\\n", "<br>", $msg);
|
||||||
|
|
||||||
|
if($error) {
|
||||||
|
$header2 = "다음 항목에 오류가 있습니다.";
|
||||||
|
$msg3 = "새창을 닫으시고 이전 작업을 다시 시도해 주세요.";
|
||||||
|
} else {
|
||||||
|
$header2 = "다음 내용을 확인해 주세요.";
|
||||||
|
$msg3 = "새창을 닫으신 후 서비스를 이용해 주세요.";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
alert("<?php echo $msg; ?>");
|
||||||
|
window.close();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<div id="validation_check">
|
||||||
|
<h1><?php echo $header2 ?></h1>
|
||||||
|
<p class="cbg">
|
||||||
|
<?php echo $msg2 ?>
|
||||||
|
</p>
|
||||||
|
<p class="cbg">
|
||||||
|
<?php echo $msg3 ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php /*
|
||||||
|
<article id="validation_check">
|
||||||
|
<header>
|
||||||
|
<hgroup>
|
||||||
|
<!-- <h1>회원가입 정보 입력 확인</h1> --> <!-- 수행 중이던 작업 내용 -->
|
||||||
|
<h1><?php echo $header ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||||
|
<h2><?php echo $header2 ?></h2>
|
||||||
|
</hgroup>
|
||||||
|
</header>
|
||||||
|
<p>
|
||||||
|
<!-- <strong>항목</strong> 오류내역 -->
|
||||||
|
<!--
|
||||||
|
<strong>이름</strong> 필수 입력입니다. 한글만 입력할 수 있습니다.<br>
|
||||||
|
<strong>이메일</strong> 올바르게 입력하지 않았습니다.<br>
|
||||||
|
-->
|
||||||
|
<?php echo $msg2 ?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<?php echo $msg3 ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
*/ ?>
|
||||||
|
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
218
bbs/board.php
Normal file
218
bbs/board.php
Normal file
@ -0,0 +1,218 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if (!$board['bo_table']) {
|
||||||
|
alert('존재하지 않는 게시판입니다.', G5_URL);
|
||||||
|
}
|
||||||
|
|
||||||
|
check_device($board['bo_device']);
|
||||||
|
|
||||||
|
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
|
||||||
|
goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'#c_'.$wr_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$bo_table) {
|
||||||
|
$msg = "bo_table 값이 넘어오지 않았습니다.\\n\\nboard.php?bo_table=code 와 같은 방식으로 넘겨 주세요.";
|
||||||
|
alert($msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
// wr_id 값이 있으면 글읽기
|
||||||
|
if (isset($wr_id) && $wr_id) {
|
||||||
|
// 글이 없을 경우 해당 게시판 목록으로 이동
|
||||||
|
if (!$write['wr_id']) {
|
||||||
|
$msg = '글이 존재하지 않습니다.\\n\\n글이 삭제되었거나 이동된 경우입니다.';
|
||||||
|
alert($msg, './board.php?bo_table='.$bo_table);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 그룹접근 사용
|
||||||
|
if (isset($group['gr_use_access']) && $group['gr_use_access']) {
|
||||||
|
if ($is_guest) {
|
||||||
|
$msg = "비회원은 이 게시판에 접근할 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.";
|
||||||
|
alert($msg, './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 그룹관리자 이상이라면 통과
|
||||||
|
if ($is_admin == "super" || $is_admin == "group") {
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
// 그룹접근
|
||||||
|
$sql = " select count(*) as cnt from {$g5['group_member_table']} where gr_id = '{$board['gr_id']}' and mb_id = '{$member['mb_id']}' ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if (!$row['cnt']) {
|
||||||
|
alert("접근 권한이 없으므로 글읽기가 불가합니다.\\n\\n궁금하신 사항은 관리자에게 문의 바랍니다.", G5_URL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 로그인된 회원의 권한이 설정된 읽기 권한보다 작다면
|
||||||
|
if ($member['mb_level'] < $board['bo_read_level']) {
|
||||||
|
if ($is_member)
|
||||||
|
alert('글을 읽을 권한이 없습니다.', G5_URL);
|
||||||
|
else
|
||||||
|
alert('글을 읽을 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 본인확인을 사용한다면
|
||||||
|
if ($config['cf_cert_use'] && !$is_admin) {
|
||||||
|
// 인증된 회원만 가능
|
||||||
|
if ($board['bo_use_cert'] != '' && $is_guest) {
|
||||||
|
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($board['bo_use_cert'] == 'cert' && !$member['mb_certify']) {
|
||||||
|
alert('이 게시판은 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원정보 수정에서 본인확인을 해주시기 바랍니다.', G5_URL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($board['bo_use_cert'] == 'adult' && !$member['mb_adult']) {
|
||||||
|
alert('이 게시판은 본인확인으로 성인인증 된 회원님만 글읽기가 가능합니다.\\n\\n현재 성인인데 글읽기가 안된다면 회원정보 수정에서 본인확인을 다시 해주시기 바랍니다.', G5_URL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($board['bo_use_cert'] == 'hp-cert' && $member['mb_certify'] != 'hp') {
|
||||||
|
alert('이 게시판은 휴대폰 본인확인 하신 회원님만 글읽기가 가능합니다.\\n\\n회원정보 수정에서 휴대폰 본인확인을 해주시기 바랍니다.', G5_URL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($board['bo_use_cert'] == 'hp-adult' && (!$member['mb_adult'] || $member['mb_certify'] != 'hp')) {
|
||||||
|
alert('이 게시판은 휴대폰 본인확인으로 성인인증 된 회원님만 글읽기가 가능합니다.\\n\\n현재 성인인데 글읽기가 안된다면 회원정보 수정에서 휴대폰 본인확인을 다시 해주시기 바랍니다.', G5_URL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 자신의 글이거나 관리자라면 통과
|
||||||
|
if (($write['mb_id'] && $write['mb_id'] == $member['mb_id']) || $is_admin) {
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
// 비밀글이라면
|
||||||
|
if (strstr($write['wr_option'], "secret"))
|
||||||
|
{
|
||||||
|
// 회원이 비밀글을 올리고 관리자가 답변글을 올렸을 경우
|
||||||
|
// 회원이 관리자가 올린 답변글을 바로 볼 수 없던 오류를 수정
|
||||||
|
$is_owner = false;
|
||||||
|
if ($write['wr_reply'] && $member['mb_id'])
|
||||||
|
{
|
||||||
|
$sql = " select mb_id from {$write_table}
|
||||||
|
where wr_num = '{$write['wr_num']}'
|
||||||
|
and wr_reply = ''
|
||||||
|
and wr_is_comment = 0 ";
|
||||||
|
$row = sql_fetch($sql);
|
||||||
|
if ($row['mb_id'] == $member['mb_id'])
|
||||||
|
$is_owner = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
$ss_name = 'ss_secret_'.$bo_table.'_'.$write['wr_num'];
|
||||||
|
|
||||||
|
if (!$is_owner)
|
||||||
|
{
|
||||||
|
//$ss_name = "ss_secret_{$bo_table}_{$wr_id}";
|
||||||
|
// 한번 읽은 게시물의 번호는 세션에 저장되어 있고 같은 게시물을 읽을 경우는 다시 패스워드를 묻지 않습니다.
|
||||||
|
// 이 게시물이 저장된 게시물이 아니면서 관리자가 아니라면
|
||||||
|
//if ("$bo_table|$write['wr_num']" != get_session("ss_secret"))
|
||||||
|
if (!get_session($ss_name))
|
||||||
|
goto_url('./password.php?w=s&bo_table='.$bo_table.'&wr_id='.$wr_id.$qstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
set_session($ss_name, TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 한번 읽은글은 브라우저를 닫기전까지는 카운트를 증가시키지 않음
|
||||||
|
$ss_name = 'ss_view_'.$bo_table.'_'.$wr_id;
|
||||||
|
if (!get_session($ss_name))
|
||||||
|
{
|
||||||
|
sql_query(" update {$write_table} set wr_hit = wr_hit + 1 where wr_id = '{$wr_id}' ");
|
||||||
|
|
||||||
|
// 자신의 글이면 통과
|
||||||
|
if ($write['mb_id'] && $write['mb_id'] == $member['mb_id']) {
|
||||||
|
;
|
||||||
|
} else if ($is_guest && $board['bo_read_level'] == 1 && $write['wr_ip'] == $_SERVER['REMOTE_ADDR']) {
|
||||||
|
// 비회원이면서 읽기레벨이 1이고 등록된 아이피가 같다면 자신의 글이므로 통과
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
// 글읽기 포인트가 설정되어 있다면
|
||||||
|
if ($board['bo_read_point'] && $member['mb_point'] + $board['bo_read_point'] < 0)
|
||||||
|
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글읽기('.number_format($board['bo_read_point']).')가 불가합니다.\\n\\n포인트를 모으신 후 다시 글읽기 해 주십시오.');
|
||||||
|
|
||||||
|
insert_point($member['mb_id'], $board['bo_read_point'], "{$board['bo_subject']} {$wr_id} 글읽기", $bo_table, $wr_id, '읽기');
|
||||||
|
}
|
||||||
|
|
||||||
|
set_session($ss_name, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
$g5['title'] = strip_tags(conv_subject($write['wr_subject'], 255))." > ".$board['bo_subject'];
|
||||||
|
} else {
|
||||||
|
if ($member['mb_level'] < $board['bo_list_level']) {
|
||||||
|
if ($member['mb_id'])
|
||||||
|
alert('목록을 볼 권한이 없습니다.', G5_URL);
|
||||||
|
else
|
||||||
|
alert('목록을 볼 권한이 없습니다.\\n\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?'.$qstr.'&url='.urlencode(G5_BBS_URL.'/board.php?bo_table='.$bo_table.($qstr?'&':'')));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($page) || (isset($page) && $page == 0)) $page = 1;
|
||||||
|
|
||||||
|
$g5['title'] = $board['bo_subject']." ".$page." 페이지";
|
||||||
|
}
|
||||||
|
|
||||||
|
include_once(G5_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 = G5_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<!-- 사용스킨 : {$board_skin_url} -->\n";
|
||||||
|
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
13
bbs/board_head.php
Normal file
13
bbs/board_head.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
// 게시판 관리의 상단 내용
|
||||||
|
if (G5_IS_MOBILE) {
|
||||||
|
// 모바일의 경우 설정을 따르지 않는다.
|
||||||
|
include_once('./_head.php');
|
||||||
|
echo stripslashes($board['bo_mobile_content_head']);
|
||||||
|
} else {
|
||||||
|
@include ($board['bo_include_head']);
|
||||||
|
echo stripslashes($board['bo_content_head']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
21
bbs/board_list_update.php
Normal file
21
bbs/board_list_update.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
$count = count($_POST['chk_wr_id']);
|
||||||
|
|
||||||
|
if(!$count) {
|
||||||
|
alert($_POST['btn_submit'].' 하실 항목을 하나 이상 선택하세요.');
|
||||||
|
}
|
||||||
|
|
||||||
|
if($_POST['btn_submit'] == '선택삭제') {
|
||||||
|
include './delete_all.php';
|
||||||
|
} else if($_POST['btn_submit'] == '선택복사') {
|
||||||
|
$sw = 'copy';
|
||||||
|
include './move.php';
|
||||||
|
} else if($_POST['btn_submit'] == '선택이동') {
|
||||||
|
$sw = 'move';
|
||||||
|
include './move.php';
|
||||||
|
} else {
|
||||||
|
alert('올바른 방법으로 이용해 주세요.');
|
||||||
|
}
|
||||||
|
?>
|
||||||
13
bbs/board_tail.php
Normal file
13
bbs/board_tail.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
|
||||||
|
// 게시판 관리의 하단 파일 경로
|
||||||
|
if (G5_IS_MOBILE) {
|
||||||
|
echo stripslashes($board['bo_mobile_content_tail']);
|
||||||
|
// 모바일의 경우 설정을 따르지 않는다.
|
||||||
|
include_once('./_tail.php');
|
||||||
|
} else if ($board['bo_include_tail']) {
|
||||||
|
echo stripslashes($board['bo_content_tail']);
|
||||||
|
@include ($board['bo_include_tail']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
35
bbs/confirm.php
Normal file
35
bbs/confirm.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var conf = "<?php echo strip_tags($msg); ?>";
|
||||||
|
if (confirm(conf)) {
|
||||||
|
document.location.replace("<?php echo $url1; ?>");
|
||||||
|
} else {
|
||||||
|
document.location.replace("<?php echo $url2; ?>");
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<article id="confirm_check">
|
||||||
|
<header>
|
||||||
|
<hgroup>
|
||||||
|
<h1><?php echo $header; ?></h1> <!-- 수행 중이던 작업 내용 -->
|
||||||
|
<h2>아래 내용을 확인해 주세요.</h2>
|
||||||
|
</hgroup>
|
||||||
|
</header>
|
||||||
|
<p>
|
||||||
|
<?php echo $msg; ?>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="<?php echo $url1; ?>">확인</a>
|
||||||
|
<a href="<?php echo $url2; ?>">취소</a><br><br>
|
||||||
|
<a href="<?php echo $url3; ?>">돌아가기</a>
|
||||||
|
</article>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
include_once(G5_PATH.'/tail.sub.php');
|
||||||
|
?>
|
||||||
32
bbs/current_connect.php
Normal file
32
bbs/current_connect.php
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
$g5['title'] = '현재접속자';
|
||||||
|
include_once('./_head.php');
|
||||||
|
|
||||||
|
$list = array();
|
||||||
|
|
||||||
|
$sql = " select a.mb_id, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, b.mb_point, a.lo_ip, a.lo_location, a.lo_url
|
||||||
|
from {$g5['login_table']} a left join {$g5['member_table']} b on (a.mb_id = b.mb_id)
|
||||||
|
where a.mb_id <> '{$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');
|
||||||
|
?>
|
||||||
141
bbs/delete.php
Normal file
141
bbs/delete.php
Normal file
@ -0,0 +1,141 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
if ($is_admin)
|
||||||
|
{
|
||||||
|
if (!($token && get_session('ss_delete_token') == $token))
|
||||||
|
alert('토큰 에러로 삭제 불가합니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
//$wr = sql_fetch(" select * from $write_table where wr_id = '$wr_id' ");
|
||||||
|
|
||||||
|
@include_once($board_skin_path.'/delete.head.skin.php');
|
||||||
|
|
||||||
|
if ($is_admin == 'super') // 최고관리자 통과
|
||||||
|
;
|
||||||
|
else if ($is_admin == 'group') { // 그룹관리자
|
||||||
|
$mb = get_member($write['mb_id']);
|
||||||
|
if ($member['mb_id'] != $group['gr_admin']) // 자신이 관리하는 그룹인가?
|
||||||
|
alert('자신이 관리하는 그룹의 게시판이 아니므로 삭제할 수 없습니다.');
|
||||||
|
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
|
||||||
|
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 삭제할 수 없습니다.');
|
||||||
|
} else if ($is_admin == 'board') { // 게시판관리자이면
|
||||||
|
$mb = get_member($write['mb_id']);
|
||||||
|
if ($member['mb_id'] != $board['bo_admin']) // 자신이 관리하는 게시판인가?
|
||||||
|
alert('자신이 관리하는 게시판이 아니므로 삭제할 수 없습니다.');
|
||||||
|
else if ($member['mb_level'] < $mb['mb_level']) // 자신의 레벨이 크거나 같다면 통과
|
||||||
|
alert('자신의 권한보다 높은 권한의 회원이 작성한 글은 삭제할 수 없습니다.');
|
||||||
|
} else if ($member['mb_id']) {
|
||||||
|
if ($member['mb_id'] != $write['mb_id'])
|
||||||
|
alert('자신의 글이 아니므로 삭제할 수 없습니다.');
|
||||||
|
} else {
|
||||||
|
if ($write['mb_id'])
|
||||||
|
alert('로그인 후 삭제하세요.', './login.php?url='.urlencode('./board.php?bo_table='.$bo_table.'&wr_id='.$wr_id));
|
||||||
|
else if (sql_password($wr_password) != $write['wr_password'])
|
||||||
|
alert('패스워드가 틀리므로 삭제할 수 없습니다.');
|
||||||
|
}
|
||||||
|
|
||||||
|
$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'] && !$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 {$g5['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(G5_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 {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
|
||||||
|
|
||||||
|
// syndication ping
|
||||||
|
include G5_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 {$g5['board_new_table']} where bo_table = '$bo_table' and wr_parent = '{$write['wr_id']}' ");
|
||||||
|
|
||||||
|
// 스크랩 삭제
|
||||||
|
sql_query(" delete from {$g5['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<count($notice_array); $k++)
|
||||||
|
if ((int)$write[wr_id] != (int)$notice_array[$k])
|
||||||
|
$bo_notice .= $notice_array[$k] . "\n";
|
||||||
|
$bo_notice = trim($bo_notice);
|
||||||
|
*/
|
||||||
|
$bo_notice = board_notice($board['bo_notice'], $write['wr_id']);
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");
|
||||||
|
|
||||||
|
// 글숫자 감소
|
||||||
|
if ($count_write > 0 || $count_comment > 0)
|
||||||
|
sql_query(" update {$g5['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);
|
||||||
|
?>
|
||||||
157
bbs/delete_all.php
Normal file
157
bbs/delete_all.php
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
<?php
|
||||||
|
include_once('./_common.php');
|
||||||
|
|
||||||
|
// 4.11
|
||||||
|
@include_once($board_skin_path.'/delete_all.head.skin.php');
|
||||||
|
|
||||||
|
$count_write = 0;
|
||||||
|
$count_comment = 0;
|
||||||
|
|
||||||
|
$tmp_array = array();
|
||||||
|
if ($wr_id) // 건별삭제
|
||||||
|
$tmp_array[0] = $wr_id;
|
||||||
|
else // 일괄삭제
|
||||||
|
$tmp_array = $_POST['chk_wr_id'];
|
||||||
|
|
||||||
|
|
||||||
|
// 사용자 코드 실행
|
||||||
|
@include_once($board_skin_path.'/delete_all.skin.php');
|
||||||
|
|
||||||
|
|
||||||
|
// 거꾸로 읽는 이유는 답변글부터 삭제가 되어야 하기 때문임
|
||||||
|
for ($i=count($tmp_array)-1; $i>=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, 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 {$g5['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(G5_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 {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
|
||||||
|
|
||||||
|
// syndication ping
|
||||||
|
include G5_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 {$g5['board_new_table']} where bo_table = '$bo_table' and wr_parent = '{$write['wr_id']}' ");
|
||||||
|
|
||||||
|
// 스크랩 삭제
|
||||||
|
sql_query(" delete from {$g5['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<count($notice_array); $k++)
|
||||||
|
if ((int)$write['wr_id'] != (int)$notice_array[$k])
|
||||||
|
$bo_notice .= $notice_array[$k].',';
|
||||||
|
$bo_notice = trim($bo_notice);
|
||||||
|
*/
|
||||||
|
$bo_notice = board_notice($board['bo_notice'], $write['wr_id']);
|
||||||
|
sql_query(" update {$g5['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");
|
||||||
|
$board['bo_notice'] = $bo_notice;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 글숫자 감소
|
||||||
|
if ($count_write > 0 || $count_comment > 0)
|
||||||
|
sql_query(" update {$g5['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);
|
||||||
|
?>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user