💡‎‎
The first page any user sees after logging in. Everyone sees the programs page every time they login. This is where they navigate through the site to either complete reports, or update their program’s information.
| Version | Primary Author(s) | Description of Version | Date Completed |
|---|---|---|---|
| First Draft | Tyler | General idea of the page | 05/30/2024 |
- TABLE OF CONTENTS
Page Overview
programs.pl is the landing page for all users in CDS after logging in. Here there are option to navigate between different modules in CDS(Public Services, Multi-Family, Single-Family, or Loans). Users are also able to see the programs available to them, and any information requested by the client to be quickly visible. For our Admin users they have access to various report/spreadsheet links at the top of the page. There are typically two slightly different views of this page depending on the users permissions.
Page Objectives
The objective of this page is to provide navigation to any section of the website. As well as any utility options like spreadsheets, password management, and status information about reports.
Product Features
💡‎‎
Below are various features/elements that can be found on the page. Included are some screenshots, and code snippets taken out of programs.pl.
Navigation Bar
Through the navigation bar users can switch between different service types, fiscal years, and/or modules. Below you can see the navigation bar from Alameda County, and the section of code from programs.pl.
- Code Snippet
if ($svc eq "PSV" || $svc eq "PAP" || $svc eq "HOP" || $svc eq "HOM" || $svc eq "ARP" || $svc eq "HML") {
if ($fund eq "") {$fund="All";}
$ffy=2017;
$lfy=$yr;
if ($mon < 5) {$lfy--;}
$pfy=$fyr-1;
$nfy=$fyr+1;
$fyz="FY $fyr/".substr($nfy,2);
print "<table width=850><tr><td width=400 class=ylw align=center>You are working in $fyz</td><td width=50> </td><td width=200 class=y>";
if ($pfy >= $ffy) {
$pfz="FY $pfy";
print "<font class=a9>Change to </font><a href='https://www.citydataservices.net/$cgi/programs.pl?fyr=$pfy'>$pfz</a>";}
print "</td><td width=200 class=y>";
if ($nfy <= $lfy) {
$nfz="FY $nfy";
print "<font class=a9>Change to </font><a href='https://www.citydataservices.net/$cgi/programs.pl?fyr=$nfy'>$nfz</a>";}
print "</td></tr></table>\n";
}
if ($svc eq "PSV" || $svc eq "PAP" || $svc eq "SFR" || $svc eq "HOM" || $svc eq "ARP" || $svc eq "HML") {
print "<table border='0' cellpadding='0' cellspacing='0'><tr>";
if ($pwdty=~/^X/) {
@disp1=("psv","hom","pap","hml","arp");
$col0=$col1=$col2=$col3=$col4="navg";
if ($svc eq "PSV") {$disp1[0]="psv2";}
if ($svc eq "HOM") {$disp1[1]="hom2";}
if ($svc eq "PAP") {$disp1[2]="pap2";}
if ($svc eq "HML") {$disp1[3]="hml2";}
if ($svc eq "ARP") {$disp1[4]="arp2";}
# if ($svc eq "SFR") {$disp1[5]="sfr2";}
for ($i=0;$i<@disp1;$i++) {
$ci=uc(substr($disp1[$i],0,3));
# if ($disp1[$i]=~/mfr/) {$disp1[$i]="aff";}
$cl="navg";
if ($disp1[$i] =~ /psv/) {$name="CDBG";}
if ($disp1[$i] =~ /hom/) {$name="HOME";}
if ($disp1[$i] =~ /pap/) {$name="Policy & Programs";}
if ($disp1[$i] =~ /hml/) {$name="Homeless Services";}
if ($disp1[$i] =~ /arp/) {$name="ARPA";}
# if ($disp1[$i] =~ /sfr/) {$name="Single Family Rehab";}
if ($svc eq "PSV" && $disp1[$i] eq "psv2") { $cl="navgs";}
if ($svc eq "HOM" && $disp1[$i] eq "hom2") { $cl="navgs";}
if ($svc eq "PAP" && $disp1[$i] eq "pap2") { $cl="navgs";}
if ($svc eq "HML" && $disp1[$i] eq "hml2") { $cl="navgs";}
if ($svc eq "ARP" && $disp1[$i] eq "arp2") { $cl="navgs";}
# if ($svc eq "SFR" && $disp1[$i] eq "sfr2") { $cl="navgs";}
#console($disp1[$i],$name,$cl);
# console($svc,$disp1[0],$cl);
print "<td><a href='https://www.citydataservices.net/$cgi/programs.pl?fyr=$fyr&svc=$ci'><button class='$cl'>$name</button></a></td>";
}
print "</tr></table>\n";
}
}Displaying Programs
The page displays available programs for the user. If logged in as an admin users will be able to see all programs available in that fiscal year. When logged in as an agency users will only be able to see what programs have been assigned to their account.
These are typically displayed by a subroutine titled ‘dispprograms’ or ‘dispprogs’.
Here you can find subsections that are typically split by either funding source, carry-over, or applications.
Per row you can see each program, their upcoming reports, report’s status, and various other information depending on jurisdiction.
- Code Snippet
sub dispprograms() {
@out=();
$stat="";
if ($pwdty =~/^X/) {$stat="App Summary";}
#print "<table width=600 border=1 bordercolor=red><tr><td align=center>As of October 2011 HUD has not released funds to cities therefore; reports are not due at this time. You will receive notification when funding is allocated and reports are due. Respectfully, City Staff</td></tr></table>\n";
$wd=1300;
if ($svc eq "HML") {$wd=1400;}
print "<table width='$wd' border='0' align='left' cellpadding='0' cellspacing='0'>\n";
print "<tr><td colspan=7><font class=a10><i>To view your reports, click on the link in the \"Activity Report\" column.</i></font></td></tr>\n";
if ($svc eq "HML") {print "<tr><td width=300><font class=a12b>Agency</font></td><td width=270 align=left><font class=a12b>Program</font></td><td width=100 align=center><b>Funding<br>Source</b></td><td width=80 align=center><b>Expense<br>Reports</b></td><td width=100 align=center valign=top><font class=a10b>Activity<br>Reports</font></td><td width=100 align=center valign=top><font class=a10b>Remaining<br>Balance</font></td><td width=150 align=center valign=top><b>Application</b></td><td width=100 align=center valign=top><b>Contract #</b></td><td width=100 align=center><font class=a10b>Last Agency Update</font></td><td width=100 align=center><font class=a10b>Last Staff Update</font></td></tr>\n";}
else {print "<tr><td width=300><font class=a12b>Agency</font></td><td width=270 align=left><font class=a12b>Program</font></td><td width=80 align=center><b>Expense<br>Reports</b></td><td width=100 align=center valign=top><font class=a10b>Activity<br>Reports</font></td><td width=100 align=center valign=top><font class=a10b>Remaining<br>Balance</font></td><td width=150 align=center valign=top><b>Application</b></td><td width=100 align=center valign=top><b>Contract #</b></td><td width=100 align=center><font class=a10b>Last Agency Update</font></td><td width=100 align=center><font class=a10b>Last Staff Update</font></td></tr>\n";}
# $stnm = $field{'stnm'};
# $stnm =~ /\=/;
# $stnm = $';
if ($stnm eq "") {$stnm="All";}
if ($fund eq "") {$fund=0;}
#print "$stnm*<br>";
while( @dat1 = $ex1->fetchrow()) {
@m=split(/\|/,$dat1[1]);
#print "$m[247], $m[248], $m[248]<br>";
$pc=$m[1];
$rpz=$m[65];
$ok="Y";
# if ($svc eq "HOP" && $hopsvc ne $m[3]) {}
if (($dat1[2] eq $svc || $pwdty eq "C" || $pwdty eq "D") && ($m[94] eq $stnm || $stnm eq "All") && ($m[7] eq $funl[$fund] || $fund == 0) && ($sch eq "" || $m[0]=~/$sch/i || $m[2]=~/$sch/i)) {
$project=$m[2];
$disp=0;
if ($pwdty=~/^X/) {
$pgty="PSVContract";
if ($svc eq "HOM") {$pgty="HOMContract";}
if (@pgx>0) {
for ($j=0;$j<@pgx;$j++) {
if ($pc eq $pgx[$j]) {
$disp=1;
last;}
}
}
else {$disp=1;}
}
if ($pwdty eq "C" || $pwdty eq "D") {
$pgty="PSVAdmin";
if ($svc eq "HOM") {$pgty="HOMAdmin";}
for ($j=0;$j<@pgx;$j++) {
if ($pc eq $pgx[$j]) {
$disp=1;
last;}
}
}
#print "$pc,$svc,$pgty,$disp<br>";
# console($disp);
if ($disp == 1) {
$apstat="";
$f=substr($fyr,2)+1;
# if ($m[29] ne "AP") {
#A=CDBG PF App - New or exist - PSV & s[48]!=City
#BA=HOME Application - New or exist - svc=HOM
#CA=Jurisdictional App - New or exist - s[48]==City
#WA=HOPWA App - New or exist - svc=HOP
#DA=Housing Counseling App - New Only - Must be created
@apps=("","app20$f","bapp20$f","capp20$f","hopwaapp20$f","hcapp20$f","hpapp20$f","bapp","arpaapp20$f","fapp20$f","hpapp2021","fapp2024");
@rptsi=("","A$f","BA$f","CA$f","WA$f","DA$f","PA$f","BA","RA$f","FA$f","HDA","FA24");
@enddx=("","20240123","20240532","20240532","20211214","20230415","20220327","","20220411","20220928","99999999","99999999");
for ($ap=1;$ap<@apps;$ap++) {
$execute = $DB->query($qryrdrp);
$qry = "SELECT rptnum, rpttext FROM reports WHERE program='$pc' AND rptty='$rptsi[$ap]';";
$ex2 = $DB->query($qry);
$ex = $DB->query($qryun);
@i1 = $ex2->fetchrow();
@s=split(/\|/,$i1[1]);
#print "$ap,$rptsi[$ap],$dx,$enddx[$ap],$svc,$pc,$i1[0],$qry<br>";
if ($i1[0] eq "") {
$fd=0;
if ($pwdty =~/^X/) {$apstat="Not Started";}
elsif ($ap==1 && $dx > 20231201 && $dx < $enddx[$ap] && $svc eq "PSV" && $s[48] ne "City") {$fd=1;}
elsif ($ap==2 && $dx > 20210206 && $dx < $enddx[$ap] && $svc eq "HOM") {$fd=2;}
elsif ($ap==3 && $dx > 20240101 && $dx < $enddx[$ap] && $svc eq "PSV" && $m[0] =~ /City/) {$fd=3;}
elsif ($ap==4 && $dx > 20211114 && $dx < $enddx[$ap] && $svc eq "HOP") {$fd=4;}
elsif ($ap==5 && $dx > 20230304 && $dx < $enddx[$ap] && $svc eq "PSV") {$fd=5;}
# elsif ($ap==6 && $dx > 20210206 && $dx < $enddx[$ap] && $svc eq "HOM") {$fd=6;}
elsif ($ap==8 && $dx > 20211024 && $dx < $enddx[$ap] && $svc eq "ARP") {$fd=8;}
elsif ($ap==9 && $dx > 20220831 && $dx < $enddx[$ap] && $svc eq "PSV") {$fd=9;}
elsif ($ap==10 && $dx > 20220000 && $dx < $enddx[$ap] && $svc eq "HOM" && $m[10]=~/HDA/) {$fd=10;}
elsif ($ap==11 && $dx > 20220831 && $dx < $enddx[$ap] && $svc eq "PSV") {$fd=11;}
if ($fd>0 && $fyr == $cyr) {
$apstat="<a href='https://www.citydataservices.net/$cgi/$apps[$ap].pl?rpt=New&prop=$m[1]'>Apply for FY20$f</a>";
last;}
}
elsif ($i1[0] =~/^D/) {
if ($pwdty =~/^X/) {$apstat="<a href='https://www.citydataservices.net/$cgi/preports.pl?prop=$pc&rptname=PSVReports'>Draft</a>";}
elsif ($rptsi[$ap] eq "BA") {$apstat="<a href='https://www.citydataservices.net/$cgi/$apps[$ap].pl?rpt=$i1[0]'>FY20$f App</a>";}
elsif ($rptsi[$ap] eq "HDA") {$apstat="<a href='https://www.citydataservices.net/$cgi/$apps[$ap].pl?rpt=$i1[0]'>Application</a>";}
else {$apstat="<a href='https://www.citydataservices.net/$cgi/$apps[$ap].pl?rpt=$i1[0]'>FY20$f App</a>";}
last;
}
elsif ($i1[0] =~/^C/) {
if ($pwdty =~/^X/) {$apstat="<a href='https://www.citydataservices.net/$cgi/preports.pl?prop=$pc&rptname=PSVReports'><font color=blue>$ccxx</font></a>";}
else {$apstat="<a href='https://www.citydataservices.net/$cgi/$apps[$ap]"."arc.pl?rpt=$i1[0]'>Submitted</a>";}
last;
}
elsif ($i1[0] =~/^A/) {
if ($pwdty =~/^X/) {
$tx=790;
if ($s[$tx] eq "R" || $s[$tx] eq "" ) {$apstat="In Review";}
elsif ($s[$tx] eq "I") {$apstat="Not Eligible";}
elsif ($s[$tx] eq "X") {$apstat="Not Funded";}
elsif ($s[$tx] eq "S") {$apstat="Approved";}
if ($s[$tx+1] eq "on") {$apstat="Apprvd for Fund";}
if ($s[$tx+3] eq "on") {$apstat="Sub Budget Adj";}
if ($s[$tx+4] eq "on") {$apstat="Contract Signed";}
#print "$s[1] - $s[$tx+1] $apstat<br>";
$apstat="<a href='https://www.citydataservices.net/$cgi/preports.pl?prop=$pc&rptname=PSVReports'>$apstat</a>";}
else {$apstat="<a href='https://www.citydataservices.net/$cgi/$apps[$ap]"."arc.pl?rpt=$i1[0]'>Submitted App</a>";}
last;
}
}
$agency="<a href='https://www.citydataservices.net/$cgi/progadmin.pl?prop=$pc&rptname=$pgty'>$m[0]</a>";
$lcv=$m[9];
&rptsub;
&expsub;
if ($rpt eq "") {$rpt="None";}
$lpme=$m[11];
$ldata=$m[12];
#print "$m[0]-$m[90] ; $pc $rembal<br>";
if($m[90] eq "Y" && $rembal eq ""){
#print "$m[0]-$m[90] ; $pc<br>";
# $execute2 = $DB->query($qryrdrp);
# $qry = "SELECT rpttext FROM reports WHERE program='$pc' AND rptty='CS' ORDER BY DESC;";
# $ex3 = $DB->query($qry);
# $ex = $DB->query($qryun);
# $pcs = $ex3->fetchrow();
# @g=split(/\|/,$pcs);
# $rembal=$g[639];
}
$con="contracts/$m[2].doc";
$cont="No";
if ($m[99] eq "Completed") {$rpt="Completed";}
if ($m[99] eq "Cancelled") {$rpt="Cancelled";}
&getbal;
#A=CDBG PF App - ap=1
#BA=HOME Application - 2
#CA=Jurisdictional App - 3
#WA=HOPWA App - 4
#DA=Housing Counseling App - X/5
# print "$m[1],$m[29],$svc,$apstat,$fd,$ap<br>";
#m[59]=Acct #
if ($s[1] eq "HDA" && $svc eq "HOM" && $m[29] eq "AP") {
$out8[$x8]="$m[0]$project|$agency|$project||$apstat|$lpme|$ldata|||\n";
$x8++;}
elsif ($m[29] eq "AP" && $svc eq "HOM") {
$out6[$x6]="$m[0]$project|$agency|$project||$apstat|$lpme|$ldata|||\n";
$x6++;}
elsif ($m[29] eq "AP" && $svc eq "ARP") {
$out19[$x19]="$m[0]$project|$agency|$project||$apstat|$lpme|$ldata|||\n";
$x19++;}
elsif ($m[29] eq "AP" && $svc eq "HOP" && $s[57] eq "CV") {
$out17[$x17]="$m[0]$project|$agency|$project||$apstat|$lpme|$ldata|||\n";
$x17++;}
elsif ($m[2]=~/Allocation/i && $m[7]=~/HOME/) {
$out21[$x21]="$m[0]$project|$agency|$project|$rpt|$apstat|$lpme|$ldata|$rembal|$rfr|$m[59]|\n";
$x21++;}
elsif (&num($rembal)<1 && $m[7]=~/HOME/) {
$out18[$x18]="$m[0]$project|$agency|$project|$rpt|$apstat|$lpme|$ldata|$rembal|$rfr|$m[59]|\n";
$x18++;}
elsif ($m[130] eq "Y" && $svc eq "PSV") {
$out16[$x16]="$m[0]$project|$agency|$project|$rpt|$apstat|$lpme|$ldata|$rembal|$rfr|$m[59]|\n";
$x16++;}
}
}
}
@out=sort(@out);
@out1=sort(@out1);
@out2=sort(@out2);
@out3=sort(@out3);
@out4=sort(@out4);
@out5=sort(@out5);
@out6=sort(@out6);
for ($i=0;$i<$x1;$i++) {
chomp($out[$i]);
@t=split(/\|/,$out[$i]);
if ($x == 1) {
$x=0;
$cl="class=gry";
$cl2="class=la9gy";}
else {
$x=1;
$cl="";
$cl2="class=la9";}
if ($svc eq "HML") {
print "<tr>
<td valign=top $cl width=300>$t[1]</td>
<td valign=top $cl width=270><input type=text $cl2 class=la9 size=40 value=\"$t[2]\" readonly style='border:none'></td>
<td align=center valign=top $cl>$t[10]</td>
<td align=center valign=top $cl>$t[8]</td>
<td align=center valign=top $cl>$t[3]</td>
<td align=center valign=top $cl>$t[7]</td>
<td align=center valign=top $cl>$t[4]</td>
<td align=center valign=top $cl>$t[9]</td>
<td align=center valign=top $cl>$t[5]</td>
<td align=center valign=top $cl>$t[6]</td>
</tr>\n";
}
else {
print "<tr>
<td valign=top $cl width=300>$t[1]</td>
<td valign=top $cl width=270><input type=text $cl2 class=la9 size=40 value=\"$t[2]\" readonly style='border:none'></td>
<td align=center valign=top $cl>$t[8]</td>
<td align=center valign=top $cl>$t[3]</td>
<td align=center valign=top $cl>$t[7]</td>
<td align=center valign=top $cl>$t[4]</td>
<td align=center valign=top $cl>$t[9]</td>
<td align=center valign=top $cl>$t[5]</td>
<td align=center valign=top $cl>$t[6]</td>
</tr>\n";
}
# console("*",$t[1],$t[2],$t[3],$t[4],$t[5],$t[6],$t[7],$t[8]);
}
if ($x25 > 0) {
print "<tr><td valign=bottom colspan=8 height=40><font class=a12b>ARPA Programs</font></td></tr>";
for ($i=0;$i<$x25;$i++) {
chomp($out25[$i]);
@t=split(/\|/,$out25[$i]);
if ($x == 1) {
$x=0;
$cl="class=gry";
$cl2="class=la9gy";}
else {
$x=1;
$cl="";
$cl2="class=la9";}
print "<tr><td valign=top $cl>$t[1]</td><td valign=top $cl><input type=text size=40 $cl2 class=la9 value=\"$t[2]\" readonly style='border:none'></td><td align=center valign=top $cl>$t[8]</td><td align=center valign=top $cl><font class=a10> $t[3]</font></td><td align=center valign=top $cl>$t[7]</td><td align=center valign=top $cl><font class=a10>$t[4]</font></td><td align=center valign=top $cl>$t[9]</td><td align=center valign=top $cl><font class=a10>$t[5]</font></td><td align=center valign=top $cl><font class=a10>$t[6]</font></td></tr>\n";
}
}
if ($x7 > 0) {
print "<tr><td valign=bottom colspan=8 height=40><font class=a12b>Carry-Over Programs</font></td></tr>";
for ($i=0;$i<$x7;$i++) {
chomp($out7[$i]);
@t=split(/\|/,$out7[$i]);
if ($x == 1) {
$x=0;
$cl="class=gry";
$cl2="class=la9gy";}
else {
$x=1;
$cl="";
$cl2="class=la9";}
if ($svc eq "HML") {print "<tr><td valign=top $cl>$t[1]</td><td valign=top $cl><input type=text size=40 $cl2 class=la9 value=\"$t[2]\" readonly style='border:none'></td><td align=center valign=top $cl>$t[10]</td><td align=center valign=top $cl>$t[8]</td><td align=center valign=top $cl> $t[3]</td><td align=center valign=top $cl>$t[7]</td><td align=center valign=top $cl>$t[4]</td><td align=center valign=top $cl>$t[9]</td><td align=center valign=top $cl>$t[5]</td><td align=center valign=top $cl><font class=a10>$t[6]</font></td><td align=center valign=top $cl></tr>\n";}
else {print "<tr><td valign=top $cl>$t[1]</td><td valign=top $cl><input type=text size=40 $cl2 class=la9 value=\"$t[2]\" readonly style='border:none'></td><td align=center valign=top $cl>$t[8]</td><td align=center valign=top $cl> $t[3]</td><td align=center valign=top $cl>$t[7]</td><td align=center valign=top $cl>$t[4]</td><td align=center valign=top $cl>$t[9]</td><td align=center valign=top $cl>$t[5]</td><td align=center valign=top $cl><font class=a10>$t[6]</font></td><td align=center valign=top $cl></tr>\n";}
}
}
}Utilities & Spreadsheets
At the top of the page there is a section of links. These links have multiple purposes depending on what the client has requested. Typically these are mostly spreadsheets and password administration, but there can be other items like viewing insurance due dates.
- Code Snippet
print "<tr><td>";
if ($pwdty=~/X\d/) {print "<a href='https://www.citydataservices.net/$cgi/pswrds.pl'>Password Administration</a>";}
print "</td><td width=200></td></tr>";
if ($pwdty=~/^X/) {
print "<tr><td width=200><a href='https://www.citydataservices.net/$cgi/downloadcdbgss.pl'>Program Data</a></td><td width=200><a href='https://www.citydataservices.net/$cgi/richss.pl'>Application SS</a></td></tr>";
print "<tr><td><a href='https://www.citydataservices.net/$cgi/cdbgss.pl'>PS Program Data</a></td><td width=200><a href='https://www.citydataservices.net/$cgi/reportrpt.pl' target='_blank'>Report Status</a></td></tr>";
print "<tr><td width=200><a href='https://www.citydataservices.net/$cgi/dashboard/dashboard2.php?svc=PSV'>Public Service Dashboard</a></td><td width=200><a href='https://www.citydataservices.net/$cgi/emailall.pl'>Email All Agencies</a></td></tr>\n";
print "<tr><td><a href='https://www.citydataservices.net/$cgi/idis.pl'>Submit to IDIS</a></td><td width=200><a href='https://www.citydataservices.net/$cgi/insurancepsv.pl'>View Insurance Due Dates</a></td></tr>\n";
print "<tr><td><a href='https://www.citydataservices.net/$cgi/caper.pl'>CAPER Data</a></td><td width=200><a href='https://www.citydataservices.net/$cgi/commapps.pl'>View All Current Applications</a></td></tr>\n";
Comments
0 comments
Please sign in to leave a comment.