if ($img) { imagejpeg($img, $imgJPG, 95); } break; case 'image/gif': $img = imagecreatefromgif($_FILES['JPG']['tmp_name'][$edit]); if ($img) { imagejpeg($img, $imgJPG, 95); } break; case 'image/jpg': case 'image/jpeg': $imgJPG = $_FILES['JPG']['tmp_name'][$edit]; break; default: debug_svela($_FILES['JPG']); cd_redirect('Countries.php#' . $edit); } $Image = addslashes(base64_encode(file_get_contents($imgJPG))); safe_w_sql("insert into Flags set FlCode='{$edit}', FlJPG='{$Image}', FlTournament={$_SESSION['TourId']} " . " on duplicate key update FlJPG='{$Image}'"); unlink($imgJPG); } cd_redirect('Countries.php#' . $edit); } require_once 'Common/CheckPictures.php'; CheckPictures(); $PAGE_TITLE = get_text('TourCountries', 'Tournament'); include 'Common/Templates/head.php'; echo '<form method="POST" ENCTYPE="multipart/form-data">'; echo '<table class="Tabella">'; echo '<tr>';
function getScheduleBoinx() { $nDay = 0; $ret = array(); foreach ($this->GetSchedule() as $Date => $Times) { $nDay++; $nGroup = 0; $n = 0; $OldTitle = ''; $OldSubTitle = ''; $OldType = ''; $OldStart = ''; $OldEnd = ''; $IsTitle = false; $OldComment = ''; ksort($Times); foreach ($Times as $Time => $Sessions) { foreach ($Sessions as $Session => $Distances) { foreach ($Distances as $Distance => $Items) { foreach ($Items as $k => $Item) { $key = $Item->Day . '|' . $Time . '|' . $Session . '|' . $Distance . '|' . $Item->Order; $ActiveSession = in_array($key, $this->ActiveSessions); $LinTim = $Item->Start . ($Item->Duration ? '-' . addMinutes($Item->Start, $Item->Duration) : ''); $LinTit = ''; $LinSub = ''; $LinTxt = ''; if ($Item->Type == 'Z') { // free text $OldComment = ''; if ($OldTitle != $Item->Title and $Item->Title) { if (!$IsTitle) { $LinTit = $Item->Title; } $OldTitle = $Item->Title; $OldSubTitle = ''; $IsTitle = true; } if ($OldSubTitle != $Item->SubTitle and $Item->SubTitle) { $LinSub = $Item->SubTitle; $OldSubTitle = $Item->SubTitle; $IsTitle = false; } if ($Item->Text) { $LinTxt = $Item->Text; $IsTitle = false; } $OldStart = $Item->Start; $OldEnd = $Item->Duration; $ret[$nDay][] = array($Item->Day, $LinTim, $LinTit, $LinSub, $LinTxt, $ActiveSession); } else { // all other kind of texts have a title and the items if ($OldTitle != $Item->Title) { // Title if (!$IsTitle) { $LinTit = $Item->Title; } $OldTitle = $Item->Title; $OldSubTitle = ''; $IsTitle = true; } if ($OldSubTitle != $Item->SubTitle) { // SubTitle $LinSub = $Item->SubTitle; $OldSubTitle = $Item->SubTitle; $IsTitle = false; } // $timing=''; // if($OldStart != $Item->Start or $OldEnd != $Item->Duration) { // $timing=$Item->Start.($Item->Duration ? '-'.addMinutes($Item->Start, $Item->Duration) : ''); // $OldStart=$Item->Start; // $OldEnd=$Item->Duration; // } $lnk = $Item->Text; if (!$Item->Warmup) { // not warmup! $OldComment = ''; switch ($Item->Type) { case 'Q': case 'E': $lnk = ''; if ($Item->Comments) { $ret[$nDay][] = array($Item->Day, $LinTim, $LinTit, $LinSub, $Item->Comments, $ActiveSession); } if (count($this->Groups[$Item->Type][$Session]) == 1) { $txt = $Item->Text . $lnk; } elseif ($Item == @end(end(end(end($this->Groups[$Item->Type][$Session]))))) { $txt = get_text('Distance', 'Tournament') . ' ' . $Distance . $lnk; } else { $txt = get_text('Distance', 'Tournament') . ' ' . $Distance; // more distances defined so format is different... } $ret[$nDay][] = array($Item->Day, $LinTim, $LinTit, $LinSub, $txt, $ActiveSession); $IsTitle = false; break; case 'I': case 'T': $lnk = $Item->Text . ': ' . $Item->Events; $ret[$nDay][] = array($Item->Day, $LinTim, $LinTit, $LinSub, $lnk, $ActiveSession); $IsTitle = false; // debug_svela($Item); break; default: debug_svela($Item); } } else { if ($Item->Comments) { $lnk = $Item->Comments; } else { switch ($Item->Type) { case 'I': case 'T': $lnk = $Item->Text . ': ' . $Item->Events . ' ' . 'warmup'; break; default: $lnk .= ' Warmup'; } } if ($OldComment == $lnk) { continue; } $OldComment = $lnk; $ret[$nDay][] = array($Item->Day, $LinTim, $LinTit, $LinSub, $lnk, $ActiveSession); $IsTitle = false; } } } } } } } // debug_svela($ret); $XmlDoc = new DOMDocument('1.0', 'UTF-8'); $XmlRoot = $XmlDoc->createElement('schedule'); $XmlDoc->appendChild($XmlRoot); foreach ($ret as $nDay => $events) { $Day = $XmlDoc->createElement('day' . $nDay); $XmlRoot->AppendChild($Day); $nGroup = 0; foreach ($events as $n => $Item) { if ($n % 8 == 0) { $Group = $XmlDoc->createElement('groupevent' . ++$nGroup); $Day->AppendChild($Group); } $Line = $XmlDoc->createElement('event' . ($n % 8 + 1)); $Group->AppendChild($Line); $a = $XmlDoc->createElement('day'); $a->AppendChild($XmlDoc->createCDATASection($Item[0])); $Line->AppendChild($a); $a = $XmlDoc->createElement('time'); $a->AppendChild($XmlDoc->createCDATASection($Item[1])); $Line->AppendChild($a); $a = $XmlDoc->createElement('name'); $a->AppendChild($XmlDoc->createCDATASection($Item[2])); $Line->AppendChild($a); $a = $XmlDoc->createElement('sub'); $a->AppendChild($XmlDoc->createCDATASection($Item[3])); $Line->AppendChild($a); $a = $XmlDoc->createElement('details'); $a->AppendChild($XmlDoc->createCDATASection($Item[4])); $Line->AppendChild($a); $a = $XmlDoc->createElement('on', $Item[5] ? 1 : 0); $Line->AppendChild($a); } } return $XmlDoc; }
while ($r = safe_fetch($q)) { $val = array(); if (preg_match("/\\(([0-9.]+)\\)/", $r->Type, $val)) { $val = $val[1]; } switch ($r->Field) { case 'FinArrowstring': case 'TfArrowstring': $MaxArrowString = $val; break; case 'FinTiebreak': case 'TfTiebreak': $MaxSOString = $val; break; default: debug_svela($r); } } if (isset($_REQUEST['Command'])) { if ($_REQUEST['Command'] == 'SAVE') { // If bit is set than it is an elimiatory phase!!! $BitMask = 255; for ($n = 0; $n < 8; $n++) { //print 'n: '.$n.'<br>'; if (isset($_REQUEST['d_EvMatchArrowsNo_' . $n])) { if (intval($_REQUEST['d_EvMatchArrowsNo_' . $n])) { // bit is set! $BitMask = $BitMask | pow(2, $n); } else { $BitMask = $BitMask & ~pow(2, $n); }
function DoZSchedule($Item) { $Field = key($Item); switch ($Field) { case 'Day': $ret = InsertTextDate(current($Item)); break; case 'Start': $ret = InsertTextTime(current($Item)); break; case 'Order': $ret = InsertTextDuration(current($Item), true); break; case 'Duration': $ret = InsertTextDuration(current($Item)); break; case 'Shift': $ret = InsertTextShift(current($Item)); break; case 'Title': $ret = InsertText(current($Item), 'Title'); break; case 'SubTitle': $ret = InsertText(current($Item), 'SubTitle'); break; case 'Text': $ret = InsertText(current($Item), 'Text'); break; default: debug_svela($Field); } out($ret); }
*/ $x = empty($_REQUEST['x']) ? -1 : $_REQUEST['x']; $y = empty($_REQUEST['y']) ? -1 : $_REQUEST['y']; $w = empty($_REQUEST['w']) ? 300 : $_REQUEST['w']; $h = $w * (4 / 3); $athId = empty($_REQUEST['AthId']) || $_REQUEST['AthId'] == 0 ? null : $_REQUEST['AthId']; //$camurl=(empty($_REQUEST['url']) ? "http://*****:*****@fopen($camurl, "r"); if (!$camurl or !$f) { debug_svela(error_get_last()); //**** cannot open $im = imagecreatetruecolor(640, 480); $col = imagecolorallocate($im, 128, 128, 128); imagefilledrectangle($im, 0, 0, 640, 480, $col); header("Content-type: image/png"); imagepng($im); imagedestroy($im); } else { $r = ""; $im = null; if (preg_match('/\\.jpg$/i', $camurl) != 0) { while (!feof($f)) { $r .= fread($f, 4096); } $im = imagecreatefromstring($r);
function CheckDbStructure() { global $CFG; if (!file_exists($CFG->DOCUMENT_PATH . 'Common/DbStruct.inc.php') or !($IanseoTables = unserialize(file_get_contents($CFG->DOCUMENT_PATH . 'Common/DbStruct.inc.php')))) { PrintCrackError('', 'InvalidIanseo'); } if ($IanseoTables->ProgramVersion != ProgramVersion or $IanseoTables->ProgramName != ProgramName) { PrintCrackError('', 'PrgVersMismatch'); } foreach ($IanseoTables->Data as $Table => $data) { $passed = false; $t = safe_w_sql("show create table `{$Table}`", '', array(1146)); if ($u = safe_fetch($t)) { if (!empty($u->{'Create View'})) { $u->{'Create View'} = preg_replace('/CREATE .* `' . $u->{'View'} . '`/', 'CREATE VIEW `' . $u->{'View'} . '`', $u->{'Create View'}); if ($u->{'Create View'} != $data->{'Create View'}) { debug_svela('REBUILD VIEW: STOPS HERE AS A DEVELOPMENT FEATURE'); // rebuild the view safe_w_sql("drop view {$Table}"); safe_w_sql($data->{'Create View'}); } } else { if ($u->{'Create Table'} != $data->{'Create Table'}) { // recreates the table debug_svela('RECREATES TABLE: STOPS HERE AS A DEVELOPMENT FEATURE'); safe_w_sql("alter table `{$Table}` rename `old_{$Table}`"); safe_w_sql($data->{'Create Table'}); $old = safe_r_sql("show fields in `old_{$Table}`"); $new = safe_r_sql("show fields in `{$Table}`"); $NewTable = array(); while ($newRow = safe_fetch($new)) { $NewTable[] = $newRow->Field; } while ($oldRow = safe_fetch($old)) { if (!in_array($oldRow->Field, $NewTable)) { PrintCrackError('', 'DbTooMessy'); } } safe_w_sql("insert into `{$Table}` (`" . implode('`, `', $NewTable) . "`) select `" . implode('`, `', $NewTable) . "` from `old_{$Table}`"); // safe_w_sql("drop table `old_$Table`"); } } } else { PrintCrackError('', 'InvalidIanseo'); } } }
} elseif ($Element->Options['Col']) { $pdf->setColor('text', hexdec(substr($Element->Options['Col'], 1, 2)), hexdec(substr($Element->Options['Col'], 3, 2)), hexdec(substr($Element->Options['Col'], 5, 2))); } else { $pdf->setColor('text', 0, 0, 0); } $style = array('border' => 2, 'vpadding' => 'auto', 'hpadding' => 'auto', 'fgcolor' => array(0, 0, 0), 'bgcolor' => array(255, 255, 255), 'module_width' => 1, 'module_height' => 1); if ($Element->Options['BackCol']) { $style['bgcolor'] = array(hexdec(substr($Element->Options['BackCol'], 1, 2)), hexdec(substr($Element->Options['BackCol'], 3, 2)), hexdec(substr($Element->Options['BackCol'], 5, 2))); } if ($Element->Options['Col']) { $style['fgcolor'] = array(hexdec(substr($Element->Options['Col'], 1, 2)), hexdec(substr($Element->Options['Col'], 3, 2)), hexdec(substr($Element->Options['Col'], 5, 2))); } $pdf->write2DBarcode($MyRow->Bib . '-' . $MyRow->DivCode . '-' . $MyRow->ClassCode, 'QRCODE,L', $ElX, $ElY, $Element->Options['W'], $Element->Options['H'], $style, 'N'); break; default: debug_svela($Element, $MyRow); } } // $ImgSxSize= NULL; // $ImgDxSize= NULL; // $ImgLowSize= NULL; // if(!empty($pdf->ToPaths['ToLeft'])) $ImgSxSize=getimagesize($pdf->ToPaths['ToLeft']); // if(!empty($pdf->ToPaths['ToRight'])) $ImgDxSize=getimagesize($pdf->ToPaths['ToRight']); // if(!empty($pdf->ToPaths['ToBottom'])) $ImgLowSize=getimagesize($pdf->ToPaths['ToBottom']); // if(is_file($file=$CFG->DOCUMENT_PATH.'TV/Photos/TV-'.$_SESSION["TourCodeSafe"].'-IdCardFooter.jpg')) { // $pdf->ToPaths['ToBottom']=$file; // $ImgLowSize=getimagesize($pdf->ToPaths['ToBottom']); // } // switch($BadgePerPage) { // case 1: // $AccH = $pdf->getPageHeight()-10;
case 'firstname': $FIELD = 'EnFirstname'; $resetPrintBadge = true; $value = AdjustCaseTitle($value); break; case 'name': $FIELD = 'EnName'; $resetPrintBadge = true; $value = AdjustCaseTitle($value); break; case 'email': $FIELD = 'EdEmail'; $value = strtolower($value); break; default: debug_svela($field); } if ($field == 'email') { if ($Errore) { $q = safe_r_sql("select {$FIELD} WhichField from Entries left join ExtraData on EdType='E' and EdId=EnId where EnId={$ID}"); if ($r = safe_fetch($q)) { $value = $r->WhichField; } else { $value = ''; } } else { if ($ID) { // update safe_w_sql("insert into ExtraData set {$FIELD}=" . StrSafe_DB($value) . ", EdId={$ID},EdType='E' on duplicate key update {$FIELD}=" . StrSafe_DB($value) . ""); } }
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; }