//but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //GNU General Public License for more details. $iam = 'gabcast'; //used for switch on config.php $type = 'tool'; // look for form post isset($_POST['action']) ? $postaction = $_POST['action'] : ($postaction = ''); switch ($postaction) { case "add": gabcast_add($_POST['ext'], $_POST['channbr'], $_POST['pin']); needreload(); redirect_standard(); break; case "delete": gabcast_del($_POST['ext']); needreload(); redirect_standard(); break; case "edit": gabcast_edit($_POST['ext'], $_POST['channbr'], $_POST['pin']); needreload(); redirect_standard('ext'); break; } // look for get isset($_GET['action']) ? $action = $_GET['action'] : ($action = ''); isset($_GET['ext']) ? $ext = $_GET['ext'] : ($ext = ''); switch ($action) { case "add": gabcast_sidebar($ext, $type, $iam);
function gabcast_edit($xtn, $channbr, $pin) { gabcast_del($xtn); sql("INSERT INTO gabcast (ext, channbr, pin) values ('{$xtn}','{$channbr}','{$pin}')"); }