Skip to content

Commit 77b03c8

Browse files
author
Charlie Meyer
committed
Display a note on outstanding req tab if you have open lead request
1 parent d8e518e commit 77b03c8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/php/tools-user.php

+14
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
require_once("rq_client.php");
2929
require_once("settings.php");
3030
require_once("user-preferences.php");
31+
require_once("db_utils.php");
3132

3233
?>
3334

@@ -353,6 +354,19 @@ function deleteSshKey(dest){
353354
}
354355

355356
// END outstanding requests tab
357+
358+
// Todo: the headings on that table above made it so this request really couldn't fit
359+
// so I don't know how this should be displayed.
360+
361+
$conn = portal_conn();
362+
$sql = "SELECT * from lead_request where "
363+
. "requester_urn =" . $conn->quote($user->urn(), 'text') . " and status ='open'";
364+
$rows = db_fetch_rows($sql, "check duplicate lead request");
365+
$open_requests = $rows[RESPONSE_ARGUMENT::VALUE];
366+
if(count($open_requests) > 0){
367+
print "<p>You have an outstanding project lead request</p>";
368+
}
369+
356370
echo "</div>";
357371

358372
// BEGIN account summary tab

0 commit comments

Comments
 (0)