Files
Testing/batemin/admin_paymentgw.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

46 lines
1.1 KiB
PHP

<?php
$page = "admin_paymentgw";
include "../admin/admin_header.php";
$task = semods::getpost('task');
$gw_id = intval(semods::getpost('gw_id'));
// SET RESULT VARIABLE
$result = 0;
$is_error = 0;
if($task == "enable") {
$enable = intval(semods::getpost('enable'));
semods::db_query("UPDATE se_semods_paymentgateways SET paymentgateway_enabled = $enable WHERE paymentgateway_id = $gw_id");
header("Location: admin_paymentgw.php");
exit();
}
if($task == "edit") {
$typename = semods::db_query_count( "SELECT paymentgateway_typename FROM se_semods_paymentgateways WHERE paymentgateway_id = $gw_id" );
if($typename) {
header("Location: admin_paymentgw_" . $typename . ".php");
exit();
}
}
// GET USER LEVEL ARRAY
$gateways = semods::db_query_assoc_all("SELECT * FROM se_semods_paymentgateways WHERE paymentgateway_typename != 'userpoints' ORDER BY paymentgateway_name");
// ASSIGN VARIABLES AND SHOW ADMIN USER LEVELS PAGE
$smarty->assign('result', $result);
$smarty->assign('is_error', $is_error);
$smarty->assign('error_message', $error_message);
$smarty->assign('gateways', $gateways);
include "admin_footer.php";
?>