本文整理匯總了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])) {
示例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: