hellope

switch colors

May 18th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.26 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
  5.     <title>Dashboard Data Loket</title>
  6.     <!-- css -->
  7.   <link href="<?= base_url('assets/style.css');?>"  rel="stylesheet"/>  
  8.   <link href="<?= base_url('assets/plugins/bootstrap/css/bootstrap.min.css');?>" rel="stylesheet"/>  
  9.   <link rel="stylesheet" type="text/css" href="<?= base_url('assets/plugins/font-awesome/css/font-awesome.css');?>">        
  10. </head>
  11. <body>
  12.     <div id="main">
  13.     <div class="divHeader">
  14.     <div class="title" >
  15.         PDAM TIRTA MULIA <br> DASHBOARD LOKET
  16.     </div>
  17.     </div>
  18.    <div class="container-fluid">
  19.      <div class="row">
  20.      <?php
  21.          $no=1;
  22.          $style = '';
  23.          foreach ($hasil->result() as $data) {
  24.             $style = $data->status == true ? 'style="background-color: green;"':'style="background-color: red;"';
  25.      ?>
  26.         <div class="col-md-2" <?=$style;?> >
  27.              Loket                  : <?php echo $data->loket;?> <br>
  28.              Jumlah uang            : <?php echo $data->jml_uang;?> <br>
  29.              Jumlah Rekening        : <?php echo $data->jml_rek;?> <br>
  30.      </div>
  31.      <?php
  32.             }
  33.         ?>
  34.    </div>
  35. </div>
  36. </div>
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment