function draw_pip($r) { global $img, $ColBlk, $CFG; static $Fonts = array('arial', 'times', 'cour'); $Options = unserialize($r->IceOptions); switch ($r->IceType) { case 'ToLeft': case 'ToRight': case 'ToBottom': $im = $CFG->DOCUMENT_PATH . "TV/Photos/{$_SESSION['TourCodeSafe']}-{$r->IceType}.jpg"; case 'Picture': if (!isset($im)) { $im = $CFG->DOCUMENT_PATH . "Common/Images/Photo.jpg"; } case 'Image': if (!isset($im)) { $im = $CFG->DOCUMENT_PATH . 'TV/Photos/' . $_SESSION['TourCodeSafe'] . '-Image-' . $r->IceOrder . '.jpg'; } if (file_exists($im)) { $im2 = imagecreatefromjpeg($im); if ($Options['H'] or $Options['W']) { $h = $Options['H'] * 2; $w = $Options['W'] * 2; if (!$h) { $h = $w * imagesy($im2) / imagesx($im2); } elseif (!$w) { $w = $h * imagesx($im2) / imagesy($im2); } imagecopyresampled($img, $im2, $Options['X'] * 2, $Options['Y'] * 2, 0, 0, $w, $h, imagesx($im2), imagesy($im2)); } } break; case 'ColoredArea': $Text = trim($r->IceContent); case 'CompName': if (!isset($Text)) { $Text = $_SESSION['TourName']; } case 'CompDetails': if (!isset($Text)) { $Text = $_SESSION['TourWhere'] . ' - ' . TournamentDate2StringShort($_SESSION['TourWhenFrom'], $_SESSION['TourWhenTo']); } case 'Athlete': if (!isset($Text)) { switch ($r->IceContent) { case 'FamCaps': $Text = get_text('FamCaps', 'BackNumbers'); break; case 'FamCaps-GAlone': $Text = get_text('FamCaps-GAlone', 'BackNumbers'); break; case 'FamCaps-GivCamel': $Text = get_text('FamCaps-GivCamel', 'BackNumbers'); break; case 'FamCaps-GivCaps': $Text = get_text('FamCaps-GivCaps', 'BackNumbers'); break; case 'FamCamel': $Text = get_text('FamCamel', 'BackNumbers'); break; case 'FamCamel-GAlone': $Text = get_text('FamCamel-GAlone', 'BackNumbers'); break; case 'FamCamel-GivCamel': $Text = get_text('FamCamel-GivCamel', 'BackNumbers'); break; case 'GivCamel': $Text = get_text('GivCamel', 'BackNumbers'); break; case 'GivCamel-FamCamel': $Text = get_text('GivCamel-FamCamel', 'BackNumbers'); break; case 'GivCamel-FamCaps': $Text = get_text('GivCamel-FamCaps', 'BackNumbers'); break; case 'GivCaps': $Text = get_text('GivCaps', 'BackNumbers'); break; case 'GivCaps-FamCaps': $Text = get_text('GivCaps-FamCaps', 'BackNumbers'); break; case 'GAlone-FamCaps': $Text = get_text('GAlone-FamCaps', 'BackNumbers'); break; case 'GAlone-FamCamel': $Text = get_text('GAlone-FamCamel', 'BackNumbers'); break; } } case 'Club': if (!isset($Text)) { switch ($r->IceContent) { case 'NocCaps-ClubCamel': $Text = get_text('NocCaps-ClubCamel', 'BackNumbers'); break; case 'NocCaps-ClubCaps': $Text = get_text('NocCaps-ClubCaps', 'BackNumbers'); break; case 'NocCaps': $Text = get_text('NocCaps', 'BackNumbers'); break; case 'ClubCamel': $Text = get_text('ClubCamel', 'BackNumbers'); break; case 'ClubCaps': $Text = get_text('ClubCaps', 'BackNumbers'); break; } } case 'AthCode': if (!isset($Text)) { $Text = 'test123'; } case 'Category': if (!isset($Text)) { $Text = get_text('Category', 'BackNumbers'); } case 'Session': if (!isset($Text)) { $Text = get_text('Session'); } case 'Access': if (!isset($Text)) { $Text = '0/9*'; } if ($Text) { // Calculate the dimensions of the box containing the text $font = dirname(dirname(__FILE__)) . "/Common/pdf/fonts/{$Options['Font']}.ttf"; $size = $Options['Size'] * 0.35278 * 2; $pos = imagettfbbox($size, 0, $font, $Text); $width = $pos[4] - $pos[0]; $height = $pos[1] - $pos[5]; // debug_svela($pos); $y = ($Options['H'] * 2 - $height) / 2; switch ($Options['Just']) { case 1: $x = ($Options['W'] * 2 - $width) / 2; break; // centered // centered case 2: $x = $Options['W'] * 2 - $width; break; // left // left default: $x = 0; break; // right } $txt1 = imagecreatetruecolor($Options['W'] * 2, $Options['H'] * 2); $Back = imagecolorallocate($txt1, 250, 250, 250); // background imagefill($txt1, 0, 0, $Back); if ($Options['Col']) { $color = imagecolorallocate($txt1, hexdec(substr($Options['Col'], 1, 2)), hexdec(substr($Options['Col'], 3, 2)), hexdec(substr($Options['Col'], 5, 2))); } else { $color = imagecolorallocate($txt1, 0, 0, 0); // black } if ($Options['BackCol']) { $colb = imagecolorallocate($txt1, hexdec(substr($Options['BackCol'], 1, 2)), hexdec(substr($Options['BackCol'], 3, 2)), hexdec(substr($Options['BackCol'], 5, 2))); imagefill($txt1, 0, 0, $colb); } elseif (!empty($Options['BackCat'])) { for ($i = 0; $i < imagesx($txt1); $i += 10) { for ($j = 0; $j < imagesy($txt1); $j += 5) { $Offset = $j % 2 == 0; imagefilledrectangle($txt1, $i + 5 * $Offset, $j, $i + 4 + 5 * $Offset, $j + 4, $ColBlk); } } } else { imagecolortransparent($txt1, $Back); } imagettftext($txt1, $size, 0, $x, $y + $size, $color, $font, $Text); imagecopymerge($img, $txt1, $Options['X'] * 2, $Options['Y'] * 2, 0, 0, $Options['W'] * 2, $Options['H'] * 2, 100); imagerectangle($img, $Options['X'] * 2, $Options['Y'] * 2, $Options['X'] * 2 + $Options['W'] * 2 - 1, $Options['Y'] * 2 + $Options['H'] * 2 - 1, $ColBlk); } else { if ($Options['BackCol']) { $color = imagecolorallocate($img, hexdec(substr($Options['BackCol'], 1, 2)), hexdec(substr($Options['BackCol'], 3, 2)), hexdec(substr($Options['BackCol'], 5, 2))); imagefilledrectangle($img, $Options['X'] * 2, $Options['Y'] * 2, $Options['X'] * 2 + $Options['W'] * 2 - 1, $Options['Y'] * 2 + $Options['H'] * 2 - 1, $color); } } break; case 'AthBarCode': $txt1 = imagecreatefrompng($CFG->DOCUMENT_PATH . 'Common/Images/edit-barcode.png'); case 'AthQrCode': if (!isset($txt1)) { $txt1 = imagecreatefromjpeg($CFG->DOCUMENT_PATH . 'Common/Images/qrcode.jpg'); } case 'Flag': if (!isset($txt1)) { $txt1 = imagecreatefromjpeg($CFG->DOCUMENT_PATH . 'Common/Images/Flag.jpg'); } case 'Accomodation': if (!isset($txt1)) { $txt1 = imagecreatefrompng($CFG->DOCUMENT_PATH . 'Common/Images/Accomodations.png'); } imagecopyresampled($img, $txt1, $Options['X'] * 2, $Options['Y'] * 2, 0, 0, $Options['W'] * 2, $Options['H'] * 2, imagesx($txt1), imagesy($txt1)); break; } return; // Calculate the dimensions of the box containing the text $font = dirname(dirname(__FILE__)) . "/Common/pdf/fonts/" . $Fonts[$RowBn->Settings[$Field . '_Font']] . ($RowBn->Settings[$Field . '_Bold'] ? $RowBn->Settings[$Field . '_Italic'] ? 'b' : 'bd' : '') . ($RowBn->Settings[$Field . '_Italic'] ? 'i' : '') . ".ttf"; $size = $RowBn->Settings[$Field . '_Size'] * 0.35278; $pos = imagettfbbox($size, 0, $font, trim($Name)); // debug_svela($font); $width = $pos[2] - $pos[0]; $height = $pos[1] - $pos[5]; $txt1 = imagecreatetruecolor($RowBn->Settings[$Field . '_W'], $RowBn->Settings[$Field . '_H']); $col0 = imagecolorallocate($txt1, 0, 0, 0); // black e sfondo $col2 = imagecolorallocate($txt1, 255, 255, 255); // white imagefilledrectangle($txt1, 0, 0, imagesx($txt1), imagesy($txt1), $col2); // background is white $col1 = imagecolorallocate($txt1, base_convert(substr($RowBn->Settings[$Field . '_Col'], 1, 2), 16, 10), base_convert(substr($RowBn->Settings[$Field . '_Col'], 3, 2), 16, 10), base_convert(substr($RowBn->Settings[$Field . '_Col'], 5, 2), 16, 10)); switch ($RowBn->Settings[$Field . '_Just']) { case 1: $x = ($RowBn->Settings[$Field . '_W'] - $width) / 2; break; // centered // centered case 2: $x = $RowBn->Settings[$Field . '_W'] - $width; break; // left // left default: $x = 0; break; // right } imagettftext($txt1, $size, 0, $x, $RowBn->Settings[$Field . '_H'] - 2, $col1, $font, $Name); imagecopy($img, $txt1, $RowBn->Settings[$Field . '_X'], $RowBn->Settings[$Field . '_Y'], 0, 0, $RowBn->Settings[$Field . '_W'], $RowBn->Settings[$Field . '_H']); imagerectangle($img, $RowBn->Settings[$Field . '_X'], $RowBn->Settings[$Field . '_Y'], $RowBn->Settings[$Field . '_X'] + $RowBn->Settings[$Field . '_W'] - 1, $RowBn->Settings[$Field . '_Y'] + $RowBn->Settings[$Field . '_H'] - 1, $ColBlk); }
$pdf->Image($im, $ElX, $ElY, $Element->Options['W'], $Element->Options['H']); $pdf->SetDrawColor(128); $pdf->Rect($ElX, $ElY, $Element->Options['W'], $Element->Options['H']); $pdf->SetDrawColor(0); } break; case 'ColoredArea': $Text = explode("\n", $Element->IceContent); $Element->Options['H'] = $Element->Options['H'] / count($Text); case 'CompName': if (!isset($Text)) { $Text = array($_SESSION['TourName']); } case 'CompDetails': if (!isset($Text)) { $Text = array($_SESSION['TourWhere'] . ' - ' . TournamentDate2StringShort($_SESSION['TourWhenFrom'], $_SESSION['TourWhenTo'])); } case 'AthCode': if (!isset($Text)) { $Text = array($MyRow->Bib); } case 'Athlete': if (!isset($Text)) { switch ($Element->IceContent) { case 'FamCaps': $Text = array($MyRow->FamCaps); break; case 'FamCaps-GAlone': $Text = array($MyRow->FamCaps . ' ' . substr($MyRow->GivCaps, 0, 1)); break; case 'FamCaps-GivCamel':
function Header() { global $CFG; $LeftStart = 10; $RightStart = 10; $ImgSizeReq = 20; //Immagini if ($this->ToPaths['ToLeft']) { $im = getimagesize($this->ToPaths['ToLeft']); $this->Image($this->ToPaths['ToLeft'], 10, 5, 0, $ImgSizeReq); $LeftStart += $im[0] * $ImgSizeReq / $im[1]; } if ($this->ToPaths['ToRight']) { $im = getimagesize($this->ToPaths['ToRight']); $this->Image($this->ToPaths['ToRight'], $this->w - 10 - $im[0] * $ImgSizeReq / $im[1], 5, 0, $ImgSizeReq); $RightStart += $im[0] * $ImgSizeReq / $im[1]; } //Where & When $this->SetXY($LeftStart, 5); $this->SetFont($this->FontStd, '', 10); $this->MultiCell(40, 5, $this->Where, 0, 'L'); $this->SetXY($LeftStart, 20); // patch $this->MultiCell(40, 5, TournamentDate2StringShort($this->DtFrom, $this->DtTo), 0, 'L'); //Competition Name $this->SetXY($LeftStart + 40, 5); $this->SetFont($this->FontStd, 'B', 11); $this->Cell($this->w - $LeftStart - $RightStart - 40, 5, $this->Name, 0, 0, 'L'); //Event Name if available if ($this->Event != '') { $this->SetXY($LeftStart + 40, 12.5); $this->SetFont($this->FontStd, 'B', 11); $this->Cell($this->w - $LeftStart - $RightStart - 40, 5, $this->Event, 0, 0, 'L'); } //Event Phase if available if ($this->EvPhase != '') { $this->SetXY($LeftStart + 40, 19.5); $this->SetFont($this->FontStd, 'B', 11); $this->Cell($this->w - $LeftStart - $RightStart - 40, 5, $this->EvPhase, 0, 0, 'L'); } //Linea di divisione $this->SetLineWidth(0.3); $this->Line(5, 30, $this->w - 5, 30); $this->SetLineWidth(0.1); //Report Title $this->SetXY(10, 30); $this->SetFont($this->FontStd, 'B', 12); $this->Cell(190, 7, mb_convert_case($this->Title, MB_CASE_UPPER, "UTF-8"), 0, 1, 'C'); //Comment if available if ($this->EvPhase != '') { $this->SetXY(145, 30); $this->SetFont($this->FontStd, 'B', 8); $this->Cell(60, 7, $this->EvComment, 0, 1, 'R'); } $this->SetFont($this->FontStd, '', 8); //Report Table Header if (count($this->HeaderSize) > 0) { $this->printHeader(OrisPDF::leftMargin, OrisPDF::topStart); } else { $this->lastY = OrisPDF::topStart - 1; } }
function getFieldPos($r) { global $CFG; $ret = '<tr> <th><a href="?delete=' . $r->IceOrder . '" onclick="return(confirm(\'' . get_text('MsgAreYouSure') . '\'))"><img src="' . $CFG->ROOT_DIR . 'Common/Images/drop.png"></a></th> <th><input type="hidden" name="Content[' . $r->IceOrder . '][Type]" value="' . $r->IceType . '"> <input type="text" size="3" name="Content[' . $r->IceOrder . '][Order]" value="' . $r->IceOrder . '"></th> <th>' . get_text($r->IceType, 'BackNumbers') . '</th>'; if ($r->IceOptions) { $Options = unserialize($r->IceOptions); } else { $Options = array('X' => 0, 'Y' => 0, 'W' => 0, 'H' => 0, 'Font' => 'arialbd', 'Col' => '#000000', 'BackCol' => '', 'BackCat' => '', 'Size' => 12, 'Just' => 0); } switch ($r->IceType) { case 'ToLeft': $im = "TV/Photos/{$_SESSION['TourCodeSafe']}-ToLeft.jpg"; case 'ToRight': if (!isset($im)) { $im = "TV/Photos/{$_SESSION['TourCodeSafe']}-ToRight.jpg"; } case 'ToBottom': if (!isset($im)) { $im = "TV/Photos/{$_SESSION['TourCodeSafe']}-ToBottom.jpg"; } case 'Picture': if (!isset($im)) { $im = "Common/Images/Photo.jpg"; } case 'Flag': if (!isset($im)) { $im = 'Common/Images/Flag.jpg'; } $ret .= '<td><img src="' . $CFG->ROOT_DIR . $im . '" height="50"></td> <td><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][X]" value="' . $Options['X'] . '"> <br/><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][Y]" value="' . $Options['Y'] . '"></td> <td><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][W]" value="' . $Options['W'] . '"> <br/><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][H]" value="' . $Options['H'] . '"></td>'; break; case 'ColoredArea': $txt = '<textarea name="Content[' . $r->IceOrder . '][Text]">' . $r->IceContent . '</textarea>'; case 'CompName': if (!isset($txt)) { $txt = $_SESSION['TourName']; } case 'CompDetails': if (!isset($txt)) { $txt = $_SESSION['TourWhere'] . ' - ' . TournamentDate2StringShort($_SESSION['TourWhenFrom'], $_SESSION['TourWhenTo']); } case 'AthCode': if (!isset($txt)) { $txt = 'Archer Code'; } case 'Access': if (!isset($txt)) { $txt = '0/9*'; } case 'Session': if (!isset($txt)) { $txt = get_text('Session'); } case 'Category': if (!isset($txt)) { $txt = get_text('Category', 'BackNumbers'); if (!$r->IceOptions) { $Options['BackCat'] = 1; } } case 'Athlete': if (!isset($txt)) { $txt = '<select name="Content[' . $r->IceOrder . '][Athlete]"> <option value="">--</option> <option value="FamCaps"' . ($r->IceContent == 'FamCaps' ? ' selected' : '') . '>' . get_text('FamCaps', 'BackNumbers') . '</option> <option value="FamCaps-GAlone"' . ($r->IceContent == 'FamCaps-GAlone' ? ' selected' : '') . '>' . get_text('FamCaps-GAlone', 'BackNumbers') . '</option> <option value="FamCaps-GivCaps"' . ($r->IceContent == 'FamCaps-GivCaps' ? ' selected' : '') . '>' . get_text('FamCaps-GivCaps', 'BackNumbers') . '</option> <option value="FamCaps-GivCamel"' . ($r->IceContent == 'FamCaps-GivCamel' ? ' selected' : '') . '>' . get_text('FamCaps-GivCamel', 'BackNumbers') . '</option> <option value="FamCamel"' . ($r->IceContent == 'FamCamel' ? ' selected' : '') . '>' . get_text('FamCamel', 'BackNumbers') . '</option> <option value="FamCamel-GAlone"' . ($r->IceContent == 'FamCamel-GAlone' ? ' selected' : '') . '>' . get_text('FamCamel-GAlone', 'BackNumbers') . '</option> <option value="FamCamel-GivCamel"' . ($r->IceContent == 'FamCamel-GivCamel' ? ' selected' : '') . '>' . get_text('FamCamel-GivCamel', 'BackNumbers') . '</option> <option value="GivCamel"' . ($r->IceContent == 'GivCamel' ? ' selected' : '') . '>' . get_text('GivCamel', 'BackNumbers') . '</option> <option value="GivCamel-FamCamel"' . ($r->IceContent == 'GivCamel-FamCamel' ? ' selected' : '') . '>' . get_text('GivCamel-FamCamel', 'BackNumbers') . '</option> <option value="GivCamel-FamCaps"' . ($r->IceContent == 'GivCamel-FamCaps' ? ' selected' : '') . '>' . get_text('GivCamel-FamCaps', 'BackNumbers') . '</option> <option value="GivCaps"' . ($r->IceContent == 'GivCaps' ? ' selected' : '') . '>' . get_text('GivCaps', 'BackNumbers') . '</option> <option value="GivCaps-FamCaps"' . ($r->IceContent == 'GivCaps-FamCaps' ? ' selected' : '') . '>' . get_text('GivCaps-FamCaps', 'BackNumbers') . '</option> <option value="GAlone-FamCaps"' . ($r->IceContent == 'GAlone-FamCaps' ? ' selected' : '') . '>' . get_text('GAlone-FamCaps', 'BackNumbers') . '</option> <option value="GAlone-FamCamel"' . ($r->IceContent == 'GAlone-FamCamel' ? ' selected' : '') . '>' . get_text('GAlone-FamCamel', 'BackNumbers') . '</option> </select>'; } case 'Club': if (!isset($txt)) { $txt = '<select name="Content[' . $r->IceOrder . '][Club]"> <option value="">--</option> <option value="NocCaps-ClubCamel"' . ($r->IceContent == 'NocCaps-ClubCamel' ? ' selected' : '') . '>' . get_text('NocCaps-ClubCamel', 'BackNumbers') . '</option> <option value="NocCaps-ClubCaps"' . ($r->IceContent == 'NocCaps-ClubCaps' ? ' selected' : '') . '>' . get_text('NocCaps-ClubCaps', 'BackNumbers') . '</option> <option value="NocCaps"' . ($r->IceContent == 'NocCaps' ? ' selected' : '') . '>' . get_text('NocCaps', 'BackNumbers') . '</option> <option value="ClubCamel"' . ($r->IceContent == 'ClubCamel' ? ' selected' : '') . '>' . get_text('ClubCamel', 'BackNumbers') . '</option> <option value="ClubCaps"' . ($r->IceContent == 'ClubCaps' ? ' selected' : '') . '>' . get_text('ClubCaps', 'BackNumbers') . '</option> </select>'; } $ret .= '<td>' . $txt . '</td> <td><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][X]" value="' . $Options['X'] . '"> <br/><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][Y]" value="' . $Options['Y'] . '"></td> <td><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][W]" value="' . $Options['W'] . '"> <br/><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][H]" value="' . $Options['H'] . '"></td> <td nowrap="nowrap"><input size="6" type="text" id="Content[' . $r->IceOrder . '][Options][Col]" name="Content[' . $r->IceOrder . '][Options][Col]" value="' . $Options['Col'] . '">' . ' <input type="text" id="Ex_' . $r->IceOrder . '_Col" size="1" style="background-color:' . $Options['Col'] . '" readonly>' . ' <img src="../Common/Images/sel.gif" onclick="javascript:pickerPopup302(\'Content[' . $r->IceOrder . '][Options][Col]\',\'Ex_' . $r->IceOrder . '_Col\');"> <br/><input size="6" type="text" id="Content[' . $r->IceOrder . '][Options][BackCol]" name="Content[' . $r->IceOrder . '][Options][BackCol]" value="' . $Options['BackCol'] . '">' . ' <input type="text" id="Ex_' . $r->IceOrder . '_BackCol" size="1" style="background-color:' . $Options['BackCol'] . '" readonly>' . ' <img src="../Common/Images/sel.gif" onclick="javascript:pickerPopup302(\'Content[' . $r->IceOrder . '][Options][BackCol]\',\'Ex_' . $r->IceOrder . '_BackCol\');"></td> <td><br/><input type="checkbox" name="Content[' . $r->IceOrder . '][Options][BackCat]"' . (empty($Options['BackCat']) ? '' : ' checked="checked"') . '></td> <td><select name="Content[' . $r->IceOrder . '][Options][Font]"> <option value="arial"' . ($Options['Font'] == 'arial' ? ' selected' : '') . '>Arial</option> <option value="arialbd"' . ($Options['Font'] == 'arialbd' ? ' selected' : '') . '>Arial Bold</option> <option value="ariali"' . ($Options['Font'] == 'ariali' ? ' selected' : '') . '>Arial Italic</option> <option value="arialbi"' . ($Options['Font'] == 'arialbi' ? ' selected' : '') . '>Arial Bold Italic</option> <option value="times"' . ($Options['Font'] == 'times' ? ' selected' : '') . '>Times</option> <option value="timesbd"' . ($Options['Font'] == 'timesbd' ? ' selected' : '') . '>Times Bold</option> <option value="timesi"' . ($Options['Font'] == 'timesi' ? ' selected' : '') . '>Times Italic</option> <option value="timesbi"' . ($Options['Font'] == 'timesbi' ? ' selected' : '') . '>Times Bold Italic</option> <option value="cour"' . ($Options['Font'] == 'cour' ? ' selected' : '') . '>Courier</option> <option value="courbd"' . ($Options['Font'] == 'courbd' ? ' selected' : '') . '>Courier Bold</option> <option value="couri"' . ($Options['Font'] == 'couri' ? ' selected' : '') . '>Courier Italic</option> <option value="courbi"' . ($Options['Font'] == 'courbi' ? ' selected' : '') . '>Courier Bold Italic</option> </select></td> <td><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][Size]" value="' . $Options['Size'] . '"></td> <td><select name="Content[' . $r->IceOrder . '][Options][Just]"> <option value="0"' . ($Options['Just'] == 0 ? ' selected' : '') . '>' . get_text('AlignL', 'BackNumbers') . '</option> <option value="1"' . ($Options['Just'] == 1 ? ' selected' : '') . '>' . get_text('AlignC', 'BackNumbers') . '</option> <option value="2"' . ($Options['Just'] == 2 ? ' selected' : '') . '>' . get_text('AlignR', 'BackNumbers') . '</option> </select></td>'; break; case 'AthBarCode': $im = 'Common/Images/edit-barcode.png'; case 'AthQrCode': if (!isset($im)) { $im = 'Common/Images/qrcode.jpg'; } case 'Accomodation': if (!isset($im)) { $im = 'Common/Images/Accomodations.png'; } case 'Image': if (!isset($im)) { $im = ''; if (file_exists($CFG->DOCUMENT_PATH . "TV/Photos/{$_SESSION['TourCodeSafe']}-Image-" . $r->IceOrder . ".jpg")) { $im = "TV/Photos/{$_SESSION['TourCodeSafe']}-Image-" . $r->IceOrder . ".jpg"; } elseif ($r->IceContent) { if ($r->IceContent and $img = @imagecreatefromstring($r->IceContent)) { imagejpeg($img, $CFG->DOCUMENT_PATH . 'TV/Photos/' . $_SESSION['TourCodeSafe'] . '-Image-' . $r->IceOrder . '.jpg', 90); $im = "TV/Photos/{$_SESSION['TourCodeSafe']}-Image-" . $r->IceOrder . ".jpg"; } } } $ret .= '<td>' . (empty($im) ? '<input type="file" name="Content[' . $r->IceOrder . '][Image]">' : '<img src="' . $CFG->ROOT_DIR . $im . '" height="50">') . '</td> <td><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][X]" value="' . $Options['X'] . '"> <br/><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][Y]" value="' . $Options['Y'] . '"></td> <td><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][W]" value="' . $Options['W'] . '"> <br/><input size="3" type="text" name="Content[' . $r->IceOrder . '][Options][H]" value="' . $Options['H'] . '"></td> <td nowrap="nowrap"><input size="6" type="text" id="Content[' . $r->IceOrder . '][Options][Col]" name="Content[' . $r->IceOrder . '][Options][Col]" value="' . $Options['Col'] . '">' . ' <input type="text" id="Ex_' . $r->IceOrder . '_Col" size="1" style="background-color:' . $Options['Col'] . '" readonly>' . ' <img src="../Common/Images/sel.gif" onclick="javascript:pickerPopup302(\'Content[' . $r->IceOrder . '][Options][Col]\',\'Ex_' . $r->IceOrder . '_Col\');"> <br/><input size="6" type="text" id="Content[' . $r->IceOrder . '][Options][BackCol]" name="Content[' . $r->IceOrder . '][Options][BackCol]" value="' . $Options['BackCol'] . '">' . ' <input type="text" id="Ex_' . $r->IceOrder . '_BackCol" size="1" style="background-color:' . $Options['BackCol'] . '" readonly>' . ' <img src="../Common/Images/sel.gif" onclick="javascript:pickerPopup302(\'Content[' . $r->IceOrder . '][Options][BackCol]\',\'Ex_' . $r->IceOrder . '_BackCol\');"></td> <td><br/><input type="checkbox" name="Content[' . $r->IceOrder . '][Options][BackCat]"' . (empty($Options['BackCat']) ? '' : ' checked="checked"') . '></td> <td></td> <td></td> <td></td>'; break; default: debug_svela($r); } $ret . '</tr>'; return $ret; }