bernd commited on 2008-12-22 12:04:29
Zeige 2 geänderte Dateien mit 31 Einfügungen und 0 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1205 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -39,6 +39,7 @@ foreach ($results AS $app) { |
39 | 39 |
} |
40 | 40 |
else { |
41 | 41 |
$vulnlink = $app['vulninfo']; |
42 |
+ $doclink = get_upgradeinstructions($app['appname']); |
|
42 | 43 |
if (substr($vulnlink, 0, 3) == 'CVE') { |
43 | 44 |
$vulnlink = 'http://cve.mitre.org/cgi-bin/cvename.cgi?name='.$vulnlink; |
44 | 45 |
} |
... | ... |
@@ -51,6 +52,8 @@ foreach ($results AS $app) { |
51 | 52 |
} |
52 | 53 |
output("<p><strong>Referenz zu diesem Sicherheitsproblem: <a href='{$vulnlink}'>{$app['vulninfo']}</a></strong></p>"); |
53 | 54 |
output("<p>Gefunden in {$app['directory']}</p>\n"); |
55 |
+ if ($doclink != NULL) |
|
56 |
+ output('<p><strong>Hinweis:</strong> Um Ihnen das Upgrade leichter zu machen, möchten wir Sie auf eine <a href="'.$doclink.'">deutschsprachige Upgrade-Anleitung</a> aufmerksam machen.</p>'); |
|
54 | 57 |
} |
55 | 58 |
output("</div>\n"); |
56 | 59 |
#output("<tr><td>{$app['appname']} ({$app['version']})</td><td>{$app['state']}</td></tr>"); |
... | ... |
@@ -0,0 +1,28 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+require_once('inc/base.php'); |
|
4 |
+ |
|
5 |
+ |
|
6 |
+function load_results() |
|
7 |
+{ |
|
8 |
+ $uid = (int) $_SESSION['userinfo']['uid']; |
|
9 |
+ $result = db_query("SELECT directory, docroot, lastcheck, appname, version, state, safeversion, vulninfo FROM qatools.freewvs_results WHERE uid={$uid}"); |
|
10 |
+ $ret = array(); |
|
11 |
+ while ($line = mysql_fetch_assoc($result)) { |
|
12 |
+ array_push($ret, $line); |
|
13 |
+ } |
|
14 |
+ return $ret; |
|
15 |
+} |
|
16 |
+ |
|
17 |
+function get_upgradeinstructions($appname) { |
|
18 |
+ $appname = mysql_real_escape_string($appname); |
|
19 |
+ $result = db_query("SELECT url FROM qatools.freewvs_upgradeinstructions WHERE appname='{$appname}' LIMIT 1"); |
|
20 |
+ if (mysql_num_rows($result) > 0) { |
|
21 |
+ $tmp = mysql_fetch_array($result); |
|
22 |
+ return $tmp[0]; |
|
23 |
+ } |
|
24 |
+ return NULL; |
|
25 |
+} |
|
26 |
+ |
|
27 |
+ |
|
28 |
+ |
|
0 | 29 |