Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $conn = mysqli_connect('localhost', 'root', 'passwd', 'kino');
- if (!$conn) {
- echo mysqli_error($conn);
- }
- mysqli_set_charset($conn, 'utf8');
- $getAllFilms = mysqli_query($conn, "SELECT * FROM films");
- $getAllProj = mysqli_query($conn, "SELECT * FROM date_proj LIMIT 7");
- ?>
- <!doctype html>
- <html lang="bg">
- <head>
- <meta charset="utf-8">
- <title>Кино - Royal Мездра</title>
- <meta name="description" content="кино,филми,films,kino">
- <meta name="autdor" content="Toshko Tan`ew">
- <link href="css/bootstrap.css" rel="stylesheet" type="text/css"/>
- <script src="js/bootstrap.js" type="text/javascript"></script>
- <!--[if lt IE 9]>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
- <![endif]-->
- <style type="text/css">
- .price {
- line-height: 5px;
- min-height: 5px;
- height: 5px;
- }
- .fixed{
- width: 50%;
- }
- </style>
- </head>
- <body>
- <table class="table table-striped table-dark">
- <thead>
- <tr>
- <th></th>
- <?php
- while ($filmNames = mysqli_fetch_array($getAllFilms)) {
- echo '<th>'.$filmNames['film_name'].'</th>';
- }
- ?>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th>Price</th>
- <?php
- while ($filmPrice = mysqli_fetch_array($getAllFilms)){
- echo '<th>'.$filmPrice['film_price'].'</th>';
- }
- ?>
- </tr>
- </tbody>
- </table>
- </table>
- </div>
- </body>
- </html>
- <?php
- /*
- header('Content-Type: text/html; charset=UTF-8');
- $weekModifier = 0;
- $locale = 'bg_BG.utf8';
- setlocale(LC_ALL, $locale);
- $date = new DateTime();
- if($date->format('N') !== 1) {
- $date->sub(new DateInterval('P'. $date->format('N') . 'D'));
- }
- $interval = new DateInterval('P'.abs($weekModifier).'W');
- if($weekModifier > 0) {
- $date->add($interval);
- } else {
- $date->sub($interval);
- }
- for($i = 1; $i <= 7; $i++) {
- echo $date->add(new DateInterval('P1D'))->format('l d-m-Y') . "<br>\n";
- }
- *
- *
- *
- * 'SELECT films.film_id,films.film_name,films.film_price,
- date_proj.f_id,date_proj.time_proj,date_proj.dates_proj
- FROM films RIGHT JOIN date_proj'
- */
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement