list($title) = $row; ?> <html> <head> <title>phftables.com: Article <?php echo $title; ?> </title> <link rel="stylesheet" href="style.css" type="text/css"/> </head> <body> <?php echo "<h2>{$title}</h2>\n"; print_article_reference($id); # score $sql = "SELECT c.construction_id, c.name FROM construction AS c WHERE c.source_article_id = {$id}"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); $constrs = array(); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { $constrs[$row[0]] = $row[1]; } $constr_list = implode(', ', array_keys($constrs)); echo "</br><h2>Score</h2>\n"; $condition = ''; if ($constr_list) { $condition .= "((p.type='C' OR p.type='D') AND p.source_id IN ({$constr_list})) OR "; } $condition .= "(p.type='G' AND p.source_id={$id})"; $sql = "SELECT COUNT(*) FROM phf AS p WHERE {$condition}";
<html> <head> <title>phftables.com: Bibliography</title> <link rel="stylesheet" href="style.css" type="text/css"/> </head> <body> <h1 style="margin-bottom: 3px">Bibliography</h1> <div style="margin-left: 35px; font-size: 14px">- <a href="index.php">Home</a></div><br/><br/> <?php $sql = "SELECT article_id FROM article"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); $articles = array(); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { ob_start(); $articles[get_article_sort($row[0])] = $row[0]; } ksort($articles); $i = 1; foreach ($articles as $article) { print "[{$i}] "; print_article_reference($article); print "<br/><br/>"; $i++; } ?> </body></html>
echo "<ul>\n"; while ($row = mysql_fetch_array($result, MYSQL_NUM)) { echo "<li>"; if ($row[0] == 'I') { echo "<a href=\"view_array.php?id=" . $row[1] . "\">"; } echo "PHF(" . $row[2] . '; ' . $row[3] . ',' . $row[4] . ',' . $row[5] . ')'; if ($row[0] == 'I') { echo "</a>"; } } echo "</ul>"; } else { if ($type == 'G') { echo '<h3>Source</h3>This PHF appeared in:<br/> '; print_article_reference($source_id); echo '<br/>'; } else { echo '<h3>Construction</h3>'; $sql = "SELECT name FROM construction WHERE construction_id = {$source_id}"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); $row = mysql_fetch_array($result, MYSQL_NUM); echo "This PHF was constructed using '<a href=\"construction.php?id={$source_id}\">{$row['0']}</a>'.<br/>"; } } if ($type == 'C' || $type == 'D') { $parameters = array(); $sql = "SELECT parameter_name, value FROM phf_parameter WHERE phf_id = {$id}"; $result = mysql_query($sql) or die('Query failed: ' . mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_NUM)) { $parameters[$row[0]] = $row[1];