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