Subversion Repositories wimsdev

Rev

Rev 9007 | Rev 9037 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9007 Rev 9033
Line 93... Line 93...
93
    char input_id[128];
93
    char input_id[128];
94
    s = getvar("wims_ref_id");
94
    s = getvar("wims_ref_id");
95
    if(s!=NULL && *s!=0 && !isspace(*s)) {
95
    if(s!=NULL && *s!=0 && !isspace(*s)) {
96
      strcpy(input_id,s);
96
      strcpy(input_id,s);
97
    }
97
    }
98
    else {
98
    else {
99
      strcpy(input_id,nbuf);
99
      strcpy(input_id,nbuf);
100
    }      
100
    }
101
 
101
 
102
    for(i=0;i<itemcnt;i++) {
102
    for(i=0;i<itemcnt;i++) {
103
      if(type==0) {
103
      if(type==0) {
104
        snprintf(buf,sizeof(buf),"%d",i+i1);
104
        snprintf(buf,sizeof(buf),"%d",i+i1);
105
        p0=buf;
105
        p0=buf;
106
      }
106
      }
107
      else p0=vlist[i];
107
      else p0=vlist[i];
108
 
-
 
109
      if(*find_word_start(p0)==0) continue;
108
      if(*find_word_start(p0)==0) continue;
110
      if(plist[i]==NULL) plist[i]=p0;
109
      if(plist[i]==NULL) plist[i]=p0;
111
      if(*val!=0 &&
110
      if(*val!=0 &&
112
        (strcmp(p0,val)==0 ||
111
        (strcmp(p0,val)==0 ||
113
         ( (kind==FORM_SELECT || kind==FORM_CHECKBOX)
112
         ( (kind==FORM_SELECT || kind==FORM_CHECKBOX)
Line 123... Line 122...
123
        html_mode=getvar("wims_html_mode");
122
        html_mode=getvar("wims_html_mode");
124
        if(html_mode==NULL || *html_mode==0 || isspace(*html_mode)) {
123
        if(html_mode==NULL || *html_mode==0 || isspace(*html_mode)) {
125
          html_mode="span";
124
          html_mode="span";
126
        }
125
        }
127
        snprintf(pfrb, sizeof(pfrb), "<%s class=\"%s\">", html_mode, s);
126
        snprintf(pfrb, sizeof(pfrb), "<%s class=\"%s\">", html_mode, s);
128
        char pfre[256];
-
 
129
        snprintf(pfre, sizeof(pfre), "</%s>", html_mode);
127
        snprintf(pfre, sizeof(pfre), "</%s>", html_mode);
130
      }
128
      }
131
      else { pfrb[0]=0; pfre=""; }
129
      else { pfrb[0]=0; pfre=""; }
132
 
130
 
133
      switch(kind) {
131
      switch(kind) {
Line 148... Line 146...
148
         if(i<itemcnt-1 && itemcnt>2) _output_(",");
146
         if(i<itemcnt-1 && itemcnt>2) _output_(",");
149
         _output_("\n");
147
         _output_("\n");
150
         break;
148
         break;
151
 
149
 
152
        case FORM_BAR:
150
        case FORM_BAR:
153
         output("<input type=\"radio\" name=\"%s\" id=\"%s\" value=\"%s\"%s/>",
151
         output("<input type=\"radio\" name=\"%s\" id=\"%s%d\" value=\"%s\"%s/>",
154
             nbuf,input_id,i,p0,pc);
152
             nbuf,input_id,i,p0,pc);
155
         break;
153
         break;
156
 
154
 
157
      }
155
      }
158
    }
156
    }