本文整理匯總了PHP中Library::showBooks方法的典型用法代碼示例。如果您正苦於以下問題:PHP Library::showBooks方法的具體用法?PHP Library::showBooks怎麽用?PHP Library::showBooks使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Library
的用法示例。
在下文中一共展示了Library::showBooks方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Library
<td>No Data</td>
<td>Nama Data</td>
<td>Jenis Data</td>
<td>Semester</td>
<td>Jenis Data</td>
<td>Ukuran Data</td>
<td>Tanggal Upload</td>
<td>Lokasi Upload</td>
<td>Delete</td>
<td>Edit</td>
<td>Download</td>
</tr>
<?php
require "Library.php";
$Lib = new Library();
$show = $Lib->showBooks();
while ($data = $show->fetch(PDO::FETCH_OBJ)) {
echo "\n <tr>\n <td>{$data->no_data}</td>\n <td>{$data->nama_data}</td>\n <td>{$data->mata_kuliah}</td>\n <td>{$data->semester}</td>\n <td>{$data->type_file}</td>\n <td>{$data->ukuran}</td>\n <td>{$data->tanggal}</td>\n <td>{$data->file}</td> \n <td><a class='btn btn-danger' href='list.php?delete={$data->no_data}'>Delete</a></td>\n <td><a class='btn btn-info' href='edit.php?kode={$data->no_data}'>Edit</td>\n <td><a class='btn btn-info' href='list.php?download={$data->no_data}'>Download</td>\n </tr>";
}
?>
</table>
<a href="tambah.php" class="btn btn-success">Tambah file</a>
</div>
</body>
</html>
<?php
if (isset($_GET['delete'])) {
$del = $Lib->deleteBook($_GET['delete']);
}
if (isset($_GET['download'])) {