그누보드5 정식버전
This commit is contained in:
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
!.gitignore
|
||||
/.htaccess
|
||||
data/
|
||||
test/
|
||||
sirgle/
|
||||
test.php
|
||||
*.key
|
||||
*.sh
|
||||
cheditor*/
|
||||
ckeditor43/
|
||||
log/
|
||||
g5_tree/
|
||||
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');
|
||||
?>
|
||||
140
adm/admin.head.php
Normal file
140
adm/admin.head.php
Normal file
@ -0,0 +1,140 @@
|
||||
<?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) || ($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>
|
||||
<?php if(defined('G5_USE_SHOP')) { ?>
|
||||
<li><a href="<?php echo G5_ADMIN_URL ?>/shop_admin/configform.php">쇼핑몰환경</a></li>
|
||||
<li><a href="<?php echo G5_SHOP_URL ?>/">쇼핑몰</a></li>
|
||||
<?php } ?>
|
||||
<li id="tnb_logout"><a href="<?php echo G5_BBS_URL ?>/logout.php">로그아웃</a></li>
|
||||
</ul>
|
||||
|
||||
<nav id="gnb">
|
||||
<h2>관리자 주메뉴</h2>
|
||||
<?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>";
|
||||
}
|
||||
$gnb_str .= "</ul>";
|
||||
echo $gnb_str;
|
||||
?>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<?php if($sub_menu) { ?>
|
||||
<ul id="lnb">
|
||||
<?php
|
||||
$menu_key = substr($sub_menu, 0, 3);
|
||||
$nl = '';
|
||||
foreach($menu['menu'.$menu_key] as $key=>$value) {
|
||||
if($key > 0) {
|
||||
if ($is_admin != 'super' && (!array_key_exists($value[0],$auth) || !strstr($auth[$value[0]], 'r')))
|
||||
continue;
|
||||
|
||||
echo $nl.'<li><a href="'.$value[2].'">'.$value[1].'</a></li>';
|
||||
$nl = PHP_EOL;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<div id="container">
|
||||
<div id="text_size">
|
||||
<!-- font_resize('엘리먼트id', '제거할 class', '추가할 class'); -->
|
||||
<button onclick="font_resize('container', 'ts_up ts_up2', '');"><img src="<?php echo G5_ADMIN_URL ?>/img/ts01.gif" alt="기본"></button>
|
||||
<button onclick="font_resize('container', 'ts_up ts_up2', 'ts_up');"><img src="<?php echo G5_ADMIN_URL ?>/img/ts02.gif" alt="크게"></button>
|
||||
<button onclick="font_resize('container', 'ts_up ts_up2', 'ts_up2');"><img src="<?php echo G5_ADMIN_URL ?>/img/ts03.gif" alt="더크게"></button>
|
||||
</div>
|
||||
<h1><?php echo $g5['title'] ?></h1>
|
||||
74
adm/admin.js
Normal file
74
adm/admin.js
Normal file
@ -0,0 +1,74 @@
|
||||
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;
|
||||
}
|
||||
|
||||
function delete_confirm2(msg)
|
||||
{
|
||||
if(confirm(msg))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
252
adm/admin.lib.php
Normal file
252
adm/admin.lib.php
Normal file
@ -0,0 +1,252 @@
|
||||
<?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;
|
||||
}
|
||||
|
||||
|
||||
// 회원권한을 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)) {
|
||||
if (is_dir($file)) {
|
||||
$handle = opendir($file);
|
||||
while($filename = readdir($handle)) {
|
||||
if ($filename != '.' && $filename != '..')
|
||||
rm_rf($file.'/'.$filename);
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
@chmod($file, G5_DIR_PERMISSION);
|
||||
@rmdir($file);
|
||||
} else {
|
||||
@chmod($file, G5_FILE_PERMISSION);
|
||||
@unlink($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 입력 폼 안내문
|
||||
function help($help="")
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$str = '<span class="frm_info">'.str_replace("\n", "<br>", $help).'</span>';
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 출력순서
|
||||
function order_select($fld, $sel='')
|
||||
{
|
||||
$s = '<select name="'.$fld.'" id="'.$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'] = '';
|
||||
?>
|
||||
16
adm/admin.menu100.php
Normal file
16
adm/admin.menu100.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?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('', '메뉴설정', G5_ADMIN_URL.'/menu_list.php', 'cf_menu', 1),
|
||||
array('100300', '메일 테스트', G5_ADMIN_URL.'/sendmail_test.php', 'cf_mailtest'),
|
||||
array('100310', '팝업레이어관리', G5_ADMIN_URL.'/newwinlist.php', 'scf_poplayer'),
|
||||
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.'/captcha_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')
|
||||
);
|
||||
?>
|
||||
12
adm/admin.menu200.php
Normal file
12
adm/admin.menu200.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?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('200810', '접속자검색', G5_ADMIN_URL.'/visit_search.php', 'mb_search', 1),
|
||||
array('200820', '접속자로그삭제', G5_ADMIN_URL.'/visit_delete.php', 'mb_delete', 1),
|
||||
array('200200', '포인트관리', G5_ADMIN_URL.'/point_list.php', 'mb_point'),
|
||||
array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', 'mb_poll')
|
||||
);
|
||||
?>
|
||||
12
adm/admin.menu300.php
Normal file
12
adm/admin.menu300.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?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),
|
||||
array('300500', '1:1문의설정', ''.G5_ADMIN_URL.'/qa_config.php', 'qa'),
|
||||
array('300600', '내용관리', G5_ADMIN_URL.'/contentlist.php', 'scf_contents', 1),
|
||||
array('300700', 'FAQ관리', G5_ADMIN_URL.'/faqmasterlist.php', 'scf_faq', 1),
|
||||
);
|
||||
?>
|
||||
16
adm/admin.menu900.php
Normal file
16
adm/admin.menu900.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
$menu["menu900"] = array (
|
||||
array('900000', 'SMS 관리', ''.G5_SMS5_ADMIN_URL.'/config.php', 'sms5'),
|
||||
array('900100', 'SMS 기본설정', ''.G5_SMS5_ADMIN_URL.'/config.php', 'sms5_config'),
|
||||
array('900200', '회원정보업데이트', ''.G5_SMS5_ADMIN_URL.'/member_update.php', 'sms5_mb_update'),
|
||||
array('900300', '문자 보내기', ''.G5_SMS5_ADMIN_URL.'/sms_write.php', 'sms_write'),
|
||||
array('900400', '전송내역-건별', ''.G5_SMS5_ADMIN_URL.'/history_list.php', 'sms_history' , 1),
|
||||
array('900410', '전송내역-번호별', ''.G5_SMS5_ADMIN_URL.'/history_num.php', 'sms_history_num' , 1),
|
||||
array('900450', '전송내역-회원', ''.G5_SMS5_ADMIN_URL.'/history_member.php', 'sms_history_mb' , 1),
|
||||
array('900500', '이모티콘 그룹', ''.G5_SMS5_ADMIN_URL.'/form_group.php' , 'emoticon_group'),
|
||||
array('900600', '이모티콘 관리', ''.G5_SMS5_ADMIN_URL.'/form_list.php', 'emoticon_list'),
|
||||
array('900700', '휴대폰번호 그룹', ''.G5_SMS5_ADMIN_URL.'/num_group.php' , 'hp_group', 1),
|
||||
array('900800', '휴대폰번호 관리', ''.G5_SMS5_ADMIN_URL.'/num_book.php', 'hp_manage', 1),
|
||||
array('900900', '휴대폰번호 파일', ''.G5_SMS5_ADMIN_URL.'/num_book_file.php' , 'hp_file', 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 © <?php echo $_SERVER['HTTP_HOST']; ?>. 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');
|
||||
?>
|
||||
254
adm/auth_list.php
Normal file
254
adm/auth_list.php
Normal file
@ -0,0 +1,254 @@
|
||||
<?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 < 1) $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = "관리권한설정";
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 5;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
설정된 관리권한 <?php echo number_format($total_count) ?>건
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<input type="hidden" name="sfl" value="a.mb_id" id="sfl">
|
||||
|
||||
<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="검색" id="fsearch_submit" class="btn_submit">
|
||||
|
||||
</form>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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"><?php echo subject_sort_link('a.mb_id') ?>회원아이디</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
||||
<th scope="col">메뉴</th>
|
||||
<th scope="col">권한</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$is_continue = false;
|
||||
// 회원아이디가 없는 메뉴는 삭제함
|
||||
if($row['mb_id'] == '' && $row['mb_nick'] == '') {
|
||||
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
||||
$is_continue = true;
|
||||
}
|
||||
|
||||
// 메뉴번호가 바뀌는 경우에 현재 없는 저장된 메뉴는 삭제함
|
||||
if (!isset($auth_menu[$row['au_menu']]))
|
||||
{
|
||||
sql_query(" delete from {$g5['auth_table']} where au_menu = '{$row['au_menu']}' ");
|
||||
$is_continue = true;
|
||||
}
|
||||
|
||||
if($is_continue)
|
||||
continue;
|
||||
|
||||
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<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
|
||||
$count++;
|
||||
}
|
||||
|
||||
if ($count == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
<?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>
|
||||
|
||||
<?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;
|
||||
?>
|
||||
|
||||
<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">
|
||||
<h2 class="h2_frm">관리권한 추가</h2>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
다음 양식에서 회원에게 관리권한을 부여하실 수 있습니다.<br>
|
||||
권한 <strong>r</strong>은 읽기권한, <strong>w</strong>는 쓰기권한, <strong>d</strong>는 삭제권한입니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<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" 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">
|
||||
<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>
|
||||
|
||||
<div class="btn_confirm01 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'] = '게시판 복사';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<div class="new_win">
|
||||
<h1><?php echo $g5['title']; ?></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">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<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>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<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');
|
||||
?>
|
||||
201
adm/board_copy_update.php
Normal file
201
adm/board_copy_update.php
Normal file
@ -0,0 +1,201 @@
|
||||
<?php
|
||||
$sub_menu = '300100';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
$target_table = trim($_POST['target_table']);
|
||||
$target_subject = 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_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_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['bo_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_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_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);
|
||||
?>
|
||||
37
adm/board_delete.inc.php
Normal file
37
adm/board_delete.inc.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?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
|
||||
if(G5_SYNDI_USE)
|
||||
include G5_SYNDI_PATH.'/include/include.adm.board_delete.inc.php';
|
||||
?>
|
||||
1288
adm/board_form.php
Normal file
1288
adm/board_form.php
Normal file
File diff suppressed because it is too large
Load Diff
393
adm/board_form_update.php
Normal file
393
adm/board_form_update.php
Normal file
@ -0,0 +1,393 @@
|
||||
<?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_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_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(",", $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 = ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$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_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}' ";
|
||||
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_file = '{$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_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}' ";
|
||||
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
|
||||
if(G5_SYNDI_USE)
|
||||
include G5_SYNDI_PATH.'/include/include.adm.board_form_update.php';
|
||||
|
||||
goto_url("./board_form.php?w=u&bo_table={$bo_table}&{$qstr}");
|
||||
?>
|
||||
240
adm/board_list.php
Normal file
240
adm/board_list.php
Normal file
@ -0,0 +1,240 @@
|
||||
<?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 < 1) { $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '게시판관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 15;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
생성된 게시판수 <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<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">
|
||||
|
||||
</form>
|
||||
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./board_form.php" id="bo_add">게시판 추가</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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"><?php echo subject_sort_link('a.gr_id') ?>그룹</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('bo_table') ?>TABLE</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('bo_skin', '', 'desc') ?>스킨</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('bo_mobile_skin', '', 'desc') ?>모바일<br>스킨</span></a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('bo_subject') ?>제목</a></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"><?php echo subject_sort_link('bo_use_sns') ?>SNS<br>사용</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('bo_use_search') ?>검색<br>사용</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('bo_order') ?>출력<br>순서</a></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>';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<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>
|
||||
<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>
|
||||
<label for="bo_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
|
||||
<?php echo get_skin_select('board', 'bo_skin_'.$i, "bo_skin[$i]", $row['bo_skin']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<label for="bo_mobile_skin_<?php echo $i; ?>" class="sound_only">모바일 스킨</label>
|
||||
<?php echo get_mobile_skin_select('board', 'bo_mobile_skin_'.$i, "bo_mobile_skin[$i]", $row['bo_mobile_skin']); ?>
|
||||
</td>
|
||||
<td>
|
||||
<label for="bo_subject_<?php echo $i; ?>" class="sound_only">게시판 제목<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="bo_subject[<?php echo $i ?>]" value="<?php echo get_text($row['bo_subject']) ?>" id="bo_subject_<?php echo $i ?>" required class="required frm_input bo_subject full_input" size="10">
|
||||
</td>
|
||||
<td class="td_numsmall">
|
||||
<label for="bo_read_point_<?php echo $i; ?>" class="sound_only">읽기 포인트</label>
|
||||
<input type="text" name="bo_read_point[<?php echo $i ?>]" value="<?php echo $row['bo_read_point'] ?>" id="bo_read_point_<?php echo $i; ?>" class="frm_input" size="2">
|
||||
</td>
|
||||
<td class="td_numsmall">
|
||||
<label for="bo_write_point_<?php echo $i; ?>" class="sound_only">쓰기 포인트</label>
|
||||
<input type="text" name="bo_write_point[<?php echo $i ?>]" value="<?php echo $row['bo_write_point'] ?>" id="bo_write_point_<?php echo $i; ?>" class="frm_input" size="2">
|
||||
</td>
|
||||
<td class="td_numsmall">
|
||||
<label for="bo_comment_point_<?php echo $i; ?>" class="sound_only">댓글 포인트</label>
|
||||
<input type="text" name="bo_comment_point[<?php echo $i ?>]" value="<?php echo $row['bo_comment_point'] ?>" id="bo_comment_point_<?php echo $i; ?>" class="frm_input" size="2">
|
||||
</td>
|
||||
<td class="td_numsmall">
|
||||
<label for="bo_download_point_<?php echo $i; ?>" class="sound_only">다운 포인트</label>
|
||||
<input type="text" name="bo_download_point[<?php echo $i ?>]" value="<?php echo $row['bo_download_point'] ?>" id="bo_download_point_<?php echo $i; ?>" class="frm_input" size="2">
|
||||
</td>
|
||||
<td class="td_chk">
|
||||
<label for="bo_use_sns_<?php echo $i; ?>" class="sound_only">SNS 사용</label>
|
||||
<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":"" ?>>
|
||||
</td>
|
||||
<td class="td_chk">
|
||||
<label for="bo_use_search_<?php echo $i; ?>" class="sound_only">검색 사용</label>
|
||||
<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":"" ?>>
|
||||
</td>
|
||||
<td class="td_chk">
|
||||
<label for="bo_order_<?php echo $i; ?>" class="sound_only">출력 순서</label>
|
||||
<input type="text" name="bo_order[<?php echo $i ?>]" value="<?php echo $row['bo_order'] ?>" id="bo_order_<?php echo $i ?>" class="frm_input" size="2">
|
||||
</td>
|
||||
<td class="td_mngsmall">
|
||||
<label for="bo_device_<?php echo $i; ?>" class="sound_only">접속기기</label>
|
||||
<select name="bo_device[<?php echo $i ?>]" id="bo_device_<?php echo $i ?>">
|
||||
<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 class="td_mngsmall">
|
||||
<?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>
|
||||
|
||||
<div class="btn_list01 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>
|
||||
|
||||
<?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');
|
||||
?>
|
||||
72
adm/board_list_update.php
Normal file
72
adm/board_list_update.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?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_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 = trim($_POST['board_table'][$k]);
|
||||
include ('./board_delete.inc.php');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
goto_url('./board_list.php?'.$qstr);
|
||||
?>
|
||||
52
adm/board_thumbnail_delete.php
Normal file
52
adm/board_thumbnail_delete.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
$sub_menu = '300100';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if(!$board['bo_table'])
|
||||
alert('존재하지 않는 게시판입니다.');
|
||||
|
||||
$g5['title'] = $board['bo_subject'].' 게시판 썸네일 삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$dir = G5_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
$cnt = 0;
|
||||
if(is_dir($dir)) {
|
||||
echo '<ul>';
|
||||
$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 '<div class="local_desc01 local_desc"><p><strong>썸네일 '.$cnt.'건의 삭제 완료됐습니다.</strong></p></div>'.PHP_EOL;
|
||||
} else {
|
||||
echo '<p>첨부파일 디렉토리가 존재하지 않습니다.</p>';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm"><a href="./board_form.php?w=u&bo_table=<?php echo $bo_table; ?>&<?php echo $qstr; ?>">게시판 수정으로 돌아가기</a></div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
151
adm/boardgroup_form.php
Normal file
151
adm/boardgroup_form.php
Normal file
@ -0,0 +1,151 @@
|
||||
<?php
|
||||
$sub_menu = "300200";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
if ($is_admin != 'super' && $w == '') alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$html_title = '게시판그룹';
|
||||
$gr_id_attr = '';
|
||||
$sound_only = '';
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</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" <?php echo $gr_id_attr; ?> 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"><?php if ($is_admin == 'super') { ?><label for="gr_admin"><?php } ?>그룹 관리자<?php if ($is_admin == 'super') { ?></label><?php } ?></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>
|
||||
<?php for ($i=1;$i<=10;$i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td class="td_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>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" class="btn_submit" accesskey="s" value="확인">
|
||||
<a href="./boardgroup_list.php?<?php echo $qstr ?>">목록</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
게시판을 생성하시려면 1개 이상의 게시판그룹이 필요합니다.<br>
|
||||
게시판그룹을 이용하시면 더 효과적으로 게시판을 관리할 수 있습니다.
|
||||
</p>
|
||||
</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_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
|
||||
if(G5_SYNDI_USE)
|
||||
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 < 1) $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">처음</a>';
|
||||
|
||||
$g5['title'] = '게시판그룹설정';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 10;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
전체그룹 <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<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>
|
||||
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<div class="btn_add01 btn_add sort_with">
|
||||
<a href="./boardgroup_form.php" id="bo_gr_add">게시판그룹 추가</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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"><?php echo subject_sort_link('gr_id') ?>그룹아이디</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('gr_subject') ?>제목</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('gr_admin') ?>그룹관리자</a></th>
|
||||
<th scope="col">게시판</th>
|
||||
<th scope="col">접근<br>사용</th>
|
||||
<th scope="col">접근<br>회원수</th>
|
||||
<th scope="col"><?php echo subject_sort_link('gr_order') ?>출력<br>순서</a></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>';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<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 class="td_input">
|
||||
<label for="gr_subject_<?php echo $i; ?>" class="sound_only">그룹제목</label>
|
||||
<input type="text" name="gr_subject[<?php echo $i ?>]" value="<?php echo get_text($row['gr_subject']) ?>" id="gr_subject_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
<td class="td_mng td_input">
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<label for="gr_admin_<?php echo $i; ?>" class="sound_only">그룹관리자</label>
|
||||
<input type="text" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>" id="gr_admin_<?php echo $i ?>" class="frm_input" size="10" maxlength="20">
|
||||
<?php }else{ ?>
|
||||
<input type="hidden" name="gr_admin[<?php echo $i ?>]" value="<?php echo $row['gr_admin'] ?>"><?php echo $row['gr_admin'] ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td class="td_numsmall"><a href="./board_list.php?sfl=a.gr_id&stx=<?php echo $row['gr_id'] ?>"><?php echo $row2['cnt'] ?></a></td>
|
||||
<td class="td_chk">
|
||||
<label for="gr_use_access_<?php echo $i; ?>" class="sound_only">접근회원 사용</label>
|
||||
<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 ?>">
|
||||
</td>
|
||||
<td class="td_numsmall"><a href="./boardgroupmember_list.php?gr_id=<?php echo $row['gr_id'] ?>"><?php echo $row1['cnt'] ?></a></td>
|
||||
<td class="td_chk">
|
||||
<label for="gr_order_<?php echo $i; ?>" class="sound_only">메인메뉴 출력순서</label>
|
||||
<input type="text" name="gr_order[<?php echo $i ?>]" value="<?php echo $row['gr_order'] ?>" id="gr_order_<?php echo $i ?>" class="frm_input" size="2">
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<label for="gr_device_<?php echo $i; ?>" class="sound_only">접속기기</label>
|
||||
<select name="gr_device[<?php echo $i ?>]" id="gr_device_<?php echo $i ?>">
|
||||
<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_mngsmall"><?php echo $s_upd ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 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>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
접근사용 옵션을 설정하시면 관리자가 지정한 회원만 해당 그룹에 접근할 수 있습니다.<br>
|
||||
접근사용 옵션은 해당 그룹에 속한 모든 게시판에 적용됩니다.
|
||||
</p>
|
||||
</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;
|
||||
?>
|
||||
|
||||
<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');
|
||||
?>
|
||||
46
adm/boardgroup_list_update.php
Normal file
46
adm/boardgroup_list_update.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?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_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);
|
||||
?>
|
||||
130
adm/boardgroupmember_form.php
Normal file
130
adm/boardgroupmember_form.php
Normal file
@ -0,0 +1,130 @@
|
||||
<?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;
|
||||
?>
|
||||
|
||||
<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">
|
||||
<div class="local_cmd01 local_cmd">
|
||||
<p>아이디 <b><?php echo $mb['mb_id'] ?></b>, 이름 <b><?php echo $mb['mb_name'] ?></b>, 닉네임 <b><?php echo $mb['mb_nick'] ?></b></p>
|
||||
<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">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<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">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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>
|
||||
</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">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" 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 class="td_category"><?php echo $row['gr_subject'] ?></td>
|
||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">접근가능한 그룹이 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="" value="선택삭제">
|
||||
</div>
|
||||
</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');
|
||||
?>
|
||||
158
adm/boardgroupmember_list.php
Normal file
158
adm/boardgroupmember_list.php
Normal file
@ -0,0 +1,158 @@
|
||||
<?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 < 1) $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'].' 그룹 접근가능회원 (그룹아이디:'.$gr['gr_id'].')';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<input type="hidden" name="gr_id" value="<?php echo $gr_id ?>">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="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">
|
||||
</form>
|
||||
|
||||
<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">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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"><?php echo subject_sort_link('b.mb_id', 'gr_id='.$gr_id) ?>회원아이디</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('b.mb_name', 'gr_id='.$gr_id) ?>이름</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('b.mb_nick', 'gr_id='.$gr_id) ?>별명</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('b.mb_today_login', 'gr_id='.$gr_id) ?>최종접속</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('a.gm_datetime', 'gr_id='.$gr_id) ?>처리일시</a></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']);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<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_datetime"><?php echo substr($row['mb_today_login'],2,8) ?></td>
|
||||
<td class="td_datetime"><?php echo $row['gm_datetime'] ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
{
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="" value="선택삭제">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?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);
|
||||
?>
|
||||
48
adm/cache_file_delete.php
Normal file
48
adm/cache_file_delete.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
$sub_menu = '100900';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '캐시파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?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 '<div class="local_desc01 local_desc"><p><strong>최신글 캐시파일 '.$cnt.'건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
53
adm/captcha_file_delete.php
Normal file
53
adm/captcha_file_delete.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
$sub_menu = '100910';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.', G5_URL);
|
||||
|
||||
$g5['title'] = '캡챠파일 일괄삭제';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
flush();
|
||||
|
||||
if (!$dir=@opendir(G5_DATA_PATH.'/cache')) {
|
||||
echo '<p>캐시디렉토리를 열지못했습니다.</p>';
|
||||
}
|
||||
|
||||
$cnt=0;
|
||||
echo '<ul>'.PHP_EOL;
|
||||
|
||||
$files = glob(G5_DATA_PATH.'/cache/?captcha-*');
|
||||
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 '<div class="local_desc01 local_desc"><p><strong>캡챠파일 '.$cnt.'건의 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
1281
adm/config_form.php
Normal file
1281
adm/config_form.php
Normal file
File diff suppressed because it is too large
Load Diff
157
adm/config_form_update.php
Normal file
157
adm/config_form_update.php
Normal file
@ -0,0 +1,157 @@
|
||||
<?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_admin_email_name = '{$_POST['cf_admin_email_name']}',
|
||||
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_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_faq_skin = '{$_POST['cf_faq_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_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_add_meta = '{$_POST['cf_add_meta']}',
|
||||
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_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_mobile_page_rows = '{$_POST['cf_mobile_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_faq_skin = '{$_POST['cf_mobile_faq_skin']}',
|
||||
cf_mobile_member_skin = '{$_POST['cf_mobile_member_skin']}',
|
||||
cf_captcha_mp3 = '{$_POST['cf_captcha_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_lg_mid = '{$_POST['cf_lg_mid']}',
|
||||
cf_lg_mert_key = '{$_POST['cf_lg_mert_key']}',
|
||||
cf_cert_limit = '{$_POST['cf_cert_limit']}',
|
||||
cf_cert_req = '{$_POST['cf_cert_req']}',
|
||||
cf_sms_use = '{$_POST['cf_sms_use']}',
|
||||
cf_icode_id = '{$_POST['cf_icode_id']}',
|
||||
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
||||
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||
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_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);
|
||||
?>
|
||||
179
adm/contentform.php
Normal file
179
adm/contentform.php
Normal file
@ -0,0 +1,179 @@
|
||||
<?php
|
||||
$sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
// 상단, 하단 파일경로 필드 추가
|
||||
if(!sql_query(" select co_include_head from {$g5['content_table']} limit 1 ", false)) {
|
||||
$sql = " ALTER TABLE `{$g5['content_table']}` ADD `co_include_head` VARCHAR( 255 ) NOT NULL ,
|
||||
ADD `co_include_tail` VARCHAR( 255 ) NOT NULL ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
// html purifier 사용여부 필드
|
||||
if(!sql_query(" select co_tag_filter_use from {$g5['content_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['content_table']}`
|
||||
ADD `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `co_content` ", true);
|
||||
sql_query(" update {$g5['content_table']} set co_tag_filter_use = '1' ");
|
||||
}
|
||||
|
||||
$html_title = "내용";
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= " 수정";
|
||||
$readonly = " readonly";
|
||||
|
||||
$sql = " select * from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$co = sql_fetch($sql);
|
||||
if (!$co['co_id'])
|
||||
alert('등록된 자료가 없습니다.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
$co['co_html'] = 2;
|
||||
}
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="frmcontentform" action="./contentformupdate.php" onsubmit="return frmcontentform_check(this);" method="post" enctype="MULTIPART/FORM-DATA" >
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="co_html" value="1">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_id">ID</label></th>
|
||||
<td>
|
||||
<?php echo help('20자 이내의 영문자, 숫자, _ 만 가능합니다.'); ?>
|
||||
<input type="text" value="<?php echo $co['co_id']; ?>" name="co_id" id ="co_id" required <?php echo $readonly; ?> class="required <?php echo $readonly; ?> frm_input" size="20" maxlength="20">
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $co_id; ?>" class="btn_frmline">내용확인</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_subject">제목</label></th>
|
||||
<td><input type="text" name="co_subject" value="<?php echo htmlspecialchars2($co['co_subject']); ?>" id="co_subject" required class="frm_input required" size="90"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">내용</th>
|
||||
<td><?php echo editor_html('co_content', $co['co_content']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_tag_filter_use">태그 필터링 사용</label></th>
|
||||
<td>
|
||||
<?php echo help("내용에서 iframe 등의 태그를 사용하려면 사용안함으로 선택해 주십시오."); ?>
|
||||
<select name="co_tag_filter_use" id="co_tag_filter_use">
|
||||
<option value="1"<?php echo get_selected(1, $co['co_tag_filter_use']); ?>>사용함</option>
|
||||
<option value="0"<?php echo get_selected(0, $co['co_tag_filter_use']); ?>>사용안함</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help("설정값이 없으면 기본 상단 파일을 사용합니다."); ?>
|
||||
<input type="text" name="co_include_head" value="<?php echo $co['co_include_head']; ?>" id="co_include_head" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<?php echo help("설정값이 없으면 기본 하단 파일을 사용합니다."); ?>
|
||||
<input type="text" name="co_include_tail" value="<?php echo $co['co_include_tail']; ?>" id="co_include_tail" class="frm_input" size="60">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_himg">상단이미지</label></th>
|
||||
<td>
|
||||
<input type="file" name="co_himg" id="co_himg">
|
||||
<?php
|
||||
$himg = G5_DATA_PATH.'/content/'.$co['co_id'].'_h';
|
||||
if (file_exists($himg)) {
|
||||
$size = @getimagesize($himg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
$width = 750;
|
||||
else
|
||||
$width = $size[0];
|
||||
|
||||
echo '<input type="checkbox" name="co_himg_del" value="1" id="co_himg_del"> <label for="co_himg_del">삭제</label>';
|
||||
$himg_str = '<img src="'.G5_DATA_URL.'/content/'.$co['co_id'].'_h" width="'.$width.'" alt="">';
|
||||
}
|
||||
if ($himg_str) {
|
||||
echo '<div class="banner_or_img">';
|
||||
echo $himg_str;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="co_timg">하단이미지</label></th>
|
||||
<td>
|
||||
<input type="file" name="co_timg" id="co_timg">
|
||||
<?php
|
||||
$timg = G5_DATA_PATH.'/content/'.$co['co_id'].'_t';
|
||||
if (file_exists($timg)) {
|
||||
$size = @getimagesize($timg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
$width = 750;
|
||||
else
|
||||
$width = $size[0];
|
||||
|
||||
echo '<input type="checkbox" name="co_timg_del" value="1" id="co_timg_del"> <label for="co_timg_del">삭제</label>';
|
||||
$timg_str = '<img src="'.G5_DATA_URL.'/content/'.$co['co_id'].'_t" width="'.$width.'" alt="">';
|
||||
}
|
||||
if ($timg_str) {
|
||||
echo '<div class="banner_or_img">';
|
||||
echo $timg_str;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./contentlist.php">목록</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function frmcontentform_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
|
||||
<?php echo get_editor_js('co_content'); ?>
|
||||
<?php echo chk_editor_js('co_content'); ?>
|
||||
|
||||
check_field(f.co_id, "ID를 입력하세요.");
|
||||
check_field(f.co_subject, "제목을 입력하세요.");
|
||||
check_field(f.co_content, "내용을 입력하세요.");
|
||||
|
||||
if (errmsg != "") {
|
||||
alert(errmsg);
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
78
adm/contentformupdate.php
Normal file
78
adm/contentformupdate.php
Normal file
@ -0,0 +1,78 @@
|
||||
<?php
|
||||
$sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($w == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
@mkdir(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH."/content", G5_DIR_PERMISSION);
|
||||
|
||||
if ($co_himg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_h");
|
||||
if ($co_timg_del) @unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||
|
||||
$sql_common = " co_include_head = '$co_include_head',
|
||||
co_include_tail = '$co_include_tail',
|
||||
co_html = '$co_html',
|
||||
co_tag_filter_use = '$co_tag_filter_use',
|
||||
co_subject = '$co_subject',
|
||||
co_content = '$co_content' ";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
//if(eregi("[^a-z0-9_]", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
if(preg_match("/[^a-z0-9_]/i", $co_id)) alert("ID 는 영문자, 숫자, _ 만 가능합니다.");
|
||||
|
||||
$sql = " select co_id from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['co_id'])
|
||||
alert("이미 같은 ID로 등록된 내용이 있습니다.");
|
||||
|
||||
$sql = " insert {$g5['content_table']}
|
||||
set co_id = '$co_id',
|
||||
$sql_common ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
$sql = " update {$g5['content_table']}
|
||||
set $sql_common
|
||||
where co_id = '$co_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
@unlink(G5_DATA_PATH."/content/{$co_id}_h");
|
||||
@unlink(G5_DATA_PATH."/content/{$co_id}_t");
|
||||
|
||||
$sql = " delete from {$g5['content_table']} where co_id = '$co_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if ($_FILES['co_himg']['name'])
|
||||
{
|
||||
$dest_path = G5_DATA_PATH."/content/".$co_id."_h";
|
||||
@move_uploaded_file($_FILES['co_himg']['tmp_name'], $dest_path);
|
||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||
}
|
||||
if ($_FILES['co_timg']['name'])
|
||||
{
|
||||
$dest_path = G5_DATA_PATH."/content/".$co_id."_t";
|
||||
@move_uploaded_file($_FILES['co_timg']['tmp_name'], $dest_path);
|
||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
goto_url("./contentform.php?w=u&co_id=$co_id");
|
||||
}
|
||||
else
|
||||
{
|
||||
goto_url("./contentlist.php");
|
||||
}
|
||||
?>
|
||||
98
adm/contentlist.php
Normal file
98
adm/contentlist.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
$sub_menu = '300600';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
if( !isset($g5['content_table']) ){
|
||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'content_table\'] = G5_TABLE_PREFIX.\'content\';</strong> 를 추가해 주세요.');
|
||||
}
|
||||
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
|
||||
if(!sql_query(" DESCRIBE {$g5['content_table']} ", false)) {
|
||||
if(sql_query(" DESCRIBE {$g5['g5_shop_content_table']} ", false)) {
|
||||
sql_query(" ALTER TABLE {$g5['g5_shop_content_table']} RENAME TO `{$g5['content_table']}` ;", false);
|
||||
} else {
|
||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['content_table']}` (
|
||||
`co_id` varchar(20) NOT NULL DEFAULT '',
|
||||
`co_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`co_subject` varchar(255) NOT NULL DEFAULT '',
|
||||
`co_content` longtext NOT NULL,
|
||||
`co_hit` int(11) NOT NULL DEFAULT '0',
|
||||
`co_include_head` varchar(255) NOT NULL,
|
||||
`co_include_tail` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`co_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
|
||||
// 내용관리 생성
|
||||
sql_query(" insert into `{$g5['content_table']}` set co_id = 'company', co_html = '1', co_subject = '회사소개', co_content= '<p align=center><b>회사소개에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||
sql_query(" insert into `{$g5['content_table']}` set co_id = 'privacy', co_html = '1', co_subject = '개인정보 처리방침', co_content= '<p align=center><b>개인정보 처리방침에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||
sql_query(" insert into `{$g5['content_table']}` set co_id = 'provision', co_html = '1', co_subject = '서비스 이용약관', co_content= '<p align=center><b>서비스 이용약관에 대한 내용을 입력하십시오.</b></p>' ", false );
|
||||
}
|
||||
}
|
||||
|
||||
$g5['title'] = '내용관리';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$sql_common = " from {$g5['content_table']} ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = "select * $sql_common order by co_id limit $from_record, {$config['cf_page_rows']} ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php if ($page > 1) {?><a href="<?php echo $_SERVER['PHP_SELF']; ?>">처음으로</a><?php } ?>
|
||||
<span>전체 내용 <?php echo $total_count; ?>건</span>
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./contentform.php">내용 추가</a>
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_id"><?php echo $row['co_id']; ?></td>
|
||||
<td><?php echo htmlspecialchars2($row['co_subject']); ?></td>
|
||||
<td class="td_mng">
|
||||
<a href="./contentform.php?w=u&co_id=<?php echo $row['co_id']; ?>"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>수정</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/content.php?co_id=<?php echo $row['co_id']; ?>"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span> 보기</a>
|
||||
<a href="./contentformupdate.php?w=d&co_id=<?php echo $row['co_id']; ?>" onclick="return delete_confirm();"><span class="sound_only"><?php echo htmlspecialchars2($row['co_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="3" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?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 (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
689
adm/css/admin.css
Normal file
689
adm/css/admin.css
Normal file
@ -0,0 +1,689 @@
|
||||
@charset "utf-8";
|
||||
/* SIR 지운아빠 */
|
||||
|
||||
/* 초기화 */
|
||||
html {overflow-y:scroll}
|
||||
body {margin:0;padding:0;background:#fff;color:#000;font-size:0.75em;font-family:dotum}
|
||||
html, h1, h2, h3, h4, h5, h6, form, fieldset, img {margin:0;padding:0;border:0}
|
||||
h1, h2, h3, h4, h5, h6 {font-size:1em;font-family:dotum}
|
||||
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {display:block}
|
||||
header ul, nav ul, aside ul, footer ul {margin:0;padding:0;list-style:none}
|
||||
label, input, button, select, img {vertical-align:middle}
|
||||
textarea, select {font-family:dotum;font-size:1em}
|
||||
input {margin:0;padding:0;border-radius:0;font-family:dotum}
|
||||
input[type=text], input[type=password], input[type=submit], input[type=image] {-webkit-appearance:none}
|
||||
button {border-radius:0;font-size:1em;font-family:dotum;-webkit-appearance:none;cursor:pointer}
|
||||
p {margin:0;padding:0 0 10px;line-height:1.7em;word-break:break-all}
|
||||
hr {display:none}
|
||||
pre {overflow-x:scroll;font-size:1.1em}
|
||||
a {color:#000;text-decoration:none}
|
||||
a:focus, a:hover, a:active {text-decoration:underline}
|
||||
|
||||
/* 헤딩 */
|
||||
h1 {margin:0 0 10px;padding:0 20px 10px;min-width:960px;border-bottom:1px solid #e9e9e9;color:#333;font-size:1.5em;font-family:dotum;letter-spacing:-0.1em}
|
||||
h2 {margin:0 0 10px;padding:0 20px;font-size:1.2em}
|
||||
h2.h2_frm {padding-top:15px}
|
||||
|
||||
/* 레이아웃 */
|
||||
#hd {z-index:10;min-width:1000px;background:url('../img/hd_bg.jpg') #383b3f repeat-x}
|
||||
#hd h1, #hd h2 {position:absolute;border:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#hd_wrap {z-index:11;position:relative;margin:0 auto}
|
||||
#logo {position:relative;height:70px}
|
||||
#logo img {position:absolute;top:19px;left:20px}
|
||||
|
||||
#tnb {z-index:2;position:absolute;top:27px;right:20px;zoom:1}
|
||||
#tnb:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#tnb {float:right;margin:0;padding:0;zoom:1}
|
||||
#tnb:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#tnb li {float:left;margin:0 0 0 10px;padding:0 10px 0 0;border-right:1px solid #444}
|
||||
#tnb #tnb_logout {border-right:0;padding:0}
|
||||
#tnb a {display:inline-block;color:#bbb;text-decoration:none;letter-spacing:-0.1em}
|
||||
#tnb a:focus, #tnb a:hover {color:#fff}
|
||||
#tnb #tnb_logout a {color:#ff3061}
|
||||
#tnb span {position:absolute;bottom:10px;left:0;width:100%;text-align:center}
|
||||
|
||||
/* gnb */
|
||||
#gnb {position:relative;z-index:12;min-width:999px;background:#383a3f}
|
||||
#gnb h2 {margin:0;padding:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#gnb_1dul {position:relative;margin:0 20px;padding:0;zoom:1}
|
||||
#gnb_1dul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.gnb_1dli {z-index:13;position:relative;float:left;margin:0 0 0 -1px;border:1px solid #333;border-top:0;border-bottom:0}
|
||||
.gnb_1da {display:block;width:120px;height:34px;color:#fff;font-weight:bold;text-align:center;text-decoration:none;line-height:2.8em}
|
||||
.gnb_1da:focus, .gnb_1da:hover {text-decoration:none}
|
||||
.gnb_1dli_air .gnb_1da {background:#fff;color:#000}
|
||||
.gnb_1dli_on .gnb_1da {background:#282828;color:#fff}
|
||||
.gnb_2dul {display:none;position:absolute;top:34px;width:180px;border:1px solid #999;border-top:0;background:#fff}
|
||||
.gnb_2da {display:block;padding:8px 10px;background:#fff;color:#000;text-decoration:none}
|
||||
.gnb_grp_style {background:#f7f7f7 !important}
|
||||
.gnb_2da:focus, .gnb_2da:hover {background:#484848 !important;color:#fff !important;text-decoration:none}
|
||||
.gnb_1dli_air .gnb_2da {background:#fff;color:#000}
|
||||
.gnb_1dli_on .gnb_2da {background:#fff;color:#000}
|
||||
.gnb_1dli_over .gnb_2dul {display:block;left:-1px}
|
||||
.gnb_1dli_over2 .gnb_2dul {display:block;right:-1px}
|
||||
|
||||
.gnb_grp_div {border-top:1px solid #eee}
|
||||
|
||||
#lnb {margin:0;padding:15px;min-width:970px;border-bottom:1px solid #e9e9e9;list-style:none;zoom:1}
|
||||
#lnb:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#lnb li {float:left}
|
||||
#lnb a {display:inline-block;padding:0 10px;border-right:1px solid #ccc;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
/* 중간 레이아웃 */
|
||||
#wrapper {z-index:5;margin:20px 0;min-width:1000px;zoom:1}
|
||||
#wrapper:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
|
||||
#container {z-index:4;position:relative}
|
||||
|
||||
/* 텍스트 크기 조절 */
|
||||
#text_size {position:absolute;top:-6px;right:20px}
|
||||
#text_size button {margin:0;padding:0;border:0;background:transparent;cursor:pointer}
|
||||
.ts_up {font-size:1.167em !important}
|
||||
.ts_up2 {font-size:1.3em !important}
|
||||
|
||||
/* 화면낭독기 사용자용 */
|
||||
#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden}
|
||||
.msg_sound_only, .sound_only {display:inline-block !important;position:absolute;top:0;left:0;margin:0 !important;padding:0 !important;width:1px !important;height:1px !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
|
||||
/* 본문 바로가기 */
|
||||
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
|
||||
#to_content a:focus, #to_content a:active {width:100%;height:70px;background:#fff;font-size:2em;font-weight:bold;text-align:center;text-decoration:none;line-height:3.1em}
|
||||
|
||||
/* 캡챠 자동등록(입력)방지 기본 */
|
||||
#captcha img {border:1px solid #ddd;border-right:0}
|
||||
#captcha_mp3 img {border:1px solid #ddd;border-left:0;background:#494949}
|
||||
|
||||
/* ckeditor 단축키 */
|
||||
.cke_sc {margin:0 0 5px;text-align:right}
|
||||
.btn_cke_sc{display:inline-block;padding:0 10px;height:23px;border:1px solid #ccc !important;background:#fafafa !important;color:#000 !important;text-decoration:none !important;line-height:1.9em;vertical-align:middle}
|
||||
.cke_sc_def {margin:0 0 5px;padding:10px;border:1px solid #ccc;background:#f7f7f7;text-align:center}
|
||||
.cke_sc_def dl{margin:0 0 5px;text-align:left;zoom:1}
|
||||
.cke_sc_def dl:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.cke_sc_def dt, .cke_sc_def dd {float:left;margin:0;padding:5px 0;border-bottom:1px solid #e9e9e9}
|
||||
.cke_sc_def dt {width:20%;font-weight:bold}
|
||||
.cke_sc_def dd {width:30%}
|
||||
|
||||
/* 공통박스 */
|
||||
.compare_wrap {margin:0 20px 10px;zoom:1}
|
||||
.compare_wrap:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.compare_wrap section {margin:10px 0;padding-top:10px}
|
||||
.compare_wrap h3 {margin:10px 0 20px;text-align:center}
|
||||
.compare_wrap .tbl_frm {margin:0}
|
||||
.compare_wrap .frm_input {background:#fff}
|
||||
.compare_wrap .btn_confirm {padding:10px 0 0}
|
||||
.compare_left {float:left;width:49%}
|
||||
.compare_right {float:right;width:49%}
|
||||
|
||||
/* 버튼 */
|
||||
.btn_confirm {margin:0 20px 10px}
|
||||
|
||||
.btn_confirm01 {clear:both;text-align:center}
|
||||
.btn_confirm01 button {padding:0 15px;height:30px;border:0;background:#617d46;color:#fff}
|
||||
.btn_confirm01 a {display:inline-block;padding:0 15px;height:30px;background:#617d46;color:#fff;text-decoration:none;line-height:2.5em;vertical-align:middle}
|
||||
.btn_confirm01 a:focus {background:#555}
|
||||
|
||||
.btn_confirm02 {clear:both;margin-top:10px;text-align:center}
|
||||
.btn_confirm02 button {padding:0 15px;height:30px;border:0;background:#617d46;color:#fff}
|
||||
.btn_confirm02 a {display:inline-block;padding:0 15px;height:30px;background:#617d46;color:#fff;text-decoration:none;line-height:2.5em;vertical-align:middle}
|
||||
.btn_confirm02 a:focus {background:#555}
|
||||
|
||||
.btn_submit {margin:0;padding:0;border:0;background:#ff3061;color:#fff;cursor:pointer}
|
||||
.btn_confirm .btn_submit {padding:0 15px;border:0;height:30px;color:#fff}
|
||||
.btn_cancel {display:inline-block;padding:0 15px;height:30px;border:0;background:#617d46;color:#fff;text-decoration:none}
|
||||
a.btn_cancel {line-height:2.5em;vertical-align:middle}
|
||||
.btn_frmline {display:inline-block;padding:0 7px;height:24px;border:0;background:#444;color:#fff !important;letter-spacing:-0.1em;text-decoration:none;vertical-align:middle;line-height:2em} /* 우편번호검색버튼 등 */
|
||||
.btn_frmline:focus, .btn_frmline:hover, .btn_frmline:active {text-decoration:none}
|
||||
|
||||
.btn_win {margin:0 20px 10px} /* 새창용 */
|
||||
|
||||
.btn_win01 {clear:both;text-align:center}
|
||||
.btn_win01 a, .btn_win01 button {padding:0 10px;height:22px;border:1px solid #ccc;background:#fafafa}
|
||||
.btn_win01 a {display:inline-block;line-height:2em;cursor:pointer}
|
||||
.btn_win01 a:focus, .btn_win01 a:hover {text-decoration:none}
|
||||
|
||||
.btn_win02 {clear:both;text-align:center}
|
||||
.btn_win02 a, .btn_win02 button {padding:0 15px;height:30px;border:0;background:#617d46;color:#fff}
|
||||
.btn_win02 a {display:inline-block;vertical-align:middle;cursor:pointer}
|
||||
.btn_win02 a:focus, .btn_win02 a:hover {text-decoration:none}
|
||||
.btn_win02 button.btn_submit {background:#ff3061;color:#fff}
|
||||
|
||||
.btn_list {margin:0 20px 10px} /* 목록용 */
|
||||
|
||||
.btn_list01 {}
|
||||
.btn_list01 input, .btn_list01 button, .btn_list01 a {display:inline-block;margin:0;padding:10px;border:1px solid #ccc;background:#fafafa;text-decoration:none;cursor:pointer}
|
||||
.btn_list01 a:focus {background:#555}
|
||||
|
||||
.btn_list02 {}
|
||||
.btn_list02 input, .btn_list02 button, .btn_list02 a {display:inline-block;padding:5px 10px;border:1px solid #ccc;background:#fafafa;text-decoration:none;cursor:pointer}
|
||||
.btn_list02 a:focus {background:#555}
|
||||
|
||||
.btn_list03 {text-align:right}
|
||||
.btn_list03 a {display:inline-block;padding:0 15px;height:28px;background:#617d46;color:#fff;text-decoration:none;line-height:2.4em;vertical-align:middle}
|
||||
.btn_list03 a:focus {background:#555}
|
||||
|
||||
.btn_add {margin:0 20px 10px} /* 목록용 추가 */
|
||||
|
||||
.btn_add01 {text-align:right}
|
||||
.btn_add01 a, .btn_add01 button {padding:10px;border:1px solid #ccc;background:#f0f0f0;text-decoration:none;cursor:pointer}
|
||||
.btn_add01 a {display:inline-block;vertical-align:middle}
|
||||
.btn_add01 button {margin:0}
|
||||
|
||||
/* 필수입력 */
|
||||
.required {background:url('../../img/wrest.gif') #f6f9fa top right no-repeat !important}
|
||||
|
||||
/* 외부서비스 사이트코드 */
|
||||
.sitecode {display:inline-block;font:bold 15px 'Verdana';vertical-align:middle}
|
||||
|
||||
/* 폼 */
|
||||
textarea, .frm_input {border:1px solid #ced9de;background:#f6f9fa;vertical-align:middle}
|
||||
textarea {padding:2px;width:90%}
|
||||
.frm_input {height:22px;line-height:1.8em}
|
||||
.full_input {width:98%}
|
||||
select {border:1px solid #ced9de}
|
||||
legend {position:absolute;width:0;height:0;font-size:0;line-height:0;text-indent:-9999em;border:0;overflow:hidden}
|
||||
|
||||
.readonly {}
|
||||
|
||||
/* 폼 안내글 */
|
||||
.frm_info {display:block;padding:0 0 5px;color:#5b747e}
|
||||
|
||||
/* 목록 바로가기 */
|
||||
.anchor {margin:0 20px 10px 21px;padding:0;zoom:1}
|
||||
.anchor:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.anchor li {float:left;margin-left:-1px;list-style:none}
|
||||
.anchor a {display:inline-block;padding:5px 10px;border:1px solid #c8ced1;background:#d6dde1;text-decoration:none}
|
||||
.anchor a:focus, .anchor a:hover {background:#c8d2d8}
|
||||
|
||||
#sort_mb {width:800px}
|
||||
|
||||
#sort_sodr {width:600px}
|
||||
|
||||
/* 하단 레이아웃 */
|
||||
#ft {clear:both;margin:20px 0;padding:10px 20px;min-width:960px;border-top:1px solid #d0d6d8}
|
||||
|
||||
/* 페이지 내 검색 */
|
||||
.local_sch {min-width:960px}
|
||||
.local_sch .btn_submit {padding:0 5px;height:24px;border:0;color:#fff;font-size:0.95em;vertical-align:middle;cursor:pointer}
|
||||
|
||||
.local_sch01 {margin:0 0 10px;padding:0 20px 10px;border-bottom:1px solid #e9e9e9}
|
||||
.local_sch01 span {display:block;margin:0 0 5px}
|
||||
|
||||
.local_sch02 {margin:0 0 10px;padding:0 20px 5px;border-bottom:1px solid #e9e9e9}
|
||||
.local_sch02 div {padding:0 0 5px;margin:0 0 5px;border-bottom:1px solid #f4f4f4}
|
||||
.local_sch02 div.sch_last {margin:0;border:0}
|
||||
.local_sch02 strong {display:inline-block;width:80px}
|
||||
.local_sch02 strong.sch_long {width:160px}
|
||||
.local_sch02 label {display:inline-block;margin:0 5px 0 0}
|
||||
.local_sch02 button {margin:0;padding:5px;border:1px solid #ced9de;background:#f6f9fa;font-size:0.95em;vertical-align:middle;cursor:pointer}
|
||||
|
||||
/* 페이지 내 실행 */
|
||||
.local_cmd {min-width:960px}
|
||||
|
||||
.local_cmd01 {margin:0 0 10px;padding:0 20px}
|
||||
.local_cmd01 .cmd_tit {font-weight:bold}
|
||||
.local_cmd01 .btn_submit {padding:3px 5px;border:1px solid #ff3061;color:#fff;font-size:0.95em;vertical-align:middle;cursor:pointer}
|
||||
|
||||
/* 페이지 내 안내문 */
|
||||
.local_desc {}
|
||||
.local_desc ol, .local_desc ul {margin:0;padding:0 0 10px 21px}
|
||||
.local_desc li {margin:0 0 5px}
|
||||
|
||||
.local_desc01 {margin:0 20px 10px;padding:10px 20px 0;min-width:920px;border:1px solid #f2f2f2;background:#f9f9f9}
|
||||
.local_desc01 strong {color:#ff3061}
|
||||
.local_desc01 a {text-decoration:underline}
|
||||
|
||||
.local_desc02 {margin:0 20px 10px;min-width:960px} /* 주로 온라인 서식 관련 안내 내용에 사용 */
|
||||
.local_desc02 p {padding:0;line-height:1.8em}
|
||||
|
||||
/* 페이지 내 카운트 */
|
||||
.local_ov {min-width:960px}
|
||||
|
||||
.local_ov01 {position:relative;margin:-10px 0 10px;padding:10px 20px;border-bottom:1px solid #e9e9e9;background:#f2f5f9}
|
||||
.local_ov01 .ov_listall {display:inline-block;margin:0 5px 0 0;padding:0 10px 0 0;border-right:1px solid #ccc}
|
||||
|
||||
/* 테이블 */
|
||||
table {clear:both;width:100%;border-collapse:collapse;border-spacing:0}
|
||||
table caption {height:0;font-size:0;line-height:0;overflow:hidden}
|
||||
tbody td {border:1px solid #ececec}
|
||||
tfoot th, tfoot td {padding:10px 0;border:1px solid #c1d1d5;background:#d7e0e2}
|
||||
tfoot th {}
|
||||
tfoot td {font-weight:bold;text-align:center}
|
||||
|
||||
.tbl_wrap {margin:0 0 10px;padding:0 20px}
|
||||
|
||||
/* thead 한 줄 테이블 */
|
||||
.tbl_head01 {}
|
||||
.tbl_head01 table {clear:both;width:100%;border-collapse:collapse;border-spacing:0}
|
||||
.tbl_head01 thead th {padding:10px 0;border:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;letter-spacing:-0.1em}
|
||||
.tbl_head01 thead input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
|
||||
.tbl_head01 thead a {color:#383838;text-decoration:underline}
|
||||
.tbl_head01 tbody th {}
|
||||
.tbl_head01 tbody td {padding:10px 5px;line-height:1.4em;word-break:break-all}
|
||||
|
||||
/* thead 두 줄 테이블 */
|
||||
.tbl_head02 {}
|
||||
.tbl_head02 table {clear:both;width:100%;border-collapse:collapse;border-spacing:0}
|
||||
.tbl_head02 thead th {padding:5px 0;border:1px solid #d1dee2;background:#e5ecef;color:#383838;font-size:0.95em;letter-spacing:-0.1em}
|
||||
.tbl_head02 thead input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
|
||||
.tbl_head02 thead a {color:#383838;text-decoration:underline}
|
||||
.tbl_head02 tbody th {}
|
||||
.tbl_head02 tbody td {padding:5px 3px;line-height:1.4em;word-break:break-all}
|
||||
|
||||
/* 폼 테이블 */
|
||||
.tbl_frm01 th {padding:0;border-top:1px solid #ececec;border-bottom:1px solid #ececec;text-align:left}
|
||||
.tbl_frm01 td {padding:10px 5px;border-right:0;border-left:0}
|
||||
.tbl_frm01 textarea {height:150px}
|
||||
.tbl_frm01 #captcha {margin:0;padding:0;border:0;background:transparent}
|
||||
.tbl_frm01 #captcha input {margin-left:5px;text-align:center}
|
||||
|
||||
/* 자료 없는 목록 */
|
||||
.empty_table {padding:100px 0 !important;text-align:center}
|
||||
.empty_list {padding:20px 0 !important;text-align:center}
|
||||
|
||||
/* 테이블 그리드 */
|
||||
.grid_1 {width:50px}
|
||||
.grid_2 {width:100px}
|
||||
.grid_3 {width:150px}
|
||||
.grid_4 {width:200px}
|
||||
.grid_5 {width:250px}
|
||||
.grid_6 {width:300px}
|
||||
.grid_7 {width:350px}
|
||||
.grid_8 {width:400px}
|
||||
.grid_9 {width:450px}
|
||||
.grid_10 {width:500px}
|
||||
.grid_11 {width:550px}
|
||||
.grid_12 {width:600px}
|
||||
.grid_13 {width:650px}
|
||||
.grid_14 {width:700px}
|
||||
.grid_15 {width:750px}
|
||||
.grid_16 {width:800px}
|
||||
.grid_17 {width:850px}
|
||||
.grid_18 {width:900px}
|
||||
|
||||
/* 목록 홀짝 배경색 */
|
||||
.bg0 {background:#fff}
|
||||
.bg1 {background:#f2f5f9}
|
||||
.bg1 td {border-color:#e9e9e9}
|
||||
.bg0cancel {background:#fdebf3}
|
||||
.bg0cancel td {border-color:#f9d8e6}
|
||||
.bg1cancel {background:#fdebf3}
|
||||
.bg1cancel td {border-color:#f9d8e6}
|
||||
|
||||
/* 메뉴설정 */
|
||||
#menu_frm #menu_result {margin:20px 0}
|
||||
|
||||
#menulist .sub_menu_class {padding-left:25px;background:url('../img/sub_menu_ico.gif') 5px 15px no-repeat}
|
||||
|
||||
/* 회원관리 목록 */
|
||||
.mb_leave_msg {color:#b6b6b6}
|
||||
.mb_intercept_msg {color:#f59fe4}
|
||||
#point_mng {margin-top:50px}
|
||||
|
||||
/* 게시판추가/수정 */
|
||||
#anc_bo_extra .td_grpset label {width:auto}
|
||||
#anc_bo_extra .td_grpset input {margin:0}
|
||||
#anc_bo_extra label {display:inline-block;width:100px}
|
||||
#anc_bo_extra input {margin-right:10px}
|
||||
|
||||
/* 접속자집계 목록 */
|
||||
.tbl_visit_list td {text-align:center}
|
||||
.visit_bar {position:relative}
|
||||
.visit_bar span {position:absolute;top:-8px;left:0;height:15px;background:#ddd}
|
||||
|
||||
/* 추가배송비 관리 */
|
||||
#sendcost_postal {margin-top:50px}
|
||||
#sendcost_postal_win {}
|
||||
#sendcost_postal_win fieldset {text-align:center}
|
||||
#sendcost_postal_win ul {margin:10px auto;padding:5px 10px;width:87%;border-right:1px solid #eee;border-bottom:1px solid #eee;background:#fff;list-style:none}
|
||||
#sendcost_postal_win li {position:relative;padding:8px 0 6px;border-bottom:1px solid #eee}
|
||||
#sendcost_postal_win button {position:absolute;top:4px;right:0}
|
||||
|
||||
/* 공통 */
|
||||
.td_addr {text-align:left !important}
|
||||
.td_addr_line {line-height:2em}
|
||||
.td_amount {width:70px;text-align:center}
|
||||
.td_auth {width:100px;text-align:center}
|
||||
.td_auth_mbnick {width:200px}
|
||||
.td_boolean {width:50px;text-align:center}
|
||||
.td_category {width:120px;text-align:center}
|
||||
.td_chk {width:30px;text-align:center}
|
||||
.td_cnt {width:100px;font-size:0.95em;text-align:center}
|
||||
.td_cntsmall {width:50px;font-size:0.95em;text-align:center}
|
||||
.td_code {width:60px}
|
||||
.td_confirm {width:90px;text-align:center}
|
||||
.td_date {width:70px;text-align:center}
|
||||
.td_datetime {width:130px;text-align:center}
|
||||
.td_delicom {width:100px}
|
||||
.td_etc {width:80px;text-align:center}
|
||||
.td_extra label {display:inline-block;width:100px}
|
||||
.td_extra input {margin-right:5px;width:130px}
|
||||
.td_grid {width:60px;text-align:center}
|
||||
td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
.td_id {width:150px}
|
||||
.td_idsmall {width:75px}
|
||||
.td_itopt {width:200px}
|
||||
.td_img {text-align:center}
|
||||
.td_imgline {width:70px;text-align:center}
|
||||
.td_input input {width:94%}
|
||||
.td_mbcert {text-align:center}
|
||||
.td_mbid, .td_name, .td_mbname {width:100px;text-align:left !important}
|
||||
.td_mbstat {text-align:center}
|
||||
.td_mng {width:100px;font-size:0.95em;text-align:center;letter-spacing:-0.1em}
|
||||
.td_mngsmall {width:60px;font-size:0.95em;text-align:center;letter-spacing:-0.1em}
|
||||
.td_mng button, .td_mngsmall button {margin:0;padding:0;border:0;background:transparent}
|
||||
.td_num {width:60px;text-align:center}
|
||||
.td_numbig {width:100px;text-align:center}
|
||||
.td_numcancel {color:#999;text-decoration:line-through}
|
||||
.td_numcoupon {color:#86b325;text-align:center}
|
||||
.td_numincome {color:#357dbb;text-align:center}
|
||||
.td_numsmall {width:30px;text-align:center}
|
||||
.td_numsum {font-weight:bold;text-align:center}
|
||||
.td_numrdy {color:#ff3061;text-align:center}
|
||||
.td_odrnum {width:250px;text-align:center}
|
||||
.td_odrnum2 {width:140px;text-align:center}
|
||||
.td_odrnum3 {width:110px;text-align:center}
|
||||
.td_odrstatus {width:70px;letter-spacing:-0.1em;text-align:center}
|
||||
.td_output {width:90px;text-align:center}
|
||||
.td_payby {width:70px;text-align:center;letter-spacing:-0.1em}
|
||||
.td_paybybig {width:140px;text-align:center;letter-spacing:-0.1em}
|
||||
.td_possible {width:70px;text-align:center}
|
||||
.td_postal {width:60px;text-align:center}
|
||||
.td_bigpostal {width:140px;text-align:center}
|
||||
.td_pt {text-align:right !important}
|
||||
.td_scate {padding-right:15px;text-align:right;vertical-align:top}
|
||||
.td_send {width:50px;text-align:center}
|
||||
.td_sendcost_by {width:50px;text-align:center}
|
||||
.td_sendcost_add {width:100px;text-align:center}
|
||||
.td_tdiv {border-bottom:1px solid #c9c9c9 !important}
|
||||
.td_tel {width:80px;text-align:center}
|
||||
.td_test {width:50px;text-align:center}
|
||||
|
||||
.txt_true {color:#e8180c}
|
||||
.txt_false {color:#ccc}
|
||||
.txt_succeed {color:#40b300}
|
||||
.txt_fail {color:#ce4242}
|
||||
|
||||
.banner_or_img {margin:10px 0 0}
|
||||
.banner_or_img button {display:block;margin:5px 0 0}
|
||||
.txt_active {color:#5d910b}
|
||||
.txt_expired {color:#ccc}
|
||||
|
||||
/* 환경설정 */
|
||||
.cf_cert_hide {display:none}
|
||||
|
||||
/* 관리권한설정 */
|
||||
#add_admin fieldset {margin-top:20px}
|
||||
|
||||
/* 메일 테스트 */
|
||||
#fsendmailtest {margin:50px 0;text-align:center}
|
||||
#fsendmailtest .btn_submit {padding:3px 5px;border:1px solid #ff3061;color:#fff;font-size:0.95em;vertical-align:middle;cursor:pointer}
|
||||
|
||||
/* ########## 쇼핑몰 사용시 적용 ########## */
|
||||
|
||||
/* 쇼핑몰 설정 */
|
||||
#anc_scf_payment textarea {height:50px}
|
||||
|
||||
#scf_cardtest_btn {margin-left:5px;vertical-align:middle}
|
||||
#scf_cardtest_tip {margin:10px 0 0;padding:10px;border:3px solid #ddd}
|
||||
#scf_cardtest_tip strong {display:inline-block;margin:0 0 5px}
|
||||
#scf_cardtest_tip dl {margin:0 0 15px;padding:0;zoom:1}
|
||||
#scf_cardtest_tip dl:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#scf_cardtest_tip dt {float:left;width:100px}
|
||||
#scf_cardtest_tip dd {padding:0;overflow:hidden}
|
||||
.scf_cardtest_tip {display:none}
|
||||
|
||||
.scf_img {display:none}
|
||||
|
||||
#scf_sms_pre h3 {padding:10px 0 0}
|
||||
#scf_sms_pre dl {margin:10px 0 0;zoom:1}
|
||||
#scf_sms_pre dl:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#scf_sms_pre dt {clear:both;float:left;padding:5px 0;width:100px}
|
||||
#scf_sms_pre dd {padding:5px 0;overflow:hidden}
|
||||
#scf_sms_pre p {margin:0 0 20px}
|
||||
#scf_sms {margin:0 0 30px;zoom:1}
|
||||
#scf_sms:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.scf_sms_box {float:left;margin:0 8px 0 9px;width:163px;text-align:center}
|
||||
.scf_sms_box h4 {margin:0 0 5px}
|
||||
.scf_sms_img {margin:10px 0;width:163px;height:191px;background:url('../shop_admin/img/sms_back.gif') no-repeat 0 0;text-align:center}
|
||||
.scf_sms_img textarea {margin:54px 0 0;width:115px;height:85px;border:0;background:transparent;font-size:0.95em;overflow:hidden}
|
||||
.scf_sms_img span {display:block}
|
||||
.scf_sms_cnt {display:block}
|
||||
|
||||
/* 주문내역 */
|
||||
#sodr_list {text-align:center}
|
||||
|
||||
/* 주문내역 수정 */
|
||||
.sodr_nonpay {color:#ff6600}
|
||||
strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
.sodr_sppay {color:#1f9bff}
|
||||
#anc_sodr_memo textarea {width:98%}
|
||||
#anc_sodr_memo .btn_confirm {margin:10px 0 0}
|
||||
#anc_sodr_payer #od_addr1,
|
||||
#anc_sodr_payer #od_addr2 {margin:5px 0 0}
|
||||
#anc_sodr_addressee #od_b_addr1,
|
||||
#anc_sodr_addressee #od_b_addr2 {margin:5px 0 0}
|
||||
|
||||
#sodr_qty_log h3 {margin:20px 0 10px}
|
||||
#sodr_qty_log div {padding:10px;height:auto !important;height:200px;max-height:200px;border:1px solid #e9e9e9;background:#f5f6fa;line-height:1.8em;overflow-y:scroll}
|
||||
|
||||
#sodr_request_frm h3 {margin:20px 0 0}
|
||||
#sodr_request_item h3 {margin-bottom:10px}
|
||||
#sodr_request_frm #forderrequest {border-top:1px solid #e9e9e9}
|
||||
#sodr_request_log_wrap {padding:10px;height:auto !important;height:200px;max-height:200px;border:1px solid #e9e9e9;background:#f5f6fa;overflow-y:scroll}
|
||||
#sodr_request_log_wrap p {position:relative;padding:5px 0;border-bottom:1px solid #e9e9e9}
|
||||
#sodr_request_log_wrap span {display:inline-block;margin:0 0 0 80px}
|
||||
#sodr_request_log_wrap b {display:inline-block;margin:0 15px 0 0;font-weight:normal}
|
||||
#sodr_request_log_wrap button {position:absolute;top:7px;left:0;margin:0;padding:0;border:0;background:transparent;font-weight:bold}
|
||||
#sodr_request_handle h3 {margin-bottom:10px}
|
||||
|
||||
#anc_sodr_request h3 {margin:20px 0 10px}
|
||||
#sodr_request_list {padding:10px;height:auto !important;height:200px;max-height:200px;border:1px solid #e9e9e9;background:#f5f6fa;overflow-y:scroll}
|
||||
#sodr_request_list p {position:relative;padding:5px 0;border-bottom:1px solid #e9e9e9}
|
||||
|
||||
/* 주문통합내역 */
|
||||
#sodr_sort {margin:0 20px 20px;padding:0;list-style:none;zoom:1}
|
||||
#sodr_sort:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#sodr_sort li {float:left;margin:0 10px 0 0}
|
||||
#sodr_sort a {font-size:0.95em;text-decoration:underline;letter-spacing:-0.1em}
|
||||
#sodr_sort a.sort_on {color:#ff3061}
|
||||
|
||||
#sodr_all {margin:0 20px}
|
||||
#sodr_all h2 {position:absolute;font-size:0;line-height:0;overflow:hidden}
|
||||
|
||||
#sodr_all .btn_list {margin:10px 0}
|
||||
|
||||
.sodr_all_list {clear:both;margin:0 0 50px;padding:0;list-style:none}
|
||||
|
||||
.sodr_all_list .sodr_basic {float:left;zoom:1}
|
||||
.sodr_all_list .sodr_basic:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.sodr_all_list .sodr_basic dt {float:left;margin:0 10px 0 0}
|
||||
.sodr_all_list .sodr_basic dd {float:left;margin:0 30px 0 0}
|
||||
.sodr_all_list .sodr_basic strong a {color:#ff3061;text-decoration:underline}
|
||||
|
||||
.sodr_all_list .sodr_person {float:right;zoom:1}
|
||||
.sodr_all_list .sodr_person:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.sodr_all_list .sodr_person dt {float:left;margin:0 0 0 30px}
|
||||
.sodr_all_list .sodr_person dd {float:left;margin:0 0 0 10px}
|
||||
|
||||
.sodr_all_list .sodr_pay {clear:both;margin:0;border-top:1px solid #d1dee2;zoom:1}
|
||||
.sodr_all_list .sodr_pay:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.sodr_all_list .sodr_pay dt {float:left;padding:8px 0;width:15%}
|
||||
.sodr_all_list .sodr_pay dd {float:left;margin:0;padding:8px 0;width:35%}
|
||||
|
||||
#sodr_total table {text-align:center}
|
||||
#sodr_total th {width:125px}
|
||||
|
||||
/* 분류관리 목록 */
|
||||
.cate_list_lbl {display:inline-block;width:13px;height:13px;background:url('../shop_admin/img/icon_reply.gif') 0 0 no-repeat}
|
||||
|
||||
/* 분류 추가/수정 */
|
||||
.frm_ca_id {display:inline-block;margin:0 10px 0 0;font-weight:bold}
|
||||
|
||||
/* 상품관리 */
|
||||
.sit_odrby {text-align:center}
|
||||
.sit_amt {text-align:right;background-color:#e8fbff !important}
|
||||
.sit_amt2 {text-align:right;border-color:#c3e189 !important;background-color:#f6ffe6 !important}
|
||||
.sit_amt3 {text-align:right;border-color:#f6c8c4 !important;background-color:#ffedeb !important}
|
||||
.sit_camt, .sit_pt, .sit_qty {text-align:right}
|
||||
.frm_sit_title {margin:5px 0 0}
|
||||
|
||||
/* 상품입력/수정 */
|
||||
#sit_compact {margin:0 20px;padding:15px 0;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
|
||||
|
||||
.sit_w_opt {height:70px !important}
|
||||
.sit_wimg {display:none}
|
||||
.sit_relation_list {width:100%;background:#f6f6f6}
|
||||
.sit_relation_selected {width:100%;background:#fcfff2}
|
||||
#add_span img, #sel_span img {margin:5px 0}
|
||||
|
||||
.sit_option {margin:0 0 10px;padding:10px 10px 0;border:1px solid #e9e9e9;background:#f7f7f7}
|
||||
.sit_option .frm_input {background:#fff !important;color:#000}
|
||||
.sit_option_frm_wrapper {margin:0 0 10px;height:auto !important;height:500px;max-height:500px;border:1px solid #484848;overflow-y:scroll}
|
||||
.sit_option_frm_wrapper th {padding:5px 0 !important;text-align:center !important}
|
||||
|
||||
#sit_option_frm .btn_list {margin:0 0 10px}
|
||||
#sit_option_frm fieldset {padding:10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
|
||||
#sit_option_frm fieldset .frm_input {margin:0 10px 0 5px;background:#fff !important;color:#000}
|
||||
|
||||
#sit_option_addfrm_btn {position:relative}
|
||||
#sit_option_addfrm_btn button {position:absolute;top:-32px;right:0}
|
||||
|
||||
#sit_option_addfrm .btn_list {margin:0 0 10px}
|
||||
#sit_option_addfrm fieldset {padding:10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
|
||||
#sit_option_addfrm fieldset .frm_input {margin:0 10px 0 5px;background:#fff !important;color:#000}
|
||||
|
||||
/* 상품 복사 */
|
||||
#sit_copy {margin:10px 20px 20px;background:#fff}
|
||||
#sit_copy label {display:inline-block;margin:0 10px 0 0;font-weight:bold}
|
||||
|
||||
/* 상품 일괄 등록 */
|
||||
#excelfile_upload {margin:10px auto 20px;padding:20px;width:86%;border:1px solid #e9e9e9;background:#fff}
|
||||
#excelfile_upload label {font-weight:bold}
|
||||
#excelfile_result {margin:0 auto 20px;padding:20px;width:86%;border:1px solid #e9e9e9;background:#fff;zoom:1}
|
||||
#excelfile_result:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#excelfile_result dt {clear:both;float:left;padding:10px 0;width:40%}
|
||||
#excelfile_result dd {float:left;margin:0;padding:10px 0;width:60%}
|
||||
|
||||
/* 상품옵션재고관리 */
|
||||
.sit_stock_qty_alert {color:#ff1133;font-weight:bold}
|
||||
|
||||
/* 배송일괄처리 */
|
||||
#sdeli_proc_fs {padding:20px 0;border-bottom:1px solid #f7f7f7;text-align:center}
|
||||
|
||||
/* 이벤트 입력/수정 */
|
||||
.frm_ev_id {display:inline-block;margin:0 10px 0 0;font-weight:bold}
|
||||
|
||||
/* 관련 상품, 관련 이벤트 입력/수정 */
|
||||
.srel section ul {margin:0;padding:10px;list-style:none}
|
||||
.srel section li {position:relative;border-bottom:1px solid #e9e9e9}
|
||||
.srel .srel_list {height:auto !important;height:200px;max-height:200px;border:1px solid #ced9de;background:#f6f6f6;overflow-y:scroll}
|
||||
.srel .srel_sel {border:1px solid #ced9de;background:#fcfff2}
|
||||
.srel .srel_list p, .srel .srel_sel p {padding:10px 0;text-align:center}
|
||||
.srel .compare_left ul {margin:0;list-style:none}
|
||||
.srel button {position:absolute;top:12px;right:0}
|
||||
.srel .srel_noneimg li {padding:7px 0}
|
||||
.srel .srel_noneimg button {top:0;right:0}
|
||||
.srel .srel_pad {display:block;height:30px}
|
||||
|
||||
/* 쿠폰관리 */
|
||||
.scp_new_win .empty_table {padding:30px 0}
|
||||
|
||||
#scp_list_find {margin:10px 20px;padding:20px;border:1px solid #e9e9e9;background:#fff}
|
||||
#scp_list_find .btn_frmline {line-height:1.5em !important}
|
||||
#scp_list_find label {font-weight:bold}
|
||||
|
||||
.scp_find_code {width:110px;text-align:center}
|
||||
.scp_find_select {width:50px;text-align:center}
|
||||
|
||||
.scp_target_select {width:50px;text-align:center}
|
||||
|
||||
/* 매출현황 */
|
||||
#ssale_stats {zoom:1}
|
||||
#ssale_stats:after {display:block;clear:both;visibility:hidden;content:''}
|
||||
#ssale_stats div {float:left;padding:2%;width:46%;border-bottom:1px solid #eee;text-align:center}
|
||||
#ssale_stats h3 {margin:30px 0 0;font-size:1.3em;text-align:center}
|
||||
#ssale_stats form {margin:20px 0 10px;padding:10px 0}
|
||||
#ssale_stats .frm_input {padding:0 10px !important;height:24px !important}
|
||||
|
||||
/* 주문내역출력 (새창) */
|
||||
.new_win .sodr_print_pop_list table {width:100%}
|
||||
|
||||
#sodr_print_pop h2 {padding:15px 0;color:#ff3600;text-align:right}
|
||||
#sodr_print_pop h3 {margin:0 0 10px}
|
||||
|
||||
.sodr_print_pop_list {margin:0 20px 10px;padding:0 0 10px;border-bottom:1px dotted #ddd}
|
||||
.sodr_print_pop_list .sodr_print_pop_same {margin:0 0 10px;border:1px solid #e9e9e9;background:#f7f7f7;text-align:center}
|
||||
.sodr_print_pop_list dl {margin:0 0 15px;padding:0;zoom:1}
|
||||
.sodr_print_pop_list dl:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.sodr_print_pop_list dt {float:left;padding:7px 0 6px;width:100px;border-bottom:1px solid #ddd}
|
||||
.sodr_print_pop_list dd {padding:7px 0 6px;border-bottom:1px solid #ddd;overflow:hidden}
|
||||
|
||||
#sodr_print_pop_total {padding:20px 0;text-align:center}
|
||||
#sodr_print_pop_total span {display:block;margin:0 0 10px;font-size:1.5em}
|
||||
#sodr_print_pop_total strong {color:#ff3600}
|
||||
|
||||
/* SMS문자전송 */
|
||||
#sms_send {padding-bottom:100px;zoom:1}
|
||||
#sms_send:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
|
||||
#sms_frm {float:left;width:650px}
|
||||
#sms_frm table {margin:0 0 30px}
|
||||
#sms_frm textarea {height:70px}
|
||||
|
||||
#sms_sm {position:relative;float:left;width:229px;height:418px;background:url('../shop_admin/img/mobilebg.jpg') no-repeat}
|
||||
#sms_sm_text {position:absolute;top:75px;left:27px;width:180px;color:#fff;font-size:2em;word-break:break-all}
|
||||
#sms_sm p {position:absolute;bottom:-70px;left:0;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
/* 가격비교사이트 */
|
||||
#anc_pricecompare_info li {margin:5px 0}
|
||||
|
||||
#anc_pricecompare_engine dt a {font-weight:bold}
|
||||
#anc_pricecompare_engine dd {margin:0 0 30px}
|
||||
#anc_pricecompare_engine li {margin:5px 0}
|
||||
|
||||
/* 새창 기본 스타일 */
|
||||
.new_win {}
|
||||
.new_win h1 {margin-bottom:20px;padding:0 20px;min-width:320px/* 적정값으로 변경하여 사용하세요. */;height:60px;border-top:2px solid #484848;border-bottom:1px solid #e9e9e9;background:#fff;font-size:1.2em;line-height:5em}
|
||||
.new_win h2 {margin:0 20px 10px}
|
||||
.new_win_ul {margin:-20px 0 20px 0;padding:0 0 0 20px;border-bottom:1px solid #515151;background:#484848;list-style:none;zoom:1}
|
||||
.new_win_ul:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
.new_win_ul li {float:left;margin-left:-1px}
|
||||
.new_win_ul a {display:block;padding:10px 10px 8px;border-right:1px solid #595959;border-left:1px solid #595959;color:#fff;font-family:dotum;font-weight:bold;text-decoration:none}
|
||||
.new_win_desc {margin:0 20px}
|
||||
.new_win .anchor {margin:0 20px 5px}
|
||||
.new_win .tbl_wrap {margin:0 20px 20px;padding:0}
|
||||
|
||||
.new_win .win_btn {clear:both;padding:20px;text-align:center} /* 새창용 */
|
||||
.new_win .win_btn button {display:inline-block;padding:0 10px;height:30px;border:0;background:#4b545e;color:#fff;line-height:2em;cursor:pointer}
|
||||
.new_win .win_btn input {padding:0 10px;height:30px;line-height:2em}
|
||||
.new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em}
|
||||
.new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none}
|
||||
|
||||
.new_win .local_sch, .new_win .local_cmd, .new_win .local_desc01, .new_win .local_desc02, .new_win .local_ov {min-width:320px}
|
||||
|
||||
/* 자바스크립트 alert 대안 */
|
||||
#validation_check {margin:100px auto;width:500px}
|
||||
#validation_check h1 {margin-bottom:20px;font-size:1.3em}
|
||||
#validation_check p {margin-bottom:20px;padding:30px 20px;border:1px solid #e9e9e9;background:#fff}
|
||||
|
||||
/* 관리자 비밀번호 확인 */
|
||||
#admin_confirm {padding:0 0 10px;background:#222;text-align:center}
|
||||
#admin_confirm p {margin:0 0 10px;color:#9ab9c5;background:#383a3f}
|
||||
#admin_confirm label {color:#fff}
|
||||
#admin_confirm .frm_input {border-color:#000}
|
||||
|
||||
/* 사이드뷰 */
|
||||
.sv_wrap {display:inline-block;position:relative;font-weight:normal;font-size:1em}
|
||||
.sv_wrap .sv {z-index:1000;display:none;margin:5px 0 0;border:1px solid #383838}
|
||||
.sv_wrap .sv a {display:inline-block;margin:0;padding:3px;width:94px;border-bottom:1px solid #383838;background:#111;color:#fff;text-decoration:none}
|
||||
.sv_wrap .sv a:focus, .sv_wrap .sv a:hover {background:#393939}
|
||||
.sv_on {display:block !important;position:absolute;top:10px;left:20px;width:auto;height:auto}
|
||||
.sv_nojs .sv {display:block}
|
||||
|
||||
/* 페이징 */
|
||||
.pg_wrap {clear:both;margin:0 0 20px;padding:20px 0 0;text-align:center}
|
||||
.pg {}
|
||||
.pg_page, .pg_current {display:inline-block;padding:0 8px;height:25px;color:#000;letter-spacing:0;line-height:2.2em;vertical-align:middle}
|
||||
.pg a:focus, .pg a:hover {text-decoration:none}
|
||||
.pg_page {background:#e4eaec;text-decoration:none}
|
||||
.pg_start, .pg_prev {/* 이전 */}
|
||||
.pg_end, .pg_next {/* 다음 */}
|
||||
.pg_current {display:inline-block;margin:0 4px 0 0;background:#333;color:#fff;font-weight:normal}
|
||||
99
adm/faqform.php
Normal file
99
adm/faqform.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||
$fm = sql_fetch($sql);
|
||||
|
||||
$html_title = 'FAQ '.$fm['fm_subject'];;
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= " 수정";
|
||||
$readonly = " readonly";
|
||||
|
||||
$sql = " select * from {$g5['faq_table']} where fa_id = '$fa_id' ";
|
||||
$fa = sql_fetch($sql);
|
||||
if (!$fa['fa_id']) alert("등록된 자료가 없습니다.");
|
||||
|
||||
$fa['fa_subject'] = htmlspecialchars2($fa['fa_subject']);
|
||||
$fa['fa_content'] = htmlspecialchars2($fa['fa_content']);
|
||||
}
|
||||
else
|
||||
$html_title .= ' 항목 입력';
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="frmfaqform" action="./faqformupdate.php" onsubmit="return frmfaqform_check(this);" method="post">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="fm_id" value="<?php echo $fm_id; ?>">
|
||||
<input type="hidden" name="fa_id" value="<?php echo $fa_id; ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="fa_order">출력순서</label></th>
|
||||
<td>
|
||||
<?php echo help('숫자가 작을수록 FAQ 페이지에서 먼저 출력됩니다.'); ?>
|
||||
<input type="text" name="fa_order" value="<?php echo $fa['fa_order']; ?>" id="fa_order" class="frm_input" maxlength="10" size="10">
|
||||
<?php if ($w == 'u') { ?><a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">내용보기</a><?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">질문</th>
|
||||
<td><?php echo editor_html('fa_subject', $fa['fa_subject']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">답변</th>
|
||||
<td><?php echo editor_html('fa_content', $fa['fa_content']); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./faqlist.php?fm_id=<?php echo $fm_id; ?>">목록</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function frmfaqform_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
|
||||
//check_field(f.fa_subject, "제목을 입력하세요.");
|
||||
//check_field(f.fa_content, "내용을 입력하세요.");
|
||||
|
||||
if (errmsg != "")
|
||||
{
|
||||
alert(errmsg);
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
<?php echo get_editor_js('fa_subject'); ?>
|
||||
<?php echo get_editor_js('fa_content'); ?>
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// document.getElementById('fa_order').focus(); 포커스 해제
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
43
adm/faqformupdate.php
Normal file
43
adm/faqformupdate.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($W == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$sql_common = " fa_subject = '$fa_subject',
|
||||
fa_content = '$fa_content',
|
||||
fa_order = '$fa_order' ";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
$sql = " insert {$g5['faq_table']}
|
||||
set fm_id ='$fm_id',
|
||||
$sql_common ";
|
||||
sql_query($sql);
|
||||
|
||||
$fa_id = mysql_insert_id();
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
$sql = " update {$g5['faq_table']}
|
||||
set $sql_common
|
||||
where fa_id = '$fa_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
$sql = " delete from {$g5['faq_table']} where fa_id = '$fa_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if ($w == 'd')
|
||||
goto_url("./faqlist.php?fm_id=$fm_id");
|
||||
else
|
||||
goto_url("./faqform.php?w=u&fm_id=$fm_id&fa_id=$fa_id");
|
||||
?>
|
||||
95
adm/faqlist.php
Normal file
95
adm/faqlist.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?php
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = 'FAQ 상세관리';
|
||||
if ($fm_subject) $g5['title'] .= ' : '.$fm_subject;
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||
$fm = sql_fetch($sql);
|
||||
|
||||
$sql_common = " from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row[cnt];
|
||||
|
||||
$sql = "select * $sql_common order by fa_order , fa_id ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
등록된 FAQ 상세내용 <?php echo $total_count; ?>건
|
||||
</div>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<ol>
|
||||
<li>FAQ는 무제한으로 등록할 수 있습니다</li>
|
||||
<li><strong>FAQ 상세내용 추가</strong>를 눌러 자주하는 질문과 답변을 입력합니다.</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./faqform.php?fm_id=<?php echo $fm['fm_id']; ?>">FAQ 상세내용 추가</a>
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<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++)
|
||||
{
|
||||
$row1 = sql_fetch(" select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ");
|
||||
$cnt = $row1[cnt];
|
||||
|
||||
$s_mod = icon("수정", "");
|
||||
$s_del = icon("삭제", "");
|
||||
|
||||
$num = $i + 1;
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $num; ?></td>
|
||||
<td><?php echo stripslashes($row['fa_subject']); ?></td>
|
||||
<td class="td_num"><?php echo $row['fa_order']; ?></td>
|
||||
<td class="td_mngsmall">
|
||||
<a href="./faqform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>수정</a>
|
||||
<a href="javascript:del('./faqformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>&fa_id=<?php echo $row['fa_id']; ?>');"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="4" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<a href="./faqmasterlist.php">FAQ 관리</a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
161
adm/faqmasterform.php
Normal file
161
adm/faqmasterform.php
Normal file
@ -0,0 +1,161 @@
|
||||
<?php
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$html_title = 'FAQ';
|
||||
$g5['title'] = $html_title.' 관리';
|
||||
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= ' 수정';
|
||||
$readonly = ' readonly';
|
||||
|
||||
$sql = " select * from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||
$fm = sql_fetch($sql);
|
||||
if (!$fm['fm_id']) alert('등록된 자료가 없습니다.');
|
||||
}
|
||||
else
|
||||
{
|
||||
$html_title .= ' 입력';
|
||||
}
|
||||
|
||||
// 모바일 상하단 내용 필드추가
|
||||
if(!sql_query(" select fm_mobile_head_html from {$g5['faq_master_table']} limit 1 ", false)) {
|
||||
sql_query(" ALTER TABLE `{$g5['faq_master_table']}`
|
||||
ADD `fm_mobile_head_html` text NOT NULL AFTER `fm_tail_html`,
|
||||
ADD `fm_mobile_tail_html` text NOT NULL AFTER `fm_mobile_head_html` ", true);
|
||||
}
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="frmfaqmasterform" action="./faqmasterformupdate.php" onsubmit="return frmfaqmasterform_check(this);" method="post" enctype="MULTIPART/FORM-DATA">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="fm_id" value="<?php echo $fm_id; ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="fm_order">출력순서</label></th>
|
||||
<td>
|
||||
<?php echo help('숫자가 작을수록 FAQ 분류에서 먼저 출력됩니다.'); ?>
|
||||
<input type="text" name="fm_order" value="<?php echo $fm['fm_order']; ?>" id="fm_order" class="frm_input" maxlength="10" size="10">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="fm_subject">제목</label></th>
|
||||
<td>
|
||||
<input type="text" value="<?php echo get_text($fm['fm_subject']); ?>" name="fm_subject" id="fm_subject" required class="frm_input required" size="70">
|
||||
<?php if ($w == 'u') { ?>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">보기</a>
|
||||
<a href="./faqlist.php?fm_id=<?php echo $fm_id; ?>" class="btn_frmline">상세보기</a>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="fm_himg">상단이미지</label></th>
|
||||
<td>
|
||||
<input type="file" name="fm_himg" id="fm_himg">
|
||||
<?php
|
||||
$himg = G5_DATA_PATH.'/faq/'.$fm['fm_id'].'_h';
|
||||
if (file_exists($himg)) {
|
||||
$size = @getimagesize($himg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
$width = 750;
|
||||
else
|
||||
$width = $size[0];
|
||||
|
||||
echo '<input type="checkbox" name="fm_himg_del" value="1" id="fm_himg_del"> <label for="fm_himg_del">삭제</label>';
|
||||
$himg_str = '<img src="'.G5_DATA_URL.'/faq/'.$fm['fm_id'].'_h" width="'.$width.'" alt="">';
|
||||
}
|
||||
if ($himg_str) {
|
||||
echo '<div class="banner_or_img">';
|
||||
echo $himg_str;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="fm_timg">하단이미지</label></th>
|
||||
<td>
|
||||
<input type="file" name="fm_timg" id="fm_timg">
|
||||
<?php
|
||||
$timg = G5_DATA_PATH.'/faq/'.$fm['fm_id'].'_t';
|
||||
if (file_exists($timg)) {
|
||||
$size = @getimagesize($timg);
|
||||
if($size[0] && $size[0] > 750)
|
||||
$width = 750;
|
||||
else
|
||||
$width = $size[0];
|
||||
|
||||
echo '<input type="checkbox" name="fm_timg_del" value="1" id="fm_timg_del"><label for="fm_timg_del">삭제</label>';
|
||||
$timg_str = '<img src="'.G5_DATA_URL.'/faq/'.$fm['fm_id'].'_t" width="'.$width.'" alt="">';
|
||||
}
|
||||
if ($timg_str) {
|
||||
echo '<div class="banner_or_img">';
|
||||
echo $timg_str;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">상단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_head_html', $fm['fm_head_html']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">하단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_tail_html', $fm['fm_tail_html']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일상단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_mobile_head_html', $fm['fm_mobile_head_html']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">모바일하단 내용</th>
|
||||
<td>
|
||||
<?php echo editor_html('fm_mobile_tail_html', $fm['fm_mobile_tail_html']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./faqmasterlist.php">목록</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function frmfaqmasterform_check(f)
|
||||
{
|
||||
<?php echo get_editor_js('fm_head_html'); ?>
|
||||
<?php echo get_editor_js('fm_tail_html'); ?>
|
||||
<?php echo get_editor_js('fm_mobile_head_html'); ?>
|
||||
<?php echo get_editor_js('fm_mobile_tail_html'); ?>
|
||||
}
|
||||
|
||||
// document.frmfaqmasterform.fm_subject.focus();
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
72
adm/faqmasterformupdate.php
Normal file
72
adm/faqmasterformupdate.php
Normal file
@ -0,0 +1,72 @@
|
||||
<?php
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($W == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
@mkdir(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH."/faq", G5_DIR_PERMISSION);
|
||||
|
||||
if ($fm_himg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
|
||||
if ($fm_timg_del) @unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
|
||||
|
||||
$sql_common = " set fm_subject = '$fm_subject',
|
||||
fm_head_html = '$fm_head_html',
|
||||
fm_tail_html = '$fm_tail_html',
|
||||
fm_mobile_head_html = '$fm_mobile_head_html',
|
||||
fm_mobile_tail_html = '$fm_mobile_tail_html',
|
||||
fm_order = '$fm_order' ";
|
||||
|
||||
if ($w == "")
|
||||
{
|
||||
$sql = " alter table {$g5['faq_master_table']} auto_increment=1 ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " insert {$g5['faq_master_table']} $sql_common ";
|
||||
sql_query($sql);
|
||||
|
||||
$fm_id = mysql_insert_id();
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
$sql = " update {$g5['faq_master_table']} $sql_common where fm_id = '$fm_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
@unlink(G5_DATA_PATH."/faq/{$fm_id}_h");
|
||||
@unlink(G5_DATA_PATH."/faq/{$fm_id}_t");
|
||||
|
||||
// FAQ삭제
|
||||
$sql = " delete from {$g5['faq_master_table']} where fm_id = '$fm_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
// FAQ상세삭제
|
||||
$sql = " delete from {$g5['faq_table']} where fm_id = '$fm_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if ($w == "" || $w == "u")
|
||||
{
|
||||
if ($_FILES['fm_himg']['name']){
|
||||
$dest_path = G5_DATA_PATH."/faq/".$fm_id."_h";
|
||||
@move_uploaded_file($_FILES['fm_himg']['tmp_name'], $dest_path);
|
||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||
}
|
||||
if ($_FILES['fm_timg']['name']){
|
||||
$dest_path = G5_DATA_PATH."/faq/".$fm_id."_t";
|
||||
@move_uploaded_file($_FILES['fm_timg']['tmp_name'], $dest_path);
|
||||
@chmod($dest_path, G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
goto_url("./faqmasterform.php?w=u&fm_id=$fm_id");
|
||||
}
|
||||
else
|
||||
goto_url("./faqmasterlist.php");
|
||||
?>
|
||||
128
adm/faqmasterlist.php
Normal file
128
adm/faqmasterlist.php
Normal file
@ -0,0 +1,128 @@
|
||||
<?php
|
||||
$sub_menu = '300700';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
//dbconfig파일에 $g5['faq_table'] , $g5['faq_master_table'] 배열변수가 있는지 체크
|
||||
if( !isset($g5['faq_table']) || !isset($g5['faq_master_table']) ){
|
||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <br ><strong>$g5[\'faq_table\'] = G5_TABLE_PREFIX.\'faq\';</strong><br ><strong>$g5[\'faq_master_table\'] = G5_TABLE_PREFIX.\'faq_master\';</strong><br > 를 추가해 주세요.');
|
||||
}
|
||||
|
||||
//자주하시는 질문 마스터 테이블이 있는지 검사한다.
|
||||
if(!sql_query(" DESCRIBE {$g5['faq_master_table']} ", false)) {
|
||||
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_master_table']} ", false)) {
|
||||
sql_query(" ALTER TABLE {$g5['g5_shop_faq_master_table']} RENAME TO `{$g5['faq_master_table']}` ;", false);
|
||||
} else {
|
||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_master_table']}` (
|
||||
`fm_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`fm_subject` varchar(255) NOT NULL DEFAULT '',
|
||||
`fm_head_html` text NOT NULL,
|
||||
`fm_tail_html` text NOT NULL,
|
||||
`fm_order` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`fm_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
}
|
||||
// FAQ Master
|
||||
sql_query(" insert into `{$g5['faq_master_table']}` set fm_id = '1', fm_subject = '자주하시는 질문' ", false);
|
||||
}
|
||||
|
||||
//자주하시는 질문 테이블이 있는지 검사한다.
|
||||
if(!sql_query(" DESCRIBE {$g5['faq_table']} ", false)) {
|
||||
if(sql_query(" DESCRIBE {$g5['g5_shop_faq_table']} ", false)) {
|
||||
sql_query(" ALTER TABLE {$g5['g5_shop_faq_table']} RENAME TO `{$g5['faq_table']}` ;", false);
|
||||
} else {
|
||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['faq_table']}` (
|
||||
`fa_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`fm_id` int(11) NOT NULL DEFAULT '0',
|
||||
`fa_subject` text NOT NULL,
|
||||
`fa_content` text NOT NULL,
|
||||
`fa_order` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`fa_id`),
|
||||
KEY `fm_id` (`fm_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
}
|
||||
}
|
||||
|
||||
$g5['title'] = 'FAQ관리';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$sql_common = " from {$g5['faq_master_table']} ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$rows = $config['cf_page_rows'];
|
||||
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
|
||||
if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $rows; // 시작 열을 구함
|
||||
|
||||
$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php if ($page > 1) {?><a href="<?php echo $_SERVER['PHP_SELF']; ?>">처음으로</a><?php } ?>
|
||||
<span>전체 FAQ <?php echo $total_count; ?>건</span>
|
||||
</div>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<ol>
|
||||
<li>FAQ는 무제한으로 등록할 수 있습니다</li>
|
||||
<li><strong>FAQ추가</strong>를 눌러 FAQ Master를 생성합니다. (하나의 FAQ 타이틀 생성 : 자주하시는 질문, 이용안내..등 )</li>
|
||||
<li>생성한 FAQ Master 의 <strong>제목</strong>을 눌러 세부 내용을 관리할 수 있습니다.</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./faqmasterform.php">FAQ추가</a>
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">FAQ수</th>
|
||||
<th scope="col">순서</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$sql1 = " select COUNT(*) as cnt from {$g5['faq_table']} where fm_id = '{$row['fm_id']}' ";
|
||||
$row1 = sql_fetch($sql1);
|
||||
$cnt = $row1['cnt'];
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $row['fm_id']; ?></td>
|
||||
<td><a href="./faqlist.php?fm_id=<?php echo $row['fm_id']; ?>&fm_subject=<?php echo $row['fm_subject']; ?>"><?php echo stripslashes($row['fm_subject']); ?></a></td>
|
||||
<td class="td_num"><?php echo $cnt; ?></td>
|
||||
<td class="td_num"><?php echo $row['fm_order']?></td>
|
||||
<td class="td_mng">
|
||||
<a href="./faqmasterform.php?w=u&fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>수정</a>
|
||||
<a href="<?php echo G5_BBS_URL; ?>/faq.php?fm_id=<?php echo $row['fm_id']; ?>"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>보기</a>
|
||||
<a href="./faqmasterformupdate.php?w=d&fm_id=<?php echo $row['fm_id']; ?>" onclick="return delete_confirm();"><span class="sound_only"><?php echo stripslashes($row['fm_subject']); ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0){
|
||||
echo '<tr><td colspan="5" class="empty_table"><span>자료가 한건도 없습니다.</span></td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?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 (G5_ADMIN_PATH.'/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: 5.9 KiB |
BIN
adm/img/sub_menu_ico.gif
Normal file
BIN
adm/img/sub_menu_ico.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 87 B |
BIN
adm/img/ts01.gif
Normal file
BIN
adm/img/ts01.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 177 B |
BIN
adm/img/ts02.gif
Normal file
BIN
adm/img/ts02.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 188 B |
BIN
adm/img/ts03.gif
Normal file
BIN
adm/img/ts03.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 196 B |
312
adm/index.php
Normal file
312
adm/index.php
Normal file
@ -0,0 +1,312 @@
|
||||
<?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>
|
||||
<h2>신규가입회원 <?php echo $new_member_rows ?>건 목록</h2>
|
||||
<div class="local_desc02 local_desc">
|
||||
총회원수 <?php echo number_format($total_count) ?>명 중 차단 <?php echo number_format($intercept_count) ?>명, 탈퇴 : <?php echo number_format($leave_count) ?>명
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>신규가입회원</caption>
|
||||
<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 class="td_mbid"><?php echo $mb_id ?></td>
|
||||
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>
|
||||
<td class="td_mbname sv_use"><div><?php echo $mb_nick ?></div></td>
|
||||
<td class="td_num"><?php echo $row['mb_level'] ?></td>
|
||||
<td><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>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<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>
|
||||
<h2>최근게시물</h2>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>최근게시물</caption>
|
||||
<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_datetime"><?php echo $datetime ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<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>
|
||||
<h2>최근 포인트 발생내역</h2>
|
||||
<div class="local_desc02 local_desc">
|
||||
전체 <?php echo number_format($total_count) ?> 건 중 <?php echo $new_point_rows ?>건 목록
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>최근 포인트 발생내역</caption>
|
||||
<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_datetime"><?php echo $row['po_datetime'] ?></td>
|
||||
<td><?php echo $link1.$row['po_content'].$link2 ?></td>
|
||||
<td class="td_numbig"><?php echo number_format($row['po_point']) ?></td>
|
||||
<td class="td_numbig"><?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>
|
||||
|
||||
<div class="btn_list03 btn_list">
|
||||
<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');
|
||||
?>
|
||||
86
adm/mail_form.php
Normal file
86
adm/mail_form.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?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');
|
||||
?>
|
||||
|
||||
<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">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</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>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" class="btn_submit" accesskey="s" value="확인">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<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');
|
||||
?>
|
||||
109
adm/mail_list.php
Normal file
109
adm/mail_list.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?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;
|
||||
?>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
<b>테스트</b>는 등록된 최고관리자의 이메일로 테스트 메일을 발송합니다.<br>
|
||||
현재 등록된 메일은 총 <?php echo $total_count ?>건입니다.<br>
|
||||
<strong>주의) 수신자가 동의하지 않은 대량 메일 발송에는 적합하지 않습니다. 수십건 단위로 발송해 주십시오.</strong>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./mail_form.php" id="mail_add">메일내용추가</a>
|
||||
</div>
|
||||
|
||||
<form name="fmaillist" id="fmaillist" action="./mail_delete.php" method="post">
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['ma_subject']; ?> 메일</label>
|
||||
<input type="checkbox" id="chk_<?php echo $i ?>" name="chk[]" value="<?php echo $row['ma_id'] ?>">
|
||||
</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_datetime"><?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_mngsmall"><?php echo $s_vie ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
if (!$i)
|
||||
echo "<tr><td colspan=\"".$colspan."\" class=\"empty_table\">자료가 없습니다.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<button type="submit">선택삭제</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<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>
|
||||
122
adm/mail_select_form.php
Normal file
122
adm/mail_select_form.php
Normal file
@ -0,0 +1,122 @@
|
||||
<?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');
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
전체회원 <?php echo number_format($tot_cnt) ?>명 , 탈퇴대기회원 <?php echo number_format($finish_cnt) ?>명, 정상회원 <?php echo number_format($tot_cnt - $finish_cnt) ?>명 중 메일 발송 대상 선택
|
||||
</div>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 대상선택</caption>
|
||||
<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">권한</th>
|
||||
<td>
|
||||
<label for="mb_level_from" class="sound_only">최소권한</label>
|
||||
<select name="mb_level_from" id="mb_level_from">
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<option value="<?php echo $i ?>"><?php echo $i ?></option>
|
||||
<?php } ?>
|
||||
</select> 에서
|
||||
<label for="mb_level_to" class="sound_only">최대권한</label>
|
||||
<select name="mb_level_to" id="mb_level_to">
|
||||
<?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 name="gr_id" id="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>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit">
|
||||
<a href="./mail_list.php">목록 </a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
123
adm/mail_select_list.php
Normal file
123
adm/mail_select_list.php
Normal file
@ -0,0 +1,123 @@
|
||||
<?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');
|
||||
?>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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";
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<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_mbname"><?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_confirm01 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 = trim($_POST['ma_list']);
|
||||
|
||||
//print_r2($_POST); EXIT;
|
||||
$member_list = explode("\n", conv_unescape_nl($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_admin_email_name'], $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');
|
||||
?>
|
||||
29
adm/member_delete.php
Normal file
29
adm/member_delete.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
|
||||
$mb = get_member($_POST['mb_id']);
|
||||
|
||||
if (!$mb['mb_id'])
|
||||
alert("회원자료가 존재하지 않습니다.");
|
||||
else if ($member['mb_id'] == $mb['mb_id'])
|
||||
alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
|
||||
else if (is_admin($mb['mb_id']) == "super")
|
||||
alert("최고 관리자는 삭제할 수 없습니다.");
|
||||
else if ($mb['mb_level'] >= $member['mb_level'])
|
||||
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
|
||||
|
||||
check_token();
|
||||
|
||||
// 회원자료 삭제
|
||||
member_delete($mb['mb_id']);
|
||||
|
||||
if ($url)
|
||||
goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
|
||||
else
|
||||
goto_url("./member_list.php?$qstr");
|
||||
?>
|
||||
366
adm/member_form.php
Normal file
366
adm/member_form.php
Normal file
@ -0,0 +1,366 @@
|
||||
<?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_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(!isset($mb['mb_addr_jibeon'])) {
|
||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_addr_jibeon` varchar(255) NOT NULL DEFAULT '' AFTER `mb_addr2` ", false);
|
||||
}
|
||||
|
||||
// 건물명필드추가
|
||||
if(!isset($mb['mb_addr3'])) {
|
||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_addr3` varchar(255) NOT NULL DEFAULT '' AFTER `mb_addr2` ", false);
|
||||
}
|
||||
|
||||
// 중복가입 확인필드 추가
|
||||
if(!isset($mb['mb_dupinfo'])) {
|
||||
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_dupinfo` varchar(255) NOT NULL DEFAULT '' AFTER `mb_adult` ", 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="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</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" class="td_addr_line">
|
||||
<label for="mb_zip1" class="sound_only">우편번호 앞자리</label>
|
||||
<input type="text" name="mb_zip1" value="<?php echo $mb['mb_zip1'] ?>" id="mb_zip1" class="frm_input readonly" size="3" maxlength="3"> -
|
||||
<label for="mb_zip2" class="sound_only">우편번호 뒷자리</label>
|
||||
<input type="text" name="mb_zip2" value="<?php echo $mb['mb_zip2'] ?>" id="mb_zip2" class="frm_input readonly" size="3" maxlength="3">
|
||||
<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&frm_addr3=mb_addr3&frm_jibeon=mb_addr_jibeon" id="win_zip" class="win_zip_find btn_frmline" target="_blank">주소 검색</a><br>
|
||||
<input type="text" name="mb_addr1" value="<?php echo $mb['mb_addr1'] ?>" id="mb_addr1" class="frm_input readonly" size="60">
|
||||
<label for="mb_addr1">기본주소</label><br>
|
||||
<input type="text" name="mb_addr2" value="<?php echo $mb['mb_addr2'] ?>" id="mb_addr2" class="frm_input" size="60">
|
||||
<label for="mb_addr2">상세주소</label><br>
|
||||
<input type="text" name="mb_addr3" value="<?php echo $mb['mb_addr3'] ?>" id="mb_addr3" class="frm_input" size="60">
|
||||
<label for="mb_addr3">참고항목</label>
|
||||
<input type="hidden" name="mb_addr_jibeon" value="<?php echo $mb['mb_addr_jibeon']; ?>"><br>
|
||||
<span id="mb_addr_jibeon">지번주소 : <?php echo $mb['mb_addr_jibeon']; ?></span>
|
||||
</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_yes">예</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" name="passive_certify" id="passive_certify">
|
||||
<label for="passive_certify">수동인증</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"><label for="mb_leave_date">탈퇴일자</label></th>
|
||||
<td>
|
||||
<input type="text" name="mb_leave_date" value="<?php echo $mb['mb_leave_date'] ?>" id="mb_leave_date" class="frm_input" maxlength="8">
|
||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_leave_date_set_today" 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; }">
|
||||
<label for="mb_leave_date_set_today">탈퇴일을 오늘로 지정</label>
|
||||
</td>
|
||||
<th scope="row">접근차단일자</th>
|
||||
<td>
|
||||
<input type="text" name="mb_intercept_date" value="<?php echo $mb['mb_intercept_date'] ?>" id="mb_intercept_date" class="frm_input" maxlength="8">
|
||||
<input type="checkbox" value="<?php echo date("Ymd"); ?>" id="mb_intercept_date_set_today" 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; }">
|
||||
<label for="mb_intercept_date_set_today">접근차단일을 오늘로 지정</label>
|
||||
</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" name="mb_<?php echo $i ?>" value="<?php echo $mb['mb_'.$i] ?>" id="mb_<?php echo $i ?>" class="frm_input" size="30" maxlength="255"></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<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');
|
||||
?>
|
||||
162
adm/member_form_update.php
Normal file
162
adm/member_form_update.php
Normal file
@ -0,0 +1,162 @@
|
||||
<?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 = trim($_POST['mb_id']);
|
||||
|
||||
// 휴대폰번호 체크
|
||||
$mb_hp = hyphen_hp_number($_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 = '{$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_addr3 = '{$_POST['mb_addr3']}',
|
||||
mb_addr_jibeon = '{$_POST['mb_addr_jibeon']}',
|
||||
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']);
|
||||
|
||||
// 닉네임중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['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 mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_nick = '{$_POST['mb_nick']}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 닉네임입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
// 이메일중복체크
|
||||
$sql = " select mb_id, mb_name, mb_nick, mb_email from {$g5['member_table']} where mb_email = '{$_POST['mb_email']}' and mb_id <> '$mb_id' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ($row['mb_id'])
|
||||
alert('이미 존재하는 이메일입니다.\\nID : '.$row['mb_id'].'\\n이름 : '.$row['mb_name'].'\\n닉네임 : '.$row['mb_nick'].'\\n메일 : '.$row['mb_email']);
|
||||
|
||||
$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 < 1) $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</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 = 16;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?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>명
|
||||
</div>
|
||||
|
||||
<form id="fsearch" name="fsearch" class="local_sch01 local_sch" method="get">
|
||||
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="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="검색">
|
||||
|
||||
</form>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
회원자료 삭제 시 다른 회원이 기존 회원아이디를 사용하지 못하도록 회원아이디, 이름, 닉네임은 삭제하지 않고 영구 보관합니다.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin == 'super') { ?>
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./member_form.php" id="member_add">회원추가</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head02 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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"><?php echo subject_sort_link('mb_id') ?>아이디</a></th>
|
||||
<th scope="col" id="mb_list_name"><?php echo subject_sort_link('mb_name') ?>이름</a></th>
|
||||
<th scope="col" colspan="6" id="mb_list_cert"><?php echo subject_sort_link('mb_certify', '', 'desc') ?>본인확인</a></th>
|
||||
<th scope="col" id="mb_list_mobile">휴대폰</th>
|
||||
<th scope="col" id="mb_list_auth">상태/<?php echo subject_sort_link('mb_level', '', 'desc') ?>권한</a></th>
|
||||
<th scope="col" id="mb_list_lastcall"><?php echo subject_sort_link('mb_today_login', '', 'desc') ?>최종접속</a></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"><?php echo subject_sort_link('mb_nick') ?>닉네임</a></th>
|
||||
<th scope="col" id="mb_list_mailc"><?php echo subject_sort_link('mb_email_certify', '', 'desc') ?>메일<br>인증</a></th>
|
||||
<th scope="col" id="mb_list_open"><?php echo subject_sort_link('mb_open', '', 'desc') ?>정보<br>공개</a></th>
|
||||
<th scope="col" id="mb_list_mailr"><?php echo subject_sort_link('mb_mailling', '', 'desc') ?>메일<br>수신</a></th>
|
||||
<th scope="col" id="mb_list_sms"><?php echo subject_sort_link('mb_sms', '', 'desc') ?>SMS<br>수신</a></th>
|
||||
<th scope="col" id="mb_list_adultc"><?php echo subject_sort_link('mb_adult', '', 'desc') ?>성인<br>인증</a></th>
|
||||
<th scope="col" id="mb_list_deny"><?php echo subject_sort_link('mb_intercept_date', '', 'desc') ?>접근<br>차단</a></th>
|
||||
<th scope="col" id="mb_list_tel">전화번호</th>
|
||||
<th scope="col" id="mb_list_point"><?php echo subject_sort_link('mb_point', '', 'desc') ?> 포인트</a></th>
|
||||
<th scope="col" id="mb_list_join"><?php echo subject_sort_link('mb_datetime', '', 'desc') ?>가입일</a></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'] ? print_address($row['mb_addr1'], $row['mb_addr2'], $row['mb_addr3']) : '';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
|
||||
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 class="<?php echo $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="6" class="td_mbcert">
|
||||
<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_tel"><?php echo $row['mb_hp']; ?></td>
|
||||
<td headers="mb_list_auth" class="td_mbstat">
|
||||
<?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_numsmall"><?php echo $group ?></td>
|
||||
<td headers="mb_list_mng" rowspan="2" class="td_mngsmall"><?php echo $s_mod ?> <?php echo $s_grp ?></td>
|
||||
</tr>
|
||||
<tr class="<?php echo $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_open" class="td_chk">
|
||||
<label for="mb_open_<?php echo $i; ?>" class="sound_only">정보공개</label>
|
||||
<input type="checkbox" name="mb_open[<?php echo $i; ?>]" <?php echo $row['mb_open']?'checked':''; ?> value="1" id="mb_open_<?php echo $i; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_mailr" class="td_chk">
|
||||
<label for="mb_mailling_<?php echo $i; ?>" class="sound_only">메일수신</label>
|
||||
<input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling']?'checked':''; ?> value="1" id="mb_mailling_<?php echo $i; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_sms" class="td_chk">
|
||||
<label for="mb_sms_<?php echo $i; ?>" class="sound_only">SMS수신</label>
|
||||
<input type="checkbox" name="mb_sms[<?php echo $i; ?>]" <?php echo $row['mb_sms']?'checked':''; ?> value="1" id="mb_sms_<?php echo $i; ?>">
|
||||
</td>
|
||||
<td headers="mb_list_adultc" class="td_chk">
|
||||
<label for="mb_adult_<?php echo $i; ?>" class="sound_only">성인인증</label>
|
||||
<input type="checkbox" name="mb_adult[<?php echo $i; ?>]" <?php echo $row['mb_adult']?'checked':''; ?> value="1" id="mb_adult_<?php echo $i; ?>">
|
||||
</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 ?>">
|
||||
<label for="mb_intercept_date_<?php echo $i; ?>" class="sound_only">접근차단</label>
|
||||
<?php } ?>
|
||||
</td>
|
||||
<td headers="mb_list_tel" class="td_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" class="td_date"><?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>
|
||||
|
||||
<div class="btn_list01 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>
|
||||
|
||||
<?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');
|
||||
?>
|
||||
37
adm/member_list_delete.php
Normal file
37
adm/member_list_delete.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?
|
||||
$sub_menu = "200100";
|
||||
include_once("./_common.php");
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
|
||||
check_token();
|
||||
|
||||
$msg = "";
|
||||
for ($i=0; $i<count($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 type='text/javascript'> alert('$msg'); </script>";
|
||||
|
||||
goto_url("./member_list.php?$qstr");
|
||||
?>
|
||||
76
adm/member_list_update.php
Normal file
76
adm/member_list_update.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?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_sms = '{$_POST['mb_sms'][$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);
|
||||
?>
|
||||
151
adm/menu_form.php
Normal file
151
adm/menu_form.php
Normal file
@ -0,0 +1,151 @@
|
||||
<?php
|
||||
$sub_menu = "100290";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert_close('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$g5['title'] = '메뉴 추가';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
// 코드
|
||||
if($new == 'new' || !$code) {
|
||||
$code = base_convert(substr($code,0, 2), 36, 10);
|
||||
$code += 36;
|
||||
$code = base_convert($code, 10, 36);
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="menu_frm" class="new_win">
|
||||
<h1><?php echo $g5['title']; ?></h1>
|
||||
|
||||
<form name="fmenuform" id="fmenuform">
|
||||
|
||||
<div class="new_win_desc">
|
||||
<label for="me_type">대상선택</label>
|
||||
<select name="me_type" id="me_type">
|
||||
<option value="">직접입력</option>
|
||||
<option value="group">게시판그룹</option>
|
||||
<option value="board">게시판</option>
|
||||
<option value="content">내용관리</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div id="menu_result"></div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#menu_result").load(
|
||||
"./menu_form_search.php"
|
||||
);
|
||||
|
||||
$("#me_type").on("change", function() {
|
||||
var type = $(this).val();
|
||||
|
||||
$("#menu_result").empty().load(
|
||||
"./menu_form_search.php",
|
||||
{ type : type }
|
||||
);
|
||||
});
|
||||
|
||||
$("#add_manual").live("click", function() {
|
||||
var me_name = $.trim($("#me_name").val());
|
||||
var me_link = $.trim($("#me_link").val());
|
||||
|
||||
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
||||
});
|
||||
|
||||
$(".add_select").live("click", function() {
|
||||
var me_name = $.trim($(this).siblings("input[name='subject[]']").val());
|
||||
var me_link = $.trim($(this).siblings("input[name='link[]']").val());
|
||||
|
||||
add_menu_list(me_name, me_link, "<?php echo $code; ?>");
|
||||
});
|
||||
});
|
||||
|
||||
function add_menu_list(name, link, code)
|
||||
{
|
||||
var $menulist = $("#menulist", opener.document);
|
||||
var ms = new Date().getTime();
|
||||
var sub_menu_class;
|
||||
<?php if($new == 'new') { ?>
|
||||
sub_menu_class = " class=\"td_category\"";
|
||||
<?php } else { ?>
|
||||
sub_menu_class = " class=\"td_category sub_menu_class\"";
|
||||
<?php } ?>
|
||||
|
||||
var list = "<tr class=\"menu_list menu_group_<?php echo $code; ?>\">";
|
||||
list += "<td"+sub_menu_class+">";
|
||||
list += "<label for=\"me_name_"+ms+"\" class=\"sound_only\">메뉴<strong class=\"sound_only\"> 필수</strong></label>";
|
||||
list += "<input type=\"hidden\" name=\"code[]\" value=\"<?php echo $code; ?>\">";
|
||||
list += "<input type=\"text\" name=\"me_name[]\" value=\""+name+"\" id=\"me_name_"+ms+"\" required class=\"required frm_input full_input\">";
|
||||
list += "</td>";
|
||||
list += "<td>";
|
||||
list += "<label for=\"me_link_"+ms+"\" class=\"sound_only\">링크<strong class=\"sound_only\"> 필수</strong></label>";
|
||||
list += "<input type=\"text\" name=\"me_link[]\" value=\""+link+"\" id=\"me_link_"+ms+"\" required class=\"required frm_input full_input\">";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mng\">";
|
||||
list += "<label for=\"me_target_"+ms+"\" class=\"sound_only\">새창</label>";
|
||||
list += "<select name=\"me_target[]\" id=\"me_target_"+ms+"\">";
|
||||
list += "<option value=\"self\">사용안함</option>";
|
||||
list += "<option value=\"blank\">사용함</option>";
|
||||
list += "</select>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_numsmall\">";
|
||||
list += "<label for=\"me_order_"+ms+"\" class=\"sound_only\">순서<strong class=\"sound_only\"> 필수</strong></label>";
|
||||
list += "<input type=\"text\" name=\"me_order[]\" value=\"0\" id=\"me_order_"+ms+"\" required class=\"required frm_input\" size=\"5\">";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mngsmall\">";
|
||||
list += "<label for=\"me_use_"+ms+"\" class=\"sound_only\">PC사용</label>";
|
||||
list += "<select name=\"me_use[]\" id=\"me_use_"+ms+"\">";
|
||||
list += "<option value=\"1\">사용함</option>";
|
||||
list += "<option value=\"0\">사용안함</option>";
|
||||
list += "</select>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mngsmall\">";
|
||||
list += "<label for=\"me_mobile_use_"+ms+"\" class=\"sound_only\">모바일사용</label>";
|
||||
list += "<select name=\"me_mobile_use[]\" id=\"me_mobile_use_"+ms+"\">";
|
||||
list += "<option value=\"1\">사용함</option>";
|
||||
list += "<option value=\"0\">사용안함</option>";
|
||||
list += "</select>";
|
||||
list += "</td>";
|
||||
list += "<td class=\"td_mngsmall\">";
|
||||
<?php if($new == 'new') { ?>
|
||||
list += "<button type=\"button\" class=\"btn_add_submenu\">추가</button>";
|
||||
<?php } ?>
|
||||
list += "<button type=\"button\" class=\"btn_del_menu\">삭제</button>";
|
||||
list += "</td>";
|
||||
list += "</tr>";
|
||||
|
||||
var $menu_last = null;
|
||||
|
||||
if(code)
|
||||
$menu_last = $menulist.find("tr.menu_group_"+code+":last");
|
||||
else
|
||||
$menu_last = $menulist.find("tr.menu_list:last");
|
||||
|
||||
if($menu_last.size() > 0) {
|
||||
$menu_last.after(list);
|
||||
} else {
|
||||
if($menulist.find("#empty_menu_list").size() > 0)
|
||||
$menulist.find("#empty_menu_list").remove();
|
||||
|
||||
$menulist.find("table tbody").append(list);
|
||||
}
|
||||
|
||||
$menulist.find("tr.menu_list").each(function(index) {
|
||||
$(this).removeClass("bg0 bg1")
|
||||
.addClass("bg"+(index % 2));
|
||||
});
|
||||
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
111
adm/menu_form_search.php
Normal file
111
adm/menu_form_search.php
Normal file
@ -0,0 +1,111 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
die('최고관리자만 접근 가능합니다.');
|
||||
|
||||
switch($type) {
|
||||
case 'group':
|
||||
$sql = " select gr_id as id, gr_subject as subject
|
||||
from {$g5['group_table']}
|
||||
order by gr_order, gr_id ";
|
||||
break;
|
||||
case 'board':
|
||||
$sql = " select bo_table as id, bo_subject as subject
|
||||
from {$g5['board_table']}
|
||||
order by bo_order, bo_table ";
|
||||
break;
|
||||
case 'content':
|
||||
$sql = " select co_id as id, co_subject as subject
|
||||
from {$g5['content_table']}
|
||||
order by co_id ";
|
||||
break;
|
||||
default:
|
||||
$sql = '';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($sql) {
|
||||
$result = sql_query($sql);
|
||||
|
||||
for($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
if($i == 0) {
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">제목</th>
|
||||
<th scope="col">선택</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?php }
|
||||
switch($type) {
|
||||
case 'group':
|
||||
$link = G5_BBS_URL.'/group.php?gr_id='.$row['id'];
|
||||
break;
|
||||
case 'board':
|
||||
$link = G5_BBS_URL.'/board.php?bo_table='.$row['id'];
|
||||
break;
|
||||
case 'content':
|
||||
$link = G5_BBS_URL.'/content.php?co_id='.$row['id'];
|
||||
break;
|
||||
default:
|
||||
$link = '';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td><?php echo $row['subject']; ?></td>
|
||||
<td class="td_mngsmall">
|
||||
<input type="hidden" name="subject[]" value="<?php echo preg_replace('/[\'\"]/', '', $row['subject']); ?>">
|
||||
<input type="hidden" name="link[]" value="<?php echo $link; ?>">
|
||||
<button type="button" class="add_select"><span class="sound_only"><?php echo $row['subject']; ?> </span>선택</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_win02 btn_win">
|
||||
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_2">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="me_name">메뉴<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td><input type="text" name="me_name" id="me_name" required class="frm_input required"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="me_link">링크<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('링크는 http://를 포함해서 입력해 주세요.'); ?>
|
||||
<input type="text" name="me_link" id="me_link" required class="frm_input full_input required">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_win02 btn_win">
|
||||
<button type="button" id="add_manual" class="btn_submit">추가</button>
|
||||
<button type="button" class="btn_cancel" onclick="window.close();">창닫기</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
204
adm/menu_list.php
Normal file
204
adm/menu_list.php
Normal file
@ -0,0 +1,204 @@
|
||||
<?php
|
||||
$sub_menu = "100290";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
// 메뉴테이블 생성
|
||||
if( !isset($g5['menu_table']) ){
|
||||
die('<meta charset="utf-8">dbconfig.php 파일에 <strong>$g5[\'menu_table\'] = G5_TABLE_PREFIX.\'menu\';</strong> 를 추가해 주세요.');
|
||||
}
|
||||
|
||||
if(!sql_query(" DESCRIBE {$g5['menu_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['menu_table']}` (
|
||||
`me_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`me_code` varchar(255) NOT NULL DEFAULT '',
|
||||
`me_name` varchar(255) NOT NULL DEFAULT '',
|
||||
`me_link` varchar(255) NOT NULL DEFAULT '',
|
||||
`me_target` varchar(255) NOT NULL DEFAULT '0',
|
||||
`me_order` int(11) NOT NULL DEFAULT '0',
|
||||
`me_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`me_mobile_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`me_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['menu_table']} order by me_id ";
|
||||
$result = sql_query($sql);
|
||||
|
||||
$g5['title'] = "메뉴설정";
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p><strong>주의!</strong> 메뉴설정 작업 후 반드시 <strong>확인</strong>을 누르셔야 저장됩니다.</p>
|
||||
</div>
|
||||
|
||||
<form name="fmenulist" id="fmenulist" method="post" action="./menu_list_update.php" onsubmit="return fmenulist_submit(this);">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>">
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<button type="button" onclick="return add_menu();">메뉴추가<span class="sound_only"> 새창</span></button>
|
||||
</div>
|
||||
|
||||
<div id="menulist" class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">메뉴</th>
|
||||
<th scope="col">링크</th>
|
||||
<th scope="col">새창</th>
|
||||
<th scope="col">순서</th>
|
||||
<th scope="col">PC사용</th>
|
||||
<th scope="col">모바일사용</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$bg = 'bg'.($i%2);
|
||||
$sub_menu_class = '';
|
||||
if(strlen($row['me_code']) == 4) {
|
||||
$sub_menu_class = ' sub_menu_class';
|
||||
$sub_menu_info = '<span class="sound_only">'.$row['me_name'].'의 서브</span>';
|
||||
$sub_menu_ico = '<span class="sub_menu_ico"></span>';
|
||||
}
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?> menu_list menu_group_<?php echo substr($row['me_code'], 0, 2); ?>">
|
||||
<td class="td_category<?php echo $sub_menu_class; ?>">
|
||||
<input type="hidden" name="code[]" value="<?php echo substr($row['me_code'], 0, 2) ?>">
|
||||
<label for="me_name_<?php echo $i; ?>" class="sound_only"><?php echo $sub_menu_info; ?> 메뉴<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="me_name[]" value="<?php echo $row['me_name'] ?>" id="me_name_<?php echo $i; ?>" required class="required frm_input full_input">
|
||||
</td>
|
||||
<td>
|
||||
<label for="me_link_<?php echo $i; ?>" class="sound_only">링크<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="me_link[]" value="<?php echo $row['me_link'] ?>" id="me_link_<?php echo $i; ?>" required class="required frm_input full_input">
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<label for="me_target_<?php echo $i; ?>" class="sound_only">새창</label>
|
||||
<select name="me_target[]" id="me_target_<?php echo $i; ?>">
|
||||
<option value="self"<?php echo get_selected($row['me_target'], 'self', true); ?>>사용안함</option>
|
||||
<option value="blank"<?php echo get_selected($row['me_target'], 'blank', true); ?>>사용함</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_num">
|
||||
<label for="me_order_<?php echo $i; ?>" class="sound_only">순서</label>
|
||||
<input type="text" name="me_order[]" value="<?php echo $row['me_order'] ?>" id="me_order_<?php echo $i; ?>" class="frm_input" size="5">
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<label for="me_use_<?php echo $i; ?>" class="sound_only">PC사용</label>
|
||||
<select name="me_use[]" id="me_use_<?php echo $i; ?>">
|
||||
<option value="1"<?php echo get_selected($row['me_use'], '1', true); ?>>사용함</option>
|
||||
<option value="0"<?php echo get_selected($row['me_use'], '0', true); ?>>사용안함</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<label for="me_mobile_use_<?php echo $i; ?>" class="sound_only">모바일사용</label>
|
||||
<select name="me_mobile_use[]" id="me_mobile_use_<?php echo $i; ?>">
|
||||
<option value="1"<?php echo get_selected($row['me_mobile_use'], '1', true); ?>>사용함</option>
|
||||
<option value="0"<?php echo get_selected($row['me_mobile_use'], '0', true); ?>>사용안함</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="td_mng">
|
||||
<?php if(strlen($row['me_code']) == 2) { ?>
|
||||
<button type="button" class="btn_add_submenu">추가</button>
|
||||
<?php } ?>
|
||||
<button type="button" class="btn_del_menu">삭제</button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i==0)
|
||||
echo '<tr id="empty_menu_list"><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" name="act_button" value="확인" class="btn_submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(".btn_add_submenu").live("click", function() {
|
||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||
add_submenu(code);
|
||||
});
|
||||
|
||||
$(".btn_del_menu").live("click", function() {
|
||||
if(!confirm("메뉴를 삭제하시겠습니까?"))
|
||||
return false;
|
||||
|
||||
var $tr = $(this).closest("tr");
|
||||
if($tr.find("td.sub_menu_class").size() > 0) {
|
||||
$tr.remove();
|
||||
} else {
|
||||
var code = $(this).closest("tr").find("input[name='code[]']").val().substr(0, 2);
|
||||
$("tr.menu_group_"+code).remove();
|
||||
}
|
||||
|
||||
if($("#menulist tr.menu_list").size() < 1) {
|
||||
var list = "<tr id=\"empty_menu_list\"><td colspan=\"<?php echo $colspan; ?>\" class=\"empty_table\">자료가 없습니다.</td></tr>\n";
|
||||
$("#menulist table tbody").append(list);
|
||||
} else {
|
||||
$("#menulist tr.menu_list").each(function(index) {
|
||||
$(this).removeClass("bg0 bg1")
|
||||
.addClass("bg"+(index % 2));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function add_menu()
|
||||
{
|
||||
var max_code = base_convert(0, 10, 36);
|
||||
$("#menulist tr.menu_list").each(function() {
|
||||
var me_code = $(this).find("input[name='code[]']").val().substr(0, 2);
|
||||
if(max_code < me_code)
|
||||
max_code = me_code;
|
||||
});
|
||||
|
||||
var url = "./menu_form.php?code="+max_code+"&new=new";
|
||||
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
||||
return false;
|
||||
}
|
||||
|
||||
function add_submenu(code)
|
||||
{
|
||||
var url = "./menu_form.php?code="+code;
|
||||
window.open(url, "add_menu", "left=100,top=100,width=550,height=650,scrollbars=yes,resizable=yes");
|
||||
return false;
|
||||
}
|
||||
|
||||
function base_convert(number, frombase, tobase) {
|
||||
// discuss at: http://phpjs.org/functions/base_convert/
|
||||
// original by: Philippe Baumann
|
||||
// improved by: Rafał Kukawski (http://blog.kukawski.pl)
|
||||
// example 1: base_convert('A37334', 16, 2);
|
||||
// returns 1: '101000110111001100110100'
|
||||
|
||||
return parseInt(number + '', frombase | 0)
|
||||
.toString(tobase | 0);
|
||||
}
|
||||
|
||||
function fmenulist_submit(f)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
70
adm/menu_list_update.php
Normal file
70
adm/menu_list_update.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
$sub_menu = "100290";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
check_token();
|
||||
|
||||
// 이전 메뉴정보 삭제
|
||||
$sql = " delete from {$g5['menu_table']} ";
|
||||
sql_query($sql);
|
||||
|
||||
$group_code = null;
|
||||
$primary_code = null;
|
||||
$count = count($_POST['code']);
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$_POST = array_map_deep('trim', $_POST);
|
||||
|
||||
$code = $_POST['code'][$i];
|
||||
$me_name = $_POST['me_name'][$i];
|
||||
$me_link = $_POST['me_link'][$i];
|
||||
|
||||
if(!$code || !$me_name || !$me_link)
|
||||
continue;
|
||||
|
||||
$sub_code = '';
|
||||
if($group_code == $code) {
|
||||
$sql = " select MAX(SUBSTRING(me_code,3,2)) as max_me_code
|
||||
from {$g5['menu_table']}
|
||||
where SUBSTRING(me_code,1,2) = '$primary_code' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$sub_code = base_convert($row['max_me_code'], 36, 10);
|
||||
$sub_code += 36;
|
||||
$sub_code = base_convert($sub_code, 10, 36);
|
||||
|
||||
$me_code = $primary_code.$sub_code;
|
||||
} else {
|
||||
$sql = " select MAX(SUBSTRING(me_code,1,2)) as max_me_code
|
||||
from {$g5['menu_table']}
|
||||
where LENGTH(me_code) = '2' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$me_code = base_convert($row['max_me_code'], 36, 10);
|
||||
$me_code += 36;
|
||||
$me_code = base_convert($me_code, 10, 36);
|
||||
|
||||
$group_code = $code;
|
||||
$primary_code = $me_code;
|
||||
}
|
||||
|
||||
// 메뉴 등록
|
||||
$sql = " insert into {$g5['menu_table']}
|
||||
set me_code = '$me_code',
|
||||
me_name = '$me_name',
|
||||
me_link = '$me_link',
|
||||
me_target = '{$_POST['me_target'][$i]}',
|
||||
me_order = '{$_POST['me_order'][$i]}',
|
||||
me_use = '{$_POST['me_use'][$i]}',
|
||||
me_mobile_use = '{$_POST['me_mobile_use'][$i]}' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./menu_list.php');
|
||||
?>
|
||||
147
adm/newwinform.php
Normal file
147
adm/newwinform.php
Normal file
@ -0,0 +1,147 @@
|
||||
<?php
|
||||
$sub_menu = '100310';
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$html_title = "팝업레이어";
|
||||
if ($w == "u")
|
||||
{
|
||||
$html_title .= " 수정";
|
||||
$sql = " select * from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||
$nw = sql_fetch($sql);
|
||||
if (!$nw['nw_id']) alert("등록된 자료가 없습니다.");
|
||||
}
|
||||
else
|
||||
{
|
||||
$html_title .= " 입력";
|
||||
$nw['nw_device'] = 'both';
|
||||
$nw['nw_disable_hours'] = 24;
|
||||
$nw['nw_left'] = 10;
|
||||
$nw['nw_top'] = 10;
|
||||
$nw['nw_width'] = 450;
|
||||
$nw['nw_height'] = 500;
|
||||
$nw['nw_content_html'] = 2;
|
||||
}
|
||||
|
||||
$g5['title'] = $html_title;
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
|
||||
<form name="frmnewwin" action="./newwinformupdate.php" onsubmit="return frmnewwin_check(this);" method="post">
|
||||
<input type="hidden" name="w" value="<?php echo $w; ?>">
|
||||
<input type="hidden" name="nw_id" value="<?php echo $nw_id; ?>">
|
||||
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>쇼핑몰 초기화면 접속 시 자동으로 뜰 팝업레이어를 설정합니다.</p>
|
||||
</div>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_device">접속기기</label></th>
|
||||
<td>
|
||||
<?php echo help("팝업레이어가 표시될 접속기기를 설정합니다."); ?>
|
||||
<select name="nw_device" id="nw_device">
|
||||
<option value="both"<?php echo get_selected($nw['nw_device'], 'both', true); ?>>PC와 모바일</option>
|
||||
<option value="pc"<?php echo get_selected($nw['nw_device'], 'pc'); ?>>PC</option>
|
||||
<option value="mobile"<?php echo get_selected($nw['nw_device'], 'mobile'); ?>>모바일</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_disable_hours">시간<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("고객이 다시 보지 않음을 선택할 시 몇 시간동안 팝업레이어를 보여주지 않을지 설정합니다."); ?>
|
||||
<input type="text" name="nw_disable_hours" value="<?php echo $nw['nw_disable_hours']; ?>" id="nw_disable_hours" required class="frm_input required" size="5"> 시간
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_begin_time">시작일시<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_begin_time" value="<?php echo $nw['nw_begin_time']; ?>" id="nw_begin_time" required class="frm_input required" size="21" maxlength="19">
|
||||
<input type="checkbox" name="nw_begin_chk" value="<?php echo date("Y-m-d 00:00:00", G5_SERVER_TIME); ?>" id="nw_begin_chk" onclick="if (this.checked == true) this.form.nw_begin_time.value=this.form.nw_begin_chk.value; else this.form.nw_begin_time.value = this.form.nw_begin_time.defaultValue;">
|
||||
<label for="nw_begin_chk">시작일시를 오늘로</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_end_time">종료일시<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_end_time" value="<?php echo $nw['nw_end_time']; ?>" id="nw_end_time" required class="frm_input required" size="21" maxlength="19">
|
||||
<input type="checkbox" name="nw_end_chk" value="<?php echo date("Y-m-d 23:59:59", G5_SERVER_TIME+(60*60*24*7)); ?>" id="nw_end_chk" onclick="if (this.checked == true) this.form.nw_end_time.value=this.form.nw_end_chk.value; else this.form.nw_end_time.value = this.form.nw_end_time.defaultValue;">
|
||||
<label for="nw_end_chk">종료일시를 오늘로부터 7일 후로</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_left">팝업레이어 좌측 위치<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_left" value="<?php echo $nw['nw_left']; ?>" id="nw_left" required class="frm_input required" size="5"> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_top">팝업레이어 상단 위치<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_top" value="<?php echo $nw['nw_top']; ?>" id="nw_top" required class="frm_input required" size="5"> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_width">팝업레이어 넓이<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_width" value="<?php echo $nw['nw_width'] ?>" id="nw_width" required class="frm_input required" size="5"> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_height">팝업레이어 높이<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_height" value="<?php echo $nw['nw_height'] ?>" id="nw_height" required class="frm_input required" size="5"> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_subject">팝업 제목<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="nw_subject" value="<?php echo stripslashes($nw['nw_subject']) ?>" id="nw_subject" required class="frm_input required" size="80">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="nw_content">내용</label></th>
|
||||
<td><?php echo editor_html('nw_content', $nw['nw_content']); ?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./newwinlist.php">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function frmnewwin_check(f)
|
||||
{
|
||||
errmsg = "";
|
||||
errfld = "";
|
||||
|
||||
<?php echo get_editor_js('nw_content'); ?>
|
||||
|
||||
check_field(f.nw_subject, "제목을 입력하세요.");
|
||||
|
||||
if (errmsg != "") {
|
||||
alert(errmsg);
|
||||
errfld.focus();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
51
adm/newwinformupdate.php
Normal file
51
adm/newwinformupdate.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
$sub_menu = '100310';
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($w == "u" || $w == "d")
|
||||
check_demo();
|
||||
|
||||
if ($W == 'd')
|
||||
auth_check($auth[$sub_menu], "d");
|
||||
else
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
$sql_common = " nw_device = '$nw_device',
|
||||
nw_begin_time = '$nw_begin_time',
|
||||
nw_end_time = '$nw_end_time',
|
||||
nw_disable_hours = '$nw_disable_hours',
|
||||
nw_left = '$nw_left',
|
||||
nw_top = '$nw_top',
|
||||
nw_height = '$nw_height',
|
||||
nw_width = '$nw_width',
|
||||
nw_subject = '$nw_subject',
|
||||
nw_content = '$nw_content',
|
||||
nw_content_html = '$nw_content_html' ";
|
||||
|
||||
if($w == "")
|
||||
{
|
||||
$sql = " insert {$g5['new_win_table']} set $sql_common ";
|
||||
sql_query($sql);
|
||||
|
||||
$nw_id = mysql_insert_id();
|
||||
}
|
||||
else if ($w == "u")
|
||||
{
|
||||
$sql = " update {$g5['new_win_table']} set $sql_common where nw_id = '$nw_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
else if ($w == "d")
|
||||
{
|
||||
$sql = " delete from {$g5['new_win_table']} where nw_id = '$nw_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
if ($w == "d")
|
||||
{
|
||||
goto_url('./newwinlist.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
goto_url("./newwinform.php?w=u&nw_id=$nw_id");
|
||||
}
|
||||
?>
|
||||
118
adm/newwinlist.php
Normal file
118
adm/newwinlist.php
Normal file
@ -0,0 +1,118 @@
|
||||
<?php
|
||||
$sub_menu = '100310';
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
if( !isset($g5['new_win_table']) ){
|
||||
die('<meta charset="utf-8">/data/dbconfig.php 파일에 <strong>$g5[\'new_win_table\'] = G5_TABLE_PREFIX.\'new_win\';</strong> 를 추가해 주세요.');
|
||||
}
|
||||
//내용(컨텐츠)정보 테이블이 있는지 검사한다.
|
||||
if(!sql_query(" DESCRIBE {$g5['new_win_table']} ", false)) {
|
||||
if(sql_query(" DESCRIBE {$g5['g5_shop_new_win_table']} ", false)) {
|
||||
sql_query(" ALTER TABLE {$g5['g5_shop_new_win_table']} RENAME TO `{$g5['new_win_table']}` ;", false);
|
||||
} else {
|
||||
$query_cp = sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['new_win_table']}` (
|
||||
`nw_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`nw_device` varchar(10) NOT NULL DEFAULT 'both',
|
||||
`nw_begin_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`nw_end_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`nw_disable_hours` int(11) NOT NULL DEFAULT '0',
|
||||
`nw_left` int(11) NOT NULL DEFAULT '0',
|
||||
`nw_top` int(11) NOT NULL DEFAULT '0',
|
||||
`nw_height` int(11) NOT NULL DEFAULT '0',
|
||||
`nw_width` int(11) NOT NULL DEFAULT '0',
|
||||
`nw_subject` text NOT NULL,
|
||||
`nw_content` text NOT NULL,
|
||||
`nw_content_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`nw_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
}
|
||||
}
|
||||
|
||||
$g5['title'] = '팝업레이어 관리';
|
||||
include_once (G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$sql_common = " from {$g5['new_win_table']} ";
|
||||
|
||||
// 테이블의 전체 레코드수만 얻음
|
||||
$sql = " select count(*) as cnt " . $sql_common;
|
||||
$row = sql_fetch($sql);
|
||||
$total_count = $row['cnt'];
|
||||
|
||||
$sql = "select * $sql_common order by nw_id desc ";
|
||||
$result = sql_query($sql);
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">전체 <?php echo $total_count; ?>건</div>
|
||||
|
||||
<div class="btn_add01 btn_add">
|
||||
<a href="./newwinform.php">새창관리추가</a>
|
||||
</div>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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">Left</th>
|
||||
<th scope="col">Top</th>
|
||||
<th scope="col">Width</th>
|
||||
<th scope="col">Height</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=mysql_fetch_array($result); $i++) {
|
||||
$bg = 'bg'.($i%2);
|
||||
|
||||
switch($row['nw_device']) {
|
||||
case 'pc':
|
||||
$nw_device = 'PC';
|
||||
break;
|
||||
case 'mobile':
|
||||
$nw_device = '모바일';
|
||||
break;
|
||||
default:
|
||||
$nw_device = '모두';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $row['nw_id']; ?></td>
|
||||
<td><?php echo $row['nw_subject']; ?></td>
|
||||
<td class="td_device"><?php echo $nw_device; ?></td>
|
||||
<td class="td_datetime"><?php echo substr($row['nw_begin_time'],2,14); ?></td>
|
||||
<td class="td_datetime"><?php echo substr($row['nw_end_time'],2,14); ?></td>
|
||||
<td class="td_num"><?php echo $row['nw_disable_hours']; ?>시간</td>
|
||||
<td class="td_num"><?php echo $row['nw_left']; ?>px</td>
|
||||
<td class="td_num"><?php echo $row['nw_top']; ?>px</td>
|
||||
<td class="td_num"><?php echo $row['nw_width']; ?>px</td>
|
||||
<td class="td_num"><?php echo $row['nw_height']; ?>px</td>
|
||||
<td class="td_mngsmall">
|
||||
<a href="./newwinform.php?w=u&nw_id=<?php echo $row['nw_id']; ?>"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>수정</a>
|
||||
<a href="./newwinformupdate.php?w=d&nw_id=<?php echo $row['nw_id']; ?>" onclick="return delete_confirm();"><span class="sound_only"><?php echo $row['nw_subject']; ?> </span>삭제</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0) {
|
||||
echo '<tr><td colspan="11" class="empty_table">자료가 한건도 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<?php
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
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";
|
||||
?>
|
||||
265
adm/point_list.php
Normal file
265
adm/point_list.php
Normal file
@ -0,0 +1,265 @@
|
||||
<?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 < 1) $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</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>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?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 } ?>
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<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="검색">
|
||||
</form>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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"><?php echo subject_sort_link('mb_id') ?>회원아이디</a></th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">닉네임</th>
|
||||
<th scope="col"><?php echo subject_sort_link('po_content') ?>포인트 내용</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('po_point') ?>포인트</a></th>
|
||||
<th scope="col"><?php echo subject_sort_link('po_datetime') ?>일시</a></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';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<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"><?php echo $row['po_content'] ?> 내역</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_datetime"><?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>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<input type="submit" name="act_button" value="선택삭제" onclick="document.pressed=this.value">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?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">
|
||||
<h2 class="h2_frm">개별회원 포인트 증감 설정</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 ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<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>
|
||||
|
||||
<div class="btn_confirm01 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);
|
||||
?>
|
||||
115
adm/poll_form.php
Normal file
115
adm/poll_form.php
Normal file
@ -0,0 +1,115 @@
|
||||
<?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');
|
||||
?>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<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>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
<a href="./poll_list.php?<?php echo $qstr ?>">목록</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?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);
|
||||
?>
|
||||
163
adm/poll_list.php
Normal file
163
adm/poll_list.php
Normal file
@ -0,0 +1,163 @@
|
||||
<?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 < 1) $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '투표관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 7;
|
||||
?>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
투표수 <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<div class="sch_last">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<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="검색">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="btn_add01 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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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 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>';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo cut_str(get_text($row['po_subject']),70) ?> 투표</label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>">
|
||||
</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_mngsmall"><?php echo $s_mod ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i==0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<button type="submit">선택삭제</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?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');
|
||||
?>
|
||||
171
adm/popular_list.php
Normal file
171
adm/popular_list.php
Normal file
@ -0,0 +1,171 @@
|
||||
<?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 < 1) { $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="local_ov01 local_ov">전체목록</a>';
|
||||
|
||||
$g5['title'] = '인기검색어관리';
|
||||
include_once('./admin.head.php');
|
||||
|
||||
$colspan = 4;
|
||||
?>
|
||||
|
||||
<script>
|
||||
var list_update_php = '';
|
||||
var list_delete_php = 'popular_list.php';
|
||||
</script>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
건수 : <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch01 local_sch" method="get">
|
||||
<div class="sch_last">
|
||||
<label for="sfl" class="sound_only">검색대상</label>
|
||||
<select name="sfl" id="sfl">
|
||||
<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">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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"><?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']);
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $word ?></label>
|
||||
<input type="checkbox" name="chk[]" value="<?php echo $row['pp_id'] ?>" id="chk_<?php echo $i ?>">
|
||||
</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>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ($is_admin == 'super'){ ?>
|
||||
<div class="btn_list01 btn_list">
|
||||
<button type="submit">선택삭제</button>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</form>
|
||||
|
||||
<?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');
|
||||
?>
|
||||
112
adm/popular_rank.php
Normal file
112
adm/popular_rank.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
$sub_menu = "300400";
|
||||
include_once('./_common.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 < 1) { $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 = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</a>';
|
||||
|
||||
$g5['title'] = '인기검색어순위';
|
||||
include_once('./admin.head.php');
|
||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.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>
|
||||
|
||||
<div class="local_ov01 local_ov">
|
||||
<?php echo $listall ?>
|
||||
건수 <?php echo number_format($total_count) ?>개
|
||||
</div>
|
||||
|
||||
<form name="fsearch" id="fsearch" class="local_sch02 local_sch" method="get">
|
||||
<div class="sch_last">
|
||||
<strong>기간별검색</strong>
|
||||
<input type="text" name="fr_date" value="<?php echo $fr_date ?>" id="fr_date" class="frm_input" size="11" maxlength="10">
|
||||
<label for="fr_date" class="sound_only">시작일</label>
|
||||
~
|
||||
<input type="text" name="to_date" value="<?php echo $to_date ?>" id="to_date" class="frm_input" size="11" maxlength="10">
|
||||
<label for="to_date" class="sound_only">종료일</label>
|
||||
<input type="submit" class="btn_submit" value="검색">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<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 ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<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_numbig"><?php echo $row['cnt'] ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?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');
|
||||
?>
|
||||
335
adm/qa_config.php
Normal file
335
adm/qa_config.php
Normal file
@ -0,0 +1,335 @@
|
||||
<?php
|
||||
$sub_menu = "300500";
|
||||
include_once('./_common.php');
|
||||
include_once(G5_EDITOR_LIB);
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$token = get_token();
|
||||
|
||||
$g5['title'] = '1:1문의 설정';
|
||||
include_once ('./admin.head.php');
|
||||
|
||||
// DB 테이블 생성
|
||||
if(!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['qa_config_table']}` (
|
||||
`qa_title` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_category` varchar(255) NOT NULL DEFAULT'',
|
||||
`qa_skin` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_mobile_skin` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_use_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_req_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_use_hp` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_req_hp` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_use_sms` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_send_number` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_admin_hp` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_use_editor` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_subject_len` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_mobile_subject_len` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_page_rows` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_mobile_page_rows` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_image_width` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_upload_size` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_insert_content` text NOT NULL,
|
||||
`qa_include_head` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_include_tail` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_content_head` text NOT NULL,
|
||||
`qa_content_tail` text NOT NULL,
|
||||
`qa_mobile_content_head` text NOT NULL,
|
||||
`qa_mobile_content_tail` text NOT NULL,
|
||||
`qa_1_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT ''
|
||||
)", true);
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['qa_content_table']}` (
|
||||
`qa_id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`qa_num` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_parent` int(11) NOT NULL DEFAULT '0',
|
||||
`qa_related` int(11) NOT NULL DEFAULT '0',
|
||||
`mb_id` varchar(20) NOT NULL DEFAULT '',
|
||||
`qa_name` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_email` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_hp` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_type` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_category` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_email_recv` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_sms_recv` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_html` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_subject` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_content` text NOT NULL,
|
||||
`qa_status` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`qa_file1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_source1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_file2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_source2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_ip` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`qa_1` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_2` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_3` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_4` varchar(255) NOT NULL DEFAULT '',
|
||||
`qa_5` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`qa_id`),
|
||||
KEY `qa_num_parent` (`qa_num`,`qa_parent`)
|
||||
)", true);
|
||||
}
|
||||
|
||||
$sql = " SHOW COLUMNS FROM `{$g5['qa_content_table']}` LIKE 'qa_content' ";
|
||||
$row = sql_fetch($sql);
|
||||
if(strpos($row['Type'], 'text') === false) {
|
||||
sql_query(" ALTER TABLE `{$g5['qa_content_table']}` CHANGE `qa_content` `qa_content` text NOT NULL ", true);
|
||||
}
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
|
||||
if(empty($qaconfig)) {
|
||||
$sql = " insert into `{$g5['qa_config_table']}`
|
||||
( qa_title, qa_category, qa_skin, qa_mobile_skin, qa_use_email, qa_req_email, qa_use_hp, qa_req_hp, qa_use_editor, qa_subject_len, qa_mobile_subject_len, qa_page_rows, qa_mobile_page_rows, qa_image_width, qa_upload_size, qa_insert_content )
|
||||
values
|
||||
( '1:1문의', '회원|포인트', 'basic', 'basic', '1', '0', '1', '0', '1', '60', '30', '15', '15', '600', '1048576', '' ) ";
|
||||
sql_query($sql);
|
||||
|
||||
$qaconfig = get_qa_config();
|
||||
}
|
||||
|
||||
// 관리자 이메일필드 추가
|
||||
if(!isset($qaconfig['qa_admin_email'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['qa_config_table']}`
|
||||
ADD `qa_admin_email` varchar(255) NOT NULL DEFAULT '' AFTER `qa_admin_hp` ", true);
|
||||
}
|
||||
|
||||
// 상단 하단 설정 필드 추가
|
||||
if(!isset($qaconfig['qa_include_head'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['qa_config_table']}`
|
||||
ADD `qa_include_head` varchar(255) NOT NULL DEFAULT '' AFTER `qa_insert_content`,
|
||||
ADD `qa_include_tail` varchar(255) NOT NULL DEFAULT '' AFTER `qa_include_head`,
|
||||
ADD `qa_content_head` text NOT NULL AFTER `qa_include_tail`,
|
||||
ADD `qa_content_tail` text NOT NULL AFTER `qa_content_head`,
|
||||
ADD `qa_mobile_content_head` text NOT NULL AFTER `qa_content_tail`,
|
||||
ADD `qa_mobile_content_tail` text NOT NULL AFTER `qa_mobile_content_head` ", true);
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="fqaconfigform" id="fqaconfigform" method="post" onsubmit="return fqaconfigform_submit(this);" autocomplete="off">
|
||||
<input type="hidden" name="token" value="<?php echo $token ?>" id="token">
|
||||
|
||||
<section id="anc_cf_qa_config">
|
||||
<h2 class="h2_frm">1:1문의 설정</h2>
|
||||
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption>1:1문의 설정</caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_title">타이틀<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_title" value="<?php echo $qaconfig['qa_title'] ?>" id="qa_title" required class="required frm_input" size="40">
|
||||
<a href="<?php echo G5_BBS_URL; ?>/qalist.php" class="btn_frmline">1:1문의 바로가기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_category">분류<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?>
|
||||
<input type="text" name="qa_category" value="<?php echo $qaconfig['qa_category'] ?>" id="qa_category" required class="required frm_input" size="70">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_skin_select('qa', 'qa_skin', 'qa_skin', $qaconfig['qa_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_skin">모바일 스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_mobile_skin_select('qa', 'qa_mobile_skin', 'qa_mobile_skin', $qaconfig['qa_mobile_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">이메일 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="qa_use_email" value="1" id="qa_use_email" <?php echo $qaconfig['qa_use_email']?'checked':''; ?>> <label for="qa_use_email">보이기</label>
|
||||
<input type="checkbox" name="qa_req_email" value="1" id="qa_req_email" <?php echo $qaconfig['qa_req_email']?'checked':''; ?>> <label for="qa_req_email">필수입력</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">휴대폰 입력</th>
|
||||
<td>
|
||||
<input type="checkbox" name="qa_use_hp" value="1" id="qa_use_hp" <?php echo $qaconfig['qa_use_hp']?'checked':''; ?>> <label for="qa_use_hp">보이기</label>
|
||||
<input type="checkbox" name="qa_req_hp" value="1" id="qa_req_hp" <?php echo $qaconfig['qa_req_hp']?'checked':''; ?>> <label for="qa_req_hp">필수입력</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_use_sms">SMS 알림</label></th>
|
||||
<td>
|
||||
<?php echo help('휴대폰 입력을 사용하실 경우 문의글 등록시 등록자가 답변등록시 SMS 알림 수신을 선택할 수 있도록 합니다.<br>SMS 알림을 사용하기 위해서는 기본환경설정 > <a href="'.G5_ADMIN_URL.'/config_form.php#anc_cf_sms">SMS 설정</a>을 하셔야 합니다.') ?>
|
||||
<select name="qa_use_sms" id="qa_use_sms">
|
||||
<?php echo option_selected(0, $qaconfig['qa_use_sms'], '사용안함'); ?>
|
||||
<?php echo option_selected(1, $qaconfig['qa_use_sms'], '사용함'); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_send_number">SMS 발신번호</label></th>
|
||||
<td>
|
||||
<?php echo help('SMS 알림 전송시 발신번호로 사용됩니다.'); ?>
|
||||
<input type="text" name="qa_send_number" value="<?php echo $qaconfig['qa_send_number'] ?>" id="qa_send_number" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_admin_hp">관리자 휴대폰번호</label></th>
|
||||
<td>
|
||||
<?php echo help('관리자 휴대폰번호를 입력하시면 문의글 등록시 등록하신 번호로 SMS 알림이 전송됩니다.<br>SMS 알림을 사용하지 않으시면 알림이 전송되지 않습니다.'); ?>
|
||||
<input type="text" name="qa_admin_hp" value="<?php echo $qaconfig['qa_admin_hp'] ?>" id="qa_admin_hp" class="frm_input" size="30">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_admin_email">관리자 이메일</label></th>
|
||||
<td>
|
||||
<?php echo help('관리자 이메일을 입력하시면 문의글 등록시 등록하신 이메일로 알림이 전송됩니다.'); ?>
|
||||
<input type="text" name="qa_admin_email" value="<?php echo $qaconfig['qa_admin_email'] ?>" id="qa_admin_email" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_use_editor">DHTML 에디터 사용</label></th>
|
||||
<td>
|
||||
<?php echo help('글작성시 내용을 DHTML 에디터 기능으로 사용할 것인지 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.'); ?>
|
||||
<select name="qa_use_editor" id="qa_use_editor">
|
||||
<?php echo option_selected(0, $qaconfig['qa_use_editor'], '사용안함'); ?>
|
||||
<?php echo option_selected(1, $qaconfig['qa_use_editor'], '사용함'); ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_subject_len">제목 길이<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('목록에서의 제목 글자수') ?>
|
||||
<input type="text" name="qa_subject_len" value="<?php echo $qaconfig['qa_subject_len'] ?>" id="qa_subject_len" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_subject_len">모바일 제목 길이<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('목록에서의 제목 글자수') ?>
|
||||
<input type="text" name="qa_mobile_subject_len" value="<?php echo $qaconfig['qa_mobile_subject_len'] ?>" id="qa_mobile_subject_len" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_page_rows">페이지당 목록 수<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_page_rows" value="<?php echo $qaconfig['qa_page_rows'] ?>" id="qa_page_rows" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_page_rows">모바일 페이지당 목록 수<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_mobile_page_rows" value="<?php echo $qaconfig['qa_mobile_page_rows'] ?>" id="qa_mobile_page_rows" required class="required numeric frm_input" size="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_image_width">이미지 폭 크기<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('게시판에서 출력되는 이미지의 폭 크기') ?>
|
||||
<input type="text" name="qa_image_width" value="<?php echo $qaconfig['qa_image_width'] ?>" id="qa_image_width" required class="required numeric frm_input" size="4"> 픽셀
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_upload_size">파일 업로드 용량<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help('최대 '.ini_get("upload_max_filesize").' 이하 업로드 가능, 1 MB = 1,048,576 bytes') ?>
|
||||
업로드 파일 한개당 <input type="text" name="qa_upload_size" value="<?php echo $qaconfig['qa_upload_size'] ?>" id="qa_upload_size" required class="required numeric frm_input" size="10"> bytes 이하
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_include_head">상단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_include_head" value="<?php echo $qaconfig['qa_include_head'] ?>" id="qa_include_head" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_include_tail">하단 파일 경로</label></th>
|
||||
<td>
|
||||
<input type="text" name="qa_include_tail" value="<?php echo $qaconfig['qa_include_tail'] ?>" id="qa_include_tail" class="frm_input" size="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content_head">상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_content_head", $qaconfig['qa_content_head']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_content_tail">하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_content_tail", $qaconfig['qa_content_tail']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_content_head">모바일 상단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_mobile_content_head", $qaconfig['qa_mobile_content_head']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_mobile_content_tail">모바일 하단 내용</label></th>
|
||||
<td>
|
||||
<?php echo editor_html("qa_mobile_content_tail", $qaconfig['qa_mobile_content_tail']); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="qa_insert_content">글쓰기 기본 내용</label></th>
|
||||
<td>
|
||||
<textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo $qaconfig['qa_insert_content'] ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<?php for ($i=1; $i<=5; $i++) { ?>
|
||||
<tr>
|
||||
<th scope="row">여분필드<?php echo $i ?></th>
|
||||
<td class="td_extra">
|
||||
<label for="qa_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label>
|
||||
<input type="text" name="qa_<?php echo $i ?>_subj" id="qa_<?php echo $i ?>_subj" value="<?php echo get_text($qaconfig['qa_'.$i.'_subj']) ?>" class="frm_input">
|
||||
<label for="qa_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label>
|
||||
<input type="text" name="qa_<?php echo $i ?>" value="<?php echo get_text($qaconfig['qa_'.$i]) ?>" id="qa_<?php echo $i ?>" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fqaconfigform_submit(f)
|
||||
{
|
||||
<?php echo get_editor_js("qa_content_head"); ?>
|
||||
<?php echo get_editor_js("qa_content_tail"); ?>
|
||||
<?php echo get_editor_js("qa_mobile_content_head"); ?>
|
||||
<?php echo get_editor_js("qa_mobile_content_tail"); ?>
|
||||
|
||||
f.action = "./qa_config_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
51
adm/qa_config_update.php
Normal file
51
adm/qa_config_update.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
$sub_menu = "300500";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_token();
|
||||
|
||||
$sql = " update {$g5['qa_config_table']}
|
||||
set qa_title = '{$_POST['qa_title']}',
|
||||
qa_category = '{$_POST['qa_category']}',
|
||||
qa_skin = '{$_POST['qa_skin']}',
|
||||
qa_mobile_skin = '{$_POST['qa_mobile_skin']}',
|
||||
qa_use_email = '{$_POST['qa_use_email']}',
|
||||
qa_req_email = '{$_POST['qa_req_email']}',
|
||||
qa_use_hp = '{$_POST['qa_use_hp']}',
|
||||
qa_req_hp = '{$_POST['qa_req_hp']}',
|
||||
qa_use_sms = '{$_POST['qa_use_sms']}',
|
||||
qa_send_number = '{$_POST['qa_send_number']}',
|
||||
qa_admin_hp = '{$_POST['qa_admin_hp']}',
|
||||
qa_admin_email = '{$_POST['qa_admin_email']}',
|
||||
qa_use_editor = '{$_POST['qa_use_editor']}',
|
||||
qa_subject_len = '{$_POST['qa_subject_len']}',
|
||||
qa_mobile_subject_len = '{$_POST['qa_mobile_subject_len']}',
|
||||
qa_page_rows = '{$_POST['qa_page_rows']}',
|
||||
qa_mobile_page_rows = '{$_POST['qa_mobile_page_rows']}',
|
||||
qa_image_width = '{$_POST['qa_image_width']}',
|
||||
qa_upload_size = '{$_POST['qa_upload_size']}',
|
||||
qa_insert_content = '{$_POST['qa_insert_content']}',
|
||||
qa_include_head = '{$_POST['qa_include_head']}',
|
||||
qa_include_tail = '{$_POST['qa_include_tail']}',
|
||||
qa_content_head = '{$_POST['qa_content_head']}',
|
||||
qa_content_tail = '{$_POST['qa_content_tail']}',
|
||||
qa_mobile_content_head = '{$_POST['qa_mobile_content_head']}',
|
||||
qa_mobile_content_tail = '{$_POST['qa_mobile_content_tail']}',
|
||||
qa_1_subj = '{$_POST['qa_1_subj']}',
|
||||
qa_2_subj = '{$_POST['qa_2_subj']}',
|
||||
qa_3_subj = '{$_POST['qa_3_subj']}',
|
||||
qa_4_subj = '{$_POST['qa_4_subj']}',
|
||||
qa_5_subj = '{$_POST['qa_5_subj']}',
|
||||
qa_1 = '{$_POST['qa_1']}',
|
||||
qa_2 = '{$_POST['qa_2']}',
|
||||
qa_3 = '{$_POST['qa_3']}',
|
||||
qa_4 = '{$_POST['qa_4']}',
|
||||
qa_5 = '{$_POST['qa_5']}' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url('./qa_config.php');
|
||||
?>
|
||||
65
adm/sendmail_test.php
Normal file
65
adm/sendmail_test.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?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_admin_email_name'], $config['cf_admin_email'], trim($email[$i]), '[메일검사] 제목', '<span style="font-size:9pt;">[메일검사] 내용<p>이 내용이 제대로 보인다면 보내는 메일 서버에는 이상이 없는것입니다.<p>'.G5_TIME_YMDHIS.'<p>이 메일 주소로는 회신되지 않습니다.</span>', 1);
|
||||
|
||||
echo '<section>';
|
||||
echo '<h2>결과메세지</h2>';
|
||||
echo '<div class="local_desc01 local_desc"><p>';
|
||||
echo '다음 '.count($email).'개의 메일 주소로 테스트 메일 발송이 완료되었습니다.';
|
||||
echo '</p></div>';
|
||||
echo '<ul>';
|
||||
for ($i=0;$i<count($email);$i++) {
|
||||
echo '<li>'.$email[$i].'</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '<div class="local_desc02 local_desc"><p>';
|
||||
echo '해당 주소로 테스트 메일이 도착했는지 확인해 주십시오.<br>';
|
||||
echo '만약, 테스트 메일이 오지 않는다면 더 다양한 계정의 메일 주소로 메일을 보내 보십시오.<br>';
|
||||
echo '그래도 메일이 하나도 도착하지 않는다면 메일 서버(sendmail server)의 오류일 가능성이 높으니, 웹 서버관리자에게 문의하여 주십시오.<br>';
|
||||
echo '</p></div>';
|
||||
echo '</section>';
|
||||
}
|
||||
?>
|
||||
|
||||
<section>
|
||||
<h2>테스트 메일 발송</h2>
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
메일서버가 정상적으로 동작 중인지 확인할 수 있습니다.<br>
|
||||
아래 입력칸에 테스트 메일을 발송하실 메일 주소를 입력하시면, [메일검사] 라는 제목으로 테스트 메일을 발송합니다.<br>
|
||||
</p>
|
||||
</div>
|
||||
<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>
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
만약 [메일검사] 라는 내용으로 테스트 메일이 도착하지 않는다면 보내는 메일서버 혹은 받는 메일서버 중 문제가 발생했을 가능성이 있습니다.<br>
|
||||
따라서 보다 정확한 테스트를 원하신다면 여러 곳으로 테스트 메일을 발송하시기 바랍니다.<br>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
61
adm/session_file_delete.php
Normal file
61
adm/session_file_delete.php
Normal file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
$sub_menu = "100800";
|
||||
include_once("./_common.php");
|
||||
|
||||
if ($is_admin != "super")
|
||||
alert("최고관리자만 접근 가능합니다.", G5_URL);
|
||||
|
||||
$g5['title'] = "세션파일 일괄삭제";
|
||||
include_once("./admin.head.php");
|
||||
?>
|
||||
|
||||
<div class="local_desc02 local_desc">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?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 '<div class="local_desc01 local_desc"><p><strong>세션데이터 '.$cnt.'건 삭제 완료됐습니다.</strong><br>프로그램의 실행을 끝마치셔도 좋습니다.</p></div>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<?php
|
||||
include_once("./admin.tail.php");
|
||||
?>
|
||||
15
adm/sms_admin/_common.php
Normal file
15
adm/sms_admin/_common.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
define('G5_IS_ADMIN', true);
|
||||
include_once ('../../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
|
||||
if (!strstr($_SERVER['PHP_SELF'], 'install.php')) {
|
||||
if(!mysql_num_rows(mysql_query(" show tables like '{$g5['sms5_config_table']}' ")))
|
||||
goto_url('install.php');
|
||||
|
||||
// SMS 설정값 배열변수
|
||||
//$sms5 = sql_fetch("select * from ".$g5['sms5_config_table'] );
|
||||
}
|
||||
|
||||
add_stylesheet('<link rel="stylesheet" href="'.G5_SMS5_ADMIN_URL.'/css/sms5.css">', 0);
|
||||
?>
|
||||
51
adm/sms_admin/ajax.hp_chk.php
Normal file
51
adm/sms_admin/ajax.hp_chk.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
$sub_menu = "900800";
|
||||
include_once("./_common.php");
|
||||
@include_once(G5_PLUGIN_PATH."/sms5/JSON.php");
|
||||
|
||||
if( !function_exists('json_encode') ) {
|
||||
function json_encode($data) {
|
||||
$json = new Services_JSON();
|
||||
return( $json->encode($data) );
|
||||
}
|
||||
}
|
||||
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$err = '';
|
||||
$arr_ajax_msg = array();
|
||||
$exist_hplist = array();
|
||||
|
||||
if( !$bk_hp )
|
||||
$err = '휴대폰번호를 입력해 주십시오.';
|
||||
|
||||
$bk_hp = get_hp($bk_hp);
|
||||
|
||||
$sql = " select count(*) as cnt from {$g5['sms5_book_table']} where bk_hp = '$bk_hp' ";
|
||||
if($w == 'u' && $bk_no)
|
||||
$sql .= " and bk_no <> '$bk_no' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if($row['cnt'])
|
||||
$err = '같은 번호가 존재합니다.';
|
||||
|
||||
// 수정일 때 회원정보에서 중복체크
|
||||
if(!$row['cnt'] && $w == 'u') {
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_hp = '{$bk_hp}' and mb_hp <> '' ";
|
||||
|
||||
if( $mb_id )
|
||||
$sql .= " and mb_id <> '{$mb_id}' ";
|
||||
|
||||
$result = sql_query($sql);
|
||||
|
||||
while($row = sql_fetch_array($result)){
|
||||
$exist_hplist[] = $row['mb_id'];
|
||||
}
|
||||
}
|
||||
|
||||
$arr_ajax_msg['error'] = $err;
|
||||
$arr_ajax_msg['exist'] = $exist_hplist;
|
||||
|
||||
die( json_encode($arr_ajax_msg) );
|
||||
|
||||
?>
|
||||
83
adm/sms_admin/ajax.sms_write_form.php
Normal file
83
adm/sms_admin/ajax.sms_write_form.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
@include_once(G5_PLUGIN_PATH."/sms5/JSON.php");
|
||||
|
||||
if( !function_exists('json_encode') ) {
|
||||
function json_encode($data) {
|
||||
$json = new Services_JSON();
|
||||
return( $json->encode($data) );
|
||||
}
|
||||
}
|
||||
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$page_size = 6;
|
||||
|
||||
if (!$page) $page = 1;
|
||||
|
||||
if (is_numeric($fg_no))
|
||||
$sql_group = " and fg_no='$fg_no' ";
|
||||
else
|
||||
$sql_group = "";
|
||||
|
||||
if ($st == 'all') {
|
||||
$sql_search = "and (fo_name like '%{$sv}%' or fo_content like '%{$sv}%')";
|
||||
} else if ($st == 'name') {
|
||||
$sql_search = "and fo_name like '%{$sv}%'";
|
||||
} else if ($st == 'content') {
|
||||
$sql_search = "and fo_content like '%{$sv}%'";
|
||||
} else {
|
||||
$sql_search = '';
|
||||
}
|
||||
|
||||
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where 1 $sql_group $sql_search");
|
||||
$total_count = $total_res['cnt'];
|
||||
|
||||
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
|
||||
$page_start = $page_size * ( $page - 1 );
|
||||
|
||||
$vnum = $total_count - (($page-1) * $page_size);
|
||||
|
||||
$group = array();
|
||||
$qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name");
|
||||
while ($res = sql_fetch_array($qry)) array_push($group, $res);
|
||||
|
||||
$res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where fg_no=0");
|
||||
$no_count = $res['cnt'];
|
||||
|
||||
$count = 1;
|
||||
$qry = sql_query("select * from {$g5['sms5_form_table']} where 1 $sql_group $sql_search order by fo_no desc limit $page_start, $page_size");
|
||||
$list_text = "";
|
||||
|
||||
if( !$total_count ){
|
||||
$list_text .="
|
||||
<li class=\"empty_list\">
|
||||
데이터가 없습니다.
|
||||
</li>
|
||||
";
|
||||
}
|
||||
while($res = sql_fetch_array($qry))
|
||||
{
|
||||
$tmp = sql_fetch("select fg_name from {$g5['sms5_form_group_table']} where fg_no='{$res['fg_no']}'");
|
||||
if (!$tmp)
|
||||
$group_name = '미분류';
|
||||
else
|
||||
$group_name = $tmp['fg_name'];
|
||||
$list_text .="
|
||||
<li class=\"screen_list sms5_box\">
|
||||
<span class=\"box_ico\"></span>
|
||||
<textarea readonly class=\"sms_textarea box_txt box_square\" onclick=\"emoticon_list.go({$res['fo_no']})\">{$res['fo_content']}</textarea>
|
||||
<textarea id=\"fo_contents_{$res['fo_no']}\" style=\"display:none\">{$res['fo_content']}</textarea>
|
||||
<strong class=\"emo_tit\">".cut_str($res['fo_name'],20)."</strong>
|
||||
</li>
|
||||
";
|
||||
}
|
||||
|
||||
$arr_ajax_msg['error'] = "";
|
||||
$arr_ajax_msg['list_text'] = $list_text;
|
||||
$arr_ajax_msg['page'] = $page;
|
||||
$arr_ajax_msg['total_count'] = $total_count;
|
||||
$arr_ajax_msg['total_page'] = $total_page;
|
||||
die( json_encode($arr_ajax_msg) );
|
||||
?>
|
||||
43
adm/sms_admin/ajax.sms_write_group.php
Normal file
43
adm/sms_admin/ajax.sms_write_group.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
|
||||
$colspan = 3;
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$no_group = sql_fetch("select * from {$g5['sms5_book_group_table']} where bg_no=1");
|
||||
|
||||
$group = array();
|
||||
$qry = sql_query("select * from {$g5['sms5_book_group_table']} where bg_no>1 order by bg_name");
|
||||
while ($res = sql_fetch_array($qry)) array_push($group, $res);
|
||||
?>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">그룹명</th>
|
||||
<th scope="col">수신가능</th>
|
||||
<th scope="col">추가</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="javascript:sms_obj.person(1)"><?php echo $no_group['bg_name']?></a></td>
|
||||
<td class="td_num"><?php echo number_format($no_group['bg_receipt'])?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="btn_frmline" onclick="sms_obj.group_add(1, '<?php echo $no_group['bg_name']?>', '<?php echo number_format($no_group['bg_receipt'])?>')">추가</button></td>
|
||||
</tr>
|
||||
<?php
|
||||
$line = 1;
|
||||
for ($i=0; $i<count($group); $i++) {
|
||||
$bg = 'bg'.($line++%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td><a href="javascript:sms_obj.person(<?php echo $group[$i]['bg_no']?>)"><?php echo $group[$i]['bg_name']?></a></td>
|
||||
<td class="td_num"><?php echo number_format($group[$i]['bg_receipt'])?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="btn_frmline" onclick="sms_obj.group_add(<?php echo $group[$i]['bg_no']?>, '<?php echo $group[$i]['bg_name']?>', '<?php echo number_format($group[$i]['bg_receipt'])?>')">추가</button></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
57
adm/sms_admin/ajax.sms_write_level.php
Normal file
57
adm/sms_admin/ajax.sms_write_level.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
@include_once(G5_PLUGIN_PATH."/sms5/JSON.php");
|
||||
|
||||
if( !function_exists('json_encode') ) {
|
||||
function json_encode($data) {
|
||||
$json = new Services_JSON();
|
||||
return( $json->encode($data) );
|
||||
}
|
||||
}
|
||||
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$lev = array();
|
||||
|
||||
for ($i=1; $i<=10; $i++)
|
||||
{
|
||||
$lev[$i] = 0;
|
||||
}
|
||||
|
||||
$qry = sql_query("select mb_level, count(*) as cnt from {$g5['member_table']} where mb_sms=1 and not (mb_hp='') group by mb_level");
|
||||
|
||||
while ($row = sql_fetch_array($qry))
|
||||
{
|
||||
$lev[$row['mb_level']] = $row['cnt'];
|
||||
}
|
||||
$str_json = array();
|
||||
$tmp_str = '';
|
||||
$tmp_str .= '
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">권한</th>
|
||||
<th scope="col">수신가능</th>
|
||||
<th scope="col">추가</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
$bg = 'bg'.($line++%2);
|
||||
$tmp_str .= '
|
||||
<tr class="'.$bg.'">
|
||||
<td>'.$i.' 레벨</td>
|
||||
<td class="td_numbig">'.number_format($lev[$i]).'</td>
|
||||
<td class="td_mng"><button type="button" class="btn_frmline" onclick="sms_obj.level_add('.$i.', \''.number_format($lev[$i]).'\')">추가</button></td>
|
||||
</tr>';
|
||||
}
|
||||
$tmp_str .= '
|
||||
</tbody>
|
||||
</table>
|
||||
</div>';
|
||||
|
||||
$str_json['html'] = $tmp_str;
|
||||
echo json_encode($str_json);
|
||||
?>
|
||||
166
adm/sms_admin/ajax.sms_write_person.php
Normal file
166
adm/sms_admin/ajax.sms_write_person.php
Normal file
@ -0,0 +1,166 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
|
||||
$page_size = 10;
|
||||
$colspan = 5;
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = "휴대폰번호 관리";
|
||||
|
||||
if ($page < 1) $page = 1;
|
||||
|
||||
if (is_numeric($bg_no))
|
||||
$sql_group = " and bg_no='$bg_no' ";
|
||||
else
|
||||
$sql_group = "";
|
||||
|
||||
if ($st == 'all') {
|
||||
$sql_search = "and (bk_name like '%{$sv}%' or bk_hp like '%{$sv}%')";
|
||||
} else if ($st == 'name') {
|
||||
$sql_search = "and bk_name like '%{$sv}%'";
|
||||
} else if ($st == 'hp') {
|
||||
$sql_search = "and bk_hp like '%{$sv}%'";
|
||||
} else {
|
||||
$sql_search = '';
|
||||
}
|
||||
|
||||
if ($ap > 0)
|
||||
$sql_korean = korean_index('bk_name', $ap-1);
|
||||
else {
|
||||
$sql_korean = '';
|
||||
$ap = 0;
|
||||
}
|
||||
|
||||
if ($no_hp == 'yes') {
|
||||
set_cookie('cookie_no_hp', 'yes', 60*60*24*365);
|
||||
$no_hp_checked = 'checked';
|
||||
} else if ($no_hp == 'no') {
|
||||
set_cookie('cookie_no_hp', '', 0);
|
||||
$no_hp_checked = '';
|
||||
} else {
|
||||
if (get_cookie('cookie_no_hp') == 'yes')
|
||||
$no_hp_checked = 'checked';
|
||||
else
|
||||
$no_hp_checked = '';
|
||||
}
|
||||
|
||||
//if ($no_hp_checked == 'checked')
|
||||
$sql_no_hp = "and bk_hp <> '' and bk_receipt=1";
|
||||
|
||||
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_book_table']} where 1 $sql_group $sql_search $sql_korean $sql_no_hp");
|
||||
$total_count = $total_res['cnt'];
|
||||
|
||||
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
|
||||
$page_start = $page_size * ( $page - 1 );
|
||||
|
||||
$vnum = $total_count - (($page-1) * $page_size);
|
||||
|
||||
$res = sql_fetch("select count(*) as cnt from {$g5['sms5_book_table']} where bk_receipt=1 $sql_group $sql_search $sql_korean $sql_no_hp");
|
||||
$receipt_count = $res['cnt'];
|
||||
$reject_count = $total_count - $receipt_count;
|
||||
|
||||
$res = sql_fetch("select count(*) as cnt from {$g5['sms5_book_table']} where mb_id='' $sql_group $sql_search $sql_korean $sql_no_hp");
|
||||
$no_member_count = $res['cnt'];
|
||||
$member_count = $total_count - $no_member_count;
|
||||
|
||||
$no_group = sql_fetch("select * from {$g5['sms5_book_group_table']} where bg_no=1");
|
||||
|
||||
$group = array();
|
||||
$qry = sql_query("select * from {$g5['sms5_book_group_table']} where bg_no>1 order by bg_name");
|
||||
while ($res = sql_fetch_array($qry)) array_push($group, $res);
|
||||
?>
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">
|
||||
<label for="all_checked" class="sound_only">회원 전체</label>
|
||||
<input type="checkbox" id="all_checked" onclick="sms_obj.book_all_checked(this.checked)">
|
||||
</th>
|
||||
<th scope="col">이름</th>
|
||||
<th scope="col">휴대폰번호</th>
|
||||
<th scope="col">등급</th>
|
||||
<th scope="col">추가</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!$total_count) { ?>
|
||||
<tr>
|
||||
<td colspan="<?php echo $colspan?>" class="td_mbstat">데이터가 없습니다.</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
$line = 0;
|
||||
$qry = sql_query("select * from {$g5['sms5_book_table']} where 1 $sql_group $sql_search $sql_korean $sql_no_hp order by bk_no desc limit $page_start, $page_size");
|
||||
while($res = sql_fetch_array($qry))
|
||||
{
|
||||
$bg = 'bg'.($line++%2);
|
||||
|
||||
$tmp = sql_fetch("select bg_name from {$g5['sms5_book_group_table']} where bg_no='{$res['bg_no']}'");
|
||||
if (!$tmp)
|
||||
$group_name = '미분류';
|
||||
else
|
||||
$group_name = $tmp['bg_name'];
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_chk">
|
||||
<label for="bk_no_<?php echo $res['bk_no']; ?>" class="sound_only"><?php echo $res['bk_name']?></label>
|
||||
<input type="checkbox" name="bk_no" value="<?php echo $res['bk_no']?>" id="bk_no_<?php echo $res['bk_no']; ?>">
|
||||
</td>
|
||||
<!-- <td class="td_name"><?php echo $group_name?></td> -->
|
||||
<td class="td_mbname"><?php echo $res['bk_name']?></td>
|
||||
<td><?php echo $res['bk_hp']?></td>
|
||||
<!-- <td class="td_boolean"><?php echo $res['bk_receipt'] ? '수신' : '거부'?></td> -->
|
||||
<!-- <td class="td_boolean"><?php echo $res['bk_receipt'] ? '예' : ''?></td> -->
|
||||
<td class="td_boolean"><?php echo $res['mb_id'] ? '회원' : '비회원'?></td>
|
||||
<td class="td_mngsmall"><button type="button" class="btn_frmline" onclick="sms_obj.person_add(<?php echo $res['bk_no']?>, '<?php echo $res['bk_name']?>', '<?php echo $res['bk_hp']?>')">추가</button></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_list01 btn_list">
|
||||
<button type="button" onclick="sms_obj.person_multi_add()">선택추가</button>
|
||||
<button type="button" onclick="sms_obj.triggerclick('#book_group')" >그룹목록</button>
|
||||
</div>
|
||||
|
||||
<nav class="pg_wrap">
|
||||
<span class="pg" id="person_pg"></span>
|
||||
</nav>
|
||||
|
||||
<form name="search_form" id="sms_person_form" method="get" action="<?php echo $_SERVER['PHP_SELF']?>">
|
||||
<input type="hidden" name="total_pg" value="<?php echo $total_page?>">
|
||||
<input type="hidden" name="page" value="<?php echo $page?>">
|
||||
<input type="hidden" name="bg_no" value="<?php echo $bg_no?>">
|
||||
|
||||
<label for="bg_no" class="sound_only">그룹</label>
|
||||
<select name="bg_no" id="bg_no">
|
||||
<option value=""<?php echo get_selected('', $bg_no); ?>> 전체 </option>
|
||||
<option value="1"<?php echo get_selected(1, $bg_no); ?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_receipt'])?> 명) </option>
|
||||
<?php for($i=0; $i<count($group); $i++) {?>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>" <?php echo get_selected($bg_no, $group[$i]['bg_no']); ?>> <?php echo $group[$i]['bg_name']?> (<?php echo number_format($group[$i]['bg_receipt'])?> 명) </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<label for="stt" class="sound_only">검색대상</label>
|
||||
<select name="st" id="stt">
|
||||
<option value="all"<?php echo get_selected('all', $st); ?>>이름 + 번호</option>
|
||||
<option value="name"<?php echo get_selected('name', $st); ?>>이름</option>
|
||||
<option value="hp"<?php echo get_selected('hp', $st); ?>>번호</option>
|
||||
</select>
|
||||
|
||||
<label for="svv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" size="15" name="sv" value="<?php echo $sv?>" id="svv" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</form>
|
||||
|
||||
<!--
|
||||
총 건수 : <?php echo number_format($total_count)?> /
|
||||
회원 : <?php echo number_format($member_count)?> /
|
||||
비회원 : <?php echo number_format($no_member_count)?> /
|
||||
수신 : <?php echo number_format($receipt_count)?> /
|
||||
거부 : <?php echo number_format($reject_count)?>
|
||||
-->
|
||||
172
adm/sms_admin/config.php
Normal file
172
adm/sms_admin/config.php
Normal file
@ -0,0 +1,172 @@
|
||||
<?php
|
||||
$sub_menu = "900100";
|
||||
include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = "SMS 기본설정";
|
||||
|
||||
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
||||
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
||||
|
||||
if ($config['cf_icode_id'] && $config['cf_icode_pw'])
|
||||
{
|
||||
$res = get_sock('http://www.icodekorea.com/res/userinfo.php?userid='.$config['cf_icode_id'].'&userpw='.$config['cf_icode_pw']);
|
||||
$res = explode(';', $res);
|
||||
$userinfo = array(
|
||||
'code' => $res[0], // 결과코드
|
||||
'coin' => $res[1], // 고객 잔액 (충전제만 해당)
|
||||
'gpay' => $res[2], // 고객의 건수 별 차감액 표시 (충전제만 해당)
|
||||
'payment' => $res[3] // 요금제 표시, A:충전제, C:정액제
|
||||
);
|
||||
}
|
||||
|
||||
if (!$config['cf_icode_id'])
|
||||
$config['cf_icode_id'] = 'sir_';
|
||||
|
||||
if (!$sms5['cf_skin'])
|
||||
$sms5['cf_skin'] = 'basic';
|
||||
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
?>
|
||||
<?php if (!$config['cf_icode_pw']) { ?>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
SMS 기능을 사용하시려면 먼저 아이코드에 서비스 신청을 하셔야 합니다.<br>
|
||||
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank">아이코드 서비스 신청하기</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
?>
|
||||
<form name="fconfig" method="post" action="./config_update.php" enctype="multipart/form-data" >
|
||||
<input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']?>">
|
||||
<input type="hidden" name="cf_sms_use" value="<?php echo $config['cf_sms_use']?>">
|
||||
<div class="tbl_frm01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?></caption>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
|
||||
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" required class="frm_input required">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?>
|
||||
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw" required class="frm_input required">
|
||||
<?php if (!$config['cf_icode_pw']) { ?>현재 비밀번호가 입력되어 있지 않습니다.<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">요금제</th>
|
||||
<td>
|
||||
<?php
|
||||
if ($userinfo['payment'] == 'A') {
|
||||
echo '충전제';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7295">';
|
||||
} else if ($userinfo['payment'] == 'C') {
|
||||
echo '정액제';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7296">';
|
||||
} else {
|
||||
echo '가입해주세요.';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7295">';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($userinfo['payment'] == 'A') { ?>
|
||||
<tr>
|
||||
<th scope="row">충전 잔액</th>
|
||||
<td>
|
||||
<?php echo number_format($userinfo['coin'])?> 원
|
||||
<input type="button" value="충전하기" class="btn_frmline" onclick="window.open('http://icodekorea.com/company/credit_card_input.php?icode_id=<?php echo $config['cf_icode_id']?>&icode_passwd=<?php echo $config['cf_icode_pw']?>','icode_payment','width=650,height=500')">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">건별 금액</th>
|
||||
<td><?php echo number_format($userinfo['gpay'])?> 원</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_phone">회신번호<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("회신받을 휴대폰 번호를 입력하세요. '-' 를 꼭 입력하세요.<br>예) 010-123-4567"); ?>
|
||||
<input type="text" name="cf_phone" value="<?php echo $sms5['cf_phone']; ?>" id="cf_phone" required class="frm_input required" size="12">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_member">회원간 문자전송</label></th>
|
||||
<td>
|
||||
<?php echo help("허용에 체크하면 회원끼리 문자전송이 가능합니다.");?>
|
||||
<input type="checkbox" name="cf_member" value="1" id="cf_member" <?php echo get_checked(1, $sms5['cf_member']); ?>> <label for="cf_member">허용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_level">문자전송가능 레벨</label></th>
|
||||
<td>
|
||||
<?php echo help("문자전송을 허용할 회원레벨을 선택해주세요.");?>
|
||||
<select name="cf_level" id="cf_level">
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<option value="<?php echo $i?>"<?php echo get_selected($i, $sms5['cf_level']);?>> <?php echo $i?> </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
레벨 이상
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_point">문자전송 차감 포인트<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("회원이 문자를 전송할시에 차감할 포인트를 입력해주세요. 0이면 포인트를 차감하지 않습니다.");?>
|
||||
<input type="text" name="cf_point" value="<?php echo $sms5['cf_point']; ?>" id="cf_point" required class="frm_input required" size="5">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_day_count">문자전송 하루제한 갯수<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("회원이 하루에 보낼수 있는 문자 갯수를 입력해주세요. 0이면 제한하지 않습니다.");?>
|
||||
<input type="text" name="cf_day_count" value="<?php echo $sms5['cf_day_count']; ?>" id="cf_day_count" required class="frm_input required" size="5">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo get_sms5_skin_select('skin', 'cf_skin', 'cf_skin', $sms5['cf_skin'], 'required'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
<input type="submit" value="확인" class="btn_submit" accesskey="s">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<section>
|
||||
<h2 class="h2_frm">SMS 문자전송 서비스를 사용할 수 없습니다.</h2>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
SMS 를 사용하지 않고 있기 때문에, 문자 전송을 할 수 없습니다.<br>
|
||||
SMS 사용 설정은 <a href="../config_form.php#anc_cf_sms" class="btn_frmline">환경설정 > 기본환경설정 > SMS설정</a> 에서 SMS 사용을 아이코드로 변경해 주셔야 사용하실수 있습니다.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
?>
|
||||
49
adm/sms_admin/config_update.php
Normal file
49
adm/sms_admin/config_update.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
$sub_menu = "900100";
|
||||
include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
|
||||
check_demo();
|
||||
|
||||
$g5['title'] = "SMS 기본설정";
|
||||
|
||||
$res = get_sock("http://www.icodekorea.com/res/userinfo.php?userid=$cf_icode_id&userpw=$cf_icode_pw");
|
||||
$res = explode(';', $res);
|
||||
$userinfo = array(
|
||||
'code' => $res[0], // 결과코드
|
||||
'coin' => $res[1], // 고객 잔액 (충전제만 해당)
|
||||
'gpay' => $res[2], // 고객의 건수 별 차감액 표시 (충전제만 해당)
|
||||
'payment' => $res[3] // 요금제 표시, A:충전제, C:정액제
|
||||
);
|
||||
|
||||
if ($userinfo['code'] == '202')
|
||||
alert('아이코드 아이디와 패스워드가 맞지 않습니다.');
|
||||
|
||||
if ($cf_member == '1')
|
||||
$cf_member = 1;
|
||||
else
|
||||
$cf_member = 0;
|
||||
|
||||
$res = sql_fetch("select * from ".$g5['sms5_config_table']." limit 1");
|
||||
|
||||
if (!$res)
|
||||
$sql = "insert into ";
|
||||
else
|
||||
$sql = "update ";
|
||||
|
||||
$sql .= $g5['sms5_config_table']." set cf_phone='$cf_phone', cf_member='$cf_member', cf_level='$cf_level', cf_point='$cf_point', cf_day_count='$cf_day_count', cf_skin = '$cf_skin' ";
|
||||
|
||||
sql_query($sql);
|
||||
|
||||
// 아이코드 설정
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_sms_use = '$cf_sms_use',
|
||||
cf_icode_id = '$cf_icode_id',
|
||||
cf_icode_pw = '$cf_icode_pw',
|
||||
cf_icode_server_ip = '$cf_icode_server_ip',
|
||||
cf_icode_server_port = '$cf_icode_server_port' ";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url("./config.php");
|
||||
?>
|
||||
140
adm/sms_admin/css/sms5.css
Normal file
140
adm/sms_admin/css/sms5.css
Normal file
@ -0,0 +1,140 @@
|
||||
@charset "utf-8";
|
||||
/* SIR 지운아빠 */
|
||||
|
||||
/* 설치 */
|
||||
#sms5_install {padding:20px 20px 0}
|
||||
#sms5_install h2 {margin:0;padding:0 0 20px}
|
||||
#sms5_install ol {margin:0 0 20px;padding:0 0 0 20px}
|
||||
#sms5_install li {margin:0 0 10px}
|
||||
|
||||
/* 공통 */
|
||||
.sms5_txt_success {color:blue}
|
||||
.sms5_txt_fail {color:red}
|
||||
|
||||
/* 회원정보업데이트 */
|
||||
#sms5_mbup dl {zoom:1}
|
||||
#sms5_mbup dl:after {display:block;visibility:hidden;clear:both;content:''}
|
||||
#sms5_mbup dt {clear:both;float:left;margin:0 0 5px;width:100px}
|
||||
#sms5_mbup dd {float:left;margin:0 0 5px}
|
||||
#sms5_mbup p {clear:both}
|
||||
|
||||
/* SMS BOX */
|
||||
.sms5_box {position:relative;padding:10px;border-radius:5px;background:#fbec99}
|
||||
.sms5_box .box_ico {position:absolute;top:20px;left:-7px;width:7px;height:13px;background:url('../img/box_ico.gif') no-repeat}
|
||||
.sms5_box .box_txt {border:0;background:transparent;word-break:break-all;resize:none;overflow:hidden}
|
||||
.sms5_box .box_square {width:100px;height:90px}
|
||||
|
||||
#write_wrap {z-index:9}
|
||||
#wr_message_lbl {position:absolute;top:50px;left:50px;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
.write_scemo_btn {position:absolute;right:10px !important;right:50px;margin:0;padding:0;width:28px;height:28px;border:0;background:transparent;color:#999;font-size:0.95em}
|
||||
#write_sc_btn {top:15px}
|
||||
#write_emo_btn {top:50px}
|
||||
.write_scemo {display:none;z-index:10;position:absolute;left:150px;border:1px solid #e9e9e9;background:#f7f7f7}
|
||||
.scemo_ico {position:absolute;top:10px;left:-7px;width:7px;height:13px;background:url('../img/scemo_ico.gif') no-repeat}
|
||||
.write_scemo .scemo_list {z-index:11;margin:0;padding:0;width:190px;height:150px;background:#fff;overflow-y:scroll}
|
||||
.write_scemo .scemo_add {margin:0;padding:0;height:25px;border:0;background:transparent}
|
||||
#write_sc {top:10px}
|
||||
#write_sc .scemo_add {width:25px}
|
||||
#write_emo {top:45px}
|
||||
#write_emo .scemo_add {width:50px}
|
||||
#write_emo .emo_long {width:80px}
|
||||
.write_scemo .scemo_cls {text-align:right}
|
||||
.write_scemo .scemo_cls button {margin:5px;padding:0;border:0;background:transparent;color:#666;font-size:0.95em}
|
||||
|
||||
/* 문자보내기 */
|
||||
#sms5_send {position:relative;margin:-10px 0 0 20px;padding:0 0 0 490px;height:600px}
|
||||
#sms5_send h2 {font-size:1em}
|
||||
#sms5_send ul {margin:0;padding:0;list-style:none;zoom:1}
|
||||
#sms5_send ul:after {display:block;visibility:hidden;clear:both;content:''}
|
||||
#sms5_send #send_emo {position:absolute;top:0;left:0;padding:20px 0 0;width:280px}
|
||||
#sms5_send #send_emo h2 {padding:0 0 10px}
|
||||
#sms5_send #send_write {position:absolute;top:0;left:290px;padding:20px 20px 0 !important;padding:20px 0 0 20px;width:160px;height:600px;border-left:1px solid #efefef}
|
||||
#sms5_send #send_write h2 {padding:0 0 10px}
|
||||
#sms5_send #send_book {position:relative;margin:0 0 0 -1px;padding:20px 0 0;width:100%;height:600px;border-left:1px solid #efefef}
|
||||
#sms5_send #send_book h2 {padding-bottom:10px}
|
||||
|
||||
#sms5_send .tmp_loading {display:block;padding:180px 0 0;text-align:center}
|
||||
#sms5_send #send_emo #emo_sel {position:absolute;top:20px;right:10px;margin:0}
|
||||
#sms5_send #send_emo li {float:left;margin:0 10px 10px 0 !important;margin:0 5px 10px 0;width:110px}
|
||||
#sms5_send #send_emo .sms5_box {background:#f7f7f7}
|
||||
#sms5_send #send_emo .box_ico {display:none}
|
||||
#sms5_send #send_emo .box_txt {cursor:pointer}
|
||||
#sms5_send #send_emo .emo_tit {display:block;height:20px;line-height:2em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
#sms5_send #send_emo .btn_submit {padding:0 5px;height:24px;border:1px solid #ccc;background:#fafafa;color:#000;font-size:0.95em;vertical-align:middle;cursor:pointer}
|
||||
|
||||
#sms5_send #send_write {z-index:3}
|
||||
#sms5_send .write_inner {position:relative;left:-20px;padding:15px 20px;width:160px;border-top:1px solid #efefef}
|
||||
#sms5_send .write_inner h2 {margin:0;padding:0 0 10px !important}
|
||||
#sms5_send .write_floater {position:absolute;top:15px;right:20px;text-align:right}
|
||||
#sms5_send .write_floater_btn {margin:0;padding:0;border:0;background:transparent;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
#sms5_send .write_inner label, #sms5_send .write_inner input {margin:0 0 3px}
|
||||
#sms5_send .write_inner label {display:inline-block}
|
||||
#sms5_send #send_write .sms5_box {margin:0 0 5px}
|
||||
#sms5_send #sms_byte {position:absolute;top:-37px;right:0;color:#999}
|
||||
#sms5_send #write_preset {margin:10px 0;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
#sms5_send #write_reply {margin:0 0 15px}
|
||||
#sms5_send #hp_list {width:100%;margin:0 0 5px}
|
||||
#sms5_send #recv_add {position:relative}
|
||||
#sms5_send #recv_add button {position:absolute;top:0;right:0 !important;right:20px;margin:0;padding:0;width:45px;height:51px;border:1px solid #ccc;background:#fafafa}
|
||||
#sms5_send #write_rsv {line-height:1.8em}
|
||||
|
||||
#sms5_send #send_book {z-index:2}
|
||||
#sms5_send #num_book {margin:0 0 10px;width:auto !important;width:95%;height:500px;overflow-y:auto !important;overflow-y:scroll}
|
||||
#sms5_send #book_tab {margin:0 35px 10px;text-align:right}
|
||||
#sms5_send #book_tab a {display:inline-block;width:30px;text-align:center}
|
||||
#sms5_send #sms_person_form {margin:0 20px}
|
||||
#sms5_send #send_book .btn_submit {padding:0 5px;height:24px}
|
||||
#sms5_send #book_desc {margin:0 20px;color:#999;font-size:0.95em;letter-spacing:-0.1em}
|
||||
#sms5_send .td_mngsmall button.btn_frmline,#sms5_send .td_mng button.btn_frmline {padding: 0 7px;background: #444;}
|
||||
|
||||
/* 문자전송상세내역 */
|
||||
#sms5_sent {}
|
||||
#sms5_sent #sent_overlap {margin:0 20px 20px;padding:0;border-top:1px solid #e9e9e9;list-style:none}
|
||||
#sms5_sent #sent_overlap li {padding:10px 0;border-bottom:1px solid #e9e9e9}
|
||||
#sms5_sent #con_sms {margin:0 20px 20px}
|
||||
|
||||
/* 이모티콘 관리 */
|
||||
.sms_preset_sch form {display:inline-block}
|
||||
#sms5_preset_sel {float:left;padding:8px 20px 0}
|
||||
.btn_add {float:right}
|
||||
#sms5_preset {clear:both;margin:0 0 10px;padding:30px 20px 20px 40px;background:#363a3d;list-style:none;zoom:1}
|
||||
#sms5_preset:after {display:block;visibility:hidden;clear:both;content:''}
|
||||
#sms5_preset li {float:left;margin:0 20px 20px 0;width:270px;height:125px;background:#fbec99;zoom:1}
|
||||
#sms5_preset li:after {display:block;visibility:hidden;clear:both;content:''}
|
||||
#sms5_preset .li_chk {position:absolute;bottom:10px;left:10px;}
|
||||
#sms5_preset .li_preview {float:left;width:110px}
|
||||
#sms5_preset .box_square {padding-right:7px;border-right:1px solid #e2d693}
|
||||
#sms5_preset .li_info {float:left;margin:0 0 0 10px;width:150px;line-height:1.5em}
|
||||
#sms5_preset .li_date {position:absolute;bottom:10px;left:30px;color:#86857d}
|
||||
#sms5_preset .li_cmd {position:absolute;bottom:10px;right:10px}
|
||||
#sms5_preset .li_cmd a {color:#86857d;font-size:0.95em;letter-spacing:-0.1em}
|
||||
|
||||
#sms5_emo_add {position:relative}
|
||||
#sms5_emo_add .sms5_box {padding:10px !important;padding:10px 5px;width:160px}
|
||||
#sms5_emo_add .box_txt {margin:0 0 5px}
|
||||
#sms5_emo_add .write_scemo_btn {right:10px}
|
||||
#sms5_emo_add .write_scemo {left:170px}
|
||||
|
||||
/* 휴대폰번호 관리 */
|
||||
#hp_check_el {width:148px}
|
||||
#hp_check_el ul {margin:5px 0 0;padding:0;border:1px solid #f7c3cf;background:#f8e8eb;list-style:none}
|
||||
#hp_check_el li {position:relative;padding:5px;border-bottom:1px solid #f6dae1}
|
||||
#hp_check_el strong {position:absolute;top:6px;right:5px;color:#ff3061;font-size:0.95em;font-weight:normal;letter-spacing:-0.1em}
|
||||
|
||||
/* 휴대폰번호 파일 */
|
||||
#sms5_fileup_frm {margin:0 0 10px;padding:0 20px 5px;border-bottom:1px solid #e9e9e9}
|
||||
#sms5_fileup_frm div {padding:0 0 5px;margin:0 0 5px;border-bottom:1px solid #f4f4f4}
|
||||
#sms5_fileup_frm div.sch_last {margin:0;border:0}
|
||||
#sms5_fileup_frm strong {display:inline-block;width:80px}
|
||||
#sms5_fileup_frm strong.sch_long {width:160px}
|
||||
#sms5_fileup_frm label {display:inline-block;margin:0 5px 0 0}
|
||||
#sms5_fileup_frm .btn_submit {padding:0 5px;height:24px}
|
||||
|
||||
#sms5_fileup_frm #sms5_fileup {border:0}
|
||||
#sms5_fileup_frm #upload_info {margin:20px 0}
|
||||
#sms5_fileup_frm #upload_result {margin:0;padding:10px 0;border-top:3px solid #383838;border-bottom:3px solid #383838;list-style:none}
|
||||
#sms5_fileup_frm #upload_result li {margin:0 0 5px}
|
||||
#sms5_fileup_frm #upload_result .local_desc01 {margin:5px 0;padding:10px}
|
||||
#sms5_fileup_frm #btn_fileup {margin:5px 0 0}
|
||||
|
||||
#sms5_fileup_frm .sms_fileup_hide {display:none;border:0}
|
||||
114
adm/sms_admin/emoticon_move.php
Normal file
114
adm/sms_admin/emoticon_move.php
Normal file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
$sub_menu = "900600";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($sw != 'move'){
|
||||
alert('sw 값이 제대로 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$g5['title'] = '이모티콘그룹 이동';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$fo_no_list = implode(',', $_POST['fo_no']);
|
||||
|
||||
$sql = " select * from {$g5['sms5_form_group_table']} order by fg_no ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++)
|
||||
{
|
||||
$list[$i] = $row;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="copymove" class="new_win">
|
||||
<h1 id="win_title"><?php echo $g5['title'] ?></h1>
|
||||
|
||||
<form name="fboardmoveall" method="post" action="./emoticon_move_update.php" onsubmit="return fboardmoveall_submit(this);">
|
||||
<input type="hidden" name="sw" value="<?php echo $sw ?>">
|
||||
<input type="hidden" name="fo_no_list" value="<?php echo $fo_no_list ?>">
|
||||
<input type="hidden" name="url" value="<?php echo $_SERVER['HTTP_REFERER'] ?>">
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption>이동할 그룹을 한개 이상 선택하여 주십시오.</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col">그룹</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php for ($i=0; $i<count($list); $i++) { ?>
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="radio" value="<?php echo $list[$i]['fg_no'] ?>" id="chk<?php echo $i ?>" name="chk_fg_no[]">
|
||||
</td>
|
||||
<td>
|
||||
<label for="chk<?php echo $i ?>"><?php echo $list[$i]['fg_name'] ?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="win_btn">
|
||||
<input type="submit" value="이동" id="btn_submit" class="btn_submit">
|
||||
<button type="button" class="btn_cancel">창닫기</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
$(".win_btn button").click(function(e) {
|
||||
window.close();
|
||||
return false;
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
function all_checked(sw) {
|
||||
var f = document.fboardmoveall;
|
||||
|
||||
for (var i=0; i<f.length; i++) {
|
||||
if (f.elements[i].name == "chk_fg_no[]")
|
||||
f.elements[i].checked = sw;
|
||||
}
|
||||
}
|
||||
|
||||
function fboardmoveall_submit(f)
|
||||
{
|
||||
var check = false;
|
||||
|
||||
if (typeof(f.elements['chk_fg_no[]']) == 'undefined')
|
||||
;
|
||||
else {
|
||||
if (typeof(f.elements['chk_fg_no[]'].length) == 'undefined') {
|
||||
if (f.elements['chk_fg_no[]'].checked)
|
||||
check = true;
|
||||
} else {
|
||||
for (i=0; i<f.elements['chk_fg_no[]'].length; i++) {
|
||||
if (f.elements['chk_fg_no[]'][i].checked) {
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!check) {
|
||||
alert('이모티콘을 '+f.act.value+'할 그룹을 한개 이상 선택해 주십시오.');
|
||||
return false;
|
||||
}
|
||||
|
||||
document.getElementById('btn_submit').disabled = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user