public function doConfigPageInit($page) { isset($_REQUEST['action']) ? $action = $_REQUEST['action'] : ($action = ''); isset($_REQUEST['itemid']) ? $itemid = $_REQUEST['itemid'] : ($itemid = ''); switch ($action) { case "add": $_REQUEST['itemid'] = callback_add($_POST); needreload(); break; case "delete": callback_del($itemid); needreload(); break; case "edit": callback_edit($itemid, $_POST); needreload(); break; } }
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with FreePBX. If not, see <http://www.gnu.org/licenses/>. isset($_REQUEST['action']) ? $action = $_REQUEST['action'] : ($action = ''); //the item we are currently displaying isset($_REQUEST['itemid']) ? $itemid = $_REQUEST['itemid'] : ($itemid = ''); $dispnum = "callback"; //used for switch on config.php $tabindex = 0; //if submitting form, update database if (isset($_POST['action'])) { switch ($action) { case "add": callback_add($_POST); needreload(); redirect_standard(); break; case "delete": callback_del($itemid); needreload(); redirect_standard(); break; case "edit": callback_edit($itemid, $_POST); needreload(); redirect_standard('itemid'); break; } }