fast richtig pierre
|
|
PHP-Quelltext |
1 2 3 4 |
if (getrights('user'))
{
## Deine gesammter PHP Code##
}
|
Seit 02.07.2010 Papa einer süssen Tocher !!!!
http://www.burnerfm.de
Mit den besten Hits der 80´s, 90´s und von heute. Plus einigen PHPKit Addons... uvm.
Mit den besten Hits der 80´s, 90´s und von heute. Plus einigen PHPKit Addons... uvm.
ohne isses aber doofcode
|
Achtung: Dirk Kántor ist unterwegs! Er verteilt gerne Verwarnungen ohne vorher darüber diskutiert zu haben. php-gfx.net Archiv | Addon Room | Scripte | v/Root Server |
Hallo,
wenn ich es so mache, funktioniert es leider nicht...
wenn ich es so mache, funktioniert es leider nicht...
|
|
PHP-Quelltext |
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 |
if (getrights('user'))
{
<?php
mysql_connect("localhost","dbname","passwort");
mysql_select_db("geoo");
list($count) = mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM qrgdb"));
?>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<table border="1" width="100%" id="table1" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<td height="24" bgcolor="#336699" bordercolor="#000000" style="color: #FFFFFF">
<b>
<font face="Arial" color="#FFFFFF">Letzte Datenbankeinträge (insgesamt <?= $count; ?> Einträge)</font></b></td>
</tr>
<tr>
<td>
<table border="1" id="table2" style="border-collapse: collapse" bordercolor="#336699" width="100%" bgcolor="#EEEEEE">
<tr>
<!--<td background="http://www.geoo.de/trop/images/style/colorless/heads3.gif"><b><font face="Arial" size="2">nummer</font></b></td>
<td background="http://www.geoo.de/trop/images/style/colorless/heads3.gif"><b><font face="Arial" size="2">id</font></b></td>-->
<td bgcolor="#DEDEDE"> </td>
<td bgcolor="#DEDEDE"> </td>
<td bgcolor="#DEDEDE"><b><font size="2" face="Arial">ID</font></b></td>
<td width="116" bgcolor="#DEDEDE"><b><font size="2" face="Arial">
Eintragsdatum</font></b></td>
<td width="116" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Frequenz
kHz.</font></b></td>
<td width="216" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Station</font></b></td>
<td bgcolor="#DEDEDE"><b><font face="Arial" size="2">Land</font></b></td>
<td width="175" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Sprache</font></b></td>
<td width="100" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Log-Datum</font></b></td>
<td bgcolor="#DEDEDE"><b><font face="Arial" size="2">User</font></b></td>
</tr>
<?php
}
// Datenbankzugriff
$sql="SELECT * FROM qrgdb order By id desc limit 15";
$ergebnis=mysql_query($sql);
$i=0;
while ($zeile=mysql_fetch_array($ergebnis)){
$i++;
echo "<tr>
<!--<td>".$i."</td>
<td><font face='Arial' size='2'>".$zeile["id"]."</font></td>-->
<td><font face='Arial' size='2'><a href=\"db2/search.php?anzeige=info&search=id&is=".$zeile["id"]."\" target=\"blank\" onClick=\"window.open('db2/search.php?anzeige=info&search=id&is=".$zeile["id"]."', '', 'width=700,height=300,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no'); return false;\"><img src=\"db2/lupe.gif\" border=\"0\" /></a></td>
<td><font face='Arial' size='2'>".($zeile["audio"] != "" ? "<a href=\"".$zeile["audio"]."\" target=\"blank\"><img src=\"images/lautsprecher.gif\" width=25 height=25 border=0 /></a>" : "")."</td>
<td><font face='Arial' size='2'>".$zeile["id"]."</td>
<td><font face='Arial' size='2'>".$zeile["timestamp"]."</td>
<td><font face='Arial' size='2'>".$zeile["freq"]."</td>
<td><font face='Arial' size='2'>".$zeile["station"]."</td>
<td><font face='Arial' size='2'>".$zeile["itu"]."</td>
<td><font face='Arial' size='2'>".$zeile["lang"]."</td>
<td><font face='Arial' size='2'>".$zeile["date"]."<br />".$zeile["time"]."</td>
<td><font face='Arial' size='2'>".$zeile["user"]."</td>
</tr>";
}
mysql_close();
?></table></td>
</tr>
</table>
<p> </p>
<p> </p>
|
OffTopic
"machenwirdenbulletdooftag"
der is geil bulletchen
"machenwirdenbulletdooftag"
der is geil bulletchen

und deine datei, wenn das oben der inhalt komplett gewesen sein soll.. und unter berufung das deine DB die selbe wie die das kits ist, müsste phpkitoldlike dann so aussehen:
|
|
PHP-Quelltext |
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 |
<?php
if (getrights('user'))
{
$count = $DB->fetch_array($DB->query("SELECT COUNT(*) FROM qrgdb"));
$site_body .= '<table border="1" width="100%" id="table1" style="border-collapse: collapse" bordercolor="#000000">
<tr>
<td height="24" bgcolor="#336699" bordercolor="#000000" style="color: #FFFFFF">
<b>
<font face="Arial" color="#FFFFFF">Letzte Datenbankeinträge (insgesamt '.$count[0].' Einträge)</font></b></td>
</tr>
<tr>
<td>
<table border="1" id="table2" style="border-collapse: collapse" bordercolor="#336699" width="100%" bgcolor="#EEEEEE">
<tr>
<!--<td background="http://www.geoo.de/trop/images/style/colorless/heads3.gif"><b><font face="Arial" size="2">nummer</font></b></td>
<td background="http://www.geoo.de/trop/images/style/colorless/heads3.gif"><b><font face="Arial" size="2">id</font></b></td>-->
<td bgcolor="#DEDEDE"> </td>
<td bgcolor="#DEDEDE"> </td>
<td bgcolor="#DEDEDE"><b><font size="2" face="Arial">ID</font></b></td>
<td width="116" bgcolor="#DEDEDE"><b><font size="2" face="Arial">
Eintragsdatum</font></b></td>
<td width="116" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Frequenz
kHz.</font></b></td>
<td width="216" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Station</font></b></td>
<td bgcolor="#DEDEDE"><b><font face="Arial" size="2">Land</font></b></td>
<td width="175" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Sprache</font></b></td>
<td width="100" bgcolor="#DEDEDE"><b><font face="Arial" size="2">Log-Datum</font></b></td>
<td bgcolor="#DEDEDE"><b><font face="Arial" size="2">User</font></b></td>
</tr>';
}
// Datenbankzugriff
$sql="SELECT * FROM qrgdb order By id desc limit 15";
$ergebnis=$DB->query($sql);
$i=0;
while ($zeile=$DB->fetch_assoc($ergebnis)){
$i++;
$site_body .= "<tr>
<!--<td>".$i."</td>
<td><font face='Arial' size='2'>".$zeile["id"]."</font></td>-->
<td><font face='Arial' size='2'><a href=\"db2/search.php?anzeige=info&search=id&is=".$zeile["id"]."\" target=\"blank\" onClick=\"window.open('db2/search.php?anzeige=info&search=id&is=".$zeile["id"]."', '', 'width=700,height=300,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no'); return false;\"><img src=\"db2/lupe.gif\" border=\"0\" /></a></td>
<td><font face='Arial' size='2'>".($zeile["audio"] != "" ? "<a href=\"".$zeile["audio"]."\" target=\"blank\"><img src=\"images/lautsprecher.gif\" width=25 height=25 border=0 /></a>" : "")."</td>
<td><font face='Arial' size='2'>".$zeile["id"]."</td>
<td><font face='Arial' size='2'>".$zeile["timestamp"]."</td>
<td><font face='Arial' size='2'>".$zeile["freq"]."</td>
<td><font face='Arial' size='2'>".$zeile["station"]."</td>
<td><font face='Arial' size='2'>".$zeile["itu"]."</td>
<td><font face='Arial' size='2'>".$zeile["lang"]."</td>
<td><font face='Arial' size='2'>".$zeile["date"]."<br />".$zeile["time"]."</td>
<td><font face='Arial' size='2'>".$zeile["user"]."</td>
</tr>";
}
$site_body .= "</table></td>
</tr>
</table>
<p> </p>
<p> </p>";
?>
|
Erklärungen:
phpkit besitzt eine DB anbindung.. die du mittels $DB aufrufen kannst.. siehe $DB->query(""); was mysql_query("") wäre...
etc..
weiter sind die ausgaben des phpkits in der variablen $site_body zu finden.. damit diese erweitert werden kann, macht man sowas:
$site_body .= "";
anstatt eines echo "";
so.. ich schliess mich bullet mal an

ich bin auch raus aus dem thread
|
Achtung: Dirk Kántor ist unterwegs! Er verteilt gerne Verwarnungen ohne vorher darüber diskutiert zu haben. php-gfx.net Archiv | Addon Room | Scripte | v/Root Server |
Ähnliche Themen
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
1.6.1 Reihenfolge von PHP-Dateien auf Startseite falsch
(13. Mai 2010, 18:53)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
Der Zugriff auf die angewählte Seite wurde unterbunden.
(26. November 2008, 15:29)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
Community Box deaktivieren?
(26. März 2008, 05:01)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
news overview auf der startseite nur für user sichtbar, wie?
(13. März 2008, 22:47)
-
alte Versionen [1.6.03|1.6.1|1.6.4] »-
Startseite + PN´s
(2. März 2008, 01:24)


