コード例 #1
0
ファイル: pso_service.form.php プロジェクト: aliihaidar/pso
     $lastId = $obj->InsertRequest(false);
     foreach ($_FILES as $uploadedFile) {
         $Extention = explode('.', $uploadedFile['name']);
         $uploadedFile['filename'] = 'se_img_' . $lastId . '.' . $Extention[1];
         $fileObj = new file2($uploadedFile);
         $fileObj->manipImageUpload('pso_service', $lastId, SERVICE_PHOTO_SML, SERVICE_PHOTO_MED, SERVICE_PHOTO_BIG, true, false, SERVICE_PHOTO_MEDBIG, SERVICE_PHOTO_LRG, SERVICE_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('se_id' => $se_id), true, true);
     if ($obj->ErrorMsgs) {
         $_SESSION['errorMsgs'] = $obj->ErrorMsgs;
         $error = '&error=1';
     }
     goToURL($actScript . "?recordId={$se_id}&in2Action=editRecord&frmAction=edit{$error}");
     break;
 case 'edit':
     $_REQUEST['se_mduser'] = $_SESSION['us_id'];
     $_REQUEST['se_mddate'] = $_SESSION['us_id'];
     $notification .= formatFormErrors($obj->ErrorMsgs);
     $obj->UpdateRequest(false);
     foreach ($_FILES as $uploadedFile) {
         $Extention = explode('.', $uploadedFile['name']);
         $uploadedFile['filename'] = 'se_img_' . $_REQUEST['se_id'] . '.' . $Extention[1];
         $fileObj = new file2($uploadedFile);