viewing paste index.php | PHP

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
<html lang="pt">
<head>
<?php
    require_once( 'connect.php' );
    $sql = new mysql();
?>
    <meta charset="utf-8" />
    <title>Last News IP.Board by Envolvents</title>
    <meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; width=device-width;">
    <style type="text/css">
    /*
    * Last News IP.Board by Envolvents
    * v.1.0
    * 01/03/2017
    */
 
    @import url(http://fonts.googleapis.com/css?family=Roboto:400,500,700,300,100);
 
    body {
      background-color: #3e94ec;
      font-family: "Roboto", helvetica, arial, sans-serif;
      font-size: 16px;
      font-weight: 400;
      text-rendering: optimizeLegibility;
    }
 
    div.table-title {
       display: block;
      margin: auto;
      max-width: 600px;
      padding:5px;
      width: 100%;
    }
 
    .table-title h3 {
       color: #fafafa;
       font-size: 30px;
       font-weight: 400;
       font-style:normal;
       font-family: "Roboto", helvetica, arial, sans-serif;
       text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
       text-transform:uppercase;
       text-align: center;
    }
 
 
    /*** Table Styles **/
 
    .table-fill {
      background: white;
      border-radius:3px;
      border-collapse: collapse;
      height: 320px;
      margin: auto;
      max-width: 600px;
      padding:5px;
      width: 100%;
      box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
      animation: float 5s infinite;
    }
     
    th {
      color:#D5DDE5;;
      background:#1b1e24;
      border-bottom:4px solid #9ea7af;
      border-right: 1px solid #343a45;
      font-size:23px;
      font-weight: 100;
      padding:24px;
      text-align:left;
      text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
      vertical-align:middle;
    }
 
    th:first-child {
      border-top-left-radius:3px;
    }
     
    th:last-child {
      border-top-right-radius:3px;
      border-right:none;
    }
      
    tr {
      border-top: 1px solid #C1C3D1;
      border-bottom-: 1px solid #C1C3D1;
      color:#666B85;
      font-size:16px;
      font-weight:normal;
      text-shadow: 0 1px 1px rgba(256, 256, 256, 0.1);
    }
     
    tr:hover td {
      background:#4E5066;
      color:#FFFFFF;
      border-top: 1px solid #22262e;
      border-bottom: 1px solid #22262e;
    }
    tr:hover td a {
      color:#FFFFFF;
    }
     
    tr:first-child {
      border-top:none;
    }
 
    tr:last-child {
      border-bottom:none;
    }
     
    tr:nth-child(odd) td {
      background:#EBEBEB;
    }
     
    tr:nth-child(odd):hover td {
      background:#4E5066;
    }
 
    tr:last-child td:first-child {
      border-bottom-left-radius:3px;
    }
     
    tr:last-child td:last-child {
      border-bottom-right-radius:3px;
    }
     
    td {
      background:#FFFFFF;
      padding:20px;
      text-align:left;
      vertical-align:middle;
      font-weight:300;
      font-size:18px;
      text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
      border-right: 1px solid #C1C3D1;
    }
 
    td a {
      color: #666B85;
      text-decoration: underline;
    }
    td:last-child {
      border-right: 0px;
    }
 
    th.text-left {
      text-align: left;
    }
 
    th.text-center {
      text-align: center;
    }
 
    th.text-right {
      text-align: right;
    }
 
    td.text-left {
      text-align: left;
    }
 
    td.text-center {
      text-align: center;
    }
 
    td.text-right {
      text-align: right;
    }
    </style>
</head>
<body>
    <div class="table-title">
        <h3>Noticias IP.B 3.4.x by Ferraz</h3>
    </div>
    <table class="table-fill">
        <thead>
            <tr>
                <th class="text-left">Data</th>
                <th class="text-left">Título</th>
                <th class="text-left">Autor</th>
                <th class="text-left">Acesse</th>
            </tr>
        </thead>
        <tbody class="table-hover">
            <?php
                $sql->build( 'SELECT `tid`,`title`,`starter_name`,`start_date`,`title_seo` FROM `topics` where `forum_id`=2 ORDER BY `tid` DESC LIMIT 0,5');
                $sql->execute();
                while( $app = $sql->fetchassoc() )
                {
                    $date = date("d/m", $app['start_date']);
                    echo( "<tr>");
                    #echo( "<div id=\"news-line\"><span class=\"news-date\">[{$date}]</span> {$app['title']} <a href=\"http://127.0.0.1:7070/forum/index.php?/topic/{$app['tid']}-{$app['title_seo']}\" class=\"tipsyTIP\" title=\"Clique para ver a notícia completa.\" target=\"_blank\">[mais ...]</a></div>");
                    echo( "<td class=\"text-left\">{$date}</td>");
                    echo( "<td class=\"text-left\">{$app['title']}</td>");
                    echo( "<td class=\"text-left\">{$app['starter_name']}</td>");
                    echo( "<td class=\"text-left\"><a href=\"" . BOARD . "index.php?/topic/{$app['tid']}-{$app['title_seo']}\" class=\"tipsyTIP\" title=\"Clique para ver a notícia completa.\" target=\"_blank\">[mais ...]</a></td>");
                    echo( "</tr>");
                }
            ?>
        </tbody>
    </table>
</body>
Viewed 1122 times, submitted by Envolvents.