<?
$globaltemplates = array(
	'bdr130_marq_form','bdr130_table_2nd',
		'bdr130_table_output',
		'bdr130_table_td',
		'bdr130_table_tr',
		'bdr130_table');
require_once('./global.php');
	$vbulletin->input->clean_array_gpc('r', array(
		'action'	=> TYPE_STR,
	));
switch ($vbulletin->GPC['action']) {
case "marq":
	eval('print_output("' . fetch_template('bdr130_marq_form') . '");');
    break;
case "text":
	eval('print_output("' . fetch_template('bdr130_text_form') . '");');
    break;
case "table":
        if(($vbulletin->userinfo['usergroupid'] != '5') AND ($vbulletin->userinfo['usergroupid'] != '6') AND ($vbulletin->userinfo['usergroupid'] != '7'))
        {
        eval("print_output(\"".fetch_template('bdr130_table_error')."\");");
        exit();
        }

        if (isset($_POST['acti'])) $action = $_POST['acti'];
         else $action = '';

        if ($action == 'weiter') {
        	$r_title = $_POST['r_title'];
        	$split = $_POST['split'];
        	$lines = $_POST['lines'];
        	$si = 0;
        	if ($split <= 0) $split = 1;
        	if ($split >= 15) $split = 15;
        	if ($lines <= 1) $lines = 2;
        	if ($lines >= 15) $lines = 15;

        	for ($x=0;$x < $split;$x++) {
        		for ($y=0;$y < $lines;$y++) {
        			eval('$td_bit .= "' . fetch_template('bdr130_table_td') . '";');
        			$si++;
        		}
        			if (($counter++ % 2) != 0) {
        			$tdclass='alt1';
        			} else {
        			$tdclass='alt2';
        			}

        		if ($r_title == '1') $tdclass = "'thead'";
        		$r_title = 0;
        		eval('$table_new_bit .= "' . fetch_template('bdr130_table_tr') . '";');
        		$td_bit = "";
        		$count++;
        	}
        	$width = $_REQUEST['width'];
        	eval('$uebergabe = "' . fetch_template('bdr130_table_output') . '";');
        	eval("print_output(\"".fetch_template('bdr130_table_2nd')."\");");
        	exit();
        }

        $usetitle[1] = '';
        $usetitle[0] = ' selected';
        eval("print_output(\"".fetch_template('bdr130_table')."\");");
        exit();
    break;
default :
    eval(standard_error(fetch_error('invalidid', 'الصفحة', $vbulletin->options['contactuslink'])));
}
?>