/** Baidu sitemap page **/ function baidu_sitemap_form() { $get_baidu_sitemap_options = get_option(BAIDU_SITEMAP_OPTION); //print_r($get_baidu_sitemap_options); if (empty($get_baidu_sitemap_options)) { global $current_user; $lc_blog_url = get_bloginfo('url'); get_currentuserinfo(); $lc_admin_email = $current_user->user_email; $lc_updatePeri = "24"; $lc_limits = "50"; } else { list($lc_blog_url, $lc_admin_email, $lc_updatePeri, $lc_limits, $lc_sitemap_auto, $lc_order_1, $lc_order_2, $lc_order_3, $lc_comments, $lc_post_length, $lc_post_cat, $lc_post_views, $lc_pickcats, $lc_comments_count, $lc_views_count, $lc_sitemap_html, $lc_sitemap_publish_post, $lc_support, $lc_baidu_sitemap_by_post) = explode("|", $get_baidu_sitemap_options); } ?> <div class="postbox-container" style="width:75%;"> <div class="metabox-holder"> <div class="meta-box-sortables"> <div class="tool-box"> <h3 class="title"><?php _e('Preferences', 'baidu_sitemap'); ?> </h3> <p><?php _e('Parameter setting for Baidu Sitemap Generator Plugin. ', 'baidu_sitemap'); ?> </p> <a name="baidu_sitemap_options"></a><form name="baidu_sitemap_options" method="post" action=""> <input type="hidden" name="action" value="build_options" /> <table> <tr><td><label for="advanced_options"><h3><?php _e('General Options', 'baidu_sitemap'); ?> </h3></label></td></tr> <tr><td><label for="lc_blog_url"><?php _e('Blog Homepage', 'baidu_sitemap'); ?> </label></td><td><input type="text" size="50" name="lc_blog_url" value="<?php echo $lc_blog_url; ?> " /></td><td><a title="<?php _e('The end without / symbol', 'baidu_sitemap'); ?> ">[?]</a><td></tr> <tr><td><label for="lc_admin_email"><?php _e('Manager Email', 'baidu_sitemap'); ?> </label></td><td><input type="text" size="50" maxlength="200" name="lc_admin_email" value="<?php echo $lc_admin_email; ?> " /></td><td><a title="<?php _e('Baidu will contact you use this Email if necessary', 'baidu_sitemap'); ?> ">[?]</a><td></tr> <tr><td><label for="lc_updatePeri"><?php _e('Update Period(hour)', 'baidu_sitemap'); ?> </label></td><td><input type="text" size="50" maxlength="200" name="lc_updatePeri" value="<?php echo $lc_updatePeri; ?> " /></td><td><a title="<?php _e('Updated in 24 hour is more suitable. Unless you publish a lot of post one day.', 'baidu_sitemap'); ?> ">[?]</a><td></tr> <tr><td><label for="lc_limits"><?php _e('Post Count', 'baidu_sitemap'); ?> </label></td><td><input type="text" size="50" maxlength="200" name="lc_limits" value="<?php echo $lc_limits; ?> " /></td><td><a title="<?php _e('XML file just need include the Recent Post and Update Post. Needs much more memory if increase the Post Count.', 'baidu_sitemap'); ?> ">[?]</a><td></tr> <tr><td><label for="lc_sitemap_auto"><?php _e('Auto build the sitemap', 'baidu_sitemap'); ?> </label></td><td><input type="checkbox" id="lc_sitemap_auto" name="lc_sitemap_auto" value="1" <?php if (empty($get_baidu_sitemap_options) || $lc_sitemap_auto == '1') { echo 'checked="checked"'; } ?> /></td></tr> <?php Lc_advanced_options(); Lc_expand_option(); ?> </table> <p class="submit"><input type="submit" class="button-primary" value="<?php if (empty($get_baidu_sitemap_options)) { _e('Active the options first', 'baidu_sitemap'); } else { _e('Update options', 'baidu_sitemap'); } ?> " /></p> </form> </div> <div class="tool-box"> <h3 class="title"><?php _e('Write a XML file', 'baidu_sitemap'); ?> </h3> <p><?php _e('When active the options, you can create a XML file here. or Rebulid the sitemap file after update options or other else.', 'baidu_sitemap'); ?> </p> <p><?php rebuild_message(); ?> </p> <?php if (!empty($get_baidu_sitemap_options)) { ?> <a name="baidu_sitemap_build"></a><form name="baidu_sitemap_build" method="post" action=""> <input type="hidden" name="action" value="build_xml" /> <p class="submit"><input type="submit" class="button-primary" value="<?php if (file_exists(GetHomePath() . 'sitemap_baidu.xml')) { _e('Update XML file', 'baidu_sitemap'); } else { _e('Write a XML file', 'baidu_sitemap'); } ?> " /></p> </form> <?php } else { print '<p>'; _e('There is nothing to do, Please Active the options first.', 'baidu_sitemap'); print '</p>'; } ?> </div> <?php /** show the XML file if exist **/ xml_file_exist(); /** Show others information **/ lc_text(); ?> </div> </div> </div> <?php }
/** Baidu sitemap page **/ function baidu_sitemap_form() { $array_baidu_sitemap_options = get_baidu_sitemap_options(); ?> <div class="postbox-container" style="width:75%;"> <div class="metabox-holder"> <div class="meta-box-sortables"> <div class="tool-box"> <h3 class="title"><?php _e('Preferences', 'baidu_sitemap'); ?> </h3> <p><?php _e('Parameter setting for Baidu Sitemap Generator Plugin. ', 'baidu_sitemap'); ?> </p> <a name="baidu_sitemap_options"></a><form name="baidu_sitemap_options" method="post" action=""> <input type="hidden" name="action" value="build_options" /> <table> <tr><td><h3><?php _e('General Options', 'baidu_sitemap'); ?> </h3></td></tr> <tr><td><?php _e('Enabled XML Sitemap', 'baidu_sitemap'); ?> </td><td><input type="checkbox" name="lc_is_Enabled_XML_Sitemap" value="1" <?php if ($array_baidu_sitemap_options['lc_is_Enabled_XML_Sitemap']) { echo 'checked="checked"'; } ?> /></td></tr> <tr><td><?php _e('Enabled Html Sitemap', 'baidu_sitemap'); ?> </td><td><input type="checkbox" name="lc_is_Enabled_Html_Sitemap" value="1" <?php if ($array_baidu_sitemap_options['lc_is_Enabled_Html_Sitemap']) { echo 'checked="checked"'; } ?> /></td><td><a title="<?php _e('Also Build a real Static Sitemap-Page for all Search Engine.', 'baidu_sitemap'); ?> ">[?]</a><td></tr> <tr><td><?php _e('Update Sitemap when Publish Post', 'baidu_sitemap'); ?> </td><td><input type="checkbox" name="lc_is_update_sitemap_when_post" value="1" <?php if ($array_baidu_sitemap_options['lc_is_update_sitemap_when_post']) { echo 'checked="checked"'; } ?> /></td></tr> <tr><td><?php _e('Post Limit 1000', 'baidu_sitemap'); ?> </td><td><input type="checkbox" name="lc_post_limit1000" value="1" <?php if ($array_baidu_sitemap_options['lc_post_limit1000']) { echo 'checked="checked"'; } ?> /></td><td><a title="<?php _e('XML file just need include the Recent Post and Update Post. Needs much more memory if increase the Post Count.', 'baidu_sitemap'); ?> ">[?]</a><td></tr> </table> <p class="submit"><input type="submit" class="button-primary" /></p> </form> </div> <div class="tool-box"> <h3 class="title"><?php _e('Write a XML file', 'baidu_sitemap'); ?> </h3> <form name="baidu_sitemap_build" method="post" action=""> <input type="hidden" name="action" value="build_xml" /> <p class="submit"><input type="submit" class="button-primary" value="Update XML file" /></p> </form> </div> <?php /** show the XML file if exist **/ xml_file_exist(); /** Show others information **/ lc_text(); ?> </div> </div> </div> <?php }