-
Notifications
You must be signed in to change notification settings - Fork 0
/
edit_offer_sheet.php
757 lines (712 loc) · 40.8 KB
/
edit_offer_sheet.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
<?php include('Connections/settings.php'); ?>
<?php include("includes/sessionInfo.php") ?>
<?php include("includes/functions.php") ?>
<?php include("includes/langfile.php") ?>
<?php include("includes/langs.php") ?>
<?php include("includes/langs_stats.php") ?>
<?php
switch ($lang){
case 'en':
$l_PlayerRatings = "Player Ratings";
$l_NoTradeDescription = "A no trade clause will help convince the player to sign with your team.";
$l_FrontLoadDescription = " EVEN = Salary will be the same each year of their contract.<br> FRONT-LOAD = Higher salary in first year and will gradually decrease until final year.";
$l_SalaryDistribution = "Salary Distribution";
$l_SalaryPerYear = "Salary Per Year";
$l_SendOffer = "Send Offer";
$l_Offer = "Offer Sheet";
$l_True = "True";
$l_False = "False";
$l_CONTRACTLENGTH = "Contract Length";
$Alert3 = "The owner of your team does not approve sending any more contract offers because you already have 10 active offers. If you want to send an offer to this player, you will have to remove another offer first.";
$Alert2_1 = "The owner of your team does not approve sending a contract greater than $";
$Alert2_2 = "per year because there is not enough league competition for his services. If more bids are placed then he will approve a higher offer.";
$Alert1_1 = "Please enter a salary greater than $";
$Alert1_2 = "per year.";
break;
case 'fr':
$l_PlayerRatings = "Stat de joueur";
$l_NoTradeDescription = "Une clause de non-échange va aider a convaincre le joueur de signer avec votre équipe.";
$l_FrontLoadDescription = " EVEN = Salaire va être égale a chaque année du contrat<br> FRONT-LOAD = Salaire et plus haut la première année et va diminuer graduellement jusqu'à la dernière année du contrat";
$l_SalaryDistribution = "Distribution de salaire";
$l_SalaryPerYear = "Salaire par an";
$l_SendOffer = "Envoyez l'offre";
$l_Offer = "Offre";
$l_True = "Vrai";
$l_False = "Faux";
$l_CONTRACTLENGTH = "Longueur de contrat";
$Alert3 = "Le propriétaire de votre équipe n'approuve pas envoyer plus d'offres de contrat parce que vous avez déjà 10 offres actives. Si vous voulez envoyer une offre à ce joueur, vous devrez enlever une autre offre d'abord.";
$Alert2_1 = "Le propriétaire de votre équipe n'approuve pas envoyer un contrat plus grand que ";
$Alert2_2 = "$ par an parce qu'il n'y a pas assez de concurrence de ligue pour ses services. Si plus d'offres sont placées alors il approuvera un plus haut offrent.";
$Alert1_1 = "Veuillez écrire un salaire plus grand que ";
$Alert1_2 = "$ année.";
break;
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_edit"])) && ($_POST["MM_edit"] == "form")) {
$tmpNoTradeSalary = 0;
if($_POST['notrade'] == 1){$tmpNoTradeSalary = $_POST['newsal'];}
$insertSQL = sprintf("UPDATE playerscontractoffers set Contract=%s,Salary1=%s,Salary2=%s,Salary3=%s,Salary4=%s,Salary5=%s,Salary6=%s,Salary7=%s,Salary8=%s,Salary9=%s,Salary10=%s, NoTrade=%s, NoTradeSalary=%s WHERE PR_ID=%s",
GetSQLValueString($_POST['yearsoff'], "double"),
GetSQLValueString($_POST['YearSalary1'], "int"),
GetSQLValueString($_POST['YearSalary2'], "int"),
GetSQLValueString($_POST['YearSalary3'], "int"),
GetSQLValueString($_POST['YearSalary4'], "int"),
GetSQLValueString($_POST['YearSalary5'], "int"),
GetSQLValueString($_POST['YearSalary6'], "int"),
GetSQLValueString($_POST['YearSalary7'], "int"),
GetSQLValueString($_POST['YearSalary8'], "int"),
GetSQLValueString($_POST['YearSalary9'], "int"),
GetSQLValueString($_POST['YearSalary10'], "int"),
GetSQLValueString($_POST['notrade'], "text"),
GetSQLValueString($tmpNoTradeSalary, "int"),
GetSQLValueString($_POST['id'], "int"));
$Result1 = mysql_query($insertSQL, $connection) or die(mysql_error());
$insertSQL = sprintf("INSERT INTO participation (DateCreated,Team,Season_ID,Type) values (%s,%s,%s,%s)",
GetSQLValueString(strftime('%Y-%m-%d', strtotime('now')), "date"),
GetSQLValueString($_SESSION['U_Team'], "text"),
GetSQLValueString($_SESSION['current_SeasonID'], "int"),
GetSQLValueString("Transactions", "text"));
$Result1 = mysql_query($insertSQL, $connection) or die(mysql_error());
$updateGoTo = $_POST['location'];
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
$PID_GetPlayer = "1";
if (isset($_GET['player'])) {
$PID_GetPlayer = (get_magic_quotes_gpc()) ? $_GET['player'] : addslashes($_GET['player']);
}
$GetType = "Player";
if (isset($_GET['type'])) {
$GetType = (get_magic_quotes_gpc()) ? $_GET['type'] : addslashes($_GET['type']);
}
$GetTarget = "1";
if (isset($_GET['target'])) {
$GetTarget = (get_magic_quotes_gpc()) ? $_GET['target'] : addslashes($_GET['target']);
}
if($GetTarget == 1){
$tmpLocation = "ufa-free-agents_w_offer.php";
} else if($GetTarget == 2){
$tmpLocation = "ufa-free-agents_decide.php";
}
$Contract_ID = "0";
if (isset($_GET['id'])) {
$Contract_ID = (get_magic_quotes_gpc()) ? $_GET['id'] : addslashes($_GET['id']);
}
$Contract_Step = "0";
if (isset($_GET['contract'])) {
$Contract_Step = (get_magic_quotes_gpc()) ? $_GET['contract'] : addslashes($_GET['contract']);
}
if ($GetType == 'Goalie'){
$query_GetPlayer = sprintf("SELECT * FROM goalies WHERE goalies.Number=%s", $PID_GetPlayer);
}else{
$query_GetPlayer = sprintf("SELECT * FROM players WHERE players.Number=%s", $PID_GetPlayer);
}
$GetPlayer = mysql_query($query_GetPlayer, $connection) or die(mysql_error());
$row_GetPlayer = mysql_fetch_assoc($GetPlayer);
$totalRows_GetPlayer = mysql_num_rows($GetPlayer);
$MinimumPlayerSalary=10000;
$PID_GetPlayer=addslashes($row_GetPlayer['Name']);
$GetContract = mysql_query("SELECT * FROM playerscontractoffers WHERE PR_ID=".$Contract_ID, $connection) or die(mysql_error());
$row_GetContract = mysql_fetch_assoc($GetContract);
$query_GetWebInfo = sprintf("SELECT MaxContract, ContractVary, MinimumPlayerSalary, MaximumPlayerSalary FROM config");
$GetWebInfo = mysql_query($query_GetWebInfo, $connection) or die(mysql_error());
$row_GetWebInfo = mysql_fetch_assoc($GetWebInfo);
$MinimumPlayerSalary=$row_GetWebInfo['MinimumPlayerSalary'];
mysql_free_result($GetWebInfo);
$query_GetPlayerOffers = sprintf("SELECT 1 FROM playerscontractoffers AS O WHERE O.Player='%s' AND O.Type='Offer Sheet'", $PID_GetPlayer);
$GetPlayerOffers = mysql_query($query_GetPlayerOffers, $connection) or die(mysql_error());
$row_GetPlayerOffers = mysql_fetch_assoc($GetPlayerOffers);
$totalRows_GetPlayerOffers = mysql_num_rows($GetPlayerOffers);
$query_GetCurrentOffers = sprintf("SELECT 1 FROM playerscontractoffers AS O WHERE O.Team='%s' AND (O.Type='Offer Sheet' OR O.Type='Offer Sheet' OR O.Type='Offer Sheet Final')", $_SESSION['U_ID']);
$GetCurrentOffers = mysql_query($query_GetCurrentOffers, $connection) or die(mysql_error());
$row_GetCurrentOffers = mysql_fetch_assoc($GetCurrentOffers);
$totalRows_GetCurrentOffers = mysql_num_rows($GetCurrentOffers);
if ($totalRows_GetPlayerOffers == 0 ){
if ($row_GetPlayer['Overall'] > 70){
$MaximumPlayerSalary=2000000;
} else {
$MaximumPlayerSalary=1000000;
}
} else if ($totalRows_GetPlayerOffers == 1 ){
if ($row_GetPlayer['Overall'] > 70){
$MaximumPlayerSalary=3000000;
} else {
$MaximumPlayerSalary=1500000;
}
} else if ($totalRows_GetPlayerOffers == 2 ){
if ($row_GetPlayer['Overall'] > 70){
$MaximumPlayerSalary=4000000;
} else {
$MaximumPlayerSalary=2000000;
}
} else if ($totalRows_GetPlayerOffers == 3 ){
if ($row_GetPlayer['Overall'] > 70){
$MaximumPlayerSalary=5000000;
} else {
$MaximumPlayerSalary=2500000;
}
} else {
$MaximumPlayerSalary=$row_GetWebInfo['MaximumPlayerSalary'];
}
if ($Contract_Step == "final" && $row_GetContract['Salary'] > $row_GetWebInfo['MinimumPlayerSalary']){
$MinimumPlayerSalary=$row_GetContract['Salary'];
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>UFA <?php echo $l_Offer;?> - <?php echo $_SESSION['SiteName'] ; ?></title>
<link rel="shortcut icon" type="image/png" href="<?php echo $_SESSION['DomainName']; ?>/image/<?php echo $_SESSION['FavIcon'];?>" />
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/reset.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/html5.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/menu.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/jquery.accessible-news-slider.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/jquery-ui-1.8.custom.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/header.css" />
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/tipsy.css">
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/bubbletip.css" />
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/jcarousellite_1.0.1c4.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/formly.min.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/jquery.pop.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/jquery.tipsy.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/ui.core.js"></script>
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/jquery-ui-1.8.custom.min.js"></script>
<?php if(isset($_SESSION['username'])){ ?>
<link rel="stylesheet" type="text/css" href="<?php echo $_SESSION['DomainName']; ?>/css/chat.css" />
<script type="text/javascript" src="<?php echo $_SESSION['DomainName']; ?>/js/chat.js"></script>
<?php } ?>
<!--[if lte IE 9]>
<script src="<?php echo $_SESSION['DomainName']; ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<script type="text/javascript">
$(function(){
$('#cssdropdown li.headlink').hover(
function() { $('ul', this).css('display', 'block'); },
function() { $('ul', this).css('display', 'none'); });
});;
</script>
<SCRIPT language=JavaScript>
function FrontEnd() {
var obj1 = document.getElementById("Year1");
var obj2 = document.getElementById("Year2");
var obj3 = document.getElementById("Year3");
var obj4 = document.getElementById("Year4");
var obj5 = document.getElementById("Year5");
var obj6 = document.getElementById("Year6");
var obj7 = document.getElementById("Year7");
var obj8 = document.getElementById("Year8");
var obj9 = document.getElementById("Year9");
var obj10 = document.getElementById("Year10");
document.form.YearSalary1.value=0;
document.form.YearSalary2.value=0;
document.form.YearSalary3.value=0;
document.form.YearSalary4.value=0;
document.form.YearSalary5.value=0;
document.form.YearSalary6.value=0;
document.form.YearSalary7.value=0;
document.form.YearSalary8.value=0;
document.form.YearSalary9.value=0;
document.form.YearSalary10.value=0;
obj1.innerHTML = "$0";
obj2.innerHTML = "$0";
obj3.innerHTML = "$0";
obj4.innerHTML = "$0";
obj5.innerHTML = "$0";
obj6.innerHTML = "$0";
obj7.innerHTML = "$0";
obj8.innerHTML = "$0";
obj9.innerHTML = "$0";
obj10.innerHTML = "$0";
if (document.form.distribute.value == 1) {
$tmpMod = (document.form.yearsoff.value / 2);
$tmp1=0;
$tmp2=0;
$tmp3=0;
$tmp4=0;
$tmp5=0;
$tmp6=0;
$tmp7=0;
$tmp8=0;
$tmp9=0;
$tmp10=0;
if(document.form.yearsoff.value==1){
$tmp1=Math.round(document.form.newsal.value);
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
} else if(document.form.yearsoff.value==2){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp2 < <?php echo $MinimumPlayerSalary; ?>) { $tmp2 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
} else if(document.form.yearsoff.value==3){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value);
$tmp3=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp3 < <?php echo $MinimumPlayerSalary; ?>) { $tmp3 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
} else if(document.form.yearsoff.value==4){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.05)));
$tmp3=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.05)));
$tmp4=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp3 < <?php echo $MinimumPlayerSalary; ?>) { $tmp3 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp4 < <?php echo $MinimumPlayerSalary; ?>) { $tmp4 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
obj4.innerHTML = "$" + formatCurrency($tmp4);
document.form.YearSalary4.value=$tmp4;
} else if(document.form.yearsoff.value==5){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.05)));
$tmp3=Math.round(document.form.newsal.value);
$tmp4=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.05)));
$tmp5=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp4 < <?php echo $MinimumPlayerSalary; ?>) { $tmp4 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp5 < <?php echo $MinimumPlayerSalary; ?>) { $tmp5 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
obj4.innerHTML = "$" + formatCurrency($tmp4);
document.form.YearSalary4.value=$tmp4;
obj5.innerHTML = "$" + formatCurrency($tmp5);
document.form.YearSalary5.value=$tmp5;
} else if(document.form.yearsoff.value==6){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.05)));
$tmp3=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.025)));
$tmp4=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.025)));
$tmp5=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.05)));
$tmp6=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp4 < <?php echo $MinimumPlayerSalary; ?>) { $tmp4 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp5 < <?php echo $MinimumPlayerSalary; ?>) { $tmp5 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp6 < <?php echo $MinimumPlayerSalary; ?>) { $tmp6 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
obj4.innerHTML = "$" + formatCurrency($tmp4);
document.form.YearSalary4.value=$tmp4;
obj5.innerHTML = "$" + formatCurrency($tmp5);
document.form.YearSalary5.value=$tmp5;
obj6.innerHTML = "$" + formatCurrency($tmp6);
document.form.YearSalary6.value=$tmp6;
} else if(document.form.yearsoff.value==7){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.05)));
$tmp3=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.025)));
$tmp4=Math.round(document.form.newsal.value);
$tmp5=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.025)));
$tmp6=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.05)));
$tmp7=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp5 < <?php echo $MinimumPlayerSalary; ?>) { $tmp5 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp6 < <?php echo $MinimumPlayerSalary; ?>) { $tmp6 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp7 < <?php echo $MinimumPlayerSalary; ?>) { $tmp7 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
obj4.innerHTML = "$" + formatCurrency($tmp4);
document.form.YearSalary4.value=$tmp4;
obj5.innerHTML = "$" + formatCurrency($tmp5);
document.form.YearSalary5.value=$tmp5;
obj6.innerHTML = "$" + formatCurrency($tmp6);
document.form.YearSalary6.value=$tmp6;
obj7.innerHTML = "$" + formatCurrency($tmp7);
document.form.YearSalary7.value=$tmp7;
} else if(document.form.yearsoff.value==8){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.05)));
$tmp3=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.025)));
$tmp4=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.015)));
$tmp5=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.015)));
$tmp6=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.025)));
$tmp7=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.05)));
$tmp8=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp4 < <?php echo $MinimumPlayerSalary; ?>) { $tmp4 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp5 < <?php echo $MinimumPlayerSalary; ?>) { $tmp5 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp6 < <?php echo $MinimumPlayerSalary; ?>) { $tmp6 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp7 < <?php echo $MinimumPlayerSalary; ?>) { $tmp7 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp8 < <?php echo $MinimumPlayerSalary; ?>) { $tmp8 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
obj4.innerHTML = "$" + formatCurrency($tmp4);
document.form.YearSalary4.value=$tmp4;
obj5.innerHTML = "$" + formatCurrency($tmp5);
document.form.YearSalary5.value=$tmp5;
obj6.innerHTML = "$" + formatCurrency($tmp6);
document.form.YearSalary6.value=$tmp6;
obj7.innerHTML = "$" + formatCurrency($tmp7);
document.form.YearSalary7.value=$tmp7;
obj8.innerHTML = "$" + formatCurrency($tmp8);
document.form.YearSalary8.value=$tmp8;
} else if(document.form.yearsoff.value==9){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.05)));
$tmp3=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.025)));
$tmp4=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.015)));
$tmp5=Math.round(document.form.newsal.value);
$tmp6=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.015)));
$tmp7=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.025)));
$tmp8=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.05)));
$tmp9=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp5 < <?php echo $MinimumPlayerSalary; ?>) { $tmp5 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp6 < <?php echo $MinimumPlayerSalary; ?>) { $tmp6 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp7 < <?php echo $MinimumPlayerSalary; ?>) { $tmp7 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp8 < <?php echo $MinimumPlayerSalary; ?>) { $tmp8 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp9 < <?php echo $MinimumPlayerSalary; ?>) { $tmp9 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
obj4.innerHTML = "$" + formatCurrency($tmp4);
document.form.YearSalary4.value=$tmp4;
obj5.innerHTML = "$" + formatCurrency($tmp5);
document.form.YearSalary5.value=$tmp5;
obj6.innerHTML = "$" + formatCurrency($tmp6);
document.form.YearSalary6.value=$tmp6;
obj7.innerHTML = "$" + formatCurrency($tmp7);
document.form.YearSalary7.value=$tmp7;
obj8.innerHTML = "$" + formatCurrency($tmp8);
document.form.YearSalary8.value=$tmp8;
obj9.innerHTML = "$" + formatCurrency($tmp9);
document.form.YearSalary9.value=$tmp9;
} else if(document.form.yearsoff.value==10){
$tmp1=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.1)));
$tmp2=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.05)));
$tmp3=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.025)));
$tmp4=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.015)));
$tmp5=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * 0.005)));
$tmp6=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.005)));
$tmp7=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.015)));
$tmp8=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.025)));
$tmp9=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.05)));
$tmp10=Math.round(document.form.newsal.value * ((1 + ($tmpMod) * -0.1)));
if ($tmp6 < <?php echo $MinimumPlayerSalary; ?>) { $tmp6 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp7 < <?php echo $MinimumPlayerSalary; ?>) { $tmp7 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp8 < <?php echo $MinimumPlayerSalary; ?>) { $tmp8 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp9 < <?php echo $MinimumPlayerSalary; ?>) { $tmp9 = <?php echo $MinimumPlayerSalary; ?>; }
if ($tmp10 < <?php echo $MinimumPlayerSalary; ?>) { $tmp10 = <?php echo $MinimumPlayerSalary; ?>; }
obj1.innerHTML = "$" + formatCurrency($tmp1);
document.form.YearSalary1.value=$tmp1;
obj2.innerHTML = "$" + formatCurrency($tmp2);
document.form.YearSalary2.value=$tmp2;
obj3.innerHTML = "$" + formatCurrency($tmp3);
document.form.YearSalary3.value=$tmp3;
obj4.innerHTML = "$" + formatCurrency($tmp4);
document.form.YearSalary4.value=$tmp4;
obj5.innerHTML = "$" + formatCurrency($tmp5);
document.form.YearSalary5.value=$tmp5;
obj6.innerHTML = "$" + formatCurrency($tmp6);
document.form.YearSalary6.value=$tmp6;
obj7.innerHTML = "$" + formatCurrency($tmp7);
document.form.YearSalary7.value=$tmp7;
obj8.innerHTML = "$" + formatCurrency($tmp8);
document.form.YearSalary8.value=$tmp8;
obj9.innerHTML = "$" + formatCurrency($tmp9);
document.form.YearSalary9.value=$tmp9;
obj10.innerHTML = "$" + formatCurrency($tmp10);
document.form.YearSalary10.value=$tmp10;
}
} else {
for (i=1;i<=document.form.yearsoff.value;i++)
{
if(i == 1){document.form.YearSalary1.value=document.form.newsal.value; obj1.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 2){document.form.YearSalary2.value=document.form.newsal.value; obj2.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 3){document.form.YearSalary3.value=document.form.newsal.value; obj3.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 4){document.form.YearSalary4.value=document.form.newsal.value; obj4.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 5){document.form.YearSalary5.value=document.form.newsal.value; obj5.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 6){document.form.YearSalary6.value=document.form.newsal.value; obj6.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 7){document.form.YearSalary7.value=document.form.newsal.value; obj7.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 8){document.form.YearSalary8.value=document.form.newsal.value; obj8.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 9){document.form.YearSalary9.value=document.form.newsal.value; obj9.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
if(i == 10){document.form.YearSalary10.value=document.form.newsal.value; obj10.innerHTML = "$" + formatCurrency(document.form.newsal.value);}
}
}
}
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + num );
}
function validateFields() {
if (document.form.newsal.value < <?php echo $MinimumPlayerSalary; ?>) {
alert("<?php echo $Alert1_1." ".number_format($MinimumPlayerSalary,0)." ".$Alert1_2; ?>");
return false;
}
<?php if ($totalRows_GetPlayerOffers < 4 ) { ?>
if (document.form.newsal.value > <?php echo $MaximumPlayerSalary; ?> && ov < 75) {
alert("<?php echo $Alert2_1." ".number_format($MaximumPlayerSalary,0)." ".$Alert2_2; ?>");
return false;
}
<?php } ?>
return true;
}
</script>
<style media="all" type="text/css">
#container {background-image:url(<?php echo $_SESSION['DomainName']; ?>/image/headers/<?php echo $_SESSION['current_HeaderImage']; ?>); background-color:#<?php echo $_SESSION['current_PrimaryColor'];?>;}
a {color:#<?php echo $_SESSION['current_PrimaryColor']; ?>;}
table.tablesorter thead tr th { background-color: #<?php echo $_SESSION['current_SecondaryColor']; ?>; color:#<?php echo $_SESSION['current_TextColor']; ?>;}
table.tablesorterRates thead tr th { background-color: #<?php echo $_SESSION['current_SecondaryColor']; ?>; color:#<?php echo $_SESSION['current_TextColor']; ?>;}
table.tablesorter thead tr th a{ color:#<?php echo $_SESSION['current_TextColor']; ?>;}
table.tablesorterRates thead tr th a{ color:#<?php echo $_SESSION['current_TextColor']; ?>;}
footer { background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>;}
#FatFooter { background-color:#<?php echo $_SESSION['current_SecondaryColor']; ?>; color:#<?php echo $_SESSION['current_TextColor']; ?>;}
<?php if ($_SESSION['current_SecondaryColor'] == $_SESSION['current_PrimaryColor']){ echo "#FatFooter a { color:#".$_SESSION['current_TextColor']."; } "; } ?>
h3 {color:#<?php echo $_SESSION['current_PrimaryColor']; ?>;}
#cssdropdown, #cssdropdown ul {background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>;}
nav {background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>;}
</style>
</head>
<body>
<div align="center">
<div id="wrapper">
<?php include("includes/header.php"); ?>
<?php include("includes/nav.php"); ?>
<article>
<!-- RIGHT HAND SIDE BAR GOES HERE -->
<!--<aside></aside>-->
<!-- MAIN PAGE CONTENT GOES HERE -->
<section>
<h1><?php echo $l_Offer;?> - <?php echo $row_GetPlayer['Name']; ?></h1>
<br /><br />
<form method="post" name="form" id="form" action="<?php echo $editFormAction; ?>" onSubmit="return validateFields();">
<INPUT id="player" type="hidden" value="<?php echo $row_GetPlayer['Name']; ?>" name=player>
<INPUT id="location" type="hidden" value="<?php echo $tmpLocation; ?>" name=location>
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="150">
<tr>
<td width="110" valign="top" style="vertical-align:top">
<img src="<?php echo imageExists("/image/players/".$row_GetPlayer['Photo']); ?>" style=" border-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>; width:100px; height:150px; border-width:1px; margin-top:10px; border-style:solid;" width="100" height="150"/>
<INPUT id="age" onfocus=select() type="hidden" value="<?php echo getAge($row_GetPlayer['AgeDate']); ?>" name=age>
<INPUT id="prevsal" type="hidden" onfocus=select() size=8 value="<?php echo $row_GetPlayer['Salary1']; ?>" name=prevsal>
</td>
<td valign="top">
<h3><?php echo $l_PlayerRatings;?></h3>
<?php if ($GetType == 'Goalie'){ ?>
<table cellspacing="0" border="0" width="100%" class="tablesorterRates">
<thead>
<tr style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<th><a title="<?php echo $l_SK_D;?>">SK</a></th>
<th><a title="<?php echo $l_DU_D;?>">DU</a></th>
<th><a title="<?php echo $l_EN_D;?>">EN</a></th>
<th><a title="<?php echo $l_SZ_D;?>">SZ</a></th>
<th><a title="<?php echo $l_AG_D;?>">AG</a></th>
<th><a title="<?php echo $l_RB_D;?>">RB</a></th>
<th><a title="<?php echo $l_STC_D;?>">SC</a></th>
<th><a title="<?php echo $l_HS_D;?>">HS</a></th>
<th><a title="<?php echo $l_RT_D;?>">RT</a></th>
<th><a title="<?php echo $l_PC_D;?>">PC</a></th>
<th><a title="<?php echo $l_PenS_D;?>">PS</a></th>
<th><a title="<?php echo $l_EX_D;?>">EX</a></th>
<th><a title="<?php echo $l_LD_D;?>">LD</a></th>
<th><a title="<?php echo $l_MO_D;?>">MO</a></th>
<th><a title="<?php echo $l_PO_D;?>">PO</a></th>
<th><a title="<?php echo $l_OV_D;?>">OV</a></th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['SK']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['DU']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['EN']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['SZ']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['AG']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['RB']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['SC']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['HS']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['RT']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['PC']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['PS']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['EX']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['LD']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['MO']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['PO']; ?></td>
<td align="center" style="font-size:1.4em;"><?php if ($_SESSION['DisplayOV'] == 1) { echo $row_GetPlayer['Overall'];} else { echo 0;} ?></td>
</tr>
</tbody>
</table>
<?php }else{ ?>
<table cellspacing="0" border="0" width="100%" class="tablesorterRates">
<thead>
<tr style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<th><a title="<?php echo $l_CK_D;?>">CK</a></th>
<th><a title="<?php echo $l_FG_D;?>">FG</a></th>
<th><a title="<?php echo $l_DI_D;?>">DI</a></th>
<th><a title="<?php echo $l_SK_D;?>">SK</a></th>
<th><a title="<?php echo $l_ST_D;?>">ST</a></th>
<th><a title="<?php echo $l_EN_D;?>">EN</a></th>
<th><a title="<?php echo $l_DU_D;?>">DU</a></th>
<th><a title="<?php echo $l_PH_D;?>">PH</a></th>
<th><a title="<?php echo $l_FO_D;?>">FO</a></th>
<th><a title="<?php echo $l_PA_D;?>">PA</a></th>
<th><a title="<?php echo $l_SC_D;?>">SC</a></th>
<th><a title="<?php echo $l_DF_D;?>">DF</a></th>
<th><a title="<?php echo $l_PenS_D;?>">PS</a></th>
<th><a title="<?php echo $l_EX_D;?>">EX</a></th>
<th><a title="<?php echo $l_LD_D;?>">LD</a></th>
<th><a title="<?php echo $l_MO_D;?>">MO</a></th>
<th><a title="<?php echo $l_PO_D;?>">PO</a></th>
<th><a title="<?php echo $l_OV_D;?>">OV</a></th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['CK']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['FG']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['DI']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['SK']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['ST']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['EN']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['DU']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['PH']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['FO']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['PA']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['SC']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['DF']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['PS']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['EX']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['LD']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['MO']; ?></td>
<td align="center" style="font-size:1.4em;"><?php echo $row_GetPlayer['PO']; ?></td>
<td align="center" style="font-size:1.4em;"><?php if ($_SESSION['DisplayOV'] == 1) { echo $row_GetPlayer['Overall'];} else { echo 0;} ?></td>
</tr>
</tbody>
</table>
<?php } ?>
<h3><?php echo $l_Offer;?></h3>
<table cellspacing="0" border="0" width="100%" class="tablesorterRates" >
<thead>
<tr style="background-color:#<?php echo $_SESSION['current_PrimaryColor']; ?>">
<th width="10%"><?php echo ($_SESSION['current_Season'])."-".substr($_SESSION['current_Season']+1, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+1)."-".substr($_SESSION['current_Season']+2, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+2)."-".substr($_SESSION['current_Season']+3, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+3)."-".substr($_SESSION['current_Season']+4, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+4)."-".substr($_SESSION['current_Season']+5, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+5)."-".substr($_SESSION['current_Season']+6, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+6)."-".substr($_SESSION['current_Season']+7, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+7)."-".substr($_SESSION['current_Season']+8, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+8)."-".substr($_SESSION['current_Season']+9, -2);?></th>
<th width="10%"><?php echo ($_SESSION['current_Season']+9)."-".substr($_SESSION['current_Season']+10, -2);?></th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><div id="Year1">$<?php echo number_format($row_GetContract['Salary1'],0); ?></div></td>
<td align="center"><div id="Year2">$<?php echo number_format($row_GetContract['Salary2'],0); ?></div></td>
<td align="center"><div id="Year3">$<?php echo number_format($row_GetContract['Salary3'],0); ?></div></td>
<td align="center"><div id="Year4">$<?php echo number_format($row_GetContract['Salary4'],0); ?></div></td>
<td align="center"><div id="Year5">$<?php echo number_format($row_GetContract['Salary5'],0); ?></div></td>
<td align="center"><div id="Year6">$<?php echo number_format($row_GetContract['Salary6'],0); ?></div></td>
<td align="center"><div id="Year7">$<?php echo number_format($row_GetContract['Salary7'],0); ?></div></td>
<td align="center"><div id="Year8">$<?php echo number_format($row_GetContract['Salary8'],0); ?></div></td>
<td align="center"><div id="Year9">$<?php echo number_format($row_GetContract['Salary9'],0); ?></div></td>
<td align="center"><div id="Year10">$<?php echo number_format($row_GetContract['Salary10'],0); ?></div></td>
</tr>
</tbody>
</table>
<div class="rowElem">
<label><?php echo $l_CONTRACTLENGTH;?>:</label>
<select id="yearsoff" size=1 name=yearsoff ONCHANGE="FrontEnd();" s>
<?php
for ( $counter = 1; $counter <= $row_GetWebInfo['MaxContract']; $counter += 1) {
if($counter == $row_GetContract['Contract']){
$tmpSelected = 'selected="selected"';
} else {
$tmpSelected = '';
}
echo '<option value="'.$counter.'" '.$tmpSelected.'>'.$counter.'</option>';
}
?>
</select>
</div>
<div class="rowElem">
<label><?php echo $l_SalaryPerYear;?>:</label>
<INPUT id="newsal" onfocus=select() size="8" maxlength="8" value="<?php echo ($row_GetContract['Salary1']+$row_GetContract['Salary2']+$row_GetContract['Salary3']+$row_GetContract['Salary4']+$row_GetContract['Salary5']+$row_GetContract['Salary6']+$row_GetContract['Salary7']+$row_GetContract['Salary8']+$row_GetContract['Salary9']+$row_GetContract['Salary10'])/$row_GetContract['Contract']; ?>" name=newsal ONCHANGE="FrontEnd();" >
</div>
<div class="rowElem" style="">
<label><?php echo $l_SalaryDistribution;?>:</label>
<select id="distribute" size=1 name="distribute" ONCHANGE="FrontEnd();"><option value="0" <?php if($row_GetContract['Salary1']==$row_GetContract['Salary2']){ echo 'selected'; }?>>EVEN</option><option value="1" <?php if($row_GetContract['Salary1']!=$row_GetContract['Salary2']){ echo 'selected'; }?>>FRONT-LOAD</option></select>
<div style="display:block;">
<label></label><sub style="font-size:10px;"> <?php echo $l_FrontLoadDescription;?></sub><br clear="all" />
</div>
</div>
<div class="rowElem" style="">
<label><?php echo $l_NoTrade;?>:</label>
<select id="notrade" size=1 name="notrade"><option value="0" <?php if($row_GetContract['NoTrade']=="0"){ echo 'selected'; }?>><?php echo $l_False;?></option><option value="1" <?php if($row_GetContract['NoTrade']=="1"){ echo 'selected'; }?>><?php echo $l_True;?></option></select>
<label></label> <sub style="font-size:10px;"><?php echo $l_NoTradeDescription;?></sub>
</div>
<div class="rowElem"><label></label><input type="submit" value="<?php echo $l_SendOffer;?>" class="button edit"></div>
</td>
</tr>
</table>
<br />
<?php
if ($Contract_Step == "final"){
echo '<input type="hidden" name="MM_Contract_Step" value="final">';
} else {
echo '<input type="hidden" name="MM_Contract_Step" value="0">';
}
?>
<input type="hidden" name="id" value="<?php echo $Contract_ID; ?>">
<input type="hidden" name="YearSalary1" value="<?php echo $row_GetContract['Salary1'];?>">
<input type="hidden" name="YearSalary2" value="<?php echo $row_GetContract['Salary2'];?>">
<input type="hidden" name="YearSalary3" value="<?php echo $row_GetContract['Salary3'];?>">
<input type="hidden" name="YearSalary4" value="<?php echo $row_GetContract['Salary4'];?>">
<input type="hidden" name="YearSalary5" value="<?php echo $row_GetContract['Salary5'];?>">
<input type="hidden" name="YearSalary6" value="<?php echo $row_GetContract['Salary6'];?>">
<input type="hidden" name="YearSalary7" value="<?php echo $row_GetContract['Salary7'];?>">
<input type="hidden" name="YearSalary8" value="<?php echo $row_GetContract['Salary8'];?>">
<input type="hidden" name="YearSalary9" value="<?php echo $row_GetContract['Salary9'];?>">
<input type="hidden" name="YearSalary10" value="<?php echo $row_GetContract['Salary10'];?>">
<input type="hidden" name="MM_edit" value="form">
</form>
</section>
</article>
<?php include("includes/footer.php"); ?>
<?php include("includes/statusBar.php"); ?>
</div>
</div>
</body>
</html>