# You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. #************************************************************************** header("Content-Type: text/xml"); error_reporting(1); session_name('CentreSIS'); session_start(); require '../../../config.inc.php'; require '../../../database.inc.php'; require '../../../functions/Current.php'; require '../../../functions/PopTable.php'; require '../../../functions/DrawTab.fnc.php'; require '../../../functions/DBGet.fnc.php'; require '../../../functions/User.fnc.php'; require '../../../functions/ParseML.fnc.php'; require '../../../functions/ProgramTitle.fnc.php'; require '../classes/Auth.php'; require '../classes/PaymentType.php'; $auth = new Auth(); $staffId = User('STAFF_ID'); $profile = User('PROFILE'); if ($auth->checkAdmin($profile, $staffId)) { $desc = $_REQUEST['DESC']; if (PaymentType::addType($desc)) { echo '{"result":[{"success":true}]}'; } else { echo '{"result":[{"success":false}]}'; } } else { echo '{"result":[{"success":false}]}'; }
<input type=submit name=button value=' . _('Save') . ' /> <input type="button" name=button onclick="window.close();" value=' . _('Cancel') . ' /> </td></tr> </table></form>'; PopTable('footer'); } else { if ($_REQUEST['modfunc'] == 'new') { /// TODO: SANATIZE INPUT AND CHECK IF ALL VALUES ARE SET & VALID require 'modules/Billing/classes/Auth.php'; require 'modules/Billing/classes/PaymentType.php'; $auth = new Auth(); $staffId = User('STAFF_ID'); $profile = User('PROFILE'); if ($auth->checkAdmin($profile, $staffId)) { $type = $_REQUEST['type']; PaymentType::addType($type); } echo '<SCRIPT language=javascript>opener.document.location = "Modules.php?modname=' . $_REQUEST['modname'] . '"; window.close();</script>'; } else { if ($_REQUEST['modfunc'] == 'remove') { if (DeletePrompt(_('Payment option'))) { /// TODO: SANATIZE INPUT AND CHECK IF ALL VALUES ARE SET & VALID require 'modules/Billing/classes/Auth.php'; require 'modules/Billing/classes/PaymentType.php'; $auth = new Auth(); $staffId = User('STAFF_ID'); $profile = User('PROFILE'); if ($auth->checkAdmin($profile, $staffId)) { $id = $_REQUEST['id']; PaymentType::deleteType($id); }