BAWANG GORENG
/
home
/
ecommerceavenue
/
ecommerceavenue.com
/
public_html
/
couronne205
/
tvchannels
/
manage
/
Nama File / Folder
Size
Action
_notes
--
NONE
_delete.php
2.572KB
Hapus
Edit
Rename
config.php
0.489KB
Hapus
Edit
Rename
delete.php
2.572KB
Hapus
Edit
Rename
index.php
4.596KB
Hapus
Edit
Rename
update.php
6.819KB
Hapus
Edit
Rename
<=Back
<?php $title = "Manage DB / TV Channels"; $array_table_colums = array ( "id", "channel_number", "channel_id", "description", "url", "default_url", "stamp_youtube_api_last_access", ); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title><?php echo $title; ?></title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <style> .wrapper{ width: 600px; margin: 0 auto; } table tr td:last-child{ width: 120px; } </style> <script> $(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); }); </script> </head> <body> <div class="container-fluid"> <div class="row justify-content-md-center"> <h1><?php echo $title; ?></h1> <div class="table-wrapper" tabindex="0"> <?php // Include config file require_once "config.php"; // Attempt select query execution $sql = "SELECT * FROM tv_channels"; if($result = mysqli_query($link, $sql)){ if(mysqli_num_rows($result) > 0){ echo '<table class="table table-bordered table-striped">'; echo "<thead>"; echo "<tr>"; foreach ($array_table_colums as $column_header) { echo "<th>" . str_replace("_", " ", $column_header) . "</th>"; } echo "</tr>"; echo "</thead>"; echo "<tbody>"; while($row = mysqli_fetch_array($result)){ echo "<tr>"; foreach ($array_table_colums as $column_name => $column_value) { if ($column_value == "url" || $column_value == "default_url") { echo "<td>". '<a target="_blank" href=' . $row[$column_value] . '">' . $row[$column_value] . '</a>' . "</td>"; } else { echo "<td>" . $row[$column_value] . "</td>"; } } echo "<td>"; //echo '<a href="read.php?id='. $row['id'] .'" class="mr-3" title="View Record" data-toggle="tooltip"><span class="fa fa-eye"></span></a>'; echo '<a href="update.php?id='. $row['id'] .'" class="mr-3" title="Update Record" data-toggle="tooltip"><span class="fa fa-pencil"></span></a>'; //echo '<a href="delete.php?id='. $row['id'] .'" title="Delete Record" data-toggle="tooltip"><span class="fa fa-trash"></span></a>'; echo "</td>"; echo "</tr>"; } echo "</tbody>"; echo "</table>"; // Free result set mysqli_free_result($result); } else{ echo '<div class="alert alert-danger"><em>No records were found.</em></div>'; } } else{ echo "Oops! Something went wrong. Please try again later."; } // Close connection mysqli_close($link); ?> </div> </div> </div> </body> </html>
Liking