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


PHP Books::getBookInfo方法代码示例

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


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

示例1: getBookInfo

 public function getBookInfo($bookId)
 {
     if (empty($bookId)) {
         return array('result' => 'fail', 'message' => 'Не задан идентифкатор книги');
     }
     $bookInfo = Books::getBookInfo($bookId);
     if (count($bookInfo) <= 0) {
         return array('result' => 'success', 'message' => 'Книг с указанным идентификатором не найдено');
     }
     $info = array($bookInfo->getAttributes());
     $authors = array();
     foreach ($bookInfo->authors as $item) {
         $authors[] = $item->getAttributes();
     }
     $info['authors'] = $authors;
     return $info;
 }
开发者ID:norv95,项目名称:kmptest,代码行数:17,代码来源:SupplierA.php

示例2: Games

     }
 }
 $game = '';
 if ($data['gamesinfo_id'] != '') {
     $g = new Games();
     $game = $g->getGamesInfo($data['gamesinfo_id']);
 }
 $mus = '';
 if ($data['musicinfoid'] != '') {
     $music = new Musik(['Settings' => $page->settings]);
     $mus = $music->getMusicInfo($data['musicinfoid']);
 }
 $book = '';
 if ($data['bookinfoid'] != '') {
     $b = new Books();
     $book = $b->getBookInfo($data['bookinfoid']);
 }
 $con = '';
 if ($data['consoleinfoid'] != '') {
     $c = new Konsole();
     $con = $c->getConsoleInfo($data['consoleinfoid']);
 }
 $AniDBAPIArray = '';
 if ($data["anidbid"] > 0) {
     $AniDB = new AniDB(['Settings' => $releases->pdo]);
     $AniDBAPIArray = $AniDB->getAnimeInfo($data["anidbid"]);
 }
 $predbQuery = '';
 if ($data["preid"] > 0) {
     $PreDB = new PreDB();
     $predbQuery = $PreDB->getByID($data["preid"]);
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:31,代码来源:details.php

示例3: Books

<?php

$b = new Books();
if (!$page->users->isLoggedIn()) {
    $page->show403();
}
if (isset($_GET["id"]) && ctype_digit($_GET["id"])) {
    $book = $b->getBookInfo($_GET['id']);
    if (!$book) {
        $page->show404();
    }
    $page->smarty->assign('book', $book);
    $page->title = "Info for " . $book['title'];
    $page->meta_title = "";
    $page->meta_keywords = "";
    $page->meta_description = "";
    $page->smarty->registerPlugin('modifier', 'ss', 'stripslashes');
    $modal = false;
    if (isset($_GET['modal'])) {
        $modal = true;
        $page->smarty->assign('modal', true);
    }
    $page->content = $page->smarty->fetch('viewbook.tpl');
    if ($modal) {
        echo $page->content;
    } else {
        $page->render();
    }
}
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:29,代码来源:bookmodal.php

示例4: AdminPage

<?php

require_once "config.php";
$page = new AdminPage();
$book = new Books();
$gen = new Genres();
$id = 0;
// set the current action
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'view';
if (isset($_REQUEST["id"])) {
    $id = $_REQUEST["id"];
    $b = $book->getBookInfo($id);
    if (!$b) {
        $page->show404();
    }
    switch ($action) {
        case 'submit':
            $coverLoc = WWW_DIR . "covers/book/" . $id . '.jpg';
            if ($_FILES['cover']['size'] > 0) {
                $tmpName = $_FILES['cover']['tmp_name'];
                $file_info = getimagesize($tmpName);
                if (!empty($file_info)) {
                    move_uploaded_file($_FILES['cover']['tmp_name'], $coverLoc);
                }
            }
            $_POST['cover'] = file_exists($coverLoc) ? 1 : 0;
            $_POST['publishdate'] = empty($_POST['publishdate']) || !strtotime($_POST['publishdate']) ? $con['publishdate'] : date("Y-m-d H:i:s", strtotime($_POST['publishdate']));
            $book->update($id, $_POST["title"], $_POST['asin'], $_POST['url'], $_POST["author"], $_POST["publisher"], $_POST["publishdate"], $_POST["cover"]);
            header("Location:" . WWW_TOP . "/book-list.php");
            die;
            break;
开发者ID:RickDB,项目名称:newznab-tmux,代码行数:31,代码来源:book-edit.php


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