- <shortname> is used in indexes, <fullname> everywhere else
function print_article($row)
{
- print("<h2>".htmlspecialchars($row["name"])."</h2>\n".$row["contents"]);
+ print("<h2>".htmlspecialchars(ereg_replace("\\|.*\$","",$row["name"]))."</h2>\n".$row["contents"]);
}
if (isset($id))
$result=db_query("select name,id from $tb_clanek where year=$year and month=$month order by id");
while ($row=mysql_fetch_array($result))
print("• <a href=\"clanek.php?year=$year&month=$month&id=".$row["id"]."\">"
- .htmlspecialchars($row["name"])."</a><br />\n");
+ .htmlspecialchars(ereg_replace("^.*\\|","",$row["name"]))."</a><br />\n");
mysql_free_result($result);
print("</td></tr></table>");
}
. " and month=".$row["month"]
);
while ($article_row=mysql_fetch_array($article_result))
- $contents=ereg_replace("$sep_obsah_contents(".quotemeta($article_row["name"]).")([\n$page_obsah_contents])",
+ $contents=ereg_replace("$sep_obsah_contents("
+ .quotemeta(ereg_replace("\\|.*\$","",$article_row["name"]))
+ .")([\n$page_obsah_contents])",
"$sep_obsah_contents"
."<a href=\"clanek.php?year=".$row["year"]."&month=".$row["month"]."&id=".$article_row["id"]."\">"
."\\1</a>"