示例#1
0
     $lastId = $obj->InsertRequest(false);
     foreach ($_FILES as $uploadedFile) {
         $Extention = explode('.', $uploadedFile['name']);
         $uploadedFile['filename'] = 'cl_img_' . $lastId . '.' . $Extention[1];
         $fileObj = new file2($uploadedFile);
         $fileObj->manipImageUpload('pso_client', $lastId, CLIENT_PHOTO_SML, CLIENT_PHOTO_MED, CLIENT_PHOTO_BIG, true, false, CLIENT_PHOTO_MEDBIG, CLIENT_PHOTO_LRG, CLIENT_PHOTO_BO);
         $fileObj = null;
     }
     if ($obj->ErrorMsgs) {
         $_SESSION['errorMsgs'] = $obj->ErrorMsgs;
         $error = '&error=1';
     }
     goToURL($actScript . "?recordId={$lastId}&in2Action=editRecord&frmAction=add{$error}");
     break;
 case 'deleteFile':
     $obj->DeleteFile($fileFieldName, array('cl_id' => $cl_id), true, true);
     if ($obj->ErrorMsgs) {
         $_SESSION['errorMsgs'] = $obj->ErrorMsgs;
         $error = '&error=1';
     }
     goToURL($actScript . "?recordId={$cl_id}&in2Action=editRecord&frmAction=edit{$error}");
     break;
 case 'edit':
     $_REQUEST['cl_mduser'] = $_SESSION['us_id'];
     $_REQUEST['cl_mddate'] = $_SESSION['us_id'];
     $notification .= formatFormErrors($obj->ErrorMsgs);
     $obj->UpdateRequest(false);
     foreach ($_FILES as $uploadedFile) {
         $Extention = explode('.', $uploadedFile['name']);
         $uploadedFile['filename'] = 'cl_img_' . $_REQUEST['cl_id'] . '.' . $Extention[1];
         $fileObj = new file2($uploadedFile);