Exemplo n.º 1
0
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 *
 * @copyright    The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license      http://www.fsf.org/copyleft/gpl.html GNU public license
 * @package      Tad Web
 * @since        2.5.0
 * @author       Tad
 * @version      $Id $
 **/
include '../../../include/cp_header.php';
defined('FRAMEWORKS_ART_FUNCTIONS_INI') || (include_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.ini.php');
include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/class/admin.php";
load_functions('admin');
if (!@(include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/language/" . $xoopsConfig['language'] . "/main.php")) {
    include_once XOOPS_ROOT_PATH . "/modules/" . $xoopsModule->getVar("dirname") . "/language/english/main.php";
}
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
    include_once XOOPS_ROOT_PATH . '/class/template.php';
    $xoopsTpl = new XoopsTpl();
}
if (file_exists(XOOPS_ROOT_PATH . "/modules/tadtools/include/beforeheader.php")) {
    include_once XOOPS_ROOT_PATH . "/modules/tadtools/include/beforeheader.php";
    $xoopsOption['template_main'] = set_bootstrap();
}
xoops_cp_header();
// Define Stylesheet and JScript
$xoTheme->addStylesheet(XOOPS_URL . "/modules/" . $xoopsModule->getVar('dirname') . "/css/admin.css");
//$xoTheme->addScript("browse.php?Frameworks/jquery/jquery.js");
//$xoTheme->addScript("browse.php?modules/" . $xoopsModule->getVar("dirname") . "/js/admin.js");
Exemplo n.º 2
0
<?php

/*-----------引入檔案區--------------*/
include_once "header.php";
$xoopsOption['template_main'] = set_bootstrap("tadgallery_cooliris.html");
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$csn = system_CleanVars($_REQUEST, 'csn', 0, 'int');
$xoopsTpl->assign("csn", $csn);
$xoopsTpl->assign("up_file_url", _TADGAL_UP_FILE_URL);
list_tad_gallery_cate_tree($csn);
//列出所有tad_gallery_cate資料
function list_tad_gallery_cate_tree($def_csn = "")
{
    global $xoopsDB, $xoopsTpl;
    $tadgallery = new tadgallery();
    $cate_count = $tadgallery->get_tad_gallery_cate_count();
    $path = get_tadgallery_cate_path($def_csn);
    $path_arr = array_keys($path);
    $sql = "select csn,of_csn,title from " . $xoopsDB->prefix("tad_gallery_cate") . " order by sort";
    $result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'], 3, mysql_error());
    while (list($csn, $of_csn, $title) = $xoopsDB->fetchRow($result)) {
        $font_style = $def_csn == $csn ? ", font:{'background-color':'yellow', 'color':'black'}" : '';
        $open = in_array($csn, $path_arr) ? 'true' : 'false';
        $display_counter = empty($cate_count[$csn]['file']) ? "" : " ({$cate_count[$csn]['file']})";
        $data[] = "{ id:{$csn}, pId:{$of_csn}, name:'{$title}{$display_counter}', url:'cooliris.php?csn={$csn}', open: {$open} ,target:'_self' {$font_style}}";
    }
    $json = implode(",\n", $data);
    if (!file_exists(XOOPS_ROOT_PATH . "/modules/tadtools/ztree.php")) {
        redirect_header("index.php", 3, _MA_NEED_TADTOOLS);
Exemplo n.º 3
0
<?php

/*-----------引入檔案區--------------*/
include_once "header.php";
$web_cate = new web_cate($WebID, "tad_web_discuss", "discuss");
if (!empty($_GET['WebID'])) {
    $xoopsOption['template_main'] = 'tad_web_discuss_b3.html';
} else {
    $xoopsOption['template_main'] = set_bootstrap('tad_web_discuss.html');
}
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
//tad_web_discuss編輯表單
function tad_web_discuss_form($DiscussID = "")
{
    global $xoopsDB, $xoopsUser, $WebID, $MyWebs, $isAdmin, $xoopsTpl, $web_cate;
    if (!isAdmin and !$MyWebs and empty($_SESSION['LoginMemID'])) {
        redirect_header("index.php", 3, _MD_TCW_LOGIN_TO_POST);
    }
    //抓取預設值
    if (!empty($DiscussID)) {
        $DBV = get_tad_web_discuss($DiscussID);
    } else {
        $DBV = array();
    }
    //預設值設定
    if ($MyWebs) {
        //設定「uid」欄位預設值
        $uid = !isset($DBV['uid']) ? $xoopsUser->uid() : $DBV['uid'];
        //設定「MemID」欄位預設值
        $MemID = !isset($DBV['MemID']) ? 0 : $DBV['MemID'];
Exemplo n.º 4
0
<?php

/*-----------引入檔案區--------------*/
include_once "header.php";
$web_cate = new web_cate($WebID, "tad_web_action", "action");
if (!empty($_GET['WebID'])) {
    $xoopsOption['template_main'] = 'tad_web_action_b3.html';
} else {
    $xoopsOption['template_main'] = set_bootstrap('tad_web_action.html');
}
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
//tad_web_action編輯表單
function tad_web_action_form($ActionID = "")
{
    global $xoopsDB, $xoopsUser, $WebID, $MyWebs, $isMyWeb, $xoopsTpl, $TadUpFiles, $web_cate;
    if (!$isMyWeb and $MyWebs) {
        redirect_header($_SERVER['PHP_SELF'] . "?op=WebID={$MyWebs[0]}&tad_web_action_form", 3, _MD_TCW_AUTO_TO_HOME);
    } elseif (empty($MyWebs)) {
        redirect_header("index.php", 3, _MD_TCW_NOT_OWNER);
    }
    //抓取預設值
    if (!empty($ActionID)) {
        $DBV = get_tad_web_action($ActionID);
    } else {
        $DBV = array();
    }
    //預設值設定
    //設定「ActionID」欄位預設值
    $ActionID = !isset($DBV['ActionID']) ? $ActionID : $DBV['ActionID'];
    //設定「ActionName」欄位預設值
Exemplo n.º 5
0
<?php

/*-----------引入檔案區--------------*/
include_once "header.php";
if (!empty($_GET['WebID'])) {
    $xoopsOption['template_main'] = 'tad_web_calendar_b3.html';
} else {
    $xoopsOption['template_main'] = set_bootstrap('tad_web_calendar.html');
}
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
/*-----------執行動作判斷區----------*/
$op = empty($_REQUEST['op']) ? "" : $_REQUEST['op'];
common_template($WebID);
/*-----------秀出結果區--------------*/
include_once '/footer.php';
include_once XOOPS_ROOT_PATH . '/footer.php';
Exemplo n.º 6
0
<?php

/*-----------引入檔案區--------------*/
include_once "header.php";
$xoopsOption['template_main'] = set_bootstrap("tadgallery_upload.html");
if (!empty($upload_powers) and $xoopsUser or $isAdmin) {
    include XOOPS_ROOT_PATH . "/header.php";
} else {
    redirect_header(XOOPS_URL . "/user.php", 3, _TADGAL_NO_UPLOAD_POWER);
}
/*-----------function區--------------*/
function uploads_tabs()
{
    global $xoopsTpl, $xoopsModuleConfig;
    get_jquery(true);
    $now = time();
    $to_batch_upload = "";
    if (isset($_REQUEST['op']) and $_REQUEST['op'] == 'to_batch_upload') {
        $to_batch_upload = '{ active: 3 }';
    }
    $jquery_ui = '
      <script type="text/javascript">
        $(document).ready(function() {
          $("#jquery_tabs_tg_' . $now . '").tabs(' . $to_batch_upload . ');
        });
      </script>';
    $csn = isset($_SESSION['tad_gallery_csn']) ? intval($_SESSION['tad_gallery_csn']) : "";
    $xoopsTpl->assign("xoops_module_header", $jquery_ui);
    $xoopsTpl->assign('now', $now);
    $xoopsTpl->assign('tad_gallery_form', tad_gallery_form());
}
Exemplo n.º 7
0
<?php

//  ------------------------------------------------------------------------ //
// 本模組由 tnjaile 製作
// 製作日期:2015-01-23
// $Id:$
// ------------------------------------------------------------------------- //
/*-----------引入檔案區--------------*/
include "header.php";
$xoopsOption['template_main'] = set_bootstrap("jill_booking_index.html");
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------功能函數區--------------*/
function booking_table($jbi_sn = "", $getdate = "")
{
    global $xoopsDB, $xoopsTpl, $xoopsUser, $xoopsModuleConfig, $can_booking, $Isapproval;
    $uid = !empty($xoopsUser) ? $xoopsUser->uid() : "";
    //場地設定
    $item_opt = get_jill_booking_time_options($jbi_sn);
    if (!empty($jbi_sn)) {
        //可啟用場地資訊
        $itemArr = get_jill_booking_item($jbi_sn, 1);
        $jbi_sn = empty($itemArr['jbi_sn']) ? "" : $itemArr['jbi_sn'];
        if (!empty($itemArr)) {
            //場地預約起始日期
            $start = strtotime($itemArr['jbi_start']);
            $now = strtotime(date('Y-m-d'));
            $start = $start <= $now ? $now : $start;
            //設定可預約之週數及日期
            $max_bookingweek = $xoopsModuleConfig['max_bookingweek'];
            //$show_range      = date("Y-m-d", strtotime("+$max_bookingweek week"));
            if (empty($max_bookingweek)) {
Exemplo n.º 8
0
<?php

/*-----------引入檔案區--------------*/
include_once "header.php";
$xoopsOption['template_main'] = set_bootstrap("tad_cal_download.html");
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
function tad_cal_download()
{
    global $xoopsUser, $xoopsModuleConfig, $isAdmin, $xoopsTpl;
    //先抓分類下拉選單
    $get_tad_cal_cate_menu_options = get_tad_cal_cate_menu_options();
    $xoopsTpl->assign('get_tad_cal_cate_menu_options', $get_tad_cal_cate_menu_options);
    $ym = date("Y-m");
    $d = date("t");
    $xoopsTpl->assign('start', "{$ym}-01");
    $xoopsTpl->assign('end', "{$ym}-{$d}");
}
/*-----------執行動作判斷區----------*/
include_once $GLOBALS['xoops']->path('/modules/system/include/functions.php');
$op = system_CleanVars($_REQUEST, 'op', '', 'string');
$cate_sn = system_CleanVars($_REQUEST, 'cate_sn', 0, 'int');
$sn = system_CleanVars($_REQUEST, 'sn', 0, 'int');
switch ($op) {
    default:
        tad_cal_download();
        break;
}
/*-----------秀出結果區--------------*/
$xoopsTpl->assign("toolbar", toolbar_bootstrap($interface_menu));
$xoopsTpl->assign("isAdmin", $isAdmin);
Exemplo n.º 9
0
<?php

/*-----------引入檔案區--------------*/
include_once "header.php";
$xoopsOption['template_main'] = set_bootstrap("tad_cal_index.html");
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
function fullcalendar($cate_sn = 0)
{
    global $xoopsUser, $xoopsModuleConfig, $isAdmin, $xoopsTpl;
    if (empty($xoopsModuleConfig['eventShowMode'])) {
        $xoopsModuleConfig['eventShowMode'] = 'eventClick';
    }
    if (empty($xoopsModuleConfig['eventTheme'])) {
        $xoopsModuleConfig['eventTheme'] = 'ui-tooltip-blue';
    }
    $style = make_style();
    if (empty($cate_sn)) {
        $cate_sn = 0;
    }
    $eventDrop = $del_js = $eventAdd = "";
    if ($xoopsUser) {
        //先抓分類下拉選單
        $get_tad_cal_cate_menu_options = get_tad_cal_cate_menu_options($cate_sn);
        if ($isAdmin) {
            if (empty($get_tad_cal_cate_menu_options)) {
                $cate = _MD_TADCAL_NEW_CATE . _TAD_FOR . "<input name='new_cate_title' id='new_cate_title' value='" . _MD_TADCAL_NEW_CALENDAR . "'>";
            } else {
                $cate = _MD_TADCAL_CATE_SN . _TAD_FOR . "<select name='cate_sn' id='cate_sn' size=1 >{$get_tad_cal_cate_menu_options}</select>";
            }
            //快速新增功能
Exemplo n.º 10
0
<?php

//  ------------------------------------------------------------------------ //
// 本模組由 tnjaile 製作
// 製作日期:2015-01-23
// $Id:$
// ------------------------------------------------------------------------- //
/*-----------引入檔案區--------------*/
include "header.php";
$xoopsOption['template_main'] = set_bootstrap("jill_booking_listapproval.html");
include_once XOOPS_ROOT_PATH . "/header.php";
if (empty($Isapproval)) {
    redirect_header(XOOPS_URL, 3, "您沒有審核資格!!");
}
/*-----------功能函數區--------------*/
//列出所有jill_booking資料
function jill_booking_approvallist($jbi_sn = "")
{
    global $xoopsDB, $xoopsTpl, $xoopsUser, $isAdmin;
    $uid = $xoopsUser->uid();
    $myts =& MyTextSanitizer::getInstance();
    //場地設定
    $item_opt = get_jill_booking_time_options($jbi_sn, $uid);
    //die(var_export($item_opt));
    if (!empty($jbi_sn)) {
        $itemArr = get_jill_booking_item($jbi_sn, 1);
        $checkapproval = explode(";", $itemArr['jbi_approval']);
        if (in_array($uid, $checkapproval)) {
            $sql = "select b.jb_sn,b.jbt_sn,b.jb_date,b.jb_waiting,b.jb_status,c.jbi_sn,c.jbt_title,d.jb_uid,d.jb_booking_time,d.jb_booking_content,d.jb_start_date,d.jb_end_date from  `" . $xoopsDB->prefix("jill_booking_date") . "` as b\n                join `" . $xoopsDB->prefix("jill_booking_time") . "` as c on b.jbt_sn=c.jbt_sn\n                join `" . $xoopsDB->prefix("jill_booking") . "` as d on b.jb_sn=d.jb_sn\n                where c.jbi_sn='{$jbi_sn}' && b.jb_status='0' && b.jb_date>= ' " . date("Y-m-d", xoops_getUserTimestamp(time())) . " ' order by b.jb_date ,b.jbt_sn,d.jb_booking_time";
            //die($sql);
            //getPageBar($原sql語法, 每頁顯示幾筆資料, 最多顯示幾個頁數選項);
Exemplo n.º 11
0
<?php

//  ------------------------------------------------------------------------ //
// 本模組由 prolin 製作
// 製作日期:2014-05-01
// $Id:$
// ------------------------------------------------------------------------- //
/*-----------引入檔案區--------------*/
include_once "header.php";
$xoopsOption['template_main'] = set_bootstrap("espanel_index_tpl.html");
include_once XOOPS_ROOT_PATH . "/header.php";
/*-----------function區--------------*/
/*-----------執行動作判斷區----------*/
//$op=empty($_REQUEST['op'])?"":$_REQUEST['op'];
$keyword = $xoopsModuleConfig['es_panel_keyword'];
$data['memo'] = $xoopsModuleConfig['es_panel_memo'];
$data['width'] = $xoopsModuleConfig['es_panel_width'];
$data['item'] = get_tad_themes_menu($keyword);
/*-----------秀出結果區--------------*/
$xoopsTpl->assign("toolbar", toolbar_bootstrap($interface_menu));
$xoopsTpl->assign("bootstrap", get_bootstrap());
$xoopsTpl->assign("jquery", get_jquery(true));
$xoopsTpl->assign("data", $data);
include_once XOOPS_ROOT_PATH . '/footer.php';