Exemple #1
0
 }
 if (isset($_POST['toolremarks'])) {
     $toolbody->setToolRemarks($_POST['toolremarks']);
 }
 if (isset($_POST['tooloal'])) {
     $toolbody->setToolOAL($_POST['tooloal']);
 }
 if (isset($_POST['tmax'])) {
     $toolbody->setTMax($_POST['tmax']);
 }
 if (isset($_POST['pimg'])) {
     $pimg = $_POST['pimg'];
 } else {
     $pimg = '';
 }
 $toolbody->saveToolBody($toolbodyid);
 if ($toolbodyid == '') {
     $toolbodyid = $toolbody->getToolBodyID();
 }
 if ($pimg != '') {
     $toolbody->delPreview($pimg);
 }
 if ($_FILES['preview']['size'][0] > 0) {
     ///put all files held in $_FILE[mfile] in to a new array $new_arr
     $new_arr = array();
     $files = $_FILES['preview'];
     $num = count($files["name"]);
     for ($i = 0; $i < $num; $i++) {
         $new_arr[$i] = array();
     }
     foreach ($files as $key => $row) {