Ejemplo n.º 1
0
 function build_form($formoptions = 0)
 {
     global $postfields, $script_filename, $roster_conf, $addon_conf, $wordings;
     // Tooltip Replace Patterns
     $prg_find = array("/'/", '/"/', '|\\>|', '|\\<|', "/\\n/");
     $prg_rep = array("\\'", '&quot;', '&#8250;', '&#8249;', '<br />');
     // Arrays to hold valuable data
     $bosses = array();
     $lootitems = array();
     $players = array();
     // Start the HTML Form
     $this->form = "<!-- Begin Input Form -->\n";
     // One BIG box around the whole form
     $this->form .= border('sgray', 'start') . "\n";
     $this->form .= "<table bgcolor=\"black\">\n<tr>\n<td>\n";
     $this->form .= '<form action="' . $script_filename . '" method="post" enctype="multipart/form-data" onsubmit="submitonce(this)">' . "\n";
     //Display the Raid Details
     $this->form .= border('sred', 'start', $wordings[$roster_conf['roster_lang']]['rosterdkp_raiddetails']) . "\n";
     $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
     $this->form .= "<tr>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidzone'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidnote'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidstart'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidend'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidleader'] . "</td>\n";
     $this->form .= "</tr>\n<tr>\n";
     if (isset($this->raid_zone) && $this->raid_zone != '') {
         $this->form .= "<td class=\"membersRowRight1\">" . stripslashes($this->raid_zone) . "</td>\n";
         $this->form .= "<input name=\"raid[zone]\" type=\"hidden\" size=\"15\" value=\"" . stripslashes($this->raid_zone) . "\" />\n";
     } else {
         $this->form .= "<td class=\"membersRowRight1\"><input name=\"raid[zone]\" type=\"text\" size=\"15\" value=\"" . stripslashes($this->raid_zone) . "\" /></td>\n";
     }
     $this->form .= "<td class=\"membersRowRight1\"><input name=\"raid[note]\" type=\"text\" size=\"40\" value=\"" . stripslashes($this->raid_note) . "\" />\n</td>\n";
     $this->form .= "<td class=\"membersRowRight1\">" . $this->raid_start . "</td>\n";
     $this->form .= "<td class=\"membersRowRight1\">" . $this->raid_end . "</td>\n";
     $this->form .= "<td class=\"membersRowRight1\"><select name=\"raid[leader]\">\n<option selected value=\"Unknown\">Unknown</option>\n";
     foreach ($this->raid_players as $playername_tmp) {
         $this->form .= "<option value=\"" . $playername_tmp['name'] . "\">" . stripslashes($playername_tmp['name']) . "</option>\n";
     }
     $this->form .= "</select>\n</td>\n";
     $this->form .= "</tr>\n</table>\n";
     $this->form .= "<input name=\"raid[id]\" type=\"hidden\" value=\"" . $this->raid_id . "\" />\n";
     $this->form .= "<input name=\"raid[start]\" type=\"hidden\" value=\"" . $this->raid_start . "\" />\n";
     $this->form .= "<input name=\"raid[end]\" type=\"hidden\" value=\"" . $this->raid_end . "\" />\n";
     $this->form .= border('sred', 'end') . "<br>\n";
     // Show the Different Event Details
     $this->form .= border('sgreen', 'start', $wordings[$roster_conf['roster_lang']]['rosterdkp_eventdetails']) . "\n";
     $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
     $row = 1;
     // Header of Table
     $this->form .= "<tr>\n";
     $this->form .= "<td colspan=\"2\" class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_eventtype'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_eventref'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_eventstart'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_eventend'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_dkpvalue'] . "</td>\n";
     $this->form .= "</tr>\n";
     // DKP Attendence Event
     if (floatval($addon_conf['roster_dkp']['rosterdkp_dkpattendence']) > 0) {
         if ($addon_conf['roster_dkp']['rosterdkp_dkpattendence']) {
             $percentagemessage = ' (100%)';
         } else {
             $percentagemessage = '';
         }
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersRowRight1\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_attend.jpg\" /></td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidattended'] . $percentagemessage . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->raid_zone) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $this->raid_start . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $this->raid_end . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['roster_dkp']['rosterdkp_dkpattendence'] . "</td>\n";
         $this->form .= "</tr>\n";
         // Swap $row for the next
         if ($row == 1) {
             $row = 2;
         } else {
             $row = 1;
         }
     }
     // Raid On-Time Event
     if (floatval($addon_conf['roster_dkp']['rosterdkp_dkpontimebonus']) > 0) {
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_ontime.jpg\" /></td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_ontimebonus'] . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->raid_zone) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $this->raid_start . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['roster_dkp']['rosterdkp_dkpontimebonus'] . "</td>\n";
         $this->form .= "</tr>\n";
         // Swap $row for the next
         if ($row == 1) {
             $row = 2;
         } else {
             $row = 1;
         }
     }
     // Raid Hour Event
     if (floatval($addon_conf['roster_dkp']['rosterdkp_dkphourbonus']) > 0) {
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_hour.jpg\" /></td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_hourbonus'] . ": " . $wordings[$roster_conf['roster_lang']]['rosterdkp_dkpperhour'] . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->raid_zone) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $this->raid_start . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $this->raid_end . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['roster_dkp']['rosterdkp_dkphourbonus'] . "</td>\n";
         $this->form .= "</tr>\n";
         // Swap $row for the next
         if ($row == 1) {
             $row = 2;
         } else {
             $row = 1;
         }
     }
     // Raid Till-End Event
     if (floatval($addon_conf['roster_dkp']['rosterdkp_dkptillendbonus']) > 0) {
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_tillend.jpg\" /></td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_tillendbonus'] . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->raid_zone) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $this->raid_end . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['roster_dkp']['rosterdkp_dkptillendbonus'] . "</td>\n";
         $this->form .= "</tr>\n";
         // Swap $row for the next
         if ($row == 1) {
             $row = 2;
         } else {
             $row = 1;
         }
     }
     // Boss Kill Event(s)
     if (count($this->raid_bosses) > 0) {
         foreach ($this->raid_bosses as $bosskey => $bossval) {
             $bosses[$bosskey]['name'] = $bossval['name'];
             $bosses[$bosskey]['time'] = $bossval['killtime'];
             $bosses[$bosskey]['zone'] = $bossval['zonename'];
             $bosses[$bosskey]['dkp_value'] = $bossval['dkp_value'];
             $tooltip = "test tooltip jek\\'klik\n";
             //$tooltip = preg_replace($prg_find, $prg_rep, $tooltip);
             $tooltip_h = 'test';
             $this->form .= "<tr>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_bosskill.jpg\" /></div></td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_killedboss'] . ": <span style=\"color: #d9b200;\">" . stripslashes($bosses[$bosskey]['name']) . "</span></td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($bosses[$bosskey]['zone']) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $bosses[$bosskey]['time'] . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $bosses[$bosskey]['time'] . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $bosses[$bosskey]['dkp_value'] . "</td>\n";
             $this->form .= "</tr>\n";
             // Set some fixed explode chars into the conf
             $this->raid_form_hidden['boss'][$bosskey]['name'] = $bosses[$bosskey]['name'];
             $this->raid_form_hidden['boss'][$bosskey]['time'] = $bosses[$bosskey]['time'];
             $this->raid_form_hidden['boss'][$bosskey]['zone'] = $bosses[$bosskey]['zone'];
             $this->raid_form_hidden['boss'][$bosskey]['dkp_value'] = $bosses[$bosskey]['dkp_value'];
             // Swap $row for the next
             if ($row == 1) {
                 $row = 2;
             } else {
                 $row = 1;
             }
         }
         // Serialize the input field for the form to limit the number of post-variables.
         $this->form .= "<input name=\"bossarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['boss'])) . "\" />\n";
     }
     // End of the Event Box
     $this->form .= "</table>\n";
     $this->form .= border('sgreen', 'end') . "<br>\n";
     // Begin of the Players Box
     $this->form .= border('syellow', 'start', $wordings[$roster_conf['roster_lang']]['rosterdkp_playerdetails']) . "\n";
     $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
     $this->form .= "<tr>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['name'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['level'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['class'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['race'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_event'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidstart'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidend'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_totaldkp'] . "</td>\n";
     $this->form .= "</tr>\n";
     $row = 1;
     if (count($this->raid_players) > 0) {
         foreach ($this->raid_players as $playerkey => $playerval) {
             // Put the member in the form as a hidden field
             $this->raid_form_hidden['member'][$playerkey]['member_id'] = $playerval['member_id'];
             $this->raid_form_hidden['member'][$playerkey]['roster_id'] = $playerval['roster_id'];
             $this->raid_form_hidden['member'][$playerkey]['level'] = $playerval['level'];
             $this->raid_form_hidden['member'][$playerkey]['class'] = $playerval['class'];
             $this->raid_form_hidden['member'][$playerkey]['race'] = $playerval['race'];
             // Show the details in the table
             $this->form .= "<tr>\n";
             if (isset($playerval['name']) && $playerval['name'] && $playerval['name'] != 'Unknown') {
                 $this->raid_form_hidden['member'][$playerkey]['name'] = $playerval['name'];
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($playerval['name']) . "</td>\n";
             } else {
                 $this->raid_form_hidden['member'][$playerkey]['name'] = "Unknown";
                 $this->form .= "<input name=\"member[" . $playerkey . "][unknown]\" type=\"hidden\" value=\"true\" />\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\"><input name=\"member[" . $playerkey . "][namenew]\" type=\"text\" size=\"20\" value=\"" . stripslashes($playerval['name']) . "\" />\n</td>\n";
             }
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($playerval['level']) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/class_" . strtolower($playerval['class']) . "." . $roster_conf['img_suffix'] . "\" /> " . stripslashes($playerval['class']) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($playerval['race']) . "</td>\n";
             // Process all events and display the icons with tooltips
             $this->form .= "<td class=\"membersRowRight" . $row . "\">";
             // some variables that we will use
             $tooltip = '';
             $dkptotal = number_format(0, 2, '.', '');
             $bosstooltip = '';
             $bossdkptotal = number_format(0, 2, '.', '');
             unset($form_ontime, $form_tillend, $form_hours);
             foreach ($playerval['events'] as $eventkey => $eventval) {
                 // Increase $dkptotal
                 $dkptotal += $eventval['dkp_value'];
                 // Put the event in the form as a hidden field
                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['type'] = $eventval['type'];
                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['reference'] = $eventval['event_reference'];
                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'] = $eventval['dkp_value'];
                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['start'] = $eventval['start'];
                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['end'] = $eventval['end'];
                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['note'] = $eventval['note'];
                 $tooltip_h = $wordings[$roster_conf['roster_lang']]['rosterdkp_event'] . " - DKP: " . number_format($eventval['dkp_value'], 2, '.', '');
                 switch ($eventval['type']) {
                     case 'raidatt':
                         $raidatt_false = '';
                         if ($eventval['note'] <= 0) {
                             $raidatt_false = '_false';
                         }
                         $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_attended'] . ' ' . $eventval['note'] . '%' . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_attend" . $raidatt_false . ".jpg\" /></span>&nbsp;";
                         break;
                     case 'raidontime':
                         $form_ontime = "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_wasontime'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_ontime.jpg\" /></span>&nbsp;";
                         break;
                     case 'raidtillend':
                         $form_tillend = "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_stayedtillend'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_tillend.jpg\" /></span>&nbsp;";
                         break;
                     case 'raidhours':
                         if (floatval($eventval['note']) > 0) {
                             $form_hours = "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_amounthours'] . " " . $eventval['note'] . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_hours'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_hour.jpg\" /></span>&nbsp;";
                         }
                         break;
                     case 'bosskill':
                         if (floatval($bossdkptotal) > 0) {
                             $bosstooltip .= '<br>';
                         }
                         $bosstooltip .= stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_killedboss'] . ' ' . stripslashes($eventval['note']) . "&nbsp;&nbsp;&nbsp;DKP: " . $eventval['dkp_value'];
                         $bossdkptotal += $eventval['dkp_value'];
                         break;
                 }
             }
             if (isset($form_ontime) && $form_ontime) {
                 $this->form .= $form_ontime;
             } elseif (floatval($addon_conf['roster_dkp']['rosterdkp_dkpontimebonus']) > 0) {
                 $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_wasnotontime'] . "',CAPTION,'" . $wordings[$roster_conf['roster_lang']]['rosterdkp_event'] . " - DKP: " . number_format(0, 2, '.', '') . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_ontime_false.jpg\" /></span>&nbsp;";
             }
             if (isset($form_hours) && $form_hours) {
                 $this->form .= $form_hours;
             } elseif (floatval($addon_conf['roster_dkp']['rosterdkp_dkphourbonus']) > 0) {
                 $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_amounthours'] . " 0 " . $wordings[$roster_conf['roster_lang']]['rosterdkp_hours'] . "',CAPTION,'" . $wordings[$roster_conf['roster_lang']]['rosterdkp_event'] . " - DKP: " . number_format(0, 2, '.', '') . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_hour_false.jpg\" /></span>&nbsp;";
             }
             if (isset($form_tillend) && $form_tillend) {
                 $this->form .= $form_tillend;
             } elseif (floatval($addon_conf['roster_dkp']['rosterdkp_dkptillendbonus']) > 0) {
                 $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_nottillend'] . "',CAPTION,'" . $wordings[$roster_conf['roster_lang']]['rosterdkp_event'] . " - DKP: " . number_format(0, 2, '.', '') . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_tillend_false.jpg\" /></span>&nbsp;";
             }
             if (count($this->raid_bosses) > 0) {
                 if (floatval($bossdkptotal) > 0) {
                     $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . $bosstooltip . "',CAPTION,'" . $wordings[$roster_conf['roster_lang']]['rosterdkp_killedboss'] . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_totaldkp'] . ": " . number_format($bossdkptotal, 2, '.', '') . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_bosskill.jpg\" /></span>";
                 } else {
                     $bosstooltip .= stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_notkillboss'] . "&nbsp;&nbsp;&nbsp;DKP: 0.00";
                     $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . $bosstooltip . "',CAPTION,'" . $wordings[$roster_conf['roster_lang']]['rosterdkp_notkillboss'] . " " . $wordings[$roster_conf['roster_lang']]['rosterdkp_totaldkp'] . ": " . number_format(0, 2, '.', '') . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" height=\"" . $addon_conf['roster_dkp']['rosterdkp_iconsize'] . "px\" src=\"addons/roster_dkp/img/event_bosskill_false.jpg\" /></span>";
                 }
             }
             $this->form .= "</td>";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", strtotime($playerval['join'])) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", strtotime($playerval['leave'])) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . number_format($dkptotal, 2, '.', '') . "</td>\n";
             $this->form .= "</tr>";
             // Swap $row for the next
             if ($row == 1) {
                 $row = 2;
             } else {
                 $row = 1;
             }
         }
         // Serialize the input field for the form to limit the number of post-variables.
         $this->form .= "<input name=\"memberarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['member'])) . "\" />\n";
         $this->form .= "<input name=\"eventsarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['events'])) . "\" />\n";
     }
     // End of Players Box
     $this->form .= "</table>\n";
     $this->form .= border('syellow', 'end') . "\n";
     // Begin of the Loot Box
     $this->raid_form_hidden['loot'] = array();
     $row = 1;
     $this->form .= "<br>" . border('spurple', 'start', $wordings[$roster_conf['roster_lang']]['rosterdkp_lootdetails']) . "\n";
     $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
     $this->form .= "<tr>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['item'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['loot_time'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dropped_by'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidzone'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['looted_by'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['CTRA'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['cache'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['store'] . "</td>\n";
     $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['charge'] . "</td>\n";
     $this->form .= "</tr>\n";
     // Sort the array by color, name and time
     foreach ($this->raid_loot as $key => $sortrow) {
         $itemquality[$key] = $sortrow['item_quality'];
         $itemname[$key] = $sortrow['item_name'];
         $itemtime[$key] = strtotime($sortrow['time']);
     }
     array_multisort($itemquality, SORT_DESC, $itemname, SORT_ASC, $itemtime, SORT_ASC, $this->raid_loot);
     foreach ($this->raid_loot as $itemkey => $itemval) {
         $itemdisplay = new itemlink($itemval);
         $itemcolor = substr($itemval['item_color'], 2, 6);
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $itemdisplay->display('both', true) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", strtotime($itemval['time'])) . "</td>\n";
         if ($itemval['bossid'] >= 0) {
             $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: #d9b200;\">" . stripslashes($itemval['bossname']) . "</td>\n";
         } else {
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($wordings[$roster_conf['roster_lang']]['random_mob']) . "</td>\n";
         }
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($itemval['zone']) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($itemval['playername']) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: #d9b200; text-align: right;\">" . number_format($itemval['ctrt_value'], 2, '.', '') . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: red; text-align: right;\">" . number_format($itemval['dkp_value'], 2, '.', '') . "</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">\n";
         $this->form .= "<input name=\"loot[" . $itemkey . "][dkp_realvalue]\" type=\"text\" size=\"5\" value=\"" . number_format($itemval['dkp_value'], 2, '.', '') . "\" />\n</td>\n";
         $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"text-align: left;\">\n<table>";
         $this->form .= "<tr><td style=\"text-align: left; font-size: 8pt; color: #d9b200;\"><input name=\"loot[" . $itemkey . "][charge]\" type=\"radio\" checked size=\"5\" value=\"player\" /></td>\n<td style=\"text-align: left; font-size: 8pt; color: #d9b200;\">" . $wordings[$roster_conf['roster_lang']]['player'] . "</td>\n</tr>\n";
         $this->form .= "<tr><td style=\"text-align: left; font-size: 8pt; color: #00ff00;\"><input name=\"loot[" . $itemkey . "][charge]\" type=\"radio\" size=\"5\" value=\"bank\" /></td>\n<td style=\"text-align: left; font-size: 8pt; color: #00ff00;\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidbank'] . "</td>\n</tr>\n";
         $this->form .= "</table>\n</td>\n";
         $this->form .= "</tr>\n";
         // Fill the hidden values into an array to serialize
         $this->raid_form_hidden['loot'][$itemkey]['item_name'] = $itemval['item_name'];
         $this->raid_form_hidden['loot'][$itemkey]['item_id'] = $itemval['item_id'];
         $this->raid_form_hidden['loot'][$itemkey]['time'] = $itemval['time'];
         $this->raid_form_hidden['loot'][$itemkey]['zone'] = $itemval['zone'];
         $this->raid_form_hidden['loot'][$itemkey]['note'] = $itemval['note'];
         $this->raid_form_hidden['loot'][$itemkey]['playerid'] = $itemval['playerid'];
         $this->raid_form_hidden['loot'][$itemkey]['bossid'] = $itemval['bossid'];
         // Swap $row for the next
         if ($row == 1) {
             $row = 2;
         } else {
             $row = 1;
         }
     }
     // Serialize the input field for the form to limit the number of post-variables.
     $this->form .= "<input name=\"lootarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['loot'])) . "\" />\n";
     //$this->form .=
     // End of Loot Box
     $this->form .= "</table>\n";
     $this->form .= border('spurple', 'end') . "<br />\n";
     // Display the Submit button and Cancel Button
     $this->form .= '<center>' . border('sred', 'start', $wordings[$roster_conf['roster_lang']]['submit_raid_confirm']) . "\n";
     $this->form .= "<table width=\"100%\"><tr><td align=\"left\">";
     $this->form .= "<input style=\"color: #d9b200; font-size: 16pt; font-weight: bold;\" type=\"submit\" value=\"" . $wordings[$roster_conf['roster_lang']]['confirm'] . "\" /></td>\n";
     $this->form .= "<td></td>";
     $this->form .= "<td align=\"right\"><input style=\"color: red; font-size: 16pt; font-weight: bold;\" type=\"button\" value=\"" . $wordings[$roster_conf['roster_lang']]['cancel'] . "\" onclick=\"history.go(-1);return false;\" /></td>\n";
     $this->form .= "</tr></table>\n";
     $this->form .= border('sred', 'end') . "</center>\n";
     // End the BIG Box
     $this->form .= "</td>\n</tr>\n</table>\n";
     $this->form .= border('sgray', 'end') . "\n";
     // Insert the required variables to confirm the posting of the raid
     $this->form .= "<input name=\"action\" type=\"hidden\" value=\"" . $postfields['action'] . "\" />\n";
     $this->form .= "<input name=\"display\" type=\"hidden\" value=\"" . $postfields['display'] . "\" />\n";
     $this->form .= "<input name=\"admindisplay\" type=\"hidden\" value=\"" . $postfields['admindisplay'] . "\" />\n";
     $this->form .= "<input name=\"parseconfirm\" type=\"hidden\" value=\"true\" />\n";
     $this->form .= "</form>\n";
 }
Ejemplo n.º 2
0
function implode_assoc_r2($array = null, $inner_glue = INNER_GLUE, $outer_glue = OUTER_GLUE, $recusion_level = 0)
{
    $output = array();
    foreach ($array as $key => $item) {
        if (is_array($item)) {
            // This is value is an array, go and do it again!
            $level = $recusion_level + 1;
            $output[] = $key . $inner_glue . $recusion_level . $inner_glue . implode_assoc_r2($item, $inner_glue, $outer_glue, $level);
        } else {
            $output[] = $key . $inner_glue . $recusion_level . $inner_glue . $item;
        }
    }
    return implode($outer_glue . $recusion_level . $outer_glue, $output);
}
Ejemplo n.º 3
0
 function build_form()
 {
     global $postfields, $script_filename, $roster_conf, $addonDir, $addon_conf, $wordings, $wowdb, $options;
     // Check if there was a raid start AND end time
     if ($this->raid_start > 0 && $this->raid_end > $this->raid_start) {
         // Arrays to hold valuable data
         $bosses = array();
         $lootitems = array();
         $players = array();
         // Start the HTML Form
         $this->form = "<!-- Begin Input Form -->\n";
         // One BIG box around the whole form
         $this->form .= border('sgray', 'start') . "\n";
         $this->form .= "<table bgcolor=\"black\">\n<tr>\n<td>\n";
         $this->form .= '<form action="' . $script_filename . '" method="post" enctype="multipart/form-data" onsubmit="submitonce(this)">' . "\n";
         //Display the Raid Details
         $this->form .= border('sred', 'start', $wordings[$roster_conf['roster_lang']]['dkpw_raiddetails']) . "\n";
         $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidzone'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidnote'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidstart'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidend'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidleader'] . "</td>\n";
         $this->form .= "</tr>\n<tr>\n";
         if (isset($this->raid_zone) && $this->raid_zone != '') {
             $this->form .= "<td class=\"membersRowRight1\">" . stripslashes($this->raid_zone) . "</td>\n";
             $this->form .= "<input name=\"raid[zone]\" type=\"hidden\" size=\"15\" value=\"" . stripslashes($this->raid_zone) . "\" />\n";
         } else {
             $this->form .= "<td class=\"membersRowRight1\"><input name=\"raid[zone]\" type=\"text\" size=\"15\" value=\"" . stripslashes($this->zone_name) . "\" /></td>\n";
         }
         $this->form .= "<td class=\"membersRowRight1\"><input name=\"raid[note]\" type=\"text\" size=\"40\" value=\"" . stripslashes($this->raid_note) . "\" />\n</td>\n";
         $this->form .= "<td class=\"membersRowRight1\">" . date("Y-m-d H:i", $this->raid_start) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight1\">" . date("Y-m-d H:i", $this->raid_end) . "</td>\n";
         $this->form .= "<td class=\"membersRowRight1\"><select name=\"raid[leader]\">\n<option selected value=\"Unknown\">Unknown</option>\n";
         foreach ($this->players as $playername_tmp) {
             $this->form .= "<option value=\"" . $playername_tmp['name'] . "\">" . $wowdb->escape($playername_tmp['name']) . "</option>\n";
         }
         $this->form .= "</select>\n</td>\n";
         $this->form .= "</tr>\n</table>\n";
         $this->form .= "<input name=\"raid[id]\" type=\"hidden\" value=\"" . $this->raid_id . "\" />\n";
         $this->form .= "<input name=\"raid[start]\" type=\"hidden\" value=\"" . $this->raid_start . "\" />\n";
         $this->form .= "<input name=\"raid[end]\" type=\"hidden\" value=\"" . $this->raid_end . "\" />\n";
         $this->form .= border('sred', 'end') . "<br>\n";
         // Show the Different Event Details
         $this->form .= border('sgreen', 'start', $wordings[$roster_conf['roster_lang']]['dkpw_eventdetails']) . "\n";
         $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
         $row = 1;
         // Header of Table
         $this->form .= "<tr>\n";
         $this->form .= "<td colspan=\"2\" class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_eventtype'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_eventref'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_eventstart'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_eventend'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_dkpvalue'] . "</td>\n";
         $this->form .= "</tr>\n";
         // DKP Attendence Event
         if (floatval($addon_conf['dkpattendence']) > 0) {
             if ($addon_conf['dkpattendence']) {
                 $percentagemessage = ' (100%)';
             } else {
                 $percentagemessage = '';
             }
             $this->form .= "<tr>\n";
             $this->form .= "<td class=\"membersRowRight1\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_attend.jpg\" /></td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidattended'] . $percentagemessage . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->raid_zone) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $this->raid_start) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $this->raid_end) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['dkpattendence'] . "</td>\n";
             $this->form .= "</tr>\n";
             // Swap $row for the next
             if ($row == 1) {
                 $row = 2;
             } else {
                 $row = 1;
             }
         }
         // Raid On-Time Event
         if (floatval($addon_conf['dkpontimebonus']) > 0) {
             $this->form .= "<tr>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_ontime.jpg\" /></td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['dkpw_ontimebonus'] . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->zone_name) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $this->raid_start) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['dkpontimebonus'] . "</td>\n";
             $this->form .= "</tr>\n";
             // Swap $row for the next
             if ($row == 1) {
                 $row = 2;
             } else {
                 $row = 1;
             }
         }
         // Raid Hour Event
         if (floatval($addon_conf['dkphourbonus']) > 0) {
             $this->form .= "<tr>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_hour.jpg\" /></td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['dkpw_hourbonus'] . ": " . $wordings[$roster_conf['roster_lang']]['dkpw_dkpperhour'] . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->raid_zone) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $this->raid_start) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $this->raid_end) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['dkphourbonus'] . "</td>\n";
             $this->form .= "</tr>\n";
             // Swap $row for the next
             if ($row == 1) {
                 $row = 2;
             } else {
                 $row = 1;
             }
         }
         // Raid Till-End Event
         if (floatval($addon_conf['dkptillendbonus']) > 0) {
             $this->form .= "<tr>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_tillend.jpg\" /></td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['dkpw_tillendbonus'] . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->raid_zone) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $this->raid_end) . "</td>\n";
             $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $addon_conf['dkptillendbonus'] . "</td>\n";
             $this->form .= "</tr>\n";
             // Swap $row for the next
             if ($row == 1) {
                 $row = 2;
             } else {
                 $row = 1;
             }
         }
         // Boss Kill Event(s)
         if (count($this->bosses) > 0) {
             foreach ($this->bosses as $bosskey => $bossval) {
                 $bosses[$bosskey]['name'] = $bossval['name'];
                 $bosses[$bosskey]['time'] = $bossval['time'];
                 $bosses[$bosskey]['zone'] = $bossval['zonename'];
                 $bosses[$bosskey]['dkp_value'] = $bossval['dkp_value'];
                 //$tooltip = preg_replace($prg_find, $prg_rep, $tooltip);
                 $this->form .= "<tr>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_bosskill.jpg\" /></div></td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $wordings[$roster_conf['roster_lang']]['dkpw_killedboss'] . ": <span style=\"color: #d9b200;\">" . stripslashes($bosses[$bosskey]['name']) . "</span></td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($bosses[$bosskey]['zone']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $bosses[$bosskey]['time']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $bosses[$bosskey]['time']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . $bosses[$bosskey]['dkp_value'] . "</td>\n";
                 $this->form .= "</tr>\n";
                 // Set some fixed explode chars into the conf
                 $this->raid_form_hidden['boss'][$bosskey]['name'] = $bosses[$bosskey]['name'];
                 $this->raid_form_hidden['boss'][$bosskey]['time'] = $bosses[$bosskey]['time'];
                 $this->raid_form_hidden['boss'][$bosskey]['zone'] = $bosses[$bosskey]['zone'];
                 $this->raid_form_hidden['boss'][$bosskey]['dkp_value'] = $bosses[$bosskey]['dkp_value'];
                 // Swap $row for the next
                 if ($row == 1) {
                     $row = 2;
                 } else {
                     $row = 1;
                 }
             }
             // Serialize the input field for the form to limit the number of post-variables.
             $this->form .= "<input name=\"bossarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['boss'])) . "\" />\n";
         }
         // End of the Event Box
         $this->form .= "</table>\n";
         $this->form .= border('sgreen', 'end') . "<br>\n";
         // Begin of the Players Box
         $this->form .= border('syellow', 'start', $wordings[$roster_conf['roster_lang']]['dkpw_playerdetails']) . "\n";
         $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['name'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['level'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['class'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['race'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_event'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidstart'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_raidend'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dkpw_totaldkp'] . "</td>\n";
         $this->form .= "</tr>\n";
         $row = 1;
         if (count($this->players) > 0) {
             foreach ($this->players as $playerkey => $playerval) {
                 // Put the member in the form as a hidden field
                 $this->raid_form_hidden['member'][$playerkey]['level'] = $playerval['level'];
                 $this->raid_form_hidden['member'][$playerkey]['class'] = $playerval['class'];
                 $this->raid_form_hidden['member'][$playerkey]['race'] = $playerval['race'];
                 // Show the details in the table
                 $this->form .= "<tr>\n";
                 if (isset($playerval['name']) && $playerval['name'] && $playerval['name'] != 'Unknown') {
                     $this->raid_form_hidden['member'][$playerkey]['name'] = $playerval['name'];
                     $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($playerval['name']) . "</td>\n";
                 } else {
                     $this->raid_form_hidden['member'][$playerkey]['name'] = "Unknown";
                     $this->form .= "<input name=\"member[" . $playerkey . "][unknown]\" type=\"hidden\" value=\"true\" />\n";
                     $this->form .= "<td class=\"membersRowRight" . $row . "\"><input name=\"member[" . $playerkey . "][namenew]\" type=\"text\" size=\"20\" value=\"" . stripslashes($playerval['name']) . "\" />\n</td>\n";
                 }
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($playerval['level']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/class_" . strtolower($playerval['class']) . "." . $roster_conf['img_suffix'] . "\" /> " . stripslashes($playerval['class']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($playerval['race']) . "</td>\n";
                 // Process all events and display the icons with tooltips
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">";
                 // some variables that we will use
                 $tooltip = '';
                 $dkptotal = number_format(0, 2, '.', '');
                 $bosstooltip = '';
                 $bossdkptotal = number_format(0, 2, '.', '');
                 //unset($form_ontime, $form_tillend, $form_hours);
                 // Get all the appropiate events for the player
                 $dkptotal = 0.0;
                 $eventkey = 0;
                 // Raid Attendence
                 if (floatval($addon_conf['dkpattendence']) > 0.0) {
                     $attended_false = '_false';
                     if ($playerval['percentage'] > $addon_conf['dkpattpercentage']) {
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['type'] = 'raidatt';
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['reference'] = 1;
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'] = $addon_conf['dkpattendence'] / 100 * $playerval['percentage'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['start'] = $playerval['join'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['end'] = $playerval['leave'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['note'] = $playerval['percentage'];
                         // Show the correct ATTENDED image rather than the UNATTENDED image
                         $attended_false = '';
                         $dkptotal += $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'];
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format($this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'], 2, '.', '');
                         $eventkey++;
                     } else {
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format(0, 2, '.', '');
                     }
                     // Put the event in the form
                     $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_attended'] . ' ' . $playerval['percentage'] . '%' . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_attend" . $attended_false . ".jpg\" /></span>&nbsp;";
                 }
                 // Was Player On-Time
                 if ($playerval['percentage'] > $addon_conf['dkpattpercentage'] && floatval($addon_conf['dkpontimebonus']) > 0) {
                     $ontime_false = '_false';
                     if ($this->was_player_present($playerval, $this->raid_start)) {
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['type'] = 'raidontime';
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['reference'] = 1;
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'] = $addon_conf['dkpontimebonus'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['start'] = $playerval['join'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['end'] = $playerval['leave'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['note'] = 'ontime';
                         // Show the correct ATTENDED image rather than the UNATTENDED image
                         $ontime_false = '';
                         $dkptotal += $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'];
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format($this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'], 2, '.', '');
                         // Put the event in the form
                         $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_wasontime'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_ontime" . $ontime_false . ".jpg\" /></span>&nbsp;";
                         $eventkey++;
                     } else {
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format(0, 2, '.', '');
                         // Put the event in the form
                         $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_wasnotontime'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_ontime" . $ontime_false . ".jpg\" /></span>&nbsp;";
                     }
                 }
                 // Get the Hourly Bonus Event
                 if ($playerval['percentage'] > $addon_conf['dkpattpercentage'] && floatval($addon_conf['dkphourbonus']) > 0) {
                     $hours_false = '_false';
                     if (floor($playerval['totaltime'] / 3600) > 0) {
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['type'] = 'raidhours';
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['reference'] = 1;
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'] = floor($playerval['totaltime'] / 3600) * $addon_conf['dkphourbonus'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['start'] = $playerval['join'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['end'] = $playerval['leave'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['note'] = floor($playerval['totaltime'] / 3600);
                         // Show the correct ATTENDED image rather than the UNATTENDED image
                         $hours_false = '';
                         $dkptotal += $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'];
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format($this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'], 2, '.', '');
                         $eventkey++;
                     } else {
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format(0, 2, '.', '');
                     }
                     // Put the event in the form
                     $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_amounthours'] . " " . floor($playerval['totaltime'] / 3600) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_hours'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_hour" . $hours_false . ".jpg\" /></span>&nbsp;";
                 }
                 // Did Player Stay-Till-End
                 if ($playerval['percentage'] > $addon_conf['dkpattpercentage'] && floatval($addon_conf['dkptillendbonus']) > 0) {
                     $tillend_false = '_false';
                     if ($this->was_player_present($playerval, $this->raid_end)) {
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['type'] = 'raidtillend';
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['reference'] = 1;
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'] = $addon_conf['dkptillendbonus'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['start'] = $playerval['join'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['end'] = $playerval['leave'];
                         $this->raid_form_hidden['events'][$playerkey][$eventkey]['note'] = 'tillend';
                         // Show the correct ATTENDED image rather than the UNATTENDED image
                         $tillend_false = '';
                         $dkptotal += $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'];
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format($this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'], 2, '.', '');
                         // Put the event in the form
                         $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_stayedtillend'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_tillend" . $tillend_false . ".jpg\" /></span>&nbsp;";
                         $eventkey++;
                     } else {
                         $tooltip_h = $wordings[$roster_conf['roster_lang']]['dkpw_event'] . " - DKP: " . number_format(0, 2, '.', '');
                         // Put the event in the form
                         $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_nottillend'] . "',CAPTION,'" . $tooltip_h . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_tillend" . $tillend_false . ".jpg\" /></span>&nbsp;";
                     }
                 }
                 // Did Player kill any bosses ?
                 if ($playerval['percentage'] > $addon_conf['dkpattpercentage']) {
                     $bossdkptotal = 0.0;
                     $bosstooltip = '';
                     if (is_array($this->raid_form_hidden['boss'])) {
                         foreach ($this->raid_form_hidden['boss'] as $bosskey => $bossval) {
                             if ($this->was_player_present($playerval, $bossval['time'])) {
                                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['type'] = 'bosskill';
                                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['reference'] = $bosskey;
                                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'] = $bossval['dkp_value'];
                                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['start'] = $bossval['time'];
                                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['end'] = $bossval['time'];
                                 $this->raid_form_hidden['events'][$playerkey][$eventkey]['note'] = $bossval['name'];
                                 // Set the boss tooltip
                                 if (floatval($bossdkptotal) > 0) {
                                     $bosstooltip .= '<br>';
                                 }
                                 $bosstooltip .= addslashes(stripslashes($playerval['name'])) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_killedboss'] . ' ' . addslashes(stripslashes($this->raid_form_hidden['events'][$playerkey][$eventkey]['note'])) . "&nbsp;&nbsp;&nbsp;DKP: " . $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'];
                                 $bossdkptotal += $this->raid_form_hidden['events'][$playerkey][$eventkey]['dkp_value'];
                                 $eventkey++;
                             }
                         }
                     }
                     // If there were boss kills, display the appropiate tooltip
                     if (floatval($bossdkptotal) > 0) {
                         $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . $bosstooltip . "',CAPTION,'" . $wordings[$roster_conf['roster_lang']]['dkpw_killedboss'] . " " . $wordings[$roster_conf['roster_lang']]['dkpw_totaldkp'] . ": " . number_format($bossdkptotal, 2, '.', '') . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_bosskill.jpg\" /></span>";
                         $dkptotal += $bossdkptotal;
                     } else {
                         $bosstooltip .= stripslashes($playerval['name']) . " " . $wordings[$roster_conf['roster_lang']]['dkpw_notkillboss'] . "&nbsp;&nbsp;&nbsp;DKP: 0.00";
                         $this->form .= "<span style=\"cursor: help;\" onmouseover=\"overlib('" . $bosstooltip . "',CAPTION,'" . $wordings[$roster_conf['roster_lang']]['dkpw_notkillboss'] . " " . $wordings[$roster_conf['roster_lang']]['dkpw_totaldkp'] . ": " . number_format(0, 2, '.', '') . "',WRAP);\" onmouseout=\"return nd();\"><img class=\"membersRowimg\" width=\"" . $addon_conf['iconsize'] . "px\" height=\"" . $addon_conf['iconsize'] . "px\" src=\"" . $addonDir . "/img/event_bosskill_false.jpg\" /></span>";
                     }
                 }
                 $this->form .= "</td>";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $playerval['join']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $playerval['leave']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">" . number_format($dkptotal, 2, '.', '') . "</td>\n";
                 $this->form .= "</tr>";
                 // Swap $row for the next
                 if ($row == 1) {
                     $row = 2;
                 } else {
                     $row = 1;
                 }
             }
             // Serialize the input field for the form to limit the number of post-variables.
             $this->form .= "<input name=\"memberarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['member'])) . "\" />\n";
             $this->form .= "<input name=\"eventsarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['events'])) . "\" />\n";
         }
         // End of Players Box
         $this->form .= "</table>\n";
         $this->form .= border('syellow', 'end') . "\n";
         // Begin of the Loot Box
         $this->raid_form_hidden['loot'] = array();
         $row = 1;
         $this->form .= "<br>" . border('spurple', 'start', $wordings[$roster_conf['roster_lang']]['rosterdkp_lootdetails']) . "\n";
         $this->form .= "<table width=\"1000\" class=\"bodyline\" cellspacing=\"0\" cellpadding=\"0\">\n";
         $this->form .= "<tr>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['item'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['loot_time'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['dropped_by'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['rosterdkp_raidzone'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['looted_by'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['CTRA'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['cache'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['store'] . "</td>\n";
         $this->form .= "<td class=\"membersHeader\">" . $wordings[$roster_conf['roster_lang']]['charge'] . "</td>\n";
         $this->form .= "</tr>\n";
         // Sort the array by color, name and time
         foreach ($this->items as $key => $sortrow) {
             $itemquality[$key] = $sortrow['quality'];
             $itemname[$key] = $sortrow['name'];
             $itemtime[$key] = strtotime($sortrow['time']);
         }
         array_multisort($itemquality, SORT_DESC, $itemname, SORT_ASC, $itemtime, SORT_ASC, $this->items);
         foreach ($this->items as $itemkey => $itemval) {
             $item_from_cache = getitemcache($itemval['id']['itemid'] . ':' . $itemval['id']['enchantid'] . ':' . $itemval['id']['suffixid'] . ':0', $itemval['name'], '', $itemval['quality'], $itemval['color'], $itemval['texture']);
             // Check if the quality is sufficient to show/charge the player at all
             // And that the item is not on the ignore list, or even on the forced list!
             if ($itemval['quality'] >= $addon_conf['qualityfilter'] && !in_array($itemval['id']['itemid'], $options['items_ignored']) || in_array($itemval['id']['itemid'], $options['items_forced'])) {
                 $itemdisplay = new itemlink($item_from_cache);
                 $itemcolor = substr($itemval['color'], 2, 6);
                 $this->form .= "<tr>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . $itemdisplay->display('both', true) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . date("Y-m-d H:i", $itemval['time']) . "</td>\n";
                 if (isset($itemval['boss']) && $itemval['boss'] != '') {
                     $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: #d9b200;\">" . stripslashes($itemval['boss']) . "</td>\n";
                 } else {
                     $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($wordings[$roster_conf['roster_lang']]['random_mob']) . "</td>\n";
                 }
                 //$item_from_cache['dkp_value']
                 if (floatval($item_from_cache['dkp_value']) > 0) {
                     $item_post_val = $item_from_cache['dkp_value'];
                 } else {
                     $item_post_val = $itemval['dkp_value'];
                 }
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($this->zone_name) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\">" . stripslashes($itemval['looter']) . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: #d9b200; text-align: right;\">" . number_format($itemval['dkp_value'], 2, '.', '') . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: red; text-align: right;\">" . number_format($item_from_cache['dkp_value'], 2, '.', '') . "</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"color: green; text-align: right;\">\n";
                 $this->form .= "<input name=\"loot[" . $itemkey . "][dkp_realvalue]\" type=\"text\" size=\"5\" value=\"" . number_format($item_post_val, 2, '.', '') . "\" />\n</td>\n";
                 $this->form .= "<td class=\"membersRowRight" . $row . "\" style=\"text-align: left;\">\n<table>";
                 $this->form .= "<tr><td style=\"text-align: left; font-size: 8pt; color: #d9b200;\"><input name=\"loot[" . $itemkey . "][charge]\" type=\"radio\" checked size=\"5\" value=\"player\" /></td>\n<td style=\"text-align: left; font-size: 8pt; color: #d9b200;\">" . $wordings[$roster_conf['roster_lang']]['player'] . "</td>\n</tr>\n";
                 $this->form .= "<tr><td style=\"text-align: left; font-size: 8pt; color: #00ff00;\"><input name=\"loot[" . $itemkey . "][charge]\" type=\"radio\" size=\"5\" value=\"bank\" /></td>\n<td style=\"text-align: left; font-size: 8pt; color: #00ff00;\">" . $wordings[$roster_conf['roster_lang']]['dkpw_nocharge'] . "</td>\n</tr>\n";
                 $this->form .= "<tr><td style=\"text-align: left; font-size: 8pt; color: #00ff00;\"><input name=\"loot[" . $itemkey . "][charge]\" type=\"radio\" size=\"5\" value=\"ignore\" /></td>\n<td style=\"text-align: left; font-size: 8pt; color: #a335ee;\">" . $wordings[$roster_conf['roster_lang']]['dkpw_ignore'] . "</td>\n</tr>\n";
                 $this->form .= "</table>\n</td>\n";
                 $this->form .= "</tr>\n";
             } else {
                 $this->form .= "<input name=\"loot[" . $itemkey . "][charge]\" type=\"hidden\" value=\"bank\" />\n";
             }
             // Fill the hidden values into an array to serialize
             $this->raid_form_hidden['loot'][$itemkey]['name'] = $itemval['item_name'];
             $this->raid_form_hidden['loot'][$itemkey]['itemid'] = $itemval['id']['itemid'] . ':' . $itemval['id']['enchantid'] . ':' . $itemval['id']['suffixid'];
             $this->raid_form_hidden['loot'][$itemkey]['time'] = $itemval['time'];
             $this->raid_form_hidden['loot'][$itemkey]['zone'] = $itemval['zone'];
             $this->raid_form_hidden['loot'][$itemkey]['note'] = $itemval['note'];
             $this->raid_form_hidden['loot'][$itemkey]['playerid'] = $itemval['playerid'];
             $this->raid_form_hidden['loot'][$itemkey]['bossid'] = $itemval['bossid'];
             // Swap $row for the next
             if ($row == 1) {
                 $row = 2;
             } else {
                 $row = 1;
             }
         }
         // Serialize the input field for the form to limit the number of post-variables.
         $this->form .= "<input name=\"lootarray\" type=\"hidden\" value=\"" . urlencode(implode_assoc_r2($this->raid_form_hidden['loot'])) . "\" />\n";
         //$this->form .=
         // End of Loot Box
         $this->form .= "</table>\n";
         $this->form .= border('spurple', 'end') . "<br />\n";
     } else {
         $this->error .= "No correct END and/or START time was found in the raid!";
         $this->form .= "No correct END and/or START time was found in the raid!";
     }
 }