parent
							
								
									d007101e08
								
							
						
					
					
						commit
						4fd592ceb3
					
				
							
								
								
									
										15
									
								
								index.php
								
								
								
								
							
							
						
						
									
										15
									
								
								index.php
								
								
								
								
							| 
						 | 
					@ -88,8 +88,8 @@
 | 
				
			||||||
			else
 | 
								else
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				echo '<form action="index.php" method="GET">
 | 
									echo '<form action="index.php" method="GET">
 | 
				
			||||||
					<input name="open" value="' . time() . '">
 | 
										<input list="notes" name="open" value="' . date("Y-m-d H.i.s", time()) . '">
 | 
				
			||||||
					<input accesskey="n" type="submit" value="create new">
 | 
										<input accesskey="n" type="submit" value="open">
 | 
				
			||||||
					</form>';
 | 
										</form>';
 | 
				
			||||||
				echo '<br>';
 | 
									echo '<br>';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -99,15 +99,18 @@
 | 
				
			||||||
					return filemtime($b) - filemtime($a);
 | 
										return filemtime($b) - filemtime($a);
 | 
				
			||||||
				});
 | 
									});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									$autocomplete = '<datalist id="notes">';
 | 
				
			||||||
				foreach($files as $path)
 | 
									foreach($files as $path)
 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
					if (!str_ends_with($path, '.del'))
 | 
					 | 
				
			||||||
				{
 | 
									{
 | 
				
			||||||
					$name = basename($path);
 | 
										$name = basename($path);
 | 
				
			||||||
						$mod = date("F d Y H:i:s", filemtime($path));
 | 
										if (!str_ends_with($name, '.del'))
 | 
				
			||||||
						echo '<div>' . $mod . ' <a href=index.php?open=' . urlencode($name) . '>' . $name .'</a></div>';
 | 
										{
 | 
				
			||||||
 | 
											$autocomplete .= '<option value="' . $name . '">';
 | 
				
			||||||
 | 
											echo '<div><a href=index.php?open=' . urlencode($name) . '>' . $name .'</a></div>';
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									$autocomplete .= '</datalist>';
 | 
				
			||||||
 | 
									echo $autocomplete;
 | 
				
			||||||
				echo '<br>';
 | 
									echo '<br>';
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		?>
 | 
							?>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue