本文整理汇总了PHP中init_param函数的典型用法代码示例。如果您正苦于以下问题:PHP init_param函数的具体用法?PHP init_param怎么用?PHP init_param使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了init_param函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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'] = ' (' . $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, '–', 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
示例16: get_settings
$GLOBALS['title'] = 'IE Right Click Register';
require_once 'admin-header.php';
require_once XOOPS_ROOT_PATH . '/class/template.php';
$_regedit = "REGEDIT4\r\n[HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\MenuExt\\Post To &WP : " . get_settings('blogname') . "]\r\n@=\"" . wp_siteurl() . "/wp-admin/bookmarklet.jp.php\"\r\n\"contexts\"=hex:31\"";
$_wpTpl =& new WordPresTpl('wp-admin');
$_wpTpl->assign('regedit', $_regedit);
$_wpTpl->display('profile-IErightclick.html');
include 'admin-footer.php';
break;
default:
init_param('GET', 'standalone', 'integer', 0);
$GLOBALS['standalone'] = get_param('standalone');
$GLOBALS['title'] = 'Edit Profile';
include_once 'admin-header.php';
require_once XOOPS_ROOT_PATH . '/class/template.php';
init_param('GET', 'updated', 'string', '');
$userObject =& $userHandler->get($GLOBALS['user_ID']);
include XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
$_form = new XoopsThemeForm(_LANG_WPF_SUBT_EDIT, 'profile', $_this_file);
$_form->addElement(new XoopsFormLabel(_LANG_WPF_SUBT_USERID, $userObject->getVar('ID', 'e')));
$_form->addElement(new XoopsFormLabel(_LANG_WPF_SUBT_LEVEL, $userObject->getVar('user_level', 'e')));
$_form->addElement(new XoopsFormLabel(_LANG_WPF_SUBT_POSTS, $userObject->getNumPosts(wp_prefix())));
$_form->addElement(new XoopsFormLabel(_LANG_WPF_SUBT_LOGIN, $userObject->getVar('user_login', 'e')));
$_form->addElement(new XoopsFormText(_LANG_WPF_SUBT_FIRST, 'newuser_firstname', 50, 150, $userObject->getVar('user_firstname', 'e')));
$_form->addElement(new XoopsFormText(_LANG_WPF_SUBT_LAST, 'newuser_lastname', 50, 150, $userObject->getVar('user_lastname', 'e')));
$_form->addElement(new XoopsFormTextArea(_LANG_WPF_SUBT_DESC, 'user_description', $userObject->getVar('user_description', 'e'), 5, 60));
$_form->addElement(new XoopsFormText(_LANG_WPF_SUBT_NICK, 'newuser_nickname', 50, 150, $userObject->getVar('user_nickname', 'e')), true);
$_form->addElement(new XoopsFormText(_LANG_WPF_SUBT_MAIL, 'newuser_email', 50, 150, $userObject->getVar('user_email', 'e')), true);
$_form->addElement(new XoopsFormText(_LANG_WPF_SUBT_URL, 'newuser_url', 50, 150, $userObject->getVar('user_url', 'e')));
$_form->addElement(new XoopsFormText(_LANG_WPF_SUBT_ICQ, 'newuser_icq', 50, 150, $userObject->getVar('user_icq', 'e') ? $userObject->getVar('user_icq', 'e') : ''));
$_form->addElement(new XoopsFormText(_LANG_WPF_SUBT_AIM, 'newuser_aim', 50, 150, $userObject->getVar('user_aim', 'e')));
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:profile.php
示例17: header
}
}
}
header("Location: {$this_file}?ignored={$item_ignored}&deleted={$item_deleted}&approved={$item_approved}");
exit;
break;
default:
//Check User_Level
user_level_check();
$standalone = 0;
$title = 'Moderate comments';
require_once 'admin-header.php';
//Check Paramaters
init_param('GET', 'ignored', 'integer', 0);
init_param('GET', 'deleted', 'integer', 0);
init_param('GET', 'approved', 'integer', 0);
$criteria = new Criteria('comment_approved', '0 ');
// Trick for numeric chars only string compare
$commentObjects =& $commentHandler->getObjects($criteria);
$comment_rows = array();
foreach ($commentObjects as $commentObject) {
$row = $commentObject->getVarArray();
$comment = $commentObject->exportWpObject();
$postObject =& $postHandler->get($commentObject->getVar('comment_post_ID'));
if ($postObject) {
$row['post_title'] = $postObject->getVar('post_title');
}
$row['comment_date'] = mysql2date(get_settings("date_format") . " @ " . get_settings("time_format"), $commentObject->comment_date);
$row['post_title'] = $row['post_title'] == '' ? "# {$commentObject->getVar}('comment_post_ID')" : $row['post_title'];
$row['comment_author'] = comment_author(false);
$row['comment_author_email'] = comment_author_email_link('', '', '', false);
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:moderation.php
示例18: error_reporting
<?php
error_reporting(E_ERROR);
$GLOBALS['blog'] = 1;
$GLOBALS['doing_rss'] = 1;
$GLOBALS['wp_inblock'] = 0;
require "wp-config.php";
init_param('GET', 'feed', 'string', 'rss2');
init_param('GET', 'p', 'string', '');
init_param('GET', 'name', 'string', '');
init_param('GET', 'withcomments', 'integer', 0);
if (test_param('p') && $p != 'all' || test_param('name') || get_param('withcomments') == 1) {
require 'wp-commentsrss2.php';
} else {
switch (get_param('feed')) {
case 'atom':
require 'wp-atom.php';
break;
case 'rdf':
require 'wp-rdf.php';
break;
case 'rss':
require 'wp-rss.php';
break;
case 'rss2':
case 'feed':
require 'wp-rss2.php';
break;
}
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:30,代码来源:wp-feed.php
示例19: dirname
<?php
/* RDF 1.0 generator, original version by [email protected] */
$GLOBALS['blog'] = 1;
$GLOBALS['doing_rss'] = 1;
require_once dirname(__FILE__) . '/wp-config.php';
error_reporting(E_ERROR);
init_param('GET', 'num', 'integer');
if (test_param('num')) {
$GLOBALS['showposts'] = get_param('num');
}
require_once 'wp-blog-header.php';
add_filter('the_content', 'trim');
$_rss_charset = wp_get_rss_charset();
header('Content-type: application/xml');
echo '<?xml version="1.0" encoding="' . $_rss_charset . '"?' . '>';
?>
<!-- generator="wordpress/<?php
echo $GLOBALS['wp_version'];
?>
" -->
<rdf:RDF
xmlns="http://purl.org/rss/1.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
<channel rdf:about="<?php
bloginfo_rss('url');
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:wp-rdf.php
示例20: redirect_header
require_once 'admin.php';
$title = 'Add Link';
$this_file = 'link-add.php';
$parent_file = 'link-manager.php';
$xfn = true;
$standalone = 0;
require 'admin-header.php';
$myts =& MyTextSanitizer::getInstance();
if ($user_level < get_settings('links_minadminlevel')) {
redirect_header($siteurl . '/wp-admin/', 5, "You have no right to add the links for this blog.<br />Ask for a promotion to your <a href='mailto:" . get_settings('admin_email') . "'>blog admin</a>. :)");
exit;
}
init_param('GET', 'action', 'string', '');
$link_url = init_param('GET', 'linkurl', 'string', '');
$link_name = init_param('GET', 'name', 'string', '');
$link_name = fix_js_param($link_name);
$form_title = _LANG_WLA_LINK_TITLE;
$form_id = "addlink";
$link_url = $myts->makeTboxData4Edit($link_url);
$link_name = $myts->makeTboxData4Edit($link_name);
$link_rss = "";
$link_image = "";
$link_description = "";
$link_rel = "";
$friendship = "";
$physical = "";
$professional = "";
$geographical = "";
$family = "";
$romantic = "";
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:30,代码来源:link-add.php
注:本文中的init_param函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论