📄 func.php
字号:
<?
/* Funktionen für eine einfache Datenbank-Schnittstelle */
/* ---------------------------------------------------- */
function send_sql($db, $sql) {
if (! $res=mysql_db_query($db, $sql)) {
echo mysql_error();
exit;
}
return $res;
};
function template_header($links){
echo "
<img src='pics/lcfblogs.png' width='256' height='80' border='0'>
<br><b>Menu:</b><br>
<table><tr><td bgcolor='#C0E7FF'>$links</td></tr></table>";
};
function tab_blognamesout($result){
echo "<table><tr><td><b>Blogs im Archiv:</b></td></tr>";
for($i=0; $i<mysql_num_rows($result); $i++){
$tabellen = mysql_tablename($result,$i);
$tabellensub = substr($tabellen,0,7);
if ($tabellensub=="lcfblog"){
$tabellenout = strrchr($tabellen,"_");
echo "<tr><td align='left'><a href='index.php?id=33&blogname=$tabellen'>";
echo $tabellenout;
echo "</a></td></tr>";};
}
};
function tab_blogout($result)
{
$anz=mysql_num_fields($result);
echo "<table border=0 cellpadding='2' cellspacing='2' width='400'>
<tr><td>name:</td><td width='200'> inhalt</td></tr>";
$num = mysql_num_rows($result);
for ($j = 0; $j < $num; $j++)
{
$row = mysql_fetch_array($result);
echo "<tr><td>$row[0]<br>$row[1]</td>
<td>$row[2]</td>";
echo "</tr><tr><th colspan='$anz'><hr></th></tr>";
};
echo "</table>";
} ;
function tab_blogoutlight($result)
{
$anz=mysql_num_fields($result);
echo "<table border=0 cellpadding='2' cellspacing='2' width='400'>";
$num = mysql_num_rows($result);
for ($j = 0; $j < $num; $j++)
{
$row = mysql_fetch_array($result);
echo "<tr>";
for ($k=0;$k<$anz;$k++)
{
$fn=mysql_field_name($result,$k);
echo " <td valign='top'>";
echo "$row[$fn]";
echo "</td> " ;
};
echo "</tr><tr><th colspan='$anz'><hr></th></tr>";
};
echo "</table>";
} ;
function new_entry($blogn){
echo "
<FORM action='index.php' method='POST'>
<INPUT type='hidden' name='id' value='33b'><br>
<INPUT type='hidden' name='blogname' value='$blogn'>
name:<br>
<INPUT type='text' name='name'><br>
Text(max. 255 Zeichen):<br>
<INPUT type='text' name='content'><br>
<INPUT type='submit' value='eintragen'>
</FORM>
";
};
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -