3 include("energie/common.php");
5 heading(false/*title*/);
7 prepvar("find",".+",false /* require */);
11 <form action="index.php" method="post">
12 <input type="text" name="find" size="30" />
13 <input type="submit" value="Vyhledat" />
16 footer(true /* delimit */);
19 $families=db_query("select distinct family_id from $tb_tree"
20 ." where name like \"".quotemeta($find)."%\""
21 ." order by family_id");
23 function fieldquote($prefix,$field,$class)
26 if (!isset($row[$field]))
28 return $prefix."<span class=\"$class\">".htmlspecialchars($row[$field])."</span>";
32 while (($family_row=mysql_fetch_array($families))) {
35 $family_id=$family_row["family_id"];
36 $result=db_query("select id,name,Publication,Notes,html from $tb_tree"
37 ." where family_id=\"$family_id\""
38 ." order by family_id,family_order");
40 while (($row=mysql_fetch_array($result))) {
48 print(fieldquote("","name","name")
49 .fieldquote("\n","Publ. Author","author")
50 .fieldquote("<br />\n","Publication","publication")
51 .fieldquote("<br />\n","Notes","notes")
53 if (isset($row["html"])) {
54 $import="import: [".$row["id"]."]";
55 $html=eregi_replace("< */? *a( [^>]*)?>","",$row["html"]);
56 print("<br />\n<blockquote><!-- BEGIN $import -->\n".$html."\n<!-- END $import --></blockquote>");
71 mysql_free_result($result);
73 footer(false /* delimit */);