Beispiel #1
0
    $xoopsDB->queryF($sql) or redirect_header($_SERVER['PHP_SELF'], 10, mysql_error());
}
/*-----------執行動作判斷區----------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$op = system_CleanVars($_REQUEST, 'op', '', 'string');
$sn = system_CleanVars($_REQUEST, 'sn', 0, 'int');
$csn = system_CleanVars($_REQUEST, 'csn', 0, 'int');
switch ($op) {
    case "good":
        update_tad_gallery_good($sn, '1');
        header("location: view.php?sn={$sn}#photo{$sn}");
        break;
    case "good_del":
        update_tad_gallery_good($sn, '0');
        header("location: view.php?sn={$sn}#photo{$sn}");
        break;
    case "delete_tad_gallery":
        $csn = delete_tad_gallery($sn);
        mk_rss_xml();
        mk_rss_xml($csn);
        header("location: index.php?csn={$csn}");
        break;
    default:
        view_pic($sn);
        break;
}
/*-----------秀出結果區--------------*/
$xoopsTpl->assign("toolbar", toolbar_bootstrap($interface_menu));
$xoopsTpl->assign("bootstrap", get_bootstrap());
include_once XOOPS_ROOT_PATH . '/include/comment_view.php';
include_once XOOPS_ROOT_PATH . '/footer.php';
Beispiel #2
0
        $page_bar['current'] = $this->current;
        $page_bar['total'] = $this->pTotal;
        $page_bar['sql'] = $this->sqlQuery();
        return $page_bar;
    }
}
/*-----------執行動作判斷區----------*/
$_REQUEST['op'] = empty($_REQUEST['op']) ? "" : $_REQUEST['op'];
$sn = isset($_REQUEST['sn']) ? intval($_REQUEST['sn']) : 0;
$csn = isset($_REQUEST['csn']) ? intval($_REQUEST['csn']) : 0;
$passwd = isset($_POST['passwd']) ? $_POST['passwd'] : "";
$jquery = get_jquery();
switch ($_REQUEST['op']) {
    default:
        if (!empty($sn)) {
            $main = view_pic($sn);
            $pic = tadgallery::get_tad_gallery($sn);
            $csn = $pic['csn'];
        } else {
            $main = show_cate($csn, $passwd);
        }
        break;
}
//分類下拉選單
$cate_option = get_tad_gallery_cate_option(0, 0, $csn);
$cate = tadgallery::get_tad_gallery_cate($csn);
$cate_title = $cate['title'];
//$jquery=get_jquery();
/*-----------秀出結果區--------------*/
$title = $xoopsModule->getVar('name');
$title_m = empty($cate['title']) ? "{$title}" : "{$title}-{$cate['title']}";