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


PHP init_param函数代码示例

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


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

示例1: _b_wp_archives_monthly_show

 function _b_wp_archives_monthly_show($options, $wp_num = '')
 {
     $block_style = $options[0] ? $options[0] : 0;
     $with_count = $options[1] == 0 ? false : true;
     $tpl_file = empty($options[2]) ? 'wp_archives_monthly.html' : $options[2];
     $sel_value = '';
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'm', 'string', '');
         init_param('GET', 'year', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         init_param('GET', 'day', 'integer', '');
         if (strlen(get_param('m')) == 6) {
             $sel_value = get_param('m');
         } else {
             if (test_param('year') && test_param('monthnum') && !test_param('day')) {
                 $sel_value = get_param('year') . zeroise(get_param('monthnum'), 2);
             }
         }
     }
     $block['wp_num'] = $wp_num;
     $block['divid'] = 'wpArchive' . $wp_num;
     $block['siteurl'] = wp_siteurl();
     $block['style'] = block_style_get(false);
     $block['block_style'] = $block_style;
     $block['with_count'] = $with_count;
     $now = current_time('mysql');
     $postHandler =& wp_handler('Post');
     $criteria =& new CriteriaCompo(new Criteria('post_date', $now, '<'));
     $criteria->add(new Criteria('post_status', 'publish'));
     $criteria->setSort('post_date');
     $criteria->setOrder('DESC');
     $criteria->setGroupby('YEAR(post_date), MONTH(post_date)');
     $postObjects =& $postHandler->getObjects($criteria, false, 'DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts');
     $block['records'] = array();
     if ($postObjects) {
         foreach ($postObjects as $postObject) {
             $this_year = $postObject->getExtraVar('year');
             $this_month = $postObject->getExtraVar('month');
             $_record['url'] = get_month_link($this_year, $this_month);
             $_record['text'] = format_month($this_year, $GLOBALS['month'][zeroise($this_month, 2)]);
             if ($with_count) {
                 $_record['count'] = '&nbsp;(' . $postObject->getExtraVar('posts') . ')';
             } else {
                 $_record['count'] = '';
             }
             $_record['select'] = $sel_value == $this_year . zeroise($this_month, 2) ? 'selected="selected"' : '';
             $block['records'][] = $_record;
         }
     }
     $_wpTpl =& new WordPresTpl('theme');
     $_wpTpl->assign('block', $block);
     if (!$_wpTpl->tpl_exists($tpl_file)) {
         $tpl_file = 'wp_archives_monthly.html';
     }
     $block['content'] = $_wpTpl->fetch($tpl_file);
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:60,代码来源:wp_archives_monthly.php

示例2: _b_wp_calendar_show

 function _b_wp_calendar_show($option, $wp_num = "")
 {
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'p', 'integer', '');
         init_param('GET', 'm', 'integer', '');
         init_param('GET', 'w', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         init_param('GET', 'year', 'integer', '');
         if (test_param('p') && !(test_param('m') || test_param('monthnum') || test_param('w'))) {
             $postHandler =& wp_handler('Post');
             $postObject =& $postHandler->get(get_param('p'));
             if ($postObject) {
                 $GLOBALS['m'] = mysql2date('Ym', $postObject->getVar('post_date'));
             }
         }
     }
     $block['wp_num'] = $wp_num;
     $block['divid'] = 'wpCalendar' . $wp_num;
     $block['style'] = block_style_get(false);
     $block['calendar'] = get_calendar(1, false);
     $_wpTpl =& new WordPresTpl('theme');
     $_wpTpl->assign('block', $block);
     $block['content'] = $_wpTpl->fetch('wp_calendar.html');
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:28,代码来源:wp_calendar.php

示例3: b_wp_categories_show

 function b_wp_categories_show($options, $wp_num = "")
 {
     $block_style = $options[0] ? $options[0] : 0;
     $with_count = $options[1] ? $options[1] : 0;
     $sorting_key = $options[2] ? $options[2] : 'name';
     $sorting_order = $options[3] ? $options[3] : 'asc';
     global $wpdb, $siteurl, $wp_id, $wp_inblock, $user_cache, $cache_categories, $category_name, $cat, $wp_mod, $wp_base;
     $id = 1;
     $GLOBALS['use_cache'] = 1;
     if ($wp_num == "") {
         $GLOBALS['wp_id'] = $wp_num;
         $GLOBALS['wp_inblock'] = 1;
         require dirname(__FILE__) . '/../wp-config.php';
         $GLOBALS['wp_inblock'] = 0;
     }
     if (current_wp()) {
         init_param('GET', 'cat', 'string', '');
         init_param('GET', 'category_name', 'string', '');
         if (!empty($GLOBALS['category_name']) && empty($GLOBALS['$cat'])) {
             if (stristr($GLOBALS['category_name'], '/')) {
                 $GLOBALS['category_name'] = explode('/', $GLOBALS['category_name']);
                 if ($category_name[count($category_name) - 1]) {
                     $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 1];
                     // no trailing slash
                 } else {
                     $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 2];
                     // there was a trailling slash
                 }
             }
             $categoryHandler =& wp_handler('Category');
             $categoryObject =& $categoryHandler->getByNiceName($GLOBALS['category_name']);
             $cat = $categoryObject->getVar('cat_ID');
         }
     }
     if ($block_style == 0) {
         // Simple Listing
         ob_start();
         block_style_get($wp_num);
         echo "<ul class='wpBlockList'>\n";
         wp_list_cats("sort_column={$sorting_key}&sorting_order={$sorting_order}&optioncount={$with_count}");
         echo "</ul>\n";
         $block['content'] = ob_get_contents();
         ob_end_clean();
     } else {
         // Dropdown Listing
         $file = "{$siteurl}/index.php";
         $link = $file . '?cat=';
         ob_start();
         block_style_get($wp_num);
         echo '<form name="listcatform' . $wp_num . '" id="listcatform' . $wp_num . '" action="#">';
         $select_str = '<select name="cat" onchange="window.location = (document.forms.listcatform' . $wp_num . '.cat[document.forms.listcatform' . $wp_num . '.cat.selectedIndex].value);"> ';
         dropdown_cats(1, _WP_LIST_CAT_ALL, $sorting_key, $sorting_order, 0, $with_count, 0, false, 0, 0, true, 0, true, 0);
         echo '</form>';
         $block_str = ob_get_contents();
         ob_end_clean();
         $block['content'] = ereg_replace('\\<select name\\=[^\\>]*\\>', $select_str, $block_str);
     }
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:59,代码来源:wp_categories.php

示例4: _b_wp_categories_show

 function _b_wp_categories_show($options, $wp_num = "")
 {
     $block_style = $options[0] ? $options[0] : 0;
     $with_count = $options[1] ? $options[1] : 0;
     $sorting_key = $options[2] ? $options[2] : 'name';
     $sorting_order = $options[3] ? $options[3] : 'asc';
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'cat', 'string', '');
         init_param('GET', 'category_name', 'string', '');
         if (!empty($GLOBALS['category_name']) && empty($GLOBALS['cat'])) {
             if (stristr($GLOBALS['category_name'], '/')) {
                 $GLOBALS['category_name'] = explode('/', $GLOBALS['category_name']);
                 if ($GLOBALS['category_name'][count($GLOBALS['category_name']) - 1]) {
                     $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 1];
                     // no trailing slash
                 } else {
                     $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 2];
                     // there was a trailling slash
                 }
             }
             $categoryHandler =& wp_handler('Category');
             $categoryObject =& $categoryHandler->getByNiceName($GLOBALS['category_name']);
             $GLOBALS['cat'] = $categoryObject->getVar('cat_ID');
         }
     }
     if ($block_style == 0) {
         // Simple Listing
         ob_start();
         block_style_get($wp_num);
         echo '<ul class="wpBlockList">' . "\n";
         wp_list_cats("hide_empty=0&sort_column={$sorting_key}&sorting_order={$sorting_order}&optioncount={$with_count}");
         echo '</ul>' . "\n";
         $block['content'] = ob_get_contents();
         ob_end_clean();
     } else {
         // Dropdown Listing
         $file = wp_siteurl() . '/index.php';
         $link = $file . '?cat=';
         ob_start();
         block_style_get($wp_num);
         echo '<form name="listcatform' . $wp_num . '" id="listcatform' . $wp_num . '" action="#">';
         $select_str = '<select name="cat" onchange="window.location = (document.forms.listcatform' . $wp_num . '.cat[document.forms.listcatform' . $wp_num . '.cat.selectedIndex].value);"> ';
         dropdown_cats(1, _WP_LIST_CAT_ALL, $sorting_key, $sorting_order, 0, $with_count, 0, false, 0, 0, true, 0, true, 0);
         echo '</form>';
         $block_str = ob_get_contents();
         ob_end_clean();
         $block['content'] = ereg_replace('\\<select name\\=[^\\>]*\\>', $select_str, $block_str);
     }
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:53,代码来源:wp_categories.php

示例5: _b_wp_categories_show

 function _b_wp_categories_show($options, $wp_num = "")
 {
     $block_style = $options[0] ? $options[0] : 0;
     $with_count = $options[1] ? $options[1] : 0;
     $sorting_key = $options[2] ? $options[2] : 'name';
     $sorting_order = $options[3] ? $options[3] : 'asc';
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'cat', 'string', '');
         init_param('GET', 'category_name', 'string', '');
         if (!empty($GLOBALS['category_name']) && empty($GLOBALS['cat'])) {
             if (stristr($GLOBALS['category_name'], '/')) {
                 $GLOBALS['category_name'] = explode('/', $GLOBALS['category_name']);
                 if ($GLOBALS['category_name'][count($GLOBALS['category_name']) - 1]) {
                     $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 1];
                     // no trailing slash
                 } else {
                     $GLOBALS['category_name'] = $GLOBALS['category_name'][count($GLOBALS['category_name']) - 2];
                     // there was a trailling slash
                 }
             }
             $categoryHandler =& wp_handler('Category');
             $categoryObject =& $categoryHandler->getByNiceName($GLOBALS['category_name']);
             if ($categoryObject) {
                 $GLOBALS['cat'] = $categoryObject->getVar('cat_ID');
             }
         }
     } else {
         $GLOBALS['cat'] = '';
     }
     $block['wp_num'] = $wp_num;
     $block['divid'] = 'wpCategory' . $wp_num;
     $block['siteurl'] = wp_siteurl();
     $block['style'] = block_style_get(false);
     $block['block_style'] = $block_style;
     $block['with_count'] = $with_count;
     if ($block_style == 0) {
         $cat_block = _b_wp_categories_list($sorting_key, $sorting_order, $with_count, 0, null, true);
     } else {
         $cat_block = _b_wp_categories_list($sorting_key, $sorting_order, $with_count, 0, null, false, '&#8211;', 0, $GLOBALS['cat']);
     }
     $block['records'] = $cat_block['records'];
     $_wpTpl =& new WordPresTpl('theme');
     $_wpTpl->assign('block', $block);
     $block['content'] = $_wpTpl->fetch('wp_categories.html');
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:49,代码来源:wp_categories.php

示例6: _b_wp_calendar_show

 function _b_wp_calendar_show($option, $wp_num = "")
 {
     if (current_wp()) {
         init_param('GET', 'm', 'integer', '');
         init_param('GET', 'w', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         init_param('GET', 'year', 'integer', '');
     }
     ob_start();
     block_style_get($wp_num);
     get_calendar(1);
     $block['content'] = ob_get_contents();
     ob_end_clean();
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:15,代码来源:wp_calendar.php

示例7: b_wp_archives_monthly_show

 function b_wp_archives_monthly_show($options, $wp_num = "")
 {
     $block_style = $options[0] ? $options[0] : 0;
     $with_count = $options[1] == 0 ? false : true;
     $id = 1;
     $GLOBALS['use_cache'] = 1;
     if ($wp_num == "") {
         $GLOBALS['wp_id'] = $wp_num;
         $GLOBALS['wp_inblock'] = 1;
         require dirname(__FILE__) . '/../wp-config.php';
         $GLOBALS['wp_inblock'] = 0;
     }
     $sel_value = '';
     if (current_wp()) {
         init_param('GET', 'm', 'string', '');
         init_param('GET', 'year', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         if (strlen(get_param('m')) == 6) {
             $sel_value = get_param('m');
         } else {
             if (test_param('year') && test_param('monthnum')) {
                 $sel_value = get_param('year') . zeroise(get_param('monthnum'), 2);
             }
         }
     }
     ob_start();
     block_style_get($wp_num);
     if ($block_style == 0) {
         // Simple Listing
         echo "<ul class='wpBlockList'>\n";
         get_archives('monthly', '', 'html', '', '', $with_count);
         echo "</ul>\n";
     } else {
         // Dropdown Listing
         echo '<form name="archiveform' . $wp_num . '" id="archiveform' . $wp_num . '" action="#">';
         echo '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform' . $wp_num . '.archive_chrono[document.forms.archiveform' . $wp_num . '.archive_chrono.selectedIndex].value);"> ';
         echo '<option value="">' . _WP_BY_MONTHLY . '</option>';
         get_archives('monthly', '', 'option', '', '', $with_count, $sel_value);
         echo '</select>';
         echo '</form>';
     }
     $block['content'] = ob_get_contents();
     ob_end_clean();
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:45,代码来源:wp_archives_monthly.php

示例8: _b_wp_calendar_show

 function _b_wp_calendar_show($option, $wp_num = "")
 {
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'm', 'integer', '');
         init_param('GET', 'w', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         init_param('GET', 'year', 'integer', '');
     }
     ob_start();
     block_style_get($wp_num);
     get_calendar(1);
     $block['content'] = ob_get_contents();
     ob_end_clean();
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:18,代码来源:wp_calendar.php

示例9: _b_wp_archives_monthly_show

 function _b_wp_archives_monthly_show($options, $wp_num = '')
 {
     $block_style = $options[0] ? $options[0] : 0;
     $with_count = $options[1] == 0 ? false : true;
     $sel_value = '';
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'm', 'string', '');
         init_param('GET', 'year', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         if (strlen(get_param('m')) == 6) {
             $sel_value = get_param('m');
         } else {
             if (test_param('year') && test_param('monthnum')) {
                 $sel_value = get_param('year') . zeroise(get_param('monthnum'), 2);
             }
         }
     }
     ob_start();
     block_style_get($wp_num);
     if ($block_style == 0) {
         // Simple Listing
         echo '<ul class="wpBlockList">' . "\n";
         get_archives('monthly', '', 'html', '', '', $with_count);
         echo '</ul>' . "\n";
     } else {
         // Dropdown Listing
         echo '<form name="archiveform' . $wp_num . '" id="archiveform' . $wp_num . '" action="#">';
         echo '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform' . $wp_num . '.archive_chrono[document.forms.archiveform' . $wp_num . '.archive_chrono.selectedIndex].value);"> ';
         echo '<option value="' . wp_siteurl() . '">' . _WP_BY_MONTHLY . '</option>';
         get_archives('monthly', '', 'option', '', '', $with_count, $sel_value);
         echo '</select>';
         echo '</form>';
     }
     $block['content'] = ob_get_contents();
     ob_end_clean();
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:40,代码来源:wp_archives_monthly.php

示例10: b_wp_calendar_show

 function b_wp_calendar_show($option, $wp_num = "")
 {
     $id = 1;
     $GLOBALS['use_cache'] = 1;
     if ($wp_num == "") {
         $GLOBALS['wp_id'] = $wp_num;
         $GLOBALS['wp_inblock'] = 1;
         require dirname(__FILE__) . '/../wp-config.php';
         $GLOBALS['wp_inblock'] = 0;
     }
     if (current_wp()) {
         init_param('GET', 'm', 'integer', '');
         init_param('GET', 'w', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         init_param('GET', 'year', 'integer', '');
     }
     ob_start();
     block_style_get($wp_num);
     get_calendar(1);
     $block['content'] = ob_get_contents();
     ob_end_clean();
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:23,代码来源:wp_calendar.php

示例11: _b_wp_calendar_show

 function _b_wp_calendar_show($option, $wp_num = "")
 {
     if (current_wp()) {
         if (!empty($_SERVER['PATH_INFO'])) {
             permlink_to_param();
         }
         init_param('GET', 'p', 'integer', '');
         init_param('GET', 'm', 'integer', '');
         init_param('GET', 'w', 'integer', '');
         init_param('GET', 'monthnum', 'integer', '');
         init_param('GET', 'year', 'integer', '');
         if (test_param('p') && !(test_param('m') || test_param('monthnum') || test_param('w'))) {
             $postHandler =& wp_handler('Post');
             $postObject =& $postHandler->get(get_param('p'));
             $GLOBALS['m'] = mysql2date('Ym', $postObject->getVar('post_date'));
         }
     }
     ob_start();
     block_style_get();
     get_calendar(1);
     $block['content'] = ob_get_contents();
     ob_end_clean();
     return $block;
 }
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:24,代码来源:wp_calendar.php

示例12: get_settings

$xmlrpc_filename = get_settings('xmlrpc_filename') ? get_settings('xmlrpc_filename') : 'xmlrpc.php';
$__file__ = str_replace('\\', '/', __FILE__);
if (wp_base() . '/' . $xmlrpc_filename != $__file__) {
    @header('HTTP/1.x 404 Not Found');
    echo "404 Not Found";
    exit;
}
include 'wp-config.php';
require_once wp_base() . '/wp-includes/class-xmlrpc.php';
require_once wp_base() . '/wp-includes/class-xmlrpcs.php';
require_once wp_base() . '/wp-includes/template-functions.php';
require_once wp_base() . '/wp-includes/functions.php';
require_once wp_base() . '/wp-includes/vars.php';
error_reporting(E_ERROR);
#Temporally fix for kousagi
init_param('GET', 'kousagi', 'integer', '');
$use_cache = 1;
$post_autobr = 0;
$post_default_title = '';
// posts submitted via the xmlrpc interface get that title
$GLOBALS['post_default_category'] = 1;
// posts submitted via the xmlrpc interface go into that category
function logIO($io, $msg)
{
    if ($GLOBALS['wp_debug']) {
        $fp = fopen('./log/xmlrpc.log', 'a+');
        $date = date('Y-m-d H:i:s ');
        $iot = $io == 'I' ? ' Input: ' : ' Output: ';
        fwrite($fp, "\n\n" . $date . $iot . $msg);
        fclose($fp);
    }
开发者ID:nobunobuta,项目名称:xoops_mod_WordPress,代码行数:31,代码来源:xmlrpc.php

示例13: init_param

         $link_category = $linkRecord->getVar('link_category');
         $category_options = $wpLinkCategoryHandler[$wp_prefix[$wp_id]]->getOptionArray();
         include 'include/link-manager-form.php';
     }
     include 'admin-footer.php';
     break;
 case _LANG_WLM_SHOW_BUTTONTEXT:
     init_param('POST', 'cat_id', 'string', 'All', true);
     init_param('POST', 'order_by', 'string', 'link_name', true);
     $_SESSION[$wp_prefix[$wp_id] . 'links_show_cat_id'] = intval($cat_id);
     $_SESSION[$wp_prefix[$wp_id] . 'links_show_order'] = $order_by;
     //break; fall through
 //break; fall through
 default:
     $links_show_cat_id = init_param('SESSION', $wp_prefix[$wp_id] . 'links_show_cat_id', 'integer', '');
     $links_show_order = init_param('SESSION', $wp_prefix[$wp_id] . 'links_show_order', 'string', '');
     if (!empty($links_show_cat_id)) {
         $cat_id = intval($links_show_cat_id);
     }
     if (empty($cat_id)) {
         if (empty($links_show_cat_id)) {
             $cat_id = 'All';
         }
     }
     if (!empty($links_show_order)) {
         $order_by = $links_show_order;
     }
     if (empty($order_by)) {
         $order_by = 'link_name';
     }
     $standalone = 0;
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:link-manager.php

示例14: init_param

<?php

require_once 'admin.php';
$GLOBALS['title'] = 'Edit Posts';
$GLOBALS['parent_file'] = 'edit.php';
$GLOBALS['standalone'] = 0;
require_once 'admin-header.php';
init_param('GET', 'showposts', 'integer', 10);
init_param('GET', 'posts_per_page', 'integer', get_param('showposts'));
init_param('GET', 'mode', 'string', '');
$ticket = $GLOBALS['xoopsWPTicket']->getTicketParamString('plugins');
include dirname(__FILE__) . "/../wp-blog-header.php";
if (test_param('poststart') && test_param('postend')) {
    $poststart = get_param('poststart');
    $postend = get_param('postend');
    $showposts = get_param('postend') - get_param('poststart') + 1;
} else {
    $showposts = get_param('showposts');
    if (!test_param('poststart')) {
        $poststart = 0;
    } else {
        $poststart = get_param('poststart');
    }
    if (!test_param('postend')) {
        $postend = $poststart + $showposts - 1;
    } else {
        $postend = get_param('postend');
    }
}
$nextXstart = $poststart + 1;
$nextXend = $nextXstart + $showposts - 1;
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:edit.php

示例15: init_param

<?php

require_once '../wp-config.php';
require_once 'auth.php';
require_once '../wp-includes/wpblfunctions.php';
$parent_file = 'wpblacklist.php';
init_param('', 'action', 'string', '');
init_param('POST', 'blfilename', 'string', 'http://www.kowa.org/pub/blacklist.txt');
init_param('POST', 'regextype', 'string', 'url');
init_param('POST', 'sregextype', 'string', '');
init_param('POST', 'domain', 'string', '');
init_param('POST', 'search', 'string', '');
init_param('POST', 'delete_regexs', 'array', '');
init_param('POST', 'options', 'array', array());
$tableblacklist = $xoopsDB->prefix("wp_blacklist");
$standalone = 0;
switch ($action) {
    case 'install':
        $title = 'Install WPBlacklist';
        require_once './admin-header.php';
        wp_refcheck("/wp-admin/plugins.php");
        if ($user_level < 10) {
            die("You have no right to edit the options for this blog.<br />Ask for a promotion from your <a href=\"mailto:" . get_settings('admin_email') . "\">blog admin</a> :)");
        }
        ?>
<p>Welcome to the WordPress Blacklist installer/updater utility. To get started, we just need one bit of information.</p>
<form method="post" action="wpblacklist.php?action=doinst">
  <p>You can use the installer even if you are upgrading - your existing data will be left intact. </p>
  <table>
    <tr>
      <th scope="row">Blacklist File</th>
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:wpblacklist.php


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