onclick and href

This commit is contained in:
KawaiiPantsu
2022-10-30 13:17:22 +01:00
parent 2975cc6041
commit d28294c294
2 changed files with 42 additions and 31 deletions
+26 -18
View File
@@ -71,6 +71,7 @@ body {
background-size: cover;
background-attachment: fixed;
overflow-y: scroll; /* Show vertical scrollbar */
color: #212324;
}
.menu {
@@ -191,23 +192,6 @@ body {
margin: auto;
}
.menu a {
text-decoration: none;
font-family: sans-serif;
font-size: 18px;
font-weight: bold;
color: #2d3235;
}
.menu a:hover {
text-decoration: none;
color: #626464;
}
.menu a:visited {
text-decoration: none;
}
.menuicon {
width: 32px;
height: 32px;
@@ -293,14 +277,38 @@ table#malwareOverview tr.theader th {
padding-left: 4px;
text-align: left;
}
a:link,
a:visited,
a:hover,
a:active {
text-decoration: none;
font-family: sans-serif;
color: rgb(19, 47, 68);
}
table#malwareOverview tr.malwareLine:nth-child(odd) {
background-color: #ffecec;
}
table#malwareOverview tr.malwareLine:nth-child(even) {
background-color: #fff;
}
.malwareLine td a:link {
color: rgb(19, 47, 68);
}
table#malwareOverview tr.malwareLine:hover a,
table#malwareOverview tr.malwareLine:hover {
background-color: #a8a8a8;
background-color: rgb(105, 105, 105);
color: rgb(255, 255, 255);
cursor: pointer;
}
.malwareLine td a:hover,
.malwareLine td a:active {
color: rgb(255, 255, 255);
cursor: pointer;
}
+16 -13
View File
@@ -23,23 +23,22 @@ if ( isLocalIP() === false ) {
}
}
$page_malwarelist = "<table id=\"malwareOverview\" border=\"0\">" .
" <tr class=\"theader\">" .
"<th>Name</th>" .
"<th>Type</th>" .
"<th>From</th>" .
"</tr>";
$page_malwarelist = "<table id=\"malwareOverview\" border=\"0\">\n" .
" <tr class=\"theader\">\n" .
"<th>Name</th>\n" .
"<th>Type</th>\n" .
"<th>From</th>\n" .
"</tr>\n";
$db = new SQLite3(rtrim($cfg["thezoo"],"/")."/conf/maldb.db");
$results = $db->query('SELECT * FROM Malwares ORDER BY Name COLLATE NOCASE ASC');
while ($row = $results->fetchArray()) {
$page_malwarelist .= "<tr class=\"malwareLine\">" .
" <td>".htmlentities($row["NAME"])."</td>" .
" <td>".htmlentities($row["TYPE"])."</td>" .
" <td>".htmlentities($row["DATE"])."</td>" .
"</tr>";
$page_malwarelist .= "<tr class=\"malwareLine\" onClick=\"window.location='/?page=malware&id=".intval(trim($row["ID"]))."'\">\n" .
" <td><a href=\"/?page=malware&id=".intval(trim($row["ID"]))."\">".htmlentities($row["NAME"])."</a></td>\n" .
" <td>".htmlentities($row["TYPE"])."</td>\n" .
" <td>".htmlentities($row["DATE"])."</td>\n" .
"</tr>\n";
}
$page_malwarelist .= "</table>";
$page_malwarelist .= "</table>\n";
$page_404 = "Sorry but i could not find that page!";
@@ -66,6 +65,10 @@ switch($pageShow) {
if (isset($page_about) ) $page = $page_about;
else $page = $page_404;
break;
case "malware":
if (isset($page_malware) ) $page = $page_malware;
else $page = $page_404;
break;
default:
if (isset($page_malwarelist) ) $page = $page_malwarelist;
else $page = $page_404;