{ global $xoopsTpl; $xoopsTpl->assign("title", sprintf(_MD_TADGAL_INPUT_ALBUM_PASSWD, $title)); $xoopsTpl->assign("csn", $csn); } /*-----------執行動作判斷區----------*/ $op = system_CleanVars($_REQUEST, 'op', '', 'string'); $sn = system_CleanVars($_REQUEST, 'sn', 0, 'int'); $uid = system_CleanVars($_REQUEST, 'uid', 0, 'int'); $show_uid = system_CleanVars($_REQUEST, 'show_uid', 0, 'int'); if (!empty($csn) and !empty($passwd)) { $_SESSION['tadgallery'][$csn] = $passwd; } switch ($op) { case "passwd_form": passwd_form($csn, $cate['title']); break; default: list_photos($csn, $show_uid); break; } /*-----------秀出結果區--------------*/ $arr = get_tadgallery_cate_path($csn); $jBreadCrumbPath = breadcrumb($csn, $arr); $xoopsTpl->assign("path", $jBreadCrumbPath); $author_menu = get_all_author($show_uid); $xoopsTpl->assign("author_option", $author_menu); $xoopsTpl->assign("toolbar", toolbar_bootstrap($interface_menu)); if ($xoTheme) { $xoTheme->addStylesheet('modules/tadgallery/module.css'); $xoTheme->addStylesheet('modules/tadgallery/class/jquery.thumbs/jquery.thumbs.css');
print_alert("DB를 지정하셔야 합니다.", 'back'); exit; } /* 글번호 지정 여부 */ if (!$idx || !$rn) { header("Location: {$URL['list']}\n\n"); exit; } /* 비밀번호 입력폼 */ if ($m == 'form') { $from_string = "pn={$pn}"; if ($from == 'search') { $from_string .= "&k={$k}&w={$w}"; } $back_url = "{$URL[$from]}?db={$db}&from={$from}&" . $from_string; passwd_form($db, $idx, $rn, $back_url); exit; } /* Table 이름 지정 */ $table_name = "bbs_" . $db; /* 데이타 가져오기 */ $dbh = dbconnect(); $query = "select idx,passwd,filename from {$table_name} where idx={$idx} and replynum={$rn}"; $sth = dbquery($dbh, $query); if (!$sth) { print_alert(mysql_error(), 'back'); } list($d_idx, $d_passwd, $d_filename) = dbselect($sth); /* 존재하지 않을때 */ if (!$idx) { print_alert("데이터가 존재하지 않습니다.", 'stop');