本文整理汇总了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'])) {