Exemple #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>";
    }
}
Exemple #2
0
$header->skin_modeling("[where_value_me_nick]", where_value_func("me_nick"));
$header->skin_modeling("[where_value_me_id]", where_value_func("me_id"));
$header->skin_modeling("[where_value_me_login_ip]", where_value_func("me_login_ip"));
$header->skin_modeling("[order_value]", $order);
$header->skin_modeling("[orderby_value]", $orderby);
echo $header->skin_echo();
//loop
if ($array_total > 0) {
    $i = 0;
    do {
        $mysql->fetchArray("me_idno,me_id,me_level,me_nick,me_regdate,me_point,me_drop_regdate");
        $array = $mysql->array;
        $loop->skin_modeling("[number]", $paging->getNo($i));
        $i++;
        $loop->skin_modeling("[member_type]", $member_type_var[$array['me_level']] . " ({$array['me_level']})");
        $loop->skin_modeling("[name]", $array['me_nick']);
        $loop->skin_modeling("[point]", number_format($array['me_point']));
        $loop->skin_modeling("[id]", $array['me_id']);
        $loop->skin_modeling("[regdate]", "<span title=\"" . $array['me_regdate'] . "\">" . date("Y.m.d", strtotime($array['me_regdate'])) . "</span>");
        $loop->skin_modeling("[drop_regdate]", "<span title=\"" . $array['me_drop_regdate'] . "\">" . date("Y.m.d", strtotime($array['me_drop_regdate'])) . "</span>");
        echo $loop->skin_echo();
    } while ($mysql->nextRec());
}
//footer
if ($array_total > 0) {
    $footer->skin_modeling_hideArea("[{not_content_start}]", "[{not_content_end}]", "hide");
} else {
    $footer->skin_modeling_hideArea("[{not_content_start}]", "[{not_content_end}]", "show");
}
$footer->skin_modeling("[paging_area]", $paging->Show(__URL_PATH__ . "admin/?p=leaveMember&where={$where}&keyword={$keyword}&order={$order}&orderby={$orderby}"));
echo $footer->skin_echo();
Exemple #3
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;
}
Exemple #4
0
                $tar_mysql->select("\n\t\t\t\t\t\tSELECT MAX(ln)+1000 AS ln_max\n\t\t\t\t\t\tFROM toony_module_board_comment_{$tar_board_id}\n\t\t\t\t\t\tWHERE 1\n\t\t\t\t\t\tORDER BY ln DESC\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t");
                $c_tar_ln = $tar_mysql->fetch("ln_max");
                if (!$c_tar_ln) {
                    $c_tar_ln = 1000;
                }
                $c_tar_ln = ceil($c_tar_ln / 1000) * 1000;
                //댓글 복사를 위한 원본 댓글 테이블의 댓글 추출
                $tar_mysql->select("\n\t\t\t\t\t\tSELECT *\n\t\t\t\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\t\t\t\tWHERE bo_idno='{$array['idno']}'\n\t\t\t\t\t");
                if ($tar_mysql->numRows() > 0) {
                    do {
                        $tar_mysql->htmlspecialchars = 0;
                        $tar_mysql->nl2br = 0;
                        $tar_mysql->fetchArray("ln,rn,bo_idno,me_idno,writer,comment,ip,regdate,tr_1,tr_2,tr_3,tr_4,tr_5");
                        $c_array = $tar_mysql->array;
                        //가져온 원본들의 내용을 addslashes 시킴
                        foreach ($c_array as $key => $value) {
                            $c_array[$key] = addslashes($c_array[$key]);
                        }
                        $c_tar_mysql->query("\n\t\t\t\t\t\t\t\tINSERT INTO\n\t\t\t\t\t\t\t\ttoony_module_board_comment_{$tar_board_id}\n\t\t\t\t\t\t\t\t(ln,rn,bo_idno,me_idno,writer,comment,ip,regdate,tr_1,tr_2,tr_3,tr_4,tr_5)\n\t\t\t\t\t\t\t\tVALUES\n\t\t\t\t\t\t\t\t('{$c_array['ln']}','{$c_array['rn']}','{$tar_read_idno}','{$c_array['me_idno']}','{$c_array['writer']}','{$c_array['comment']}','{$c_array['ip']}','{$c_array['regdate']}','{$c_array['tr_1']}','{$c_array['tr_2']}','{$c_array['tr_3']}','{$c_array['tr_4']}','{$c_array['tr_5']}')\n\t\t\t\t\t\t\t");
                    } while ($tar_mysql->nextRec());
                }
                //기존 댓글 삭제
                $tar_mysql->query("\n\t\t\t\t\t\tDELETE\n\t\t\t\t\t\tFROM toony_module_board_comment_{$board_id}\n\t\t\t\t\t\tWHERE bo_idno='{$array['idno']}'\n\t\t\t\t\t");
                //원본글 삭제
                $tar_mysql->query("\n\t\t\t\t\t\tDELETE\n\t\t\t\t\t\tFROM toony_module_board_data_{$board_id}\n\t\t\t\t\t\tWHERE idno='{$array['idno']}'\n\t\t\t\t\t");
                $tar_ln--;
            } while ($mysql->nextRec());
        }
    }
    $validator->validt_success("성공적으로 이동 되었습니다.", "window.close&&opener.reload");
}