foreach ($bibles as $bible) { if ($font == $database_config_bible->getTextFont($bible)) { $font_in_use = true; } } if (!$font_in_use) { unlink($font); } else { Assets_Page::error(Locale_Translate::_("The font could not be deleted because it is in use.")); } } // Upload a font. if (isset($_POST['upload'])) { // Upload may take time in case the file is large or the network is slow. ignore_user_abort(true); set_time_limit(0); $filename = $_FILES['data']['name']; $tmpfile = $_FILES['data']['tmp_name']; if (move_uploaded_file($tmpfile, $filename)) { Assets_Page::success(Locale_Translate::_("The font has been uploaded.")); } else { Assets_Page::error(Filter_Upload::error2text($_FILES['data']['error'])); } } $header = new Assets_Header(Locale_Translate::_("Fonts")); $header->run(); $view = new Assets_View(__FILE__); $view->view->upload_max_filesize = ini_get("upload_max_filesize"); $view->view->fonts = Fonts_Logic::getFonts(); $view->render("index.php"); Assets_Page::footer();
} else { $subscription_selector = 0; } $database_config_user->setConsultationNotesSubscriptionSelector($subscription_selector); } @($severity_selector = $_GET['severityselector']); if (isset($severity_selector)) { $database_config_user->setConsultationNotesSeveritySelector($severity_selector); } @($text_selector = $_GET['textselector']); if (isset($text_selector)) { $database_config_user->setConsultationNotesTextSelector($text_selector); @($search_text = $_POST['text']); if (isset($search_text)) { $database_config_user->setConsultationNotesSearchText($search_text); Assets_Page::success(Locale_Translate::_("Search text saved")); } } @($passage_inclusion_selector = $_GET['passageinclusionyselector']); if (isset($passage_inclusion_selector)) { $database_config_user->setConsultationNotesPassageInclusionSelector($passage_inclusion_selector); } @($text_inclusion_selector = $_GET['textinclusionyselector']); if (isset($text_inclusion_selector)) { $database_config_user->setConsultationNotesTextInclusionSelector($text_inclusion_selector); } $view = new Assets_View(__FILE__); $passage_selector = $database_config_user->getConsultationNotesPassageSelector(); $view->view->passageselector = $passage_selector; $edit_selector = $database_config_user->getConsultationNotesEditSelector(); $view->view->editselector = $edit_selector;
foreach ($accessibleBibles as $bible) { $parameter = "?user={$user}&addbible={$bible}"; $dialog_list->add_row($bible, $parameter); } $dialog_list->run(); die; } else { Assets_Page::success(Locale_Translate::_("The user has become a member of the translation team that works on this Bible")); $database_users->grantAccess2Bible($user, $addbible); } } // Remove Bible from user. @($removebible = $_GET['removebible']); if (isset($removebible)) { $database_users->revokeAccess2Bible($user, $removebible); Assets_Page::success(Locale_Translate::_("The user is no longer a member of the translation team that works on this Bible")); } // Toggle readonly access to Bible. @($readonlytoggle = $_GET['readonlytoggle']); if (isset($readonlytoggle)) { $readonly = $database_users->hasReadOnlyAccess2Bible($user, $readonlytoggle); $database_users->setReadOnlyAccess2Bible($user, $readonlytoggle, !$readonly); } // The level and Bibles of the user who works on this page. // The admin has access to all Bibles. $mylevel = $session_logic->currentLevel(); $mybibles = $database_users->getBibles4User($currentUser); if ($mylevel >= Filter_Roles::ADMIN_LEVEL) { $mybibles = $database_bibles->getBibles(); } // User accounts to display.
} else { $dialog_yes = new Dialog_Yes(NULL, Locale_Translate::_("Would you like to delete this stylesheet?"), "delete"); die; } } // Delete empty sheet that may have been there. $database_styles->deleteSheet(""); if (isset($_POST['new'])) { $name = $_POST['entry']; if (in_array($name, $database_styles->getSheets())) { Assets_Page::error(Locale_Translate::_("This stylesheet already exists")); } else { $database_styles->createSheet($name); $database_styles->grantWriteAccess($username, $name); Styles_Sheets::create_all(); Assets_Page::success(Locale_Translate::_("The stylesheet has been created")); } } if (isset($_GET['new'])) { $dialog_entry = new Dialog_Entry("", Locale_Translate::_("Please enter the name for the new stylesheet"), "", "new", ""); die; } $sheets = $database_styles->getSheets(); $editable = array(); foreach ($sheets as $sheet) { $write = $database_styles->hasWriteAccess($username, $sheet); if ($userlevel >= Filter_Roles::ADMIN_LEVEL) { $write = true; } $editable[] = $write; }
} foreach ($identifiers as $identifier) { if ($database_notes->getBible($identifier) != $bible) { $notes_logic->setBible($identifier, $bible); } } Assets_Page::success(Locale_Translate::_("The Bible of the notes was updated")); $database_logs->log("Bible update of notes: {$identifierlist}", true); } @($delete = $_GET['delete']); if (isset($delete)) { @($confirm = $_GET['confirm']); if ($confirm != "yes") { $dialog_yes = new Dialog_Yes2(Locale_Translate::_("Would you like to delete the notes?"), "&delete="); } else { foreach ($identifiers as $identifier) { $notes_logic->delete($identifier); // Notifications handling. $trash_handler = Trash_Handler::getInstance(); $trash_handler->consultationNote($identifier); $database_notes->delete($identifier); } Assets_Page::success(Locale_Translate::_("The notes were deleted")); $database_logs->log("Notes deleted: {$identifierlist}", true); } } $view = new Assets_View(__FILE__); $notescount = count($identifiers); $view->view->notescount = $notescount; $view->render("bulk.php"); Assets_Page::footer();