[vscweb-commit] SF.net SVN: vscweb: [468] branches/vsc-2.2/Main
Brought to you by:
cirrusrex
|
From: <hc...@us...> - 2007-03-29 18:58:05
|
Revision: 468
http://svn.sourceforge.net/vscweb/?rev=468&view=rev
Author: hctv19
Date: 2007-03-29 11:57:50 -0700 (Thu, 29 Mar 2007)
Log Message:
-----------
More bug fixes
Modified Paths:
--------------
branches/vsc-2.2/Main/Host/Scan/quickscan.php
branches/vsc-2.2/Main/Host/nadd_host.php
branches/vsc-2.2/Main/People/News/include/libnews.inc
branches/vsc-2.2/Main/People/Privilege/include/public.inc
branches/vsc-2.2/Main/main.php
branches/vsc-2.2/Main/tpl/People_Error-FatalError.tpl
branches/vsc-2.2/Main/tpl/People_Privilege-request_form.tpl
Modified: branches/vsc-2.2/Main/Host/Scan/quickscan.php
===================================================================
--- branches/vsc-2.2/Main/Host/Scan/quickscan.php 2007-03-27 15:15:05 UTC (rev 467)
+++ branches/vsc-2.2/Main/Host/Scan/quickscan.php 2007-03-29 18:57:50 UTC (rev 468)
@@ -1,5 +1,5 @@
<?php
-/**
+/*
* Allows a user to run a quick scan
*
* Takes a host or list of hosts and attaches them to a new scan
Modified: branches/vsc-2.2/Main/Host/nadd_host.php
===================================================================
--- branches/vsc-2.2/Main/Host/nadd_host.php 2007-03-27 15:15:05 UTC (rev 467)
+++ branches/vsc-2.2/Main/Host/nadd_host.php 2007-03-29 18:57:50 UTC (rev 468)
@@ -64,7 +64,7 @@
$addressArray = explode("/", $addr);
$ipv4 = Net_ParseIP($addressArray[0]);
$dns = $addressArray[1];
- if (!Net_IsNet($ipv4)) Error($_error.$ipv4."Added", ERR_FATAL);
+ if (!Net_IsNet($ipv4)) Error($_error." ".$ipv4." added, please double check the IP address or range", ERR_FATAL);
$hr = new Net_Range($ipv4);
/*print "<pre>";
print_r($hr);
Modified: branches/vsc-2.2/Main/People/News/include/libnews.inc
===================================================================
--- branches/vsc-2.2/Main/People/News/include/libnews.inc 2007-03-27 15:15:05 UTC (rev 467)
+++ branches/vsc-2.2/Main/People/News/include/libnews.inc 2007-03-29 18:57:50 UTC (rev 468)
@@ -108,4 +108,21 @@
function News_GetItem($newsid) {
return DB_GetArray("SELECT * FROM news WHERE newsid=$newsid");
}
+
+ function News_UserHasPrivileges($user)
+ {
+ $hasPrivs = false;
+
+ $privList = DB_GetResult("
+ SELECT userid from privilege
+ WHERE userid='$user'
+ ");
+
+ if (DB_FetchArray($privList))
+ {
+ $hasPrivs = true;
+ }
+
+ return $hasPrivs;
+ }
?>
Modified: branches/vsc-2.2/Main/People/Privilege/include/public.inc
===================================================================
--- branches/vsc-2.2/Main/People/Privilege/include/public.inc 2007-03-27 15:15:05 UTC (rev 467)
+++ branches/vsc-2.2/Main/People/Privilege/include/public.inc 2007-03-29 18:57:50 UTC (rev 468)
@@ -43,6 +43,7 @@
// Purpose: provide commonly used database functions
// Assumes that header has not been sent
+
function Priv_FindPrivileges($current_domain, $user) {
// Default : no privilege found
$found = 'none';
@@ -97,7 +98,7 @@
}
if ($error) {
- Error("You do not have the required privileges.", ERR_FATAL);
+ Error("You do not have the required privileges. To request privileges to a domain, click <a href='$IMAGE_PATH/People/Privilege/request_form.php'>here</a>.", ERR_FATAL);
} else {
return false;
}
Modified: branches/vsc-2.2/Main/main.php
===================================================================
--- branches/vsc-2.2/Main/main.php 2007-03-27 15:15:05 UTC (rev 467)
+++ branches/vsc-2.2/Main/main.php 2007-03-29 18:57:50 UTC (rev 468)
@@ -44,6 +44,7 @@
require $INC_PATH."/include/core.inc";
require $INC_PATH."/People/News/include/public.inc";
+
$smarty = CORE_GetSmarty();
__debug_w("Testing 1...2...3...");
Session_LoadSession();
@@ -53,10 +54,16 @@
}
+
UI_Header("VSC - Main Page");
-echo "<img src='$IMAGE_PATH/image/title_vsc.gif' alt='Vulnerability asdfScanning Cluster'><br><br>";
+echo "<img src='$IMAGE_PATH/image/title_vsc.gif' alt='Vulnerability Scanning Cluster'><br><br>";
UI_Style("Current News", STY_BOLD|STY_SIZE, array("SIZE" =>STY_FONT_HUGE));
echo "<br>";
+if (!News_UserHasPrivileges($_USER['userid']))
+{
+echo "You must first request and be granted privileges to a domain before you can initiate a scan. To request privileges, click <a href='$IMAGE_PATH/People/Privilege/request_form.php'>here</a>.";
+}
+
$news_arr = News_GetItems(($_USER['domain'] != "") ? $_USER['domain']:$_CONFIG['ROOT_DOMAIN']);
foreach ($news_arr as $na_r) {
@@ -65,7 +72,7 @@
$smarty->assign('na', $na);
$smarty->display('News_Item.tpl');
}
-echo "<b>This is the correct instance of vsc dev</b>";
+
UI_Footer();
?>
Modified: branches/vsc-2.2/Main/tpl/People_Error-FatalError.tpl
===================================================================
--- branches/vsc-2.2/Main/tpl/People_Error-FatalError.tpl 2007-03-27 15:15:05 UTC (rev 467)
+++ branches/vsc-2.2/Main/tpl/People_Error-FatalError.tpl 2007-03-29 18:57:50 UTC (rev 468)
@@ -7,7 +7,7 @@
<table cellspacing='0' style='border-width: 2px 2px 2px 2px; border-style: solid; border-color: red;'>
<tr>
- <td bgcolor='#ffffff' style='font-weight: bolder;'>Error!</td>
+ <td bgcolor='#ffffff' style='font-weight: bolder;'>There was an error processing your request, please see the error message below for more information.</td>
</tr>
<tr>
<td bgcolor='#ffffff' style='font-size: larger;'><br />{$error_mesg}</td>
Modified: branches/vsc-2.2/Main/tpl/People_Privilege-request_form.tpl
===================================================================
--- branches/vsc-2.2/Main/tpl/People_Privilege-request_form.tpl 2007-03-27 15:15:05 UTC (rev 467)
+++ branches/vsc-2.2/Main/tpl/People_Privilege-request_form.tpl 2007-03-29 18:57:50 UTC (rev 468)
@@ -52,6 +52,7 @@
<tr>
<td colspan='2'>
<br />
+ <b>Can't find the domain you need?</b><br/>
If you were unable to locate an adequate domain, you may request that a
domain be created for you. To do so, please send email to
<a href='mailto:{$sys_email}?Subject=Domain+Request'>{$sys_email}</a>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|