MediaWiki:Isbn-ukaz-php

Z WikiSkript

<?php

$sqlsrvr = '';
$sqlbase = '';
$sqluser = '';
$sqlpswd = '';
$dbkey = '';
?>
<html>
<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Databáze citací dle isbn</title>
        <style>
                th {border: solid 1px black;}
                td {border: solid 1px black;}
                table {border-collapse: collapse;}
        </style>
</head>
<body>
<table>
        <tr>
                <th>key</th>
                <th>isbnid</th>
                <th>isbn</th>
                <th>příjmení 1</th>
                <th>jméno 1</th>
                <th>příjmení 2</th>
                <th>jméno 2</th>
                <th>přijmení 3</th>
                <th>jméno 3</th>
                <th>korporace</th>
                <th>kolektiv</th>
                <th>název</th>
                <th>podnázev</th>
                <th>vydání</th>
                <th>místo</th>
                <th>vydavatel</th>
                <th>rok</th>
                <th>url</th>
                <th>rozsah</th>
                <th>edice</th>
                <th>svazek</th>
        </tr>
<?php
$con = mysql_connect($sqlsrvr, $sqluser, $sqlpswd);
if (!$con) {
        return False;
}
mysql_select_db($sqlbase, $con);

$sql = 'SELECT * FROM `' . $sqlbase . '`.`ws_isbn`;';
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
        echo "\t<tr>\n";
        echo "\t\t<td>" . $row['key'] . "</td>\n";
        echo "\t\t<td>" . $row['isbnid'] . "</td>\n";
        echo "\t\t<td>" . $row['isbn'] . "</td>\n";
        echo "\t\t<td>" . $row['prijmeni1'] . "</td>\n";
        echo "\t\t<td>" . $row['jmeno1'] . "</td>\n";
        echo "\t\t<td>" . $row['prijmeni2'] . "</td>\n";
        echo "\t\t<td>" . $row['jmeno2'] . "</td>\n";
        echo "\t\t<td>" . $row['prijmeni3'] . "</td>\n";
        echo "\t\t<td>" . $row['jmeno3'] . "</td>\n";
        echo "\t\t<td>" . $row['korporace'] . "</td>\n";
        echo "\t\t<td>" . $row['kolektiv'] . "</td>\n";
        echo "\t\t<td>" . $row['titul'] . "</td>\n";
        echo "\t\t<td>" . $row['podnazev'] . "</td>\n";
        echo "\t\t<td>" . $row['vydani'] . "</td>\n";
        echo "\t\t<td>" . $row['misto'] . "</td>\n";
        echo "\t\t<td>" . $row['vydavatel'] . "</td>\n";
        echo "\t\t<td>" . $row['rok'] . "</td>\n";
        echo "\t\t<td>" . $row['url'] . "</td>\n";
        echo "\t\t<td>" . $row['rozsah'] . "</td>\n";
        echo "\t\t<td>" . $row['edice'] . "</td>\n";
        echo "\t\t<td>" . $row['svazek'] . "</td>\n";
        echo "\t</tr>\n";
}
mysql_close($con);
?>
        </table>
</body>
</html>