break; case PMF_Attachment_Migration::MIGRATION_TYPE2: /* case PMF_Attachment_Migration::MIGRATION_TYPE3: case PMF_Attachment_Migration::MIGRATION_TYPE4:*/ $options['defaultKey'] = PMF_Filter::filterInput(INPUT_POST, 'defaultKey', FILTER_SANITIZE_STRING); break; default: echo '<center><h2><font color="red">BACKUP YOUR FILES BEFORE ', 'PROCEED!!!</font></h2></center>'; showForm(); break; } if (!empty($migrationType)) { if ($migration->doMigrate($migrationType, $options)) { echo '<br><center><h2><font color="green">Success</font></h2></center>'; } else { echo '<center>', '<font color="red">', 'Errors:', '</font><br>', implode('<br>', $migration->getErrors()), '</center>'; showForm(); } $warnings = $migration->getWarnings(); if (!empty($warnings)) { echo '<center>', '<font color="yellow">', 'Warnings:', '</font><br>', implode('<br>', $migration->getWarnings()), '</center>'; } } function showForm() { ?> <script> /** * Show option fields corresponding to attachment type * * @param integer migrationType to show options for
break; case PMF_Attachment_Migration::MIGRATION_TYPE2: /* case PMF_Attachment_Migration::MIGRATION_TYPE3: case PMF_Attachment_Migration::MIGRATION_TYPE4:*/ $options['defaultKey'] = PMF_Filter::filterInput(INPUT_POST, 'defaultKey', FILTER_SANITIZE_STRING); break; default: echo '<h2 style="color: red;">BACKUP YOUR FILES BEFORE PROCEED!!!</h2>'; showForm(); break; } if (!empty($migrationType)) { if ($migration->doMigrate($migrationType, $options)) { print '<br><h2 style="color: green;">Success</h2>'; } else { print '<span style="color: red">Errors:</span><br>' . implode('<br>', $migration->getErrors()); showForm(); } $warnings = $migration->getWarnings(); if (!empty($warnings)) { echo '<span style="color: yellow">Warnings:</span><br>' . implode('<br>', $migration->getWarnings()); } } function showForm() { ?> <script> /** * Show option fields corresponding to attachment type * * @param integer migrationType to show options for