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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
 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;
 }
Example #12
0
$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);
    }
         $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;
<?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;
<?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>
     $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')));
             }
         }
     }
     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);
<?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;
    }
}
<?php

/* RDF 1.0 generator, original version by garym@teledyn.com */
$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');
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 = "";
<?php

require_once 'admin.php';
$title = 'Permalink Options';
$this_file = 'options-permalink.php';
$parent_file = 'options.php';
init_param('POST', 'submit', 'string', '');
if ($submit) {
    wp_refcheck("/wp-admin");
    init_param('POST', 'permalink_structure', 'string');
    update_option('permalink_structure', $permalink_structure);
} else {
    $permalink_structure = get_settings('permalink_structure');
    if ($user_level < 9) {
        redirect_header($siteurl . '/wp-admin/', 5, _LANG_PG_LEAST_LEVEL);
        exit;
    }
}
$standalone = 0;
include_once 'admin-header.php';
if ($submit) {
    ?>
<div class="updated"><p><?php 
    echo _LANG_WPL_EDIT_UPDATED;
    ?>
</p></div>
<?php 
}
?>
<div class="wrap"> 
  <h2><?php 
<?php

require dirname(__FILE__) . '/wp-config.php';
if (get_xoops_option(wp_mod(), 'wp_use_xoops_comments')) {
    return;
}
init_param('POST', 'author', 'string', '');
init_param('POST', 'email', 'string', '');
init_param('POST', 'url', 'string', '');
init_param('POST', 'comment', 'html', '');
init_param('POST', 'comment_post_ID', 'integer', '');
init_param('POST', 'redirect_to', 'string', '');
init_param('POST', 'action', 'string', '');
$_author = get_param('author');
$_email = get_param('email');
$_url = get_param('url');
$_comment = get_param('comment');
$_comment_post_ID = get_param('comment_post_ID');
$_redirect_to = get_param('redirect_to');
$_action = get_param('action');
if (!is_email($_email)) {
    $_email = '';
}
$_url_struct = parse_url($_url);
if (!$_url_struct) {
    $_url = '';
} elseif (!isset($_url_struct['scheme'])) {
    $_url = 'http://' . $_url;
} elseif (!preg_match('/^http[s]?$/', $_url_struct['scheme'])) {
    $_url = '';
}
<?php

require_once 'admin.php';
$title = 'Options';
$this_file = 'options.php';
$parent_file = 'options.php';
if (!get_magic_quotes_gpc()) {
    $_GET = add_magic_quotes($_GET);
    $_POST = add_magic_quotes($_POST);
    $_COOKIE = add_magic_quotes($_COOKIE);
}
init_param(array('POST', 'GET'), 'action', 'string', '');
init_param(array('POST', 'GET'), 'option_group_id', 'integer', '');
require_once "optionhandler.php";
$non_was_selected = 0;
if ($option_group_id == '') {
    $option_group_id = 1;
    $non_was_selected = 1;
} else {
    $option_group_id = intval($option_group_id);
}
$message = "";
switch (get_param('action')) {
    case "update":
        $standalone = 0;
        wp_refcheck("/wp-admin");
        $any_changed = 0;
        // iterate through the list of options in this group
        // pull the vars from the post
        // validate ranges etc.
        // update the values
    }
    $_POST['author'] = mb_convert_encoding($_POST['author'], $blog_charset, $_charset);
    $_POST['comment'] = mb_convert_encoding($_POST['comment'], $blog_charset, $_charset);
}
if (defined('XOOPS_URL')) {
    if (get_xoops_option(wp_mod(), 'wp_use_xoops_comments')) {
        return;
    }
    init_param('POST', 'author', 'string', '');
    init_param('POST', 'email', 'string', '');
    init_param('POST', 'url', 'string', '');
    init_param('POST', 'comment', 'html', '');
    init_param('POST', 'comment_post_ID', 'integer', '');
    init_param('POST', 'redirect_to', 'string', '');
    init_param('POST', 'action', 'string', '');
    init_param('POST', 'use_session', 'integer', '');
    $_author = get_param('author');
    $_email = get_param('email');
    $_url = get_param('url');
    $_comment = get_param('comment');
    $_comment_post_ID = get_param('comment_post_ID');
    $_redirect_to = get_param('redirect_to');
    $_action = get_param('action');
    $_use_session = get_param('use_session');
    if (!is_email($_email)) {
        $_email = '';
    }
    $_url_struct = parse_url($_url);
    if (!$_url_struct['path']) {
        $_url = '';
    } elseif (!isset($_url_struct['scheme'])) {
 init_param('POST', 'submit', 'string', '');
 if ($submit == _LANG_WLC_SAVEBUTTON_TEXT) {
     //Check Paramaters
     init_param('POST', 'cat_id', 'integer', NO_DEFAULT_PARAM, true);
     init_param('POST', 'cat_name', 'string', NO_DEFAULT_PARAM, true);
     init_param('POST', 'auto_toggle', 'string-yn');
     init_param('POST', 'show_images', 'string-yn');
     init_param('POST', 'show_description', 'string-yn');
     init_param('POST', 'show_rating', 'string-yn');
     init_param('POST', 'show_updated', 'string-yn');
     init_param('POST', 'sort_order', 'string', '', true);
     init_param('POST', 'sort_desc', 'string-yn');
     init_param('POST', 'text_before_link', 'html', '', true);
     init_param('POST', 'text_after_link', 'html', '', true);
     init_param('POST', 'text_after_all', 'html', '', true);
     init_param('POST', 'list_limit', 'integer', -1, true);
     $linkCategory =& $linkCategoryHandler->create(false);
     $linkCategory->setVar('cat_id', $cat_id, true);
     $linkCategory->setVar('cat_name', $cat_name, true);
     $linkCategory->setVar('auto_toggle', $auto_toggle, true);
     $linkCategory->setVar('show_images', $show_images, true);
     $linkCategory->setVar('show_description', $show_description, true);
     $linkCategory->setVar('show_rating', $show_rating, true);
     $linkCategory->setVar('show_updated', $show_updated, true);
     $linkCategory->setVar('sort_order', $sort_order, true);
     $linkCategory->setVar('sort_desc', $sort_desc, true);
     $linkCategory->setVar('text_before_link', $text_before_link, true);
     $linkCategory->setVar('text_after_link', $text_after_link, true);
     $linkCategory->setVar('text_after_all', $text_after_all, true);
     $linkCategory->setVar('list_limit', $list_limit, true);
     if (!$linkCategoryHandler->insert($linkCategory)) {
<?php

require_once 'admin.php';
$parent_file = 'edit.php';
$this_file = 'edit-comments.php';
user_level_check();
$standalone = 0;
$title = 'Edit Comments';
require_once 'admin-header.php';
init_param('GET', 'showcomments', 'integer', 10);
init_param('GET', 'commentstart', 'integer', 1);
init_param('GET', 'commentend', 'integer', 0);
init_param('GET', 'commentorder', 'string', 'DESC');
$commentstart = get_param('commentstart');
$commentorder = get_param('commentorder');
if (test_param('commentend')) {
    $commentend = get_param('commentend');
    $showcomments = $commentend - $commentstart + 1;
} else {
    $showcomments = get_param('showcomments');
    $commentend = $commentstart + $showcomments - 1;
}
$nextXstart = $commentend + 1;
$nextXend = $nextXstart + $showcomments - 1;
$previousXstart = $commentstart - $showcomments;
$previousXend = $commentend - $showcomments;
if ($previousXstart < 1) {
    $previousXstart = 0;
    $previousXend = 0;
}
$selorder_desc = selected($commentorder, "DESC", false);
         $link_category = $linkRecord->getVar('link_category');
         $category_options = $linkCategoryHandler->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() . 'links_show_cat_id'] = intval($cat_id);
     $_SESSION[wp_prefix() . 'links_show_order'] = $order_by;
     //break; fall through
 //break; fall through
 default:
     $links_show_cat_id = init_param('SESSION', wp_prefix() . 'links_show_cat_id', 'integer', '');
     $links_show_order = init_param('SESSION', wp_prefix() . '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;
<?php

$GLOBALS['show_rblock'] = 0;
$GLOBALS['show_cblock'] = 0;
init_param('GET', 'profile', 'integer', 0);
init_param('GET', 'redirect', 'integer', 0);
if ($GLOBALS['standalone'] == 0 && get_param('profile') == 0) {
    $_wp_id_keep = $GLOBALS['wp_id'];
    include_once dirname(__FILE__) . "/../../../mainfile.php";
    include XOOPS_ROOT_PATH . '/header.php';
    $GLOBALS['wp_id'] = $_wp_id_keep;
    $GLOBALS['wp_inblock'] = 1;
    require '../wp-config.php';
    $GLOBALS['wp_inblock'] = 0;
}
require_once ABSPATH . 'wp-admin/admin-functions.php';
require_once 'auth.php';
if (get_xoops_option(wp_mod(), 'wp_use_spaw') == 1) {
    $GLOBALS['wp_use_spaw'] = true;
} else {
    $GLOBALS['wp_use_spaw'] = false;
}
if (get_xoops_option(wp_mod(), 'wp_use_spaw') == 2) {
    $GLOBALS['wp_use_koivi'] = true;
} else {
    $GLOBALS['wp_use_koivi'] = false;
}
if (!isset($use_cache)) {
    $GLOBALS['use_cache'] = 1;
}
if (!isset($blogID)) {
<?php

require_once 'admin.php';
$mode = 'sidebar';
$standalone = 1;
$title = "";
require_once 'admin-header.php';
if ($user_level <= 0) {
    redirect_header(wp_siteurl() . '/wp-admin/', 5, _LANG_P_CHEATING_ERROR);
}
init_param('GET', 'action', 'string', '');
require_once XOOPS_ROOT_PATH . '/class/template.php';
$wpTpl =& new XoopsTpl();
$wpTpl->error_reporting = error_reporting();
$wpTpl->assign('action', $action);
$wpTpl->assign('admin_area_charset', $admin_area_charset);
if ($action != 'done') {
    $category_select = categories_nested_select(array(get_settings('default_post_category')));
    $ticket = $xoopsWPTicket->getTicketHtml(__LINE__, 10800);
    $wpTpl->assign('user_ID', $user_ID);
    $wpTpl->assign('category_select', $category_select);
    $wpTpl->assign('ticket', $ticket);
}
$wpTpl->template_dir = wp_base() . '/wp-admin/templates/';
$wpTpl->display('sidebar.html');
require_once 'admin-footer.php';
     if (!$commentHandler->insert($commentObject, false, true)) {
         redirect_header($location, 3, $commentHandler->getErrors());
     }
     header('Location: ' . $referredby);
     do_action('edit_comment', $comment_ID);
     exit;
     break;
 default:
     $title = 'Create New Post';
     $standalone = 0;
     require_once './admin-header.php';
     if ($user_level > 0) {
         $action = 'post';
         init_param('GET', 'content', 'html', '');
         init_param('GET', 'edited_post_title', 'string', '');
         init_param('GET', 'excerpt', 'html', '');
         draft_list($user_ID);
         //set defaults
         $post_status = get_settings('default_post_status');
         $comment_status = get_settings('default_comment_status');
         $ping_status = get_settings('default_ping_status');
         $post_pingback = get_settings('default_pingback_flag');
         $default_post_cat = get_settings('default_post_category');
         $content = apply_filters('default_content', get_param('content'));
         $edited_post_title = apply_filters('default_title', get_param('edited_post_title'));
         $excerpt = apply_filters('default_excerpt', get_param('excerpt'));
         $trackback_url = '';
         $pinged = '';
         $mode = '';
         $form_prevstatus = '';
         $target_charset = '';