示例#1
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>";
    }
}
示例#2
0
$method->method_param("POST", "save_id,redirect,id,password");
$lib->security_filter("referer");
$lib->security_filter("request_get");
/*
검사
*/
if ($member['me_level'] < 10) {
    $validator->validt_diserror("", "이미 로그인 되어 있습니다.");
}
$validator->validt_email("id", 1, "");
$validator->validt_password("password", 1, "");
$mysql->select("\n\t\tSELECT *\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");
if ($mysql->numRows() < 1) {
    $validator->validt_diserror("id", "아이디 혹은 비밀번호가 잘못 되었습니다.");
}
if ($mysql->fetch("me_idCheck") == "N") {
    $validator->validt_returnAjax("이메일 인증이 필요한 아이디입니다.", "account.idCheck.send.php");
}
/*
로그인 처리
*/
$member['me_id'] = $mysql->fetch("me_id");
$member['me_idno'] = $mysql->fetch("me_idno");
$session->session_register("__toony_member_idno", $member['me_idno']);
/*
로그인 내역 기록
*/
$mysql->query("\n\t\tUPDATE toony_member_list\n\t\tSET me_login_ip='{$_SERVER['REMOTE_ADDR']}',me_login_regdate=now()\n\t\tWHERE me_idno='{$member['me_idno']}';\n\t");
/*
아이디 저장을 체크한 경우 아이디를 쿠키에 저장
*/
示例#3
0
/*
이미 존재하는 아이디인지 검사
*/
$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");
/*
가입 이력이 없는 새로운 가입인 경우 아이디 인증 메일 발송
*/
//인증 메일 발송
$idCheckCode = md5(date("YmdHis") . $id);
$idCheckUrl = __URL_PATH__ . "?article=account&p=account.idCheck&code=" . $idCheckCode . "&keepViewType=true";
$mailSender->template = "account";
$mailSender->t_email = $id;
$mailSender->t_name = $nick;
$mailSender->subject = "{$nick}님, {$site_config['ad_site_name']} 이메일 인증을 해주세요.";
$mailSender->account_check_url = "<a href=\"{$idCheckUrl}\" target=\"_blank\">" . $idCheckUrl . "</a>";
$mailSender->mail_send();
//인증 메일 발송 이력 DB 기록
$mysql->query("\n\t\tINSERT INTO toony_member_idCheck\n\t\t(me_idno,ric_code,ric_regdate)\n\t\tVALUES\n\t\t('{$member['me_idno']}','{$idCheckCode}',now())\n\t");
/*
示例#4
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();
示例#5
0
/*
변수 처리
*/
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];
$array['list_m_limit'] = $list_limit_exp[1];
$length_limit_exp = explode("|", $array['length_limit']);
$array['length_limit'] = $length_limit_exp[0];
$array['length_m_limit'] = $length_limit_exp[1];
$article_length_exp = explode("|", $array['article_length']);
示例#6
0
文件: sub.php 项目: devwit/toonytool
서브페이지 네비게이션 선언
*/
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"));
$tpl->skin_modeling("[navigator]", $naviTxt);
echo $tpl->skin_echo();
示例#7
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();
示例#8
0
    //검사
    if ($type == 1) {
        $me_idno = "";
        $validator->validt_nick("writer", 1, "");
    } else {
        if ($type == 2) {
            $me_idno = $member['me_idno'];
            $writer = $member['me_nick'];
        } else {
            $validator->validt_diserror("", "오류. 댓글 등록 불가");
        }
    }
    $validator->validt_strLen("comment", 5, "", 1, "댓글은 5자 이상 입력해야 합니다.");
    //ln값 처리
    $mysql->select("\n\t\t\tSELECT MAX(ln)+1000 AS ln_max\n\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\tWHERE bo_idno='{$read}'\n\t\t");
    $ln_array['ln_max'] = $mysql->fetch("ln_max");
    if (!$ln_array['ln_max']) {
        $ln_array['ln_max'] = 1000;
    }
    $ln_array['ln_max'] = ceil($ln_array['ln_max'] / 1000) * 1000;
    //DB 기록
    $mysql->query("\n\t\t\tINSERT INTO toony_module_board_comment_{$board_id}\n\t\t\t(ln,bo_idno,me_idno,writer,comment,ip,regdate,tr_1,tr_2,tr_3,tr_4,tr_5) \n\t\t\tVALUES\n\t\t\t('{$ln_array['ln_max']}','{$read}','{$me_idno}','{$writer}','{$comment}','{$_SERVER['REMOTE_ADDR']}',now(),'{$tr_1}','{$tr_2}','{$tr_3}','{$tr_4}','{$tr_5}')\n\t\t");
    //완료후 리턴
    $validator->validt_success_function("read_comment_include()");
}
/*
대댓글 등록
*/
if ($mode == 11) {
    //검사
    if ($type == 1) {
示例#9
0
{
    global $array;
    if ($array['depth'] < 2) {
        return $array['idno'];
    } else {
        return $array['class'];
    }
}
/*
템플릿 치환
*/
//Header
$header->skin_modeling("[tab_active_p]", tab_active("p"));
$header->skin_modeling("[tab_active_m]", tab_active("m"));
$header->skin_modeling("[vtype_value]", $vtype);
$header->skin_modeling("[mainPage_name]", $mysql->fetch("main_name"));
$header->skin_modeling("[idno]", $mysql->fetch("main_idno"));
echo $header->skin_echo();
//Loop
$i = 0;
do {
    if ($mysql->numRows() > 0) {
        $mysql->htmlspecialchars = 1;
        $mysql->nl2br = 1;
        $mysql->fetchArray("name,class,zindex,idno,depth,useMenu");
        $array = $mysql->array;
        $loop->skin_modeling("[name]", name_func());
        $loop->skin_modeling("[zindex]", $array['zindex']);
        $loop->skin_modeling("[depth]", $array['depth']);
        $loop->skin_modeling("[class]", $array['class']);
        $loop->skin_modeling("[parent]", $array['idno']);
示例#10
0
/*
변수 처리
*/
if (!$vtype || $vtype != "p" && $vtype != "m") {
    $vtype = "p";
}
/*
수정 모드인 경우 기본 정보 로드
*/
if ($type == "modify") {
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_page_list\n\t\t\tWHERE idno='{$act}'\n\t\t");
    $mysql->fetchArray("name,memo,idno,level,vtype");
    $array = $mysql->array;
    $mysql->htmlspecialchars = 0;
    $mysql->nl2br = 0;
    $array['source'] = $mysql->fetch("source");
    $array['scriptCode'] = $mysql->fetch("scriptCode");
} else {
    $array = NULL;
}
/*
검사
*/
if ($type == "modify" && $mysql->numRows() < 1) {
    $lib->error_alert_location("페이지가 존재하지 않습니다.", $site_config['ad_site_url'], "A");
}
if (!$type) {
    $lib->error_alert_location("호출 값이 없습니다.", $site_config['ad_site_url'], "A");
}
/*
템플릿 로드
示例#11
0
$lib = new libraryClass();
$mysql = new mysqlConnection();
$method = new methodController();
$method->method_param("GET", "vtype");
/*
기본 정보 로드
*/
if ($vtype == "m") {
    $table_field = "ad_msite_main";
} else {
    $table_field = "ad_site_main";
}
$mysql->select("\n\t\tSELECT {$table_field} as site_html\n\t\tFROM toony_admin_siteconfig\n\t\tWHERE 1\n\t\tORDER BY 1 DESC\n\t");
$mysql->htmlspecialchars = 0;
$mysql->nl2br = 0;
$site_html = $mysql->fetch("site_html");
/*
템플릿 로드
*/
if ($vtype == "m") {
    $load_page = "admin/_tpl/mainPage.m.html";
} else {
    $load_page = "admin/_tpl/mainPage.html";
}
$tpl->skin_file_path($load_page);
/*
템플릿 함수
*/
function board_selecbox_options()
{
    global $mysql, $vtype;
示例#12
0
    $globalMysql->fetchArray("me_idno,me_id,me_password,me_nick,me_name,me_level,me_sex,me_phone,me_telephone,me_regdate,me_login_regdate,me_login_ip,me_point,me_admin");
    $member = $globalMysql->array;
} else {
    $member['me_level'] = 10;
    $member['me_idno'] = NULL;
    $member['me_id'] = NULL;
    $member['me_nick'] = NULL;
    $member['me_phone'] = NULL;
    $member['me_admin'] = NULL;
}
/*
회원 레벨별 명칭을 불러옴
*/
$globalMysql->select("\n\t\tSELECT ad_member_type\n\t\tFROM toony_admin_siteconfig\n\t\tLIMIT 1\n\t");
for ($MT_vars_i = 0; $MT_vars_i <= 8; $MT_vars_i++) {
    $vars = explode(",", htmlspecialchars(stripslashes($globalMysql->fetch("ad_member_type"))));
}
for ($MT_vars_i = 1; $MT_vars_i <= 9; $MT_vars_i++) {
    $member_type_var[$MT_vars_i] = $vars[$MT_vars_i - 1];
}
$member_type_var['10'] = "비회원";
/*
사이트 기본 정보 설정 불러옴
*/
$globalMysql->select("\n\t\tSELECT *\n\t\tFROM toony_admin_siteconfig\n\t");
$globalMysql->fetchArray("ad_site_layout,ad_msite_layout,ad_site_name,ad_site_url,ad_msite_url,ad_use_msite,ad_site_title,ad_email,ad_phone,ad_pavicon,ad_logo,ad_use_smtp,ad_smtp_server,ad_smtp_port,ad_smtp_id,ad_smtp_pwd");
$site_config = $globalMysql->array;
/*
방문자 분석을 위한 함수 시작
*/
$lib->func_visiter_counter_status();
示例#13
0
/*
삭제처리
*/
if ($delete_true == 1) {
    //최소/최대 ln값 구함
    $ln_min = (int) (ceil($array['ln'] / 1000) * 1000) - 1000;
    $ln_max = (int) (ceil($array['ln'] / 1000) * 1000);
    //부모글인 경우 삭제 조건문 만듬
    if ($array['rn'] == 0) {
        $delete_where = "ln>{$ln_min} AND ln<={$ln_max}";
        //자식글(답글)인 경우 삭제 조건문 만듬
    } else {
        if ($array['rn'] >= 1) {
            //같은 레벨중 바로 아래 답글의 ln값을 불러옴
            $mysql->select("\n\t\t\t\tSELECT ln \n\t\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\t\tWHERE ln>={$ln_min} AND ln<{$array['ln']} AND rn={$array['rn']}\n\t\t\t\tORDER BY ln DESC\n\t\t\t\tLIMIT 1\n\t\t\t");
            $earray[ln] = $mysql->fetch("ln");
            if ($earray[ln] == "") {
                $delete_where = "ln<={$array['ln']} AND ln>{$ln_min} AND rn>={$array['rn']}";
            } else {
                $delete_where = "ln<={$array['ln']} AND ln>{$earray['ln']} AND rn>={$array['rn']}";
            }
        }
    }
    //첨부파일 삭제
    $fileUploader->savePath = __DIR_PATH__ . "modules/board/upload/" . $board_id . "/";
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_module_board_data_{$board_id} \n\t\t\tWHERE {$delete_where}\n\t\t");
    do {
        $mysql->fetchArray("file1,file2");
        $farray = $mysql->array;
        if ($farray['file1'] != "") {
            $fileUploader->fileDelete($farray['file1']);
示例#14
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]);
             }
             //대상 게시판으로 첨부파일을 복사
             $oldPath = __DIR_PATH__ . "modules/board/upload/" . $board_id . "/";
示例#15
0
$notAccount_tpl->skin_loop_array("[{idCheck_notAccount_start}]", "[{idCheck_notAccount_end}]");
//폐기된 인증코드인 경우
$notFound_tpl->skin_html_load($tpl->skin);
$notFound_tpl->skin_loop_array("[{idCheck_notFound_start}]", "[{idCheck_notFound_end}]");
//이미 인증된 인증코드인 경우
$destroy_tpl->skin_html_load($tpl->skin);
$destroy_tpl->skin_loop_array("[{idCheck_destroy_start}]", "[{idCheck_destroy_end}]");
/*
검사
*/
$successVar = true;
if (trim($code) == "") {
    $lib->error_alert_location("정상적으로 접근하세요.", $site_config[ad_site_url], "A");
}
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_idCheck \n\t\tWHERE ric_code='{$code}'\n\t");
$ric_me_idno = $mysql->fetch("me_idno");
if ($mysql->numRows() < 1) {
    echo $notAccount_tpl->skin_echo();
    $successVar = false;
}
$mysql->select("\n\t\tSELECT *\n\t\tFROM toony_member_idCheck\n\t\tWHERE me_idno='{$ric_me_idno}'\n\t\tORDER BY ric_regdate DESC\n\t\tLIMIT 1\n\t");
if ($successVar == true && $mysql->fetch("ric_code") != $code) {
    echo $notFound_tpl->skin_echo();
    $successVar = false;
}
if ($successVar == true && $mysql->fetch("ric_check") == "Y") {
    echo $destroy_tpl->skin_echo();
    $successVar = false;
}
/*
회원 DB에서 아이디 체크 완료 내역을 기록
示例#16
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;
}
示例#17
0
    global $year_var, $mysql;
    $mysql->select("\n\t\t\tSELECT DATE_FORMAT(regdate,'%Y') month\n\t\t\tFROM toony_admin_counter \n\t\t\tGROUP BY month\n\t\t\tORDER BY month DESC;\n\t\t");
    $option = "";
    do {
        if ($year_var == $mysql->fetch("month")) {
            $op_selected = " selected";
        } else {
            $op_selected = "";
        }
        $option .= "<option value=\"" . $mysql->fetch("month") . "\"" . $op_selected . ">" . $mysql->fetch("month") . "</option>\n";
    } while ($mysql->nextRec());
    return $option;
}
/*
템플릿 치환
*/
//header
$header->skin_modeling("[month_select_option]", month_select_option());
echo $header->skin_echo();
//loop
$mysql->select("\n\t\tSELECT\n\t\tCOUNT(*) count_re,\n\t\tDATE_FORMAT(regdate,'%Y.%m') date_re\n\t\tFROM toony_admin_counter\n\t\tWHERE DATE_FORMAT(regdate,'%Y')='{$year_var}'\n\t\tGROUP BY date_re\n\t\tORDER BY date_re DESC;\n\t");
if ($mysql->numRows() > 0) {
    do {
        $loop->skin_modeling("[count]", number_format($mysql->fetch("count_re")));
        $loop->skin_modeling("[date]", $mysql->fetch("date_re"));
        $loop->skin_modeling("[day_btn]", "<a href=\"#\" class=\"RV_btn_img __btn_s_detail\" title=\"월별 보기\" RV_day=\"" . $mysql->fetch("date_re") . "\"></a>");
        echo $loop->skin_echo();
    } while ($mysql->nextRec());
}
//footer
echo $footer->skin_echo();
示例#18
0
$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']);
    /*
    메뉴 타입이 페이지&모듈 연결인 경우, URI형식의 문자열을 GET변수화 처리
示例#19
0
include "include/engine.inc.php";
include __DIR_PATH__ . "include/global.php";
$lib = new libraryClass();
$method = new methodController();
$mysql = new mysqlConnection();
$mailSender = new mailSender();
$validator = new validator();
$method->method_param("POST", "id,nick");
$lib->security_filter("referer");
$lib->security_filter("request_get");
/*
회원 정보를 불러옴
*/
$mysql->select("\n\t\tSELECT me_nick,me_idno\n\t\tFROM toony_member_list\n\t\tWHERE me_id='{$id}' AND me_drop_regdate IS NULL\n\t");
$member['me_nick'] = $mysql->fetch("me_nick");
$member['me_idno'] = $mysql->fetch("me_idno");
/*
인증 메일 발송
*/
$idCheckCode = md5(date("YmdHis") . $id);
$idCheckUrl = __URL_PATH__ . "?article=account&p=account.idCheck&code=" . $idCheckCode . "&keepViewType=true";
$mailSender->account_check_url = "<a href=\"{$idCheckUrl}\" target=\"_blank\">" . $idCheckUrl . "</a>";
$mailSender->template = "account";
$mailSender->t_email = $id;
$mailSender->t_name = $member['me_nick'];
$mailSender->subject = "{$member['me_nick']}님, {$site_config['ad_site_name']} 이메일 인증을 해주세요.";
$mailSender->mail_send();
/*
인증 메일 발송 이력 DB 기록
*/
<?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;
示例#21
0
/*
시간 초기화
*/
$month_var = $month;
/*
템플릿 로드
*/
$tpl->skin_file_path("admin/_tpl/countResult_day.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
echo $header->skin_echo();
//loop
$mysql->select("\n\t\tSELECT COUNT(*) count_re,\n\t\tDATE_FORMAT(regdate,'%Y.%m.%d') date_re\n\t\tFROM toony_admin_counter\n\t\tWHERE DATE_FORMAT(regdate,'%Y.%m')='{$month_var}'\n\t\tGROUP BY date_re\n\t\tORDER BY date_re DESC\n\t");
if ($mysql->numRows() > 0) {
    do {
        $loop->skin_modeling("[count]", number_format($mysql->fetch("count_re")));
        $loop->skin_modeling("[date]", substr($mysql->fetch("date_re"), 5));
        $loop->skin_modeling("[list_btn]", "<img src=\"" . __URL_PATH__ . "admin/images/countResult_spr_down.png\" RV_list=\"" . $mysql->fetch("date_re") . "\" class=\"list_btn_img\" RV_list=\"" . $mysql->fetch("date_re") . "\" />");
        echo $loop->skin_echo();
    } while ($mysql->nextRec());
}
//footer
echo $footer->skin_echo();
    $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") {
        $mysql->select("\n\t\t\t\tSELECT useMenu\n\t\t\t\tFROM toony_admin_menuInfo\n\t\t\t\tWHERE idno='{$thisClass}' AND depth=1\n\t\t\t");
示例#23
0
$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;
}
/*
옵션값 처리
*/
if ($use_notice == true) {
    $use_notice = "Y";
} else {
    $use_notice = "N";
示例#24
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;
    }
}
/* 
示例#25
0
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");
/*
템플릿 함수
*/
//수신 범위 출력
function receive_func()
示例#26
0
function total_count()
{
    $query = new mysqlConnection();
    $query->select("select count(*) total_count from toony_admin_counter");
    return number_format($query->fetch("total_count"));
}
示例#27
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";
    }
}
示例#28
0
    $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) {
    $validator->validt_diserror("", "이미 참여 하였습니다.");
}
/*
추천/비추천 처리
*/
if ($mode == "likes") {
    $likes = 1;
    $unlikes = 0;
    $return_where = "AND likes>0";
} else {
    $likes = 0;
    $unlikes = 1;
    $return_where = "AND unlikes>0";
}
$mysql->query("\n\t\tINSERT INTO toony_module_board_like\n\t\t(board_id,read_idno,me_idno,likes,unlikes,regdate)\n\t\tVALUES\n\t\t('{$board_id}','{$read_idno}','{$member['me_idno']}','{$likes}','{$unlikes}',now())\n\t");
/*
추천/비추천 완료 후 추천/비추천 카운트를 리턴
*/
$mysql->select("\n\t\tSELECT\n\t\tCOUNT(*) totalCount\n\t\tFROM toony_module_board_like\n\t\tWHERE board_id='{$board_id}' AND read_idno='{$read_idno}' {$return_where}\n\t");
$validator->validt_success_return("._read_likesArea ._" . $mode . "_btn .__count", $mysql->fetch("totalCount"));
示例#29
0
$lib->security_filter("referer");
$lib->security_filter("request_get");
$method->method_param("POST", "min_level,max_level,receiver_id,subject,memo");
$validator->validt_tags("memo", 1, "");
/*
검사
*/
$validator->validt_null("subject", "");
$validator->validt_null("memo", "");
//특정 회원의 이메일 주소가 입력된 경우, 회원 유무 검사
if (trim($receiver_id) != "") {
    $mysql->select("\n\t\t\tSELECT me_idno\n\t\t\tFROM toony_member_list \n\t\t\tWHERE me_id='{$receiver_id}' AND me_drop_regdate IS NULL\n\t\t");
    if ($mysql->numRows() < 1) {
        $validator->validt_diserror("receiver_id", "존재하지 않는 회원 아이디 입니다.");
    }
    $receiver_idno = $mysql->fetch("me_idno");
} else {
    $receiver_idno = "";
}
//수신 회원 범위 유효성 검사
if (trim($receiver_id) == "") {
    if ($min_level == "none") {
        $validator->validt_diserror("min_receiver", "최하 수신 범위를 선택 하세요.");
    }
    if ($max_level == "none") {
        $validator->validt_diserror("max_receiver", "최대 수신 범위를 선택 하세요.");
    }
    if ($min_level < $max_level) {
        $validator->validt_diserror("max_receiver", "최대 수신 범위가 최소 수신 범위보다 낮을 수 없습니다.");
    }
}