function edit_subject_area($sas) { $sa = retrieve_first_checked_record($sas); if ($sp === NULL) { infomsg("Please tick the record you want to edit"); } else { addedit_subject_area($sa); } }
function edit_fmfi_course($fcs) { $fc = retrieve_first_checked_record($fcs); if ($fc === NULL) { infomsg("Please tick the record you want to edit"); } else { addedit_fmfi_course($fc); } }
function edit_study_program($sps) { $sp = retrieve_first_checked_record($sps); if ($sp === NULL) { infomsg("Please tick the record you want to edit"); } else { addedit_study_program($sp); } }
function edit_university($agg) { $aggr = retrieve_first_checked_record($agg); if ($aggr === NULL) { infomsg("Please tick the record you want to edit"); } else { addedit_university($aggr); } }
function upload_file($tab, $cnt, $idrecord) { global $ERA; if (!isset($_POST['upload' . $cnt])) { return; } $target_dir = $ERA . 'uploads/'; $original_filename = basename($_FILES['filename' . $cnt]['name']); $target_file = $target_dir . $original_filename; $tmp_filename = $_FILES['filename' . $cnt]['tmp_name']; logmsg('original_filename=' . $original_filename); logmsg('target_file=' . $target_file); logmsg('tmp_filename=' . $tmp_filename); // Check if file already exists if (file_exists($target_file)) { unlink($target_file); } if (move_uploaded_file($tmp_filename, $target_file)) { $description = $_POST['desc' . $cnt]; $fileid = db_insert_uploaded_file($tab, $idrecord, $original_filename, $description); rename($target_file, $ERA . 'files/' . $fileid); infomsg('The file ' . $original_filename . ' has been uploaded.'); db_append_to_log('FILES', $fileid, 'add', $description, $original_filename); } else { infomsg('Sorry, there was an error uploading your file.'); } }
function edit_travel($ts) { $tv = retrieve_first_checked_record($ts); if ($tv === NULL) { infomsg("Please tick the record you want to edit"); } else { addedit_travel($tv); } }
function edit_student($sts) { $st = retrieve_first_checked_record($sts); if ($st === NULL) { infomsg("Please tick the record you want to edit"); } else { addedit_student($st); } }