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


PHP construct_button_code函数代码示例

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


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

示例1: print_description_row

             print_description_row('<a href="#help' . $topic['adminhelpid'] . '">' . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . '</a>', 0, 1);
         }
     }
     print_table_footer();
 }
 if (sizeof($specific)) {
     reset($specific);
     print_form_header('', '');
     if ($resultcount != 1) {
         print_table_header($vbphrase['action_specific_topics'], 1);
     }
     foreach ($specific as $topic) {
         print_description_row("<a name=\"help{$topic['adminhelpid']}\">" . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . "</a>", 0, 1, 'thead');
         print_description_row($helpphrase[fetch_help_phrase_short_name($topic, '_text')], 0, 1, 'alt1');
         if ($vbulletin->debug) {
             print_description_row("<div style=\"float:{$stylevar['right']}\">" . construct_button_code($vbphrase['edit'], "help.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;adminhelpid={$topic['adminhelpid']}") . "</div><div>action = {$topic['action']} | optionname = {$topic['optionname']} | displayorder = {$topic['displayorder']}</div>", 0, 1, 'alt2 smallfont');
         }
     }
     print_table_footer();
 }
 if (sizeof($general)) {
     reset($general);
     print_form_header('', '');
     if ($resultcount != 1) {
         print_table_header($vbphrase['general_topics'], 1);
     }
     foreach ($general as $topic) {
         print_description_row("<a name=\"help{$topic['adminhelpid']}\">" . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . "</a>", 0, 1, 'thead');
         print_description_row($helpphrase[fetch_help_phrase_short_name($topic, '_text')]);
     }
     print_table_footer();
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:help.php

示例2: print_cells_row

        // Output the line.
        print_cells_row($cell, false, false, 0, 'top', false, false, $navelement['navtype'] . 'row');
        if ($navelement['navtype'] == 'tab' and $navelement['navid'] == $vbulletin->GPC['tabid'] and !$navelement['links']) {
            print_description_row($vbphrase['tab_has_no_elements'], 0, 6);
        }
        if ($navelement['active'] != 1 or $vbulletin->products[$navelement['productid']] != 1) {
            if ($navelement['navtype'] == 'tab') {
                $tabstate = 1;
            } else {
                if ($navelement['navtype'] == 'menu') {
                    $menustate = 1;
                }
            }
        }
    }
    print_table_footer(6, "<input type=\"submit\" class=\"button\" tabindex=\"1\" value=\"" . $vbphrase['save'] . "\" accesskey=\"s\" />" . construct_button_code($vbphrase['add_new_tab'], "navigation.php?" . $vbulletin->session->vars['sessionurl'] . "do=add&type=tab"));
    ($hook = vBulletinHook::fetch_hook('navigation_admin_list')) ? eval($hook) : false;
}
if ($_REQUEST['do'] == 'update') {
    $vbulletin->input->clean_array_gpc('r', array('order' => TYPE_ARRAY_INT, 'active' => TYPE_ARRAY_BOOL, 'vactive' => TYPE_ARRAY));
    $active = array();
    $display = array();
    foreach ($vbulletin->GPC['order'] as $key => $order) {
        $display[$order][] = $key;
        /* Deal with missing active values.
        		This could be because the checkbox is unticked or
        		disabled, we try and track this state in vactive */
        if (!isset($vbulletin->GPC['active'][$key])) {
            $vbulletin->GPC['active'][$key] = 0;
            switch ($vbulletin->GPC['vactive'][$key]) {
                case 1:
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:navigation.php

示例3: foreach

     foreach ($queryoptions as $query_group => $queries) {
         if (!is_array($queries)) {
             continue;
         }
         foreach ($queries as $query_id => $query_title) {
             if ($query_id == $vbulletin->GPC['autoquery']) {
                 $auto_query_text = " ({$query_title})";
                 break 2;
             }
         }
     }
 }
 print_form_header('', '');
 print_table_header($vbphrase['query'] . $auto_query_text);
 print_description_row('<code>' . nl2br(htmlspecialchars_uni($query)) . '</code>', 0, 2, '');
 print_description_row(construct_button_code($vbphrase['restart'], 'queries.php?' . vB::getCurrentSession()->get('sessionurl')), 0, 2, 'tfoot', 'center');
 print_table_footer();
 $query_stripped = preg_replace('@/\\*.*?\\*/@s', '', $query);
 $query_stripped = preg_replace('@(#|--).*?$@m', '', $query_stripped);
 preg_match('#^([A-Z]+)\\s#si', trim($query_stripped), $regs);
 $querytype = strtoupper($regs[1]);
 switch ($querytype) {
     // EXPLAIN, SELECT, DESCRIBE & SHOW **********************************************************
     case 'EXPLAIN':
     case 'SELECT':
     case 'DESCRIBE':
     case 'SHOW':
         $query_mod = preg_replace('#\\sLIMIT\\s+(\\d+(\\s*,\\s*\\d+)?)#i', '', $query);
         $counter = $vbulletin->db->query_write($query_mod);
         print_form_header('queries', 'doquery', 0, 1, 'queryform');
         construct_hidden_code('do', 'doquery');
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:queries.php

示例4: construct_link_code

        if ($vbulletin->options['cp_collapse_forums']) {
            echo '<p class="smallfont" align="center">' . construct_link_code($vbphrase['expand_all'], "forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify&amp;expandid=-2") . '</p>';
        }
        echo '<p class="smallfont" align="center">' . $vbphrase['forums_marked_asterisk_are_password_protected'] . '</p>';
    } else {
        print_form_header('forum', 'doorder');
        print_table_header($vbphrase['forum_manager'], 2);
        print_cells_row(array($vbphrase['forum'], $vbphrase['controls']), 1, 'tcat');
        $cell = array();
        $select = '<select name="forumid" id="sel_foruid" tabindex="1" class="bginput">';
        $select .= construct_forum_chooser($vbulletin->GPC['forumid'], true);
        $select .= "</select>\n";
        $cell[] = $select;
        $cell[] = "\n\t<select name=\"controls\" class=\"bginput\">\n" . construct_select_options($forumoptions1) . "\t</select><input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_forum_jump(js_returnid());\" />\n\t";
        print_cells_row($cell);
        print_table_footer(2, construct_button_code($vbphrase['add_new_forum'], "forum.php?" . $vbulletin->session->vars['sessionurl'] . "do=add"));
    }
}
// ###################### Start add podcast #######################
if ($_REQUEST['do'] == 'podcast') {
    if (!($forum = fetch_foruminfo($vbulletin->GPC['forumid'], false))) {
        print_stop_message('invalid_forum_specified');
    }
    require_once DIR . '/includes/adminfunctions_misc.php';
    $forum['title'] = str_replace('&amp;', '&', $forum['title']);
    $podcast = $db->query_first("\r\n\t\tSELECT *\r\n\t\tFROM " . TABLE_PREFIX . "podcast\r\n\t\tWHERE forumid = {$forum['forumid']}");
    print_form_header('forum', 'updatepodcast');
    print_table_header(construct_phrase($vbphrase['x_y_id_z'], $vbphrase['podcast_settings'], $forum['title'], $forum['forumid']));
    construct_hidden_code('forumid', $forum['forumid']);
    print_yes_no_row($vbphrase['enabled'], 'enabled', $podcast['enabled']);
    print_podcast_chooser($vbphrase['category'], 'categoryid', $podcast['categoryid']);
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:forum.php

示例5: print_form_header

 */
if ($do == "export") {
    $results = $db->query_read_slave("SELECT providerid id, provider title, url description from " . TABLE_PREFIX . "bbcode_video ORDER BY priority, provider ASC");
    print_form_header('ame', 'doexport');
    badhook_check();
    if ($db->num_rows($results)) {
        print_table_header($vbphrase['ame_installed_definitions'], 2);
        print_cells_row(array($vbphrase['title'], "<label for=\"export_toggle\">{$vbphrase['export']}</label> <input type=\"checkbox\" id=\"export_toggle\" onclick=\"tick_all(this.form, 'items', this.checked)\" checked=\"checked\" />"), true);
        while ($result = $db->fetch_array($results)) {
            print_checkbox_row("{$result['title']}<dfn>{$result['description']}</dfn>", "items[{$result['id']}]");
        }
        print_submit_row();
    } else {
        print_table_header($vbphrase['ame_installed_definitions'], 2);
        print_description_row($vbphrase['ame_no_definitions']);
        print_table_footer(2, construct_button_code("Add new", "ame.php?do=edit"));
    }
}
/**
 * Spits out an XML file of the exported items
 */
if ($do == "doexport") {
    $items = $vbulletin->input->clean_gpc('p', 'items', TYPE_ARRAY_UINT);
    if (sizeof($items)) {
        foreach ($items as $key => $value) {
            if ($value) {
                $ids .= ($ids ? "," : "") . $key;
            }
        }
        $results = $db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . "bbcode_video WHERE providerid IN ({$ids})");
        while ($result = $db->fetch_array($results)) {
开发者ID:rcdesign-cemetery,项目名称:vb-foreign_mod_fixes,代码行数:31,代码来源:ame.php

示例6: compile_template

/**
* Processes a raw template for conditionals, phrases etc into PHP code for eval()
*
* @param	string	Template
*
* @return	string
*/
function compile_template($template)
{
    $orig_template = $template;
    $template = addslashes($template);
    $template = process_template_conditionals($template);
    $template = process_template_phrases('phrase', $template, 'parse_phrase_tag');
    if (!function_exists('replace_template_variables')) {
        require_once DIR . '/includes/functions_misc.php';
    }
    $template = replace_template_variables($template, false);
    ($hook = vBulletinHook::fetch_hook('template_compile')) ? eval($hook) : false;
    $template = str_replace('\\\\$', '\\$', $template);
    if (function_exists('token_get_all')) {
        $tokens = @token_get_all('<?php $var = "' . $template . '"; ?>');
        foreach ($tokens as $token) {
            if (is_array($token)) {
                switch ($token[0]) {
                    case T_INCLUDE:
                    case T_INCLUDE_ONCE:
                    case T_REQUIRE:
                    case T_REQUIRE_ONCE:
                        global $vbphrase;
                        echo "<p>&nbsp;</p><p>&nbsp;</p>";
                        print_form_header('', '', 0, 1, '', '65%');
                        print_table_header($vbphrase['vbulletin_message']);
                        print_description_row($vbphrase['file_inclusion_not_permitted']);
                        print_table_footer(2, construct_button_code($vbphrase['go_back'], 'javascript:history.back(1)'));
                        print_cp_footer();
                        exit;
                }
            }
        }
    }
    if (function_exists('verify_demo_template')) {
        verify_demo_template($template);
    }
    return $template;
}
开发者ID:holandacz,项目名称:nb4,代码行数:45,代码来源:adminfunctions_template.php

示例7: iif

            }
            // active
            $cells[] = iif(!$ta_cache["{$subscription['subscriptionid']}"], 0, "<a href=\"subscriptions.php?do=find&amp;subscriptionid={$subscription['subscriptionid']}&amp;status=1\"><span style=\"color: green;\">" . $ta_cache["{$subscription['subscriptionid']}"] . "</span></a>");
            // completed
            $completed = intval($t_cache["{$subscription['subscriptionid']}"] - $ta_cache["{$subscription['subscriptionid']}"]);
            $cells[] = iif(!$completed, 0, "<a href=\"subscriptions.php?do=find&amp;subscriptionid={$subscription['subscriptionid']}&amp;status=0\"><span style=\"color: red;\">" . $completed . "</span></a>");
            // total
            $cells[] = iif(!$t_cache["{$subscription['subscriptionid']}"], 0, "<a href=\"subscriptions.php?do=find&amp;subscriptionid={$subscription['subscriptionid']}&amp;status=-1\">" . $t_cache["{$subscription['subscriptionid']}"] . "</a>");
            // display order
            $cells[] = "<input type=\"text\" class=\"bginput\" name=\"order[{$subscription['subscriptionid']}]\" value=\"{$subscription['displayorder']}\" tabindex=\"1\" size=\"3\" title=\"" . $vbphrase['edit_display_order'] . "\" />";
            // controls
            $cells[] = "\n\t<select name=\"s{$subscription['subscriptionid']}\" onchange=\"js_forum_jump({$subscription['subscriptionid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_forum_jump({$subscription['subscriptionid']});\" />\n\t";
            print_cells_row($cells, 0, '', 1);
        }
    }
    print_table_footer(6, "<input type=\"submit\" class=\"button\" tabindex=\"1\" value=\"" . $vbphrase['save_subscription_manager'] . "\" accesskey=\"s\" />" . construct_button_code($vbphrase['add_new_subscription_gsubscription'], "subscriptions.php?" . vB::getCurrentSession()->get('sessionurl') . "do=add"));
}
// ###################### Start do order #######################
if ($_POST['do'] == 'doorder') {
    $vbulletin->input->clean_array_gpc('p', array('order' => vB_Cleaner::TYPE_ARRAY));
    if (is_array($vbulletin->GPC['order'])) {
        $subobj->cache_user_subscriptions();
        if (is_array($subobj->subscriptioncache) and (!empty($vbulletin->GPC['order']) and !empty($subobj->subscriptioncache))) {
            $assertor->assertQuery('vBForum:doSubscriptionLogOrder', array('subscriptions' => $subobj->subscriptioncache, 'displayorder' => $vbulletin->GPC['order']));
        }
    }
    print_stop_message2('saved_display_order_successfully', 'subscriptions', array('do' => 'modify'));
}
// ###################### Start Remove #######################
if ($_REQUEST['do'] == 'apirem') {
    if (!vB::getUserContext()->hasAdminPermission('cansetserverconfig')) {
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:subscriptions.php

示例8: array

    $photoplog_category = array();
    foreach ($photoplog_list_categories as $photoplog_key => $photoplog_value) {
        if ($photoplog_key > 0) {
            $photoplog_catid = $photoplog_key;
            $photoplog_dashes = '';
            $photoplog_title = htmlspecialchars_uni(trim($photoplog_value));
            if (eregi("^([-]+[ ])(.*)", $photoplog_title, $photoplog_regs)) {
                $photoplog_dashes = $photoplog_regs[1];
                $photoplog_title = $photoplog_regs[2];
            }
            $photoplog_category['displayorder'] = $photoplog_ds_catopts[$photoplog_catid]['displayorder'];
            $bgclass = fetch_row_bgclass();
            echo "\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"{$bgclass}\" width=\"100%\">" . $photoplog_dashes . "<a href=\"photoplog_category.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;catid=" . $photoplog_catid . "\">" . $photoplog_title . "</a></td>\r\n\t\t\t\t\t<td class=\"{$bgclass}\"><input type=\"text\" class=\"bginput\" name=\"photoplog_category[" . $photoplog_catid . "]\" value=\"" . $photoplog_category['displayorder'] . "\" size=\"5\" /></td>\r\n\t\t\t\t\t<td class=\"{$bgclass}\"><nobr><a href=\"photoplog_category.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;catid=" . $photoplog_catid . "\">" . $vbphrase['photoplog_edit'] . "</a> <a href=\"photoplog_category.php?" . $vbulletin->session->vars['sessionurl'] . "do=delete&amp;catid=" . $photoplog_catid . "\">" . $vbphrase['photoplog_delete'] . "</a></nobr></td>\r\n\t\t\t\t</tr>\r\n\t\t\t";
        }
    }
    print_table_footer(3, "<input type=\"submit\" class=\"button\" tabindex=\"1\" value=\"" . $vbphrase['photoplog_save_display_order'] . "\" accesskey=\"s\" />" . construct_button_code($vbphrase['photoplog_add_new_category'], "photoplog_category.php?" . $vbulletin->session->vars['sessionurl'] . "do=add"));
}
if ($_REQUEST['do'] == 'doorder') {
    $vbulletin->input->clean_array_gpc('p', array('photoplog_category' => TYPE_ARRAY_UINT));
    if (!empty($vbulletin->GPC['photoplog_category'])) {
        $photoplog_dscatopts = $photoplog_ds_catopts;
        $photoplog_sql = '';
        foreach ($vbulletin->GPC['photoplog_category'] as $photoplog_catid => $photoplog_displayorder) {
            $photoplog_sql .= "WHEN " . intval($photoplog_catid) . " THEN " . intval($photoplog_displayorder) . "\n";
            $photoplog_dscatopts["{$photoplog_catid}"]['displayorder'] = intval($photoplog_displayorder);
        }
        if ($db->query_write("UPDATE " . PHOTOPLOG_PREFIX . "photoplog_categories\r\n\t\t\t\tSET displayorder = CASE catid\r\n\t\t\t\t{$photoplog_sql} ELSE displayorder END\r\n\t\t\t")) {
            $db->query_write("ALTER TABLE " . PHOTOPLOG_PREFIX . "photoplog_categories\r\n\t\t\t\tORDER BY parentid, displayorder, catid\r\n\t\t\t");
            build_datastore('photoplog_dscat', serialize($photoplog_dscatopts));
            print_cp_redirect("photoplog_category.php?" . $vbulletin->session->vars['sessionurl'] . "do=modify", 1);
        } else {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:photoplog_category.php

示例9: array

$globaltemplates = array();
$actiontemplates = array();
include_once dirname(__FILE__) . '/../includes/functions_vbseo.php';
require_once './global.' . VBSEO_VB_EXT;
if (!can_administer('canadminplugins')) {
    print_cp_no_permission();
}
print_cp_header('vBSEO Installation');
if ($_REQUEST['keepdata']) {
    print_form_header();
    print_table_header('vBSEO data has been left in database unchanged for further usage', 2, 0, '', 'center', 0);
    print_table_footer(2, construct_button_code($vbphrase['click_here_to_continue_processing'], 'index.' . VBSEO_VB_EXT . '?' . $vbulletin->session->vars['sessionurl'] . 'do=buildbitfields'));
} else {
    if ($_REQUEST['do'] == 'kill') {
        $db->query_write("ALTER TABLE " . vbseo_tbl_prefix('forum') . " DROP COLUMN vbseo_moderatepingbacks");
        $db->query_write("ALTER TABLE " . vbseo_tbl_prefix('forum') . " DROP COLUMN vbseo_moderatetrackbacks");
        $db->query_write("ALTER TABLE " . vbseo_tbl_prefix('forum') . " DROP COLUMN vbseo_moderaterefbacks");
        $db->query_write("ALTER TABLE " . vbseo_tbl_prefix('thread') . " DROP COLUMN vbseo_linkbacks_no");
        $db->query_write("DROP TABLE IF EXISTS " . vbseo_tbl_prefix('trackback') . "");
        $db->query_write("DROP TABLE IF EXISTS " . vbseo_tbl_prefix('vbseo_linkback') . "");
        $db->query_write("DROP TABLE IF EXISTS " . vbseo_tbl_prefix('vbseo_blacklist') . "");
        $db->query_write("DROP TABLE IF EXISTS " . vbseo_tbl_prefix('vbseo_serviceupdate') . "");
        require_once DIR . '/includes/class_bitfield_builder.' . VBSEO_VB_EXT;
        vB_Bitfield_Builder::save($db);
        build_forum_permissions();
        print_form_header();
        print_table_header('vBSEO data has been cleaned up successfully', 2, 0, '', 'center', 0);
        print_table_footer(2, construct_button_code($vbphrase['click_here_to_continue_processing'], 'index.' . VBSEO_VB_EXT . '?' . $vbulletin->session->vars['sessionurl'] . 'do=buildbitfields'));
    }
}
print_cp_footer();
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:admin_vbseo.php

示例10: rpm_print_stop_back

function rpm_print_stop_back($text = 'error')
{
    global $vbphrase;
    if (!defined('DONE_CPHEADER')) {
        print_cp_header($vbphrase['vbulletin_message']);
    }
    echo '<p>&nbsp;</p><p>&nbsp;</p>';
    print_form_header('', '', 0, 1, 'messageform', '65%');
    print_table_header($vbphrase['vbulletin_message']);
    print_description_row("<blockquote><br />{$text}<br /><br /></blockquote>");
    print_table_footer(2, construct_button_code($vbphrase['go_back'], 'javascript:history.back(1)'));
    rpm_print_footer();
    print_cp_footer();
}
开发者ID:holandacz,项目名称:nb4,代码行数:14,代码来源:read_pms.php

示例11: photoplog_list_upload_fields

function photoplog_list_upload_fields($catid)
{
    global $vbulletin, $vbphrase;
    $catid = intval($catid);
    if ($catid != -1 && !photoplog_check_category($catid)) {
        print_stop_message('generic_error_x', $vbphrase['photoplog_bad_category']);
    }
    $photoplog_fields = $vbulletin->db->query_read("SELECT f1.inherited AS inherited1,\r\n\t\tf1.fieldid AS fieldid1, f1.groupid as groupid1, f1.displayorder AS displayorder1,\r\n\t\tf1.protected AS protected1, f1.parentid AS parentid1,\r\n\t\tf1.info AS info1 ,f2.info AS info2\r\n\t\tFROM " . PHOTOPLOG_PREFIX . "photoplog_customfields AS f1\r\n\t\tLEFT JOIN " . PHOTOPLOG_PREFIX . "photoplog_customfields AS f2\r\n\t\tON (f1.parentid = f2.catid AND f1.groupid = f2.groupid)\r\n\t\tWHERE f1.catid = " . intval($catid) . "\r\n\t\tORDER BY f1.displayorder ASC\r\n\t");
    print_form_header('photoplog_field', 'displayorder');
    construct_hidden_code('s', $vbulletin->session->vars['sessionhash']);
    construct_hidden_code('catid', $catid);
    $catname = $catid == -1 ? $vbphrase['photoplog_all_categories'] : photoplog_get_category_title($catid);
    print_table_header(htmlspecialchars_uni($catname), 3);
    if ($catid == -1) {
        print_description_row($vbphrase['photoplog_inherited_fields_cannot_be_modified_root'], 0, 3);
    } else {
        print_description_row($vbphrase['photoplog_inherited_fields_cannot_be_modified'], 0, 3);
    }
    print_cells_row(array($vbphrase['photoplog_field_title'], '<nobr>' . $vbphrase['photoplog_display_order'] . '</nobr>', $vbphrase['photoplog_controls']), 1, '', -1);
    while ($photoplog_field = $vbulletin->db->fetch_array($photoplog_fields)) {
        $photoplog_field['info'] = $photoplog_field['inherited1'] < 1 ? $photoplog_field['info1'] : $photoplog_field['info2'];
        // note: photoplog_field['info'] may be NULL
        $photoplog_field['info'] = empty($photoplog_field['info']) ? '' : unserialize($photoplog_field['info']);
        if (is_array($photoplog_field['info'])) {
            $photoplog_fieldid1 = $photoplog_field['fieldid1'];
            $photoplog_title1 = $photoplog_field['info']['title'];
            $photoplog_parentid1 = intval($photoplog_field['parentid1']);
            if ($photoplog_parentid1 == -2) {
                $photoplog_title1 = $vbphrase[$photoplog_title1];
            }
            $photoplog_protected1 = $photoplog_field['protected1'];
            $photoplog_edit_html = '' . $vbphrase['edit'] . '';
            $photoplog_delete_html = '' . $vbphrase['delete'] . '';
            $photoplog_title_link = htmlspecialchars_uni($photoplog_title1);
            if ($photoplog_protected1 == 0) {
                $photoplog_pre_ahref1 = "[<a href=\"photoplog_field.php?" . $vbulletin->session->vars['sessionurl'];
                $photoplog_pre_ahref2 = "<a href=\"photoplog_field.php?" . $vbulletin->session->vars['sessionurl'];
                $photoplog_post_ahref = "&amp;catid=" . intval($catid) . "&amp;fieldid=" . intval($photoplog_fieldid1) . "\">";
                $photoplog_edit_html = $photoplog_pre_ahref1 . "do=edit" . $photoplog_post_ahref . $photoplog_edit_html . "</a>]";
                $photoplog_delete_html = $photoplog_pre_ahref1 . "do=delete" . $photoplog_post_ahref . $photoplog_delete_html . "</a>]";
                $photoplog_title_link = $photoplog_pre_ahref2 . "do=edit" . $photoplog_post_ahref . $photoplog_title_link . "</a>";
            } else {
                $photoplog_edit_html = '[<del>' . $vbphrase['edit'] . '</del>]';
                $photoplog_delete_html = '[<del>' . $vbphrase['delete'] . '</del>]';
            }
            $bgclass = fetch_row_bgclass();
            if ($catid == -1) {
                echo "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"{$bgclass}\" width=\"100%\">" . $photoplog_title_link . "</td>\r\n\t\t\t\t\t<td class=\"{$bgclass}\"><span class=\"smallfont\">" . $vbphrase['photoplog_na'] . "</span></td>\r\n\t\t\t\t\t<td class=\"{$bgclass}\"><nobr>" . $photoplog_edit_html . " " . $photoplog_delete_html . "</nobr></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t";
            } else {
                echo "\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t<td class=\"{$bgclass}\" width=\"100%\">" . $photoplog_title_link . "</td>\r\n\t\t\t\t\t<td class=\"{$bgclass}\"><input type=\"text\" class=\"bginput\" name=\"displayorder[" . $photoplog_fieldid1 . "]\" value=\"" . $photoplog_field['displayorder1'] . "\" size=\"5\" /></td>\r\n\t\t\t\t\t<td class=\"{$bgclass}\"><nobr>" . $photoplog_edit_html . " " . $photoplog_delete_html . "</nobr></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t";
            }
        }
    }
    $vbulletin->db->free_result($photoplog_fields);
    $photoplog_submit_button = $catid != -1 ? "<input type=\"submit\" class=\"button\" tabindex=\"1\" value=\"" . $vbphrase['save_display_order'] . "\" accesskey=\"s\" />" : "";
    print_table_footer(3, $photoplog_submit_button . construct_button_code($vbphrase['photoplog_add_new_field'], "photoplog_field.php?" . $vbulletin->session->vars['sessionurl'] . "do=add&amp;catid=" . intval($catid)) . construct_button_code($vbphrase['go_back'], "photoplog_field.php?" . $vbulletin->session->vars['sessionurl'] . "do=view"));
}
开发者ID:holandacz,项目名称:nb4,代码行数:57,代码来源:photoplog_field.php

示例12: print_cp_message

/**
* Halts execution and shows the specified message
*
* @param	string	Message to display
* @param	mixed	If specified, a redirect will be performed to the URL in this parameter
* @param	integer	If redirect is specified, this is the time in seconds to delay before redirect
* @param	string	If specified, will provide a specific URL for "Go Back". If empty, no button will be displayed!
* @param bool		If true along with redirect, 'CONTINUE' button will be used instead of automatic redirect
*/
function print_cp_message($text = '', $redirect = NULL, $delay = 1, $backurl = NULL, $continue = false)
{
    global $vbulletin, $vbphrase;
    if ($vbulletin->GPC['ajax']) {
        require_once DIR . '/includes/class_xml.php';
        $xml = new vB_XML_Builder_Ajax('text/xml');
        $xml->add_tag('error', $text);
        $xml->print_xml();
        exit;
    }
    if ($redirect) {
        if (($hashpos = strpos($redirect, '#')) !== false or ($hashpos = strpos($redirect, '%23')) !== false) {
            $hashsize = strpos($redirect, '#') !== false ? 1 : 3;
            $hash = substr($redirect, $hashpos + $hashsize);
            $redirect = substr($redirect, 0, $hashpos);
        }
        if ($session = vB::getCurrentSession()->get('sessionurl')) {
            if (strpos($redirect, $session) !== false) {
                if (strpos($redirect, '?') === false) {
                    $redirect .= '?' . $session;
                } else {
                    $redirect .= '&' . $session;
                }
            }
        }
    }
    if (!defined('DONE_CPHEADER')) {
        print_cp_header($vbphrase['vbulletin_message']);
    }
    print_form_header('', '', 0, 1, 'messageform', '65%');
    print_table_header(new vB_Phrase('global', 'vbulletin_message'));
    print_description_row("<blockquote><br />{$text}<br /><br /></blockquote>");
    if ($redirect) {
        // redirect to the new page
        if ($continue) {
            $continueurl = create_full_url(str_replace('&amp;', '&', $redirect));
            if (!empty($hash)) {
                $continueurl .= '#' . $hash;
            }
            print_table_footer(2, construct_button_code(new vB_Phrase('global', 'continue'), $continueurl));
        } else {
            print_table_footer();
            $redirect_click = create_full_url($redirect);
            if (!empty($hash)) {
                $redirect_click .= '#' . $hash;
                $redirect .= '#' . $hash;
            }
            $redirect_click = str_replace('"', '', $redirect_click);
            echo '<p align="center" class="smallfont">' . construct_phrase($vbphrase['if_you_are_not_automatically_redirected_click_here_x'], $redirect_click) . "</p>\n";
            print_cp_redirect($redirect, $delay);
        }
    } else {
        // end the table and halt
        if ($backurl === NULL) {
            $backurl = 'javascript:history.back(1)';
        }
        if (strpos($backurl, 'history.back(') !== false) {
            //if we are attempting to run a history.back(1), check we have a history to go back to, otherwise attempt to close the window.
            $back_button = '&nbsp;
				<input type="button" id="backbutton" class="button" value="' . $vbphrase['go_back'] . '" title="" tabindex="1" onclick="if (history.length) { history.back(1); } else { self.close(); }"/>
				&nbsp;
				<script type="text/javascript">
				<!--
				if (history.length < 1 || ((is_saf || is_moz) && history.length <= 1)) // safari + gecko start at 1
				{
					document.getElementById("backbutton").parentNode.removeChild(document.getElementById("backbutton"));
				}
				//-->
				</script>';
            // remove the back button if it leads back to the login redirect page
            if (strpos($vbulletin->url, 'login.php?do=login') !== false) {
                $back_button = '';
            }
        } else {
            if ($backurl !== '') {
                // regular window.location=url call
                $backurl = create_full_url($backurl);
                $backurl = str_replace(array('"', "'"), '', $backurl);
                $back_button = '<input type="button" class="button" value="' . new vB_Phrase('global', 'go_back') . '" title="" tabindex="1" onclick="window.location=\'' . $backurl . '\';"/>';
            } else {
                $back_button = '';
            }
        }
        print_table_footer(2, $back_button);
    }
    // and now terminate the script
    print_cp_footer();
}
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:97,代码来源:adminfunctions.php

示例13: print_form_header

}
// #######################################################################
if ($_REQUEST['do'] == 'categories') {
    print_form_header('socialgroups', 'categoriesquickupdate');
    print_table_header($vbphrase['social_group_categories'], 5);
    print_cells_row(array("{$vbphrase['title']} / {$vbphrase['description']}", $vbphrase['social_groups'], $vbphrase['creator'], $vbphrase['display_order'], $vbphrase['controls']), true);
    $categories = fetch_socialgroup_category_options();
    $groupcounts = array();
    foreach ($categories as $category) {
        $groupcounts["{$category['socialgroupcategoryid']}"] = $category['groupcount'];
    }
    unset($categories);
    $categoriesresult = $db->query_read("\n\t\tSELECT socialgroupcategory.*, user.username\n\t\tFROM " . TABLE_PREFIX . "socialgroupcategory AS socialgroupcategory\n\t\tINNER JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = socialgroupcategory.creatoruserid)\n\t\tORDER BY socialgroupcategory.displayorder, socialgroupcategory.title\n\t");
    $category_count = $db->num_rows($categoriesresult);
    if ($category_count) {
        while ($category = $db->fetch_array($categoriesresult)) {
            $category['title'] = htmlspecialchars_uni($category['title']);
            $category['description'] = htmlspecialchars_uni($category['description']);
            print_cells_row(array("<a href=\"socialgroups.php?" . $vbulletin->session->vars['sessionurl'] . "do=editcategory&amp;socialgroupcategoryid={$category['socialgroupcategoryid']}\">{$category['title']}</a> <small>{$category['description']}</small>", "<a href=\"socialgroups.php?" . $vbulletin->session->vars['sessionurl'] . "do=dosearch&amp;category={$category['socialgroupcategoryid']}\">" . vb_number_format($groupcounts["{$category['socialgroupcategoryid']}"]) . "</a>", "<a href=\"user.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;userid={$category['creatoruserid']}\">{$category['username']}</a>", "<input type=\"text\" class=\"bginput\" name=\"order[{$category['socialgroupcategoryid']}]\" value=\"{$category['displayorder']}\" tabindex=\"1\" size=\"3\" title=\"" . $vbphrase['edit_display_order'] . "\" />", '<div class="smallfont">' . construct_link_code($vbphrase['edit'], "socialgroups.php?" . $vbulletin->session->vars['sessionurl'] . "do=editcategory&amp;socialgroupcategoryid=" . $category['socialgroupcategoryid']) . construct_link_code($vbphrase['delete'], "socialgroups.php?" . $vbulletin->session->vars['sessionurl'] . "do=deletecategory&amp;socialgroupcategoryid=" . $category['socialgroupcategoryid']) . '</div>'));
        }
    }
    print_table_footer(5, "<input type=\"submit\" class=\"button\" tabindex=\"1\" value=\"" . $vbphrase['save_display_order'] . "\" accesskey=\"s\" />" . construct_button_code($vbphrase['add_new_category'], "socialgroups.php?" . $vbulletin->session->vars['sessionurl'] . "do=editcategory"));
}
// Print Footer
print_cp_footer();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # SVN: $Revision: 62098 $
|| ####################################################################
\*======================================================================*/
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:socialgroups.php

示例14: iif

            }
            // active
            $cells[] = iif(!$ta_cache["{$subscription['subscriptionid']}"], 0, "<a href=\"subscriptions.php?do=find&amp;subscriptionid={$subscription['subscriptionid']}&amp;status=1\"><span style=\"color: green;\">" . $ta_cache["{$subscription['subscriptionid']}"] . "</span></a>");
            // completed
            $completed = intval($t_cache["{$subscription['subscriptionid']}"] - $ta_cache["{$subscription['subscriptionid']}"]);
            $cells[] = iif(!$completed, 0, "<a href=\"subscriptions.php?do=find&amp;subscriptionid={$subscription['subscriptionid']}&amp;status=0\"><span style=\"color: red;\">" . $completed . "</span></a>");
            // total
            $cells[] = iif(!$t_cache["{$subscription['subscriptionid']}"], 0, "<a href=\"subscriptions.php?do=find&amp;subscriptionid={$subscription['subscriptionid']}&amp;status=-1\">" . $t_cache["{$subscription['subscriptionid']}"] . "</a>");
            // display order
            $cells[] = "<input type=\"text\" class=\"bginput\" name=\"order[{$subscription['subscriptionid']}]\" value=\"{$subscription['displayorder']}\" tabindex=\"1\" size=\"3\" title=\"" . $vbphrase['edit_display_order'] . "\" />";
            // controls
            $cells[] = "\n\t<select name=\"s{$subscription['subscriptionid']}\" onchange=\"js_forum_jump({$subscription['subscriptionid']});\" class=\"bginput\">\n" . construct_select_options($options) . "\t</select>\n\t<input type=\"button\" class=\"button\" value=\"" . $vbphrase['go'] . "\" onclick=\"js_forum_jump({$subscription['subscriptionid']});\" />\n\t";
            print_cells_row($cells, 0, '', 1);
        }
    }
    print_table_footer(6, "<input type=\"submit\" class=\"button\" tabindex=\"1\" value=\"" . $vbphrase['save_display_order'] . "\" accesskey=\"s\" />" . construct_button_code($vbphrase['add_new_subscription'], "subscriptions.php?" . $vbulletin->session->vars['sessionurl'] . "do=add"));
}
// ###################### Start do order #######################
if ($_POST['do'] == 'doorder') {
    $vbulletin->input->clean_array_gpc('p', array('order' => TYPE_ARRAY));
    if (is_array($vbulletin->GPC['order'])) {
        $subobj->cache_user_subscriptions();
        if (is_array($subobj->subscriptioncache)) {
            $casesql = '';
            $subscriptionids = '';
            foreach ($subobj->subscriptioncache as $sub) {
                if (!isset($vbulletin->GPC['order']["{$sub['subscriptionid']}"])) {
                    continue;
                }
                $displayorder = intval($vbulletin->GPC['order']["{$sub['subscriptionid']}"]);
                if ($sub['displayorder'] != $displayorder) {
开发者ID:benyamin20,项目名称:vbregistration,代码行数:31,代码来源:subscriptions.php

示例15: print_description_row

             print_description_row('<a href="#help' . $topic['adminhelpid'] . '">' . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . '</a>', 0, 1);
         }
     }
     print_table_footer();
 }
 if (sizeof($specific)) {
     reset($specific);
     print_form_header('', '');
     if ($resultcount != 1) {
         print_table_header($vbphrase['action_specific_topics'], 1);
     }
     foreach ($specific as $topic) {
         print_description_row("<a name=\"help{$topic['adminhelpid']}\">" . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . "</a>", 0, 1, 'thead');
         print_description_row($helpphrase[fetch_help_phrase_short_name($topic, '_text')], 0, 1, 'alt1');
         if ($vb5_config['Misc']['debug']) {
             print_description_row("<div style=\"float:" . vB_Template_Runtime::fetchStyleVar('right') . "\">" . construct_button_code($vbphrase['edit'], "help.php?" . vB::getCurrentSession()->get('sessionurl') . "do=edit&amp;adminhelpid={$topic['adminhelpid']}") . "</div><div>action = {$topic['action']} | optionname = {$topic['optionname']} | displayorder = {$topic['displayorder']}</div>", 0, 1, 'alt2 smallfont');
         }
     }
     print_table_footer();
 }
 if (sizeof($general)) {
     reset($general);
     print_form_header('', '');
     if ($resultcount != 1) {
         print_table_header($vbphrase['general_topics'], 1);
     }
     foreach ($general as $topic) {
         print_description_row("<a name=\"help{$topic['adminhelpid']}\">" . $helpphrase[fetch_help_phrase_short_name($topic, '_title')] . "</a>", 0, 1, 'thead');
         print_description_row($helpphrase[fetch_help_phrase_short_name($topic, '_text')]);
     }
     print_table_footer();
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:help.php


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