Antwort auf den Beitrag "Re:DublettenCheck gabs auch schon" posten:
Nickname:
Passwort:
Thema:
Nachricht:
>#include <stdio.h> >#include <stdlib.h> >#include <string.h> >#include <fcntl.h> >#include <sys/stat.h> >#ifdef _Windows > #include <dos.h> > #include <io.h> >#endif > >#include "bretttools.h" > >#define FORUM_OPM > >void MemoryError(void) >{ > printf("content-type: text/html\n\n"); > printf("<HTML><HEAD>\n"); > printf("<style type=\"text/css\">\n<!--\n"); > printf("p, li { font-family:Verdana, Arial; }\n"); > printf("#g { background-color:#818392; }\n"); > printf("#q { background-color:#B4B6C5; }\n"); > printf("a:link { text-decoration:none; }\n"); > printf("a:visited { text-decoration:none; }\n"); > printf("a:hover { color:#818392; text-decoration:none; }\n"); > printf("//-->\n</style>\n</HEAD>\n"); > printf("<BODY bgcolor=#A3A4B6 text=#000000 link=#ffffff alink=#818392 vlink=#ffffff>\n"); > printf("<TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 bgcolor=000000>\n<TR>\n"); > printf("<TD><TABLE WIDTH=714 CELLPADDING=4 CELLSPACING=2 BORDER=0>\n<TR>\n"); > printf("<TD id=g><P><BR><FONT SIZE=\"3\"><B>Es steht nicht genügend Speicher zur Verfügung !"); > printf("</TD>\n</TR>\n<TR>\n<TD id=q><P><BR>Bitte fassen Sie sich kürzer."); > printf("</TD>\n</TR>\n</TABLE></TD></TR>\n"); > printf("<TR><TD COLSPAN=4 ALIGN=center bgcolor=#a3a4b6><p style=\"margin-top:4px;\"><FONT SIZE=1 ID=v>"); > printf("Dieses Forum wurde programmiert von <A HREF=\"mailto:MichaelSchletter@gmx.de\">Michael Schletter</A> und"); > printf("<A HREF=\"mailto:TorstenRentsch@bigfoot.com\">Torsten Rentsch</A> </TD></TR>\n</TABLE>\n"); > printf("</BODY>\n</HTML>\n"); > remove("./busy.tmp"); > exit(0); >} > >void ConfigError(char* ADMIN_EMAIL) >{ > printf("content-type: text/html\n\n"); > printf("<HTML><HEAD><TITLE>Konfigurationsfehler...</TITLE>\n"); > printf("<style type=\"text/css\">\n<!--\n"); > printf("p, li { font-family:Verdana, Arial; }\n"); > printf("#g { background-color:#818392; }\n"); > printf("#q { background-color:#B4B6C5; }\n"); > printf("a:link { text-decoration:none; }\n"); > printf("a:visited { text-decoration:none; }\n"); > printf("a:hover { color:#818392; text-decoration:none; }\n"); > printf("//-->\n</style>\n</HEAD>\n"); > printf("<BODY bgcolor=#A3A4B6 text=#000000 link=#ffffff alink=#818392 vlink=#ffffff>\n"); > printf("<TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 bgcolor=000000>\n<TR>\n"); > printf("<TD><TABLE WIDTH=714 CELLPADDING=4 CELLSPACING=2 BORDER=0>\n<TR>\n"); > printf("<TD id=g><P><BR><FONT SIZE=\"3\"><B>Das Forum ist fehlerhaft konfiguriert !"); > >#ifdef FORUM_MAN > printf("</TD>\n</TR>\n<TR>\n<TD id=q><P><BR>Bitte benachrichtigen Sie den <A HREF=\"mailto:webmaster@maniac-online.de\">Betreiber</A> dieses Forums."); >#endif >#ifdef FORUM_PCX > printf("</TD>\n</TR>\n<TR>\n<TD id=q><P><BR>Bitte benachrichtigen Sie den <A HREF=\"mailto:webmaster@opm-net.de\">Betreiber</A> dieses Forums."); >#endif >#ifdef FORUM_OPM > printf("</TD>\n</TR>\n<TR>\n<TD id=q><P><BR>Bitte benachrichtigen Sie den <A HREF=\"mailto:webmaster@opm-net.de\">Betreiber</A> dieses Forums."); >#endif > > printf("</TD>\n</TR>\n</TABLE></TD></TR>\n"); > printf("<TR><TD COLSPAN=4 ALIGN=center bgcolor=#a3a4b6><p style=\"margin-top:4px;\"><FONT SIZE=1 ID=v>"); > printf("Dieses Forum wurde programmiert von <A HREF=\"mailto:TorstenRentsch@bigfoot.com\">Torsten Rentsch</A> und"); > printf(" <A HREF=\"mailto:MichaelSchletter@gmx.de\">Michael Schletter</A></TD></TR>\n</TABLE>\n"); > printf("</BODY>\n</HTML>\n"); > remove("./busy.tmp"); > exit(0); >} > >/*Busyfile anlegen*/ > >void CreateBusyFile(char* ADMIN_EMAIL) >{ > int BusyFile; > if ((BusyFile = open("./busy.tmp", O_CREAT | O_EXCL, S_IREAD | S_IWRITE)) == -1) { > printf("content-type: text/html\n\n"); > printf("<HTML><HEAD>\n"); > printf("<style type=\"text/css\">\n<!--\n"); > printf("p, li { font-family:Verdana, Arial; }\n"); > printf("#g { background-color:#818392; }\n"); > printf("#q { background-color:#B4B6C5; }\n"); > printf("a:link { text-decoration:none; }\n"); > printf("a:visited { text-decoration:none; }\n"); > printf("a:hover { color:#818392; text-decoration:none; }\n"); > printf("//-->\n</style>\n</HEAD>\n"); > printf("<BODY bgcolor=#A3A4B6 text=#000000 link=#ffffff alink=#818392 vlink=#ffffff>\n"); > printf("<TABLE CELLPADDING=1 CELLSPACING=0 BORDER=0 bgcolor=000000>\n<TR>\n"); > printf("<TD><TABLE WIDTH=714 CELLPADDING=4 CELLSPACING=2 BORDER=0>\n<TR>\n"); > printf("<TD id=g><P><BR><FONT SIZE=\"3\"><B>Es gab ein Problem beim Schreiben Ihrer Nachricht!"); > printf("</TD>\n</TR>\n<TR>\n<TD id=q><P><BR>Das kann folgende Gründe haben:\n"); > printf("<UL>\n<LI>Sie haben im selben Moment wie ein anderer User Ihren Beitrag abgeschickt."); > printf(" Bitte drücken Sie die <B>Back</B>-Taste und versuchen es erneut.\n"); > printf("<P>\n<LI>Das Forum wird zur Zeit gewartet (Thread-Löschung etc.)."); > printf(" Versuchen Sie es bitte in ein paar Minuten erneut!\n"); > printf("<P>\n<LI>Das Forum ist abgestürzt. Sollte nach mehreren Versuchen diese Meldung erscheinen,"); > >#ifdef FORUM_MAN > printf(" benachrichtigen Sie bitte den <A HREF=\"mailto:xxx@maniac-online.de\">Betreiber</A> dieses Forums!\n"); >#endif >#ifdef FORUM_PCX > printf(" benachrichtigen Sie bitte den <A HREF=\"mailto:xxx@opm-net.de\">Betreiber</A> dieses Forums!\n"); >#endif >#ifdef FORUM_OPM > printf(" benachrichtigen Sie bitte den <A HREF=\"mailto:xxx@opm-net.de\">Betreiber</A> dieses Forums!\n"); >#endif > > printf("</TD>\n</TR>\n</TABLE></TD></TR>\n"); > printf("<TR><TD COLSPAN=4 ALIGN=center bgcolor=#a3a4b6><p style=\"margin-top:4px;\"><FONT SIZE=1 ID=v>"); > printf("Dieses Forum wurde programmiert von <A HREF=\"mailto:xxx@bigfoot.com\">xxx</A> und"); > printf(" <A HREF=\"mailto:xxx@xxx.de\">xxx</A></TD></TR>\n</TABLE>\n"); > printf("</BODY>\n</HTML>\n"); > exit(0); > }; > close(BusyFile); >} > >void DuplicateCheck(char*CheckStr,unsigned long int DupCh,char*url) >{ > FILE *DupCheckFile,*DupCheckTmpFile; > int DupFound=0; > unsigned long int Zaehler=1; > char Zeile[2048]; > > > DupCheckFile=fopen("./DupCheck.txt","rt"); > if (DupCheckFile==NULL) { > printf("Location: %s/error_config.html\n\n",url); > exit(0); > } > DupCheckTmpFile=fopen("./DupCheck.tmp","wt"); > if (DupCheckTmpFile==NULL) { > printf("Location: %s/error_config.html\n\n",url); > exit(0); > } > > fputs(CheckStr,DupCheckTmpFile); > > while ((!feof(DupCheckFile))&&(Zaehler<=DupCh)) > { > if (fgets(Zeile,2047,DupCheckFile)==NULL) break; > if (strcmp(CheckStr,Zeile)==0) DupFound=1; > else > { > Zaehler++; > if (Zaehler<=DupCh) fputs(Zeile,DupCheckTmpFile); > } > } > fclose(DupCheckFile); > fclose(DupCheckTmpFile); > > remove("./DupCheck.txt"); > rename("./DupCheck.tmp","./DupCheck.txt"); > > if (DupFound==1) > { > printf("Location: %s/error_dup.html\n\n",url); > remove("./busy.tmp"); > exit(0); > } >} > > >/*void SendEmailNotify(char* Empf) >{ > FILE* Pass; > char Empf2[16]; > char tmp[1024]; > char TempStr[1024]; > char email[1024]; > int i; > char aufruf[2048]; > > strcpy(Empf2,Empf); > for (i=strlen(Empf);i<15;i++) strcat(Empf2," ");*/ /*Name auf 15 Zeichen mit Leerzeichen auffuellen*/ > >/* Pass=fopen("brett.dat","r+t"); > while (!feof(Pass)){ > fgets(tmp,1023,Pass); > if (strlen(tmp)<25) break; > strncpy(TempStr,tmp,15); > TempStr[15]='\0'; > if (strcmp(TempStr,Empf2)==0) { > strncpy(email,tmp+29,strlen(tmp+29)-1); > email[strlen(tmp+29)-1]='\0'; > sprintf(aufruf,"mail -s \"Transistors Board\" %s <nachricht.txt >/dev/null",email); > system(aufruf); > } > } >} */
mailbenachrichtigung?