add debug
[kps.git] / kps_web / kps_result / evolvement.php
blobc049e9cd6261db598581a670c26b35ed02e89fc9
1 <?php
2 include 'core.inc.php';
4 function pageHeader() {
5 //header("Content-type: image/png");
6 echo "<html><head><title>KPS</title>";
7 echo '<link rel="shortcut icon" href="favicon.ico" >';
8 echo "<title></title>";
9 echo "</head><body>";
10 echo "&nbsp;<p><h1>Kernel Evolvement</h1></p>";
11 echo "<P ALIGN=LEFT><A HREF='./index.php'>Back to home</A></P>";
12 echo '
13 <script type="text/javascript"><!--
14 google_ad_client = "pub-0572408394016670";
15 /* 728x90, 创建于 09-8-19 */
16 google_ad_slot = "9359775421";
17 google_ad_width = 728;
18 google_ad_height = 90;
19 //-->
20 </script>
21 <script type="text/javascript"
22 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
23 </script>';
26 function pageFooter() {
27 echo "</body></html>";
30 pageHeader();
32 $name_list = array();
33 $name = "";
34 $notfound = 0;
35 if ($Submit_Search) {
36 if ($real_name != "") {
37 $name = $real_name;
38 } else if ($tf_name != "") {
39 $sql = 'select * from kps where name like "%'.$tf_name.'%" and class = '.$c_class;
40 $result = runSQL($sql);
41 db_query_ng($result);
42 $i = 0;
43 while ($row = mysql_fetch_array($result)) {
44 if (!in_array($row['name'], $name_list)) {
45 $name_list[$i] = $row['name'];
46 $i++;
49 if (count($name_list) == 1)
50 $name = $name_list[0];
51 else if ((count($name_list) == 0) && ($tf_name))
52 $notfound = 1;
56 <form id="form1" name="form1" method="post" action=""><table><tr>
57 <?php
58 if (count($name_list) > 1) {
59 $count = count($name_list);
60 echo '<td><select name="real_name" size="8" tabindex="115" onKeyDown="javascript:if(event.keyCode==13) form1.Submit_Search.focus();">';
61 for ($i = 0; $i < $count; $i++)
62 echo '<option value="'.htmlspecialchars($name_list[$i]).
63 '"> '.htmlspecialchars($name_list[$i]).' </option>';
64 echo '</select></td>';
65 } else
66 echo '<td><input name="tf_name" type="text" id="tf_name" size="32" maxlength="64" onKeyDown="javascript:if(event.keyCode==13) form1.Submit_Search.focus();"/>';
68 </td>
69 <td><label><select name="c_class">
70 <option <?php if ($c_class == 0) echo "selected='selected'"; ?> value="0"> People </option>
71 <option <?php if ($c_class == 1) echo "selected='selected'"; ?> value="1"> Employer </option>
72 </select></label></td>
73 <td><input name="Submit_Search" type="submit" id="Submit_Search" value="Search" />
74 <?php
75 $tmp_class = ($c_class == 0)?"People":"Employer";
76 if ($notfound)
77 echo ' '.$tmp_class.' "'.htmlspecialchars($tf_name).
78 '" not exist.';
80 </td>
81 </tr></table></form>
83 <?php
84 $new = htmlspecialchars($name);
85 if (!$new)
86 $new = "Whole Kernel";
87 echo "&nbsp;Commit of \"".$new."\"<br>";
88 $id = name2id($name);
89 echo "<form><table><tr>";
90 echo "<td><img src=./drawimg.php?action=commit&id=$id></td>";
91 echo "</tr>";
93 echo "<tr>";
94 if ($name != NULL) {
95 echo "<td><img src=./drawimg.php?action=rank&id=$id></td>";
96 } else {
97 echo "<td><img src=./drawimg.php?action=who></td>";
99 echo "</tr></table></form>";
101 pageFooter();
102 exit;