sg = $sitemapBuilder; if(floatval($wp_version) >= 2.7) { $this->mode = 27; } } function HtmlPrintBoxHeader($id, $title, $right = false) { if($this->mode == 27) { ?>

mode == 27) { ?>
sg->Initate(); //All output should go in this var which get printed at the end $message=""; if(isset($_GET['sm_hidedonate'])) { $this->sg->SetOption('i_hide_donated',true); $this->sg->SaveOptions(); } if(isset($_GET['sm_donated'])) { $this->sg->SetOption('i_donated',true); $this->sg->SaveOptions(); } if(isset($_GET['sm_hide_note'])) { $this->sg->SetOption('i_hide_note',true); $this->sg->SaveOptions(); } if(isset($_GET['sm_hidedonors'])) { $this->sg->SetOption('i_hide_donors',true); $this->sg->SaveOptions(); } if(isset($_GET['sm_donated']) || ($this->sg->GetOption('i_donated')===true && $this->sg->GetOption('i_hide_donated')!==true)) { ?>

">

sg->GetOption('i_donated') !== true && $this->sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_note')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*30))) { ?>

sg->GetRedirectLink("sitemap-donate-note"),__('Thanks for using this plugin! You\'ve installed this plugin over a month ago. If it works and your are satisfied with the results, isn\'t it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!','sitemap')); ?> " style="float:right; display:block; border:none;">

Please log in as admin

'; return; } $oldErr = error_reporting(E_ALL); $oldIni = ini_set("display_errors",1); echo '
'; echo '

' . __('XML Sitemap Generator for WordPress', 'sitemap') . " " . $this->sg->GetVersion(). '

'; echo '

This is the debug mode of the XML Sitemap Generator. It will show all PHP notices and warnings as well as the internal logs, messages and configuration.

'; echo '

DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!

'; echo "

WordPress and PHP Information

"; echo '

WordPress ' . $GLOBALS['wp_version'] . ' with ' . ' DB ' . $GLOBALS['wp_db_version'] . ' on PHP ' . phpversion() . '

'; echo '

Plugin version: ' . $this->sg->GetVersion() . ' (' . $this->sg->_svnVersion . ')'; echo '

Environment

'; echo "
";
				$sc = $_SERVER;
				unset($sc["HTTP_COOKIE"]);
				print_r($sc);
				echo "
"; echo "

WordPress Config

"; echo "
";
				$opts = array();
				if(function_exists('wp_load_alloptions')) {
					$opts = wp_load_alloptions();
				} else {
					global $wpdb;
					$os = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options");
					foreach ( (array) $os as $o ) $opts[$o->option_name] = $o->option_value;
				}
				
				$popts = array();
				foreach($opts as $k=>$v) {
					//Try to filter out passwords etc...
					if(preg_match("/(pass|login|pw|secret|user|usr)/si",$v)) continue;
					$popts[$k] = htmlspecialchars($v);
				}
				print_r($popts);
				echo "
"; echo '

Sitemap Config

'; echo "
";
				print_r($this->sg->_options);
				echo "
"; echo '

Errors, Warnings, Notices

'; echo '
'; $status = $this->sg->BuildSitemap(); echo '
'; echo '

MySQL Queries

'; if(defined('SAVEQUERIES') && SAVEQUERIES) { echo '
';
					var_dump($GLOBALS['wpdb']->queries);
					echo '
'; $total = 0; foreach($GLOBALS['wpdb']->queries as $q) { $total+=$q[1]; } echo '

Total Query Time

'; echo '
' . count($GLOBALS['wpdb']->queries) . ' queries in ' . round($total,2) . ' seconds.
'; } else { echo '

Please edit wp-db.inc.php in wp-includes and set SAVEQUERIES to true if you want to see the queries.

'; } echo "

Build Process Results

"; echo "
";
				print_r($status);
				echo "
"; echo '

Done. Rebuild or Return

'; echo '

DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!

'; echo '
'; @error_reporting($oldErr); @ini_set("display_errors",$oldIni); return; } else { $this->sg->BuildSitemap(); $redirURL = $this->sg->GetBackLink() . '&sm_fromrb=true'; //Redirect so the sm_rebuild GET parameter no longer exists. @header("location: " . $redirURL); //If there was already any other output, the header redirect will fail echo ''; echo ''; exit; } } else if (!empty($_POST['sm_update'])) { //Pressed Button: Update Config check_admin_referer('sitemap'); if(isset($_POST['sm_b_style']) && $_POST['sm_b_style'] == $this->sg->getDefaultStyle()) { $_POST['sm_b_style_default'] = true; $_POST['sm_b_style'] = ''; } foreach($this->sg->_options as $k=>$v) { //Check vor values and convert them into their types, based on the category they are in if(!isset($_POST[$k])) $_POST[$k]=""; // Empty string will get false on 2bool and 0 on 2float //Options of the category "Basic Settings" are boolean, except the filename and the autoprio provider if(substr($k,0,5)=="sm_b_") { if($k=="sm_b_filename" || $k=="sm_b_fileurl_manual" || $k=="sm_b_filename_manual" || $k=="sm_b_prio_provider" || $k=="sm_b_manual_key" || $k == "sm_b_yahookey" || $k == "sm_b_style" || $k == "sm_b_memory") { if($k=="sm_b_filename_manual" && strpos($_POST[$k],"\\")!==false){ $_POST[$k]=stripslashes($_POST[$k]); } $this->sg->_options[$k]=(string) $_POST[$k]; } else if($k=="sm_b_location_mode") { $tmp=(string) $_POST[$k]; $tmp=strtolower($tmp); if($tmp=="auto" || $tmp="manual") $this->sg->_options[$k]=$tmp; else $this->sg->_options[$k]="auto"; } else if($k == "sm_b_time" || $k=="sm_b_max_posts") { if($_POST[$k]=='') $_POST[$k] = -1; $this->sg->_options[$k] = intval($_POST[$k]); } else if($k== "sm_i_install_date") { if($this->sg->GetOption('i_install_date')<=0) $this->sg->_options[$k] = time(); } else if($k=="sm_b_exclude") { $IDss = array(); $IDs = explode(",",$_POST[$k]); for($x = 0; $x0) $IDss[] = $ID; } $this->sg->_options[$k] = $IDss; } else if($k == "sm_b_exclude_cats") { $exCats = array(); if(isset($_POST["post_category"])) { foreach((array) $_POST["post_category"] AS $vv) if(!empty($vv) && is_numeric($vv)) $exCats[] = intval($vv); } $this->sg->_options[$k] = $exCats; } else { $this->sg->_options[$k]=(bool) $_POST[$k]; } //Options of the category "Includes" are boolean } else if(substr($k,0,6)=="sm_in_") { $this->sg->_options[$k]=(bool) $_POST[$k]; //Options of the category "Change frequencies" are string } else if(substr($k,0,6)=="sm_cf_") { $this->sg->_options[$k]=(string) $_POST[$k]; //Options of the category "Priorities" are float } else if(substr($k,0,6)=="sm_pr_") { $this->sg->_options[$k]=(float) $_POST[$k]; } } //No Mysql unbuffered query for WP < 2.2 if(floatval($wp_version) < 2.2) { $this->sg->SetOption('b_safemode',true); } //No Wp-Cron for WP < 2.1 if(floatval($wp_version) < 2.1) { $this->sg->SetOption('b_auto_delay',false); } //Apply page changes from POST $this->sg->_pages=$this->sg->HtmlApplyPages(); if($this->sg->SaveOptions()) $message.=__('Configuration updated', 'sitemap') . "
"; else $message.=__('Error while saving options', 'sitemap') . "
"; if($this->sg->SavePages()) $message.=__("Pages saved",'sitemap') . "
"; else $message.=__('Error while saving pages', 'sitemap'). "
"; } else if(!empty($_POST["sm_reset_config"])) { //Pressed Button: Reset Config check_admin_referer('sitemap'); $this->sg->InitOptions(); $this->sg->SaveOptions(); $message.=__('The default configuration was restored.','sitemap'); } //Print out the message to the user, if any if($message!="") { ?>

mode == 27): ?> =")): ?>

sg->GetVersion() ?>

response[$file])) { $r = $current->response[$file]; ?>
Download version %3$s here.','default'), $plugin_data['Name'], $r->url, $r->new_version); else if ( empty($r->package) ) printf( __('There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin.','default'), $plugin_data['Name'], $r->url, $r->new_version); else printf( __('There is a new version of %1$s available. Download version %3$s here or upgrade automatically.','default'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url("update.php?action=upgrade-plugin&plugin=$file", 'upgrade-plugin_' . $file) ); ?>
mode == 27): ?>
HtmlPrintBoxHeader('sm_pnres',__('About this Plugin:','sitemap'),true); ?> HtmlPrintBoxFooter(true); ?> HtmlPrintBoxHeader('sm_smres',__('Sitemap Resources:','sitemap'),true); ?>
HtmlPrintBoxFooter(true); ?> HtmlPrintBoxHeader('dm_donations',__('Recent Donations:','sitemap'),true); ?> sg->GetOption('i_hide_donors')!==true) { ?>
">

PayPal
HtmlPrintBoxFooter(true); ?>
mode == 27): ?>
GetStartTime(); $head=str_replace("%date%",date(get_option('date_format'),$st) . " " . date(get_option('time_format'),$st),__("Result of the last build process, started on %date%.",'sitemap')); } $this->HtmlPrintBoxHeader('sm_rebuild',$head); ?>
    " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&noheader=true",'sitemap'),__('The sitemap wasn\'t built yet. Click here to build it the first time.','sitemap')) . ""; } else { if($status->_endTime !== 0) { if($status->_usedXml) { if($status->_xmlSuccess) { $ft = is_readable($status->_xmlPath)?filemtime($status->_xmlPath):false; if($ft!==false) echo "
  • " . str_replace("%url%",$status->_xmlUrl,str_replace("%date%",date(get_option('date_format'),$ft) . " " . date(get_option('time_format'),$ft),__("Your sitemap was last built on %date%.",'sitemap'))) . "
  • "; else echo "
  • " . __("The last build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?",'sitemap') . "
  • "; } else { echo "
  • " . str_replace("%url%",$this->sg->GetRedirectLink('sitemap-help-files'),__("There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more",'sitemap')) . "
  • "; } } if($status->_usedZip) { if($status->_zipSuccess) { $ft = is_readable($status->_zipPath)?filemtime($status->_zipPath):false; if($ft !== false) echo "
  • " . str_replace("%url%",$status->_zipUrl,str_replace("%date%",date(get_option('date_format'),$ft) . " " . date(get_option('time_format'),$ft),__("Your sitemap (zipped) was last built on %date%.",'sitemap'))) . "
  • "; else echo "
  • " . __("The last zipped build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?",'sitemap') . "
  • "; } else { echo "
  • " . str_replace("%url%",$this->sg->GetRedirectLink('sitemap-help-files'),__("There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more",'sitemap')) . "
  • "; } } if($status->_usedGoogle) { if($status->_gooogleSuccess) { echo "
  • " .__("Google was successfully notified about changes.",'sitemap'). "
  • "; $gt = $status->GetGoogleTime(); if($gt>4) { echo "
  • " . str_replace("%time%",$gt,__("It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
  • "; } } else { echo "
  • " . str_replace("%s",$status->_googleUrl,__('There was a problem while notifying Google. View result','sitemap')) . "
  • "; } } if($status->_usedYahoo) { if($status->_yahooSuccess) { echo "
  • " .__("YAHOO was successfully notified about changes.",'sitemap'). "
  • "; $yt = $status->GetYahooTime(); if($yt>4) { echo "
  • " . str_replace("%time%",$yt,__("It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
  • "; } } else { echo "
  • " . str_replace("%s",$status->_yahooUrl,__('There was a problem while notifying YAHOO. View result','sitemap')) . "
  • "; } } if($status->_usedMsn) { if($status->_msnSuccess) { echo "
  • " .__("Bing was successfully notified about changes.",'sitemap'). "
  • "; $at = $status->GetMsnTime(); if($at>4) { echo "
  • " . str_replace("%time%",$at,__("It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
  • "; } } else { echo "
  • " . str_replace("%s",$status->_msnUrl,__('There was a problem while notifying Bing. View result','sitemap')) . "
  • "; } } if($status->_usedAsk) { if($status->_askSuccess) { echo "
  • " .__("Ask.com was successfully notified about changes.",'sitemap'). "
  • "; $at = $status->GetAskTime(); if($at>4) { echo "
  • " . str_replace("%time%",$at,__("It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
  • "; } } else { echo "
  • " . str_replace("%s",$status->_askUrl,__('There was a problem while notifying Ask.com. View result','sitemap')) . "
  • "; } } $et = $status->GetTime(); $mem = $status->GetMemoryUsage(); if($mem > 0) { echo "
  • " .str_replace(array("%time%","%memory%"),array($et,$mem),__("The building process took about %time% seconds to complete and used %memory% MB of memory.",'sitemap')). "
  • "; } else { echo "
  • " .str_replace("%time%",$et,__("The building process took about %time% seconds to complete.",'sitemap')). "
  • "; } if(!$status->_hasChanged) { echo "
  • " . __("The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged.",'sitemap'). "
  • "; } } else { if($this->sg->GetOption("b_auto_delay")) { $st = ($status->GetStartTime() - time()) * -1; //If the building process runs in background and was started within the last 45 seconds, the sitemap might not be completed yet... if($st < 45) { echo '
  • '. __("The building process might still be active! Reload the page in a few seconds and check if something has changed.",'sitemap') . '
  • '; } } echo '
  • '. str_replace("%url%",$this->sg->GetRedirectLink('sitemap-help-memtime'),__("The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more",'sitemap')) . '
  • '; if($status->_memoryUsage > 0) { echo '
  • '. str_replace(array("%memused%","%memlimit%"),array($status->GetMemoryUsage(),ini_get('memory_limit')),__("The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%.",'sitemap')) . '
  • '; } if($status->_lastTime > 0) { echo '
  • '. str_replace(array("%timeused%","%timelimit%"),array($status->GetLastTime(),ini_get('max_execution_time')),__("The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds.",'sitemap')) . '
  • '; } if($status->GetLastPost() > 0) { echo '
  • '. str_replace("%lastpost%",$status->GetLastPost(),__("The script stopped around post number %lastpost% (+/- 100)",'sitemap')) . '
  • '; } } echo "
  • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&noheader=true",'sitemap'),__('If you changed something on your server or blog, you should rebuild the sitemap manually.','sitemap')) . "
  • "; } echo "
  • " . str_replace("%d",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&sm_do_debug=true",'sitemap'),__('If you encounter any problems with the build process you can use the debug function to get more information.','sitemap')) . "
  • "; ?>
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_basic_options',__('Basic Options', 'sitemap')); ?>
  • [?]
  • sg->GetOption("b_ping")==true?"checked=\"checked\"":"") ?> />
    sg->GetRedirectLink('sitemap-gwt'),__('No registration required, but you can join the Google Webmaster Tools to check crawling statistics.','sitemap')); ?>
  • sg->GetOption("b_pingmsn")==true?"checked=\"checked\"":"") ?> />
    sg->GetRedirectLink('sitemap-lwt'),__('No registration required, but you can join the Bing Webmaster Tools to check crawling statistics.','sitemap')); ?>
  • sg->GetOption("b_pingask")==true?"checked=\"checked\"":"") ?> />
  • sg->GetOption("b_pingyahoo")==true?"checked=\"checked\"":"") ?> />

    sg->GetRedirectLink('sitemap-ykr'),' (Web Services by Yahoo!)'),__('Don\'t you have such a key? Request one here! %s2','sitemap')); ?>

  • ()
  • ()
  • ()
  • sg->GetDefaultStyle() && $this->sg->GetOption('b_style_default')===true); ?> () sg->GetDefaultStyle()): ?>
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_pages',__('Additional pages', 'sitemap')); ?> For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com','sitemap'); echo "
  • "; echo "" . __('Note','sitemap'). ": "; _e("If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!",'sitemap'); echo "
  • "; echo "" . __('URL to the page','sitemap'). ": "; _e("Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home ",'sitemap'); echo "
  • "; echo "" . __('Priority','sitemap') . ": "; _e("Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint.",'sitemap'); echo "
  • "; echo "" . __('Last Changed','sitemap'). ": "; _e("Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional).",'sitemap'); echo "
"; ?> sg->_pages)<=0) { ?>
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_postprio',__('Post Priority', 'sitemap')); ?>

  • sg->HtmlGetChecked($this->sg->GetOption("b_prio_provider"),"") ?> />

  • sg->_prioProviders); $i++) { echo "
  • sg->_prioProviders[$i] . "\" " . $this->sg->HtmlGetChecked($this->sg->GetOption("b_prio_provider"),$this->sg->_prioProviders[$i]) . " />
    " . call_user_func(array(&$this->sg->_prioProviders[$i], 'getDescription')) . "

  • "; } ?>
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_location',__('Location of your sitemap file', 'sitemap')); ?>
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_includes',__('Sitemap Content', 'sitemap')); ?>
  • sg->IsTaxonomySupported()): ?>
:

  • all sitemap entries.', 'sitemap') ?>
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_excludes',__('Excluded items', 'sitemap')); ?> : =")): ?> :
    sg->GetOption("b_exclude_cats"),false); ?>
:

:
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_change_frequencies',__('Change frequencies', 'sitemap')); ?>

:

  • sg->IsTaxonomySupported()): ?>
HtmlPrintBoxFooter(); ?> HtmlPrintBoxHeader('sm_priorities',__('Priorities', 'sitemap')); ?>
  • sg->IsTaxonomySupported()): ?>
HtmlPrintBoxFooter(); ?>

mode == 27): ?>
array("cc"=>"USD","lc"=>"US"), "en-GB"=>array("cc"=>"GBP","lc"=>"GB"), "de"=>array("cc"=>"EUR","lc"=>"DE"), ); $myLc = $lc["en"]; $wpl = get_bloginfo('language'); if(!empty($wpl)) { if(array_key_exists($wpl,$lc)) $myLc = $lc[$wpl]; else { $wpl = substr($wpl,0,2); if(array_key_exists($wpl,$lc)) $myLc = $lc[$wpl]; } } ?> " /> " /> " /> "/>