| 
									
										
										
										
											2007-04-03 14:10:23 +00:00
										 |  |  | <meta http-equiv="refresh" content="60"> | 
					
						
							| 
									
										
										
										
											2008-11-26 12:55:55 +00:00
										 |  |  | <div style="background-color: #eeeeee; padding: 10px;"> | 
					
						
							|  |  |  | <form id="form1" name="form1" method="post" action=""> | 
					
						
							|  |  |  |   <label><strong>Search</strong> | 
					
						
							|  |  |  |     <input type="text" name="search" id="search" /> | 
					
						
							|  |  |  |   </label> | 
					
						
							|  |  |  |   <label> | 
					
						
							|  |  |  |     <strong>Program</strong> | 
					
						
							|  |  |  |     <select name="program" id="program"> | 
					
						
							|  |  |  |       <option value="">All Programs</option> | 
					
						
							|  |  |  |       <?php | 
					
						
							|  |  |  |         $query = mysql_query("SELECT `program` FROM `syslog` GROUP BY `program` ORDER BY `program`"); | 
					
						
							|  |  |  |         while($data = mysql_fetch_array($query)) { | 
					
						
							|  |  |  |           echo("<option value='".$data['program']."'>".$data['program']."</option>"); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       ?>
 | 
					
						
							|  |  |  |     </select> | 
					
						
							|  |  |  |   </label> | 
					
						
							|  |  |  |   <label> | 
					
						
							|  |  |  |     <strong>Device</strong> | 
					
						
							|  |  |  |     <select name="device" id="device"> | 
					
						
							|  |  |  |       <option value="">All Devices</option> | 
					
						
							|  |  |  |       <?php | 
					
						
							|  |  |  |         $query = mysql_query("SELECT * FROM `devices` ORDER BY `hostname`"); | 
					
						
							|  |  |  |         while($data = mysql_fetch_array($query)) { | 
					
						
							|  |  |  |           echo("<option value='".$data['device_id']."'"); | 
					
						
							|  |  |  |              | 
					
						
							|  |  |  |           echo(">".$data['hostname']."</option>"); | 
					
						
							|  |  |  |         } | 
					
						
							|  |  |  |       ?>
 | 
					
						
							|  |  |  |     </select> | 
					
						
							|  |  |  |   </label> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   <input type=submit value=Search> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | </form> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2007-04-03 14:10:23 +00:00
										 |  |  | <? | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-19 19:15:57 +00:00
										 |  |  | $sql = "SELECT *, DATE_FORMAT(datetime, '%D %b %T') AS date from syslog ORDER BY datetime DESC LIMIT 1000"; | 
					
						
							| 
									
										
										
										
											2007-04-03 14:10:23 +00:00
										 |  |  | $query = mysql_query($sql); | 
					
						
							| 
									
										
										
										
											2007-06-24 14:56:47 +00:00
										 |  |  | echo("<table cellspacing=0 cellpadding=2 width=100%>"); | 
					
						
							| 
									
										
										
										
											2008-03-23 15:40:58 +00:00
										 |  |  | while($entry = mysql_fetch_array($query)) { include("includes/print-syslog.inc"); } | 
					
						
							| 
									
										
										
										
											2007-06-24 14:56:47 +00:00
										 |  |  | echo("</table>"); | 
					
						
							| 
									
										
										
										
											2007-04-03 14:10:23 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | ?>
 | 
					
						
							|  |  |  | </table> |