Changeset 465
- Timestamp:
- 10/03/07 14:04:56 (4 years ago)
- Location:
- trunk/openmct/packages/system/owi/src
- Files:
-
- 7 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/openmct/packages/system/owi/src/ftp.c
r429 r465 104 104 "<br />%s<br /><br />\n" 105 105 "<form action=\"%s\" method=\"post\">\n" 106 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 106 107 "<input type=\"hidden\" name=\"command\" value=\"update\" />\n" 107 108 "<table class=\"%s\" width=\"100%%\" cellspacing=\"0\" cellpading=\"0\">\n" … … 115 116 FTP_DETAIL, 116 117 getenv("SCRIPT_NAME"), 118 variable_get("module"), 117 119 CONTENT_TABLE_BOX_CLASS); 118 120 -
trunk/openmct/packages/system/owi/src/group.c
r430 r465 90 90 /* Start form / external table / scroll area / internal table*/ 91 91 printf("<form action=\"%s\" method=\"post\">\n" 92 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 92 93 "<input type=\"hidden\" name=\"command\" value=\"\" />\n" 93 94 "<table class=\"%s\">\n" … … 116 117 "<tbody>", 117 118 getenv("SCRIPT_NAME"), 119 variable_get("module"), 118 120 CONTENT_TABLE_CLASS, 119 121 GROUP_HEADLINE, … … 139 141 "<td>%s</td>\n" 140 142 "<td>%s</td>\n" 141 "<td><input type=\"button\" onClick=\"location='%s? command=detail&id=%s'\" value=\"%s\" /> <input type=\"button\" onClick=\"location='%s?command=delete&id=%s'\" value=\"%s\" /></td>\n"143 "<td><input type=\"button\" onClick=\"location='%s?module=%s&command=detail&id=%s'\" value=\"%s\" /> <input type=\"button\" onClick=\"location='%s?command=delete&id=%s'\" value=\"%s\" /></td>\n" 142 144 "</tr>\n", 143 145 CONTENT_TABLE_CLASS_MOUSEOVER, … … 147 149 argument_get_part(group, 3), 148 150 getenv("SCRIPT_NAME"), 151 variable_get("module"), 149 152 argument_get_part(group, 0), 150 153 GROUP_BUTTON_MODIFY, … … 164 167 "<tr>\n" 165 168 "<td colspan=\"7\" align=\"right\">\n" 166 "<a class=\"%s\" href=\"#\" onClick=\"location='%s? command=new'\"><div class=\"%s\">%s</div></a>\n"169 "<a class=\"%s\" href=\"#\" onClick=\"location='%s?module=%s&command=new'\"><div class=\"%s\">%s</div></a>\n" 167 170 "</td>\n" 168 171 "</tr>\n" … … 174 177 CONTENT_LINK_AQUA_CLASS, 175 178 getenv("SCRIPT_NAME"), 179 variable_get("module"), 176 180 CONTENT_BUTTON_AQUA_CLASS, 177 181 GROUP_BUTTON_NEW); … … 204 208 if (!strcmp(argument_get_part(group, 0), groupname)) { 205 209 printf("<form action=\"%s\" method=\"POST\">\n" 210 "<input type=\"hidden\" name=\"module\" value=\"%s\">\n" 206 211 "<input type=\"hidden\" name=\"command\" value=\"update\">\n" 207 212 "<input type=\"hidden\" name=\"id\" value=\"%s\">\n" … … 233 238 , 234 239 getenv("SCRIPT_NAME"), 240 variable_get("module"), 235 241 argument_get_part(group, 0), 236 242 CONTENT_TABLE_BOX_CLASS, … … 394 400 "<br />%s<br /><br />\n" 395 401 "<form action=\"%s\" method=\"post\">\n" 402 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 396 403 "<input type=\"hidden\" name=\"command\" value=\"add\" />\n" 397 404 "<table class=\"%s\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%%\">\n" … … 423 430 GROUP_NEW, 424 431 getenv("SCRIPT_NAME"), 432 variable_get("module"), 425 433 CONTENT_TABLE_BOX_CLASS, 426 434 GROUP_TABLE_DESCRIPTION, -
trunk/openmct/packages/system/owi/src/interface.c
r429 r465 93 93 /* Start form / external table / scroll area / internal table*/ 94 94 printf("<form action=\"%s\" method=\"post\">\n" 95 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 95 96 "<input type=\"hidden\" name=\"command\" value=\"\" />\n" 96 97 "<table class=\"%s\">\n" … … 118 119 "<tbody>", 119 120 getenv("SCRIPT_NAME"), 121 variable_get("module"), 120 122 CONTENT_TABLE_CLASS, 121 123 INTERFACE_HEADLINE, … … 159 161 "<td width=\"160\">%s</td>\n" 160 162 "<td width=\"160\">" 161 "<input type=\"button\" onClick=\"location='%s? command=detail&id=%s'\" value=\"%s\" /> "162 "<input type=\"button\" onClick=\"location='%s? command=delete&id=%s'\" value=\"%s\" />"163 "<input type=\"button\" onClick=\"location='%s?module=%s&command=detail&id=%s'\" value=\"%s\" /> " 164 "<input type=\"button\" onClick=\"location='%s?module=%s&command=delete&id=%s'\" value=\"%s\" />" 163 165 "</td>\n" 164 166 "</tr>\n", … … 170 172 interface_ini[2].current ? interface_ini[2].current[1] : "", 171 173 getenv("SCRIPT_NAME"), 174 variable_get("module"), 172 175 current_interface, 173 176 INTERFACE_BUTTON_MODIFY, 174 177 getenv("SCRIPT_NAME"), 178 variable_get("module"), 175 179 current_interface, 176 180 INTERFACE_BUTTON_DELETE); … … 226 230 "<tr>\n" 227 231 "<td colspan=\"7\" align=\"right\">\n" 228 "<input type=\"button\" onClick=\"location='%s? command=new'\" value=\"%s\" />"232 "<input type=\"button\" onClick=\"location='%s?module=%s&command=new'\" value=\"%s\" />" 229 233 "</td>\n" 230 234 "</tr>\n" … … 235 239 "</form>\n", 236 240 getenv("SCRIPT_NAME"), 241 variable_get("module"), 237 242 INTERFACE_BUTTON_NEW); 238 243 } … … 279 284 /* Print network interface */ 280 285 printf("<form action=\"%s\" method=\"post\">\n" 286 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 281 287 "<input type=\"hidden\" name=\"command\" value=\"update\" />\n" 282 288 "<input type=\"hidden\" name=\"id\" value=\"%s\" />\n" … … 309 315 , 310 316 getenv("SCRIPT_NAME"), 317 variable_get("module"), 311 318 current_interface, 312 319 CONTENT_TABLE_BOX_CLASS, -
trunk/openmct/packages/system/owi/src/nfs.c
r430 r465 92 92 /* Start form / external table / scroll area / internal table*/ 93 93 printf("<form action=\"%s\" method=\"post\">\n" 94 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 94 95 "<input type=\"hidden\" name=\"command\" value=\"\" />\n" 95 96 "<table class=\"%s\">\n" … … 115 116 "<tbody>", 116 117 getenv("SCRIPT_NAME"), 118 variable_get("module"), 117 119 CONTENT_TABLE_CLASS, 118 120 NFS_HEADLINE, … … 147 149 "<td width=\"480\">%s</td>\n" 148 150 "<td width=\"160\">\n" 149 "<input type=\"button\" onClick=\"location='%s? command=detail&id=%s'\" value=\"%s\" /> "150 "<input type=\"button\" onClick=\"location='%s? command=delete&id=%s'\" value=\"%s\" />"151 "<input type=\"button\" onClick=\"location='%s?module=%s&command=detail&id=%s'\" value=\"%s\" /> " 152 "<input type=\"button\" onClick=\"location='%s?module=%s&command=delete&id=%s'\" value=\"%s\" />" 151 153 "</td>\n" 152 154 "</tr>\n", … … 156 158 options, 157 159 getenv("SCRIPT_NAME"), 160 variable_get("module"), 158 161 argument_get_part(nfs, 0), 159 162 NFS_BUTTON_MODIFY, 160 163 getenv("SCRIPT_NAME"), 164 variable_get("module"), 161 165 argument_get_part(nfs, 0), 162 166 NFS_BUTTON_DELETE); … … 178 182 "<tr>\n" 179 183 "<td colspan=\"7\" align=\"right\">\n" 180 "<input type=\"button\" onClick=\"location='%s? command=new'\" value=\"%s\" />"184 "<input type=\"button\" onClick=\"location='%s?module=%s&command=new'\" value=\"%s\" />" 181 185 "</td>\n" 182 186 "</tr>\n" … … 187 191 "</form>\n", 188 192 getenv("SCRIPT_NAME"), 193 variable_get("module"), 189 194 NFS_BUTTON_NEW); 190 195 } … … 222 227 /* Print data */ 223 228 printf("<form action=\"%s\" method=\"post\">\n" 229 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 224 230 "<input type=\"hidden\" name=\"command\" value=\"update\" />\n" 225 231 "<input type=\"hidden\" name=\"id\" value=\"%s\" />\n" … … 243 249 , 244 250 getenv("SCRIPT_NAME"), 251 variable_get("module"), 245 252 argument_get_part(nfs, 0), 246 253 CONTENT_TABLE_BOX_CLASS, … … 367 374 "<br />%s<br /><br />\n" 368 375 "<form action=\"%s\" method=\"post\">\n" 376 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 369 377 "<input type=\"hidden\" name=\"command\" value=\"add\" />\n" 370 378 "<table class=\"%s\" width=\"100%%\">\n" … … 392 400 NFS_NEW, 393 401 getenv("SCRIPT_NAME"), 402 variable_get("module"), 394 403 CONTENT_TABLE_BOX_CLASS, 395 404 NFS_TABLE_DESCRIPTION, -
trunk/openmct/packages/system/owi/src/owi.c
r463 r465 50 50 "<ul id=\"navigation\">\n", title); 51 51 for (i = 0; modules[i].name != NULL; i++) { 52 printf("<li class=\"navigation %s\"><a href=\"%s \">%s</a></li>\n",52 printf("<li class=\"navigation %s\"><a href=\"%s?module=%s\">%s</a></li>\n", 53 53 modules[i].style, 54 getenv("SCRIPT_NAME"), 54 55 modules[i].name, 55 56 modules[i].description); … … 85 86 int main(int argc, char **argv) { 86 87 int i; 87 char *p = strrchr(argv[0], '/');88 88 char *module = NULL; 89 struct rlimit rlimit;90 91 getrlimit(RLIMIT_CORE, &rlimit);92 93 rlimit.rlim_max = 20000;94 95 setrlimit(RLIMIT_CORE, &rlimit);96 97 if (p) {98 module = p + 1;99 } else {100 module = argv[0];101 }102 89 103 90 owi_request(); … … 106 93 107 94 if (!strcmp(module, "")) { 108 module = "sysinfo.cgi"; 95 variable_set("module", "sysinfo"); 96 module = variable_get("module"); 109 97 } 110 98 -
trunk/openmct/packages/system/owi/src/shell.c
r425 r465 56 56 /* Print table head */ 57 57 printf("<form action=\"%s\" method=\"post\">\n" 58 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 58 59 "<input type=\"hidden\" name=\"command\" value=\"execute\" />\n" 59 60 "<table class=\"%s\" width=\"100%%\">\n" … … 61 62 "<td>\n", 62 63 getenv("SCRIPT_NAME"), 64 variable_get("module"), 63 65 CONTENT_TABLE_CLASS); 64 66 -
trunk/openmct/packages/system/owi/src/user.c
r430 r465 90 90 /* Start form / external table / scroll area / internal table*/ 91 91 printf("<form action=\"%s\" method=\"post\">\n" 92 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 92 93 "<input type=\"hidden\" name=\"command\" value=\"\" />\n" 93 94 "<table class=\"%s\">\n" … … 117 118 "<tbody>", 118 119 getenv("SCRIPT_NAME"), 120 variable_get("module"), 119 121 CONTENT_TABLE_CLASS, 120 122 USER_HEADLINE, … … 149 151 "<td width=\"160\">%s</td>\n" 150 152 "<td width=\"160\">" 151 "<input type=\"button\" onClick=\"location='%s? command=detail&id=%s'\" value=\"%s\" /> "152 "<input type=\"button\" onClick=\"location='%s? command=delete&id=%s'\" value=\"%s\" />"153 "<input type=\"button\" onClick=\"location='%s?module=%s&command=detail&id=%s'\" value=\"%s\" /> " 154 "<input type=\"button\" onClick=\"location='%s?module=%s&command=delete&id=%s'\" value=\"%s\" />" 153 155 "</td>\n" 154 156 "</tr>\n", … … 160 162 argument_get_part(passwd, 6), 161 163 getenv("SCRIPT_NAME"), 164 variable_get("module"), 162 165 argument_get_part(passwd, 0), 163 166 USER_BUTTON_MODIFY, 164 167 getenv("SCRIPT_NAME"), 168 variable_get("module"), 165 169 argument_get_part(passwd, 0), 166 170 USER_BUTTON_DELETE); … … 177 181 "<tr>\n" 178 182 "<td colspan=\"7\" align=\"right\">\n" 179 "<a class=\"%s\" href=\"#\" onClick=\"location='%s? command=new'\"><div class=\"%s\">%s</div></a>\n"183 "<a class=\"%s\" href=\"#\" onClick=\"location='%s?module=%s&command=new'\"><div class=\"%s\">%s</div></a>\n" 180 184 "</td>\n" 181 185 "</tr>\n" … … 187 191 CONTENT_LINK_AQUA_CLASS, 188 192 getenv("SCRIPT_NAME"), 193 variable_get("module"), 189 194 CONTENT_BUTTON_AQUA_CLASS, 190 195 USER_BUTTON_NEW); … … 218 223 if (!strcmp(argument_get_part(passwd, 0), username)) { 219 224 printf("<form action=\"%s\" method=\"post\">\n" 225 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 220 226 "<input type=\"hidden\" name=\"command\" value=\"update\" />\n" 221 227 "<input type=\"hidden\" name=\"id\" value=\"%s\" />\n" … … 260 266 , 261 267 getenv("SCRIPT_NAME"), 268 variable_get("module"), 262 269 argument_get_part(passwd, 0), 263 270 CONTENT_TABLE_BOX_CLASS, … … 432 439 "<br />%s<br /><br />\n" 433 440 "<form action=\"%s\" method=\"post\">\n" 441 "<input type=\"hidden\" name=\"module\" value=\"%s\" />\n" 434 442 "<input type=\"hidden\" name=\"command\" value=\"add\" />\n" 435 443 "<table class=\"%s\" width=\"100%%\">\n" … … 470 478 USER_NEW, 471 479 getenv("SCRIPT_NAME"), 480 variable_get("module"), 472 481 CONTENT_TABLE_BOX_CLASS, 473 482 USER_TABLE_DESCRIPTION,
