Changeset 30199
- Timestamp:
- 09/28/14 19:42:19 (8 years ago)
- Location:
- titan/titan
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/header.h
r30174 r30199 104 104 void screennewsletter(); 105 105 void newsletterthreadfunc(struct stimerthread* self); 106 int readnewsletter(); 107 void freenewsletter(); 106 108 107 109 //oldentry.h -
titan/titan/httpd.h
r30195 r30199 304 304 else if(ostrcmp(query, "getstreaming") == 0) 305 305 buf = webgetstreaming(fmt); 306 else if(ostrcmp(query, "getnewsletter") == 0 )307 buf = webgetnewsletter( fmt);308 else if(ostrcmp(query, "getnewsletterchoices") == 0 && param != NULL)309 buf = webgetnewsletterchoices( param,fmt);306 else if(ostrcmp(query, "getnewsletter") == 0 && param != NULL) 307 buf = webgetnewsletter(param, fmt); 308 else if(ostrcmp(query, "getnewsletterchoices") == 0) 309 buf = webgetnewsletterchoices(fmt); 310 310 else if(ostrcmp(query, "gethelp") == 0 && param != NULL) 311 311 { -
titan/titan/httpdfunc.h
r30195 r30199 991 991 if(startplugin != NULL) 992 992 { 993 status.webplayfile = startplugin(status.webplayfile);993 status.webplayfile = (char*)startplugin(status.webplayfile); 994 994 printf("status.webplayfile changed: %s\n",status.webplayfile); 995 995 } … … 5083 5083 char* webgetnewsletterchoices(int fmt) 5084 5084 { 5085 char* buf = NULL , *tmpstr = NULL;5085 char* buf = NULL; 5086 5086 5087 5087 if(fmt == 0) … … 5099 5099 buf = ostrcat(buf, "<center><table cellpadding=5 cellspacing=5><tr><td nowrap>", 1, 0); 5100 5100 5101 struct skin* tmp = NULL;5102 5101 struct newsletter* node = NULL; 5103 char* tmpstr = NULL;5104 5102 5105 5103 m_lock(&status.newslettermutex, 19); … … 5111 5109 while(node != NULL) 5112 5110 { 5113 tmp = addlistbox(skinnewsletter, listbox, tmp, 1); 5114 if(tmp != NULL) 5115 { 5116 buf = ostrcat(buf, "<a class=linelink2 href=queryraw?getnewsletter&", 1, 0); 5117 buf = ostrcat(buf, node->nr, 1, 0); 5118 buf = ostrcat(buf, " target=main>", 1, 0); 5119 buf = ostrcat(buf, node->title, 1, 0); 5120 buf = ostrcat(buf, " - ", 1, 0); 5121 buf = ostrcat(buf, node->date, 1, 0); 5122 buf = ostrcat(buf, "</a>", 1, 0); 5123 buf = ostrcat(buf, "</br></br>", 1, 0); 5124 tmp->del = 1; 5125 tmp->handle = (char*)node; 5126 } 5111 buf = ostrcat(buf, "<a class=linelink2 href=queryraw?getnewsletter&", 1, 0); 5112 buf = ostrcat(buf, oitoa(node->nr), 1, 0); 5113 buf = ostrcat(buf, " target=main>", 1, 0); 5114 buf = ostrcat(buf, node->title, 1, 0); 5115 buf = ostrcat(buf, " - ", 1, 0); 5116 buf = ostrcat(buf, node->date, 1, 0); 5117 buf = ostrcat(buf, "</a>", 1, 0); 5118 buf = ostrcat(buf, "</br></br>", 1, 0); 5127 5119 5128 5120 if(node->nr > lastnewsletter) … … 5132 5124 } 5133 5125 5126 freenewsletter(); 5127 m_unlock(&status.newslettermutex, 19); 5128 5134 5129 if(fmt == 0) 5135 5130 buf = ostrcat(buf, "</td></tr></table></center></body></html>", 1, 0); … … 5142 5137 char* buf = NULL, *tmpstr = NULL; 5143 5138 5144 if(fmt == 0)5145 {5139 // if(fmt == 0) 5140 // { 5146 5141 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">", 1, 0); 5147 5142 buf = ostrcat(buf, "<link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script>", 1, 0); … … 5152 5147 buf = ostrcat(buf, "</h1>", 1, 0); 5153 5148 buf = ostrcat(buf, "<br>", 1, 0); 5154 } 5155 5156 // tmpstr = getabout(); 5157 // readnewsletter(); 5158 tmpstr = readfiletomem("/tmp/streaming.txt", 0); 5159 tmpstr = ostrcat(tmpstr, "\ncomming soon...\n", 1, 0); 5160 5149 // } 5150 5151 struct newsletter* node = NULL; 5152 5153 m_lock(&status.newslettermutex, 19); 5154 5155 readnewsletter(); 5156 node = newsletter; 5157 5158 while(node != NULL) 5159 { 5160 if(ostrcmp(oitoa(node->nr), param) == 0) 5161 { 5162 tmpstr = ostrcat(node->text, "\n", 0, 0); 5163 break; 5164 } 5165 node = node->next; 5166 } 5167 5168 freenewsletter(); 5169 m_unlock(&status.newslettermutex, 19); 5170 5161 5171 tmpstr = string_replace_all("\n", "<br>\n", tmpstr, 1); 5162 5172 5163 5173 buf = ostrcat(buf, tmpstr, 1, 1); 5164 5174 5165 if(fmt == 0) 5166 { 5175 // if(fmt == 0) 5167 5176 buf = ostrcat(buf, "</body></html>", 1, 0); 5168 } 5169 5170 return buf; 5171 5177 5178 return buf; 5172 5179 } 5173 5180
Note: See TracChangeset
for help on using the changeset viewer.