亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? chat.c

?? C-C++源代碼行數計算器SrcLines.zip
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*  chat.c    For Free Chat  (beta release 2e2)    By Bill Kendrick  kendrick@zippy.sonoma.edu  http://zippy.sonoma.edu/kendrick/  September 29, 1996 - June 9, 1998*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <ctype.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <fcntl.h>#include "cgi-util.h"#include "dump.h"#include "readline.h"#include "instr.h"#include "copyback.h"#include "defines.h"#include "whattime.h"#include "myopen.h"#include "nicetime.h"#define VER "b2e2"int noswear(char * text);int whohere(char * name, char * email, char * time, int only_posting,	    int only_watching);void spacetoplus(char * dest, char * source);void dumpform(char * name, char * email, char * time, char * name2,	      char * lastmesg, int only_posting, char * password,	      char * whisper_to);void addfaces(char * mesg);void addconverts(char * mesg);int isnew(char * this, char * last);void addurls(char * str);void robotspeak(char * time, char * name, char * mesg);void informadmin(char * name, char * mesg);int sysop, god, registered, joining;int main(int argc, char * argv[]){  char name[STRLEN], email[STRLEN], mesg[STRLEN], topic[STRLEN], name2[STRLEN],    temp[STRLEN], time[STRLEN], xname[STRLEN], xtime[STRLEN], xmesg[STRLEN],    lastmesg[STRLEN], lasttime[20], password[32], access_name[100],    access_pass[100], access_type[100], access_url[512], your_url[512],    temp2[STRLEN], whisper_to[STRLEN];  char shownfaces[MAXLINES][STRLEN];  int here, found, ok, i, x, space, only_watching, only_posting,    num_shownfaces, j, showed_pict, fdi;  FILE * fi, * fiface;      sysop = 0;  god = 0;  registered = 0;      /* Initialize CGI Interface: */    cgiinit();  printf("Content-type: text/html\n\n");    if (getentryyesno("version", 0))    {      printf("Free Chat<br>version %s<p>\n", VER);      printf("<a href=\"mailto:%s\"><code>%s</code></a><p>\n",	     ADMIN_EMAIL, ADMIN_EMAIL);      exit(0);    }  joining = getentryyesno("join", 0);    only_watching = getentryyesno("watch", 0);  getentry(name, "name");  for (i = 0; i < strlen(name); i++)    if (isalnum(name[i]) == 0)      name[i] = '-';    while (name[0] == '-')    {      strcpy(temp, name + 1);      strcpy(name, temp);    }  while (name[strlen(name) - 1] == '-')    name[strlen(name) - 1] = '\0';    if (strlen(name) < 3)    error("Please enter a more descriptive name!");      clean(name);  strcpy(name2, name);    getentry(email, "email");  clean(email);    if (strlen(email) != 0 && goodemailaddress(email) == 0)    error("Bad e-mail address!");    getentry(password, "password");  fi = fopen(ACCESS_FILE, "r");    strcpy(your_url, "");    registered = 0;    if (fi != NULL)    {      do	{	  readline(fi, access_name);	  	  if (!feof(fi))	    {	      readline(fi, access_pass);	      readline(fi, access_type);	      readline(fi, access_url);	      readline(fi, temp);	      	      if (strcasecmp(access_name, name) == 0)		{		  strcpy(your_url, access_url);		  		  if (strcmp(access_pass, password) == 0)		    {		      registered = 1;		      		      if (strcmp(access_type, "sysop") == 0)			sysop = 1;		      else if (strcmp(access_type, "god") == 0)			{			  sysop = 1;			  god = 1;			}		    }		  else		    {		      printf("<h1>Password Required</h1>\n");		      printf("<form action=\"chat.cgi\" method=\"post\">\n");		      printf("<input type=\"hidden\" name=\"name\"\n");		      printf("value=\"%s\">\n", name);		      printf("<input type=\"hidden\" name=\"email\"\n");		      printf("value=\"%s\">\n", email);		      if (getentryyesno("duelenter", 0) == 1)			{			  printf("<input type=\"hidden\"\n");			  printf("name=\"duelenter\"\n");			  printf("value=\"yes\">\n");			}		      printf("Password:\n");		      printf("<input type=\"password\" name=\"password\">\n");		      printf("<input type=\"submit\" value=\"Enter Chat\">\n");		      printf("<br>\n</form>\n");		      		      fclose(fi);		      		      exit(0);		    }		}	    }	}      while (!feof(fi));            fclose(fi);    }    if (MUST_BE_REGISTERED == YES && registered == 0)    {      printf("Registered users only!<p>\n");      exit(0);    }      if (getentryyesno("duelenter", 0) == 1)    {      only_posting = 1;            printf("<html><head><title>Free Chat - Frames Mode");      printf("</title></head>\n");            printf("<FRAMESET Rows=\"%d,%d,*\" FRAMEBORDER=NO BORDER=NO\n",	     FRAME1_HEIGHT, FRAME2_HEIGHT);      printf("FRAMESPACING=\"0\">\n");      printf("<FRAME NAME=\"ad\" SRC=\"%sad.html\" SCROLLING=\"NO\"\n",	     PREPEND);      printf("BORDER=NO NORESIZE MARGINWIDTH=1 MARGINHEIGHT=1>\n");      printf("<FRAME NAME=\"entry\" SRC=\"");      printf("chat.cgi?name=%s&email=%s&password=%s&join=yes&",	     name, email, password);      printf("post=yes\"\n");      printf("FRAMEBORDER=NO SCROLLING=NO>\n");      printf("<FRAME NAME=\"text\" SRC=\"");      printf("chat.cgi?watch=yes&name=%s&email=%s&password=%s\"\n",	     name, email, password);      printf("FRAMEBORDER=NO>\n");      printf("<NOFRAMES>\n");      printf("<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#0000FF\"\n");      printf("vlink=\"#FF0000\">\n");      printf("<h1 align=center>");      printf("<a href=\"chat.cgi?name=%s&email=%s&password=%s\">",	     name, email, password);      printf("Enter Chat</h1>\n");      printf("</body></html>\n");      printf("</NOFRAMES>\n");      printf("</FRAMESET>\n");            exit(0);    }  else    only_posting = getentryyesno("post", 0);      /* Grab file lock on lock.dat so we don't let anyone clobber anything!: */    fdi = open("lock.dat", O_CREAT | O_WRONLY | O_TRUNC);#ifdef SYSV  lockf(fdi, F_LOCK, 0);#else  flock(fdi, LOCK_EX);#endif      /* Get current topic: */    fi = myopen("topic.dat", "r");  if (fi != NULL)    {      readline(fi, topic);      fclose(fi);    }  else    strcpy(topic, "");      getentry(lasttime, "time");    /* Get current time: */    whattime(time);        if (only_watching == 0)    {      fi = fopen("banned.dat", "r");      if (fi != NULL)	{	  do	    {	      readline(fi, temp);	      if (!feof(fi))		{		  if (strcmp(temp, name) == 0)		    {		      printf("<b>YOU HAVE BEEN BANNED!</b><p>\n");		      printf("Misconduct is not allowed in chat!<p>\n");		      printf("<a href=\"mailto:%s\"><code>%s</code></a><p>\n",			     ADMIN_EMAIL);		      exit(0);		    }		  		  if (strstr(getenv("REMOTE_ADDR"), temp) != NULL)		    {		      printf("<b>IP ADDRESS BLOCK!</b><p>\n");		      printf("Sorry!<p>\n");		      printf("<a href=\"mailto:%s\"><code>%s</code></a><p>\n",			     ADMIN_EMAIL);		      exit(0);		    }		}	    }	  while (!feof(fi));	  fclose(fi);	}            getentry(temp, "refresh.x");            if (strlen(temp) == 0)	{	  getentry(mesg, "mesg");	  clean(mesg);	  	  if (strlen(mesg) != 0)	    {	      getentry(whisper_to, "whisper");	      if (strlen(whisper_to) != 0 && mesg[0] != '/' &&		  strcmp(whisper_to, "NONE") != 0)		{		  sprintf(temp, "/%s %s", whisper_to, mesg);		  strcpy(mesg, temp);		}	    }	}      else	strcpy(mesg, "");            /* Kill whispers if whispering is turned off: */      if (WHISPERING == OFF || (WHISPERING == SYSOPS_ONLY && sysop == 0) ||	  (WHISPERING == REGISTERED_ONLY && registered == 0))	{	  if (mesg[0] == '/')	    {	      strcmp(temp, mesg + 1);	      strcpy(mesg, temp);	    }	}            getentry(temp, "refresh");      if (strlen(temp) != 0)	strcpy(mesg, "");                  getentry(lastmesg, "lastmesg");                        space = -1;      x = 0;      for (i = 0; i < strlen(mesg); i++)	{	  if (mesg[i] == ' ')	    {	      x = 0;	      space = i;	    }	  x = x + 1;	  	  if (x > 80)	    {	      strcpy(temp, mesg + i);	      mesg[i] = ' ';	      mesg[i + 1] = '\0';	      strcat(mesg, temp);	      space = i;	      x = 0;	    }	}                        /* No blank names! */            if (strlen(name) == 0 || noswear(name) == 0)	{	  if (strcmp(email, "") == 0)	    {	      dump("included/noname.html");	      exit(0);	    }	  else	    {	      strcpy(name, email);	      if (strchr(name, '@') != NULL)		strcpy(strchr(name, '@'), "\0");	    }	}                        /* Find out how many people are here.. making sure you're in this	 list. */            here = whohere(name, email, time, only_posting, 0);            /* Ban users! */            if (strstr(mesg, "BAN ") == mesg)	{	  if (INFORM_ADMIN == YES || INFORM_ADMIN == SMALL)	    informadmin(name, mesg);	  	  if (sysop == 1)	    {	      fi = fopen("banned.dat", "a");	      if (fi != NULL)		{		  fprintf(fi, "%s\n", strchr(mesg, ' ') + 1);		  fclose(fi);		  		  sprintf(temp, "%s has been banned!", strchr(mesg, ' ') + 1);		  strcpy(mesg, temp);		}	    }	  else	    ok = 0;	}                        /* Change the TOPIC: */            if (strstr(mesg, "TOPIC ") == mesg)	{	  if (INFORM_ADMIN == YES)	    informadmin(name, mesg);	  	  if (sysop == 1)	    {	      fi = fopen("topic.dat", "w");	      	      if (fi != NULL)		{		  fprintf(fi, "%s\n", strchr(mesg, ' ') + 1);		  fclose(fi);		  		  sprintf(temp, "The topic is now \"%s\"!",			  strchr(mesg, ' ') + 1);		  strcpy(mesg, temp);		}	    }	  else	    ok = 0;	}            /* Dump top of page: */            if (only_posting == 0)	{	  dump("included/chat-top.html");	  	  printf("<td>\n");	  #ifdef AD_CMD	  	  fflush(stdout);	  system(AD_CMD);	  fflush(stdout);#endif	  printf("</td></tr></table></center>\n");	  	  printf("<table border=1 cellspacing=0 width=100%%\n");	  printf("cellpadding=8>\n");	  	  printf("<tr><td valign=top width=20%% align=center>\n");	  	  printf("<h2 align=center>%s</h2>\n", topic);	  printf("<font size=+1><b>");	  if (here == 1 || here == 0)	    printf("You are the only person here.");	  else	    printf("There are %d people here.", here);	  printf("</b></font><br>\n");	  	  dump("included/chat-left.html");	  	  printf("</td><td valign=top>\n");	}      else	{	  dump("included/chat-post-top.html");	}            printf("<table border=0 cellspacing=0 cellpadding=0><tr><td>\n");            dumpform(name, email, time, name2, mesg, only_posting, password,	       whisper_to);                  /* Add their message: */            if (strlen(mesg) != 0)	{	  ok = noswear(mesg);	  if (ok == 0)	    printf("</td><td><b><i><blink><u>NO SWEARING!!!</u></blink></b></i>\n");	}      else	ok = 0;            if (strcmp(lastmesg, mesg) == 0 && strlen(mesg) > 0)	{	  printf("</td><td><b><i><blink><u>YOU ALREADY SAID\n");	  printf("THAT!</u></blink></b></i>\n");	  ok = 0;	}            if (ok == 1)	{	  chatwrite(time, name, mesg);	  robotspeak(time, name, mesg);	}                  /* Notify them if their message is in all caps! */      if (mesg[0] != '/')	strcpy(temp, mesg);      else	{	  if (strchr(mesg, ' ') != NULL)	    strcpy(temp, strchr(mesg, ' ') + 1);	  else	    strcpy(temp, "");	}                  ok = 0;      for (i = 0; i < strlen(temp); i++)	ok = ok + (islower(temp[i]));            if (ok == 0)	{	  ok = 1;	  for (i = 0; i < strlen(temp); i++)	    if (isalpha(temp[i]))	      ok = 0;	}            if (ok == 0 && strlen(temp) > 5)	{	  printf("</td><td><b><i><blink><u>PLEASE TURN OFF YOUR CAPS\n");	  printf("KEY!</u></blink></b></i>\n");	}                  printf("</td></tr></table>\n");    }  else    {      printf("<html><head>\n");      printf("<meta http-equiv=\"refresh\"\n");      printf("content=\"20;URL=chat.cgi?watch=yes&");      printf("name=%s&email=%s&password=%s&time=%s\"></head>\n", name, email,	     password, time);            dump("included/chat-watch-top.html");            printf("<table border=0><tr>\n");      printf("<td valign=top width=120>\n");            printf("<h2 align=center>%s</h2>\n", topic);            printf("<h3 align=center>");            whattime(time);      here = whohere(name, email, time, 0, 1);            if (here == 1 || here == 0)	printf("You are the only person here.");      else	printf("There are %d people here.", here);      printf("</h3>\n");            dump("included/chat-left.html");      printf("</td><td valign=top>\n");    }      if (only_posting == 0)    {      /* Dump messages: */            fi = myopen("chat.dat", "r");      if (fi == NULL)	{	  printf("System is down!\n");	  exit(0);	}            printf("<table border=0 width=100%% cellpadding=4>\n");            num_shownfaces = 0;            do	{	  readline(fi, xtime);	  if (!feof(fi))	    {	      readline(fi, xname);	      readline(fi, xmesg);	      	      ok = 1;	      	      if (xmesg[0] == '/')		{		  ok = -1;		  sscanf(xmesg, "%s", temp);		  if (strcmp(temp + 1, name) == 0 ||		      strcmp(xname, name) == 0 || god == 1)		    ok = 2;		}	      	      strcpy(your_url, "");	      	      	      if (ok != 0)		{		  printf("<tr><td valign=top align=right>\n");		  		  		  printf("<table border=0 cellspacing=0 cellpadding=0\n");		  printf("width=100%%><tr>");		  		  printf("<td valign=top align=right>\n");		  		  /* Show their face if we haven't seen it already: */		  		  found = 0;		  for (i = 0; i < num_shownfaces; i++)		    {		      if (strcmp(shownfaces[i], xname) == 0)			found = 1;		    }		  		  showed_pict = 0;		  		  if (found == 0)		    {		      for (j = 0; j <= strlen(xname); j++)			{			  if (xname[j] == '-')			    temp2[j] = '_';			  else			    temp2[j] = xname[j];			}		      		      strcpy(shownfaces[num_shownfaces], xname);		      num_shownfaces++;		      		      sprintf(temp, "%sphotos/%s.gif", UNIX_PREPEND, temp2);		      		      fiface = fopen(temp, "r");		      if (fiface != NULL)			{			  fclose(fiface);			  			  printf("<img src=\"%sphotos/%s.gif\" width=40 height=40\n",				 PREPEND, temp2);			  printf("width=40 height=40 alt=\"\" border=0\n");			  printf("alt=\"\" border=0>\n");			  			  showed_pict = 1;			}		      printf("</td><td valign=top align=right>\n");		      		      getentry(password, "password");		      fiface = fopen(ACCESS_FILE, "r");		      		      if (fiface != NULL)			{			  do			    {			      readline(fiface, access_name);			      			      if (!feof(fiface))				{				  readline(fiface, access_pass);				  readline(fiface, access_type);				  readline(fiface, access_url);				  readline(fiface, temp);				  				  if (strcasecmp(access_name, xname) == 0)				    strcpy(your_url, access_url);				}			    }			  while (!feof(fiface));			  			  fclose(fiface);			}		    }		  		  printf("<font size=-");		  if (showed_pict == 1)		    printf("2");		  else		    printf("1");		  		  printf(" face=\"Arial\">");		  		  if (strlen(your_url) != 0 &&		      strcmp(your_url, "nourl") != 0)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费观看久久久4p| 精品福利在线导航| 成人免费一区二区三区在线观看| 国产精品亚洲午夜一区二区三区| 精品久久久三级丝袜| 免费人成在线不卡| 久久精品夜色噜噜亚洲aⅴ| 国产99一区视频免费| 亚洲欧美视频在线观看| 欧美日韩在线播放三区四区| 日本成人超碰在线观看| 欧美精品一区二区三区在线| 不卡影院免费观看| 亚洲成av人片在线| 久久久精品中文字幕麻豆发布| 国产99久久久国产精品免费看| 亚洲男人的天堂网| 91精品蜜臀在线一区尤物| 韩国三级电影一区二区| 日韩一区中文字幕| 欧美一区国产二区| 成人h精品动漫一区二区三区| 一区二区三区欧美亚洲| 日韩欧美一区二区久久婷婷| 成人美女视频在线观看18| 亚洲国产中文字幕在线视频综合| 日韩欧美国产麻豆| 91美女视频网站| 久久不见久久见免费视频7| 国产精品美女视频| 69久久夜色精品国产69蝌蚪网| 国产99一区视频免费| 调教+趴+乳夹+国产+精品| 日本一区二区电影| 91精品国产综合久久香蕉麻豆| 成人av资源在线观看| 日韩精品一二三| 国产精品高潮呻吟久久| 日韩欧美成人激情| 色国产精品一区在线观看| 国产精品911| 午夜日韩在线观看| 亚洲天堂av一区| 国产亚洲欧美在线| 日韩精品中午字幕| 欧美日本一区二区| 色94色欧美sute亚洲线路一久| 国产成人8x视频一区二区 | 欧美—级在线免费片| 欧美乱妇20p| 色视频一区二区| 成人黄色777网| 国产精品影音先锋| 久久99这里只有精品| 日精品一区二区三区| 亚洲精选视频免费看| 国产女人18水真多18精品一级做| 日韩一级片在线观看| 欧美日韩久久一区| 欧美系列在线观看| 色视频欧美一区二区三区| 日韩一级大片在线观看| 91亚洲国产成人精品一区二区三 | 日韩欧美国产三级电影视频| 色综合天天性综合| 成人免费视频网站在线观看| 九色|91porny| 国精品**一区二区三区在线蜜桃| 男女视频一区二区| 免费成人在线视频观看| 亚洲二区在线观看| 亚洲第一福利一区| 日韩制服丝袜av| 天堂资源在线中文精品| 日韩精品国产精品| 人人精品人人爱| 麻豆视频观看网址久久| 久久精品国产99国产| 男女男精品视频| 免费成人在线播放| 久久精工是国产品牌吗| 麻豆精品久久久| 国产在线麻豆精品观看| 国产精品1024| 91在线无精精品入口| 色94色欧美sute亚洲线路一ni| 在线观看视频欧美| 欧美三级韩国三级日本三斤| 欧美肥妇bbw| 欧美mv日韩mv亚洲| 国产精品免费av| 亚洲黄色免费网站| 日韩亚洲欧美在线观看| 99国产精品99久久久久久| 色婷婷av一区二区三区软件 | 欧美激情综合在线| 亚洲天堂精品在线观看| 亚洲福利视频一区| 狠狠色丁香婷婷综合久久片| 国产精品夜夜爽| 91在线观看美女| 欧美午夜影院一区| 久久女同精品一区二区| 亚洲色图第一区| 蜜芽一区二区三区| 国产成人午夜片在线观看高清观看| www.色精品| 91精品国产综合久久精品性色| 久久久一区二区| 亚洲欧美激情在线| 精品一区二区三区视频在线观看| 成人白浆超碰人人人人| 91精品欧美综合在线观看最新| 久久蜜臀精品av| 亚洲一区二区三区四区的| 久久爱www久久做| 91麻豆国产在线观看| 欧美一区二区在线播放| 久久精品一区二区| 亚洲自拍与偷拍| 国产一区在线精品| 欧美亚洲丝袜传媒另类| 国产日韩欧美一区二区三区综合| 亚洲卡通动漫在线| 久久国产精品99久久人人澡| 99在线热播精品免费| 欧美一级一区二区| 亚洲精品videosex极品| 久久97超碰色| 欧美日韩精品欧美日韩精品一| 国产丝袜在线精品| 日韩高清欧美激情| 91首页免费视频| 欧美精品一区二区三区高清aⅴ| 亚洲一区二区三区三| 国产aⅴ精品一区二区三区色成熟| 678五月天丁香亚洲综合网| 中文字幕成人网| 精品一区二区三区视频在线观看| 在线观看日韩国产| 国产精品美女久久久久久久| 蜜臀精品久久久久久蜜臀| 日本道精品一区二区三区| 国产婷婷色一区二区三区在线| 蜜桃av一区二区| 欧美顶级少妇做爰| 一区二区三区小说| 色播五月激情综合网| 中文字幕在线不卡视频| 国产一区91精品张津瑜| 国产日韩欧美综合在线| 五月婷婷欧美视频| 一本大道综合伊人精品热热 | 国产**成人网毛片九色| 精品国产一区二区三区久久久蜜月| 亚洲一区在线视频观看| 丰满白嫩尤物一区二区| 久久品道一品道久久精品| 捆绑调教美女网站视频一区| 欧美精品九九99久久| 五月激情综合婷婷| 欧美日韩一区二区三区视频| 亚洲狼人国产精品| 99久久婷婷国产| 中文字幕字幕中文在线中不卡视频| 国产高清精品网站| 国产免费久久精品| av高清不卡在线| 亚洲欧洲成人精品av97| 97国产精品videossex| 最近中文字幕一区二区三区| 99久久亚洲一区二区三区青草| 亚洲国产精品精华液2区45| 国产91精品一区二区麻豆亚洲| 欧美国产精品专区| 成人av在线资源| 亚洲色图在线看| 色乱码一区二区三区88| 亚洲在线观看免费视频| 欧美乱妇一区二区三区不卡视频| 丝袜脚交一区二区| 精品久久人人做人人爽| 国产一区激情在线| 国产午夜亚洲精品羞羞网站| 成人网在线免费视频| 中文字幕巨乱亚洲| 色噜噜狠狠成人网p站| 午夜日韩在线观看| 精品国产一区二区精华| 国产福利一区二区三区视频| 国产亚洲自拍一区| 色婷婷激情综合| 午夜精彩视频在线观看不卡| 日韩欧美激情在线| 成人高清免费在线播放| 亚洲一区二区四区蜜桃| 欧美一区三区四区| 国产精品99久久久久久久女警| 亚洲伦理在线精品| 日韩精品一区二区三区四区|