Prevent indexing of pages with multiple months of the content, any
[www.energie.vellum.cz.git] / common.php
index 8a7b6ed..34f3ec6 100644 (file)
@@ -67,7 +67,7 @@ function fatal($msg="UNKNOWN")
 {
        global $admin_mail;
 
-       heading(false/*title*/); // it is always safe
+       heading(false/*title*/,false/*indexme*/); // notitle is always safe, don't index the error message
        print("\n<p>&nbsp;<br />&nbsp;</p><hr /><h1 class=\"error\">Nastala chyba pøi zpracování: $msg!</h1>\n"
                        ."<p>Mù¾ete tento problém nahlásit <a href=\"mailto:$admin_mail\">správci tohoto webu</a>.</p>\n");
        footer();
@@ -710,7 +710,7 @@ function no_cache()
        header("Pragma: no-cache");                                // HTTP/1.0
 }
 
-function heading($title=true)
+function heading($title=true,$indexme=true)
 {
        global $msie_major,$mozilla_major,$title_tail,$head_css,$have_css,$head,$heading_done,$title_prefix,$force_charset;
 
@@ -755,6 +755,7 @@ h1,h2    { color: yellow; background-color: transparent; }
                        print(trim($head_css)."\n");
                print("--></style>\n");
                }
+       print('<meta name="robots" content="'.($indexme ? "" : "no" ).'index,follow" />'."\n");
        if (isset($head))
                print($head);
        print("</head><body");