add stats
This commit is contained in:
		
							parent
							
								
									5589822afb
								
							
						
					
					
						commit
						7d44dc86d2
					
				|  | @ -109,8 +109,12 @@ | |||
| 				{ | ||||
| 					$content = file_get_contents($dir . '/' . $title); | ||||
| 				} | ||||
| 				 | ||||
| 				$lines = substr_count($content, "\r\n"); | ||||
| 				$words = substr_count($content, " ") + $lines; | ||||
| 				$chars = strlen($content); | ||||
| 
 | ||||
| 				$rows = max(20, substr_count($content, "\r\n")) * 2; | ||||
| 				$rows = max(20, $lines) * 2; | ||||
| 
 | ||||
| 				require('note.php'); | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										3
									
								
								note.php
								
								
								
								
							
							
						
						
									
										3
									
								
								note.php
								
								
								
								
							|  | @ -4,6 +4,9 @@ | |||
| 		<input type="submit" name="save" value="save" accesskey="s"> | ||||
| 		<input type="submit" name="delete" value="delete" accesskey="d"> | ||||
| 		<input type="submit" name="preview" value="preview" accesskey="p"> | ||||
| 		<span class="grey"><?echo $lines; ?> lines</span>
 | ||||
| 		<span class="grey"><?echo $words; ?> words</span>
 | ||||
| 		<span class="grey"><?echo $chars; ?> chars</span>
 | ||||
| 		<br> | ||||
| 		<input autocomplete="off" class="title" name="title" value="<? echo $title; ?>"> | ||||
| 	</div> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 quenousimporte
						quenousimporte