コード例 #1
0
ファイル: outModules.inc.php プロジェクト: devwit/toonytool
function call_design_page($vtype, $name)
{
    global $viewType, $site_config, $member, $viewDir, $member_type_var, $article, $m, $p;
    $mysql = new mysqlConnection();
    $lib = new libraryClass();
    $subpage = new skinController();
    $mysql->select("\n\t\t\tSELECT *\n\t\t\tFROM toony_page_list\n\t\t\tWHERE vtype='{$vtype}' AND name='{$name}'\n\t\t");
    $mysql->htmlspecialchars = 0;
    $mysql->nl2br = 0;
    $mysql->fetchArray("scriptCode,source,level,idno");
    $pageArray = $mysql->array;
    if ($vtype == "m") {
        $dir = "m/";
    } else {
        $dir = "";
    }
    //만약, 페이지 정보를 찾을 수 없는 경우(소멸된 경우) 메인 페이지로 이동
    if (!$pageArray['idno']) {
        $lib->error_alert_location("페이지를 찾을 수 없거나, 소멸 되었습니다.", __URL_PATH__ . $dir, "A");
    }
    $_SERVER['QUERY_STRING'] = urlencode($_SERVER['QUERY_STRING']);
    $lib->func_page_level(__URL_PATH__ . "{$viewDir}?article=login&redirect=?{$_SERVER['QUERY_STRING']}", $pageArray['level']);
    //서브페이지와 디자인 결합
    if (isset($member['me_admin']) && $member['me_admin'] == "Y") {
        $modifyButton = '
				<div style="text-align:right; padding-bottom:10px;">
					<input type="button" class="__button_small_gray" value="디자인 변경" onclick="document.location.href=\'' . __URL_PATH__ . 'admin/?p=pageList_modify&vtype=' . $viewType . '&type=modify&act=' . $pageArray['idno'] . '\';" />
				</div>
			';
    } else {
        $modifyButton = "";
    }
    $subpage->skin_file_path("sub.php");
    $subpage->skin_modeling("[contentArea]", $pageArray['scriptCode'] . "\n" . $modifyButton . $pageArray['source']);
    echo $subpage->skin_echo();
}
コード例 #2
0
ファイル: leaveMember.php プロジェクト: devwit/toonytool
$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();
コード例 #3
0
ファイル: contactUs.php プロジェクト: devwit/toonytool
<?php

include_once "include/pageJustice.inc.php";
$tpl = new skinController();
$lib = new libraryClass();
$mysql = new mysqlConnection();
/*
템플릿 로드
*/
$tpl->skin_file_path("_tpl/{$viewDir}contactUs.html");
/*
템플릿 치환
*/
$tpl->skin_modeling("[nick]", $member['me_nick']);
$tpl->skin_modeling("[id_value]", $member['me_id']);
$tpl->skin_modeling("[phone_value]", $member['me_phone']);
if ($member['me_level'] < 10) {
    $tpl->skin_modeling_hideArea("[{nick_member_start}]", "[{nick_member_end}]", "show");
    $tpl->skin_modeling_hideArea("[{nick_guest_start}]", "[{nick_guest_end}]", "hide");
} else {
    $tpl->skin_modeling_hideArea("[{nick_member_start}]", "[{nick_member_end}]", "hide");
    $tpl->skin_modeling_hideArea("[{nick_guest_start}]", "[{nick_guest_end}]", "show");
}
if (!isset($__toony_member_idno)) {
    $tpl->skin_modeling_hideArea("[{capcha_start}]", "[{capcha_end}]", "show");
    $tpl->skin_modeling("[capcha_img]", "<img id=\"zsfImg\" src=\"" . __URL_PATH__ . "capcha/zmSpamFree.php?zsfimg\" alt=\"코드를 바꾸시려면 여기를 클릭해 주세요.\" title=\"코드를 바꾸시려면 여기를 클릭해 주세요.\" style=\"cursor:pointer\" onclick=\"this.src='" . __URL_PATH__ . "capcha/zmSpamFree.php?re&amp;zsfimg='+new Date().getTime()\" />");
} else {
    $tpl->skin_modeling_hideArea("[{capcha_start}]", "[{capcha_end}]", "hide");
}
echo $tpl->skin_echo();
コード例 #4
0
ファイル: read.php プロジェクト: devwit/toonytool
        $skin_read->skin_modeling("[file1]", read_file_text($array['file1_cnt'], $array['file1']));
        $skin_read->skin_modeling("[file2]", read_file_text($array['file2_cnt'], $array['file2']));
        $skin_read->skin_modeling("[likes]", $array['likes_count']);
        $skin_read->skin_modeling("[unlikes]", $array['unlikes_count']);
        $skin_read->skin_modeling("[category]", read_category_name());
        $skin_read->skin_modeling("[delete_btn]", read_delete_btn());
        $skin_read->skin_modeling("[modify_btn]", read_modify_btn());
        $skin_read->skin_modeling("[reply_btn]", read_reply_btn());
        $skin_read->skin_modeling("[array_btn]", read_array_btn());
        $skin_read->skin_modeling("[comment_area]", "<div id=\"read_comment_area\"></div>");
        $skin_read->skin_modeling("[td_1]", $array['td_1']);
        $skin_read->skin_modeling("[td_2]", $array['td_2']);
        $skin_read->skin_modeling("[td_3]", $array['td_3']);
        $skin_read->skin_modeling("[td_4]", $array['td_4']);
        $skin_read->skin_modeling("[td_5]", $array['td_5']);
        echo $skin_read->skin_echo();
    } else {
        if ($read_true == 0) {
            switch ($array['use_secret']) {
                case "N":
                    $lib->func_page_level(__URL_PATH__ . $viewDir . "?article=login&redirect=" . urlencode("?article={$article}&p=read&read={$read}&board_id={$board_id}&where={$where}&keyword={$keyword}"), $c_array[read_level]);
                    break;
                case "Y":
                    $lib->error_alert_back("접근 권한이 없습니다.", "A");
                    break;
            }
        }
    }
}
/*
하단 리스트 출력 기능을 이용하는 경우 하단에 리스트 노출
コード例 #5
0
ファイル: write.php プロジェクト: devwit/toonytool
            $skin_write->skin_modeling("[password]", $array['password']);
            $skin_write->skin_modeling("[email]", $array['email']);
        }
    }
    $skin_write->skin_modeling("[memo]", $array['ment']);
    $skin_write->skin_modeling("[file1_name]", write_file_ed(1));
    $skin_write->skin_modeling("[file2_name]", write_file_ed(2));
    $skin_write->skin_modeling("[write_file_byte]", "(MAX " . $c_array['file_limit'] / 1024 / 1024 . "M)");
    $skin_write->skin_modeling("[submit_btn]", write_submit_btn());
    $skin_write->skin_modeling("[return_btn]", write_return_btn());
    $skin_write->skin_modeling("[td_1]", $array['td_1']);
    $skin_write->skin_modeling("[td_2]", $array['td_2']);
    $skin_write->skin_modeling("[td_3]", $array['td_3']);
    $skin_write->skin_modeling("[td_4]", $array['td_4']);
    $skin_write->skin_modeling("[td_5]", $array['td_5']);
    echo $skin_write->skin_echo();
}
/*
하단 파일&소스코드 출력
*/
$bottom_file_ex = explode("{||||||||||}", $c_array['bottom_file']);
$bottom_source_ex = explode("{||||||||||}", $c_array['bottom_source']);
if ($viewType == "p") {
    $ex_slt = 0;
} else {
    $ex_slt = 1;
}
echo $bottom_source_ex[$ex_slt];
if ($bottom_file_ex[$ex_slt]) {
    include $bottom_file_ex[$ex_slt];
}
コード例 #6
0
ファイル: index.php プロジェクト: devwit/toonytool
</head>
<body>
<?php 
include_once __DIR_PATH__ . "header.inc.php";
/*
페이지 로드(출력)
*/
switch ($call_type) {
    case "design_page":
        call_design_page("p", $p);
        break;
    case "pageAndModule":
        $subpage = new skinController();
        $subpage->skin_file_path("sub.php");
        $subpage->skin_loop_header("[contentArea]");
        echo $subpage->skin_echo();
        include_once $loadFile;
        $subpage->skin = $subpage->skin_org;
        $subpage->skin_loop_footer("[contentArea]");
        echo $subpage->skin_echo();
        break;
    case "notFind":
        include_once __DIR_PATH__ . $defFile;
        break;
    case "default":
        include_once __DIR_PATH__ . $defFile;
        break;
    default:
        include_once __DIR_PATH__ . $defFile;
}
include_once __DIR_PATH__ . "footer.inc.php";
コード例 #7
0
ファイル: global.php プロジェクト: devwit/toonytool
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;
}
コード例 #8
0
ファイル: account.idCheck.php プロジェクト: devwit/toonytool
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에서 아이디 체크 완료 내역을 기록
*/
$mysql->select("\n\t\tSELECT me_idno\n\t\tFROM toony_member_idCheck \n\t\tWHERE ric_code='{$code}'\n\t");
$me_idno = $mysql->fetch("me_idno");
$mysql->query("\n\t\tUPDATE toony_member_list\n\t\tSET me_idCheck='Y'\n\t\tWHERE me_idno='{$me_idno}'\n\t");
/*
인증코드 폐기
*/
$mysql->query("\n\t\tUPDATE toony_member_idCheck\n\t\tSET ric_check='Y'\n\t\tWHERE ric_code='{$code}'\n\t");
/*
아무런 이상 없이 수행된 경우 완료 화면 출력
*/
コード例 #9
0
ファイル: delete.php プロジェクト: devwit/toonytool
echo "\n<link href=\"" . __URL_PATH__ . "modules/board/skin/{$c_array['skin']}/{$viewDir}style.css\" rel=\"stylesheet\" type=\"text/css\" />";
/*
템플릿 치환
*/
if ($delete_true == 0) {
    $lib->error_alert_back("삭제 권한이 없습니다.", "A");
}
if ($delete_true == 2) {
    $skin_delete_form->skin_modeling("[board_id_value]", $board_id);
    $skin_delete_form->skin_modeling("[read_value]", $read);
    $skin_delete_form->skin_modeling("[page_value]", $page);
    $skin_delete_form->skin_modeling("[where_value]", $where);
    $skin_delete_form->skin_modeling("[keyword_value]", $keyword);
    $skin_delete_form->skin_modeling("[article_value]", $article);
    $skin_delete_form->skin_modeling("[category_value]", $category);
    echo $skin_delete_form->skin_echo();
}
/*
삭제처리
*/
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값을 불러옴