當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Releases::updatemulti方法代碼示例

本文整理匯總了PHP中Releases::updatemulti方法的典型用法代碼示例。如果您正苦於以下問題:PHP Releases::updatemulti方法的具體用法?PHP Releases::updatemulti怎麽用?PHP Releases::updatemulti使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Releases的用法示例。


在下文中一共展示了Releases::updatemulti方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: AdminPage

<?php

$page = new AdminPage(true);
$releases = new Releases(['Settings' => $page->settings]);
$category = new Category(['Settings' => $page->settings]);
// Set the current action.
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
$id = isset($_REQUEST['id']) && is_array($_REQUEST['id']) ? $_REQUEST['id'] : '';
$page->smarty->assign('action', $action);
$page->smarty->assign('idArr', $id);
switch ($action) {
    case 'doedit':
    case 'edit':
        $success = false;
        if ($action == 'doedit') {
            $upd = $releases->updatemulti($_REQUEST["id"], $_REQUEST["category"], $_REQUEST["grabs"], $_REQUEST["rageid"], $_REQUEST["season"], $_REQUEST['imdbid']);
            if ($upd !== false) {
                $success = true;
            } else {
            }
        }
        $page->smarty->assign('success', $success);
        $page->smarty->assign('from', isset($_REQUEST['from']) ? $_REQUEST['from'] : '');
        $page->smarty->assign('catlist', $category->getForSelect());
        $page->content = $page->smarty->fetch('ajax_release-edit.tpl');
        echo $page->content;
        break;
    case 'dodelete':
        $is_guid = true;
        if (is_array($_GET['id'])) {
            if (is_numeric($_GET['id'][0])) {
開發者ID:Jay204,項目名稱:nZEDb,代碼行數:31,代碼來源:ajax_release-admin.php

示例2: AdminPage

require_once WWW_DIR . "/lib/releases.php";
require_once WWW_DIR . "/lib/category.php";
$page = new AdminPage();
$releases = new Releases();
$category = new Category();
// set the current action
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
$id = isset($_REQUEST['id']) && is_array($_REQUEST['id']) ? $_REQUEST['id'] : '';
$page->smarty->assign('action', $action);
$page->smarty->assign('idArr', $id);
switch ($action) {
    case 'doedit':
    case 'edit':
        $success = false;
        if ($action == 'doedit') {
            $upd = $releases->updatemulti($_REQUEST["id"], $_REQUEST["category"], $_REQUEST["grabs"], $_REQUEST["tvinfoID"], $_REQUEST["season"], $_REQUEST['imdbID']);
            if ($upd !== false) {
                $success = true;
            } else {
            }
        }
        $page->smarty->assign('success', $success);
        $page->smarty->assign('from', isset($_REQUEST['from']) ? $_REQUEST['from'] : '');
        $page->smarty->assign('catlist', $category->getForSelect());
        $page->content = $page->smarty->fetch('ajax_release-edit.tpl');
        echo $page->content;
        break;
    case 'dodelete':
        $releases->delete($_REQUEST["id"], true);
        break;
    default:
開發者ID:scriptzteam,項目名稱:newzNZB-premium-indexer,代碼行數:31,代碼來源:ajax_release-admin.php


注:本文中的Releases::updatemulti方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。