From 6523fbc839321837461f991c24bce9042e175a82 Mon Sep 17 00:00:00 2001 From: BenjaminRehn Date: Wed, 10 Jun 2015 15:28:38 +0200 Subject: [PATCH 1/2] Create fritzbox_delete_foncallslist.php Delete the foncalllist complete --- fritzbox_delete_foncallslist.php | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 fritzbox_delete_foncallslist.php diff --git a/fritzbox_delete_foncallslist.php b/fritzbox_delete_foncallslist.php new file mode 100644 index 00000000..2d86045f --- /dev/null +++ b/fritzbox_delete_foncallslist.php @@ -0,0 +1,55 @@ + + * @author Benjamin Rehn + * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons cc-by-sa + * @version 0.4 2013-01-02 + * @package Fritz!Box PHP tools + */ + +try +{ + // load the fritzbox_api class + require_once('fritzbox_api.class.php'); + $fritz = new fritzbox_api(); + + // init the output message + $message = date('Y-m-d H:i') . ' '; + + // DELETE LIST AFTER DOWNLOAD + $formfields = array( + 'getpage' => '/fon_num/foncalls_list.lua', + 'usejournal' => '1', + 'callstab' => 'all', + 'submit' => 'clear', + 'clear' => '1', + ); + + $fritz->doPostForm($formfields); + // set a log message + $message .= 'Call list sucessfully deleted'; +} +catch (Exception $e) +{ + $message .= $e->getMessage(); +} + +// log the result +if ( isset($fritz) && is_object($fritz) && get_class($fritz) == 'fritzbox_api' ) +{ + $fritz->logMessage($message); +} +else +{ + echo($message); +} +$fritz = null; // destroy the object to log out +?> From 678e2a22bbc8cbe8d6424187510d43a6af4e3f35 Mon Sep 17 00:00:00 2001 From: BenjaminRehn Date: Thu, 11 Jun 2015 08:49:29 +0200 Subject: [PATCH 2/2] Update fritzbox_delete_foncallslist.php changed header information --- fritzbox_delete_foncallslist.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fritzbox_delete_foncallslist.php b/fritzbox_delete_foncallslist.php index 2d86045f..01cb055d 100644 --- a/fritzbox_delete_foncallslist.php +++ b/fritzbox_delete_foncallslist.php @@ -1,17 +1,12 @@ * @author Benjamin Rehn * @license http://creativecommons.org/licenses/by-sa/3.0/de/ Creative Commons cc-by-sa - * @version 0.4 2013-01-02 + * @version 0.1 2015-06-11 * @package Fritz!Box PHP tools */ @@ -24,7 +19,7 @@ // init the output message $message = date('Y-m-d H:i') . ' '; - // DELETE LIST AFTER DOWNLOAD + // delete calllist form fields $formfields = array( 'getpage' => '/fon_num/foncalls_list.lua', 'usejournal' => '1',