Beispiel #1
0
                  <tr>
                    <th><i class="fa fa-list-ol"> Roll</i></th>
                    <th><i class="fa fa-user"> Name</i></th>
                  </tr>
                </thead>
                <tbody>
                <?
                foreach(db_select('students', 'roll, name') as $student)
                {
                ?>
                  <tr>
                    <td><a class="btn btn-link" href="details.php?roll=<? echo $student['roll']; ?>"><? echo $student['roll']; ?></a></td>
                    <td><a class="btn btn-link" href="details.php?roll=<? echo $student['roll']; ?>"><? echo $student['name']; ?></a></td>
                  </tr>
                <?
                }
                ?>
                </tbody>
              </table>
              </div>
              </div>
<?
}

else
    access_error();
    
theme_footer();
db_close();

?>
/**
 * verify_ip
 *
 * @ip string 
 */
function verify_ip($ip)
{
    global $ban_ip;
    if ($ban_ip) {
        $ban_ip = explode("\n", preg_replace("/\\s*\n\\s*/", "\n", strtolower(trim($ban_ip))));
        for ($i = 0; $i < count($ban_ip); $i++) {
            $ban_ip[$i] = trim($ban_ip[$i]);
            if (!$ban_ip[$i]) {
                continue;
            }
            if (strstr($ban_ip[$i], "*")) {
                $ban_ip[$i] = str_replace("*", ".*", $ban_ip[$i]);
                if (preg_match("/{$ban_ip[$i]}/i", $ip)) {
                    access_error();
                }
            } elseif ($ip == $ban_ip[$i]) {
                access_error();
            }
        }
    }
}