Exemplo n.º 1
0
function getuserinfo($userid)
{
    global $db, $cfg;
    $row_poster = $db->qry_first("SELECT username, type, avatar_path, signature FROM %prefix%user WHERE userid=%int%", $userid);
    $count_rows = $db->qry_first("SELECT COUNT(*) AS posts FROM %prefix%board_posts WHERE userid = %int%", $userid);
    $html_image = '<img src="%s" alt="%s" border="0">';
    $user["username"] = $row_poster["username"];
    $user["avatar"] = func::chk_img_path($row_poster["avatar_path"]) ? sprintf($html_image, $row_poster["avatar_path"], "") : "";
    $user["signature"] = $row_poster["signature"];
    if ($cfg['board_ranking'] == TRUE) {
        $user["rank"] = getboardrank($count_rows["posts"]);
    }
    $user["posts"] = $count_rows["posts"];
    switch ($row_poster["type"]) {
        case 1:
            $user["type"] = t('Benutzer');
            break;
        case 2:
            $user["type"] = t('Organisator');
            break;
        case 3:
            $user["type"] = t('Superadmin');
            break;
    }
    return $user;
}
Exemplo n.º 2
0
function FetchDataRow($username)
{
    global $func, $dsp, $line;
    $html_image = '<img src="%s" alt="%s" border="0">';
    $avatar = func::chk_img_path($line['avatar_path']) ? sprintf($html_image, $line['avatar_path'], t('Avatar')) : '';
    if ($line['userid']) {
        $ret .= $dsp->FetchUserIcon($line['userid'], $username);
    } else {
        $ret = '<i>' . t('Gast') . '</i>';
    }
    $ret .= HTML_NEWLINE;
    $ret .= $func->unixstamp2date($line['date'], datetime) . HTML_NEWLINE;
    if ($avatar) {
        $ret .= $avatar . HTML_NEWLINE;
    }
    return $ret;
}
Exemplo n.º 3
0
            case 'it':
                $GCountry = 'Italy';
                break;
            case 'fr':
                $GCountry = 'France';
                break;
            default:
                $GCountry = 'Germany';
                break;
        }
        $text = "<b>{$row['username']}</b>";
        if ($cfg['guestlist_shownames']) {
            $text .= "<br>{$row['firstname']} {$row['name']}";
        }
        $text .= "<br>{$row['plz']} {$row['city']}";
        if (func::chk_img_path($row['avatar_path'])) {
            $text .= '<br>' . sprintf('<img src=\\"%s\\" alt=\\"%s\\" border=\\"0\\">', $row["avatar_path"], '');
        }
        $adresses .= "showAddress('{$GCountry}', '{$row['city']}', '{$row['plz']}', '{$row['street']}', '{$row['hnr']}', '{$text}');\r\n";
    }
    $db->free_result($haus_data);
    $smarty->assign('adresses', $adresses);
    $smarty->assign('apikey', $cfg['google_maps_api_key']);
    $dsp->AddSingleRow($smarty->fetch('modules/guestlist/templates/googlemaps.htm'));
    //}
    // Use Geofreedb
} else {
    $res = $db->qry("SELECT plz FROM %prefix%user LEFT JOIN %prefix%party_user ON userid = user_id WHERE (plz > 0) AND (party_id = %int%)", $party->party_id);
    $res3 = $db->qry_first("SELECT laenge, breite FROM %prefix%locations WHERE plz = %int%", $_SESSION['party_info']['partyplz']);
    $pi = pi();
    if ($db->num_rows($res) == 0) {
Exemplo n.º 4
0
     if ($auth['type'] >= 3) {
         $ms2->AddIconField('delete', 'index.php?mod=clanmgr&step=20&clanid=', t('Löschen'));
     }
     if ($auth['type'] >= 3) {
         $ms2->AddMultiSelectAction(t('Löschen'), 'index.php?mod=clanmgr&step=20', 1);
     }
     $ms2->PrintSearch('index.php?mod=clanmgr', 'c.clanid');
     if ($auth['type'] >= 1) {
         $dsp->AddSingleRow($dsp->FetchSpanButton(t('Hinzufügen'), 'index.php?mod=clanmgr&step=30'));
     }
     break;
     // Details
 // Details
 case 2:
     $row = $db->qry_first('SELECT name, url, clanlogo_path FROM %prefix%clan WHERE clanid = %int%', $_GET['clanid']);
     if (func::chk_img_path($row['clanlogo_path'])) {
         $dsp->AddDoubleRow(t(''), '<img src="' . $row['clanlogo_path'] . '" alt="' . $row['name'] . '">');
     }
     $dsp->AddDoubleRow(t('Clan'), $row['name']);
     if (stristr($row['url'], 'http://') === FALSE) {
         $row['url'] = "http://" . $row['url'];
     }
     $dsp->AddDoubleRow(t('Webseite'), '<a href="' . $row['url'] . '" target="_blank">' . $row['url'] . '</a>');
     $buttons = '';
     if ($auth['type'] >= 1 and $auth['clanid'] != $_GET['clanid']) {
         $buttons .= $dsp->FetchSpanButton(t('Clan beitreten'), 'index.php?mod=' . $_GET['mod'] . '&step=60&clanid=' . $_GET['clanid']) . ' ';
     }
     if ($auth['type'] >= 1 and $auth['clanid'] == $_GET['clanid']) {
         $buttons .= $dsp->FetchSpanButton(t('Clan verlassen'), 'index.php?mod=' . $_GET['mod'] . '&step=40&clanid=' . $_GET['clanid'] . '&userid=' . $auth['userid']) . ' ';
     }
     if ($auth['type'] >= 1 and $auth['clanid'] == $_GET['clanid'] and $auth['clanadmin'] == 1 or $auth['type'] >= 2) {
Exemplo n.º 5
0
 $dsp->AddDoubleRow(t('Benutzertyp'), GetTypeDescription($user_data['type']));
 // Perso
 if ($user_data['perso'] and ($auth['type'] >= 2 or $auth['userid'] == $_GET['userid'] and $cfg['user_showownstreet'] == '1')) {
     $dsp->AddDoubleRow(t('Passnummer / Sonstiges'), $user_data['perso'] . '<br>' . t('Hinweis: Die Angaben zu Straße und Passnummer sind nur für dich und die Organisatoren sichtbar.'));
 }
 // Birthday
 if ($cfg['sys_internet'] == 0 or $auth['type'] >= 2 or $auth['userid'] == $_GET['userid']) {
     $dsp->AddDoubleRow("Geburtstag", (int) $user_data['birthday'] ? $func->unixstamp2date($user_data['birthday'], 'date') . ' (' . $user_data['age'] . ')' : t('Nicht angegeben'));
 }
 // Gender
 $geschlecht[0] = t('Nicht angegeben');
 $geschlecht[1] = t('Männlich');
 $geschlecht[2] = t('Weiblich');
 $dsp->AddDoubleRow(t('Geschlecht'), $geschlecht[$user_data['sex']]);
 // Picture
 if (func::chk_img_path($user_data['picture'])) {
     $dsp->AddDoubleRow(t('Benutzerbild'), '<img src="' . $user_data['picture'] . '">');
 }
 // Comment
 $dsp->AddDoubleRow(t('Kommentar'), $user_data['comment'] == "" ? "" : $func->text2html($user_data['comment']));
 $dsp->AddFieldsetEnd();
 $plugin = new plugin('usrmgr_details_main');
 while (list($caption, $inc) = $plugin->fetch()) {
     $dsp->AddFieldsetStart($caption);
     include_once $inc;
     $dsp->AddFieldsetEnd();
 }
 $dsp->EndTab();
 $dsp->StartTab(t('Lesezeichen'), 'details');
 $dsp->AddFieldsetStart(t('In Kommentaren'));
 switch ($_GET['step']) {
Exemplo n.º 6
0
   function DrawPlan($blockid, $mode, $linktarget = '', $selected_user = false)
   {
       global $db, $dsp, $templ, $auth, $lang, $cfg, $party, $smarty, $framework, $func;
       // $mode:
       // 0 = Normal display mode
       // 1 = With seperators
       // 2 = With checkboxes
       // 3 = Admin mode
       // Get Block data (side descriptions + number of rows + cols)
       $block = $db->qry_first("SELECT * FROM %prefix%seat_block WHERE blockid = %int%", $blockid);
       $smarty->assign('row_count', $block['rows'] + 1);
       $smarty->assign('col_count', $block['cols'] + 1);
       $smarty->assign('mode', $mode);
       // Get seperators
       $sep_cols = array();
       $sep_rows = array();
       $seperators = $db->qry("SELECT orientation, value FROM %prefix%seat_sep WHERE blockid = %int%", $blockid);
       while ($seperator = $db->fetch_array($seperators)) {
           if ($seperator['orientation'] == 0) {
               $sep_cols[$seperator['value']] = 1;
           } else {
               $sep_rows[$seperator['value']] = 1;
           }
       }
       $db->free_result($seperators);
       // Store seat-data in arrays
       $seat_state = array();
       $seat_ip = array();
       $seat_userid = array();
       $seats_qry = $db->qry('SELECT s.*, u.*, c.name AS clan, c.url AS clanurl, u.avatar_path FROM %prefix%seat_seats AS s
     LEFT JOIN %prefix%user AS u ON u.userid = s.userid
     LEFT JOIN %prefix%clan AS c ON u.clanid = c.clanid
     WHERE blockid = %int%', $blockid);
       if (!$db->num_rows() == 0) {
           while ($seat_row = $db->fetch_array($seats_qry)) {
               if ($seat_row['userid']) {
                   $party_user = $db->qry_first("SELECT checkin, checkout FROM %prefix%party_user\n          WHERE user_id = %int% AND party_id = %int%", $seat_row['userid'], $party->party_id);
               }
               $seat_state[$seat_row['row']][$seat_row['col']] = $seat_row['status'];
               $seat_ip[$seat_row['row']][$seat_row['col']] = $seat_row['ip'];
               $seat_userid[$seat_row['row']][$seat_row['col']] = $seat_row['userid'];
               $seat_user_checkin[$seat_row['row']][$seat_row['col']] = $party_user['checkin'];
               $seat_user_checkout[$seat_row['row']][$seat_row['col']] = $party_user['checkout'];
               $user_info[$seat_row['row']][$seat_row['col']] = $seat_row;
           }
           $db->free_result($seats_qry);
       }
       // Get current users clanmates
       $my_clanmates = array();
       if ($auth['clanid']) {
           $clanmates = $db->qry("SELECT userid FROM %prefix%user WHERE clanid = %int%", $auth['clanid']);
           while ($clanmate = $db->fetch_array($clanmates)) {
               array_push($my_clanmates, $clanmate['userid']);
           }
           $db->free_result($clanmates);
       }
       // Has user paid?
       if ($auth['login']) {
           $user_paid = $db->qry_first("SELECT paid FROM %prefix%party_user WHERE user_id = %int% AND party_id = %int%", $auth['userid'], $party->party_id);
       }
       // Header-Row
       if ($mode == 3) {
           $head = array();
           for ($x = 0; $x <= $block['cols']; $x++) {
               if ($sep_rows[$x + 1]) {
                   $head[$x]['width'] = 28;
                   $head[$x]['icon'] = "design/{$auth['design']}/images/arrows_seating_remove_sep_hor.gif";
               } else {
                   $head[$x]['width'] = 14;
                   $head[$x]['icon'] = "design/{$auth['design']}/images/arrows_seating_add_sep_hor.gif";
               }
               $head[$x]['link'] = "index.php?mod=seating&action={$_GET['action']}&step=4&blockid={$blockid}" . "&change_sep_row=" . ($x + 1);
               $head[$x]['name'] = $this->CoordinateToName($x + 1, -1, $block['orientation']);
           }
           $smarty->assign('head', $head);
       } else {
           if ($mode == 2) {
               $XStartPlan = 50;
               $YStartPlan = 150;
               $XStartPlanFrame = 0;
               $YStartPlanFrame = 105;
           } else {
               $XStartPlan = 50;
               $YStartPlan = 50;
               $XStartPlanFrame = 0;
               $YStartPlanFrame = 5;
           }
           $SVGWidth = $XStartPlanFrame + 14 * $block['cols'] + count($sep_rows) * 7 + 100;
           $SVGHeight = $YStartPlanFrame + 14 * $block['rows'] + count($sep_cols) * 7 + 100;
           if ($mode == 2 and $SVGWidth < 600) {
               $SVGWidth = 600;
           }
           $SVGWidth < 250 ? $SVGImgWidth = 250 : ($SVGImgWidth = $SVGWidth);
           $smarty->assign('SVGWidth', $SVGImgWidth);
           $smarty->assign('SVGHeight', $SVGHeight + 50);
           $HiddenFields = array();
           for ($x = 0; $x <= $block['cols']; $x++) {
               for ($y = 0; $y <= $block['rows']; $y++) {
                   $k = $x * 100 + $y;
                   $HiddenFields[$k] = $seat_state[$y][$x];
               }
           }
           $smarty->assign('HiddenFields', $HiddenFields);
           // Main-Table
           $framework->main_header_metatags .= '<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />';
           $framework->add_js_path('ext_scripts/overlib421/Mini/overlib_mini.js');
           $framework->add_js_path('ext_scripts/SVG2VMLv1_1.js');
           $framework->add_js_path('ext_scripts/ls_svg2vml.js');
           $framework->add_js_path('seating.js');
           $jscode .= 'function go() {
 				vectorModel = new VectorModel();
 				container = document.getElementById("SeatPlanSVGContet");
 				mySvg = vectorModel.createElement("svg");
 				container.appendChild(mySvg);
 				mySvg.setAttribute("version", "1.1");
         mySvg.setAttribute("id", "SVGSeating");
 			  myG = vectorModel.createElement("g");
 				mySvg.appendChild(myG);
     ';
           // Icon selection in mode 2
           if ($mode == 2) {
               $jscode .= "CreateText('Auswahl:', 0, 14);\n";
               $jscode .= "DrawClearSeatingSymbol(19, 0, 14, 'javascript:UpdateCurrentDrawingSymbol(\"19\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(14, 14, 14, 'javascript:UpdateCurrentDrawingSymbol(\"14\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(18, 28, 14, 'javascript:UpdateCurrentDrawingSymbol(\"18\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(15, 0, 28, 'javascript:UpdateCurrentDrawingSymbol(\"15\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(16, 14, 28, 'javascript:UpdateCurrentDrawingSymbol(\"16\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(13, 28, 28, 'javascript:UpdateCurrentDrawingSymbol(\"13\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(20, 0, 42, 'javascript:UpdateCurrentDrawingSymbol(\"20\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(12, 14, 42, 'javascript:UpdateCurrentDrawingSymbol(\"12\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(17, 28, 42, 'javascript:UpdateCurrentDrawingSymbol(\"17\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(103, 42, 14, 'javascript:UpdateCurrentDrawingSymbol(\"103\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(107, 56, 14, 'javascript:UpdateCurrentDrawingSymbol(\"107\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(104, 70, 14, 'javascript:UpdateCurrentDrawingSymbol(\"104\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(108, 42, 28, 'javascript:UpdateCurrentDrawingSymbol(\"108\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(111, 56, 28, 'javascript:UpdateCurrentDrawingSymbol(\"111\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(109, 70, 28, 'javascript:UpdateCurrentDrawingSymbol(\"109\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(105, 42, 42, 'javascript:UpdateCurrentDrawingSymbol(\"105\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(110, 56, 42, 'javascript:UpdateCurrentDrawingSymbol(\"110\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(106, 70, 42, 'javascript:UpdateCurrentDrawingSymbol(\"106\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(22, 84, 14, 'javascript:UpdateCurrentDrawingSymbol(\"22\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(21, 98, 14, 'javascript:UpdateCurrentDrawingSymbol(\"21\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(23, 84, 28, 'javascript:UpdateCurrentDrawingSymbol(\"108\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(24, 98, 28, 'javascript:UpdateCurrentDrawingSymbol(\"24\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(10, 84, 42, 'javascript:UpdateCurrentDrawingSymbol(\"10\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(11, 98, 42, 'javascript:UpdateCurrentDrawingSymbol(\"11\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(148, 112, 14, 'javascript:UpdateCurrentDrawingSymbol(\"148\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(149, 126, 14, 'javascript:UpdateCurrentDrawingSymbol(\"149\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(150, 112, 28, 'javascript:UpdateCurrentDrawingSymbol(\"150\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(151, 126, 28, 'javascript:UpdateCurrentDrawingSymbol(\"151\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(102, 112, 42, 'javascript:UpdateCurrentDrawingSymbol(\"102\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(101, 126, 42, 'javascript:UpdateCurrentDrawingSymbol(\"101\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(136, 140, 14, 'javascript:UpdateCurrentDrawingSymbol(\"136\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(137, 154, 14, 'javascript:UpdateCurrentDrawingSymbol(\"137\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(138, 140, 28, 'javascript:UpdateCurrentDrawingSymbol(\"138\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(139, 154, 28, 'javascript:UpdateCurrentDrawingSymbol(\"139\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(1, 140, 42, 'javascript:UpdateCurrentDrawingSymbol(\"1\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(100, 154, 42, 'javascript:UpdateCurrentDrawingSymbol(\"100\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(140, 168, 14, 'javascript:UpdateCurrentDrawingSymbol(\"140\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(141, 182, 14, 'javascript:UpdateCurrentDrawingSymbol(\"141\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(142, 168, 28, 'javascript:UpdateCurrentDrawingSymbol(\"142\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(143, 182, 28, 'javascript:UpdateCurrentDrawingSymbol(\"143\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(7, 168, 42, 'javascript:UpdateCurrentDrawingSymbol(\"7\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(153, 182, 42, 'javascript:UpdateCurrentDrawingSymbol(\"153\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(144, 196, 14, 'javascript:UpdateCurrentDrawingSymbol(\"144\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(145, 210, 14, 'javascript:UpdateCurrentDrawingSymbol(\"145\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(146, 196, 28, 'javascript:UpdateCurrentDrawingSymbol(\"146\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(147, 210, 28, 'javascript:UpdateCurrentDrawingSymbol(\"147\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(154, 196, 42, 'javascript:UpdateCurrentDrawingSymbol(\"154\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(156, 210, 42, 'javascript:UpdateCurrentDrawingSymbol(\"156\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(112, 224, 14, 'javascript:UpdateCurrentDrawingSymbol(\"112\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(113, 238, 14, 'javascript:UpdateCurrentDrawingSymbol(\"113\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(114, 224, 28, 'javascript:UpdateCurrentDrawingSymbol(\"114\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(115, 238, 28, 'javascript:UpdateCurrentDrawingSymbol(\"115\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(132, 224, 42, 'javascript:UpdateCurrentDrawingSymbol(\"132\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(152, 238, 42, 'javascript:UpdateCurrentDrawingSymbol(\"152\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(133, 252, 14, 'javascript:UpdateCurrentDrawingSymbol(\"133\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(134, 252, 28, 'javascript:UpdateCurrentDrawingSymbol(\"134\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(135, 252, 42, 'javascript:UpdateCurrentDrawingSymbol(\"135\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(224, 266, 14, 'javascript:UpdateCurrentDrawingSymbol(\"224\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(226, 280, 14, 'javascript:UpdateCurrentDrawingSymbol(\"226\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(227, 294, 14, 'javascript:UpdateCurrentDrawingSymbol(\"227\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(223, 266, 28, 'javascript:UpdateCurrentDrawingSymbol(\"223\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(222, 280, 28, 'javascript:UpdateCurrentDrawingSymbol(\"222\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(225, 294, 28, 'javascript:UpdateCurrentDrawingSymbol(\"225\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(100, 266, 42, 'javascript:UpdateCurrentDrawingSymbol(\"100\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(228, 280, 42, 'javascript:UpdateCurrentDrawingSymbol(\"228\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(100, 294, 42, 'javascript:UpdateCurrentDrawingSymbol(\"100\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(206, 308, 14, 'javascript:UpdateCurrentDrawingSymbol(\"206\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(212, 322, 14, 'javascript:UpdateCurrentDrawingSymbol(\"212\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(213, 336, 14, 'javascript:UpdateCurrentDrawingSymbol(\"213\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(207, 308, 28, 'javascript:UpdateCurrentDrawingSymbol(\"207\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(201, 322, 28, 'javascript:UpdateCurrentDrawingSymbol(\"201\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(216, 336, 28, 'javascript:UpdateCurrentDrawingSymbol(\"216\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(208, 308, 42, 'javascript:UpdateCurrentDrawingSymbol(\"208\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(220, 322, 42, 'javascript:UpdateCurrentDrawingSymbol(\"220\")', '');\n";
               $jscode .= "DrawClearSeatingSymbol(209, 336, 42, 'javascript:UpdateCurrentDrawingSymbol(\"209\")', '');\n";
               $x = 0;
               $y = 56;
               for ($i = 300; $i <= 383; $i++) {
                   $jscode .= "DrawClearSeatingSymbol({$i}, {$x}, {$y}, 'javascript:UpdateCurrentDrawingSymbol(\"{$i}\")', 'Test');\n";
                   $x += 14;
                   if ($x > 580) {
                       $x = 0;
                       $y += 14;
                   }
               }
           }
           $jscode .= "CreateRect(4, {$YStartPlanFrame}, " . ($SVGWidth / 3 - 8) . ", 20, '#d6d6d6 ', '#9d9d9d', '');\n";
           $jscode .= "CreateText('" . $block['text_tl'] . "', " . ($SVGWidth / 6 * 1 - strlen($block['text_tl']) * 4) . ", " . ($YStartPlanFrame + 15) . ", '');\n";
           $jscode .= "CreateRect(" . ($SVGWidth / 3 + 4) . ", {$YStartPlanFrame}, " . ($SVGWidth / 3 - 8) . ", 20, '#d6d6d6 ', '#9d9d9d', '');\n";
           $jscode .= "CreateText('" . $block['text_tc'] . "', " . ($SVGWidth / 6 * 3 - strlen($block['text_tc']) * 4) . ", " . ($YStartPlanFrame + 15) . ", '');\n";
           $jscode .= "CreateRect(" . ($SVGWidth / 3 * 2 + 4) . ", {$YStartPlanFrame}, " . ($SVGWidth / 3 - 8) . ", 20, '#d6d6d6 ', '#9d9d9d', '');\n";
           $jscode .= "CreateText('" . $block['text_tr'] . "', " . ($SVGWidth / 6 * 5 - strlen($block['text_tr']) * 4) . ", " . ($YStartPlanFrame + 15) . ", '');\n";
           $jscode .= "CreateRect(4, " . ($YStartPlanFrame + 27) . ", 20, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 - 8) . ", '#d6d6d6 ', '#9d9d9d', '');\n";
           for ($i = 0; $i <= strlen($block['text_lt']); $i++) {
               $jscode .= "CreateText('" . substr($block['text_lt'], $i, 1) . "', 12, " . (($SVGHeight - $YStartPlanFrame - 70) / 6 * 1 + ($YStartPlanFrame + 27) - strlen($block['text_lt']) * 5 + 10 * $i) . ", '');\n";
           }
           $jscode .= "CreateRect(4, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 + 4 + ($YStartPlanFrame + 27)) . ", 20, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 - 8) . ", '#d6d6d6 ', '#9d9d9d', '');\n";
           for ($i = 0; $i <= strlen($block['text_lc']); $i++) {
               $jscode .= "CreateText('" . substr($block['text_lc'], $i, 1) . "', 12, " . (($SVGHeight - $YStartPlanFrame - 70) / 6 * 3 + ($YStartPlanFrame + 27) - strlen($block['text_lc']) * 5 + 10 * $i) . ", '');\n";
           }
           $jscode .= "CreateRect(4, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 * 2 + 4 + ($YStartPlanFrame + 27)) . ", 20, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 - 8) . ", '#d6d6d6 ', '#9d9d9d', '');\n";
           for ($i = 0; $i <= strlen($block['text_lb']); $i++) {
               $jscode .= "CreateText('" . substr($block['text_lb'], $i, 1) . "', 12, " . (($SVGHeight - $YStartPlanFrame - 70) / 6 * 5 + ($YStartPlanFrame + 27) - strlen($block['text_lb']) * 5 + 10 * $i) . ", '');\n";
           }
           $jscode .= "CreateRect(" . ($SVGWidth - 25) . ", " . ($YStartPlanFrame + 27) . ", 20, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 - 8) . ", '#d6d6d6 ', '#9d9d9d', '');\n";
           for ($i = 0; $i <= strlen($block['text_rt']); $i++) {
               $jscode .= "CreateText('" . substr($block['text_rt'], $i, 1) . "', " . ($SVGWidth - 17) . ", " . (($SVGHeight - $YStartPlanFrame - 70) / 6 * 1 + ($YStartPlanFrame + 27) - strlen($block['text_rt']) * 5 + 10 * $i) . ", '');\n";
           }
           $jscode .= "CreateRect(" . ($SVGWidth - 25) . ", " . (($SVGHeight - $YStartPlanFrame - 70) / 3 + 4 + ($YStartPlanFrame + 27)) . ", 20, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 - 8) . ", '#d6d6d6 ', '#9d9d9d', '');\n";
           for ($i = 0; $i <= strlen($block['text_rc']); $i++) {
               $jscode .= "CreateText('" . substr($block['text_rc'], $i, 1) . "', " . ($SVGWidth - 17) . ", " . (($SVGHeight - $YStartPlanFrame - 70) / 6 * 3 + ($YStartPlanFrame + 27) - strlen($block['text_rc']) * 5 + 10 * $i) . ", '');\n";
           }
           $jscode .= "CreateRect(" . ($SVGWidth - 25) . ", " . (($SVGHeight - $YStartPlanFrame - 70) / 3 * 2 + 4 + ($YStartPlanFrame + 27)) . ", 20, " . (($SVGHeight - $YStartPlanFrame - 70) / 3 - 8) . ", '#d6d6d6 ', '#9d9d9d', '');\n";
           for ($i = 0; $i <= strlen($block['text_rb']); $i++) {
               $jscode .= "CreateText('" . substr($block['text_rb'], $i, 1) . "', " . ($SVGWidth - 17) . ", " . (($SVGHeight - $YStartPlanFrame - 70) / 6 * 5 + ($YStartPlanFrame + 27) - strlen($block['text_rb']) * 5 + 10 * $i) . ", '');\n";
           }
           $jscode .= "CreateRect(4, " . ($SVGHeight - 35) . ", " . ($SVGWidth / 3 - 8) . ", 20, '#d6d6d6 ', '#9d9d9d', '');\n";
           $jscode .= "CreateText('" . $block['text_bl'] . "', " . ($SVGWidth / 6 * 1 - strlen($block['text_bl']) * 4) . ", " . ($SVGHeight - 20) . ", '');\n";
           $jscode .= "CreateRect(" . ($SVGWidth / 3 + 4) . ", " . ($SVGHeight - 35) . ", " . ($SVGWidth / 3 - 8) . ", 20, '#d6d6d6 ', '#9d9d9d', '');\n";
           $jscode .= "CreateText('" . $block['text_bc'] . "', " . ($SVGWidth / 6 * 3 - strlen($block['text_bc']) * 4) . ", " . ($SVGHeight - 20) . ", '');\n";
           $jscode .= "CreateRect(" . ($SVGWidth / 3 * 2 + 4) . ", " . ($SVGHeight - 35) . ", " . ($SVGWidth / 3 - 8) . ", 20, '#d6d6d6 ', '#9d9d9d', '');\n";
           $jscode .= "CreateText('" . $block['text_br'] . "', " . ($SVGWidth / 6 * 5 - strlen($block['text_br']) * 4) . ", " . ($SVGHeight - 20) . ", '');\n";
       }
       $cell_nr = 0;
       $body = array();
       $sepY = 0;
       for ($y = 0; $y <= $block['rows']; $y++) {
           if ($sep_cols[$y]) {
               $sepY++;
           }
           $YOffset = $y * 14 + $sepY * 7 + $YStartPlan;
           $body[$y]['desc'] = $this->CoordinateToName(-1, $y, $block['orientation']);
           if ($mode != 3) {
               $jscode .= "CreateText('" . $this->CoordinateToName(-1, $y, $block['orientation']) . "', " . ($XStartPlan - 10) . ", " . ($YOffset + 9) . ", '');\n";
           }
           if ($mode == 1) {
               if ($sep_cols[$y + 1]) {
                   $jscode .= "CreateSmallText('^', " . ($XStartPlan - 20) . ", " . ($YOffset + 9 + 7) . ", 'index.php?mod=seating&action=edit&step=4&blockid=" . $_GET['blockid'] . "&change_sep_col=" . ($y + 1) . "');\n";
               } else {
                   $jscode .= "CreateSmallText('v', " . ($XStartPlan - 20) . ", " . ($YOffset + 9 + 7) . ", 'index.php?mod=seating&action=edit&step=4&blockid=" . $_GET['blockid'] . "&change_sep_col=" . ($y + 1) . "');\n";
               }
           }
           if ($sep_cols[$y + 1]) {
               $body[$y]['height'] = 28;
               $body[$y]['icon'] = "design/{$auth['design']}/images/arrows_seating_remove_sep_ver.gif";
           } else {
               $body[$y]['height'] = 14;
               $body[$y]['icon'] = "design/{$auth['design']}/images/arrows_seating_add_sep_ver.gif";
           }
           $body[$y]['link'] = "index.php?mod=seating&action={$_GET['action']}&step=4&blockid={$blockid}&change_sep_col=" . ($y + 1);
           $templ['seat']['cols'] = "";
           $sepX = 0;
           for ($x = 0; $x <= $block['cols']; $x++) {
               if ($sep_rows[$x]) {
                   $sepX++;
               }
               $XOffset = $x * 14 + $sepX * 7 + $XStartPlan;
               switch ($mode) {
                   // Show plan
                   default:
                       $templ['seat']['cell_nr'] = $cell_nr;
                       if ($y == 1) {
                           $jscode .= "CreateText('" . $this->CoordinateToName($x + 1, -1, $block['orientation']) . "', " . ($XOffset - 2) . ", " . ($YStartPlan - 6) . ", '');\n";
                       }
                       if ($y == 1 and $mode == 1) {
                           if ($sep_rows[$x + 1]) {
                               $jscode .= "CreateSmallText('<', " . ($XOffset - 2 + 9) . ", " . ($YStartPlan - 16) . ", 'index.php?mod=seating&action=edit&step=4&blockid=" . $_GET['blockid'] . "&change_sep_row=" . ($x + 1) . "');\n";
                           } else {
                               $jscode .= "CreateSmallText('>', " . ($XOffset - 2 + 9) . ", " . ($YStartPlan - 16) . ", 'index.php?mod=seating&action=edit&step=4&blockid=" . $_GET['blockid'] . "&change_sep_row=" . ($x + 1) . "');\n";
                           }
                       }
                       // Set seat link target
                       $link = '';
                       switch ($mode) {
                           default:
                               if ($linktarget) {
                                   $link = "{$linktarget}&row={$y}&col={$x}";
                               } elseif ($auth['login']) {
                                   // If free and user has not paid-> Possibility to mark this seat
                                   if ($seat_state[$y][$x] == 1 and !$user_paid['paid']) {
                                       $link = "index.php?mod=seating&action=show&step=12&blockid={$blockid}&row={$y}&col={$x}";
                                   } elseif ($seat_state[$y][$x] == 1 or $seat_state[$y][$x] == 3 and $seat_userid[$y][$x] != $auth['userid']) {
                                       $link = "index.php?mod=seating&action=show&step=10&blockid={$blockid}&row={$y}&col={$x}";
                                   } elseif (($seat_state[$y][$x] == 2 or $seat_state[$y][$x] == 3) and $seat_userid[$y][$x] == $auth['userid']) {
                                       $link = "index.php?mod=seating&action=show&step=20&blockid={$blockid}&row={$y}&col={$x}";
                                   } elseif ($seat_state[$y][$x] == 2 and $auth['type'] > 1) {
                                       #$link = "index.php?mod=seating&action=show&step=30&blockid=$blockid&row=$y&col=$x";
                                   }
                               }
                               break;
                           case 1:
                               break;
                           case 2:
                               // Seat only changeble, if noone sits there
                               if ($seat_state[$y][$x] > 1 and $seat_state[$y][$x] < 7) {
                                   $link = "javascript:alert(\"" . t('Es können nur freie Sitzplätze geändert werden') . "\")";
                               } else {
                                   $link = "javascript:ChangeSeatingPlan(\"cell" . ($x * 100 + $y) . "\", {$XOffset}, {$YOffset})";
                               }
                               break;
                       }
                       // Generate popup
                       if ($seat_state[$y][$x] == 2 and $seat_userid[$y][$x] == $auth['userid']) {
                           $s_state = 8;
                       } elseif ($seat_state[$y][$x] == 2 and in_array($seat_userid[$y][$x], $my_clanmates)) {
                           $s_state = 9;
                       } else {
                           $s_state = $seat_state[$y][$x];
                       }
                       if ($seat_ip[$y][$x] == '') {
                           $seat_ip[$y][$x] = '<i>' . t('Keine zugeordnet') . '</i>';
                       }
                       $tooltip = '';
                       switch ($s_state) {
                           case "2":
                           case "3":
                           case "8":
                           case "9":
                               $tooltip .= t('Block') . ': ' . $this->CoordinateToBlockAndName($x + 1, $y, $blockid) . HTML_NEWLINE;
                               $tooltip .= t('Benutzername') . ': ' . $user_info[$y][$x]['username'] . HTML_NEWLINE;
                               if (!$cfg['sys_internet'] or $auth['type'] > 1 or $auth['userid'] == $selected_user and $selected_user != false) {
                                   $tooltip .= t('Name') . ': ' . trim($user_info[$y][$x]['firstname']) . ' ' . trim($user_info[$y][$x]['name']) . HTML_NEWLINE;
                               }
                               $tooltip .= t('Clan') . ': ' . $user_info[$y][$x]['clan'] . HTML_NEWLINE;
                               $tooltip .= t('IP') . ': ' . $seat_ip[$y][$x] . HTML_NEWLINE;
                               if (func::chk_img_path($user_info[$y][$x]['avatar_path']) and ($cfg['seating_show_user_pics'] or !$cfg['sys_internet'] or $auth['type'] > 1 or $auth['userid'] == $selected_user and $selected_user != false)) {
                                   $tooltip .= '<img src=&quot;' . $user_info[$y][$x]['avatar_path'] . '&quot; style=&quot;max-width:100%;&quot; />' . HTML_NEWLINE;
                               }
                               break;
                           case "1":
                               $tooltip .= t('Block') . ': ' . $this->CoordinateToBlockAndName($x + 1, $y, $blockid) . ' ' . t('Frei') . HTML_NEWLINE;
                               $tooltip .= t('IP') . ': ' . $seat_ip[$y][$x] . HTML_NEWLINE;
                               break;
                           case "7":
                               $tooltip .= t('Block') . ': ' . $this->CoordinateToBlockAndName($x + 1, $y, $blockid) . ' ' . t('Gesperrt') . HTML_NEWLINE;
                               $tooltip .= t('IP') . ': ' . $seat_ip[$y][$x] . HTML_NEWLINE;
                               break;
                           case "80":
                           case "81":
                               $tooltip .= t('Block') . ': ' . $this->CoordinateToBlockAndName($x + 1, $y, $blockid) . HTML_NEWLINE;
                               $tooltip .= t('Beschreibung') . ': ' . t('WC') . HTML_NEWLINE;
                               break;
                           case "82":
                               $tooltip .= t('Block') . ': ' . $this->CoordinateToBlockAndName($x + 1, $y, $blockid) . HTML_NEWLINE;
                               $tooltip .= t('Beschreibung') . ': ' . t('Notausgang') . HTML_NEWLINE;
                               break;
                           case "83":
                               $tooltip .= t('Block') . ': ' . $this->CoordinateToBlockAndName($x + 1, $y, $blockid) . HTML_NEWLINE;
                               $tooltip .= t('Beschreibung') . ': ' . t('Catering') . HTML_NEWLINE;
                               break;
                       }
                       $tooltip = addslashes($tooltip);
                       // Set seat image
                       $body[$y]['line'][$x]['img_name'] = '';
                       switch ($seat_state[$y][$x]) {
                           case 0:
                           case 100:
                               if ($mode == 1) {
                                   $jscode .= "DrawSeatingSymbol(0, {$XOffset}, {$YOffset}, '{$link}', '{$tooltip}');\n";
                               } elseif ($mode == 2) {
                                   $jscode .= "ClearArea({$XOffset}, {$YOffset}, 14, 14, '{$link}');\n";
                               }
                               break;
                           case 2:
                               if ($selected_user) {
                                   $userid = $selected_user;
                               } else {
                                   $userid = $auth['userid'];
                               }
                               if ($seat_userid[$y][$x] == $userid) {
                                   $seat_state[$y][$x] = 4;
                               } elseif (in_array($seat_userid[$y][$x], $my_clanmates)) {
                                   $seat_state[$y][$x] = 5;
                               } elseif ($seat_user_checkout[$y][$x] and $seat_user_checkout[$y][$x] != '0000-00-00 00:00:00') {
                                   $seat_state[$y][$x] = 6;
                               } elseif ($seat_user_checkin[$y][$x] and $seat_user_checkin[$y][$x] != '0000-00-00 00:00:00') {
                                   $seat_state[$y][$x] = 8;
                               }
                               // Checked in
                               // else = 2 -> Normal occupied seat
                               // No Break!
                           // Checked in
                           // else = 2 -> Normal occupied seat
                           // No Break!
                           default:
                               if ($mode == 2) {
                                   $jscode .= "ClearArea({$XOffset}, {$YOffset}, 14, 14, '{$link}');\n";
                               }
                               $jscode .= "DrawSeatingSymbol({$seat_state[$y][$x]}, {$XOffset}, {$YOffset}, '{$link}', '{$tooltip}');\n";
                               break;
                       }
                       $templ['seat']['cell_content'] = '';
                       break;
                       // IP-Input-Fields
                   // IP-Input-Fields
                   case 3:
                       if ($seat_state[$y][$x] >= 1 and $seat_state[$y][$x] < 10) {
                           $body[$y]['line'][$x]['content'] = "<input type=\"text\" name=\"cell[" . ($x * 100 + $y) . "]\" size=\"15\" maxlength=\"15\" value=\"" . $seat_ip[$y][$x] . "\" />";
                       } else {
                           $body[$y]['line'][$x]['content'] = "&nbsp;";
                       }
                       break;
               }
               $cell_nr++;
           }
       }
       if ($mode == 3) {
           $smarty->assign('body', $body);
       }
       $plan = $smarty->fetch('modules/seating/templates/plan.htm');
       if ($mode == 0) {
           $jscode .= "DrawSeatingSymbol(1, 0, " . ($YOffset + 50) . ", '', '');\n";
           $jscode .= "CreateText('" . t('Frei') . "', " . 14 . ", " . ($YOffset + 58) . ", '');\n";
           $jscode .= "DrawSeatingSymbol(2, 0, " . ($YOffset + 64) . ", '', '');\n";
           $jscode .= "CreateText('" . t('Besetzt') . "', " . 14 . ", " . ($YOffset + 72) . ", '');\n";
           $jscode .= "DrawSeatingSymbol(4, 0, " . ($YOffset + 78) . ", '', '');\n";
           if ($selected_user) {
               $jscode .= "CreateText('" . t('Auswahl') . "', " . 14 . ", " . ($YOffset + 86) . ", '');\n";
           } else {
               $jscode .= "CreateText('" . t('Dein Platz') . "', " . 14 . ", " . ($YOffset + 86) . ", '');\n";
           }
           $jscode .= "DrawSeatingSymbol(3, 0, " . ($YOffset + 92) . ", '', '');\n";
           $jscode .= "CreateText('" . t('Vorgemerkt') . "', " . 14 . ", " . ($YOffset + 100) . ", '');\n";
           $jscode .= "DrawSeatingSymbol(6, 100, " . ($YOffset + 50) . ", '', '');\n";
           $jscode .= "CreateText('" . t('Frei (Ausgecheckt)') . "', " . 114 . ", " . ($YOffset + 58) . ", '');\n";
           $jscode .= "DrawSeatingSymbol(8, 100, " . ($YOffset + 64) . ", '', '');\n";
           $jscode .= "CreateText('" . t('Besetzt (Eingecheckt)') . "', " . 114 . ", " . ($YOffset + 72) . ", '');\n";
           $jscode .= "DrawSeatingSymbol(5, 100, " . ($YOffset + 78) . ", '', '');\n";
           $jscode .= "CreateText('" . t('Clanmate') . "', " . 114 . ", " . ($YOffset + 86) . ", '');\n";
           $jscode .= "DrawSeatingSymbol(7, 100, " . ($YOffset + 92) . ", '', '');\n";
           $jscode .= "CreateText('" . t('Gesperrt') . "', " . 114 . ", " . ($YOffset + 100) . ", '');\n";
       }
       if ($mode != 3) {
           $jscode .= ' }';
       }
       $framework->add_js_code($jscode);
       return $plan;
   }