public function init() { Doo::loadClassAt('Category', 'default'); Doo::loadClassAt('City', 'default'); BookController::$dataTableUrl = adminAppUrl('operation/book/dataTable'); BookController::$addUrl = adminAppUrl('operation/book/add'); BookController::$modUrl = adminAppUrl('operation/book/mod?id='); BookController::$delUrl = adminAppUrl('operation/book/del?id='); BookController::$city = '<select class="m-wrap" name="city" id="city-element"><option value="0">' . L('全部城市') . '</option>' . City::cateToOption($this->getUrlVar('city'), 1) . '</select>'; }
/** * Delete from DB and from the disk * * @param void * @return boolean */ function delete() { if ($this->getTypeString() == 'sprd') { try { $bookId = $this->getFileContent(); ob_start(); include_once ROOT . "/" . PUBLIC_FOLDER . "/assets/javascript/gelSheet/php/config/settings.php"; include_once ROOT . "/" . PUBLIC_FOLDER . "/assets/javascript/gelSheet/php/util/db_functions.php"; //include_once ROOT . "/" . PUBLIC_FOLDER . "/assets/javascript/gelSheet/php/util/lang/languages.php"; include_once ROOT . "/" . PUBLIC_FOLDER . "/assets/javascript/gelSheet/php/controller/BookController.class.php"; $bc = new BookController(); $bc->deleteBook($bookId); ob_end_clean(); } catch (Error $e) { } } try { FileRepository::deleteFile($this->getRepositoryId()); } catch (Exception $ex) { Logger::log($ex->getMessage()); } $this->deleteThumb(false); return parent::delete(); }
<?php session_start(); include_once "searchbook.php"; include_once 'controller/book_controller.php'; $bookController = new BookController(); ?> <!DOCTYPE html> <html> <head> <title>E-Biblio. Online library. About</title> <meta charset="UTF-8"> <link rel="stylesheet" href="css/foundation.min.css"> <link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/custom.css"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,800italic,300italic,400italic,600,600italic,700,700italic,800" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700,700italic,900,900italic" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet"> </head> <body> <div class="container background-beige"> <?php if (isset($_SESSION['login_user'])) { // include('session.php'); echo "<ul id='logoutmenu'>\n\t\t\t\t\t\t\t\t\t<li> <p id='welcome'>Welcome : <i>"; echo $_SESSION['login_user']; echo "</i></p> </li>\n\t\t\t\t\t\t\t\t\t<li> <a href='logout.php' id='logout'>Log Out</a> </li>\n\t\t\t\t\t\t\t</ul>"; }
public function showBook() { $this->loadTemplate(); $controller = new BookController(); $controller->showBook(); }
<?php //include('session.php'); include_once 'controller/user_controller.php'; include_once 'controller/book_controller.php'; include_once 'controller/review_controller.php'; include_once 'controller/read_controller.php'; include_once "searchbook.php"; include_once "approve.php"; include_once "del_book.php"; include_once "del_user.php"; include_once "save_book.php"; include_once "insertbook.php"; $userController = new UserController(); $bookController = new BookController(); $reviewController = new ReviewController(); $readController = new ReadingController(); ?> <!DOCTYPE html> <html> <head> <title>E-Biblio. Online library. About</title> <meta charset="UTF-8"> <link rel="stylesheet" href="css/foundation.min.css"> <link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/custom.css"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,800italic,300italic,400italic,600,600italic,700,700italic,800" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700,700italic,900,900italic" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">
BookController::store(); }); $routes->get('/book/new', 'check_logged_in', function () { BookController::new_book(); }); $routes->get('/book/:id', 'check_logged_in', function ($id) { BookController::show($id); }); $routes->get('/book/:id/edit', 'check_logged_in', function ($id) { BookController::edit($id); }); $routes->post('/book/:id/edit', 'check_logged_in', function ($id) { BookController::update($id); }); $routes->post('/book/:id/destroy', 'check_logged_in', function ($id) { BookController::destroy($id); }); // Reader $routes->get('/login', function () { ReaderController::login(); }); $routes->post('/login', function () { ReaderController::handle_login(); }); $routes->get('/logout', function () { ReaderController::logout(); }); $routes->get('/register', function () { ReaderController::new_user(); }); $routes->get('/reader/:id/edit', function ($id) {
<?php session_start(); include_once "controller/book_controller.php"; include_once 'searchbook.php'; $bookController = new BookController(); ?> <!DOCTYPE html> <html> <head> <title>E-Biblio. Online library.</title> <meta charset="UTF-8"> <link rel="stylesheet" href="css/foundation.min.css"> <link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/custom.css"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,800italic,300italic,400italic,600,600italic,700,700italic,800" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700,700italic,900,900italic" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet"> </head> <body> <div class="container background-beige"> <?php if (isset($_SESSION['login_user'])) { echo "<ul id='logoutmenu'>\n\t\t\t\t\t\t\t<li> <p id='welcome'>Welcome : <i>"; echo $_SESSION['login_user']; echo "</i></p> </li>\n\t\t\t\t\t\t\t\t<li> <a href='logout.php' id='logout'>Log Out</a> </li>\n\t\t\t\t\t\t</ul>"; } ?>
}); $routes->get('/allbooks/new', 'check_admin_logged', function () { BookController::create(); }); $routes->get('/allbooks/:id', function ($id) { BookController::gettingDetails($id); }); $routes->get('/allbooks/:id/edit', 'check_admin_logged', function ($id) { BookController::showEditForm($id); }); $routes->post('/allbooks/:id/edit', 'check_admin_logged', function ($id) { BookController::updateBook($id); }); $routes->post('/allbooks/:id/delete', 'check_admin_logged', function ($id) { // BookController::deleteBook($id); }); $routes->post('/allbooks/:id/add', 'check_user_logged_in', function ($id) { ReaderController::addBookToUser($id); }); $routes->get('/login', function () { ReaderController::login(); }); $routes->post('/login', function () { ReaderController::handleLogin(); }); $routes->get('/list', 'check_user_logged_in', function () { ReaderController::readersList(); }); $routes->post('/allbooks/:id/remove', 'check_user_logged_in', function ($id) { ReaderController::removeBookFromUser($id);
<?php require 'Controller/BookController.php'; $bookController = new BookController(); if (isset($_POST['types'])) { $bookTables = $bookController->CreateBookTables($_POST['types']); } else { $bookTables = $bookController->CreateBookTables('%'); } $title = 'Book overview'; $content = $bookController->CreateBookDropdownList() . $bookTables; include 'bookinfo.php';
<?php session_start(); include_once 'controller/book_controller.php'; $bookController = new BookController(); ?> <!DOCTYPE html> <html> <head> <title>E-Biblio. Online library. About</title> <meta charset="UTF-8"> <link rel="stylesheet" href="css/foundation.min.css"> <link rel="stylesheet" href="css/foundation.css"> <link rel="stylesheet" href="css/custom.css"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300,800italic,300italic,400italic,600,600italic,700,700italic,800" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Lato:400,100,100italic,300,300italic,400italic,700,700italic,900,900italic" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet"> </head> <body> <div class="container background-beige"> <?php if (isset($_SESSION['login_user'])) { // include('session.php'); echo "<ul id='logoutmenu'>\n\t\t\t\t\t\t\t\t\t<li> <p id='welcome'>Welcome : <i>"; echo $_SESSION['login_user']; echo "</i></p> </li>\n\t\t\t\t\t\t\t\t\t<li> <a href='logout.php' id='logout'>Log Out</a> </li>\n\t\t\t\t\t\t\t</ul>"; } ?>
public function deleteBook($bookId) { $this->security->checkDelete($bookId); $bookController = new BookController(); return $bookController->deleteBook($bookId); }
echo CHtml::encode($data->notes); ?> <br /> <b><?php echo CHtml::encode($data->getAttributeLabel('lendable')); ?> :</b> <?php echo CHtml::encode($data->lendable); ?> <br /> <?php echo "<b>" . CHtml::encode($data->getAttributeLabel('borrower')) . ":</b>"; BookController::set_fullname($data); echo CHtml::encode($data->borrower_fullname); ?> <br /> <?php if ($data->requesters && $isAdmin) { echo "<b>Requests</b><br/>\n"; echo "<ul>\n"; foreach ($data->requesters as $r) { echo "<li>" . CHtml::encode($r->person->fname . ' ' . $r->person->lname) . " <a href=\"" . Yii::app()->createUrl("library/lend", array("book_id" => $data->id, "user_id" => $r->id)) . "\">Lend</a>" . "</li>"; } echo "</ul>\n"; } ?>