web/wp-content/plugins/google-sitemap-generator/sitemap-ui.php
branchwordpress
changeset 109 03b0d1493584
child 194 32102edaa81b
equal deleted inserted replaced
-1:000000000000 109:03b0d1493584
       
     1 <?php
       
     2 /*
       
     3  
       
     4  $Id: sitemap-ui.php 175669 2009-11-20 21:55:02Z arnee $
       
     5 
       
     6 */
       
     7 
       
     8 class GoogleSitemapGeneratorUI {
       
     9 
       
    10 	/**
       
    11 	 * The Sitemap Generator Object
       
    12 	 *
       
    13 	 * @var GoogleSitemapGenerator
       
    14 	 */
       
    15 	var $sg = null;
       
    16 	
       
    17 	var $mode = 21;
       
    18 
       
    19 	function GoogleSitemapGeneratorUI($sitemapBuilder) {
       
    20 		global $wp_version;
       
    21 		$this->sg = $sitemapBuilder;
       
    22 		
       
    23 		if(floatval($wp_version) >= 2.7) {
       
    24 			$this->mode = 27;
       
    25 		}
       
    26 	}
       
    27 	
       
    28 	function HtmlPrintBoxHeader($id, $title, $right = false) {
       
    29 		if($this->mode == 27) {
       
    30 			?>
       
    31 			<div id="<?php echo $id; ?>" class="postbox">
       
    32 				<h3 class="hndle"><span><?php echo $title ?></span></h3>
       
    33 				<div class="inside">
       
    34 			<?php
       
    35 		} else {
       
    36 			?>
       
    37 			<fieldset id="<?php echo $id; ?>" class="dbx-box">
       
    38 				<?php if(!$right): ?><div class="dbx-h-andle-wrapper"><?php endif; ?>
       
    39 				<h3 class="dbx-handle"><?php echo $title ?></h3>
       
    40 				<?php if(!$right): ?></div><?php endif; ?>
       
    41 				
       
    42 				<?php if(!$right): ?><div class="dbx-c-ontent-wrapper"><?php endif; ?>
       
    43 					<div class="dbx-content">
       
    44 			<?php
       
    45 		}
       
    46 	}
       
    47 	
       
    48 	function HtmlPrintBoxFooter( $right = false) {
       
    49 			if($this->mode == 27) {
       
    50 			?>
       
    51 				</div>
       
    52 			</div>
       
    53 			<?php
       
    54 		} else {
       
    55 			?>
       
    56 					<?php if(!$right): ?></div><?php endif; ?>
       
    57 				</div>
       
    58 			</fieldset>
       
    59 			<?php
       
    60 		}
       
    61 	}
       
    62 	
       
    63 	/**
       
    64 	 * Displays the option page
       
    65 	 *
       
    66 	 * @since 3.0
       
    67 	 * @access public
       
    68 	 * @author Arne Brachhold
       
    69 	 */
       
    70 	function HtmlShowOptionsPage() {
       
    71 		global $wp_version;
       
    72 		
       
    73 		$snl = false; //SNL
       
    74 		
       
    75 		$this->sg->Initate();
       
    76 			
       
    77 		//All output should go in this var which get printed at the end
       
    78 		$message="";
       
    79 		
       
    80 		if(!$snl) {
       
    81 		
       
    82 			if(isset($_GET['sm_hidedonate'])) {
       
    83 				$this->sg->SetOption('i_hide_donated',true);
       
    84 				$this->sg->SaveOptions();
       
    85 			}
       
    86 			if(isset($_GET['sm_donated'])) {
       
    87 				$this->sg->SetOption('i_donated',true);
       
    88 				$this->sg->SaveOptions();
       
    89 			}
       
    90 			if(isset($_GET['sm_hide_note'])) {
       
    91 				$this->sg->SetOption('i_hide_note',true);
       
    92 				$this->sg->SaveOptions();
       
    93 			}
       
    94 			if(isset($_GET['sm_hidedonors'])) {
       
    95 				$this->sg->SetOption('i_hide_donors',true);
       
    96 				$this->sg->SaveOptions();
       
    97 			}
       
    98 			if(isset($_GET['sm_hide_works'])) {
       
    99 				$this->sg->SetOption('i_hide_works',true);
       
   100 				$this->sg->SaveOptions();
       
   101 			}
       
   102 			
       
   103 			
       
   104 			if(isset($_GET['sm_donated']) || ($this->sg->GetOption('i_donated')===true && $this->sg->GetOption('i_hide_donated')!==true)) {
       
   105 				?>
       
   106 				<div class="updated">
       
   107 					<strong><p><?php _e('Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!','sitemap'); ?> <a href="<?php echo $this->sg->GetBackLink() . "&amp;sm_hidedonate=true"; ?>"><small style="font-weight:normal;"><?php _e('Hide this notice', 'sitemap'); ?></small></a></p></strong>
       
   108 				</div>
       
   109 				<?php
       
   110 			} else if($this->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))) {
       
   111 				?>
       
   112 				<div class="updated">
       
   113 					<strong><p><?php echo str_replace("%s",$this->sg->GetRedirectLink("sitemap-donate-note"),__('Thanks for using this plugin! You\'ve installed this plugin over a month ago. If it works and you are satisfied with the results, isn\'t it worth at least a few dollar? <a href="%s">Donations</a> help me to continue support and development of this <i>free</i> software! <a href="%s">Sure, no problem!</a>','sitemap')); ?> <a href="<?php echo $this->sg->GetBackLink() . "&amp;sm_donated=true"; ?>" style="float:right; display:block; border:none; margin-left:10px;"><small style="font-weight:normal; "><?php _e('Sure, but I already did!', 'sitemap'); ?></small></a> <a href="<?php echo $this->sg->GetBackLink() . "&amp;sm_hide_note=true"; ?>" style="float:right; display:block; border:none;"><small style="font-weight:normal; "><?php _e('No thanks, please don\'t bug me anymore!', 'sitemap'); ?></small></a></p></strong>
       
   114 					<div style="clear:right;"></div>
       
   115 				</div>
       
   116 				<?php
       
   117 			} else if($this->sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_works')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*15))) {
       
   118 				?>
       
   119 				<div class="updated">
       
   120 					<strong><p><?php echo str_replace("%s",$this->sg->GetRedirectLink("sitemap-works-note"),__('Thanks for using this plugin! You\'ve installed this plugin some time ago. If it works and your are satisfied, why not <a href="%s">rate it</a> and <a href="%s">recommend it</a> to others? :-)','sitemap')); ?> <a href="<?php echo $this->sg->GetBackLink() . "&amp;sm_hide_works=true"; ?>" style="float:right; display:block; border:none;"><small style="font-weight:normal; "><?php _e('Don\'t show this anymore', 'sitemap'); ?></small></a></p></strong>
       
   121 					<div style="clear:right;"></div>
       
   122 				</div>
       
   123 				<?php
       
   124 			}
       
   125 		}
       
   126 		
       
   127 		if(function_exists("wp_next_scheduled")) {
       
   128 			$next = wp_next_scheduled('sm_build_cron');
       
   129 			if($next) {
       
   130 				$diff = (time()-$next)*-1;
       
   131 				if($diff <= 0) {
       
   132 					$diffMsg = __('Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!','sitemap');
       
   133 				} else {
       
   134 					$diffMsg = str_replace("%s",$diff,__('Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!','sitemap'));
       
   135 				}
       
   136 				?>
       
   137 				<div class="updated">
       
   138 					<strong><p><?php echo $diffMsg ?></p></strong>
       
   139 					<div style="clear:right;"></div>
       
   140 				</div>
       
   141 				<?php
       
   142 			}
       
   143 		}
       
   144 		if(!empty($_REQUEST["sm_rebuild"]) || !empty($_REQUEST["sm_rebuild"])) {
       
   145 			//Clear any outstanding build cron jobs
       
   146 			if(function_exists('wp_clear_scheduled_hook')) wp_clear_scheduled_hook('sm_build_cron');
       
   147 		}
       
   148 		
       
   149 		if(!empty($_REQUEST["sm_rebuild"])) { //Pressed Button: Rebuild Sitemap
       
   150 			check_admin_referer('sitemap');
       
   151 			if(isset($_GET["sm_do_debug"]) && $_GET["sm_do_debug"]=="true") {
       
   152 				
       
   153 				//Check again, just for the case that something went wrong before
       
   154 				if(!current_user_can("administrator")) {
       
   155 					echo '<p>Please log in as admin</p>';
       
   156 					return;
       
   157 				}
       
   158 				
       
   159 				$oldErr = error_reporting(E_ALL);
       
   160 				$oldIni = ini_set("display_errors",1);
       
   161 
       
   162 				echo '<div class="wrap">';
       
   163 				echo '<h2>' .  __('XML Sitemap Generator for WordPress', 'sitemap') .  " " . $this->sg->GetVersion(). '</h2>';
       
   164 				echo '<p>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.</p>';
       
   165 				echo '<p style="font-weight:bold; color:red; padding:5px; border:1px red solid; text-align:center;">DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!</p>';
       
   166 				echo "<h3>WordPress and PHP Information</h3>";
       
   167 				echo '<p>WordPress ' . $GLOBALS['wp_version'] . ' with ' . ' DB ' . $GLOBALS['wp_db_version'] . ' on PHP ' . phpversion() . '</p>';
       
   168 				echo '<p>Plugin version: ' . $this->sg->GetVersion() . ' (' . $this->sg->_svnVersion . ')';
       
   169 				echo '<h4>Environment</h4>';
       
   170 				echo "<pre>";
       
   171 				$sc = $_SERVER;
       
   172 				unset($sc["HTTP_COOKIE"]);
       
   173 				print_r($sc);
       
   174 				echo "</pre>";
       
   175 				echo "<h4>WordPress Config</h4>";
       
   176 				echo "<pre>";
       
   177 				$opts = array();
       
   178 				if(function_exists('wp_load_alloptions')) {
       
   179 					$opts = wp_load_alloptions();
       
   180 				} else {
       
   181 					global $wpdb;
       
   182 					$os = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options");
       
   183 					foreach ( (array) $os as $o ) $opts[$o->option_name] = $o->option_value;
       
   184 				}
       
   185 				
       
   186 				$popts = array();
       
   187 				foreach($opts as $k=>$v) {
       
   188 					//Try to filter out passwords etc...
       
   189 					if(preg_match("/(pass|login|pw|secret|user|usr)/si",$v)) continue;
       
   190 					$popts[$k] = htmlspecialchars($v);
       
   191 				}
       
   192 				print_r($popts);
       
   193 				echo "</pre>";
       
   194 				echo '<h4>Sitemap Config</h4>';
       
   195 				echo "<pre>";
       
   196 				print_r($this->sg->_options);
       
   197 				echo "</pre>";
       
   198 				echo '<h3>Errors, Warnings, Notices</h3>';
       
   199 				echo '<div>';
       
   200 				$status = $this->sg->BuildSitemap();
       
   201 				echo '</div>';
       
   202 				echo '<h3>MySQL Queries</h3>';
       
   203 				if(defined('SAVEQUERIES') && SAVEQUERIES) {
       
   204 					echo '<pre>';
       
   205 					var_dump($GLOBALS['wpdb']->queries);
       
   206 					echo '</pre>';
       
   207 					
       
   208 					$total = 0;
       
   209 					foreach($GLOBALS['wpdb']->queries as $q) {
       
   210 						$total+=$q[1];
       
   211 					}
       
   212 					echo '<h4>Total Query Time</h4>';
       
   213 					echo '<pre>' . count($GLOBALS['wpdb']->queries) . ' queries in ' . round($total,2) . ' seconds.</pre>';
       
   214 				} else {
       
   215 					echo '<p>Please edit wp-db.inc.php in wp-includes and set SAVEQUERIES to true if you want to see the queries.</p>';
       
   216 				}
       
   217 				echo "<h3>Build Process Results</h3>";
       
   218 				echo "<pre>";
       
   219 				print_r($status);
       
   220 				echo "</pre>";
       
   221 				echo '<p>Done. <a href="' . wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&sm_do_debug=true",'sitemap') . '">Rebuild</a> or <a href="' . $this->sg->GetBackLink() . '">Return</a></p>';
       
   222 				echo '<p style="font-weight:bold; color:red; padding:5px; border:1px red solid; text-align:center;">DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!</p>';
       
   223 				echo '</div>';
       
   224 				@error_reporting($oldErr);
       
   225 				@ini_set("display_errors",$oldIni);
       
   226 				return;
       
   227 			} else {
       
   228 				$this->sg->BuildSitemap();
       
   229 				$redirURL = $this->sg->GetBackLink() . '&sm_fromrb=true';
       
   230 				
       
   231 				//Redirect so the sm_rebuild GET parameter no longer exists.
       
   232 				@header("location: " . $redirURL);
       
   233 				//If there was already any other output, the header redirect will fail
       
   234 				echo '<script type="text/javascript">location.replace("' . $redirURL . '");</script>';
       
   235 				echo '<noscript><a href="' . $redirURL . '">Click here to continue</a></noscript>';
       
   236 				exit;
       
   237 			}
       
   238 		} else if (!empty($_POST['sm_update'])) { //Pressed Button: Update Config
       
   239 			check_admin_referer('sitemap');
       
   240 			
       
   241 			if(isset($_POST['sm_b_style']) && $_POST['sm_b_style'] == $this->sg->getDefaultStyle()) {
       
   242 				$_POST['sm_b_style_default'] = true;
       
   243 				$_POST['sm_b_style'] = '';
       
   244 			}
       
   245 			
       
   246 			foreach($this->sg->_options as $k=>$v) {
       
   247 				//Check vor values and convert them into their types, based on the category they are in
       
   248 				if(!isset($_POST[$k])) $_POST[$k]=""; // Empty string will get false on 2bool and 0 on 2float
       
   249 				
       
   250 				//Options of the category "Basic Settings" are boolean, except the filename and the autoprio provider
       
   251 				if(substr($k,0,5)=="sm_b_") {
       
   252 					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") {
       
   253 						if($k=="sm_b_filename_manual" && strpos($_POST[$k],"\\")!==false){
       
   254 							$_POST[$k]=stripslashes($_POST[$k]);
       
   255 						}
       
   256 						
       
   257 						$this->sg->_options[$k]=(string) $_POST[$k];
       
   258 					} else if($k=="sm_b_location_mode") {
       
   259 						$tmp=(string) $_POST[$k];
       
   260 						$tmp=strtolower($tmp);
       
   261 						if($tmp=="auto" || $tmp="manual") $this->sg->_options[$k]=$tmp;
       
   262 						else $this->sg->_options[$k]="auto";
       
   263 					} else if($k == "sm_b_time" || $k=="sm_b_max_posts") {
       
   264 						if($_POST[$k]=='') $_POST[$k] = -1;
       
   265 						$this->sg->_options[$k] = intval($_POST[$k]);
       
   266 					} else if($k== "sm_i_install_date") {
       
   267 						if($this->sg->GetOption('i_install_date')<=0) $this->sg->_options[$k] = time();
       
   268 					} else if($k=="sm_b_exclude") {
       
   269 						$IDss = array();
       
   270 						$IDs = explode(",",$_POST[$k]);
       
   271 						for($x = 0; $x<count($IDs); $x++) {
       
   272 							$ID = intval(trim($IDs[$x]));
       
   273 							if($ID>0) $IDss[] = $ID;
       
   274 						}
       
   275 						$this->sg->_options[$k] = $IDss;
       
   276 					} else if($k == "sm_b_exclude_cats") {
       
   277 						$exCats = array();
       
   278 						if(isset($_POST["post_category"])) {
       
   279 							foreach((array) $_POST["post_category"] AS $vv) if(!empty($vv) && is_numeric($vv)) $exCats[] = intval($vv);
       
   280 						}
       
   281 						$this->sg->_options[$k] = $exCats;
       
   282 					} else {
       
   283 						$this->sg->_options[$k]=(bool) $_POST[$k];
       
   284 
       
   285 					}
       
   286 				//Options of the category "Includes" are boolean
       
   287 				} else if(substr($k,0,6)=="sm_in_") {
       
   288 					if($k=='sm_in_tax') {
       
   289 
       
   290 						$enabledTaxonomies = array();
       
   291 						
       
   292 						foreach(array_keys((array) $_POST[$k]) AS $taxName) {
       
   293 							if(empty($taxName) || !is_taxonomy($taxName)) continue;
       
   294 
       
   295 							$enabledTaxonomies[] = $taxName;
       
   296 						}
       
   297 
       
   298 						$this->sg->_options[$k] = $enabledTaxonomies;
       
   299 												
       
   300 					} else $this->sg->_options[$k]=(bool) $_POST[$k];
       
   301 				//Options of the category "Change frequencies" are string
       
   302 				} else if(substr($k,0,6)=="sm_cf_") {
       
   303 					$this->sg->_options[$k]=(string) $_POST[$k];
       
   304 				//Options of the category "Priorities" are float
       
   305 				} else if(substr($k,0,6)=="sm_pr_") {
       
   306 					$this->sg->_options[$k]=(float) $_POST[$k];
       
   307 				}
       
   308 			}
       
   309 			
       
   310 			//No Mysql unbuffered query for WP < 2.2
       
   311 			if(floatval($wp_version) < 2.2) {
       
   312 				$this->sg->SetOption('b_safemode',true);
       
   313 			}
       
   314 			
       
   315 			//No Wp-Cron for WP < 2.1
       
   316 			if(floatval($wp_version) < 2.1) {
       
   317 				$this->sg->SetOption('b_auto_delay',false);
       
   318 			}
       
   319 			
       
   320 			//Apply page changes from POST
       
   321 			$this->sg->_pages=$this->sg->HtmlApplyPages();
       
   322 			
       
   323 			if($this->sg->SaveOptions()) $message.=__('Configuration updated', 'sitemap') . "<br />";
       
   324 			else $message.=__('Error while saving options', 'sitemap') . "<br />";
       
   325 			
       
   326 			if($this->sg->SavePages()) $message.=__("Pages saved",'sitemap') . "<br />";
       
   327 			else $message.=__('Error while saving pages', 'sitemap'). "<br />";
       
   328 			
       
   329 		} else if(!empty($_POST["sm_reset_config"])) { //Pressed Button: Reset Config
       
   330 			check_admin_referer('sitemap');
       
   331 			$this->sg->InitOptions();
       
   332 			$this->sg->SaveOptions();
       
   333 			
       
   334 			$message.=__('The default configuration was restored.','sitemap');
       
   335 		}
       
   336 		
       
   337 		//Print out the message to the user, if any
       
   338 		if($message!="") {
       
   339 			?>
       
   340 			<div class="updated"><strong><p><?php
       
   341 			echo $message;
       
   342 			?></p></strong></div><?php
       
   343 		}
       
   344 		?>
       
   345 				
       
   346 		<style type="text/css">
       
   347 		
       
   348 		li.sm_hint {
       
   349 			color:green;
       
   350 		}
       
   351 		
       
   352 		li.sm_optimize {
       
   353 			color:orange;
       
   354 		}
       
   355 		
       
   356 		li.sm_error {
       
   357 			color:red;
       
   358 		}
       
   359 		
       
   360 		input.sm_warning:hover {
       
   361 			background: #ce0000;
       
   362 			color: #fff;
       
   363 		}
       
   364 		
       
   365 		a.sm_button {
       
   366 			padding:4px;
       
   367 			display:block;
       
   368 			padding-left:25px;
       
   369 			background-repeat:no-repeat;
       
   370 			background-position:5px 50%;
       
   371 			text-decoration:none;
       
   372 			border:none;
       
   373 		}
       
   374 		
       
   375 		a.sm_button:hover {
       
   376 			border-bottom-width:1px;
       
   377 		}
       
   378 
       
   379 		a.sm_donatePayPal {
       
   380 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-paypal.gif);
       
   381 		}
       
   382 		
       
   383 		a.sm_donateAmazon {
       
   384 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-amazon.gif);
       
   385 		}
       
   386 		
       
   387 		a.sm_pluginHome {
       
   388 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-arne.gif);
       
   389 		}
       
   390 		
       
   391 		a.sm_pluginList {
       
   392 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-email.gif);
       
   393 		}
       
   394 		
       
   395 		a.sm_pluginSupport {
       
   396 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-wordpress.gif);
       
   397 		}
       
   398 		
       
   399 		a.sm_pluginBugs {
       
   400 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-trac.gif);
       
   401 		}
       
   402 		
       
   403 		a.sm_resGoogle {
       
   404 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-google.gif);
       
   405 		}
       
   406 		
       
   407 		a.sm_resYahoo {
       
   408 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-yahoo.gif);
       
   409 		}
       
   410 		
       
   411 		a.sm_resBing {
       
   412 			background-image:url(<?php echo $this->sg->GetPluginUrl(); ?>img/icon-bing.gif);
       
   413 		}
       
   414 		
       
   415 		div.sm-update-nag p {
       
   416 			margin:5px;
       
   417 		}
       
   418 		
       
   419 		</style>
       
   420 		
       
   421 		<?php
       
   422 			if($this->mode == 27): ?>
       
   423 			<style type="text/css">
       
   424 		
       
   425 				.sm-padded .inside {
       
   426 					margin:12px!important;
       
   427 				}
       
   428 				.sm-padded .inside ul {
       
   429 					margin:6px 0 12px 0;
       
   430 				}
       
   431 				
       
   432 				.sm-padded .inside input {
       
   433 					padding:1px;
       
   434 					margin:0;
       
   435 				}
       
   436 			</style>
       
   437 				
       
   438 			<?php elseif(version_compare($wp_version,"2.5",">=")): ?>
       
   439 				<style type="text/css">
       
   440 					div#moremeta {
       
   441 						float:right;
       
   442 						width:200px;
       
   443 						margin-left:10px;
       
   444 					}
       
   445 					<?php if(!$snl): ?>
       
   446 					div#advancedstuff {
       
   447 						width:770px;
       
   448 					}
       
   449 					<?php endif;?>
       
   450 					div#poststuff {
       
   451 						margin-top:10px;
       
   452 					}
       
   453 					fieldset.dbx-box {
       
   454 						margin-bottom:5px;
       
   455 					}
       
   456 					
       
   457 					div.sm-update-nag {
       
   458 						margin-top:10px!important;
       
   459 					}
       
   460 				</style>
       
   461 				<!--[if lt IE 7]>
       
   462 					<style type="text/css">
       
   463 						div#advancedstuff {
       
   464 							width:735px;
       
   465 						}
       
   466 					</style>
       
   467 				<![endif]-->
       
   468 				
       
   469 			<?php else: ?>
       
   470 				<style type="text/css">
       
   471 					div.updated-message {
       
   472 						margin-left:0; margin-right:0;
       
   473 					}
       
   474 				</style>
       
   475 			<?php endif;
       
   476 		?>
       
   477 		
       
   478 		<div class="wrap" id="sm_div">
       
   479 			<form method="post" action="<?php echo $this->sg->GetBackLink() ?>">
       
   480 				<h2><?php _e('XML Sitemap Generator for WordPress', 'sitemap'); echo " " . $this->sg->GetVersion() ?> </h2>
       
   481 				<?php
       
   482 				if(function_exists("wp_update_plugins") && (!defined('SM_NO_UPDATE') || SM_NO_UPDATE == false)) {
       
   483 					
       
   484 					wp_update_plugins();
       
   485 					
       
   486 					$file = GoogleSitemapGeneratorLoader::GetBaseName();
       
   487 					
       
   488 					$plugin_data = get_plugin_data(GoogleSitemapGeneratorLoader::GetPluginFile());
       
   489 					
       
   490 					$current = function_exists('get_transient')?get_transient('update_plugins'):get_option('update_plugins');
       
   491 					
       
   492 					if(isset($current->response[$file])) {
       
   493 						$r = $current->response[$file];
       
   494 						?><div id="update-nag" class="sm-update-nag"><?php
       
   495 						if ( !current_user_can('edit_plugins') || version_compare($wp_version,"2.5","<") )
       
   496 							printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a>.','default'), $plugin_data['Name'], $r->url, $r->new_version);
       
   497 						else if ( empty($r->package) )
       
   498 							printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> <em>automatic upgrade unavailable for this plugin</em>.','default'), $plugin_data['Name'], $r->url, $r->new_version);
       
   499 						else
       
   500 							printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> or <a href="%4$s">upgrade automatically</a>.','default'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url("update.php?action=upgrade-plugin&amp;plugin=$file", 'upgrade-plugin_' . $file) );
       
   501 		
       
   502 						?></div><?php
       
   503 					}
       
   504 				}
       
   505 				
       
   506 				
       
   507 				if(get_option('blog_public')!=1) {
       
   508 					?><div class="error"><p><?php echo str_replace("%s","options-privacy.php",__('Your blog is currently blocking search engines! Visit the <a href="%s">privacy settings</a> to change this.','sitemap')); ?></p></div><?php
       
   509 				}
       
   510 				
       
   511 				?>
       
   512 
       
   513 				<?php if(version_compare($wp_version,"2.5","<")): ?>
       
   514 				<script type="text/javascript" src="../wp-includes/js/dbx.js"></script>
       
   515 				<script type="text/javascript">
       
   516 				//<![CDATA[
       
   517 				addLoadEvent( function() {
       
   518 					var manager = new dbxManager('sm_sitemap_meta_33');
       
   519 					
       
   520 					//create new docking boxes group
       
   521 					var meta = new dbxGroup(
       
   522 						'grabit', 		// container ID [/-_a-zA-Z0-9/]
       
   523 						'vertical', 	// orientation ['vertical'|'horizontal']
       
   524 						'10', 			// drag threshold ['n' pixels]
       
   525 						'no',			// restrict drag movement to container axis ['yes'|'no']
       
   526 						'10', 			// animate re-ordering [frames per transition, or '0' for no effect]
       
   527 						'yes', 			// include open/close toggle buttons ['yes'|'no']
       
   528 						'open', 		// default state ['open'|'closed']
       
   529 						<?php echo "'" . js_escape(__('open')); ?>', 		// word for "open", as in "open this box"
       
   530 						<?php echo "'" . js_escape(__('close')); ?>', 		// word for "close", as in "close this box"
       
   531 						<?php echo "'" . js_escape(__('click-down and drag to move this box')); ?>', // sentence for "move this box" by mouse
       
   532 						<?php echo "'" . js_escape(__('click to %toggle% this box')); ?>', // pattern-match sentence for "(open|close) this box" by mouse
       
   533 						<?php echo "'" . js_escape(__('use the arrow keys to move this box')); ?>', // sentence for "move this box" by keyboard
       
   534 						<?php echo "'" . js_escape(__(', or press the enter key to %toggle% it')); ?>',  // pattern-match sentence-fragment for "(open|close) this box" by keyboard
       
   535 						'%mytitle%  [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts
       
   536 						);
       
   537 
       
   538 					var advanced = new dbxGroup(
       
   539 						'advancedstuff', 		// container ID [/-_a-zA-Z0-9/]
       
   540 						'vertical', 		// orientation ['vertical'|'horizontal']
       
   541 						'10', 			// drag threshold ['n' pixels]
       
   542 						'yes',			// restrict drag movement to container axis ['yes'|'no']
       
   543 						'10', 			// animate re-ordering [frames per transition, or '0' for no effect]
       
   544 						'yes', 			// include open/close toggle buttons ['yes'|'no']
       
   545 						'open', 		// default state ['open'|'closed']
       
   546 						<?php echo "'" . js_escape(__('open')); ?>', 		// word for "open", as in "open this box"
       
   547 						<?php echo "'" . js_escape(__('close')); ?>', 		// word for "close", as in "close this box"
       
   548 						<?php echo "'" . js_escape(__('click-down and drag to move this box')); ?>', // sentence for "move this box" by mouse
       
   549 						<?php echo "'" . js_escape(__('click to %toggle% this box')); ?>', // pattern-match sentence for "(open|close) this box" by mouse
       
   550 						<?php echo "'" . js_escape(__('use the arrow keys to move this box')); ?>', // sentence for "move this box" by keyboard
       
   551 						<?php echo "'" . js_escape(__(', or press the enter key to %toggle% it')); ?>',  // pattern-match sentence-fragment for "(open|close) this box" by keyboard
       
   552 						'%mytitle%  [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts
       
   553 						);
       
   554 				});
       
   555 				//]]>
       
   556 				</script>
       
   557 				<?php endif; ?>
       
   558 
       
   559 				<?php if($this->mode == 27): ?>
       
   560 				
       
   561 					<?php if(!$snl): ?>
       
   562 						<div id="poststuff" class="metabox-holder has-right-sidebar">
       
   563 							<div class="inner-sidebar">
       
   564 								<div id="side-sortables" class="meta-box-sortabless ui-sortable" style="position:relative;">
       
   565 					<?php else: ?>
       
   566 						<div id="poststuff" class="metabox-holder">
       
   567 					<?php endif; ?>
       
   568 				<?php else: ?>
       
   569 					<?php if(!$snl): ?>
       
   570 						<div id="poststuff">
       
   571 							<div id="moremeta">
       
   572 								<div id="grabit" class="dbx-group">
       
   573 					<?php else: ?>
       
   574 						<div>
       
   575 					<?php endif; ?>
       
   576 				<?php endif; ?>
       
   577 				
       
   578 					<?php if(!$snl): ?>
       
   579 				
       
   580 							<?php $this->HtmlPrintBoxHeader('sm_pnres',__('About this Plugin:','sitemap'),true); ?>
       
   581 								<a class="sm_button sm_pluginHome"    href="<?php echo $this->sg->GetRedirectLink('sitemap-home'); ?>"><?php _e('Plugin Homepage','sitemap'); ?></a>
       
   582 								<a class="sm_button sm_pluginHome"    href="<?php echo $this->sg->GetRedirectLink('sitemap-feedback'); ?>"><?php _e('Suggest a Feature','sitemap'); ?></a>
       
   583 								<a class="sm_button sm_pluginList"    href="<?php echo $this->sg->GetRedirectLink('sitemap-list'); ?>"><?php _e('Notify List','sitemap'); ?></a>
       
   584 								<a class="sm_button sm_pluginSupport" href="<?php echo $this->sg->GetRedirectLink('sitemap-support'); ?>"><?php _e('Support Forum','sitemap'); ?></a>
       
   585 								<a class="sm_button sm_pluginBugs"    href="<?php echo $this->sg->GetRedirectLink('sitemap-bugs'); ?>"><?php _e('Report a Bug','sitemap'); ?></a>
       
   586 								
       
   587 								<a class="sm_button sm_donatePayPal"  href="<?php echo $this->sg->GetRedirectLink('sitemap-paypal'); ?>"><?php _e('Donate with PayPal','sitemap'); ?></a>
       
   588 								<a class="sm_button sm_donateAmazon"  href="<?php echo $this->sg->GetRedirectLink('sitemap-amazon'); ?>"><?php _e('My Amazon Wish List','sitemap'); ?></a>
       
   589 								<?php if(__('translator_name','sitemap')!='translator_name') {?><a class="sm_button sm_pluginSupport" href="<?php _e('translator_url','sitemap'); ?>"><?php _e('translator_name','sitemap'); ?></a><?php } ?>
       
   590 							<?php $this->HtmlPrintBoxFooter(true); ?>
       
   591 						
       
   592 						
       
   593 							<?php $this->HtmlPrintBoxHeader('sm_smres',__('Sitemap Resources:','sitemap'),true); ?>
       
   594 								<a class="sm_button sm_resGoogle"    href="<?php echo $this->sg->GetRedirectLink('sitemap-gwt'); ?>"><?php _e('Webmaster Tools','sitemap'); ?></a>
       
   595 								<a class="sm_button sm_resGoogle"    href="<?php echo $this->sg->GetRedirectLink('sitemap-gwb'); ?>"><?php _e('Webmaster Blog','sitemap'); ?></a>
       
   596 								
       
   597 								<a class="sm_button sm_resYahoo"     href="<?php echo $this->sg->GetRedirectLink('sitemap-yse'); ?>"><?php _e('Site Explorer','sitemap'); ?></a>
       
   598 								<a class="sm_button sm_resYahoo"     href="<?php echo $this->sg->GetRedirectLink('sitemap-ywb'); ?>"><?php _e('Search Blog','sitemap'); ?></a>
       
   599 								
       
   600 								<a class="sm_button sm_resBing"     href="<?php echo $this->sg->GetRedirectLink('sitemap-lwt'); ?>"><?php _e('Webmaster Tools','sitemap'); ?></a>
       
   601 								<a class="sm_button sm_resBing"     href="<?php echo $this->sg->GetRedirectLink('sitemap-lswcb'); ?>"><?php _e('Webmaster Center Blog','sitemap'); ?></a>
       
   602 								<br />
       
   603 								<a class="sm_button sm_resGoogle"    href="<?php echo $this->sg->GetRedirectLink('sitemap-prot'); ?>"><?php _e('Sitemaps Protocol','sitemap'); ?></a>
       
   604 								<a class="sm_button sm_resGoogle"    href="<?php echo $this->sg->GetRedirectLink('sitemap-ofaq'); ?>"><?php _e('Official Sitemaps FAQ','sitemap'); ?></a>
       
   605 								<a class="sm_button sm_pluginHome"   href="<?php echo $this->sg->GetRedirectLink('sitemap-afaq'); ?>"><?php _e('My Sitemaps FAQ','sitemap'); ?></a>
       
   606 							<?php $this->HtmlPrintBoxFooter(true); ?>
       
   607 							
       
   608 							<?php $this->HtmlPrintBoxHeader('dm_donations',__('Recent Donations:','sitemap'),true); ?>
       
   609 								<?php if($this->sg->GetOption('i_hide_donors')!==true) { ?>
       
   610 									<iframe border="0" frameborder="0" scrolling="no" allowtransparency="yes" style="width:100%; height:80px;" src="<?php echo $this->sg->GetRedirectLink('sitemap-donorlist'); ?>">
       
   611 									<?php _e('List of the donors','sitemap'); ?>
       
   612 									</iframe><br />
       
   613 									<a href="<?php echo $this->sg->GetBackLink() . "&amp;sm_hidedonors=true"; ?>"><small><?php _e('Hide this list','sitemap'); ?></small></a><br /><br />
       
   614 								<?php } ?>
       
   615 								<a style="float:left; margin-right:5px; border:none;" href="javascript:document.getElementById('sm_donate_form').submit();"><img style="vertical-align:middle; border:none; margin-top:2px;" src="<?php echo $this->sg->GetPluginUrl(); ?>img/icon-donate.gif" border="0" alt="PayPal" title="Help me to continue support of this plugin :)" /></a>
       
   616 								<span><small><?php _e('Thanks for your support!','sitemap'); ?></small></span>
       
   617 								<div style="clear:left; height:1px;"></div>
       
   618 							<?php $this->HtmlPrintBoxFooter(true); ?>
       
   619 							
       
   620 						
       
   621 						</div>
       
   622 					</div>
       
   623 					<?php endif; ?>
       
   624 					
       
   625 					<?php if($this->mode == 27): ?>
       
   626 						<div class="has-sidebar sm-padded" >
       
   627 					
       
   628 							<div id="post-body-content" class="<?php if(!$snl): ?>has-sidebar-content<?php endif; ?>">
       
   629 						
       
   630 								<div class="meta-box-sortabless">
       
   631 					<?php else: ?>
       
   632 						<div id="advancedstuff" class="dbx-group" >
       
   633 					<?php endif; ?>
       
   634 					
       
   635 					<!-- Rebuild Area -->
       
   636 					<?php
       
   637 						$status = GoogleSitemapGeneratorStatus::Load();
       
   638 						$head = __('The sitemap wasn\'t generated yet.','sitemap');
       
   639 						if($status != null) {
       
   640 							$st=$status->GetStartTime();
       
   641 							$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'));
       
   642 						}
       
   643 			
       
   644 						$this->HtmlPrintBoxHeader('sm_rebuild',$head); ?>
       
   645 						<ul>
       
   646 							<?php
       
   647 	
       
   648 
       
   649 							if($status == null) {
       
   650 								echo "<li>" . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&noheader=true",'sitemap'),__('The sitemap wasn\'t built yet. <a href="%s">Click here</a> to build it the first time.','sitemap')) . "</li>";
       
   651 							}  else {
       
   652 								if($status->_endTime !== 0) {
       
   653 									if($status->_usedXml) {
       
   654 										if($status->_xmlSuccess) {
       
   655 											$ft = is_readable($status->_xmlPath)?filemtime($status->_xmlPath):false;
       
   656 											if($ft!==false) echo "<li>" . str_replace("%url%",$status->_xmlUrl,str_replace("%date%",date(get_option('date_format'),$ft) . " " . date(get_option('time_format'),$ft),__("Your <a href=\"%url%\">sitemap</a> was last built on <b>%date%</b>.",'sitemap'))) . "</li>";
       
   657 											else echo "<li class=\"sm_error\">" . __("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') . "</li>";
       
   658 										} else {
       
   659 											echo "<li class=\"sm_error\">" . 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. <a href=\"%url%\">Learn more</a>",'sitemap')) . "</li>";
       
   660 										}
       
   661 									}
       
   662 									
       
   663 									if($status->_usedZip) {
       
   664 										if($status->_zipSuccess) {
       
   665 											$ft = is_readable($status->_zipPath)?filemtime($status->_zipPath):false;
       
   666 											if($ft !== false) echo "<li>" . str_replace("%url%",$status->_zipUrl,str_replace("%date%",date(get_option('date_format'),$ft) . " " . date(get_option('time_format'),$ft),__("Your sitemap (<a href=\"%url%\">zipped</a>) was last built on <b>%date%</b>.",'sitemap'))) . "</li>";
       
   667 											else echo "<li class=\"sm_error\">" . __("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') . "</li>";
       
   668 										} else {
       
   669 											echo "<li class=\"sm_error\">" . 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. <a href=\"%url%\">Learn more</a>",'sitemap')) . "</li>";
       
   670 										}
       
   671 									}
       
   672 									
       
   673 									if($status->_usedGoogle) {
       
   674 										if($status->_gooogleSuccess) {
       
   675 											echo "<li>" .__("Google was <b>successfully notified</b> about changes.",'sitemap'). "</li>";
       
   676 											$gt = $status->GetGoogleTime();
       
   677 											if($gt>4) {
       
   678 												echo "<li class=\sm_optimize\">" . str_replace("%time%",$gt,__("It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "</li>";
       
   679 											}
       
   680 										} else {
       
   681 											echo "<li class=\"sm_error\">" . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=google&noheader=true",'sitemap'),__('There was a problem while notifying Google. <a href="%s">View result</a>','sitemap')) . "</li>";
       
   682 										}
       
   683 									}
       
   684 									
       
   685 									if($status->_usedYahoo) {
       
   686 										if($status->_yahooSuccess) {
       
   687 											echo "<li>" .__("YAHOO was <b>successfully notified</b> about changes.",'sitemap'). "</li>";
       
   688 											$yt = $status->GetYahooTime();
       
   689 											if($yt>4) {
       
   690 												echo "<li class=\sm_optimize\">" . str_replace("%time%",$yt,__("It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "</li>";
       
   691 											}
       
   692 										} else {
       
   693 											echo "<li class=\"sm_error\">" . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=yahoo&noheader=true",'sitemap'),__('There was a problem while notifying YAHOO. <a href="%s">View result</a>','sitemap')) . "</li>";
       
   694 										}
       
   695 									}
       
   696 									
       
   697 									if($status->_usedMsn) {
       
   698 										if($status->_msnSuccess) {
       
   699 											echo "<li>" .__("Bing was <b>successfully notified</b> about changes.",'sitemap'). "</li>";
       
   700 											$at = $status->GetMsnTime();
       
   701 											if($at>4) {
       
   702 												echo "<li class=\sm_optimize\">" . str_replace("%time%",$at,__("It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "</li>";
       
   703 											}
       
   704 										} else {
       
   705 											echo "<li class=\"sm_error\">" . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=msn&noheader=true",'sitemap'),__('There was a problem while notifying Bing. <a href="%s">View result</a>','sitemap')) . "</li>";
       
   706 										}
       
   707 									}
       
   708 									
       
   709 									if($status->_usedAsk) {
       
   710 										if($status->_askSuccess) {
       
   711 											echo "<li>" .__("Ask.com was <b>successfully notified</b> about changes.",'sitemap'). "</li>";
       
   712 											$at = $status->GetAskTime();
       
   713 											if($at>4) {
       
   714 												echo "<li class=\sm_optimize\">" . 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')) . "</li>";
       
   715 											}
       
   716 										} else {
       
   717 											echo "<li class=\"sm_error\">" . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=ask&noheader=true",'sitemap'),__('There was a problem while notifying Ask.com. <a href="%s">View result</a>','sitemap')) . "</li>";
       
   718 										}
       
   719 									}
       
   720 									
       
   721 									$et = $status->GetTime();
       
   722 									$mem = $status->GetMemoryUsage();
       
   723 									
       
   724 									if($mem > 0) {
       
   725 										echo "<li>" .str_replace(array("%time%","%memory%"),array($et,$mem),__("The building process took about <b>%time% seconds</b> to complete and used %memory% MB of memory.",'sitemap')). "</li>";
       
   726 									} else {
       
   727 										echo "<li>" .str_replace("%time%",$et,__("The building process took about <b>%time% seconds</b> to complete.",'sitemap')). "</li>";
       
   728 									}
       
   729 									
       
   730 									if(!$status->_hasChanged) {
       
   731 										echo "<li>" . __("The content of your sitemap <strong>didn't change</strong> since the last time so the files were not written and no search engine was pinged.",'sitemap'). "</li>";
       
   732 									}
       
   733 													
       
   734 								} else {
       
   735 									if($this->sg->GetOption("b_auto_delay")) {
       
   736 										$st = ($status->GetStartTime() - time()) * -1;
       
   737 										//If the building process runs in background and was started within the last 45 seconds, the sitemap might not be completed yet...
       
   738 										if($st < 45) {
       
   739 											echo '<li class="">'. __("The building process might still be active! Reload the page in a few seconds and check if something has changed.",'sitemap') . '</li>';
       
   740 										}
       
   741 									}
       
   742 									echo '<li class="sm_error">'. 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. <a href=\"%url%\">Learn more</a>",'sitemap')) . '</li>';
       
   743 									if($status->_memoryUsage > 0) {
       
   744 										echo '<li class="sm_error">'. 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')) . '</li>';
       
   745 									}
       
   746 									
       
   747 									if($status->_lastTime > 0) {
       
   748 										echo '<li class="sm_error">'. 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')) . '</li>';
       
   749 									}
       
   750 									
       
   751 									if($status->GetLastPost() > 0) {
       
   752 										echo '<li class="sm_optimize">'. str_replace("%lastpost%",$status->GetLastPost(),__("The script stopped around post number %lastpost% (+/- 100)",'sitemap')) . '</li>';
       
   753 									}
       
   754 								}
       
   755 								echo "<li>" . 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 <a href="%s">rebuild the sitemap</a> manually.','sitemap')) . "</li>";
       
   756 							}
       
   757 							echo "<li>" . 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 <a href="%d">debug function</a> to get more information.','sitemap')) . "</li>";
       
   758 							?>
       
   759 
       
   760 						</ul>
       
   761 					<?php $this->HtmlPrintBoxFooter(); ?>
       
   762 						
       
   763 					<!-- Basic Options -->
       
   764 					<?php $this->HtmlPrintBoxHeader('sm_basic_options',__('Basic Options', 'sitemap')); ?>
       
   765 					
       
   766 						<b><?php _e('Sitemap files:','sitemap'); ?></b> <a href="<?php echo $this->sg->GetRedirectLink('sitemap-help-options-files'); ?>"><?php _e('Learn more','sitemap'); ?></a>
       
   767 						<ul>
       
   768 							<li>
       
   769 								<label for="sm_b_xml">
       
   770 									<input type="checkbox" id="sm_b_xml" name="sm_b_xml" <?php echo ($this->sg->GetOption("b_xml")==true?"checked=\"checked\"":"") ?> />
       
   771 									<?php _e('Write a normal XML file (your filename)', 'sitemap') ?>
       
   772 								</label>
       
   773 							</li>
       
   774 							<li>
       
   775 								<label for="sm_b_gzip">
       
   776 									<input type="checkbox" id="sm_b_gzip" name="sm_b_gzip" <?php if(function_exists("gzencode")) { echo ($this->sg->GetOption("b_gzip")==true?"checked=\"checked\"":""); } else echo "disabled=\"disabled\"";  ?> />
       
   777 									<?php _e('Write a gzipped file (your filename + .gz)', 'sitemap') ?>
       
   778 								</label>
       
   779 							</li>
       
   780 						</ul>
       
   781 						<b><?php _e('Building mode:','sitemap'); ?></b> <a href="<?php echo $this->sg->GetRedirectLink('sitemap-help-options-process'); ?>"><?php _e('Learn more','sitemap'); ?></a>
       
   782 						<ul>
       
   783 							<li>
       
   784 								<label for="sm_b_auto_enabled">
       
   785 									<input type="checkbox" id="sm_b_auto_enabled" name="sm_b_auto_enabled" <?php echo ($this->sg->GetOption("b_auto_enabled")==true?"checked=\"checked\"":""); ?> />
       
   786 									<?php _e('Rebuild sitemap if you change the content of your blog', 'sitemap') ?>
       
   787 								</label>
       
   788 							</li>
       
   789 							<li>
       
   790 								<label for="sm_b_manual_enabled">
       
   791 									<input type="hidden" name="sm_b_manual_key" value="<?php echo $this->sg->GetOption("b_manual_key"); ?>" />
       
   792 									<input type="checkbox" id="sm_b_manual_enabled" name="sm_b_manual_enabled" <?php echo ($this->sg->GetOption("b_manual_enabled")==true?"checked=\"checked\"":"") ?> />
       
   793 									<?php _e('Enable manual sitemap building via GET Request', 'sitemap') ?>
       
   794 								</label>
       
   795 								<a href="javascript:void(document.getElementById('sm_manual_help').style.display='');">[?]</a>
       
   796 								<span id="sm_manual_help" style="display:none;"><br />
       
   797 								<?php echo str_replace("%1",trailingslashit(get_bloginfo('siteurl')) . "?sm_command=build&amp;sm_key=" . $this->sg->GetOption("b_manual_key"),__('This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: <a href="%1">%1</a> Please check the result box above to see if sitemap was successfully built.', 'sitemap')); ?>
       
   798 								</span>
       
   799 							</li>
       
   800 						</ul>
       
   801 						<b><?php _e('Update notification:','sitemap'); ?></b> <a href="<?php echo $this->sg->GetRedirectLink('sitemap-help-options-ping'); ?>"><?php _e('Learn more','sitemap'); ?></a>
       
   802 						<ul>
       
   803 							<li>
       
   804 								<input type="checkbox" id="sm_b_ping" name="sm_b_ping" <?php echo ($this->sg->GetOption("b_ping")==true?"checked=\"checked\"":"") ?> />
       
   805 								<label for="sm_b_ping"><?php _e('Notify Google about updates of your Blog', 'sitemap') ?></label><br />
       
   806 								<small><?php echo str_replace("%s",$this->sg->GetRedirectLink('sitemap-gwt'),__('No registration required, but you can join the <a href="%s">Google Webmaster Tools</a> to check crawling statistics.','sitemap')); ?></small>
       
   807 							</li>
       
   808 							<li>
       
   809 								<input type="checkbox" id="sm_b_pingmsn" name="sm_b_pingmsn" <?php echo ($this->sg->GetOption("b_pingmsn")==true?"checked=\"checked\"":"") ?> />
       
   810 								<label for="sm_b_pingmsn"><?php _e('Notify Bing (formerly MSN Live Search) about updates of your Blog', 'sitemap') ?></label><br />
       
   811 								<small><?php echo str_replace("%s",$this->sg->GetRedirectLink('sitemap-lwt'),__('No registration required, but you can join the <a href="%s">Bing Webmaster Tools</a> to check crawling statistics.','sitemap')); ?></small>
       
   812 							</li>
       
   813 							<li>
       
   814 								<input type="checkbox" id="sm_b_pingask" name="sm_b_pingask" <?php echo ($this->sg->GetOption("b_pingask")==true?"checked=\"checked\"":"") ?> />
       
   815 								<label for="sm_b_pingask"><?php _e('Notify Ask.com about updates of your Blog', 'sitemap') ?></label><br />
       
   816 								<small><?php _e('No registration required.','sitemap'); ?></small>
       
   817 							</li>
       
   818 							<li>
       
   819 								<input type="checkbox" id="sm_b_pingyahoo" name="sm_b_pingyahoo" <?php echo ($this->sg->GetOption("b_pingyahoo")==true?"checked=\"checked\"":"") ?> />
       
   820 								<label for="sm_b_pingyahoo"><?php _e('Notify YAHOO about updates of your Blog', 'sitemap') ?></label><br />
       
   821 								<label for="sm_b_yahookey"><?php _e('Your Application ID:', 'sitemap') ?> <input type="text" name="sm_b_yahookey" id="sm_b_yahookey" value="<?php echo $this->sg->GetOption("b_yahookey"); ?>" /></label><br />
       
   822 								<small><?php echo str_replace(array("%s1","%s2"),array($this->sg->GetRedirectLink('sitemap-ykr'),' (<a href="http://developer.yahoo.net/about/">Web Services by Yahoo!</a>)'),__('Don\'t you have such a key? <a href="%s1">Request one here</a>! %s2','sitemap')); ?></small>
       
   823 							</li>
       
   824 							<li>
       
   825 								<label for="sm_b_robots">
       
   826 								<input type="checkbox" id="sm_b_robots" name="sm_b_robots" <?php echo ($this->sg->GetOption("b_robots")==true?"checked=\"checked\"":"") ?> />
       
   827 								<?php _e("Add sitemap URL to the virtual robots.txt file.",'sitemap'); ?>
       
   828 								</label>
       
   829 
       
   830 								<br />
       
   831 								<small><?php _e('The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!','sitemap'); ?></small>
       
   832 							</li>
       
   833 						</ul>
       
   834 						<b><?php _e('Advanced options:','sitemap'); ?></b> <a href="<?php echo $this->sg->GetRedirectLink('sitemap-help-options-adv'); ?>"><?php _e('Learn more','sitemap'); ?></a>
       
   835 						<ul>
       
   836 							<li>
       
   837 								<label for="sm_b_max_posts"><?php _e('Limit the number of posts in the sitemap:', 'sitemap') ?> <input type="text" name="sm_b_max_posts" id="sm_b_max_posts" style="width:40px;" value="<?php echo ($this->sg->GetOption("b_max_posts")<=0?"":$this->sg->GetOption("b_max_posts")); ?>" /></label> (<?php echo __('Newer posts will be included first', 'sitemap'); ?>)
       
   838 							</li>
       
   839 							<li>
       
   840 								<label for="sm_b_memory"><?php _e('Try to increase the memory limit to:', 'sitemap') ?> <input type="text" name="sm_b_memory" id="sm_b_memory" style="width:40px;" value="<?php echo $this->sg->GetOption("b_memory"); ?>" /></label> (<?php echo htmlspecialchars(__('e.g. "4M", "16M"', 'sitemap')); ?>)
       
   841 							</li>
       
   842 							<li>
       
   843 								<label for="sm_b_time"><?php _e('Try to increase the execution time limit to:', 'sitemap') ?> <input type="text" name="sm_b_time" id="sm_b_time" style="width:40px;" value="<?php echo ($this->sg->GetOption("b_time")===-1?'':$this->sg->GetOption("b_time")); ?>" /></label> (<?php echo htmlspecialchars(__('in seconds, e.g. "60" or "0" for unlimited', 'sitemap')) ?>)
       
   844 							</li>
       
   845 							<li>
       
   846 								<?php $useDefStyle = ($this->sg->GetDefaultStyle() && $this->sg->GetOption('b_style_default')===true); ?>
       
   847 								<label for="sm_b_style"><?php _e('Include a XSLT stylesheet:', 'sitemap') ?> <input <?php echo ($useDefStyle?'disabled="disabled" ':'') ?> type="text" name="sm_b_style" id="sm_b_style"  value="<?php echo $this->sg->GetOption("b_style"); ?>" /></label>
       
   848 								(<?php _e('Full or relative URL to your .xsl file', 'sitemap') ?>) <?php if($this->sg->GetDefaultStyle()): ?><label for="sm_b_style_default"><input <?php echo ($useDefStyle?'checked="checked" ':'') ?> type="checkbox" id="sm_b_style_default" name="sm_b_style_default" onclick="document.getElementById('sm_b_style').disabled = this.checked;" /> <?php _e('Use default', 'sitemap') ?> <?php endif; ?>
       
   849 							</li>
       
   850 							<li>
       
   851 								<label for="sm_b_safemode">
       
   852 									<?php $forceSafeMode = (floatval($wp_version)<2.2); ?>
       
   853 									<input type="checkbox" <?php if($forceSafeMode):?>disabled="disabled"<?php endif; ?> id="sm_b_safemode" name="sm_b_safemode" <?php echo ($this->sg->GetOption("b_safemode")==true||$forceSafeMode?"checked=\"checked\"":""); ?> />
       
   854 									<?php _e('Enable MySQL standard mode. Use this only if you\'re getting MySQL errors. (Needs much more memory!)', 'sitemap') ?>
       
   855 									<?php if($forceSafeMode):?> <br /><small><?php _e("Upgrade WordPress at least to 2.2 to enable the faster MySQL access",'sitemap'); ?></small><?php endif; ?>
       
   856 								</label>
       
   857 							</li>
       
   858 							<li>
       
   859 								<label for="sm_b_auto_delay">
       
   860 								<?php $forceDirect = (floatval($wp_version) < 2.1);?>
       
   861 									<input type="checkbox" <?php if($forceDirect):?>disabled="disabled"<?php endif; ?> id="sm_b_auto_delay" name="sm_b_auto_delay" <?php echo ($this->sg->GetOption("b_auto_delay")==true&&!$forceDirect?"checked=\"checked\"":""); ?> />
       
   862 									<?php _e('Build the sitemap in a background process (You don\'t have to wait when you save a post)', 'sitemap') ?>
       
   863 									<?php if($forceDirect):?> <br /><small><?php _e("Upgrade WordPress at least to 2.1 to enable background building",'sitemap'); ?></small><?php endif; ?>
       
   864 								</label>
       
   865 							</li>
       
   866 						</ul>
       
   867 						
       
   868 					<?php $this->HtmlPrintBoxFooter(); ?>
       
   869 					
       
   870 					<?php $this->HtmlPrintBoxHeader('sm_pages',__('Additional pages', 'sitemap')); ?>
       
   871 		
       
   872 						<?php
       
   873 						_e('Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.<br />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');
       
   874 						echo "<ul><li>";
       
   875 						echo "<strong>" . __('Note','sitemap'). "</strong>: ";
       
   876 						_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 &quot;Location of your sitemap file&quot; section on this page)!",'sitemap');
       
   877 						echo "</li><li>";
       
   878 						echo "<strong>" . __('URL to the page','sitemap'). "</strong>: ";
       
   879 						_e("Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home ",'sitemap');
       
   880 						echo "</li><li>";
       
   881 						echo "<strong>" . __('Priority','sitemap') . "</strong>: ";
       
   882 						_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');
       
   883 						echo "</li><li>";
       
   884 						echo "<strong>" . __('Last Changed','sitemap'). "</strong>: ";
       
   885 						_e("Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional).",'sitemap');
       
   886 						
       
   887 						echo "</li></ul>";
       
   888 						
       
   889 						
       
   890 						?>
       
   891 						<script type="text/javascript">
       
   892 							//<![CDATA[
       
   893 							<?php
       
   894 							$freqVals = "'" . implode("','",array_keys($this->sg->_freqNames)). "'";
       
   895 							$freqNames = "'" . implode("','",array_values($this->sg->_freqNames)). "'";
       
   896 							?>
       
   897 
       
   898 							var changeFreqVals = new Array( <?php echo $freqVals; ?> );
       
   899 							var changeFreqNames= new Array( <?php echo $freqNames; ?> );
       
   900 							
       
   901 							var priorities= new Array(0 <?php for($i=0.1; $i<1; $i+=0.1) { echo "," .  number_format($i,1,".",""); } ?>);
       
   902 							
       
   903 							var pages = [ <?php
       
   904 								if(count($this->sg->_pages)>0) {
       
   905 									for($i=0; $i<count($this->sg->_pages); $i++) {
       
   906 										$v=&$this->sg->_pages[$i];
       
   907 										if($i>0) echo ",";
       
   908 										echo '{url:"' . $v->getUrl() . '", priority:' . number_format($v->getPriority(),1,".","") . ', changeFreq:"' . $v->getChangeFreq() . '", lastChanged:"' . ($v!=null && $v->getLastMod()>0?date("Y-m-d",$v->getLastMod()):"") . '"}';
       
   909 									}
       
   910 								}
       
   911 							?> ];
       
   912 							//]]>
       
   913 						</script>
       
   914 						<script type="text/javascript" src="<?php echo $this->sg->GetPluginUrl(); ?>img/sitemap.js"></script>
       
   915 						<table width="100%" cellpadding="3" cellspacing="3" id="sm_pageTable">
       
   916 							<tr>
       
   917 								<th scope="col"><?php _e('URL to the page','sitemap'); ?></th>
       
   918 								<th scope="col"><?php _e('Priority','sitemap'); ?></th>
       
   919 								<th scope="col"><?php _e('Change Frequency','sitemap'); ?></th>
       
   920 								<th scope="col"><?php _e('Last Changed','sitemap'); ?></th>
       
   921 								<th scope="col"><?php _e('#','sitemap'); ?></th>
       
   922 							</tr>
       
   923 							<?php
       
   924 								if(count($this->sg->_pages)<=0) { ?>
       
   925 									<tr>
       
   926 										<td colspan="5" align="center"><?php _e('No pages defined.','sitemap') ?></td>
       
   927 									</tr><?php
       
   928 								}
       
   929 							?>
       
   930 						</table>
       
   931 						<a href="javascript:void(0);" onclick="sm_addPage();"><?php _e("Add new page",'sitemap'); ?></a>
       
   932 					<?php $this->HtmlPrintBoxFooter(); ?>
       
   933 					
       
   934 					
       
   935 					<!-- AutoPrio Options -->
       
   936 					<?php $this->HtmlPrintBoxHeader('sm_postprio',__('Post Priority', 'sitemap')); ?>
       
   937 	
       
   938 						<p><?php _e('Please select how the priority of each post should be calculated:', 'sitemap') ?></p>
       
   939 						<ul>
       
   940 							<li><p><input type="radio" name="sm_b_prio_provider" id="sm_b_prio_provider__0" value="" <?php echo $this->sg->HtmlGetChecked($this->sg->GetOption("b_prio_provider"),"") ?> /> <label for="sm_b_prio_provider__0"><?php _e('Do not use automatic priority calculation', 'sitemap') ?></label><br /><?php _e('All posts will have the same priority which is defined in &quot;Priorities&quot;', 'sitemap') ?></p></li>
       
   941 							<?php
       
   942 							for($i=0; $i<count($this->sg->_prioProviders); $i++) {
       
   943 								echo "<li><p><input type=\"radio\" id=\"sm_b_prio_provider_$i\" name=\"sm_b_prio_provider\" value=\"" . $this->sg->_prioProviders[$i] . "\" " .  $this->sg->HtmlGetChecked($this->sg->GetOption("b_prio_provider"),$this->sg->_prioProviders[$i]) . " /> <label for=\"sm_b_prio_provider_$i\">" . call_user_func(array(&$this->sg->_prioProviders[$i], 'getName'))  . "</label><br />" .  call_user_func(array(&$this->sg->_prioProviders[$i], 'getDescription')) . "</p></li>";
       
   944 							}
       
   945 							?>
       
   946 						</ul>
       
   947 					<?php $this->HtmlPrintBoxFooter(); ?>
       
   948 				
       
   949 						
       
   950 					<!-- Location Options -->
       
   951 					<?php $this->HtmlPrintBoxHeader('sm_location',__('Location of your sitemap file', 'sitemap')); ?>
       
   952 		
       
   953 						<div>
       
   954 							<b><label for="sm_location_useauto"><input type="radio" id="sm_location_useauto" name="sm_b_location_mode" value="auto" <?php echo ($this->sg->GetOption("b_location_mode")=="auto"?"checked=\"checked\"":"") ?> /> <?php _e('Automatic detection','sitemap') ?></label></b>
       
   955 							<ul>
       
   956 								<li>
       
   957 									<label for="sm_b_filename">
       
   958 										<?php _e('Filename of the sitemap file', 'sitemap') ?>
       
   959 										<input type="text" id="sm_b_filename" name="sm_b_filename" value="<?php echo $this->sg->GetOption("b_filename"); ?>" />
       
   960 									</label><br />
       
   961 									<?php _e('Detected Path', 'sitemap') ?>: <?php echo $this->sg->getXmlPath(true); ?><br /><?php _e('Detected URL', 'sitemap') ?>: <a href="<?php echo $this->sg->getXmlUrl(true); ?>"><?php echo $this->sg->getXmlUrl(true); ?></a>
       
   962 								</li>
       
   963 							</ul>
       
   964 						</div>
       
   965 						<div>
       
   966 							<b><label for="sm_location_usemanual"><input type="radio" id="sm_location_usemanual" name="sm_b_location_mode" value="manual" <?php echo ($this->sg->GetOption("b_location_mode")=="manual"?"checked=\"checked\"":"") ?>  /> <?php _e('Custom location','sitemap') ?></label></b>
       
   967 							<ul>
       
   968 								<li>
       
   969 									<label for="sm_b_filename_manual">
       
   970 										<?php _e('Absolute or relative path to the sitemap file, including name.','sitemap');
       
   971 										echo "<br />";
       
   972 										_e('Example','sitemap');
       
   973 										echo ": /var/www/htdocs/wordpress/sitemap.xml"; ?><br />
       
   974 										<input style="width:70%" type="text" id="sm_b_filename_manual" name="sm_b_filename_manual" value="<?php echo (!$this->sg->GetOption("b_filename_manual")?$this->sg->getXmlPath():$this->sg->GetOption("b_filename_manual")); ?>" />
       
   975 									</label>
       
   976 								</li>
       
   977 								<li>
       
   978 									<label for="sm_b_fileurl_manual">
       
   979 										<?php _e('Complete URL to the sitemap file, including name.','sitemap');
       
   980 										echo "<br />";
       
   981 										_e('Example','sitemap');
       
   982 										echo ": http://www.yourdomain.com/sitemap.xml"; ?><br />
       
   983 										<input style="width:70%" type="text" id="sm_b_fileurl_manual" name="sm_b_fileurl_manual" value="<?php echo (!$this->sg->GetOption("b_fileurl_manual")?$this->sg->getXmlUrl():$this->sg->GetOption("b_fileurl_manual")); ?>" />
       
   984 									</label>
       
   985 								</li>
       
   986 							</ul>
       
   987 						</div>
       
   988 						
       
   989 					<?php $this->HtmlPrintBoxFooter(); ?>
       
   990 					
       
   991 					<!-- Includes -->
       
   992 					<?php $this->HtmlPrintBoxHeader('sm_includes',__('Sitemap Content', 'sitemap')); ?>
       
   993 					
       
   994 						<ul>
       
   995 							<li>
       
   996 								<label for="sm_in_home">
       
   997 									<input type="checkbox" id="sm_in_home" name="sm_in_home"  <?php echo ($this->sg->GetOption("in_home")==true?"checked=\"checked\"":"") ?> />
       
   998 									<?php _e('Include homepage', 'sitemap') ?>
       
   999 								</label>
       
  1000 							</li>
       
  1001 							<li>
       
  1002 								<label for="sm_in_posts">
       
  1003 									<input type="checkbox" id="sm_in_posts" name="sm_in_posts"  <?php echo ($this->sg->GetOption("in_posts")==true?"checked=\"checked\"":"") ?> />
       
  1004 									<?php _e('Include posts', 'sitemap') ?>
       
  1005 								</label>
       
  1006 							</li>
       
  1007 							<li>
       
  1008 								<label for="sm_in_posts_sub">
       
  1009 									<input type="checkbox" id="sm_in_posts_sub" name="sm_in_posts_sub"  <?php echo ($this->sg->GetOption("in_posts_sub")==true?"checked=\"checked\"":"") ?> />
       
  1010 									<?php _e('Include following pages of multi-page posts (Increases build time and memory usage!)', 'sitemap') ?>
       
  1011 								</label>
       
  1012 							</li>
       
  1013 							<li>
       
  1014 								<label for="sm_in_pages">
       
  1015 									<input type="checkbox" id="sm_in_pages" name="sm_in_pages"  <?php echo ($this->sg->GetOption("in_pages")==true?"checked=\"checked\"":"") ?> />
       
  1016 									<?php _e('Include static pages', 'sitemap') ?>
       
  1017 								</label>
       
  1018 							</li>
       
  1019 							<li>
       
  1020 								<label for="sm_in_cats">
       
  1021 									<input type="checkbox" id="sm_in_cats" name="sm_in_cats"  <?php echo ($this->sg->GetOption("in_cats")==true?"checked=\"checked\"":"") ?> />
       
  1022 									<?php _e('Include categories', 'sitemap') ?>
       
  1023 								</label>
       
  1024 							</li>
       
  1025 							<li>
       
  1026 								<label for="sm_in_arch">
       
  1027 									<input type="checkbox" id="sm_in_arch" name="sm_in_arch"  <?php echo ($this->sg->GetOption("in_arch")==true?"checked=\"checked\"":"") ?> />
       
  1028 									<?php _e('Include archives', 'sitemap') ?>
       
  1029 								</label>
       
  1030 							</li>
       
  1031 							<?php if($this->sg->IsTaxonomySupported()): ?>
       
  1032 							<li>
       
  1033 								<label for="sm_in_tags">
       
  1034 									<input type="checkbox" id="sm_in_tags" name="sm_in_tags"  <?php echo ($this->sg->GetOption("in_tags")==true?"checked=\"checked\"":"") ?> />
       
  1035 									<?php _e('Include tag pages', 'sitemap') ?>
       
  1036 								</label>
       
  1037 							</li>
       
  1038 							<?php
       
  1039 								$taxonomies = $this->sg->GetCustomTaxonomies();
       
  1040 								
       
  1041 								$enabledTaxonomies = $this->sg->GetOption('in_tax');
       
  1042 								
       
  1043 								foreach ($taxonomies as $taxName) {
       
  1044 										
       
  1045 									$taxonomy = get_taxonomy($taxName);
       
  1046 									$selected = in_array($taxonomy->name, $enabledTaxonomies);
       
  1047 									?>
       
  1048 									<li>
       
  1049 										<label for="sm_in_tax[<?php echo $taxonomy->name; ?>]">
       
  1050 											<input type="checkbox" id="sm_in_tax[<?php echo $taxonomy->name; ?>]" name="sm_in_tax[<?php echo $taxonomy->name; ?>]" <?php echo $selected?"checked=\"checked\"":""; ?> />
       
  1051 											<?php echo str_replace('%s',$taxonomy->label,__('Include taxonomy pages for %s', 'sitemap')); ?>
       
  1052 										</label>
       
  1053 									<li>
       
  1054 									<?php
       
  1055 								}
       
  1056 							?>
       
  1057 							<?php endif; ?>
       
  1058 							<li>
       
  1059 								<label for="sm_in_auth">
       
  1060 									<input type="checkbox" id="sm_in_auth" name="sm_in_auth"  <?php echo ($this->sg->GetOption("in_auth")==true?"checked=\"checked\"":"") ?> />
       
  1061 									<?php _e('Include author pages', 'sitemap') ?>
       
  1062 								</label>
       
  1063 							</li>
       
  1064 						</ul>
       
  1065 						<b><?php _e('Further options', 'sitemap') ?>:</b>
       
  1066 						<ul>
       
  1067 							<li>
       
  1068 								<label for="sm_in_lastmod">
       
  1069 									<input type="checkbox" id="sm_in_lastmod" name="sm_in_lastmod"  <?php echo ($this->sg->GetOption("in_lastmod")==true?"checked=\"checked\"":"") ?> />
       
  1070 									<?php _e('Include the last modification time.', 'sitemap') ?>
       
  1071 								</label><br />
       
  1072 								<small><?php _e('This is highly recommended and helps the search engines to know when your content has changed. This option affects <i>all</i> sitemap entries.', 'sitemap') ?></small>
       
  1073 							</li>
       
  1074 						</ul>
       
  1075 						
       
  1076 					<?php $this->HtmlPrintBoxFooter(); ?>
       
  1077 					
       
  1078 					<!-- Excluded Items -->
       
  1079 					<?php $this->HtmlPrintBoxHeader('sm_excludes',__('Excluded items', 'sitemap')); ?>
       
  1080 					
       
  1081 						<b><?php _e('Excluded categories', 'sitemap') ?>:</b>
       
  1082 						<?php if(version_compare($wp_version,"2.5.1",">=")): ?>
       
  1083 							<cite style="display:block; margin-left:40px;"><?php _e("Note","sitemap") ?>: <?php _e("Using this feature will increase build time and memory usage!","sitemap"); ?></cite>
       
  1084 							<div style="border-color:#CEE1EF; border-style:solid; border-width:2px; height:10em; margin:5px 0px 5px 40px; overflow:auto; padding:0.5em 0.5em;">
       
  1085 							<ul>
       
  1086 								<?php wp_category_checklist(0,0,$this->sg->GetOption("b_exclude_cats"),false); ?>
       
  1087 							</ul>
       
  1088 							</div>
       
  1089 						<?php else: ?>
       
  1090 							<ul><li><?php  echo sprintf(__("This feature requires at least WordPress 2.5.1, you are using %s","sitemap"),$wp_version); ?></li></ul>
       
  1091 						<?php endif; ?>
       
  1092 						
       
  1093 						<b><?php _e("Exclude posts","sitemap"); ?>:</b>
       
  1094 						<div style="margin:5px 0 13px 40px;">
       
  1095 							<label for="sm_b_exclude"><?php _e('Exclude the following posts or pages:', 'sitemap') ?> <small><?php _e('List of IDs, separated by comma', 'sitemap') ?></small><br />
       
  1096 							<input name="sm_b_exclude" id="sm_b_exclude" type="text" style="width:400px;" value="<?php echo implode(",",$this->sg->GetOption("b_exclude")); ?>" /></label><br />
       
  1097 							<cite><?php _e("Note","sitemap") ?>: <?php _e("Child posts won't be excluded automatically!","sitemap"); ?></cite>
       
  1098 						</div>
       
  1099 						
       
  1100 					<?php $this->HtmlPrintBoxFooter(); ?>
       
  1101 					
       
  1102 					<!-- Change frequencies -->
       
  1103 					<?php $this->HtmlPrintBoxHeader('sm_change_frequencies',__('Change frequencies', 'sitemap')); ?>
       
  1104 
       
  1105 						<p>
       
  1106 							<b><?php _e('Note', 'sitemap') ?>:</b>
       
  1107 							<?php _e('Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked "hourly" less frequently than that, and they may crawl pages marked "yearly" more frequently than that. It is also likely that crawlers will periodically crawl pages marked "never" so that they can handle unexpected changes to those pages.', 'sitemap') ?>
       
  1108 						</p>
       
  1109 						<ul>
       
  1110 							<li>
       
  1111 								<label for="sm_cf_home">
       
  1112 									<select id="sm_cf_home" name="sm_cf_home"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_home")); ?></select>
       
  1113 									<?php _e('Homepage', 'sitemap') ?>
       
  1114 								</label>
       
  1115 							</li>
       
  1116 							<li>
       
  1117 								<label for="sm_cf_posts">
       
  1118 									<select id="sm_cf_posts" name="sm_cf_posts"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_posts")); ?></select>
       
  1119 									<?php _e('Posts', 'sitemap') ?>
       
  1120 								</label>
       
  1121 							</li>
       
  1122 							<li>
       
  1123 								<label for="sm_cf_pages">
       
  1124 									<select id="sm_cf_pages" name="sm_cf_pages"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_pages")); ?></select>
       
  1125 									<?php _e('Static pages', 'sitemap') ?>
       
  1126 								</label>
       
  1127 							</li>
       
  1128 							<li>
       
  1129 								<label for="sm_cf_cats">
       
  1130 									<select id="sm_cf_cats" name="sm_cf_cats"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_cats")); ?></select>
       
  1131 									<?php _e('Categories', 'sitemap') ?>
       
  1132 								</label>
       
  1133 							</li>
       
  1134 							<li>
       
  1135 								<label for="sm_cf_arch_curr">
       
  1136 									<select id="sm_cf_arch_curr" name="sm_cf_arch_curr"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_arch_curr")); ?></select>
       
  1137 									<?php _e('The current archive of this month (Should be the same like your homepage)', 'sitemap') ?>
       
  1138 								</label>
       
  1139 							</li>
       
  1140 							<li>
       
  1141 								<label for="sm_cf_arch_old">
       
  1142 									<select id="sm_cf_arch_old" name="sm_cf_arch_old"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_arch_old")); ?></select>
       
  1143 									<?php _e('Older archives (Changes only if you edit an old post)', 'sitemap') ?>
       
  1144 								</label>
       
  1145 							</li>
       
  1146 							<?php if($this->sg->IsTaxonomySupported()): ?>
       
  1147 							<li>
       
  1148 								<label for="sm_cf_tags">
       
  1149 									<select id="sm_cf_tags" name="sm_cf_tags"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_tags")); ?></select>
       
  1150 									<?php _e('Tag pages', 'sitemap') ?>
       
  1151 								</label>
       
  1152 							</li>
       
  1153 							<?php endif; ?>
       
  1154 							<li>
       
  1155 								<label for="sm_cf_auth">
       
  1156 									<select id="sm_cf_auth" name="sm_cf_auth"><?php $this->sg->HtmlGetFreqNames($this->sg->GetOption("cf_auth")); ?></select>
       
  1157 									<?php _e('Author pages', 'sitemap') ?>
       
  1158 								</label>
       
  1159 							</li>
       
  1160 						</ul>
       
  1161 						
       
  1162 					<?php $this->HtmlPrintBoxFooter(); ?>
       
  1163 					
       
  1164 					<!-- Priorities -->
       
  1165 					<?php $this->HtmlPrintBoxHeader('sm_priorities',__('Priorities', 'sitemap')); ?>
       
  1166 						<ul>
       
  1167 							<li>
       
  1168 								<label for="sm_pr_home">
       
  1169 									<select id="sm_pr_home" name="sm_pr_home"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_home")); ?></select>
       
  1170 									<?php _e('Homepage', 'sitemap') ?>
       
  1171 								</label>
       
  1172 							</li>
       
  1173 							<li>
       
  1174 								<label for="sm_pr_posts">
       
  1175 									<select id="sm_pr_posts" name="sm_pr_posts"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_posts")); ?></select>
       
  1176 									<?php _e('Posts (If auto calculation is disabled)', 'sitemap') ?>
       
  1177 								</label>
       
  1178 							</li>
       
  1179 							<li>
       
  1180 								<label for="sm_pr_posts_min">
       
  1181 									<select id="sm_pr_posts_min" name="sm_pr_posts_min"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_posts_min")); ?></select>
       
  1182 									<?php _e('Minimum post priority (Even if auto calculation is enabled)', 'sitemap') ?>
       
  1183 								</label>
       
  1184 							</li>
       
  1185 							<li>
       
  1186 								<label for="sm_pr_pages">
       
  1187 									<select id="sm_pr_pages" name="sm_pr_pages"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_pages")); ?></select>
       
  1188 									<?php _e('Static pages', 'sitemap'); ?>
       
  1189 								</label>
       
  1190 							</li>
       
  1191 							<li>
       
  1192 								<label for="sm_pr_cats">
       
  1193 									<select id="sm_pr_cats" name="sm_pr_cats"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_cats")); ?></select>
       
  1194 									<?php _e('Categories', 'sitemap') ?>
       
  1195 								</label>
       
  1196 							</li>
       
  1197 							<li>
       
  1198 								<label for="sm_pr_arch">
       
  1199 									<select id="sm_pr_arch" name="sm_pr_arch"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_arch")); ?></select>
       
  1200 									<?php _e('Archives', 'sitemap') ?>
       
  1201 								</label>
       
  1202 							</li>
       
  1203 							<?php if($this->sg->IsTaxonomySupported()): ?>
       
  1204 							<li>
       
  1205 								<label for="sm_pr_tags">
       
  1206 									<select id="sm_pr_tags" name="sm_pr_tags"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_tags")); ?></select>
       
  1207 									<?php _e('Tag pages', 'sitemap') ?>
       
  1208 								</label>
       
  1209 							</li>
       
  1210 							<?php endif; ?>
       
  1211 							<li>
       
  1212 								<label for="sm_pr_auth">
       
  1213 									<select id="sm_pr_auth" name="sm_pr_auth"><?php $this->sg->HtmlGetPriorityValues($this->sg->GetOption("pr_auth")); ?></select>
       
  1214 									<?php _e('Author pages', 'sitemap') ?>
       
  1215 								</label>
       
  1216 							</li>
       
  1217 						</ul>
       
  1218 						
       
  1219 					<?php $this->HtmlPrintBoxFooter(); ?>
       
  1220 					
       
  1221 					</div>
       
  1222 					<div>
       
  1223 						<p class="submit">
       
  1224 							<?php wp_nonce_field('sitemap') ?>
       
  1225 							<input type="submit" name="sm_update" value="<?php _e('Update options', 'sitemap'); ?>" />
       
  1226 							<input type="submit" onclick='return confirm("Do you really want to reset your configuration?");' class="sm_warning" name="sm_reset_config" value="<?php _e('Reset options', 'sitemap'); ?>" />
       
  1227 						</p>
       
  1228 					</div>
       
  1229 				
       
  1230 				<?php if($this->mode == 27): ?>
       
  1231 				</div>
       
  1232 				</div>
       
  1233 				<?php endif; ?>
       
  1234 				</div>
       
  1235 				<script type="text/javascript">if(typeof(sm_loadPages)=='function') addLoadEvent(sm_loadPages); </script>
       
  1236 			</form>
       
  1237 			<form action="https://www.paypal.com/cgi-bin/webscr" method="post" id="sm_donate_form">
       
  1238 				<?php
       
  1239 					$lc = array(
       
  1240 						"en"=>array("cc"=>"USD","lc"=>"US"),
       
  1241 						"en-GB"=>array("cc"=>"GBP","lc"=>"GB"),
       
  1242 						"de"=>array("cc"=>"EUR","lc"=>"DE"),
       
  1243 					);
       
  1244 					$myLc = $lc["en"];
       
  1245 					$wpl = get_bloginfo('language');
       
  1246 					if(!empty($wpl)) {
       
  1247 						if(array_key_exists($wpl,$lc)) $myLc = $lc[$wpl];
       
  1248 						else {
       
  1249 							$wpl = substr($wpl,0,2);
       
  1250 							if(array_key_exists($wpl,$lc)) $myLc = $lc[$wpl];
       
  1251 						}
       
  1252 					}
       
  1253 				?>
       
  1254 				<input type="hidden" name="cmd" value="_xclick" />
       
  1255 				<input type="hidden" name="business" value="<?php echo "donate" /* N O S P A M */ . "@" . "arnebra" . "chhold.de"; ?>" />
       
  1256 				<input type="hidden" name="item_name" value="Sitemap Generator for WordPress. Please tell me if if you don't want to be listed on the donator list." />
       
  1257 				<input type="hidden" name="no_shipping" value="1" />
       
  1258 				<input type="hidden" name="return" value="<?php echo 'http://' . $_SERVER['HTTP_HOST'] . $this->sg->GetBackLink(); ?>&amp;sm_donated=true" />
       
  1259 				<input type="hidden" name="item_number" value="0001" />
       
  1260 				<input type="hidden" name="currency_code" value="<?php echo $myLc["cc"]; ?>" />
       
  1261 				<input type="hidden" name="bn" value="PP-BuyNowBF" />
       
  1262 				<input type="hidden" name="lc" value="<?php echo $myLc["lc"]; ?>" />
       
  1263 				<input type="hidden" name="rm" value="2" />
       
  1264 				<input type="hidden" name="on0" value="Your Website" />
       
  1265 				<input type="hidden" name="os0" value="<?php echo get_bloginfo("home"); ?>"/>
       
  1266 			</form>
       
  1267 		</div>
       
  1268 		<?php
       
  1269 	}
       
  1270 }
       
  1271