当前位置: 首页>>代码示例>>PHP>>正文


PHP COM_getBlockTemplate函数代码示例

本文整理汇总了PHP中COM_getBlockTemplate函数的典型用法代码示例。如果您正苦于以下问题:PHP COM_getBlockTemplate函数的具体用法?PHP COM_getBlockTemplate怎么用?PHP COM_getBlockTemplate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了COM_getBlockTemplate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: submissionform

/**
* Shows a given submission form
*
* This is the submission it is modular to allow us to write as little as
* possible.  It takes a type and formats a form for the user.  Currently the
* types is story.  If no type is provided, Story is assumed.
*
* @param    string  $type   type of submission ('story')
* @param    string  $mode   story mode ('personal' or empty string)
* @param    string  $topic  topic (for stories)
* @return   string          HTML for submission form
*
*/
function submissionform($type = 'story', $mode = '', $topic = '')
{
    global $_CONF, $_TABLES, $_USER, $LANG12, $LANG_LOGIN;
    $retval = '';
    $postmode = $_CONF['postmode'];
    COM_clearSpeedlimit($_CONF['speedlimit'], 'submit');
    $last = COM_checkSpeedlimit('submit');
    if ($last > 0) {
        $retval .= COM_showMessageText($LANG12[30] . $last . $LANG12[31], $LANG12[26], false, 'error');
    } else {
        if (COM_isAnonUser() && ($_CONF['loginrequired'] == 1 || $_CONF['submitloginrequired'] == 1)) {
            $display = COM_siteHeader('menu', $LANG_LOGIN[1]);
            $display .= SEC_loginRequiredForm();
            $display .= COM_siteFooter();
            echo $display;
            exit;
        } else {
            $retval .= COM_startBlock($LANG12[19], '', COM_getBlockTemplate('_submit_story', 'header')) . $LANG12[9] . COM_endBlock(COM_getBlockTemplate('_submit_story', 'footer'));
            $retval .= '<div style="border-bottom:1px solid #cccccc"></div>';
            if (strlen($type) > 0 && $type != 'story') {
                $formresult = PLG_showSubmitForm($type);
                if ($formresult == false) {
                    COM_errorLog("Someone tried to submit an item to the {$type}-plugin, which cannot be found.", 1);
                    COM_displayMessageAndAbort(79, '', 410, 'Gone');
                } else {
                    $retval .= $formresult;
                }
            } else {
                $retval .= submitstory($topic);
            }
        }
    }
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:47,代码来源:submit.php

示例2: polllist

/**
* Shows all polls in system
*
* List all the polls on the system if no $pid is provided
*
* @return   string          HTML for poll listing
*
*/
function polllist()
{
    global $_CONF, $_TABLES, $_USER, $_PO_CONF, $LANG25, $LANG_LOGIN, $LANG_POLLS;
    $retval = '';
    if (empty($_USER['username']) && ($_CONF['loginrequired'] == 1 || $_PO_CONF['pollsloginrequired'] == 1)) {
        $retval = COM_startBlock($LANG_LOGIN[1], '', COM_getBlockTemplate('_msg_block', 'header'));
        $login = new Template($_CONF['path_layout'] . 'submit');
        $login->set_file(array('login' => 'submitloginrequired.thtml'));
        $login->set_var('xhtml', XHTML);
        $login->set_var('login_message', $LANG_LOGIN[2]);
        $login->set_var('site_url', $_CONF['site_url']);
        $login->set_var('lang_login', $LANG_LOGIN[3]);
        $login->set_var('lang_newuser', $LANG_LOGIN[4]);
        $login->parse('output', 'login');
        $retval .= $login->finish($login->get_var('output'));
        $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
    } else {
        require_once $_CONF['path_system'] . 'lib-admin.php';
        $header_arr = array(array('text' => $LANG25[9], 'field' => 'topic', 'sort' => true), array('text' => $LANG25[20], 'field' => 'voters', 'sort' => true), array('text' => $LANG25[3], 'field' => 'unixdate', 'sort' => true), array('text' => $LANG_POLLS['open_poll'], 'field' => 'is_open', 'sort' => true));
        $defsort_arr = array('field' => 'unixdate', 'direction' => 'desc');
        $text_arr = array('has_menu' => false, 'title' => $LANG_POLLS['pollstitle'], 'instructions' => "", 'icon' => '', 'form_url' => '');
        $query_arr = array('table' => 'polltopics', 'sql' => $sql = "SELECT *,UNIX_TIMESTAMP(date) AS unixdate, display " . "FROM {$_TABLES['polltopics']} WHERE 1=1", 'query_fields' => array('topic'), 'default_filter' => COM_getPermSQL(), 'query' => '', 'query_limit' => 0);
        $retval .= ADMIN_list('polls', 'plugin_getListField_polls', $header_arr, $text_arr, $query_arr, $defsort_arr);
    }
    return $retval;
}
开发者ID:hostellerie,项目名称:nexpro,代码行数:34,代码来源:index.php

示例3: MG_access_denied

function MG_access_denied()
{
    global $LANG_MG00, $LANG_ACCESS;
    $display = COM_startBlock($LANG_ACCESS['accessdenied'], '', COM_getBlockTemplate('_msg_block', 'header')) . '<br' . XHTML . '>' . $LANG_MG00['access_denied_msg'] . COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
    $display = MG_createHTMLDocument($display);
    COM_output($display);
    exit;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:8,代码来源:popup.php

示例4: filemgmt_navbar

function filemgmt_navbar($selected = '')
{
    global $_CONF, $LANG_FM02, $_TABLES, $LANG_ADMIN;
    $retval = '';
    $totalnewdownloads = DB_count($_TABLES['filemgmt_filedetail'], 'status', 0);
    $totalbrokendownloads = DB_count($_TABLES['filemgmt_brokenlinks']);
    $menu_arr = array(array('url' => $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php', 'text' => 'File Listing'), array('url' => $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=categoryConfigAdmin', 'text' => $LANG_FM02['nav2']), array('url' => $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=newfileConfigAdmin', 'text' => $LANG_FM02['nav3']), array('url' => $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=listNewDownloads', 'text' => sprintf($LANG_FM02['nav4'], $totalnewdownloads)), array('url' => $_CONF['site_admin_url'] . '/plugins/filemgmt/index.php?op=listBrokenDownloads', 'text' => sprintf($LANG_FM02['nav5'], $totalbrokendownloads)), array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']));
    $retval .= COM_startBlock(_MD_ADMINTITLE, '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= ADMIN_createMenu($menu_arr, $LANG_FM02['instructions'], $_CONF['site_url'] . '/filemgmt/images/filemgmt.png');
    $retval .= '<br />';
    return $retval;
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:12,代码来源:index.php

示例5: MG_invalidRequest

function MG_invalidRequest()
{
    global $LANG_MG02, $_CONF, $_MG_CONF;
    $retval = '';
    $retval .= COM_startBlock($LANG_MG02['error_header'], '', COM_getBlockTemplate('_admin_block', 'header'));
    $T = new Template($_MG_CONF['template_path']);
    $T->set_file('admin', 'error.thtml');
    $T->set_var('errormessage', $LANG_MG02['generic_error']);
    $T->parse('output', 'admin');
    $retval .= $T->finish($T->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:NewRoute,项目名称:glfusion,代码行数:13,代码来源:admin.php

示例6: list_hello

/**
* Shows the form the admin uses to send Geeklog members a message. Right now
* you can only email an entire group.
*
* @return   string      HTML for the email form
*
*/
function list_hello()
{
    global $_CONF, $_TABLES, $LANG_HELLO01;
    require_once $_CONF['path_system'] . 'lib-admin.php';
    $retval = '';
    //Build header list
    $header_arr = array(array('text' => $LANG_HELLO01['see_email'], 'field' => 'see_hello', 'sort' => false), array('text' => $LANG_HELLO01['id'], 'field' => 'hello_id', 'sort' => true), array('text' => $LANG_HELLO01['subjet'], 'field' => 'subject', 'sort' => true), array('text' => $LANG_HELLO01['creation'], 'field' => 'creation', 'sort' => true), array('text' => $LANG_HELLO01['group'], 'field' => 'email_group', 'sort' => true), array('text' => $LANG_HELLO01['quantity'], 'field' => 'quantity', 'sort' => true));
    $defsort_arr = array('field' => $_TABLES['hello'] . '.hello_id', 'direction' => 'DESC');
    $retval .= COM_startBlock($LANG28[11], '', COM_getBlockTemplate('_admin_block', 'header'));
    $text_arr = array('has_extras' => true, 'form_url' => $_CONF['site_admin_url'] . '/plugins/hello/read_email.php', 'help_url' => '');
    $sql = "SELECT {$_TABLES['hello']}.hello_id,subject,creation,email_group,quantity " . "FROM {$_TABLES['hello']} WHERE 1=1";
    $query_arr = array('table' => 'hello', 'sql' => $sql, 'query_fields' => array('hello_id', 'subject', 'creation', 'email_group', 'quantity'), 'default_filter' => "");
    $retval .= ADMIN_list('hello', 'HELLO_getListField_hello', $header_arr, $text_arr, $query_arr, $defsort_arr);
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:Geeklog-Plugins,项目名称:hello,代码行数:23,代码来源:read_email.php

示例7: EXP_adminList

/**
*   Build the admin list of pages
*   @return string      HTML content
*/
function EXP_adminList()
{
    global $_CONF, $_TABLES, $LANG_ADMIN, $LANG_ACCESS, $_CONF_EXP, $LANG_EX00;
    USES_lib_admin();
    $retval = '';
    $header_arr = array(array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false), array('text' => 'Page ID', 'field' => 'exid', 'sort' => true), array('text' => 'Title', 'field' => 'title', 'sort' => true), array('text' => 'URL', 'field' => 'url', 'sort' => true), array('text' => 'Hits', 'field' => 'hits', 'sort' => true));
    $menu_arr = array(array('url' => $_CONF['site_admin_url'] . '/plugins/' . $_CONF_EXP['pi_name'] . '/edit.php?exid=0', 'text' => 'Add New'), array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']));
    $defsort_arr = array('field' => 'exid', 'direction' => 'asc');
    $header_str = $LANG_EX00['header'] . ' ' . $LANG_EX00['version'] . ' ' . $_CONF_EXP['pi_version'];
    $retval .= COM_startBlock($header_str, '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= ADMIN_createMenu($menu_arr, 'Administer External Pages', plugin_geticon_external());
    $text_arr = array('has_extras' => true, 'form_url' => "{$_CONF['site_admin_url']}/plugins/{$_CONF_EXP['pi_name']}/index.php");
    $query_arr = array('table' => 'external', 'sql' => "SELECT * FROM {$_TABLES['external']} ", 'query_fields' => array('title', 'url'), 'default_filter' => COM_getPermSql());
    $retval .= ADMIN_list('external', 'EXP_getAdminListField', $header_arr, $text_arr, $query_arr, $defsort_arr, '', '', '', $form_arr);
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:JohnToro,项目名称:external,代码行数:21,代码来源:index.php

示例8: _logoEdit

function _logoEdit()
{
    global $_CONF, $_LOGO, $_TABLES, $LANG_ADMIN, $LANG_LOGO, $_IMAGE_TYPE;
    $retval = '';
    $menu_arr = array(array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']));
    $retval .= COM_startBlock($LANG_LOGO['logo_options'], '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= ADMIN_createMenu($menu_arr, $LANG_LOGO['instructions'], $_CONF['layout_url'] . '/images/icons/logo.' . $_IMAGE_TYPE);
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    if (file_exists($_CONF['path_html'] . '/images/' . $_LOGO['logo_name'])) {
        $current_logo = '<img src="' . $_CONF['site_url'] . '/images/' . $_LOGO['logo_name'] . '" alt="" border="0"/>';
    } else {
        $current_logo = $LANG_LOGO['no_logo_graphic'];
    }
    $T = new Template($_CONF['path_layout'] . 'admin/logo/');
    $T->set_file('admin', 'logo.thtml');
    $T->set_var(array('s_form_action' => $_CONF['site_admin_url'] . '/logo.php', 'graphic_logo_selected' => $_LOGO['use_graphic_logo'] == 1 ? ' checked="checked"' : '', 'text_logo_selected' => $_LOGO['use_graphic_logo'] == 0 ? ' checked="checked"' : '', 'no_logo_selected' => $_LOGO['use_graphic_logo'] == -1 ? ' checked="checked"' : '', 'slogan_selected' => $_LOGO['display_site_slogan'] == 1 ? ' checked="checked"' : '', 'current_logo_graphic' => $current_logo));
    $T->parse('output', 'admin');
    $retval .= $T->finish($T->get_var('output'));
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:20,代码来源:logo.php

示例9: EVLIST_adminHeader

/**
*   Create the common header for all admin functions
*
*   @param  string  $page   Current page.  Used for selecting menus
*   @return string      HTML for admin header portion.
*/
function EVLIST_adminHeader($page)
{
    global $_CONF, $LANG_ADMIN, $LANG_EVLIST, $_EV_CONF;
    $retval = '';
    USES_lib_admin();
    $menu_arr = array();
    if ($page == 'events') {
        $menu_arr[] = array('url' => EVLIST_URL . '/event.php?edit=event', 'text' => $LANG_EVLIST['new_event']);
    } else {
        $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php', 'text' => $LANG_EVLIST['events']);
    }
    if ($page == 'calendars') {
        $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?editcal=x', 'text' => $LANG_EVLIST['new_calendar']);
    } else {
        $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?view=calendars', 'text' => $LANG_EVLIST['calendars']);
    }
    if ($page == 'categories') {
        $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?editcat=x', 'text' => $LANG_EVLIST['new_category']);
    } else {
        $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?categories=x', 'text' => $LANG_EVLIST['categories']);
    }
    if ($_EV_CONF['enable_rsvp']) {
        if ($page == 'tickettypes') {
            $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?editticket=0', 'text' => $LANG_EVLIST['new_ticket_type']);
        } else {
            $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?tickettypes', 'text' => $LANG_EVLIST['ticket_types']);
        }
    }
    $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?importcalendar=x', 'text' => $LANG_EVLIST['import_calendar']);
    $menu_arr[] = array('url' => EVLIST_ADMIN_URL . '/index.php?import=x', 'text' => $LANG_EVLIST['import_from_csv']);
    $menu_arr[] = array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']);
    $retval .= COM_startBlock('evList ' . $_EV_CONF['pi_version'], '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= ADMIN_createMenu($menu_arr, $LANG_EVLIST['admin_instr'][$page], plugin_geticon_evlist());
    $retval .= COM_endBlock();
    return $retval;
}
开发者ID:NewRoute,项目名称:evlist,代码行数:42,代码来源:index.php

示例10: LIB_Save

    case 'save':
        // 保存
        $retval = LIB_Save($pi_name, $edt_flg, $navbarMenu, $menuno);
        $information['pagetitle'] = $retval['title'];
        $display .= $retval['display'];
        break;
    case 'delete':
        // 削除
        $display .= LIB_delete($pi_name);
        break;
    case 'copy':
        //コピー
    //コピー
    case 'edit':
        // 編集
        if (!empty($id)) {
            $information['pagetitle'] = $LANG_DATABOX_ADMIN['piname'] . $LANG_DATABOX_ADMIN['edit'];
            $display .= LIB_Edit($pi_name, $id, $edt_flg, $msg, "", $mode);
        }
        break;
    default:
        // 初期表示、一覧表示
        $information['pagetitle'] = $LANG_DATABOX_ADMIN['piname'];
        if (isset($msg)) {
            $display .= COM_showMessage($msg, $pi_name);
        }
        $display .= LIB_List($pi_name);
}
$display = COM_startBlock($LANG_DATABOX_ADMIN['piname'], '', COM_getBlockTemplate('_admin_block', 'header')) . ppNavbarjp($navbarMenu, $LANG_DATABOX_admin_menu[$menuno]) . LIB_Menu($pi_name) . $display . COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
$display = DATABOX_displaypage($pi_name, '_admin', $display, $information);
COM_output($display);
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:31,代码来源:mst.php

示例11: mailstoryform

/**
* Display form to email a story to someone.
*
* @param    string  $sid    ID of article to email
* @return   string          HTML for email story form
*
*/
function mailstoryform($sid, $to = '', $toemail = '', $from = '', $fromemail = '', $shortmsg = '', $msg = 0)
{
    global $_CONF, $_TABLES, $_USER, $LANG08, $LANG_LOGIN;
    require_once $_CONF['path_system'] . 'lib-story.php';
    $retval = '';
    if (COM_isAnonUser() && ($_CONF['loginrequired'] == 1 || $_CONF['emailstoryloginrequired'] == 1)) {
        $retval = COM_startBlock($LANG_LOGIN[1], '', COM_getBlockTemplate('_msg_block', 'header'));
        $login = new Template($_CONF['path_layout'] . 'submit');
        $login->set_file(array('login' => 'submitloginrequired.thtml'));
        $login->set_var('xhtml', XHTML);
        $login->set_var('site_url', $_CONF['site_url']);
        $login->set_var('site_admin_url', $_CONF['site_admin_url']);
        $login->set_var('layout_url', $_CONF['layout_url']);
        $login->set_var('login_message', $LANG_LOGIN[2]);
        $login->set_var('lang_login', $LANG_LOGIN[3]);
        $login->set_var('lang_newuser', $LANG_LOGIN[4]);
        $login->parse('output', 'login');
        $retval .= $login->finish($login->get_var('output'));
        $retval .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
        return $retval;
    }
    $story = new Story();
    $result = $story->loadFromDatabase($sid, 'view');
    if ($result != STORY_LOADED_OK) {
        return COM_refresh($_CONF['site_url'] . '/index.php');
    }
    if ($msg > 0) {
        $retval .= COM_showMessage($msg);
    }
    if (empty($from) && empty($fromemail)) {
        if (!COM_isAnonUser()) {
            $from = COM_getDisplayName($_USER['uid'], $_USER['username'], $_USER['fullname']);
            $fromemail = DB_getItem($_TABLES['users'], 'email', "uid = {$_USER['uid']}");
        }
    }
    $mail_template = new Template($_CONF['path_layout'] . 'profiles');
    $mail_template->set_file('form', 'contactauthorform.thtml');
    $mail_template->set_var('xhtml', XHTML);
    $mail_template->set_var('site_url', $_CONF['site_url']);
    $mail_template->set_var('site_admin_url', $_CONF['site_admin_url']);
    $mail_template->set_var('layout_url', $_CONF['layout_url']);
    $mail_template->set_var('start_block_mailstory2friend', COM_startBlock($LANG08[17]));
    $mail_template->set_var('lang_title', $LANG08[31]);
    $mail_template->set_var('story_title', $story->displayElements('title'));
    $url = COM_buildUrl($_CONF['site_url'] . '/article.php?story=' . $sid);
    $mail_template->set_var('story_url', $url);
    $link = COM_createLink($story->displayElements('title'), $url);
    $mail_template->set_var('story_link', $link);
    $mail_template->set_var('lang_fromname', $LANG08[20]);
    $mail_template->set_var('name', $from);
    $mail_template->set_var('lang_fromemailaddress', $LANG08[21]);
    $mail_template->set_var('email', $fromemail);
    $mail_template->set_var('lang_toname', $LANG08[18]);
    $mail_template->set_var('toname', $to);
    $mail_template->set_var('lang_toemailaddress', $LANG08[19]);
    $mail_template->set_var('toemail', $toemail);
    $mail_template->set_var('lang_cc', $LANG08[36]);
    $mail_template->set_var('lang_cc_description', $LANG08[37]);
    $mail_template->set_var('lang_shortmessage', $LANG08[27]);
    $mail_template->set_var('shortmsg', htmlspecialchars($shortmsg));
    $mail_template->set_var('lang_warning', $LANG08[22]);
    $mail_template->set_var('lang_sendmessage', $LANG08[16]);
    $mail_template->set_var('story_id', $sid);
    $mail_template->set_var('end_block', COM_endBlock());
    PLG_templateSetVars('emailstory', $mail_template);
    $mail_template->parse('output', 'form');
    $retval .= $mail_template->finish($mail_template->get_var('output'));
    return $retval;
}
开发者ID:hostellerie,项目名称:nexpro,代码行数:76,代码来源:profiles.php

示例12: listTopics

/**
 * Displays a list of topics
 * Lists all the topics and their icons.
 *
 * @param    string $token Security token to use in list
 * @return   string      HTML for the topic list
 */
function listTopics($token)
{
    global $_CONF, $_TABLES, $LANG27, $LANG_ACCESS, $LANG_ADMIN, $_SCRIPTS;
    require_once $_CONF['path_system'] . 'lib-admin.php';
    $_SCRIPTS->setJavaScriptFile('admin.topic', '/javascript/admin.topic.js');
    $retval = '';
    $retval .= COM_startBlock($LANG27[8], '', COM_getBlockTemplate('_admin_block', 'header'));
    $menu_arr = array(array('url' => $_CONF['site_admin_url'] . '/topic.php?mode=edit', 'text' => $LANG_ADMIN['create_new']), array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']));
    $retval .= ADMIN_createMenu($menu_arr, $LANG27[9], $_CONF['layout_url'] . "/images/icons/topic.png");
    $header_arr[] = array('text' => $LANG_ADMIN['edit'], 'field' => 'edit', 'sort' => false);
    $header_arr[] = array('text' => $LANG27[10], 'field' => 'sortnum', 'sort' => true);
    $header_arr[] = array('text' => $LANG27[53], 'field' => 'image', 'sort' => false);
    $header_arr[] = array('text' => $LANG27[3], 'field' => 'topic', 'sort' => false);
    $header_arr[] = array('text' => $LANG27[2], 'field' => 'tid', 'sort' => true);
    $header_arr[] = array('text' => $LANG27[52], 'field' => 'story', 'sort' => false);
    $header_arr[] = array('text' => $LANG_ACCESS['access'], 'field' => 'access', 'sort' => false);
    $header_arr[] = array('text' => $LANG27[33], 'field' => 'inherit', 'sort' => false);
    $header_arr[] = array('text' => $LANG27[35], 'field' => 'hidden', 'sort' => false);
    $defsort_arr = array('field' => 'sortnum', 'direction' => 'asc');
    $text_arr = array('has_extras' => true, 'form_url' => $_CONF['site_admin_url'] . '/topic.php');
    $query_arr = array('table' => 'topics', 'sql' => "SELECT * FROM {$_TABLES['topics']} WHERE 1=1 ", 'query_fields' => array('topic'), 'default_filter' => COM_getPermSQL('AND'));
    $retval .= ADMIN_list('topics', 'ADMIN_getListField_topics', $header_arr, $text_arr, $query_arr, $defsort_arr, '', $token);
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:mystralkk,项目名称:geeklog,代码行数:32,代码来源:topic.php

示例13: plugin_show_uploadform

/**
* Display upload form
*
* @param    string  $token  Security token
* @return   string          HTML for the upload form
*
*/
function plugin_show_uploadform($token)
{
    global $_CONF, $LANG28, $LANG32;
    $retval = '';
    $retval .= COM_startBlock($LANG32[39], '', COM_getBlockTemplate('_admin_block', 'header'));
    // Check if all the requirements needed to upload a plugin are met
    $errors = plugin_upload_enabled();
    if (count($errors) == 0) {
        // Show the upload form
        $retval .= '<p>' . $LANG32[40] . '</p>' . LB . '<form name="plugins_upload" action="' . $_CONF['site_admin_url'] . '/plugins.php" method="post" enctype="multipart/form-data">' . LB . '<div>' . $LANG28[29] . ': ' . '<input type="file" dir="ltr" name="plugin" size="40"' . XHTML . '> ' . LB . '<input type="submit" name="upload" value="' . $LANG32[41] . '"' . XHTML . '>' . LB . '<input type="hidden" name="' . CSRF_TOKEN . '" value="' . $token . '"' . XHTML . '>' . '</div>' . LB . '</form>' . LB;
    } else {
        // Show the errors
        $retval .= '<p>' . $LANG32[65] . '</p>' . LB . '<div><ul>' . LB;
        foreach ($errors as $key => $value) {
            $retval .= "<li>{$value}</li>";
        }
        $retval .= '</ul></div>' . LB;
    }
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:alxstuart,项目名称:ajfs.me,代码行数:28,代码来源:plugins.php

示例14: isset

} else {
    if (strpos($referrer, $_CONF['site_url']) !== false) {
        $allowed = 1;
    }
}
if ($allowed == 0) {
    return;
}
$mid = isset($_GET['mid']) ? COM_applyFilter($_GET['mid']) : '';
if (empty($mid)) {
    return;
}
$aid = DB_getItem($_TABLES['mg_media_albums'], 'album_id', 'media_id="' . addslashes($mid) . '"');
$album_data = MG_getAlbumData($aid, array('album_id'), true);
if ($album_data['access'] == 0) {
    $display = COM_startBlock($LANG_ACCESS['accessdenied'], '', COM_getBlockTemplate('_msg_block', 'header')) . '<br' . XHTML . '>' . $LANG_MG00['access_denied_msg'] . COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
    $display = MG_createHTMLDocument($display);
    COM_output($display);
    exit;
}
$sql = "SELECT * FROM {$_TABLES['mg_media']} WHERE media_id='" . addslashes($mid) . "'";
$result = DB_query($sql);
while ($A = DB_fetchArray($result)) {
    $filename = $A['media_original_filename'];
    if (empty($filename)) {
        $filename = $A['media_filename'] . '.' . $A['media_mime_ext'];
    }
    $mime_type = $A['mime_type'];
    if ($mime_type == 'application/octet-stream' && strtolower($A['media_mime_ext']) == 'pdf') {
        $mime_type = 'application/pdf';
    }
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:31,代码来源:download.php

示例15: DBADMIN_configBackup

/**
*   Provide an interface to configure backups
*
*   @return string  HTML for configuration function
*/
function DBADMIN_configBackup()
{
    global $_TABLES, $_CONF, $_VARS, $LANG_LGLIB, $pi_title, $_DB_table_prefix;
    /*$res = DB_query("SHOW TABLES LIKE '{$_DB_table_prefix}%'");
      $mysql_tables = array();
      while ($A = DB_fetchArray($res)) {
          $mysql_tables[] = $A[0];
      }
      // Select only tables that we actually use
      $tablenames = array_intersect($mysql_tables, $_TABLES);
      */
    $tablenames = $_TABLES;
    $exclude_tables = @unserialize($_VARS['lglib_dbback_exclude']);
    if (!is_array($exclude_tables)) {
        $exclude_tables = array();
    }
    $curr_interval = (int) $_VARS['lglib_dbback_cron'];
    if ($curr_interval == '-1') {
        $interval_disabled = ' disbled="disabled" ';
        $disable_cron = ' checked="checked" ';
    } else {
        $interval_disabled = '';
        $disable_cron = '';
    }
    $chk_gzip = isset($_VARS['lglib_dbback_gzip']) && $_VARS['lglib_dbback_gzip'] == 1 ? ' checked="checked" ' : '';
    $max_files = (int) $_VARS['lglib_dbback_files'];
    $cols = 3;
    $retval = DBADMIN_menu($LANG_LGLIB['instr_db_bkup_config']);
    $T = new Template(LGLIB_PI_PATH . '/templates');
    $T->set_file('dbform', 'db_backup.thtml');
    $col = 0;
    $included = '';
    $excluded = '';
    $include_tables = array_diff($tablenames, $exclude_tables);
    foreach ($include_tables as $key => $name) {
        $included .= "<option value=\"{$name}\">{$name}</option>\n";
    }
    foreach ($exclude_tables as $key => $name) {
        $excluded .= "<option value=\"{$name}\">{$name}</option>\n";
    }
    $T->set_var(array('included_tables' => $included, 'excluded_tables' => $excluded, 'interval_disabled' => $interval_disabled, 'curr_interval' => $curr_interval, 'chk_disable_cron' => $disable_cron, 'max_files' => $max_files, 'chk_gzip' => $chk_gzip));
    $T->parse('output', 'dbform');
    $retval .= $T->finish($T->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:JohnToro,项目名称:lglib,代码行数:51,代码来源:index.php


注:本文中的COM_getBlockTemplate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。