Subversion Repositories VORC

Rev

Rev 50 | Rev 58 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 50 Rev 57
Line 107... Line 107...
107
	return $optionList;
107
	return $optionList;
108
}
108
}
Line 109... Line 109...
109
 
109
 
110
sub fetchDerbyNameWithRCid {
110
sub fetchDerbyNameWithRCid {
-
 
111
  my $DEPT = shift // "";
111
  my $DEPT = shift // "";
112
  my $selected = shift // "";
Line 112... Line 113...
112
	my $optionList = "";
113
	my $optionList = "";
113
	
114
	
114
	my $cathan;
115
	my $cathan;
115
	if (!$DEPT or $DEPT eq "CMP") {
116
	if (!$DEPT or $DEPT eq "CMP") {
-
 
117
	  $cathan = $internalDBH->prepare("select RCid, derby_name from official where level > 0 order by derby_name");
-
 
118
  	$cathan->execute();
-
 
119
  } elsif ($DEPT eq "CLA") {
116
	  $cathan = $internalDBH->prepare("select RCid, derby_name from official where level > 0 order by derby_name");
120
    $cathan = $internalDBH->prepare("select RCid, derby_name from official where level > 0 and mvp_pass = true and last_login > CURRENT_DATE - INTERVAL 365 DAY order by derby_name");
117
  	$cathan->execute();
121
    $cathan->execute;
118
	} else {
122
	} else {
119
    $cathan = $internalDBH->prepare("select RCid, derby_name from official where level > 0 and (department like ? and department not like ?) and last_login > CURRENT_DATE - INTERVAL 365 DAY order by derby_name");
123
    $cathan = $internalDBH->prepare("select RCid, derby_name from official where level > 0 and (department like ? and department not like ?) and last_login > CURRENT_DATE - INTERVAL 365 DAY order by derby_name");
Line 120... Line 124...
120
    $cathan->execute("%".$DEPT."%", "%".$DEPT."-0%");
124
    $cathan->execute("%".$DEPT."%", "%".$DEPT."-0%");
-
 
125
	}
-
 
126
 
-
 
127
	while (my ($id, $cat) = $cathan->fetchrow) {
121
	}
128
	  if ($id == $selected) {
-
 
129
	    $optionList .= "<OPTION value=$id selected>$cat</OPTION>";
122
 
130
	  } else {
Line 123... Line 131...
123
	while (my ($id, $cat) = $cathan->fetchrow) {
131
	    $optionList .= "<OPTION value=$id>$cat</OPTION>";
124
		$optionList .= "<OPTION value=$id>$cat</OPTION>";
132
	  }