} else { $where_st .= "OR bookRFID = '" . $deliver[$i]['RFID'] . "'"; } } if ($where_st != "") { $deliver_books = "UPDATE lib_User_Book SET inDate = '" . $date . "' " . $where_st . " ORDER BY user_book_ID DESC LIMIT 1"; $deliver_books_qry = $conn->query($deliver_books); if ($deliver_books_qry === TRUE) { //Success for ($i = 0; $i < count($deliver); $i++) { $res['status'][] = array('book_info' => get_book_info($deliver[$i], $deliver_deadline), 'error' => $error['deliver_success']); } } else { //Failed for ($i = 0; $i < count($deliver); $i++) { $res['status'][] = array('book_info' => get_book_info($deliver[$i], $deliver_deadline), 'error' => $error['failed_to_deliver_book']); } } } //Get username $res['username'] = ""; $res['userRFID'] = ""; if ($user != 0) { $get_rfid = "SELECT RFID FROM lib_RFID WHERE userID = '" . $user . "'"; $get_rfid_qry = $conn->query($get_rfid); if ($get_rfid_qry->num_rows > 0) { if ($rfid = $get_rfid_qry->fetch_assoc()) { $res['userRFID'] = $rfid['RFID']; } } $get_username = "******" . $user . "' AND active = 1";
<?php include 'pdf_creator/mpdf.php'; ini_set("pcre.backtrack_limit", "1000000"); ini_set("memory_limit", "128M"); ini_set('max_execution_time', 300); error_reporting(E_ERROR || E_PARSE); //require_once('connect.php'); require_once 'config.php'; $book_info_id = $_GET['book_info_id']; $book_info = get_book_info($book_info_id); $mpdf = new mPDF('utf-8', array(228.6, 177.7), 12, 2.5, 20.32, 12.7, 12.7, 12.7, 0, 0, 'P'); //encoding;page size;font-size; $mpdf->useSubstitutions = false; $mpdf->simpleTables = true; $mpdf->debug = true; $mpdf->allow_output_buffering = true; $stylesheet = file_get_contents('css/content.css'); $mpdf->WriteHTML($stylesheet, 1); $html .= '<table width="675"> <tr> <td width="337" valign="top"> <img height="150" src="images/tobe_commented.png"> </td> <td width="337" valign="top"> <table width="337"> <tr class="tblrow"> <td> <table class="tblcomment"> <tr style="padding:0px;margin:0px;"> <td valign="top" width="30">