芝麻web文件管理V1.00
编辑当前文件:/home/disqkgca/public_html/cargo/updatedownloadrecord.php
ID; $recordid = $_GET['rid']; $row = $wpdb->get_row( "SELECT * FROM kn_cargo where id = '".$recordid."' ",ARRAY_A ); if(isset($_POST['save'])) { $downloadbox = $_POST['downloadbox']; $downloadcomment = $_POST['downloadcomment']; $recordid = $_POST['recordid']; $downloadfile = ''; $todate = date("Y-m-d H:i:s"); $departureid =$_POST['departureid']; if($_FILES['downloadfile']['name']!='') { if ( ! function_exists( 'wp_handle_upload' ) ) require_once( ABSPATH . 'wp-admin/includes/file.php' ); $uploadedfile = $_FILES['downloadfile']; $upload_overrides = array( 'test_form' => false ); $movefile = wp_handle_upload( $uploadedfile, $upload_overrides ); $uploadfileurl = $movefile['url']; $downloadfile = $uploadfileurl; } $success = $wpdb->update( 'kn_cargo', array( 'downloadid' => $userid, 'downloadbox' => $downloadbox, 'downloaddate' => $todate, 'downloadcomment' => $downloadcomment, 'downloadfile' => $downloadfile ), array( 'id' => $recordid ), array( '%s', // value1 '%s', '%s', '%s', '%s' // value2 ), array( '%d' ) ); if($success) { //echo "upload"; header("location:https://disqinc.co.uk/cargo/download-box-list/?d=$departureid&q=$recordid"); } else { ?>
Box has not been upadated. Please try again later.
DownloadBox:
*
selected="selected" >Yes
selected="selected" >No
Comments(if any)
</textarea>
Upload Image:
View Image
Back
Update