archive: moved <script> from report.cgi. don't output <html> etc from report.cgi because it is inlined in /archive/index.php
This commit is contained in:
parent
7a324cef25
commit
e1acef1217
|
@ -14,6 +14,27 @@ uninitialized variables, unused functions" />
|
|||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Project News"
|
||||
href="http://sourceforge.net/p/cppcheck/news/feed" />
|
||||
<script type="text/javascript">
|
||||
function addfile() {
|
||||
var name = prompt("Name of library/platform/etc", "");
|
||||
if (name != null)
|
||||
window.location = "http://cppcheck.sourceforge.net/cgi-bin/addfile.cgi?name=" + name;
|
||||
}
|
||||
|
||||
function editfile(name,version) {
|
||||
window.location = "http://cppcheck.sourceforge.net/cgi-bin/edit.cgi?name=" + name + "&version=" + version;
|
||||
}
|
||||
|
||||
function renamefile(name1,version) {
|
||||
var name2 = prompt("Name", name1);
|
||||
if (name2 != null)
|
||||
window.location = "http://cppcheck.sourceforge.net/cgi-bin/renamefile.cgi?name1=" + name1 + "&name2=" + name2;
|
||||
}
|
||||
|
||||
function deletefile(name,version) {
|
||||
window.location = "http://cppcheck.sourceforge.net/cgi-bin/deletefile.cgi?name=" + name + "&version=" + version;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="header">
|
||||
|
|
|
@ -10,29 +10,7 @@
|
|||
void listAll(char **data)
|
||||
{
|
||||
puts("Content-type: text/html\r\n\r\n");
|
||||
puts("<html>");
|
||||
puts("<head>");
|
||||
puts("<meta http-equiv=\"Pragma\" content=\"no-cache\">");
|
||||
puts("<script>");
|
||||
puts("function addfile() {");
|
||||
puts(" var name = prompt(\"Name of library/platform/etc\", \"\");");
|
||||
puts(" if (name != null)");
|
||||
puts(" window.location = \"http://cppcheck.sourceforge.net/cgi-bin/addfile.cgi?name=\" + name;");
|
||||
puts("}");
|
||||
puts("function editfile(name,version) {\n");
|
||||
puts(" window.location = \"http://cppcheck.sourceforge.net/cgi-bin/edit.cgi?name=\" + name + \"&version=\" + version;\n");
|
||||
puts("}");
|
||||
puts("function renamefile(name1,version) {\n");
|
||||
puts(" var name2 = prompt(\"Name\", name1);\n");
|
||||
puts(" if (name2 != null)\n");
|
||||
puts(" window.location = \"http://cppcheck.sourceforge.net/cgi-bin/renamefile.cgi?name1=\" + name1 + \"&name2=\" + name2;\n");
|
||||
puts("}\n");
|
||||
puts("function deletefile(name,version) {\n");
|
||||
puts(" window.location = \"http://cppcheck.sourceforge.net/cgi-bin/deletefile.cgi?name=\" + name + \"&version=\" + version;\n");
|
||||
puts("}");
|
||||
puts("</script>");
|
||||
puts("</head><body>");
|
||||
puts("<input type=\"button\" onclick=\"addfile()\" value=\"Add file\">");
|
||||
puts("<input type=\"button\" onclick=\"addfile()\" value=\"Add file\"/>");
|
||||
puts("<table border=\"1\"><tr><td><table>");
|
||||
for (int i = 0; i < MAX_RECORDS && data[i]; i++) {
|
||||
const char *name = getname(data[i]);
|
||||
|
@ -42,13 +20,12 @@ void listAll(char **data)
|
|||
if (i > 0)
|
||||
printf("<tr height=\"1\"><td colspan=\"2\" bgcolor=\"gray\"></td></tr>");
|
||||
printf("<tr><td width=\"200\">%s</td>", name);
|
||||
printf("<td><input type=\"button\" onclick=\"editfile(\'%s\','%i')\" value=\"Edit\">", name, version);
|
||||
printf("<input type=\"button\" onclick=\"renamefile(\'%s\','%i')\" value=\"Rename\">", name, version);
|
||||
printf("<input type=\"button\" onclick=\"deletefile(\'%s\','%i')\" value=\"Delete\"> </td>", name, version);
|
||||
printf("<td><input type=\"button\" onclick=\"editfile(\'%s\','%i')\" value=\"Edit\"/>", name, version);
|
||||
printf("<input type=\"button\" onclick=\"renamefile(\'%s\','%i')\" value=\"Rename\"/>", name, version);
|
||||
printf("<input type=\"button\" onclick=\"deletefile(\'%s\','%i')\" value=\"Delete\"/> </td>", name, version);
|
||||
printf("</tr>\n");
|
||||
}
|
||||
puts("</table></td></tr></table>");
|
||||
puts("</body></html>");
|
||||
}
|
||||
|
||||
void listOne(char **data, const char name[])
|
||||
|
|
Loading…
Reference in New Issue