芝麻web文件管理V1.00
编辑当前文件:/home/disqkgca/public_html/cargo/editbox.php
ID; $dp_id = $_REQUEST['did']; $recordid = $_REQUEST['id']; //$ddates = $wpdb->get_row( "SELECT * FROM kn_departuredates where id = '".mysqli_real_escape_string($dp_id)."' ", ARRAY_A); $rinfo = $wpdb->get_row( "SELECT * FROM kn_cargo where id = '".$recordid."' ", ARRAY_A); $dtype = $wpdb->get_row( "SELECT * FROM kn_delieverytype WHERE id = '".$rinfo['deliverytype']."' ", ARRAY_A ); //print_r($dtype); if(isset($_POST['save'])) { $submitfile = ''; if($_FILES['submitfile']['name']!='') { if ( ! function_exists( 'wp_handle_upload' ) ) require_once( ABSPATH . 'wp-admin/includes/file.php' ); $uploadedfile = $_FILES['submitfile']; $upload_overrides = array( 'test_form' => false ); $movefile = wp_handle_upload( $uploadedfile, $upload_overrides ); $uploadfileurl = $movefile['url']; $submitfile = $uploadfileurl; } $success = $wpdb->update( 'kn_cargo', array( 'sname' => $_POST['sname'], 'sphoneno' => $_POST['sphoneno'], 'saddress' => $_POST['saddress'], 'rname' => $_POST['rname'], 'rphoneno' => $_POST['rphoneno'], 'raddress' => $_POST['raddress'], 'boxdescription' => $_POST['boxdescription'], 'noofboxes' => $_POST['noofboxes'], 'grossweight' => $_POST['grossweight'], 'contentvalue' => $_POST['contentvalue'], 'insurance' => $_POST['insurance'], 'postcode' => $_POST['postcode'], 'finaldestination' => $_POST['finaldestination'], 'packingcharges' => $_POST['packingcharges'], 'handlingcharges' => $_POST['handlingcharges'], 'totalcharges' => $_POST['totalcharges'], 'deliverytype' => $_POST['deliverytype'], 'departuredate' => $_POST['departuredate'], 'deliverydate' => $_POST['deliverydate'], 'submitcomment' => $_POST['submitcomment'], 'submitid' => $userid, 'submitdate' => date('Y-m-d H:i:s'), 'departureid' => $_POST['departureid'], 'submitfile' => $submitfile ), array( 'id' => $recordid ), array( '%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s'), array( '%d' ) ); $lastrecordid = $recordid;//$wpdb->insert_id; if($success) { $label =''; for($i=1;$i<=$_POST['noofboxes'];$i++) { $label.=$lastrecordid."-P".$i; if($i<$_POST['noofboxes']) { $label.=","; } } $wpdb->update( 'kn_cargo', array( 'boxlabel' => $label // string ), array( 'id' => $lastrecordid ), array( '%s' // value1 ), array( '%d' ) ); ?>
Box has been updated successfully.
Ticket No is :
Box has not been added. Please try again later.
Sender Name:
*
Sender Phoneno:
*
Sender Address:
*
Reciever Name:
*
Reciever Phoneno:
*
Reciever Address:
*
Final Destination:
*
Box Description:
*
</textarea>
Number of Pieces:
*
Gross Weight in KGs:
*
Content Value:
*
Insurance:
*
checked="checked" value="50" /> Basic cover
checked="checked" value="" /> Extra Cover
Post Code:
Packing Charges(£):
Handling Charges(£):
Total Charges(£):
Delievery Type:
*
Departure Date:
*
Delievery Date:
*
Comment(optional):
</textarea>
Upload File(optional):
Save