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


PHP COM_startBlock函数代码示例

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


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

示例1: MAPS_getGroupOverlayForm

/**
 * This function creates a Group of Overlay Form
 *
 * Creates a Form for a group of overlay using the supplied defaults (if specified).
 *
 * @param array $group array of values describing a group of overlay
 * @return string HTML string of overlay form
 */
function MAPS_getGroupOverlayForm($group = array())
{
    global $_CONF, $_TABLES, $_MAPS_CONF, $LANG_MAPS_1, $LANG_configselects, $LANG_ACCESS, $_USER, $_GROUPS, $_SCRIPTS;
    $display = COM_startBlock('<h1>' . $LANG_MAPS_1['group_edit'] . ' ' . $group['o_group_name'] . '</h1>');
    $template = COM_newTemplate($_CONF['path'] . 'plugins/maps/templates');
    $template->set_file(array('map' => 'group_overlay_form.thtml'));
    $template->set_var('yes', $LANG_MAPS_1['yes']);
    $template->set_var('no', $LANG_MAPS_1['no']);
    //informations
    $template->set_var('group_overlay_presentation', $LANG_MAPS_1['group_overlay_presentation']);
    $template->set_var('informations', $LANG_MAPS_1['informations']);
    $template->set_var('name_label', $LANG_MAPS_1['group_overlay_name_label']);
    $template->set_var('name', stripslashes($group['o_group_name']));
    $template->set_var('required_field', $LANG_MAPS_1['required_field']);
    //Form validation
    $template->set_var('save_button', $LANG_MAPS_1['save_button']);
    if ($group['o_group_id'] > 0) {
        $template->set_var('delete_button', '<option value="delete">' . $LANG_MAPS_1['delete_button'] . '</option>');
    } else {
        $template->set_var('delete_button', '');
    }
    $template->set_var('ok_button', $LANG_MAPS_1['ok_button']);
    if (isset($group['o_group_id'])) {
        $template->set_var('o_group_id', '<input type="hidden" name="o_group_id" value="' . $group['o_group_id'] . '" />');
    } else {
        $template->set_var('o_group_id', '');
    }
    $display .= $template->parse('output', 'map');
    $display .= COM_endBlock();
    return $display;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:39,代码来源:overlay_group_edit.php

示例2: adduserevent

/**
* Adds an event to the user's calendar
*
* The user has asked that an event be added to their personal
* calendar.  Show a confirmation screen.
*
* @param    string  $eid    event ID to add to user's calendar
* @return   string          HTML for confirmation form
*
*/
function adduserevent($eid)
{
    global $_CONF, $_TABLES, $LANG_CALJP_1;
    $retval = '';
    $eventsql = "SELECT * FROM {$_TABLES['eventsjp']} WHERE eid='{$eid}'" . COM_getPermSql('AND');
    $result = DB_query($eventsql);
    $nrows = DB_numRows($result);
    if ($nrows == 1) {
        $retval .= COM_startBlock(sprintf($LANG_CALJP_1[11], COM_getDisplayName()));
        $A = DB_fetchArray($result);
        $cal_template = COM_newTemplate($_CONF['path'] . 'plugins/calendarjp/templates/');
        $cal_template->set_file(array('addevent' => 'addevent.thtml'));
        $cal_template->set_var('intro_msg', $LANG_CALJP_1[8]);
        $cal_template->set_var('lang_event', $LANG_CALJP_1[12]);
        $event_title = stripslashes($A['title']);
        if (!empty($A['url']) && $A['url'] != 'http://') {
            $event_title_and_url = COM_createLink($event_title, $A['url'], array('class' => 'url'));
            $cal_template->set_var('event_url', $A['url']);
            $cal_template->set_var('event_begin_anchortag', '<a href="' . $A['url'] . '" class="url">');
            $cal_template->set_var('event_end_anchortag', '</a>');
        } else {
            $event_title_and_url = $event_title;
            $cal_template->set_var('event_url', '');
            $cal_template->set_var('event_begin_anchortag', '');
            $cal_template->set_var('event_end_anchortag', '');
        }
        $cal_template->set_var('event_title', $event_title_and_url);
        $cal_template->set_var('event_title_only', $event_title);
        $cal_template->set_var('lang_starts', $LANG_CALJP_1[13]);
        $cal_template->set_var('lang_ends', $LANG_CALJP_1[14]);
        $thestart = COM_getUserDateTimeFormat($A['datestart'] . ' ' . $A['timestart']);
        $theend = COM_getUserDateTimeFormat($A['dateend'] . ' ' . $A['timeend']);
        if ($A['allday'] == 0) {
            $cal_template->set_var('event_start', $thestart[0]);
            $cal_template->set_var('event_end', $theend[0]);
        } else {
            $cal_template->set_var('event_start', strftime($_CONF['shortdate'], $thestart[1]));
            $cal_template->set_var('event_end', strftime($_CONF['shortdate'], $theend[1]));
        }
        $cal_template->set_var('lang_where', $LANG_CALJP_1[4]);
        $location = stripslashes($A['location']) . '<br' . XHTML . '>' . stripslashes($A['address1']) . '<br' . XHTML . '>' . stripslashes($A['address2']) . '<br' . XHTML . '>' . stripslashes($A['city']) . ', ' . stripslashes($A['state']) . ' ' . $A['zipcode'];
        $cal_template->set_var('event_location', $location);
        $cal_template->set_var('lang_description', $LANG_CALJP_1[5]);
        $description = stripslashes($A['description']);
        if (empty($A['postmode']) || $A['postmode'] == 'plaintext') {
            $description = COM_nl2br($description);
        }
        $cal_template->set_var('event_description', PLG_replaceTags($description));
        $cal_template->set_var('event_id', $eid);
        $cal_template->set_var('lang_addtomycalendar', $LANG_CALJP_1[9]);
        $cal_template->set_var('gltoken_name', CSRF_TOKEN);
        $cal_template->set_var('gltoken', SEC_createToken());
        $cal_template->parse('output', 'addevent');
        $retval .= $cal_template->finish($cal_template->get_var('output'));
        $retval .= COM_endBlock();
    } else {
        $retval .= COM_showMessage(23);
    }
    return $retval;
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:70,代码来源:event.php

示例3: MG_saveEnroll

function MG_saveEnroll()
{
    global $_CONF, $_MG_CONF, $_TABLES, $_USER, $LANG_MG03;
    if ($_MG_CONF['member_albums'] != 1) {
        echo COM_refresh($_MG_CONF['site_url'] . '/index.php');
        exit;
    }
    if (!isset($_MG_CONF['member_quota'])) {
        $_MG_CONF['member_quota'] = 0;
    }
    $sql = "SELECT album_id FROM {$_TABLES['mg_albums']} " . "WHERE owner_id=" . intval($_USER['uid']) . " AND album_parent=" . intval($_MG_CONF['member_album_root']);
    $result = DB_query($sql);
    $nRows = DB_numRows($result);
    if ($nRows > 0) {
        $display = COM_startBlock('', '', COM_getBlockTemplate('_msg_block', 'header'));
        $display .= $LANG_MG03['existing_member_album'];
        $display .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
        $display = MG_createHTMLDocument($display);
        COM_output($display);
        exit;
    }
    $uid = $_USER['uid'];
    $aid = plugin_user_create_mediagallery($uid, 1);
    DB_change($_TABLES['mg_userprefs'], 'member_gallery', 1, 'uid', $uid);
    DB_change($_TABLES['mg_userprefs'], 'quota', intval($_MG_CONF['member_quota']), 'uid', $uid);
    if (DB_error()) {
        $sql = "INSERT INTO {$_TABLES['mg_userprefs']} " . "(uid, active, display_rows, display_columns, mp3_player, playback_mode, tn_size, quota, member_gallery) " . "VALUES (" . $uid . ",1,0,0,-1,-1,-1," . intval($_MG_CONF['member_quota']) . ",1)";
        DB_query($sql, 1);
    }
    echo COM_refresh($_MG_CONF['site_url'] . '/album.php?aid=' . $aid);
    exit;
}
开发者ID:mistgrass,项目名称:geeklog-ivywe,代码行数:32,代码来源:enroll.php

示例4: 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

示例5: usersubmissions

/**
* Prints the user submission lists at the top
*
* @param    string  $token  CSRF token
* @return   string          HTML for the C&C block
*
*/
function usersubmissions($token)
{
    global $_CONF, $_TABLES, $LANG_ADMIN, $LANG29, $_IMAGE_TYPE;
    require_once $_CONF['path_system'] . 'lib-admin.php';
    $retval = '';
    // writing the menu on top
    $menu_arr = array(array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home']));
    $retval .= COM_startBlock($LANG29[13], '', COM_getBlockTemplate('_admin_block', 'header'));
    $retval .= ADMIN_createMenu($menu_arr, $LANG29['submissions_desc'], $_CONF['layout_url'] . '/images/icons/moderation.' . $_IMAGE_TYPE);
    // IMPORTANT - If any of the below submission lists change, please
    // update the function SEC_hasModerationAccess in lib-security.php to
    // reflect the changes
    if (SEC_hasRights('story.moderate')) {
        $retval .= itemlist('story', $token);
    }
    if ($_CONF['listdraftstories'] == 1) {
        if (SEC_hasRights('story.edit')) {
            $retval .= itemlist('story_draft', $token);
        }
    }
    if ($_CONF['commentsubmission'] == 1) {
        if (SEC_hasRights('comment.moderate')) {
            $retval .= itemlist('comment', $token);
        }
    }
    if ($_CONF['usersubmission'] == 1) {
        if (SEC_hasRights('user.edit') && SEC_hasRights('user.delete')) {
            $retval .= userlist($token);
        }
    }
    $retval .= PLG_showModerationList($token);
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:41,代码来源:moderation.php

示例6: forum_admin_list

function forum_admin_list()
{
    global $_TABLES, $LANG_ADMIN, $LANG_GF00, $LANG_GF91, $LANG_GF06, $_CONF, $_FF_CONF;
    USES_lib_admin();
    $retval = '';
    $selected = '';
    $menu_arr = array();
    $admin_list = new Template($_CONF['path'] . 'plugins/forum/templates/admin/');
    $admin_list->set_file('admin-list', 'index.thtml');
    $admin_list->set_var('block_start', COM_startBlock($LANG_GF91['gfstats']));
    $menu_arr = FF_adminNav($LANG_GF06['1']);
    $admin_list->set_var('admin_menu', ADMIN_createMenu($menu_arr, $LANG_GF00['instructions'], $_CONF['site_url'] . '/forum/images/forum.png'));
    // CATEGORIES
    $numcats = DB_query("SELECT id FROM {$_TABLES['ff_categories']}");
    $totalcats = DB_numRows($numcats);
    // FORUMS
    $numforums = DB_query("SELECT forum_id FROM {$_TABLES['ff_forums']}");
    $totalforums = DB_numRows($numforums);
    // TOPICS
    $numtopics = DB_query("SELECT id FROM {$_TABLES['ff_topic']} WHERE pid = 0");
    $totaltopics = DB_numRows($numtopics);
    // POSTS
    $numposts = DB_query("SELECT id FROM {$_TABLES['ff_topic']}");
    $totalposts = DB_numRows($numposts);
    // VIEWS
    $numviews = DB_query("SELECT SUM(views) AS TOTAL FROM {$_TABLES['ff_topic']}");
    $totalviews = DB_fetchArray($numviews);
    // AVERAGE POSTS
    if ($totalposts != 0) {
        $avgcposts = $totalposts / $totalcats;
        $avgcposts = round($avgcposts);
        $avgfposts = $totalposts / $totalforums;
        $avgfposts = round($avgfposts);
        $avgtposts = $totalposts / $totaltopics;
        $avgtposts = round($avgtposts);
    } else {
        $avgcposts = 0;
        $avgfposts = 0;
        $avgtposts = 0;
    }
    // AVERAGE VIEWS
    if ($totalviews['TOTAL'] != 0) {
        $avgcviews = $totalviews['TOTAL'] / $totalcats;
        $avgcviews = round($avgcviews);
        $avgfviews = $totalviews['TOTAL'] / $totalforums;
        $avgfviews = round($avgfviews);
        $avgtviews = $totalviews['TOTAL'] / $totaltopics;
        $avgtviews = round($avgtviews);
    } else {
        $avgcviews = 0;
        $avgfviews = 0;
        $avgtviews = 0;
    }
    $admin_list->set_var(array('statsmsg' => $LANG_GF91['statsmsg'], 'totalcatsmsg' => $LANG_GF91['totalcats'], 'totalcats' => $totalcats, 'totalforumsmsg' => $LANG_GF91['totalforums'], 'totalforums' => $totalforums, 'totaltopicsmsg' => $LANG_GF91['totaltopics'], 'totaltopics' => $totaltopics, 'totalpostsmsg' => $LANG_GF91['totalposts'], 'totalposts' => $totalposts, 'totalviewsmsg' => $LANG_GF91['totalviews'], 'totalviews' => $totalviews['TOTAL'], 'category' => $LANG_GF91['category'], 'forum' => $LANG_GF91['forum'], 'topic' => $LANG_GF91['topic'], 'avgpmsg' => $LANG_GF91['avgpmsg'], 'avgcposts' => $avgcposts, 'avgfposts' => $avgfposts, 'avgtposts' => $avgtposts, 'avgvmsg' => $LANG_GF91['avgvmsg'], 'avgcviews' => $avgcviews, 'avgfviews' => $avgfviews, 'avgtviews' => $avgtviews));
    $admin_list->set_var('block_end', COM_endBlock());
    $admin_list->parse('output', 'admin-list');
    $retval .= $admin_list->finish($admin_list->get_var('output'));
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:59,代码来源:index.php

示例7: 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

示例8: MG_quotaReport

function MG_quotaReport($page, $quotaquery, $usedquery)
{
    global $_TABLES, $_MG_CONF, $_CONF, $LANG_MG01, $LANG_MG03;
    $counter = 0;
    $rowcounter = 1;
    $retval = '';
    $start = $page * 50;
    $end = 50;
    $T = new Template($_MG_CONF['template_path'] . '/admin');
    $T->set_file(array('report' => 'quotareport.thtml'));
    $retval .= COM_startBlock('', '', COM_getBlockTemplate('_admin_block', 'header'));
    $T->set_var(array('lang_username' => $LANG_MG01['username'], 'lang_active' => $LANG_MG01['active'], 'lang_quota' => $LANG_MG01['quota'], 'lang_used' => $LANG_MG01['used']));
    $T->set_block('report', 'UserRow', 'uRow');
    if ($quotaquery > 0) {
        $quotaselect = $quotaquery * 1048676;
    } else {
        $quotaselect = 0;
    }
    $tres = DB_query("SELECT COUNT(gl.uid) AS count FROM {$_TABLES['users']} AS gl LEFT JOIN {$_TABLES['mg_userprefs']} AS mg ON gl.uid=mg.uid WHERE gl.status = 3 AND gl.uid > 2 AND mg.member_gallery=1 AND mg.quota >= " . $quotaselect);
    $trow = DB_fetchArray($tres);
    $total_records = $trow['count'];
    $sql = "SELECT gl.uid,  gl.status, gl.username, gl.fullname, mg.member_gallery, mg.quota FROM {$_TABLES['users']} AS gl LEFT JOIN {$_TABLES['mg_userprefs']} AS mg ON gl.uid=mg.uid WHERE gl.status = 3 AND gl.uid > 2 AND mg.member_gallery=1 AND mg.quota >= " . $quotaselect . " ORDER BY gl.username ASC LIMIT {$start},{$end}";
    $result = DB_query($sql);
    while ($userRow = DB_fetchArray($result)) {
        $uid = $userRow['uid'];
        $quota_mb = MG_getUserQuota($uid) / 1048676;
        $quota = number_format($quota_mb, 2);
        $used_mb = (double) MG_quotaUsage($uid) / 1048576;
        $used = number_format($used_mb, 2);
        if ($quotaquery > 0) {
            // limit based on quota
            if ($quota_mb >= $quotaquery) {
                $show = 1;
            } else {
                $show = 0;
            }
        } else {
            $show = 1;
        }
        if ($show) {
            $T->set_var(array('result_row' => $rowcounter, 'rowclass' => $rowcounter % 2 ? '2' : '1', 'username' => '<a href="' . $_MG_CONF['admin_url'] . 'edituser.php?uid=' . $uid . '">' . $userRow['username'] . " (" . $userRow['fullname'] . ")</a>", 'uid' => $uid, 'quota' => $quota == 0 ? 'Unlimited' : $quota, 'used' => $used, 'active' => MG_getUserActive($uid)));
            $T->parse('uRow', 'UserRow', true);
            $rowcounter++;
            $counter++;
        }
    }
    $T->set_var(array('site_admin_url' => $_MG_CONF['admin_url'], 'used' => $usedquery, 'quota' => $quotaquery, 'lang_go' => $LANG_MG03['go'], 'lang_quota' => $LANG_MG01['quota'], 'lang_used' => $LANG_MG01['used'], 'lang_batch_update' => $LANG_MG01['batch_quota_update'], 'lang_update' => $LANG_MG01['update'], 'pagenav' => COM_printPageNavigation($_MG_CONF['admin_url'] . 'quotareport.php', $page + 1, ceil($total_records / 50))));
    $T->parse('output', 'report');
    $retval .= $T->finish($T->get_var('output'));
    $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
    return $retval;
}
开发者ID:spacequad,项目名称:glfusion,代码行数:52,代码来源:quotareport.php

示例9: 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

示例10: display_hello

function display_hello($hello_id)
{
    global $_CONF, $_TABLES, $LANG_HELLO01;
    $display = COM_startBlock($LANG_HELLO01['email'] . ' #' . $hello_id);
    // generate the display from the template
    $display_hello = new Template($_CONF['path'] . 'plugins/hello/templates/admin');
    $display_hello->set_file(array('display_hello' => 'hello_display.thtml'));
    $requete = "SELECT content FROM {$_TABLES['hello']} WHERE hello_id = " . $hello_id . " limit 1";
    $result_objet_cherche = DB_query($requete);
    $objet_cherche = DB_fetchArray($result_objet_cherche);
    $display_hello->set_var('hello_display', stripslashes($objet_cherche[0]));
    $display .= $display_hello->parse('output', 'display_hello');
    $display .= COM_endBlock();
    // return results
    return $display;
}
开发者ID:Geeklog-Plugins,项目名称:hello,代码行数:16,代码来源:read_email.php

示例11: CLASSIFIEDS_admin_menu

/**
 * Returns admin menu display
 *
 * Generates the admin menu from the template and returns the result as a string of HTML
 *
 * @return string HTML of admin menu
 */
function CLASSIFIEDS_admin_menu()
{
    global $_CONF, $LANG_CLASSIFIEDS_1, $_TABLES;
    $retval = COM_startBlock();
    // generate the menu from the template
    $menu = new Template($_CONF['path'] . 'plugins/classifieds/templates/menus');
    $menu->set_file(array('menu' => 'admin_menu.thtml'));
    $menu->set_var('site_url', $_CONF['site_url']);
    $menu->set_var('classifieds', $LANG_CLASSIFIEDS_1['plugin_name']);
    $menu->set_var('classifieds_list', $LANG_CLASSIFIEDS_1['classifieds_list']);
    $menu->set_var('categories_list', $LANG_CLASSIFIEDS_1['categories_list']);
    $retval .= $menu->parse('output', 'menu');
    $retval .= COM_endBlock();
    // retval results
    return $retval;
}
开发者ID:Geeklog-Plugins,项目名称:classifieds,代码行数:23,代码来源:index.php

示例12: 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

示例13: CUSTOM_handle404

function CUSTOM_handle404($alternate_url = '')
{
    global $_CONF, $_USER, $LANG_404;
    // send 404 in any case
    header('HTTP/1.1 404 Not Found');
    header('Status: 404 Not Found');
    $display .= COM_startBlock($LANG_404[1]);
    if (isset($_SERVER['SCRIPT_URI'])) {
        $url = strip_tags($_SERVER['SCRIPT_URI']);
    } else {
        $request = $_SERVER['REQUEST_URI'];
        $url = 'http://' . $_SERVER['HTTP_HOST'] . strip_tags($request);
    }
    // Add log stuff
    if (isset($_USER['uid'])) {
        $byuser = $_USER['uid'] . '@' . $_SERVER['REMOTE_ADDR'];
    } else {
        $byuser = 'anon@' . $_SERVER['REMOTE_ADDR'];
    }
    $refurl = $_SERVER['HTTP_REFERER'];
    $remoteaddress = $_SERVER['REMOTE_ADDR'];
    $timestamp = @strftime('%c');
    $logentry = "404 Error generated by {$byuser} for url: {$url} - Referring url: {$refurl}";
    $logfile = $_CONF['path_log'] . '404.log';
    if (!($file = fopen($logfile, 'a'))) {
    } else {
        fputs($file, "{$timestamp} - {$logentry} \n");
    }
    $display .= CUSTOM_getStaticpage('404');
    $display .= sprintf($LANG_404[2], $url);
    if ($alternate_url != '') {
        $display .= sprintf($LANG_404[4], $alternate_url);
    } else {
        $display .= $LANG_404[3];
    }
    $display .= COM_endBlock();
    // $display = COM_createHTMLDocument($display, array('pagetitle' => $LANG_404[1]));
    $display = COM_createHTMLDocument($display, array('what' => 'none', 'pagetitle' => $LANG_404[1], 'rightblock' => false));
    COM_output($display);
    exit;
    // Do not want to go any further
}
开发者ID:milk54,项目名称:geeklog-japan,代码行数:42,代码来源:custom_handle404.php

示例14: _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

示例15: 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


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