case 'search_by_date': search_by_date(); break; case 'search_locked': search_locked(); break; case 'edit': display_edit_form(); break; case 'delete': admin_check_permissions('delete_users'); delete_user(); break; case 'edit_save': admin_check_permissions('edit_users'); edit_save(); break; case 'payments': display_payments_form(); break; case 'edit_payment': admin_check_permissions('manage_payments'); edit_payment(); break; case 'del_payment': admin_check_permissions('manage_payments'); del_payment(); break; case 'payment_save': admin_check_permissions('manage_payments'); payment_save();
<?php require_once dirname(__FILE__) . "/../html.php"; require_once dirname(__FILE__) . "/../file.php"; require_once dirname(__FILE__) . "/edit.php"; if (defined('EDIT_FILE')) { if ($REQUEST_METHOD == 'POST') { if (edit_save(EDIT_FILE, $data)) { print "Saved"; } else { die("Couldn't save file"); } } else { print edit_form(EDIT_FILE); } } else { die("No file specified."); }
} if (true) { // only works with oids print "\n\t\t\t\t\ttop.elements.tableData.controls = [];\n\t\t\t\t\ttop.elements.tableData.addControl('add', 'Add New');\n\t\t\t\t\ttop.elements.tableData.addControl('delete', 'Delete');\n\t\t\t\t\ttop.elements.tableDataAdd.controls = [];\n\t\t\t\t\ttop.elements.tableDataAdd.addControl('save', 'Save', null);\n\t\t\t\t\ttop.elements.tableDataAdd.addControl('back', 'Cancel', null);\n\t\t\t\t"; } else { print "\n\t\t\t\t\ttop.elements.tableData.controls = [];\n\t\t\t\t\ttop.elements.tableDataAdd.controls = [];\n\t\t\t\t\ttop.elements.tableDataAdd.addControl('back', 'Cancel', null);\n\t\t\t\t"; } } // -- table data $sql = "SELECT oid, * FROM " . $tbl[1] . "." . $tbl[2] . " WHERE ~SEARCH~"; list_process($db, $lstParams, $sql); break; case "tableData::lst_del_records": $tbl = split("\\.", $lstParams['table']); list_delete($db, $lstParams, $tbl[1] . "." . $tbl[2], 'oid'); break; case "tableDataAdd::edit_get_data": $sql = "SELECT * FROM " . $lstParams['table'] . " WHERE oid = '" . $lstParams['req_recid'] . "'"; if ($lstParams['req_recid'] == 'null') { $sql = "SELECT null"; } edit_process($db, $lstParams, $sql); break; case "tableDataAdd::edit_save_data": $tbl = split("\\.", $lstParams['table']); edit_save($db, $lstParams, $_POST, $tbl[1] . "." . $tbl[2], 'oid'); break; default: print "alert('List command is not recognized: " . $lstParams['req_name'] . "::" . $lstParams['req_cmd'] . "');"; break; }