Changeset 30201 for titan


Ignore:
Timestamp:
09/28/14 19:48:55 (10 years ago)
Author:
obi
Message:

fix webif

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/httpdfunc.h

    r30199 r30201  
    51355135char* webgetnewsletter(char* param, int fmt)
    51365136{
    5137         char* buf = NULL, *tmpstr = NULL;
     5137        char* buf = NULL, *tmpstr = NULL, *tmpstr1 = NULL;
    51385138
    51395139//      if(fmt == 0)
     
    51425142                buf = ostrcat(buf, "<link rel=stylesheet type=text/css href=titan.css><script type=text/javascript src=titan.js></script>", 1, 0);
    51435143                buf = ostrcat(buf, "</head><body class=body id=\"newsletter\">", 1, 0);
     5144//      }
     5145
     5146        struct newsletter* node = NULL;
     5147
     5148        m_lock(&status.newslettermutex, 19);
     5149
     5150        readnewsletter();
     5151        node = newsletter;
     5152
     5153        while(node != NULL)
     5154        {
     5155                if(ostrcmp(oitoa(node->nr), param) == 0)       
     5156                {
     5157                        tmpstr1 = ostrcat(node->title, " - ", 0, 0);
     5158                        tmpstr1 = ostrcat(tmpstr1, node->date, 1, 0);
     5159                        tmpstr = ostrcat(node->text, "\n", 0, 0);
     5160                        break;
     5161                }
     5162                node = node->next;
     5163        }
     5164
     5165//      if(fmt == 0)
     5166//      {
    51445167                buf = ostrcat(buf, "<br>", 1, 0);
    51455168                buf = ostrcat(buf, "<h1>", 1, 0);
    5146                 buf = ostrcat(buf, _("param"), 1, 0);
     5169                buf = ostrcat(buf, tmpstr1, 1, 1);
    51475170                buf = ostrcat(buf, "</h1>", 1, 0);
    51485171                buf = ostrcat(buf, "<br>", 1, 0);
    51495172//      }
    51505173
    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         }
    51675174
    51685175        freenewsletter();
Note: See TracChangeset for help on using the changeset viewer.