add option to empty cache
This commit is contained in:
		
							parent
							
								
									19c4027e81
								
							
						
					
					
						commit
						af2565314d
					
				
							
								
								
									
										16
									
								
								epub.php
								
								
								
								
							
							
						
						
									
										16
									
								
								epub.php
								
								
								
								
							| 
						 | 
					@ -114,6 +114,18 @@
 | 
				
			||||||
	date_default_timezone_set('Europe/Paris');
 | 
						date_default_timezone_set('Europe/Paris');
 | 
				
			||||||
	$date = (new DateTime('today'))->format('Ymd');
 | 
						$date = (new DateTime('today'))->format('Ymd');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (isset($_POST['emptycache']) && $_POST['emptycache'])
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							$files = glob('temp/*');
 | 
				
			||||||
 | 
							foreach($files as $file)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								if(is_file($file))
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									unlink($file);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Cafeyn
 | 
						// Cafeyn
 | 
				
			||||||
	if (isset($_POST['cafeyn']) && $_POST['cafeyn'])
 | 
						if (isset($_POST['cafeyn']) && $_POST['cafeyn'])
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
| 
						 | 
					@ -567,6 +579,10 @@
 | 
				
			||||||
	<label for="nyttoday">From today's paper embeded script</label>
 | 
						<label for="nyttoday">From today's paper embeded script</label>
 | 
				
			||||||
	<br><br>
 | 
						<br><br>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						<input id="emptycache" name="emptycache" type="checkbox">
 | 
				
			||||||
 | 
						<label for="emptycache">Empty cache</label>
 | 
				
			||||||
 | 
						<br><br>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<input type="submit">
 | 
						<input type="submit">
 | 
				
			||||||
</form>
 | 
					</form>
 | 
				
			||||||
</div>
 | 
					</div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue