. */ include "inc.php"; if (isset($fname)) $fname = stripslashes($fname); ?> <?=$appname; ?> - Modification Results ' . "\r\n"; echo '' . "\r\n"; echo '' . "\r\n"; $dismsg = ''; } elseif (isset($del) and $del == 1 and isset($confirm) and $confirm == 1) { $query = 'select id from Files where sessionid=' . $sessid; $res = mysql_query($query,$dbh) or die('

File was invalid, could not delete..\n
Query: ' . $query . '
\nError: (' . mysql_errno() . ') ' . mysql_error()); $row = mysql_fetch_row($res); if ($savehistory) { // record file deletion into History table; insert_history_entry('delete', $row[0], $sessid); // Log deletion before file/session are deleted; } $query = 'delete from Files where sessionid=' . $sessid; $res = mysql_query($query,$dbh) or die('

File was invalid, could not delete..\n
Query: ' . $query . '
\nError: (' . mysql_errno() . ') ' . mysql_error()); $query = 'delete from Sessions where id=' . $sessid; $res = mysql_query($query,$dbh) or die('

Session was invalid, could not delete..\n
Query: ' . $query . '
\nError: (' . mysql_errno() . ') ' . mysql_error()); remove_files($vercode); $dismsg = 'Session was deleted successfully.'; error_log($vercode . ': Removed via delete URL'); } elseif (isset($del) and $del == 1 and isset($confirm) and $confirm == 0) $dismsg = 'File deletion was cancelled.'; else { $DestinationEmail = clean_email_string($DestinationEmail); // update sql database; $query='update Files set description="' . $File1Description . '" where id=' . $fileid; $res = mysql_query($query,$dbh) or die('

Could not update file information..\n
Query: ' . $query . '
\nError: (' . mysql_errno() . ') ' . mysql_error()); $query='update Sessions set outdate="' . ${date . $AvailabilityPeriod} . '", avail="' . $AvailabilityPeriod . '", destemail="' . $DestinationEmail . '" where id=' . $sessid; $res = mysql_query($query,$dbh) or die('

Could not update session information..\n
Query: ' . $query . '
\nError: (' . mysql_errno() . ') ' . mysql_error()); $queryavail='select Availability.long from Availability where Availability.short="' . $AvailabilityPeriod . '"'; $resavail = mysql_query($queryavail,$dbh) or die('

Could not retrieve availability..\n
Query: ' . $queryavail . '
\nError: (' . mysql_errno() . ') ' . mysql_error()); $rowavail = mysql_fetch_row($resavail); $availlong = $rowavail[0]; // get filesize in readable format (MB); $querysize = 'select size from Files where id=' . $fileid; $ressize = mysql_query($querysize,$dbh) or die('

Could not retrieve file size..\n
Query: ' . $querysize . '
\nError: (' . mysql_errno() . ') ' . mysql_error()); $rowsize = mysql_fetch_row($ressize); $filesize = round($rowsize[0] / 1024 / 1024, 2); $mailheader = $utf8mailhdr . 'From: ' . $srcemail . "\r\n" . 'Reply-To: ' . $srcemail; $mailmsg = 'The following file has been modified.

'; $mailmsg .= 'Filename: ' . $fname . '
Description: ' . $File1Description . '
'; $mailmsg .= 'Size: ' . $filesize . ' MB
'; $mailmsg .= 'Availability Period: ' . $availlong . '
'; $mailmsg .= 'Download Code: ' . $dnldpass . '

'; $mailmsg .= 'Download: Click here to download the file

'; $mailmsg .= 'If the download link above doesn\'t work for you, use the download code above on the ' . $appname . ' download page.'; mb_send_mail("$DestinationEmail", 'File download at ' . $companyname . ' was modified', $mailmsg, $mailheader) or die('Failed to send email.'); $dismsg = 'Session was modified successfully.'; if ($savehistory) { // record file deletion into History table; insert_history_entry('modify', $fileid, $sessid); } } ?>

Back to admin page

'; } print $footer; ?>