Beiträge von theclasses
-
-
-
dein eintrag ist da, allerdings auch in der Mitte der Einträge zu finden.
-
-
Hallo Leute,
kann mir einer bei diesem PHP Script helfen.
Immer wenn ich einen Neuen Gästebuch eintrag mache, kommt dieser Eintrag nicht oben vor, sondern in der Mitte vor.guestbuch.php
PHP
Alles anzeigen<center><font face="Comic Sans MS" size="+1"><u>Gästebuch</u></font></center> <center> <FORM action="http://adresse.de/aus.php" method="post"> <TABLE border="0" cellspacing="0" cellpadding="0"> <colgroup> <col width='100'> <col width='100'> </colgroup> <TR> <TD align="center" class="table">Name:</TD> <TD><INPUT name="name" size="34" maxlength="30" class="input"></TD> </TR> <TR> <TD align="center" class="table">E-mail:</TD> <TD><INPUT name="email" size="34" maxlength="50" class="input"></TD> </TR> <TR> <TD align="center" class="table">Homepage:</TD> <TD><INPUT name="homepage" size="34" maxlength="100" value="http://" class="input"></TD> </TR> <TR> <TD align="center" class="table">Text:</TD> <TD><TEXTAREA name="text" cols="34" rows="7" class="input"></TEXTAREA></TD> </TR> <TR> <TD align="center" class="table">Sicherheitscode:</TD> <?php /* Kombination besteht aus sechs Zahlen*/ for ($k=1; $k<=6; $k++) { $code1 .= chr(mt_rand()%10+48); } echo "<TD>[i]$code1[/i]<input type='hidden' name='code1' size='20' value='$code1'><input name='code2' size='20' class='input'></TD>"; ?> <TR> <td align="center" class="table">Info:</td> <TD class="sicher">Trage diesen Sicherheitscode mit 6 Zahlen hier oben ein.Anhand dieses Codes können wir den Missbrauch durch automatisierte Mitteilungen verhindern.</TD> </TR> <TR> <TD colspan="2"><hr width="300"></TD> </TR> <TR> <TD align="center"><input type="submit" name="eintrag" value="Senden" class="input"></TD> <TD align="center"><input type="reset" value="Reset" class="input"></TD> </TR> </TABLE> </FORM></center> <?php mysql_connect("localhost","benutzername","passwort"); mysql_select_db("benutzername"); $res = mysql_query("select * from gbook order by datum asc"); $num = mysql_num_rows($res); /*Datenbank auslesen*/ while ($dsatz = mysql_fetch_assoc($res)) { echo "<TABLE cellspacing='0' cellpadding='3' bgcolor='white' width='85%'><colgroup><col width='85'><col width='500'></colgroup>"; echo "<TR><TD align='right' colspan='2'>" . $dsatz["datum"] . "</TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>Name:<font></font></TD><TD>" . $dsatz["name"] . "</TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>E-Mail:<font></TD><TD><A href=mailto:" . $dsatz["email"] . ">" . $dsatz["email"] . "</A></TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>Homepage:<font></TD><TD>[url=' . $dsatz[']" . $dsatz["homepage"] . "[/url]</TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>Text:<font></TD><TD>" . $dsatz["text"] . " </P></TD></TR><TR>"; echo "<TD colspan='2'><center>--------------------------------------------------------------</center></TD></TR></TABLE> "; } ?>
aus.php
PHP
Alles anzeigen<?php $name=$_POST['name']; $email=$_POST['email']; $homepage=$_POST['homepage']; $text=$_POST['text']; $code1=$_POST['code1']; $code2=$_POST['code2']; if($code1==$code2) { if($name!="") { if($email!="") { if($text!="") { $jetzt = time(); $datum = date("d-m-Y H:i:s",$jetzt); require_once("../E-Mail/htmlMimemail/htmlMimeMail.php"); $mail = new htmlMimeMail(); $mail->setFrom("absender@adresse.de;"); $mail->setSubject("Neuer Gästebucheintrag"); $mail->sethtml("<form action='http://adresse.de/ein.php' method='post'>" . " Neuer Gästebucheintrag:</p><table border='0'><colgroup><col width='150'><col width='300'></colgroup>" . "<tr><td>Datum:</td><td>[i]<input name='datum' size='34' maxlength='30' value='$datum'>[/i]</td></tr>" . "<tr><td>Name:</td><td>[i]<input name='name' size='34' maxlength='30' value='$name'>[/i]</td></tr>" . "<tr><td>E-Mail:</td><td>[i]<input name='email' size='34' maxlength='50' value='$email'>[/i]</td></tr>" . "<tr><td>Homepage:</td><td>[i]<input name='homepage' size='34' maxlength='100' value='$homepage'>[/i]</td></tr>" . "<tr><td>Text:</td><td>[i]<textarea name='text' cols='34' rows='7'>$text</textarea>[/i]</td></tr>" . "<tr><td colspan='2'><hr width='300'></td></tr>" . "<tr><td align='center'><input type='submit' name='eintrag' value='Senden'></td><tr></table></form>"); $empf = array("email@adresse.de"); $mail->send($empf); } else {echo " Bitte schreiben Sie einen Text hinein! "; echo "[url='javascript:window.back()'][b]Zurück[/b][/url]"; exit; } } else {echo " Bitte tragen Sie eine E-Mail Adresse hinein! "; echo "[url='javascript:window.back()'][b]Zurück[/b][/url]"; exit; } } else {echo " Bitte geben Sie einen Namen an! "; echo "[url='javascript:window.back()'][b]Zurück[/b][/url]"; exit; } } else {echo " Der Sicherheitscode stimmt nicht! "; echo "[url='javascript:window.back()'][b]Zurück[/b][/url]"; exit; } ?> Ihr Gästebucheintrag muss erst vom Webmaster freigegeben werden, damit ihn andere auch lesen können! Bitte haben Sie ein wenig geduldt!</p>
ein.php
PHP
Alles anzeigen<?php mysql_connect("localhost","benutzername","Passwort"); mysql_select_db("benutzername"); /*Neuen Beitrag in Datenbank schreiben*/ if(isset($_POST['eintrag'])) { $sqlab = "insert gbook (datum, name, email, homepage, text) "; $sqlab .= "values ('" . $_POST["datum"] . "','" . $_POST["name"] . "','" . $_POST["email"]. "','" . $_POST["homepage"]; $sqlab .= "', '" . $_POST["text"] . "')"; mysql_query($sqlab); } echo "Der neue Gästebucheintrag wurde erfolgreich gespeichert!"; ?> <?php mysql_connect("localhost","benutzername","Passwort"); mysql_select_db("benutzername"); $res = mysql_query("select * from gbook order by datum desc"); $num = mysql_num_rows($res); /*Datenbank auslesen*/ while ($dsatz = mysql_fetch_assoc($res)) { echo "<TABLE cellspacing='0' cellpadding='3' bgcolor='white' width='85%'><colgroup><col width='85'><col width='500'></colgroup>"; echo "<TR><TD align='right' colspan='2'>" . $dsatz["datum"] . "</TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>Name:<font></font></TD><TD>" . $dsatz["name"] . "</TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>E-Mail:<font></TD><TD><A href=mailto:" . $dsatz["email"] . ">" . $dsatz["email"] . "</A></TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>Homepage:<font></TD><TD>[url=' . $dsatz[']" . $dsatz["homepage"] . "[/url]</TD></TR>"; echo "<TR><TD bgcolor='black' valign='top'><font color='white'>Text:<font></TD><TD>" . $dsatz["text"] . " </P></TD></TR><TR>"; echo "<TD colspan='2'><center>--------------------------------------------------------------</center></TD></TR></TABLE> "; } ?>
Vielleicht kann mir einer Helfen.
danke
gruß
theclasses -
Hallo Leute,
kann mir einer sagen was ich im unteren script ändern muss, das der Fehler Script nicht kommt.CodeParse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /usr/export/www/vhosts/funnetwork/hosting/username/ordner/news/ein.php on line 38
PHP
Alles anzeigen<?php mysql_connect("localhost","username","passwort"); mysql_select_db("username"); /*Neuen Beitrag in Datenbank schreiben*/ if(isset($_POST['eintrag'])) { $sqlab = "insert news (datum, artikel) "; $sqlab .= "values ('" . $_POST["datum"] . "'; $sqlab .= "', '" . $_POST["artikel"] . "'; mysql_query($sqlab); } echo "Aktulle News"; ?> <FORM action="ein.php" method="post"> <TABLE border="0" cellspacing="0" cellpadding="0"> <colgroup> <col width='100'> <col width='100'> </colgroup> <TR> <TD align="center" class="table">Aritel:</TD> <TD><TEXTAREA name="text" cols="34" rows="7" class="input"></TEXTAREA></TD> </TR> <TR> <TD colspan="2"><hr width="300"></TD> </TR> <TR> <TD align="center"><input type="submit" name="eintrag" value="Senden" class="input"></TD> <TD align="center"><input type="reset" value="Reset" class="input"></TD> </TR> </TABLE> </FORM>
[/code]
-
Hallo Leute,
habe nochmal ein problem:
wo ist da der fehler:Code
Alles anzeigenWarning: main(defaults_inc.php) [function.main]: failed to open stream: No such file or directory in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 29 Warning: main() [function.include]: Failed opening 'defaults_inc.php' for inclusion (include_path='.:') in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 29 Warning: main(connect_db_inc.php) [function.main]: failed to open stream: No such file or directory in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 36 Warning: main() [function.include]: Failed opening 'connect_db_inc.php' for inclusion (include_path='.:') in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 36 Fatal error: Call to undefined function: connect_db() in /usr/export/www/vhosts/funnetwork/hosting/theclasses/chat/html/index.php on line 37
index.php
Code
Alles anzeigen<?//-*- C++ -*- function randomint($max) { static $startseed = 0; if (!$startseed) { $startseed = (double)microtime()*getrandmax(); srand($startseed); } return (rand()%$max); } /* * Include some default values */ include("defaults_inc.php"); Error_Reporting(7); /* * Open a database connection * The following include returns a database handle */ include ("connect_db_inc.php"); $db_handle=connect_db($localhost,$theclasses,$theclasses); if($db_handle<1){ exit; } include ("channels_inc.php"); if($HTTP_POST_VARS["nick"]){ if($ENABLE_SESSION){@session_destroy();} include("write_line_inc.php"); include ("login_inc.php"); $return = user_login($HTTP_POST_VARS["nick"],$HTTP_POST_VARS["theclasses"],"",$HTTP_POST_VARS["entry"],$db_handle); if($return == TRUE){ if($ENABLE_SESSION){ $nick = $HTTP_POST_VARS["nick"]; $pruef=Crypt($nick,$salt_nick); $entry=$HTTP_POST_VARS["entry"]; $ii=0; session_register('pruef','nick','entry','vip','moderator','is_vip','is_como','is_moderator_for','ii','lastRow','BROWSER_NAME','salt_nick'); header('Status: 301'); header("Location: frame_set.".$FILE_EXTENSION."?".session_name()."=".session_id()); exit; }else{ $nick = $HTTP_POST_VARS["nick"]; $pruef=Crypt($nick,$salt_nick); $entry=$HTTP_POST_VARS["entry"]; header('Status: 301'); header("Location: frame_set.".$FILE_EXTENSION."?nick=".urlencode($nick)."&pruef=".urlencode($pruef)."&entry=".urlencode($entry)); exit; } } } $REMOTE_USER=strip_tags($PHPOPENCHAT_USER);//cookie if($PHPOPENCHAT_USER){ $date = date("H"); if ($date >= 5) { $gruss = $GREETINGS[1]; } if ($date >= 12) { $gruss = $GREETINGS[2]; } if ($date >= 14) { $gruss = $GREETINGS[3]; } if ($date >= 18) { $gruss = $GREETINGS[4]; } if ($date >= 22) { $gruss = $GREETINGS[5]; } switch (randomint(3)) { case 0: $hello_message = $COME_IN; break; case 1: $hello_message = $TELL_US; break; case 2: $hello_message = $WHATS_UP; break; default: $hello_message = $CHAT_WITH_US; } }else{ $entrylink = "<H1><A HREF=\"frame_set.$FILE_EXTENSION\" TARGET=_top>$I_WANT_TO_CHAT!</A></H1>"; } $num_reg_chatters = mysql_result(mysql_query("SELECT count(Nick) AS count FROM chat_data",$db_handle),0,"count"); //count of chatters in the last 24 hours $num_last24h_chatters = mysql_result(mysql_query("SELECT count(Nick) AS count FROM chat_data WHERE Zeit>(UNIX_TIMESTAMP()-(60*60*24))",$db_handle),0,"count"); /** Loesche alle Teilnehmer aus der Tabelle der Telnehmer, die 10 Minuten nix gesagt haben **/ $result=mysql_query("DELETE FROM chat WHERE Zeit<(UNIX_TIMESTAMP()-(10*60))",$db_handle); $num=mysql_result(mysql_query("SELECT count(*) AS count FROM chat",$db_handle),0,"count"); if ($num>0) { $online_users = '[b]'.$num.'[/b]'; $online_table = '<P ALIGN=CENTER>'; $online_table .= '<TABLE BORDER=0 WIDTH=100%>'; $online_table .= '<TR><TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>'; $online_table .= '<TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>'; $online_table .= '<TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>'; $online_table .= '<TH BGCOLOR="#AAAAAA">'.$NICK_NAME.'</TH><TH BGCOLOR="#AAAAAA">'.$CHANNEL.'</TH>'; $raumresult=mysql_query("SELECT DISTINCT Raum FROM chat ORDER BY Raum",$db_handle); $i=0; $smileydir="images/chatter/"; while($row=mysql_fetch_object($raumresult)){ $raum=$row->Raum; $result=mysql_query('SELECT Nick FROM chat WHERE Raum="'.$raum.'" ORDER BY Nick'); while($nickrow=mysql_fetch_object($result)){ if($i % 4 ==0){$online_table .= "</TR>\n<TR>";} $online_table .= '<TD BGCOLOR="#a0FFa0">'; $nickname=$nickrow->Nick; if(file_exists($smileydir.strtolower(str_replace(" ","_",$nickname)).".gif")){ $online_table .= "<IMG WIDTH=16 HIGHT=16 SRC=\"".$smileydir.strtolower(str_replace("%20","_",str_replace("+","_",urlencode($nickname)))).".gif\">"; }else{ $online_table .= "<IMG WIDTH=16 HIGHT=1 SRC=\"images/dot_clear.gif\">"; } if(mysql_result(mysql_query("SELECT count(*) AS count FROM paten WHERE Nick='$nickname'",$db_handle),0,"count")){$color="#ff0000";}else{$color="#000000";} if($PHPOPENCHAT_USER && mysql_result(mysql_query("SELECT count(*) AS count FROM chat_notify WHERE Nick='$PHPOPENCHAT_USER' AND Friend='$nickname'",$db_handle),0,"count")){ $color="#0000ff"; } $online_table .= '<FONT COLOR="'.$color.'">'.str_replace(" ","",$nickname).'</FONT></td><TD BGCOLOR="#FFFFa0">'.$raum.'</td>'; $i++; } } if($i % 4 != 0){ echo '</tr>'; } $online_table .= '</TABLE>'; }else{ $online_users = '[b]0[/b]'; $online_table = ''; } $num_forum_topics = mysql_result(mysql_query("SELECT count(*) AS count FROM chat_forum",$db_handle),0,"count"); $num_forum_new_topics=mysql_result(mysql_query("SELECT count(date) AS count FROM chat_forum WHERE UNIX_TIMESTAMP(date)>UNIX_TIMESTAMP()-60*60*24",$db_handle),0,"count"); $num_approx_online_time=mysql_result(mysql_query("SELECT ROUND(Online/count(*)/60) AS count FROM chat_data WHERE Online>0 AND Zeit>UNIX_TIMESTAMP()-60*60*24",$db_handle),0,"count"); $last_registered_user=mysql_result(mysql_query("SELECT * FROM chat_data LIMIT ".(intval($num_reg_chatters)-1).",1",$db_handle),0,"Nick"); $result_last_post_user=mysql_query("SELECT * FROM chat_forum LIMIT ".(intval($num_forum_topics)-1).",1",$db_handle); $last_post_user=mysql_result($result_last_post_user,0,"NAME"); $last_post_kommentar=substr(mysql_result($result_last_post_user,0,"KOMMENTAR"),0,30)."..."; $last_post_thema=mysql_result($result_last_post_user,0,"THEMA"); $num_all_send_mails=mysql_result(mysql_query("SELECT MAX(id) AS maxid FROM chat_mail",$db_handle),0,"maxid"); $num_all_posts=mysql_result(mysql_query("SELECT MAX(nummer) AS maxnummer FROM chat_forum",$db_handle),0,"maxnummer"); $num_mails=mysql_result(mysql_query("SELECT count(*) AS count FROM chat_mail",$db_handle),0,"count"); $num_unread_mails=mysql_result(mysql_query("SELECT count(*) AS count FROM chat_mail WHERE unread < 4",$db_handle),0,"count"); $num_mails_last24h=mysql_result(mysql_query("SELECT count(*) AS count FROM chat_mail WHERE UNIX_TIMESTAMP(time)>UNIX_TIMESTAMP()-60*60*24",$db_handle),0,"count"); mysql_close($db_handle); include "index_tpl.php"; ?>
danke, schon mal im voraus.
gruß
theclasses -
Hallo,
kann mir jemand Helfer und sagen was in dem Unteren Code falsch ist?CodeWarning: readfile(0.htm) [function.readfile]: failed to open stream: No such file or directory in /usr/export/www/vhosts/funnetwork/hosting/theclasses/anzeiger/index.php3 on line 36
index.php3
HTML
Alles anzeigen<html> <head> <title>kleinanzeigen</title> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%"> <tr bgcolor="#CCCCCC"> <td colspan="2" height="2"><font face="Arial, Helvetica, sans-serif" size="5">artmedic kleinanzeigen</font></td> </tr> <tr> <td width="13%" bgcolor="#CCCCCC" nowrap valign="top" align="center"> [url='index.php3']<font face="Arial, Helvetica, sans-serif" size="3" color="#000000"><span class="anzeigentitel">Home</span></font>[/url]</p> </p> </td> <td width="87%" bgcolor="#F5F5F5" valign="top" rowspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="100%"></td> <td nowrap bgcolor="#CCCCCC"><a href="index.php3?id=eingabe.htm"><font face="Arial, Helvetica, sans-serif" size="3" color="#333333" class="anzeigentitel">Kleinanzeige aufgeben</font></a></td> </tr> </table> [url='index.php3?id=eingabe.htm'][/url] <?PHP if ($id == "") {$id = "0.htm";} readfile("$id"); ?> </td> </tr> </table> </body> </html>
danke im vorraus
gruß
theclasses -
danke, du hast sehr geholfen.
gruß
theclasses -
php hilfe bzgl. Gästebuch hat sich sich erledig.
danke.
gruß
theclasses -
wo ändere ich es in welcher datei? kannst du es vielleicht ändern?
-
Hallo,
kann mir jemand bei dem fehler des script helfen.http://theclasses.th.funpic.de/Manager/lmo.php?
danke im vorraus.
gruß
theclasses -
vielen dank du hast mir sehr geholfen.
Danke das du Zeit genommen hast.
Diese Forum und du haben einen Stern verdient.
Danke
-
wo tu ich es ändern?
-
hat sich erledigt.