Subversion Repositories VORC

Rev

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

Rev 99 Rev 112
Line 34... Line 34...
34
print start_html (-title => "vORC Make Shift Change", -style => {'src' => "/style.css"}), $h->open ("body");
34
print start_html (-title => "vORC Make Shift Change", -style => {'src' => "/style.css"}), $h->open ("body");
Line 35... Line 35...
35
 
35
 
Line 36... Line 36...
36
my $WARNING = getUser ($RCid) ? "" : $h->p ({ class => "error" }, "User [$RCid] Not Found!");
36
my $WARNING = getUser ($RCid) ? "" : $h->p ({ class => "error" }, "User [$RCid] Not Found!");
-
 
37
 
37
 
38
if ($change eq "lookup" or $WARNING) {
38
if ($change eq "lookup" or $WARNING) {
39
	if (($department eq "CLA" and convertDepartments($user->{department})->{MVP} < 2 and $LVL < 5) and (convertDepartments($user->{department})->{$department} < 2 and $LVL < 5 and convertDepartments($user->{department})->{VCI} < 2)) {
39
	if (convertDepartments($user->{department})->{$department} < 2 and $LVL < 5 and convertDepartments($user->{department})->{VCI} < 2) {
40
#	if (convertDepartments($user->{department})->{$department} < 2 and $LVL < 5 and convertDepartments($user->{department})->{VCI} < 2) {
40
    print $h->div ({ class=>"error" }, "You're not allowed to change other people's schedules.");
41
    print $h->div ({ class=>"error" }, "You're not allowed to change other people's schedules.");
41
    print $h->close ("body"), $h->close ("html");
42
    print $h->close ("body"), $h->close ("html");
Line 42... Line 43...
42
	  exit;
43
	  exit;
43
	}
44
	}
44
	
45
	
45
	my $options = fetchDerbyNameWithRCid ({ DATALIST=>1 }, $department);
46
	my $options = fetchDerbyNameWithRCid ({ DATALIST=>1 }, $department);
46
  
47
    
47
  print $WARNING, $h->form ({ action=>url }, [
48
  print $WARNING, $h->form ({ action=>url }, [
48
    $h->input ({ type=>"hidden", name=>"change", value=>"add" }),
49
    $h->input ({ type=>"hidden", name=>"change", value=>"add" }),
Line 101... Line 102...
101
  
102
  
102
	my $change_err = changeShift($change, $id, $role, $RCid);
103
	my $change_err = changeShift($change, $id, $role, $RCid);
103
	my $closer;
104
	my $closer;
104
	if ($change_err) {
105
	if ($change_err) {
105
	  print $change_err;
106
	  print $change_err;
106
	  if ($change_err =~ /conflict/ and (convertDepartments($user->{department})->{VCI} > 2 or $LVL > 4)) {
107
	  if ($change_err =~ /conflict/ and (convertDepartments($user->{department})->{VCI} > 2 or $LVL > 4 or convertDepartments($user->{department})->{OFF} > 1 or convertDepartments($user->{department})->{MVP} > 2)) {
107
		  print $h->form ({ action=>url }, [
108
		  print $h->form ({ action=>url }, [
108
		    $h->input ({ type=>"hidden", name=>"change", value=>"override" }),
109
		    $h->input ({ type=>"hidden", name=>"change", value=>"override" }),
109
    		$h->input ({ type=>"hidden", name=>"id", value=>$id }),
110
    		$h->input ({ type=>"hidden", name=>"id", value=>$id }),
110
    		$h->input ({ type=>"hidden", name=>"role", value=>$role }),
111
    		$h->input ({ type=>"hidden", name=>"role", value=>$role }),
Line 133... Line 134...
133
			reloadParent();
134
			reloadParent();
134
	//-->
135
	//-->
135
	</SCRIPT>
136
	</SCRIPT>
136
tail
137
tail
137
  print $h->close ("body"), $h->close ("html");
138
  print $h->close ("body"), $h->close ("html");
138
}
-
 
139
139
}
-
 
140