- switch($op) { // Select action according to $op value.
-
- case "pref-filters":
- require_once "modules/pref-filters.php";
- module_pref_filters($link);
- break; // pref-filters
-
- case "pref-labels":
- require_once "modules/pref-labels.php";
- module_pref_labels($link);
- break; // pref-labels
-
- case "pref-prefs":
- require_once "modules/pref-prefs.php";
- module_pref_prefs($link);
- break; // pref-prefs
-
- case "pref-users":
- require_once "modules/pref-users.php";
- module_pref_users($link);
- break; // prefs-users
-
- case "help":
- require_once "modules/help.php";
- module_help($link);
- break; // help
-
- case "pref-instances":
- require_once "modules/pref-instances.php";
- module_pref_instances($link);
- break; // pref-instances
-
- case "digestTest":
- print_r(prepare_headlines_digest($link, $_SESSION["uid"]));
- break; // digestTest
-
- case "digestSend":
- send_headlines_digests($link);
- break; // digestSend
-
- case "loading":
- header("Content-type: text/html");
- print __("Loading, please wait...") . " " .
- "<img src='images/indicator_tiny.gif'>";
- break; // loading
-
- default:
- header("Content-Type: text/plain");
- print json_encode(array("error" => array("code" => 7)));
- break; // fallback
- } // Select action according to $op value.
-
- // We close the connection to database.
- db_close($link);