public function select($req, $params = null)
 {
     if (!$this->autoCommit && !$this->inTransaction) {
         $this->begin();
     }
     if ($params !== null) {
         $req = $this->emuPrepStmt($req, $params);
     }
     return parent::select($req);
 }
示例#2
0
function confCopy_options()
{
    global $array;
    $options = NULL;
    $mysql = new mysqlConnection();
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_config\n\t\t\tWHERE board_id!='{$array['board_id']}'\n\t\t\tORDER BY name ASC\n\t\t");
    if ($mysql->numRows() > 0) {
        $options = "<option value=\"NONE\">게시판 선택</option>";
        do {
            $options .= "<option value=\"" . $mysql->fetch("board_id") . "\">" . $mysql->fetch("name") . " (" . $mysql->fetch("board_id") . ")</option>";
        } while ($mysql->nextRec());
        return $options;
    } else {
        return $options .= "<option value=\"NONE\">복사 대상 없음</option>";
    }
}
示例#3
0
}
/*
정렬 기준 설정
*/
if (!$order) {
    $order = "me_drop_regdate";
}
if (!$orderby) {
    $orderby = "DESC";
}
$array_order = $order . " " . $orderby;
/*
페이징 설정
*/
$paging_query = "\n\t\tSELECT * \n\t\tFROM toony_member_list\n\t\tWHERE {$array_where}\n\t\tORDER BY {$array_order}\n\t";
$mysql->select($paging_query);
$paging_query_no = $mysql->numRows();
$paging->page_param($page);
$total_num = $paging->setTotal($paging_query_no);
$paging->setListPerPage(10);
$sql = $paging->getPaggingQuery($paging_query);
$mysql->select($sql);
$array_total = $mysql->numRows();
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/leaveMember.html");
$header->skin_html_load($tpl->skin);
$header->skin_loop_header("[{loop_start}]");
$loop->skin_html_load($tpl->skin);
$loop->skin_loop_array("[{loop_start}]", "[{loop_end}]");
示例#4
0
function total_count()
{
    $query = new mysqlConnection();
    $query->select("select count(*) total_count from toony_admin_counter");
    return number_format($query->fetch("total_count"));
}
示例#5
0
<?php

$tpl = new skinController();
$mysql = new mysqlConnection();
/*
기본 정보 로드
*/
$mysql->select("\n\t\tSELECT source\n\t\tFROM toony_admin_mailling_template\n\t\tWHERE type='mailling'\n\t");
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$sourceCode = $mysql->fetch("source");
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/mailTplMailling.html");
/*
템플릿 치환
*/
$tpl->skin_modeling("[sourceCode]", $sourceCode);
echo $tpl->skin_echo();
示例#6
0
include_once __DIR_PATH__ . "modules/board/install/installCheck.php";
$tpl = new skinController();
$mysql = new mysqlConnection();
$method = new methodController();
$method->method_param("GET", "act,type");
/*
변수 처리
*/
if (!$type) {
    $type = "new";
}
/*
수정 모드인 경우 기본 정보 로드
*/
if ($type == "modify") {
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_config\n\t\t\tWHERE board_id='{$act}'\n\t\t");
    $mysql->fetchArray("write_point,read_point,skin,board_id,name,list_limit,length_limit,use_secret,use_comment,use_likes,use_category,category,use_reply,use_vote,use_file1,use_file2,use_list,file_limit,void_html,controll_level,write_level,read_level,secret_level,comment_level,array_level,reply_level,delete_level,top_file,bottom_file,thumb_width,thumb_height,articleIMG_width,articleIMG_height,article_length,ico_file,ico_mobile,ico_secret,ico_secret_def,ico_new,ico_new_def,ico_hot,ico_hot_def,tc_1,tc_2,tc_3,tc_4,tc_5");
    $array = $mysql->array;
    $mysql->htmlspecialchars = 0;
    $mysql->nl2br = 0;
    $array['top_source'] = $mysql->fetch("top_source");
    $array['bottom_source'] = $mysql->fetch("bottom_source");
}
/*
홈페이지&모바일페이지 설정 값이 함께 기록되는 필드인 경우 분리
*/
$use_list_exp = explode("|", $array['use_list']);
$array['use_list'] = $use_list_exp[0];
$array['use_m_list'] = $use_list_exp[1];
$list_limit_exp = explode("|", $array['list_limit']);
$array['list_limit'] = $list_limit_exp[0];
示例#7
0
文件: read.php 项目: devwit/toonytool
$__toony_board_view = $session->session_selector('__toony_board_view_' . $board_id . '_' . $read);
//조회수 세션
/*
패스워드가 submit된 경우
*/
if ($s_password != "") {
    $method->method_param("POST", "s_board_id,s_mode,s_read,s_password,s_page,where,keyword");
    $board_id = $s_board_id;
    $read = $s_read;
    $mode = $s_mode;
    $page = $s_page;
}
/*
게시물 설정 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE board_id='{$board_id}'\n\t");
$mysql->fetchArray("write_point,read_point,skin,name,use_category,use_comment,use_list,use_likes,use_reply,use_file1,use_file2,file_limit,list_limit,length_limit,array_level,write_level,secret_level,comment_level,delete_level,read_level,reply_level,controll_level,top_file,bottom_file,articleIMG_width,articleIMG_height,tc_1,tc_2,tc_3,tc_4,tc_5");
$c_array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$mysql->fetchArray("top_source,bottom_source");
$c_array = $mysql->array;
/*
설정 필드가 홈페이지+모바일페이지의 설정 값을 같이 사용하는 경우 분리
*/
if ($viewType == "p") {
    $ex_slt = 0;
} else {
    $ex_slt = 1;
}
$use_list_ex = explode("|", $c_array['use_list']);
if ($useMenu_side_val == "disabled" || $useMenu_side == "checked") {
    $useMenu_side = "Y";
} else {
    $useMenu_side = "N";
}
if ($useMenu_header_val == "disabled" || $useMenu == "checked") {
    $useMenu = "Y";
} else {
    $useMenu = "N";
}
/*
검사
*/
//수정 모든인 경우 검사
if ($type == "modify") {
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_admin_menuInfo\n\t\t\tWHERE idno='{$org}'\n\t\t");
    $lockMenu = $mysql->fetch("lockMenu");
    $thisDepth = $mysql->fetch("depth");
    $thisClass = $mysql->fetch("class");
    $validator->validt_null("name", "");
    if ($href == "pm" && trim($link) == "" && $lockMenu != "Y") {
        $validator->validt_diserror("link", "연결할 페이지 또는 모듈을 선택해 주세요.");
    }
    if ($href == "mp" && trim($linkDoc) == "" && $lockMenu != "Y") {
        $validator->validt_diserror("linkDoc", "");
    }
    if ($href == "fm" && trim($forward) == "" && $lockMenu != "Y") {
        $validator->validt_diserror("forward", "포워딩 메뉴를 선택해 주세요.");
    }
    //1차 메뉴의 header 노출 옵션이 꺼져 있으면, 2차 메뉴는 옵션 활성화 불가
    if ($thisDepth == 2 && $useMenu == "Y") {
示例#9
0
     //원본 게시물을 로드
     $mysql->select("\n\t\t\t\tSELECT *\n\t\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\t\tWHERE idno='{$cnum_ex[$i]}'\n\t\t\t");
     $ln[$i] = $mysql->fetch("ln");
     $rn[$i] = $mysql->fetch("rn");
 }
 for ($i = 0; $i < sizeof($cnum_ex); $i++) {
     //rn이 0인 부모글인 경우만 이동 실행
     if ($rn[$i] == 0) {
         //글의 최소/최대 ln값 구함
         $ln_min = (int) (ceil($ln[$i] / 1000) * 1000) - 1000;
         $ln_max = (int) (ceil($ln[$i] / 1000) * 1000);
         //글의 자식들의 범위를 구함
         $where = "ln>{$ln_min} AND ln<={$ln_max}";
         $mysql->select("\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM toony_module_board_data_{$board_id} \n\t\t\t\t\tWHERE {$where}\n\t\t\t\t");
         //대상 게시판의 최대 ln값 불러옴
         $tar_mysql->select("\n\t\t\t\t\tSELECT MAX(ln)+1000 AS ln_max\n\t\t\t\t\tFROM toony_module_board_data_{$tar_board_id}\n\t\t\t\t\tWHERE 1\n\t\t\t\t\tORDER BY ln DESC\n\t\t\t\t\tLIMIT 1\n\t\t\t\t");
         $tar_ln = $tar_mysql->fetch("ln_max");
         if (!$tar_ln) {
             $tar_ln = 1000;
         }
         $tar_ln = ceil($tar_ln / 1000) * 1000;
         do {
             $mysql->htmlspecialchars = 0;
             $mysql->nl2br = 0;
             $mysql->fetchArray("idno,category,ln,rn,me_idno,writer,password,email,ment,subject,file1,file1_cnt,file2,file2_cnt,link1,link2,use_secret,use_notice,use_html,use_email,view,ip,regdate,td_1,td_2,td_3,td_4,td_5");
             $array = $mysql->array;
             //가져온 원본들의 내용을 addslashes 시킴
             foreach ($array as $key => $value) {
                 $array[$key] = addslashes($array[$key]);
             }
             //대상 게시판으로 첨부파일을 복사
示例#10
0
<?php

$tpl = new skinController();
$header = new skinController();
$loop = new skinController();
$footer = new skinController();
$mysql = new mysqlConnection();
$lib = new libraryClass();
$paging = new pagingClass();
$method = new methodController();
$method->method_param("GET", "page,where,keyword,order,orderby");
/*
기본 정보 로드
*/
$mysql->select("\n\t\tSELECT\n\t\tCOUNT(*) total_member,\n\t\t(\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM toony_member_list\n\t\t\tWHERE me_idCheck='Y' AND me_admin!='Y' AND me_drop_regdate IS NULL\n\t\t) total_idCheckMember,\n\t\t(\n\t\t\tSELECT COUNT(*)\n\t\t\tFROM toony_member_list\n\t\t\tWHERE me_idCheck='N' AND me_admin!='Y' AND me_drop_regdate IS NULL\n\t\t) total_noIdCheckMember\n\t\tFROM toony_member_list\n\t\tWHERE me_admin!='Y' AND me_drop_regdate IS NULL\n\t");
$mysql->fetchArray("total_member,total_idCheckMember,total_noIdCheckMember");
$total_info = $mysql->array;
/*
검색 키워드 설정
*/
if (trim($keyword) != "") {
    $array_where = $where . " LIKE '%" . $keyword . "%' AND me_admin!='Y' AND me_drop_regdate IS NULL";
} else {
    $array_where = "me_admin!='Y' AND me_drop_regdate IS NULL";
}
/*
정렬 기준 설정
*/
if (!$order) {
    $order = "me_regdate";
}
示例#11
0
function call_admin_mainPage($vtype)
{
    global $viewType, $site_config, $member, $viewDir, $member_type_var, $article, $m, $p;
    //type 변수 내용에 따른 DB 필드명 선언
    if ($vtype == "p") {
        $field = "ad_site_jsmain";
    } else {
        $field = "ad_msite_jsmain";
    }
    //DB에서 메인화면 디자인을 불러옴
    $mysql = new mysqlConnection();
    $mysql->select("\n\t\t\tSELECT {$field}\n\t\t\tFROM toony_admin_siteconfig\n\t\t");
    $items = $mysql->fetch($field);
    //DB에서 불러온 아이템 문자열을 나누어 각각의 아이템으로 분리
    $item = explode("#", $items);
    $item_count = count($item);
    //아이템이 어떤 형태인지 구분
    for ($i = 1; $i < $item_count; $i++) {
        $nameLen = substr($item[$i], 0, 7);
        if (stristr($nameLen, "latest")) {
            $itemType[$i] = "latest";
        } else {
            if (stristr($nameLen, "banner")) {
                $itemType[$i] = "banner";
            } else {
                if (stristr($nameLen, "href")) {
                    $itemType[$i] = "href";
                }
            }
        }
    }
    //아이템을 HTML로 변환하여 출력함 (홈페이지)
    if ($vtype == "p") {
        for ($i = 1; $i < $item_count; $i++) {
            $data = explode("|", $item[$i]);
            $pixel_x = 92;
            $pixel_y = 40;
            switch ($itemType[$i]) {
                case "latest":
                    //박스 크기, 위치 계산
                    $box_left = ($pixel_x + 10) * ($data[12] - 1);
                    $box_top = $pixel_y * $data[13] - $pixel_y;
                    $box_width = $pixel_x * $data[14] + (($data[14] - 1) * 10 - 10);
                    $box_height = $pixel_y * $data[15] - 20;
                    //게시판 모듈 최근게시물 출력
                    echo "\n\t\t\t\t\t\t\t<div class=\"latest_" . $data[4] . " " . $data[2] . "\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px; overflow:hidden;\">\n\t\t\t\t\t\t" . call_board_latest($vtype, $data[3], $data[1], $data[5], $data[6], $data[7], $data[4], $data[8], $data[9], $data[10], $data[11]) . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t";
                    break;
                case "banner":
                    //박스 크기, 위치 계산
                    $box_left = ($pixel_x + 10) * ($data[6] - 1);
                    $box_top = $pixel_y * $data[7] - $pixel_y;
                    $box_width = $pixel_x * $data[8] + (($data[8] - 1) * 10 - 10);
                    $box_height = $pixel_y * $data[9];
                    //배너공간 출력
                    if (!call_admin_mainPage_item(__DIR_PATH__ . "upload/siteInformations/" . $data[2])) {
                        echo "\n\t\t\t\t\t\t\t\t<div class=\"banner\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px;\">\n\t\t\t\t\t\t\t\t\t설정한 배너 이미지 파일이 존재하지 않습니다.\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    } else {
                        echo "\n\t\t\t\t\t\t\t\t<div class=\"banner\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px; overflow:hidden;\">\n\t\t\t\t\t\t\t\t\t<a href=\"{$data[3]}\" target=\"_{$data[4]}\" title=\"{$data[5]}\"><img src=\"" . __URL_PATH__ . "upload/siteInformations/" . $data[2] . "\" width=\"{$box_width}\" height=\"{$box_height}\" /></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    }
                    break;
                case "href":
                    //박스 크기, 위치 계산
                    $box_left = ($pixel_x + 10) * ($data[3] - 1);
                    $box_top = $pixel_y * $data[4] - $pixel_y;
                    $box_width = $pixel_x * $data[5] + (($data[5] - 1) * 10 - 10);
                    $box_height = $pixel_y * $data[6];
                    //외부 문서 출력
                    if (!call_admin_mainPage_item(__DIR_PATH__ . $data[2] . ".php")) {
                        echo "\n\t\t\t\t\t\t\t\t<div class=\"include\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px;\">\n\t\t\t\t\t\t\t\t\t설정한 외부 문서 파일이 존재하지 않습니다.\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    } else {
                        ob_start();
                        include __DIR_PATH__ . $data[2] . ".php";
                        $include_html = ob_get_contents();
                        ob_end_clean();
                        echo "\n\t\t\t\t\t\t\t\t<div class=\"include\" style=\"position:absolute; left:{$box_left}px; top:{$box_top}px; width:{$box_width}px; height:{$box_height}px; overflow:hidden;\">\n\t\t\t\t\t\t\t" . $include_html . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    }
                    break;
            }
            //화면의 총 height를 구함
            $box_total_height = $box_top + $box_height;
            if ($i == 1) {
                $total_height = $box_total_height;
            }
            if ($box_total_height > $total_height) {
                $total_height = $box_total_height;
            }
        }
        //아이템을 HTML로 변환하여 출력함 (모바일페이지)
    } else {
        $sort = array();
        $sort_html = array();
        for ($i = 1; $i < $item_count; $i++) {
            $data = explode("|", $item[$i]);
            switch ($itemType[$i]) {
                case "latest":
                    if ($data[4] == "list") {
                        $data[4] = "default";
                    }
                    //게시판 모듈 최근게시물 출력
                    $sort[$i] = $data[13];
                    $sort_html[$i] = "\n\t\t\t\t\t\t\t<div class=\"latest_" . $data[4] . " " . $data[2] . "\" style=\"margin-bottom:10px;\">\n\t\t\t\t\t\t" . call_board_latest($vtype, $data[3], $data[1], $data[5], $data[6], $data[7], $data[4], $data[8], $data[9], $data[10], $data[11]) . "\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t";
                    break;
                case "banner":
                    //배너공간 출력
                    $sort[$i] = $data[7];
                    if (!call_admin_mainPage_item(__DIR_PATH__ . "upload/siteInformations/" . $data[2])) {
                        $sort_html[$i] = "\n\t\t\t\t\t\t\t\t<div class=\"banner\" style=\"margin-bottom:10px;\">\n\t\t\t\t\t\t\t\t\t설정한 배너 이미지 파일이 존재하지 않습니다.\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    } else {
                        $sort_html[$i] = "\n\t\t\t\t\t\t\t\t<div class=\"banner\" style=\"margin-bottom:10px;\">\n\t\t\t\t\t\t\t\t\t<a href=\"{$data[3]}\" target=\"_{$data[4]}\" title=\"{$data[5]}\"><img src=\"" . __URL_PATH__ . "upload/siteInformations/" . $data[2] . "\" style=\"width:100%;\" /></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    }
                    break;
                case "href":
                    //외부 문서 출력
                    $sort[$i] = $data[4];
                    if (!call_admin_mainPage_item(__DIR_PATH__ . $data[2] . ".php")) {
                        $sort_html[$i] = "\n\t\t\t\t\t\t\t\t<div class=\"include\" style=\"margin-bottom:10px;\">\n\t\t\t\t\t\t\t\t\t설정한 외부 문서 파일이 존재하지 않습니다.\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    } else {
                        ob_start();
                        include __DIR_PATH__ . $data[2] . ".php";
                        $include_html = ob_get_contents();
                        ob_end_clean();
                        $sort_html[$i] = "\n\t\t\t\t\t\t\t\t<div class=\"include\" style=\"margin-bottom:10px;\">\n\t\t\t\t\t\t\t" . $include_html . "\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t";
                    }
                    break;
            }
        }
        //높이가 높은 순으로 아이템 HTML 출력
        asort($sort);
        foreach ($sort as $key => $val) {
            echo $sort_html[$key];
        }
    }
    //화면의 총 height만큼 임의 DIV를 생성
    if ($vtype == "p") {
        echo "\n\t\t\t\t<div style=\"height:" . $total_height . "px;\"></div>\n\t\t\t";
    }
}
示例#12
0
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$method->method_param("GET", "act");
/*
DB 조건 변수 처리
*/
if ($act) {
    $where = "idno={$act}";
} else {
    $where = "1";
}
/*
메일링 정보 로드
*/
$mysql->select("\n\t\tSELECT A.*,B.*\n\t\tFROM toony_admin_mailling A\n\t\tLEFT OUTER JOIN toony_member_list B\n\t\tON A.me_idno=B.me_idno\n\t\tWHERE {$where}\n\t\tORDER BY regdate DESC\n\t\tLIMIT 1\n\t");
$mysql->fetchArray("idno,min_level,max_level,subject,regdate,me_idno,me_nick");
$array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$array['memo'] = $mysql->fetch("memo");
/*
검사
*/
if ($mysql->numRows() < 1) {
    $lib->error_alert_location("존재하지 않는 메일링 입니다.", $site_config['ad_site_url'], "A");
}
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/maillingList_view.html");
示例#13
0
$mysql = new mysqlConnection();
$method = new methodController();
$validator = new validator();
$method->method_param("POST", "type,cnum,id,memo,ip");
$lib->security_filter("referer");
$lib->security_filter("request_get");
/**************************************************
	추가 모드인 경우
	**************************************************/
if ($type == "new") {
    /*
    검사
    */
    $validator->validt_null("ip", "");
    $validator->validt_null("memo", "");
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_admin_security_ip\n\t\t\tWHERE ip='{$ip}'\n\t\t");
    if ($mysql->numRows() > 0) {
        $validator->validt_diserror("ip", "이미 등록된 ip입니다.");
    }
    /*
    DB 저장
    */
    $mysql->query("\n\t\t\tINSERT INTO toony_admin_security_ip (ip,memo,regdate)\n\t\t\tVALUES\n\t\t\t('{$ip}','{$memo}',now())\n\t\t");
    /*
    완료 후 리턴
    */
    $validator->validt_success("성공적으로 추가 되었습니다.", "admin/?p=blockIP");
    /**************************************************
    	삭제 모드인 경우
    	**************************************************/
} else {
示例#14
0
<?php

include "../include/engine.inc.php";
include __DIR_PATH__ . "include/global.php";
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$mailSender = new mailSender();
$lib->security_filter("referer");
$lib->security_filter("request_get");
$method->method_param("POST", "min_level,max_level");
/*
검사
*/
if ($min_level == "none") {
    echo '<!--error::null_min_level-->';
    exit;
}
if ($max_level == "none") {
    echo '<!--error::null_max_level-->';
    exit;
}
/*
발송 대상 인원수 구함
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_list\n\t\tWHERE (me_level<={$min_level} AND me_level>={$max_level}) AND me_drop_regdate IS NULL\n\t\tORDER BY me_regdate DESC\n\t");
/*
완료 후 리턴
*/
echo $mysql->numRows();
示例#15
0
include __DIR_PATH__ . "capcha/zmSpamFree.php";
$method = new methodController();
$lib = new libraryClass();
$mysql = new mysqlConnection();
$session = new sessionController();
$mailSender = new mailSender();
$fileUploader = new fileUploader();
$validator = new validator();
$lib->security_filter("referer");
$lib->security_filter("request_get");
$method->method_param("POST", "article,category,category_ed,board_id,writer,subject,use_secret,use_notice,use_html,use_email,ment,password,email,file1_ed,file2_ed,file1_del,file2_del,read,mode,type,page,where,keyword,capcha,td_1,td_2,td_3,td_4,td_5");
$method->method_param("FILE", "file1,file2");
/*
게시물 설정 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE board_id='{$board_id}'\n\t");
$mysql->fetchArray("write_point,read_point,viewType,name,use_secret,use_comment,use_list,use_reply,use_file1,use_file2,use_vote,void_html,file_limit,list_limit,length_limit,array_level,write_level,secret_level,comment_level,delete_level,read_level,reply_level,controll_level,tc_1,tc_2,tc_3,tc_4,tc_5");
$c_array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$c_array['point_board_name'] = $mysql->fetch("name");
/*
수정/답글 모드인 경우 원본 글 가져옴
*/
if ($mode == "modify" || $mode == "reply") {
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\tWHERE idno={$read}\n\t\t");
    $mysql->fetchArray("ln,category,writer,me_idno,idno,use_notice,use_html,use_secret,password,use_email,email,td_1,td_2,td_3,td_4,td_5");
    $wquery = $mysql->array;
}
/*
옵션값 처리
示例#16
0
});
</script>
</head>
<body>
<table style="display:none;">
	<thead>
		<tr>
			<th>여자</th>
			<th>남자</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<th>여자</th>
			<?php 
$mysql->select("\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM toony_member_list\n\t\t\t\t\tWHERE me_sex='F'\n\t\t\t\t");
?>
			<td><?php 
echo (int) $mysql->numRows();
?>
</td>
		</tr>
		<tr>
			<th>남자</th>
			<?php 
$mysql->select("\n\t\t\t\t\tSELECT *\n\t\t\t\t\tFROM toony_member_list\n\t\t\t\t\tWHERE me_sex='M'\n\t\t\t\t");
?>
			<td><?php 
echo (int) $mysql->numRows();
?>
</td>
示例#17
0
文件: sub.php 项目: devwit/toonytool
$tpl->skin_file_path("layoutskin/" . CALLED_LAYOUTDIR . "sub.html");
/*
서브페이지 네비게이션 선언
*/
if (CALLED_DEPTH == 1) {
    $where = "callName='" . CALLED_ARTICLE . "'";
} else {
    if (CALLED_DEPTH == 2) {
        $where = "(callName='" . CALLED_ARTICLE . "') OR (class='" . CALLED_CLASS . "' AND depth=1)";
    } else {
        if (CALLED_DEPTH == 3) {
            $where = "(callName='" . CALLED_ARTICLE . "') OR (class='" . CALLED_CLASS . "' AND depth=1) OR (idno='" . CALLED_PARENT . "' AND depth=2)";
        }
    }
}
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_admin_menuInfo\n\t\tWHERE vtype='" . CALLED_VIEWTYPE . "' AND drop_regdate IS NULL AND ({$where})\n\t\tORDER BY depth ASC\n\t");
$naviTxt = "<a href=\"{$site_config['ad_site_url']}" . CALLED_VIEWDIR . "\">{$site_config['ad_site_name']}</a>";
//depth가 1인 경우 1차 메뉴 출력
if (CALLED_DEPTH == 1) {
    $naviTxt .= " > <a href=\"?article=" . $mysql->fetch("callName") . "\">" . $mysql->fetch("name") . "</a>";
    //depth가 2 이상인 경우 2차 메뉴 출력
} else {
    do {
        $naviTxt .= " > <a href=\"?article=" . $mysql->fetch("callName") . "\">" . $mysql->fetch("name") . "</a>";
    } while ($mysql->nextRec());
}
/*
템플릿 치환
*/
$tpl->skin_modeling("[/layoutskinDir/]", __URL_PATH__ . "layoutskin/" . CALLED_LAYOUTDIR);
$tpl->skin_modeling("[subpage_title]", $mysql->fetch("name"));
示例#18
0
function call_board_latest($viewType, $article, $board_id, $line, $length, $ment_length, $skin, $width, $height, $margin, $quard)
{
    if ($viewType == "p") {
        $viewDir = "";
        $viewSkinType = "";
    } else {
        $viewDir = "m/";
        $viewSkinType = "_mobile";
    }
    $mysql = new mysqlConnection();
    $tpl = new skinController();
    $lib = new libraryClass();
    $tpl = new skinController();
    $header = new skinController();
    $loop = new skinController();
    $footer = new skinController();
    $mysql->select("\n\t\t\tSELECT name\n\t\t\tFROM toony_module_board_config\n\t\t\tWHERE board_id='{$board_id}'\n\t\t");
    $mysql->fetchArray("name");
    $array = $mysql->array;
    //게시판이 존재하지 않는다면 오류 출력
    if (!$array['name']) {
        return "최근게시물에서 설정된 게시판이 존재하지 않습니다.";
    }
    //게시판이 존재한다면 게시물 출력
    $mysql->select("\n\t\t\tSELECT\n\t\t\t(\n\t\t\t\tSELECT COUNT(*)\n\t\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\t\tWHERE bo_idno=A.idno\n\t\t\t) comment,\n\t\t\t(\n\t\t\t\tSELECT ico_new_def\n\t\t\t\tFROM toony_module_board_config\n\t\t\t\tWHERE board_id='{$board_id}'\n\t\t\t) ico_new_def,\n\t\t\t(\n\t\t\t\tSELECT ico_hot_def\n\t\t\t\tFROM toony_module_board_config\n\t\t\t\tWHERE board_id='{$board_id}'\n\t\t\t) ico_hot_def,\n\t\t\tA.*\n\t\t\tFROM toony_module_board_data_{$board_id} A\n\t\t\tWHERE A.use_notice='N' AND rn=0\n\t\t\tORDER BY A.ln DESC, A.regdate DESC\n\t\t\tLIMIT {$line}\n\t\t");
    //최근게시물 템플릿 로드
    $tpl->skin_file_path("modules/board/latestskin/{$skin}/index{$viewSkinType}.html");
    $header->skin_html_load($tpl->skin);
    $header->skin_loop_header("[{loop_start}]");
    $loop->skin_html_load($tpl->skin);
    $loop->skin_loop_array("[{loop_start}]", "[{loop_end}]");
    $footer->skin_html_load($tpl->skin);
    $footer->skin_loop_footer("[{loop_end}]");
    //header 템플릿 치환
    $header->skin_modeling('[/latestskinDir/]', __URL_PATH__ . "modules/board/latestskin/" . $skin . "/");
    $header->skin_modeling('[title]', htmlspecialchars($array['name']));
    $header->skin_modeling('[board_link]', __URL_PATH__ . $viewDir . '?article=' . $article);
    $tpl = $header->skin_echo();
    //loop 템플릿 치환
    if ($mysql->numRows() > 0) {
        do {
            $array['memo'] = strip_tags($mysql->fetch("memo"));
            $mysql->htmlspecialchars = 0;
            $mysql->fetchArray("board_id,idno,subject,ment,regdate,idno,file1,file2,comment,writer,ico_new_def,ico_hot_def,view,use_secret");
            $array = $mysql->array;
            $loop->skin_modeling('[/latestskinDir/]', __URL_PATH__ . "modules/board/latestskin/" . $skin . "/");
            $loop->skin_modeling('[thumbnail]', call_board_latest_thumbnail_func($viewType, $article, $board_id, $array['idno'], $array['file1'], $array['file2'], $array['ment'], $width, $height, $quard, $margin));
            $loop->skin_modeling('[subject]', $lib->func_length_limit($array['subject'], 0, $length));
            $loop->skin_modeling('[ment]', $lib->func_length_limit(strip_tags($array['ment']), 0, $ment_length));
            $loop->skin_modeling('[date]', date("Y.m.d", strtotime($array['regdate'])));
            $loop->skin_modeling('[nick]', $array['writer']);
            $loop->skin_modeling('[comment]', latest_comment_func($array['comment']));
            $loop->skin_modeling('[link]', __URL_PATH__ . $viewDir . '?article=' . $article . '&p=read&read=' . $array['idno']);
            $loop->skin_modeling('[new_ico]', latest_new_ico($array['ico_new_def'], $array['regdate']));
            $loop->skin_modeling('[hot_ico]', latest_hot_ico($array['ico_hot_def'], $array['likes_count'], $array['view']));
            $loop->skin_modeling('[secret_ico]', latest_secret_ico($array['use_secret']));
            $tpl .= $loop->skin_echo();
        } while ($mysql->nextRec());
    }
    //footer 템플릿 치환
    if ($mysql->numRows() < 1) {
        $footer->skin_modeling_hideArea("[{not_loop_start}]", "[{not_loop_end}]", "show");
    } else {
        $footer->skin_modeling_hideArea("[{not_loop_start}]", "[{not_loop_end}]", "hide");
    }
    $footer->skin_modeling('[/latestskinDir/]', __URL_PATH__ . "modules/board/latestskin/" . $skin . "/");
    $footer->skin_modeling('[title]', htmlspecialchars($array['name']));
    $footer->skin_modeling('[board_link]', __URL_PATH__ . $viewDir . '?article=' . $article);
    $tpl .= $footer->skin_echo();
    return $tpl;
}
示例#19
0
패스워드가 submit 된 경우 GET변수를 POST변수로 변환
*/
if ($s_password != "") {
    $method->method_param("POST", "s_board_id,s_mode,s_read,s_password,s_page");
    $board_id = $s_board_id;
    $read = $s_read;
    $mode = $s_mode;
    $page = $s_page;
}
if (isset($HTTP_POST_VARS['keyword'])) {
    $method->method_param("POST", "where,keyword");
}
/*
게시물 설정 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE board_id='{$board_id}'\n\t");
$mysql->fetchArray("skin,title,use_comment,use_list,use_secret,use_category,category,use_reply,use_file1,use_file2,void_html,file_limit,list_limit,length_limit,array_level,write_level,secret_level,comment_level,delete_level,read_level,reply_level,controll_level,top_file,bottom_file,ico_secret_def,tc_1,tc_2,tc_3,tc_4,tc_5");
$c_array = $mysql->array;
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$mysql->fetchArray("top_source,bottom_source");
$c_array = $mysql->array;
/*
수정 혹은 답글 모드인 경우 원본글 정보를 로드
*/
if ($mode == "modify" || $mode == "reply") {
    $mysql->select("\n\t\t\tSELECT A.*,CEIL(A.ln) ceil_ln,\n\t\t\t(\n\t\t\t\tSELECT COUNT(*)\n\t\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\t\tWHERE ln<=((ceil_ln/1000)*1000) AND ln>((ceil_ln/1000)*1000)-1000 AND rn>0\n\t\t\t) reply_count\n\t\t\tFROM toony_module_board_data_{$board_id} A\n\t\t\tWHERE A.idno='{$read}'\n\t\t");
    $mysql->htmlspecialchars = 0;
    $mysql->nl2br = 0;
    $mysql->fetchArray("idno,reply_count,me_idno,subject,writer,category,me_nick,view,vote,password,email,ment,use_notice,use_secret,use_email,use_html,me_idno,file1,file2,rn,td_1,td_2,td_3,td_4,td_5");
    $array = $mysql->array;
示例#20
0
<?php

include "../../include/engine.inc.php";
include __DIR_PATH__ . "include/global.php";
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$validator = new validator();
$lib->security_filter("referer");
$lib->security_filter("request_get");
$method->method_param("POST", "writer,comment,reply_writer_o,reply_comment_o,comment_modify,cidno,type,mode,board_id,read,page,where,keyword,tr_1,tr_2,tr_3,tr_4,tr_5");
/*
게시물 설정 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE board_id='{$board_id}'\n\t");
$mysql->fetchArray("viewType,name,use_comment,use_list,use_reply,use_file1,use_file2,void_html,file_limit,list_limit,length_limit,array_level,write_level,secret_level,comment_level,delete_level,read_level,reply_level,controll_level,tc_1,tc_2,tc_3,tc_4,tc_5");
$c_array = $mysql->array;
/*
검사
*/
mb_internal_encoding('UTF-8');
if ($c_array['use_comment'] == "N") {
    $validator->validt_diserror("", "댓글 기능이 비활성 중입니다.");
}
if ($member['me_level'] > $c_array['comment_level']) {
    $validator->validt_diserror("", "권한이 없습니다.");
}
/*
댓글 등록
*/
if ($mode == 1) {
//입력값 검사
if ($type == "new" || $type == "modify") {
    $validator->validt_idx("name", 1, "");
    $validator->validt_null("memo", "");
    $validator->validt_number("btop", 0, 5, 1, "");
    $validator->validt_number("bleft", 0, 5, 1, "");
    if ($start_level < $end_level) {
        $validator->validt_diserror("start_level", "최소 레벨이 최대 레벨보다 클 수 없습니다.");
    }
    if ($pop_article == "select" && trim($pop_article_txt) == "") {
        $validator->validt_diserror("pop_article_txt", "");
    }
}
//추가 모드인 경우 추가 입력값 검사
if ($type == "new") {
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_admin_popupconfig\n\t\t\tWHERE name='{$name}'\n\t\t");
    if ($mysql->numRows() > 0) {
        $validator->validt_diserror("name", "이미 존재하는 코드입니다.");
    }
    if (!$img['name']) {
        $validator->validt_diserror("img", "팝업 이미지를 등록해 주세요.");
    }
}
/*
팝업 이미지 업로드
*/
$fileUploader->savePath = __DIR_PATH__ . "upload/siteInformations/";
$fileUploader->filedotType = "jpg,bmp,gif,png";
if ($type == "modify" || $type == "new") {
    if ($img['size'] > 0) {
        $fileUploader->saveFile = $img;
示例#22
0
$subpage = new skinController();
$mysql = new mysqlConnection();
$method->method_param("GET", "article,m,p,saveViewType,keepViewType");
/*
검사
*/
if (!$article && ($m || $p)) {
    $lib->error_alert_location("올바르지 않은 접근 입니다.", $site_config['ad_site_url'], "A");
}
if (!$article) {
    $article = "main";
}
/*
메뉴 타입이 포워딩인 경우 포워딩 대상 메뉴로 article 변환
*/
$mysql->select("\n\t\tSELECT href,forward\n\t\tFROM toony_admin_menuInfo\n\t\tWHERE callName='{$article}' AND vtype='p' AND drop_regdate IS NULL\n\t");
if ($mysql->fetch("href") == "fm") {
    $article = $mysql->fetch("forward");
}
/*
article로 DB를 색인하여 페이지 링크,링크문서 정보를 로드함
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_admin_menuInfo\n\t\tWHERE callName='{$article}' AND drop_regdate IS NULL AND vtype='p'\n\t");
$mysql->fetchArray("link,linkDoc,class,href,depth,parent");
$menuInfo = $mysql->array;
/*
메뉴 타입이 수동 문서 연결인 경우
*/
if ($menuInfo['href'] == "mp") {
    $p = $lib->htmldecode($menuInfo['linkDoc']);
    /*
示例#23
0
<?php

include "../../include/engine.inc.php";
include __DIR_PATH__ . "include/global.php";
$mysql = new mysqlConnection();
$method = new methodController();
$method->method_param("GET", "board_id,file");
$file = urldecode($file);
$filepath = __DIR_PATH__ . "modules/board/upload/" . $board_id . "/" . $file;
$filename = iconv("UTF-8", "EUC-KR", $file);
/* 
게시물 정보 로드 
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_data_{$board_id}\n\t\tWHERE file1='{$file}' OR file2='{$file}'\n\t");
$file1_name = $mysql->fetch("file1");
$file2_name = $mysql->fetch("file2");
/* 
첨부된 파일이 file1 인지 file2 인지 확인 
*/
if ($file1_name == $file) {
    $file_tar = 'file1';
    $td_tar = 'file1_cnt';
} else {
    if ($file2_name == $file) {
        $file_tar = 'file2';
        $td_tar = 'file2_cnt';
    } else {
        exit;
    }
}
/* 
示例#24
0
<?php

include_once "../include/pageJustice.inc.php";
$tpl = new skinController();
$method = new methodController();
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method->method_param("GET", "redirect");
/*
검사
*/
if ($member['me_level'] < 10) {
    $lib->error_alert_location("이미 로그인 되어 있습니다.", $site_config['ad_site_url'], "A");
}
/*
최고 운영자 이메일 로드
*/
$mysql->select("\n\t\tSELECT me_id\n\t\tFROM toony_member_list\n\t\tWHERE me_admin='Y' AND me_drop_regdate IS NULL\n\t\tLIMIT 1\n\t");
$admin_email = $mysql->fetch("me_id");
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/login.html");
/*
템플릿 치환
*/
$tpl->skin_modeling("[admin_email]", $admin_email);
$tpl->skin_modeling("[redirectUri]", urlencode($redirect));
echo $tpl->skin_echo();
示例#25
0
<?php

$tpl = new skinController();
$lib = new libraryClass();
$mysql = new mysqlConnection();
/*
검사
*/
if ($member['me_admin'] != "Y") {
    $lib->error_alert_location("접근 권한이 없습니다.", $site_config[ad_site_url], "A");
}
/*
최고 운영자 기본 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_list\n\t\tWHERE me_admin='Y' AND me_level=1\n\t");
$mysql->fetchArray("me_id,me_nick,me_sex,me_phone,me_telephone,me_password,me_point");
$array = $mysql->array;
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/adminInfo.html");
/*
템플릿 함수
*/
function sex_checked_value_func($obj)
{
    global $array;
    switch ($array['me_sex']) {
        case "M":
            if ($obj == "M") {
                return "checked";
<?php

$mysql = new mysqlConnection();
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE 1\n\t\tORDER BY regdate DESC\n\t");
$moduleOption = "<optgroup label=\"게시판\">";
do {
    if ($mysql->numRows() > 0) {
        $linkRe = "?m=board&board_id=" . $mysql->fetch("board_id");
        $selected_var = "";
        if ($linkRe == $array[link]) {
            $selected_var = "selected";
        }
        $moduleOption .= "<option value=\"" . $linkRe . "\" " . $selected_var . ">" . $mysql->fetch("name") . " (" . $mysql->fetch("board_id") . ")</option>\n";
    }
} while ($mysql->nextRec());
$moduleOption .= "</optgroup>";
echo $moduleOption;
示例#27
0
}
$validator->validt_checked("chk_agreement", "이용약관에 동의해야 합니다.");
$validator->validt_checked("chk_private", "개인정보취급방침에 동의해야 합니다.");
$validator->validt_email("id", 1, "");
$validator->validt_password("password", 1, "");
if ($password != $password02) {
    $validator->validt_diserror("password02", "");
}
$validator->validt_nick("nick", 1, "");
$validator->validt_phone("phone", 0, "");
$validator->validt_phone("telephone", 0, "");
$password_val = "password('{$password}')";
/*
이미 존재하는 아이디인지 검사
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_list\n\t\tWHERE me_id='{$id}' AND me_drop_regdate IS NULL\n\t");
if ($mysql->numRows() > 0) {
    $validator->validt_diserror("id", "이미 존재하는 아이디입니다.");
}
/*
DB 기록
*/
$mysql->query("\n\t\tINSERT INTO toony_member_list\n\t\t(me_id,me_password,me_nick,me_sex,me_phone,me_telephone,me_regdate)\n\t\tVALUES\n\t\t('{$id}',{$password_val},'{$nick}','{$sex}','{$phone}','{$telephone}',now())\n\t");
/*
회원 코드를 가져옴
*/
$mysql->select("\n\t\tSELECT me_idno\n\t\tFROM toony_member_list\n\t\tWHERE me_id='{$id}' AND me_password=password('{$password}') AND me_drop_regdate IS NULL\n\t");
$member['me_idno'] = $mysql->fetch("me_idno");
/*
가입 이력이 없는 새로운 가입인 경우 아이디 인증 메일 발송
*/
示例#28
0
	$('table').visualize({
		type:'area',
		width:'557px',
		height:'130px',
		lineWeight:'2' 
	});
});
</script>
</head>
<body>
<table style="display:none;">
	<thead>
		<tr>
			<td></td>
			<?php 
$mysql->select("\n\t\t\t\t\tSELECT DATE_FORMAT(regdate,'%m') month,DATE_FORMAT(regdate,'%Y') year\n\t\t\t\t\tFROM toony_admin_counter \n\t\t\t\t\tWHERE regdate>DATE_SUB(now(),INTERVAL 5 month)\n\t\t\t\t\tGROUP BY year,month\n\t\t\t\t\tORDER BY year ASC, month ASC\n\t\t\t\t\tLIMIT 6\n\t\t\t\t");
$monthCount = $mysql->numRows();
if ($mysql->numRows() > 0) {
    do {
        $mysql->fetchArray("year,month");
        $array = $mysql->array;
        ?>
			<th><?php 
        echo $array['year'];
        ?>
.<?php 
        echo $array['month'];
        ?>
</th>
			<?php 
    } while ($mysql->nextRec());
示例#29
0
<?php

include "../../include/engine.inc.php";
include __DIR_PATH__ . "include/global.php";
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$validator = new validator();
$lib->security_filter("referer");
$lib->security_filter("request_get");
$method->method_param("POST", "board_id,read_idno,mode");
/*
게시물 설정 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_config\n\t\tWHERE board_id='{$board_id}'\n\t");
$mysql->fetchArray("use_likes");
$c_array = $mysql->array;
/*
검사
*/
if ($c_array['use_likes'] == "N") {
    $validator->validt_diserror("", "추천 기능 비활성 중입니다.");
}
if ($member['me_level'] > 9) {
    $validator->validt_diserror("", "추천 권한이 없습니다.\n\n추천/비추천은 회원만 가능합니다.");
}
/*
이미 추천.비추천 했는지 검사
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_module_board_like\n\t\tWHERE board_id='{$board_id}' AND read_idno='{$read_idno}' AND me_idno='{$member['me_idno']}'\n\t");
if ($mysql->numRows() > 0) {
示例#30
0
<?php

$tpl = new skinController();
$mysql = new mysqlConnection();
$lib = new libraryClass();
$method->method_param("GET", "vtype");
/*
변수 처리
*/
if (!$vtype || $vtype != "p" && $vtype != "m") {
    $vtype = "p";
}
/*
기본 정보 로드
*/
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_admin_design_mainVisual\n\t\tWHERE vtype='{$vtype}'\n\t");
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$mysql->fetchArray("scriptCode,sourceCode");
$array = $mysql->array;
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/mainVisual.html");
/*
템플릿 함수
*/
function tab_active($tab_vtype)
{
    global $vtype;
    if ($vtype == $tab_vtype) {