404.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. <?php
  3. $options = get_option('philna_options');
  4. if($options['feed'] && $options['feed_url']) {
  5. if (substr(strtoupper($options['feed_url']), 0, 7) == 'HTTP://') {
  6. $feed = $options['feed_url'];
  7. } else {
  8. $feed = 'http://' . $options['feed_url'];
  9. }
  10. } else {
  11. $feed = get_bloginfo('rss2_url');
  12. }
  13. ?>
  14. <html xmlns="http://www.w3.org/1999/xhtml">
  15. <head profile="http://gmpg.org/xfn/11">
  16. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  17. <title><?php yinheli_title();?></title>
  18. <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
  19. <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); _e('RSS 2.0 - posts', 'philna'); ?> RSS Feed" href="<?php echo $feed; ?>" />
  20. <link rel="alternate" type="application/rss+xml" title="<?php _e('RSS 2.0 - all comments', 'philna'); ?>" href="<?php bloginfo('comments_rss2_url'); ?>" />
  21. <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  22. <?php if(is_single()){ ?><link rel="canonical" href="<?php echo get_permalink($post->ID);?>" /><?php }?>
  23. <?php if(is_home() || is_page() || is_tag() || is_category() || is_month() || is_year()){ ?><link rel="canonical" href="<?php bloginfo('url');?>" /><?php }?>
  24. <?php yinheli_meta_dec();?>
  25. <?php wp_head(); ?>
  26. </head>
  27. <body>
  28. <div id="main">
  29. <div id="warp">
  30. <div id="page">
  31. <div id="header">
  32. <div id="title">
  33. <h1><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>
  34. <div id="dec"><?php bloginfo('description'); ?></div>
  35. </div>
  36. <div id="header-right">
  37. <div id="search">
  38. <?php if($options['google_cse'] && $options['google_cse_cx']) : ?>
  39. <form action="http://www.google.com/cse" method="get">
  40. <div>
  41. <input type="text" class="textfield" name="q" size="24" value="Search" onblur="if(this.value == ''){this.value= 'Search';}" onfocus="this.value='';" />
  42. <input type="hidden" name="cx" value="<?php echo $options['google_cse_cx']; ?>" />
  43. <input type="hidden" name="ie" value="UTF-8" />
  44. </div>
  45. </form>
  46. <?php else : ?>
  47. <form action="<?php bloginfo('home'); ?>" method="get">
  48. <div>
  49. <input type="text" class="textfield" name="s" size="24" value="<?php echo esc_html($s); ?>" />
  50. </div>
  51. </form>
  52. <?php endif; ?>
  53. </div>
  54. <div id="feed">
  55. <?php if($options['feed_email'] && $options['feed_url_email']) : ?>
  56. <a id="mailfeed" href="<?php echo $options['feed_url_email']; ?>" title="<?php _e('E_mail Feed','philna')?>">E_mail Feed</a>
  57. <?php endif;?>
  58. <a id="rssfeed" href="<?php echo $feed ;?>" title="<?php _e('Rss Feed','philna')?>">Rss Feed</a>
  59. </div>
  60. </div>
  61. </div>
  62. <div id="nav">
  63. <ul id="menus">
  64. <li class="home <?php if(is_home()) echo "current_page_item";?>"><a href="<?php echo get_option('home'); ?>/"><?php _e('Home','philna')?></a></li>
  65. <?php wp_list_pages('depth=1&title_li=0&sort_column=menu_order'); ?>
  66. </ul>
  67. </div>
  68. <div id="container">
  69. <div id="content">
  70. <div class="post">
  71. <div id="errorpage">
  72. <h1><?php _e('Welcome to 404 error page!', 'philna'); ?></h1>
  73. <p><?php _e("Welcome to this customized error page. You've reached this page because you've clicked on a link that does not exist. This is probably our fault... but instead of showing you the basic '404 Error' page that is confusing and doesn't really explain anything, we've created this page to explain what went wrong.", 'philna'); ?></p>
  74. <h2><?php _e('try to search', 'philna'); ?></h2>
  75. <?php if($options['google_cse'] && $options['google_cse_cx']) : ?>
  76. <div id="use-google">
  77. <p>Google custom search</p>
  78. <form action="http://www.google.com/cse" method="get">
  79. <div class="content">
  80. <input type="text" class="textfield" name="q" size="24" />
  81. <input type="hidden" name="cx" value="<?php echo $options['google_cse_cx']; ?>" />
  82. <input type="hidden" name="ie" value="UTF-8" />
  83. <input class="searchbtn" type="submit" value=""/>
  84. </div>
  85. </form>
  86. </div>
  87. <?php endif;?>
  88. <div id="use-wp-self">
  89. <p>Wordpress search</p>
  90. <form action="<?php bloginfo('home'); ?>" method="get">
  91. <div class="content">
  92. <input type="text" class="textfield" name="s" size="24" value="<?php echo esc_html($s); ?>" />
  93. <input class="searchbtn" type="submit" value=""/>
  94. </div>
  95. </form>
  96. </div>
  97. </div>
  98. </div>
  99. <?php get_footer(); ?>