当前位置: 首页>>代码示例>>PHP>>正文


PHP Assets_Page::success方法代码示例

本文整理汇总了PHP中Assets_Page::success方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets_Page::success方法的具体用法?PHP Assets_Page::success怎么用?PHP Assets_Page::success使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Assets_Page的用法示例。


在下文中一共展示了Assets_Page::success方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

    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();
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:index.php

示例2:

    } 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;
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:select.php

示例3: foreach

        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.
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:users.php

示例4: Dialog_Yes

    } 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;
}
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:indexm.php

示例5: foreach

    }
    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();
开发者ID:alerque,项目名称:bibledit,代码行数:31,代码来源:bulk.php


注:本文中的Assets_Page::success方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。