function printInsert() { global $tpl, $us, $badgerDb; $widgets = new WidgetEngine($tpl); $widgets->addNavigationHead(); $insertTitle = getBadgerTranslation2('importExport', 'insertTitle'); $updateInfo = ''; echo $tpl->getHeader($insertTitle); $goToStartPagePreLink = getBadgerTranslation2('importExport', 'goToStartPagePreLink'); $goToStartPageLinkText = getBadgerTranslation2('importExport', 'goToStartPageLinkText'); $goToStartPagePostLink = getBadgerTranslation2('importExport', 'goToStartPagePostLink'); if (!isset($_POST['confirmUpload']) || $_POST['confirmUpload'] !== 'yes') { $insertMsg = getBadgerTranslation2('importExport', 'insertNoInsert'); } else { if (!isset($_FILES['sqlDump']) || !is_uploaded_file($_FILES['sqlDump']['tmp_name'])) { $insertMsg = getBadgerTranslation2('importExport', 'insertNoFile'); } else { $insertMsg = getBadgerTranslation2('importExport', 'insertSuccessful'); $newerVersionMsg = getBadgerTranslation2('importExport', 'newerVersion'); if (applySqlDump() === 'newerVersion') { eval(' $updateInfo = "' . $tpl->getTemplate('importExport/newerVersion') . '";'); } } } $us = new UserSettings($badgerDb); $startPageURL = getAbsoluteStartPage(); eval('echo "' . $tpl->getTemplate('importExport/insert') . '";'); eval('echo "' . $tpl->getTemplate('badgerFooter') . '";'); }
function printInsert() { global $tpl; $widgets = new WidgetEngine($tpl); $widgets->addNavigationHead(); $insertTitle = getBadgerTranslation2('importExport', 'insertTitle'); echo $tpl->getHeader($insertTitle); if (!isset($_POST['confirmUpload']) || $_POST['confirmUpload'] !== 'yes') { $insertMsg = getBadgerTranslation2('importExport', 'insertNoInsert'); } else { if (!is_uploaded_file($_FILES['sqlDump']['tmp_name'])) { $insertMsg = getBadgerTranslation2('importExport', 'insertNoFile'); } else { applySqlDump(); $insertMsg = getBadgerTranslation2('importExport', 'insertSuccessful'); } } eval(' echo "' . $tpl->getTemplate('importExport/insert') . '";'); eval('echo "' . $tpl->getTemplate('badgerFooter') . '";'); }