本文整理汇总了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: