Changeset 30029
- Timestamp:
- 09/21/14 16:49:54 (9 years ago)
- Location:
- titan
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/doc/htmlapi.txt
r29564 r30029 334 334 param: no 335 335 example: queryraw?getdrawcount 336 337 query: gethelpchoices 338 raw: ?? 339 descr: returns help text list 340 param: no 341 example: queryraw?gethelpchoices 342 343 query: gethelp 344 raw: ?? 345 descr: returns help text 346 param: yes 347 example: queryraw?gethelp&adjust 348 349 query: getcommand 350 raw: ?? 351 descr: returns command output 352 param: yes 353 example: queryraw?getcommand&free 354 example: queryraw?getcommand&df%02-h 355 356 query: webgethelp 357 raw: ?? 358 descr: displayed your local test page 359 param: yes 360 example: queryraw?gettestpage&/tmp/test.html 336 361 337 362 query: videoplay -
titan/titan/httpd.h
r30028 r30029 286 286 m_unlock(&status.waitrcmutex, 24); 287 287 } 288 else if(ostrcmp(query, "gettestpage") == 0 && param != NULL) 289 { 290 m_lock(&status.waitrcmutex, 24); 291 buf = webgettestpage(fmt); 292 m_unlock(&status.waitrcmutex, 24); 293 } 288 294 else if(ostrcmp(query, "gethelp") == 0 && param != NULL) 289 295 { -
titan/titan/httpdfunc.h
r30028 r30029 4742 4742 free(tmpstr1), tmpstr1 = NULL; 4743 4743 4744 buf = ostrcat(buf, "</body></html>", 1, 0); 4744 if(fmt == 0) 4745 buf = ostrcat(buf, "</body></html>", 1, 0); 4745 4746 4746 4747 return buf; … … 4751 4752 char* buf = NULL, *tmpstr = NULL, *helppath = NULL, *lang = NULL, *cmd = NULL; 4752 4753 4753 //if(fmt == 0)4754 //{4754 if(fmt == 0) 4755 { 4755 4756 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">", 1, 0); 4756 4757 buf = ostrcat(buf, "<link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script>", 1, 0); 4757 4758 buf = ostrcat(buf, "</head><body class=body id=\"helpchoices\">", 1, 0); 4758 // buf = ostrcat(buf, "<center><form action=query method=get target=nothing><br><br>", 1, 0); 4759 4760 // } 4759 } 4761 4760 4762 4761 helppath = getconfig("helppath", NULL); … … 4782 4781 max = count - 1; 4783 4782 4784 4785 4786 // buf = ostrcat(buf, "<a class=linelink2 href=query?getprovider target=main>Provider</a>", 1, 0);4787 // buf = ostrcat(buf, "<a class=linelink2 href=queryraw?gethelp&adjust target=main>Adjust</a>", 1, 0);4788 // buf = ostrcat(buf, "<a class=linelink2 href=query?getprovider target=main>Provider</a>", 1, 0);4789 4790 4783 buf = ostrcat(buf, "<center><table cellpadding=5 cellspacing=5><tr><td nowrap>", 1, 0); 4791 4784 4792 int icount = 0;4793 4794 4785 if(ret1 != NULL) 4795 4786 { 4796 4787 for(i = 0; i <= max; i++) 4797 4788 { 4798 icount++;4799 /*4800 buf = ostrcat(buf, "<input class=bigbutton type=submit name=gethelp", 1, 0);4801 // buf = ostrcat(buf, _(ret1[i].part), 1, 0);4802 buf = ostrcat(buf, " value=\"", 1, 0);4803 buf = ostrcat(buf, _(stringreplacecharonce(ret1[i].part, '.', '\0')), 1, 0);4804 buf = ostrcat(buf, "\"></input><br>", 1, 0);4805 */4806 4789 buf = ostrcat(buf, "<a class=linelink2 href=queryraw?gethelp&", 1, 0); 4807 4790 buf = ostrcat(buf, stringreplacecharonce(ret1[i].part, '.', '\0'), 1, 0); … … 4810 4793 buf = ostrcat(buf, "</a>", 1, 0); 4811 4794 buf = ostrcat(buf, "</br></br>", 1, 0); 4812 4813 if(icount == 4)4814 {4815 // buf = ostrcat(buf, "</br>", 1, 0);4816 icount = 0;4817 }4818 //<a class=linelink2 href=query?getallchannel target=main>All</a>4819 }4820 4795 } 4821 4796 4797 free(tmpstr), tmpstr = NULL; 4798 if(fmt == 0) 4799 buf = ostrcat(buf, "</td></tr></table></center></body></html>", 1, 0); 4800 4801 return buf; 4802 } 4803 4804 char* webgettestpage(char* param, int fmt) 4805 { 4806 char* buf = NULL, *tmpstr = NULL, *tmpstr1 = NULL, *helppath = NULL, *lang = NULL; 4807 if(param == NULL) return NULL; 4808 4809 if(fmt == 0) 4810 { 4811 buf = ostrcat(buf, "<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">", 1, 0); 4812 buf = ostrcat(buf, "<link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script>", 1, 0); 4813 buf = ostrcat(buf, "</head><body class=body id=\"help\">", 1, 0); 4814 } 4815 4816 tmpstr = ostrcat(tmpstr, param, 1, 0); 4817 4818 debug(10, "file: %s", tmpstr); 4819 tmpstr1 = readsys(tmpstr, 1); 4820 4821 buf = ostrcat(buf, tmpstr1, 1, 0); 4822 4822 free(tmpstr), tmpstr = NULL; 4823 // buf = ostrcat(buf, "</form></center></body></html>", 1, 0); 4824 buf = ostrcat(buf, "</td></tr></table></center></body></html>", 1, 0); 4823 free(tmpstr1), tmpstr1 = NULL; 4824 4825 if(fmt == 0) 4826 buf = ostrcat(buf, "</body></html>", 1, 0); 4825 4827 4826 4828 return buf;
Note: See TracChangeset
for help on using the changeset viewer.