Example #1
0
function login_error($error_msg)
{
    global $tpl;
    $modul_name = "acp_login";
    $tpl->assign('if_disable_menu', 1);
    $tpl->assign('LITO_ERROR_MSG', $error_msg);
    $tpl->assign('if_login_error', 1);
    template_out('login.html', $modul_name);
}
Example #2
0
function show_error($error_msg, $from_modul, $load_from_lang = 1)
{
    global $tpl, $db, $n, $userdata, $lang_suffix;
    if ($load_from_lang == 1) {
        $lang_file = LITO_LANG_PATH . $from_modul . '/lang_' . $lang_suffix . '.php';
        $tpl->config_load($lang_file);
        $tpl->assign('LITO_ERROR_MSG', $tpl->get_config_vars($error_msg));
    } else {
        $tpl->assign('LITO_ERROR_MSG', $error_msg);
    }
    $tpl->assign('if_login_error', 1);
    template_out('error.html', 'core');
    exit;
}
Example #3
0
}
if ($action == "main") {
    template_out('main.html', $modul_name);
}
if ($action == "listmod") {
    $mods_q = $db->query("SELECT `modul_admin_id`, `modul_name`, `modul_description`, `acp_modul`, `perm_lvl` FROM `cc" . $n . "_modul_admin` WHERE `acp_modul` = '1'");
    $mods = array();
    $i = 0;
    while ($mod = $db->fetch_array($mods_q)) {
        $mods[$i]['id'] = $mod['modul_admin_id'];
        $mods[$i]['name'] = $mod['modul_name'];
        $mods[$i]['description'] = $mod['modul_description'];
        $mods[$i]['perm'] = $mod['perm_lvl'];
        $i++;
    }
    $tpl->assign('mods', $mods);
    template_out('listmod.html', $modul_name);
}
if ($action == "listgroup") {
    $groups_q = $db->query("SELECT `id`, `name`, `perm_lvl` FROM `cc" . $n . "_user_groups`");
    $groups = array();
    $i = 0;
    while ($group = $db->fetch_array($groups_q)) {
        $groups[$i]['id'] = $group['id'];
        $groups[$i]['name'] = $group['name'];
        $groups[$i]['perm'] = $group['perm_lvl'];
        $i++;
    }
    $tpl->assign('groups', $groups);
    template_out('listgroup.html', $modul_name);
}
Example #4
0
        exit;
    }
    $_GET['id'] = $_GET['id'] * 1;
    $db->query("UPDATE `cc" . $n . "_users` SET `design_id` = '" . $_GET['id'] . "' WHERE `userid` = '" . $_SESSION['userid'] . "'");
    header("Location:" . LITO_ROOT_PATH_URL);
}
if ($action == "main") {
    $themes_q = $db->query("SELECT `design_id`, `design_name`, `design_author`, `design_copyright`, `design_author_mail`, `design_author_web`, `design_description`, `aktive`, `alternate_permit` FROM `cc" . $n . "_desigs`");
    $themes = array();
    $i = 0;
    while ($theme = $db->fetch_array($themes_q)) {
        $themes[$i]['id'] = $theme['design_id'];
        $themes[$i]['name'] = $theme['design_name'];
        $themes[$i]['author'] = $theme['design_author'];
        $themes[$i]['copy'] = $theme['design_copyright'];
        $themes[$i]['mail'] = $theme['design_author_mail'];
        if (!preg_match('!^http://!', $theme['design_author_web'])) {
            $theme['design_author_web'] = 'http://' . $theme['design_author_web'];
        }
        $themes[$i]['web'] = $theme['design_author_web'];
        $themes[$i]['description'] = $theme['design_description'];
        $themes[$i]['aktive'] = $theme['aktive'];
        $themes[$i]['alt'] = $theme['alternate_permit'];
        $i++;
    }
    $tpl->assign('themes', $themes);
    template_out('main.html', $modul_name);
}
?>

Example #5
0
        $text = str_replace($order, $replace, $text);
        $text = nl2br($text);
        $sql = "INSERT into cc" . $n . "_news (user_id,heading,date,text) VALUES('{$_SESSION['userid']}','{$heading}','{$date}','" . $text . "')";
        $update = $db->query($sql);
    }
    header("LOCATION: " . LITO_MODUL_PATH_URL . "acp_news/news.php");
    exit;
}
if ($action == "edit") {
    $news_id = intval($_GET['id']);
    $result_news = $db->query("SELECT * FROM cc" . $n . "_news where news_id ='{$news_id}'");
    $row = $db->fetch_array($result_news);
    $tpl->assign('NEWS_OVER', $row['heading']);
    $tpl->assign('ACTION_SAVE', 'update&id=' . $news_id);
    $tpl->assign('NEWS_TEXT_LANG', $row['text']);
    template_out('news_new.html', $modul_name);
}
if ($action == "update") {
    $news_id = intval($_GET['id']);
    if (empty($_POST['new_news']) || empty($_POST['new_news'])) {
        error_msg($l_emptyfield_error);
    } else {
        $text = mysql_real_escape_string(trim($_POST['new_news']));
        $heading = mysql_real_escape_string(trim($_POST['heading']));
        if ($heading == "") {
            $heading = "no input";
        }
        $date = date("d.m.Y, H:i");
        $sql = "update cc" . $n . "_news set user_id='{$_SESSION['userid']}' ,heading= '{$heading}' ,date='{$date}',text='" . nl2br($text) . "' where news_id ='{$news_id}'";
        $update = $db->query($sql);
    }
Example #6
0
Litotex Browsergame - Engine
http://www.Litotex.de
http://www.freebg.de
Copyright (c) 2008 FreeBG Team
************************************************************
Hinweis:
Diese Software ist urheberrechtlich gesch�tzt.
F�r jegliche Fehler oder Sch�den, die durch diese Software
auftreten k�nnten, �bernimmt der Autor keine Haftung.
Alle Copyright - Hinweise innerhalb dieser Datei
d�rfen WEDER entfernt, NOCH ver�ndert werden.
************************************************************
Released under the GNU General Public License
************************************************************
*/
$modul_name = "index";
require "./../../includes/global.php";
if (is_modul_name_aktive($modul_name) == 0) {
    show_error('MODUL_LOAD_ERROR', 'core');
    exit;
}
if (isset($_REQUEST['action'])) {
    $action = $_REQUEST['action'];
} else {
    $action = "main";
}
if ($action == "main") {
    $tpl->assign('if_disable_menu', 1);
    template_out('index.html', $modul_name);
    exit;
}
Example #7
0
    $tpl->assign('ras', $ras);
    $tpl->assign('load_name', $load_name);
    $tpl->assign('load_ress_1', $load_ress_1);
    $tpl->assign('load_ress_2', $load_ress_2);
    $tpl->assign('load_ress_3', $load_ress_3);
    $tpl->assign('load_ress_4', $load_ress_4);
    $tpl->assign('buildtime', $load_buildtime);
    $tpl->assign('load_points', $load_points);
    $tpl->assign('load_required', $load_required);
    $tpl->assign('load_b_pic', $load_b_pic);
    $tpl->assign('description', $description);
    $tpl->assign('make_aktion', $make_aktion);
    $tpl->assign('error_buildings', $error_buildings);
    $tpl->assign('build_option', $build_option);
    $tpl->assign('positions', $positions);
    template_out('edit_explore.html', $modul_name);
    exit;
}
if ($action == "update") {
    $name = trim($_POST['explorename']);
    $explorepic = trim($_POST['buildpic']);
    $gold = intval($_POST['kost1']);
    $stone = intval($_POST['kost2']);
    $oil = intval($_POST['kost3']);
    $exp = intval($_POST['kost4']);
    $race = intval($_POST['rasse']);
    $buildtime = intval($_POST['buildtime']);
    $points = intval($_POST['points']);
    $required = intval($_POST['required']);
    $explore_id = intval($_GET['id']);
    $b_option = trim($_POST['build_option']);
Example #8
0
                }
                $endtime = $row['endtime'] - ($requesttime - $time_for_one);
                $backurl = "build_units.php";
                $time_one = make_timebanner($starttime, $endtime, $y, $backurl);
            } else {
                $time_one = $buildunits10;
            }
            $message = "<br><a href=\"{$cancelURL}\">{$buildunits11}</a>";
            $new_found_inhalt_loop = array($z, $name, $numOfMans, $time_one, $time_ready, $message);
            array_push($new_found_loop, $new_found_inhalt_loop);
        }
    }
    if ($z != 0) {
        $tpl->assign('loop', $new_found_loop);
    }
    template_out('build_units.html', $modul_name);
    exit;
}
if ($action == "create") {
    $num = intval($_POST['num']);
    $soid = intval($_GET['soid']);
    if ($num == 0 || $soid == 0 || $num < 0) {
        show_error('BUILD_UNITS_14', $modul_name);
        exit;
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_soldiers WHERE sid='{$soid}'");
    $row = $db->fetch_array($result);
    $row['res1'] = $row['res1'] * $num;
    $row['res2'] = $row['res2'] * $num;
    $row['res3'] = $row['res3'] * $num;
    $row['res4'] = $row['res4'] * $num;
Example #9
0
    $tpl->assign('load_ress_2', $load_ress_2);
    $tpl->assign('load_ress_3', $load_ress_3);
    $tpl->assign('load_ress_4', $load_ress_4);
    $tpl->assign('load_size', $load_size);
    $tpl->assign('load_points', $load_points);
    $tpl->assign('load_buildtime', $load_buildtime);
    $tpl->assign('load_ap', $load_ap);
    $tpl->assign('load_vp', $load_vp);
    $tpl->assign('load_req_level', $load_req_level);
    $tpl->assign('load_b_pic', $load_b_pic);
    $tpl->assign('description', $description);
    $tpl->assign('make_aktion', $make_aktion);
    $tpl->assign('required', $required);
    $tpl->assign('error_buildings', $error_buildings);
    $tpl->assign('positions', $positions);
    template_out('edit_units.html', $modul_name);
    exit;
}
if ($action == "update") {
    $name = trim($_POST['buildingname']);
    $rasse = intval($_POST['rasse']);
    $gold = intval($_POST['kost1']);
    $stone = intval($_POST['kost2']);
    $oil = intval($_POST['kost3']);
    $exp = intval($_POST['kost4']);
    //$bauzeit=intval($_POST['bauzeit']);
    $reisezeit = intval($_POST['traveltime']);
    $einmheiten_id = intval($_GET['id']);
    $ap = intval($_POST['value_ap']);
    $vp = intval($_POST['value_vp']);
    $point = intval($_POST['points']);
Example #10
0
************************************************************
Litotex Browsergame - Engine
http://www.Litotex.de
http://www.freebg.de
Copyright (c) 2008 FreeBG Team
************************************************************
Hinweis:
Diese Software ist urheberrechtlich gesch�tzt.
F�r jegliche Fehler oder Sch�den, die durch diese Software
auftreten k�nnten, �bernimmt der Autor keine Haftung.
Alle Copyright - Hinweise innerhalb dieser Datei
d�rfen WEDER entfernt, NOCH ver�ndert werden.
************************************************************
Released under the GNU General Public License
************************************************************
*/
$modul_name = "screenshot";
require "./../../includes/global.php";
if (isset($_REQUEST['action'])) {
    $action = $_REQUEST['action'];
} else {
    $action = "main";
}
if (is_modul_name_aktive($modul_name) == 0) {
    show_error('MODUL_LOAD_ERROR', 'core');
    exit;
}
if ($action == "main") {
    template_out('screenshot.html', $modul_name);
    exit;
}
Example #11
0
                    $cancelURL = "exploring.php?eid={$userdata['eid']}&action=del";
                    $message = make_timebanner($userdata['startexploretime'], $userdata['endexploretime'], $row_explores['eid'], "") . "<br><a href=\"{$cancelURL}\">" . $exploreabort . "</a>";
                } else {
                    $es_wird_gebaut = 1;
                    $message = 'Es wird bereits geforscht! ';
                }
            } else {
                $message = "<a href=\"exploring.php?action=explore&eid={$row_explores['eid']}\">{$explore}</a>";
            }
            $image = "\"" . $row_explores['explorePic'] . "\"";
            $new_found_inhalt = array($image, $row_explores['name'], $size, $row_explores['description'], $anzeige_res1, $anzeige_res2, $anzeige_res3, $anzeige_res4, $buildtime, $message);
            array_push($new_found, $new_found_inhalt);
        }
    }
    $tpl->assign('daten', $new_found);
    template_out('exploring.html', $modul_name);
    exit;
}
if ($action == "explore") {
    $eid = intval($_GET['eid']);
    if (!$eid) {
        show_error('EXPLORING_ERROR_1', $modul_name);
        exit;
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_explore WHERE eid='{$eid}'");
    $row = $db->fetch_array($result);
    if ($row['required'] > $userdata['build_explore']) {
        show_error('EXPLORING_ERROR_2', $modul_name);
        exit;
    }
    $res1 = $row['res1'] * ($userdata[$row['tabless']] + 1);
Example #12
0
                $inhalt[$i]['req1'] = get_name_from_explore($req1, $race_id) . " ( " . $req_lv . ")";
                $inhalt[$i]['req2'] = $userdata[$req1];
                $i++;
            }
        } else {
            if ($techtree_type == "2") {
                /* Build the Tabless Names */
                $Tabless = array();
                $i = 0;
                $result = $db->query("SELECT * FROM `cc" . $n . "_explore` WHERE race=  '" . $race_id . "'");
                while ($row = $db->fetch_array($result)) {
                    $single = $row['tabless'];
                    $name = $row['name'];
                    $image = $row['explorePic'];
                    $req = $row['required'];
                    $req_lv = $userdata[$single];
                    $b_name = get_buildings_name('build_explore', $userdata['race']);
                    $inhalt[$i]['name'] = $name . " (" . $userdata[$single] . ")";
                    $inhalt[$i]['image'] = $image;
                    $inhalt[$i]['req1'] = $b_name . " " . $req;
                    $inhalt[$i]['req2'] = $userdata['build_explore'];
                    $inhalt[$i]['description'] = $row['description'];
                    $i++;
                }
            }
        }
    }
    $tpl->assign('daten', $inhalt);
    template_out('techtree.html', $modul_name);
    exit;
}
Example #13
0
        $angreifer_name = $row_angreifer['username'];
        $count++;
        $battle_def[$battle_def_count]['angreifer_name'] = $angreifer_name;
        $battle_def[$battle_def_count]['angreifer_land'] = $angreifer_land;
        $battle_def[$battle_def_count]['group_name'] = $group_name;
        $battle_def[$battle_def_count]['request_counter'] = $request_counter;
        $battle_def[$battle_def_count]['request_battle_counter'] = $request_battle_counter;
        $battle_def_count++;
    }
    $tpl->assign('daten_battle_def', $battle_def);
    $result = $db->query("SELECT * FROM cc" . $n . "_groups WHERE islandid = '{$userdata['activeid']}' AND group_status = 0");
    while ($row = $db->fetch_array($result)) {
        $groups .= "<option value=\"" . $row['groupid'] . "\">" . $row['name'] . "</option>";
    }
    $tpl->assign('groups', $groups);
    template_out('battle.html', $modul_name);
    exit;
}
if ($action == "send") {
    $endx = intval($_POST['endx']);
    $endy = intval($_POST['endy']);
    $groupid = intval($_POST['groupid']);
    if (!$endx || $endx < 0 || !$endy || $endy < 0) {
        show_error('LM_system_e', $modul_name);
        exit;
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_countries WHERE x='{$endx}' AND y='{$endy}'");
    $row = $db->fetch_array($result);
    $target_user_id = $row['userid'];
    $result2 = $db->query("SELECT * FROM cc" . $n . "_users WHERE userid='" . $row['userid'] . "'");
    $row2 = $db->fetch_array($result2);
Example #14
0
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_allianz WHERE aid='{$id}'");
    $row = $db->fetch_array($result);
    $banner = trim($row['imageurl']);
    if ($banner == "") {
        $banner = LITO_IMG_PATH_URL . $modul_name . "/no_ali_banner.png";
    }
    $description = bb2html($row['text_long']);
    $ibit = "";
    $result = $db->query("SELECT userid,username,is_ali_admin,status FROM cc" . $n . "_users WHERE allianzid='{$id}' ORDER BY is_ali_admin DESC");
    while ($i = $db->fetch_array($result)) {
        $ibit .= generate_messagelink_smal($i[username]) . " " . generate_userlink($i[userid], $i[username]);
        if ($i['is_ali_admin'] == 1) {
            $ibit .= " (Leiter)";
        }
        $ibit .= " {$img}<br>";
    }
    $is_in_ali = 0;
    if (intval($userdata['allianzid']) > 0) {
        $is_in_ali = 1;
    }
    $tpl->assign('is_in_ali', $is_in_ali);
    $tpl->assign('banner', $banner);
    $tpl->assign('name', $row['name']);
    $tpl->assign('text', $row['text']);
    $tpl->assign('points', intval($row['points']));
    $tpl->assign('ibit', $ibit);
    $tpl->assign('description', $description);
    $tpl->assign('ali_id', $row['aid']);
    template_out('alliance.html', $modul_name);
}
Example #15
0
        }
        $alli = $row['allianzid'];
        $chpt = $row['points'] - $row['lastpoints'];
        $lastlog = strftime("%d.%m. %H:%M", $row['lastlogin']);
        if ($row['allianzid'] == 0) {
            $allianzname = "";
        } else {
            $allianzname = allianz($row['allianzid']);
        }
        $userpic = "";
        if ($row['userpic'] == "") {
            $userpic = LITO_IMG_PATH_URL . "members/no_user_pic.jpg";
        } else {
            $userpic = $row['userpic'];
        }
        $daten[$i]['profile_link'] = generate_userlink($row['userid'], $row['username']);
        $daten[$i]['name'] = $username;
        $daten[$i]['u_points'] = $userpoints;
        $daten[$i]['image'] = $userpic;
        $daten[$i]['u_online'] = $online;
        $daten[$i]['lastlogin'] = $lastlog;
        $daten[$i]['alianz'] = $allianzname;
        $daten[$i]['message'] = generate_messagelink_smal($username);
        $i++;
    }
    if ($i > 0) {
        $tpl->assign('daten', $daten);
    }
    template_out('search.html', $modul_name);
    exit;
}
Example #16
0
  
  Alle Copyright - Hinweise innerhalb dieser Datei 
  dürfen WEDER entfernt, NOCH verändert werden. 
  ************************************************************
  Released under the GNU General Public License 
  ************************************************************  
*/
@session_start();
require $_SESSION['litotex_start_acp'] . 'acp/includes/global.php';
if (!isset($_SESSION['userid'])) {
    header("LOCATION: " . $_SESSION['litotex_start_url'] . 'acp/index.php');
    exit;
}
if (isset($_REQUEST['action'])) {
    $action = $_REQUEST['action'];
} else {
    $action = "main";
}
$modul_name = "acp_sample";
if ($action == "main") {
    $sql = "SELECT * from  cc" . $n . "_users";
    $result_users = $db->query($sql);
    while ($row_g = $db->fetch_array($result_users)) {
        $daten[] = $row_g;
    }
    $tpl->assign('daten', $daten);
    $tpl->assign('test1', "http://www.blabla.de");
    $test = "www";
    template_out('sample.html', $modul_name);
    exit;
}
Example #17
0
                if ($die != 1) {
                    $db->query("UPDATE cc" . $n . "_countries SET sol_kolo=sol_kolo+'1' WHERE islandid='{$userdata['islandid']}'");
                } else {
                    $add_mes = $newland13;
                }
                make_ingamemail(0, $userdata['userid'], $newland14, $newland15);
            }
            $db->query("DELETE FROM cc" . $n . "_new_land WHERE koloid='{$row['koloid']}'");
            header("LOCATION: new_land.php");
        }
        $new_found_inhalt = array($sol_name, $row['x'], $row['y'], $timebanner);
        array_push($new_found, $new_found_inhalt);
    }
    $tpl->assign('daten', $new_found);
    $tpl->assign('daten2', $new_found_2);
    template_out('new_land.html', $modul_name);
    exit;
}
if ($action == "send") {
    $do = $_POST['send'];
    if ($userdata['sol_kolo'] == 0) {
        show_error('NEW_LAND_ERROR_1', $modul_name);
        exit;
    }
    if ($do == "send") {
        $x = intval($_POST['x']);
        $result = $db->query("Select max(x) as max_x from cc" . $n . "_crand");
        $row = $db->fetch_array($result);
        if ($x < 0 || !isset($x) || $x > $row['max_x']) {
            show_error('NEW_LAND_ERROR_2', $modul_name);
            exit;
Example #18
0
function ks_battle($group_id, $land_id, $fromadmin)
{
    global $db, $n, $userdata, $tpl, $header, $footer, $op_res_steal, $op_battle_trace;
    include LITO_MODUL_PATH . "battle/battlescript.php";
    $modul_name = "battle";
    $stime = mtime();
    $verteidiger_user_id = get_userid_from_countrie($land_id);
    $angreifer_race = get_race_id_from_group($group_id);
    $vert_race = get_race_id_from_countrie($land_id);
    $angreifer_name = $userdata['username'];
    $verteidiger_name = username($verteidiger_user_id);
    $angreifer_land = get_countrie_name_from_group_id($group_id, 1);
    $verteidiger_land = get_countrie_name_from_id($land_id, 1);
    $angreifer_user_id = get_user_id_from_group_id($group_id);
    trace_msg("angreifer group id:{$group_id} race id:{$angreifer_race}", 90);
    trace_msg("verteidiger land id:{$land_id} race id:{$vert_race}", 90);
    $kampfscript = new kampfs();
    $sql = "SELECT cc" . $n . "_groups_inhalt . * , cc" . $n . "_soldiers . * FROM cc" . $n . "_groups_inhalt INNER JOIN cc" . $n . "_soldiers ON cc" . $n . "_groups_inhalt.type = cc" . $n . "_soldiers.tabless WHERE cc" . $n . "_soldiers.race ='" . $angreifer_race . "' AND cc" . $n . "_groups_inhalt.group_id ='" . $group_id . "'";
    $result_g = $db->query($sql);
    $count_ang = 0;
    while ($row_g = $db->fetch_array($result_g)) {
        $g_id = $row_g['groups_inhalt_id'];
        $AP = $row_g['AP'];
        $VP = $row_g['VP'];
        $count_ang = $row_g['anzahl'];
        $unit_type = $row_g['type'];
        $kampfscript->setunits_angreifer($g_id, $AP * $count_ang, $VP * $count_ang, $AP, $VP, $count_ang, $unit_type);
    }
    $count_vert = 0;
    $result_sol_verteidiger = $db->query("SELECT * FROM cc" . $n . "_soldiers where race='{$vert_race}'");
    while ($row_sol_vert = $db->fetch_array($result_sol_verteidiger)) {
        $name = $row_sol_vert['tabless'];
        $id_vert = $row_sol_vert['sid'];
        $AP = $row_sol_vert['AP'];
        $VP = $row_sol_vert['VP'];
        $result_l = $db->query("SELECT {$name} FROM cc" . $n . "_countries where islandid='{$land_id}'");
        $row_l = $db->fetch_array($result_l);
        $anzahl_einheiten = $row_l[$name];
        $count_vert += $anzahl_einheiten;
        if ($anzahl_einheiten > 0) {
            $unit_type = $row_sol_vert['tabless'];
            $kampfscript->setunits_verteidiger($id_vert, $AP * $anzahl_einheiten, $VP * $anzahl_einheiten, $AP, $VP, $anzahl_einheiten, $unit_type);
        }
    }
    $all_einheiten_angr_count = 0;
    $all_einheiten_vert_count = 0;
    $verlust_angreifer = 0;
    $verlust_verteidiger = 0;
    if (intval($op_battle_trace) > 0) {
        $trace_fname = LITO_CACHE_PATH . "battle_kr/" . $land_id . "_" . time() . ".txt";
        $kampfscript->set_trace($trace_fname);
    }
    $kampfscript->calc();
    $all_einheiten_angr_count = $kampfscript->anzahl_angreifer_vor;
    $all_einheiten_vert_count = $kampfscript->anzahl_verteidiger_vor;
    $verlust_angreifer = $kampfscript->anzahl_angreifer - $kampfscript->anzahl_angreifer_end;
    $verlust_verteidiger = $kampfscript->anzahl_verteidiger - $kampfscript->anzahl_verteidiger_end;
    $all_einheiten = $kampfscript->anzahl_angreifer_vor + $kampfscript->anzahl_verteidiger_vor;
    $attack_msg = "";
    $einheit_ang = "";
    $einheiten_ang_ap = 0;
    $einheiten_ang_vp = 0;
    foreach ($kampfscript->angreifer as $name => $value) {
        $einheiten_name = $kampfscript->angreifer[$name]["unit_type"];
        $einheiten_name_org = $einheiten_name;
        $einheiten_new_count = $kampfscript->angreifer[$name]["new_units_count"];
        $einheiten_anzahl = $kampfscript->angreifer[$name]["unit_count"];
        $einheiten_name = get_soldiers_name($einheiten_name, $angreifer_race);
        $einheit_ang .= $einheiten_name . "<br>";
        $einheit_ang_count .= intval($einheiten_anzahl) . "<br>";
        $einheiten_ang_ap += $kampfscript->angreifer[$name]["ap_single"] * $einheiten_anzahl;
        $einheiten_ang_vp += $kampfscript->angreifer[$name]["vp_single"] * $einheiten_anzahl;
        if ($fromadmin == 0) {
            $db->query("update cc" . $n . "_groups_inhalt set anzahl='" . $einheiten_new_count . "' where group_id='" . $group_id . "' and type='" . $einheiten_name_org . "'");
        }
    }
    if ($fromadmin == 0) {
        $db->query("delete from cc" . $n . "_groups_inhalt where group_id='" . $group_id . "' and anzahl <='0'");
        $result_sum_group = $db->query("SELECT sum(anzahl)as all_i_groups FROM cc" . $n . "_groups_inhalt where group_id='" . $group_id . "'");
        $rowsum_group = $db->fetch_array($result_sum_group);
        $anz_goup_inhalt = $rowsum_group['all_i_groups'];
        if ($anz_goup_inhalt <= 0) {
            $db->query("delete from cc" . $n . "_groups where groupid='" . $group_id . "'");
        }
    }
    $einheiten_vert_ap = 0;
    $einheiten_vert_vp = 0;
    if ($count_vert > 0) {
        foreach ($kampfscript->verteidiger as $name => $value) {
            $einheiten_name = $kampfscript->verteidiger[$name]["unit_type"];
            $einheiten_name_org = $einheiten_name;
            $einheiten_anzahl = $kampfscript->verteidiger[$name]["unit_count"];
            $einheiten_new_count = $kampfscript->verteidiger[$name]["new_units_count"];
            $einheiten_name = get_soldiers_name($einheiten_name, $vert_race);
            $einheit_vert .= $einheiten_name . "<br>";
            $einheit_vert_count .= intval($einheiten_anzahl) . "<br>";
            $einheiten_vert_ap += $kampfscript->verteidiger[$name]["ap_single"] * $einheiten_anzahl;
            $einheiten_vert_vp += $kampfscript->verteidiger[$name]["vp_single"] * $einheiten_anzahl;
            if ($fromadmin == 0) {
                $db->query("update cc" . $n . "_countries set " . $einheiten_name_org . " ='" . $einheiten_new_count . "' where islandid='" . $land_id . "'");
                $db->query("update cc" . $n . "_countries set " . $einheiten_name_org . " ='0' where islandid='" . $land_id . "' and " . $einheiten_name_org . " <'0'");
            }
        }
    }
    $dauer_berechnung = sprintf("%.05f", ntime($stime, mtime()));
    $last_msg = "Es wurden " . intval($all_einheiten) . " Einheiten in " . $dauer_berechnung . " Sekunden berechnet.";
    unset($kampfscript);
    $date = date("d.m.Y H:i:s", time());
    $last_archive_id = 0;
    $result = $db->query("SELECT archive_id FROM cc" . $n . "_battle_archiv order by archive_id  DESC limit 1");
    $row = $db->fetch_array($result);
    $last_archive_id = $row['archive_id'];
    $kr_number = $last_archive_id + 1;
    $random = password(5);
    $random1 = time();
    $battle_url = "battle_id_" . $random . "_" . $random1 . ".html";
    $db->query("INSERT INTO cc" . $n . "_battle_archiv(ang_username,ang_land,vert_username,vert_land,battle_time,battle_url) VALUES ('{$angreifer_name}','{$angreifer_land}','{$verteidiger_name}','{$verteidiger_land}','" . time() . "','{$battle_url}')");
    $message_topic = "Kampfreport vom : " . date("d.m.Y H:i:s", time());
    $tpl->assign('date', $date);
    $tpl->assign('angreifer_name', $angreifer_name);
    $tpl->assign('angreifer_land', $angreifer_land);
    $tpl->assign('verteidiger_name', $verteidiger_name);
    $tpl->assign('verteidiger_land', $verteidiger_land);
    $tpl->assign('einheit_ang', $einheit_ang);
    $tpl->assign('einheit_ang_count', $einheit_ang_count);
    $tpl->assign('einheit_vert', $einheit_vert);
    $tpl->assign('einheit_vert_count', $einheit_vert_count);
    $tpl->assign('all_einheiten_angr_count', $all_einheiten_angr_count);
    $tpl->assign('einheiten_ang_ap', $einheiten_ang_ap);
    $tpl->assign('all_einheiten_vert_count', $all_einheiten_vert_count);
    $tpl->assign('einheiten_vert_ap', $einheiten_vert_ap);
    $tpl->assign('einheiten_ang_vp', $einheiten_ang_vp);
    $tpl->assign('einheiten_vert_vp', $einheiten_vert_vp);
    $tpl->assign('verlust_angreifer', $verlust_angreifer);
    $tpl->assign('verlust_verteidiger', $verlust_verteidiger);
    $tpl->assign('last_msg', $last_msg);
    $tpl->assign('kr_number', $kr_number);
    $k_report = $tpl->fetch(LITO_THEMES_PATH . 'battle/battle_ks_web.html');
    $Datei = LITO_ROOT_PATH . "battle_kr/{$battle_url}";
    $Datei_url = LITO_ROOT_PATH_URL . "battle_kr/{$battle_url}";
    $message_text = "Du wurdest angegriffen.<br>Den Kampfreport findest du hier:<br> [url=" . $Datei_url . "]Kampfreport Nr.:" . $kr_number . "[/url]";
    if ($fromadmin == 0) {
        make_ingamemail(0, $angreifer_user_id, $message_topic, $message_text);
        make_ingamemail(0, $verteidiger_user_id, $message_topic, $message_text);
    }
    $erstellen = fopen($Datei, "w");
    fwrite($erstellen, $k_report);
    fclose($erstellen);
    if ($all_einheiten_vert_count <= 0) {
        $max_steal = intval($op_res_steal);
        if ($max_steal > 0) {
            resreload($land_id);
            $result = $db->query("SELECT res1,res2,res3,res4,islandid FROM cc" . $n . "_countries WHERE islandid='" . $land_id . "'");
            $row = $db->fetch_array($result);
            $land_res1 = $row['res1'];
            $land_res2 = $row['res2'];
            $land_res3 = $row['res3'];
            $land_res4 = $row['res4'];
            $per_res1 = round($land_res1 * ($max_steal / 100), 0);
            $per_res2 = round($land_res2 * ($max_steal / 100), 0);
            $per_res3 = round($land_res3 * ($max_steal / 100), 0);
            $per_res4 = round($land_res4 * ($max_steal / 100), 0);
            if ($per_res1 < 0) {
                $per_res1 = 0;
            }
            if ($per_res2 < 0) {
                $per_res2 = 0;
            }
            if ($per_res3 < 0) {
                $per_res3 = 0;
            }
            if ($per_res4 < 0) {
                $per_res4 = 0;
            }
            $result = $db->query("update cc" . $n . "_countries  set res1=res1-'" . $per_res1 . "',res2=res2-'" . $per_res2 . "',res3=res3-'" . $per_res3 . "',res4=res4-'" . $per_res4 . "' WHERE islandid='" . $land_id . "'");
            $result = $db->query("update cc" . $n . "_groups  set res1=res1+'" . $per_res1 . "',res2=res2+'" . $per_res2 . "',res3=res3+'" . $per_res3 . "',res4=res4+'" . $per_res4 . "' WHERE groupid='" . $group_id . "'");
        }
        // group back
        $result = $db->query("SELECT * FROM cc" . $n . "_groups WHERE islandid = '{$userdata['activeid']}' AND groupid = {$group_id}");
        $row = $db->fetch_array($result);
        $old_traveltime = get_duration_time($userdata['x'], $userdata['y'], $row['endx'], $row['endy'], $row['speed']);
        $requesttime = $row['traveltime'] - time();
        if ($requesttime < 0) {
            $requesttime = 0;
        }
        $back_traveltime = $old_traveltime - $requesttime;
        $starttime = time();
        $db->query("UPDATE cc" . $n . "_groups SET group_status = 2, starttime={$starttime},traveltime = {$back_traveltime}, endx = {$userdata['x']}, endy = {$userdata['y']} WHERE groupid='{$group_id}'");
    }
    template_out('battle_ks.html', $modul_name);
}
Example #19
0
    $x_pos = $land['x'];
    $y_pos = $land['y'];
    $md5_pw = md5($password);
    trace_msg("User {$username} registriert ", 1);
    $db->query("INSERT INTO cc" . $n . "_users (username,email,password,register_date) VALUES ('{$username}','{$email}','{$md5_pw}','" . time() . "')");
    $userid_r = $db->insert_id();
    $db->query("INSERT INTO cc" . $n . "_countries (res1,res2,res3,res4,userid,lastressources,picid,x,y,size) VALUES ('{$op_reg_res1}','{$op_reg_res2}','{$op_reg_res3}','{$op_reg_res4}','{$userid_r}','" . time() . "','1','{$x_pos}','{$y_pos}','" . rand($op_min_c_size, $op_max_c_size) . "')");
    $islandid_r = $db->insert_id();
    $db->query("UPDATE cc" . $n . "_crand SET used='1' WHERE x='" . $x_pos . "' AND y='" . $y_pos . "'");
    $db->query("UPDATE cc" . $n . "_users SET activeid='{$islandid_r}' WHERE userid='{$userid_r}'");
    send_register_mail($email, "mail_register.html", $modul_name, $username, $password, $x_pos, $y_pos);
    show_error("REGISTER_SUBMIT_OK", $modul_name);
    exit;
}
if ($action == "forgott") {
    template_out('register_forgott.html', $modul_name);
    exit;
}
if ($action == "submit_forgott") {
    $username = c_trim(strtolower($_POST['username']));
    $email = c_trim(strtolower($_POST['email']));
    if ($username == "") {
        show_error("REGISTER_ERROR_2", $modul_name);
        exit;
    }
    if (!preg_match("/^[0-9a-z_-]{3,15}\$/i", $username)) {
        show_error("REGISTER_ERROR_4", $modul_name);
        exit;
    }
    if ($email == "") {
        show_error("REGISTER_ERROR_2", $modul_name);
Example #20
0
    //start
    $nn = 0;
    $result = $db->query("SELECT * FROM cc" . $n . "_allianz ORDER BY points DESC LIMIT {$start},30");
    while ($row = $db->fetch_array($result)) {
        $alli = $row['aid'];
        if ($row['text']) {
            $infotext = substr($row['text'], 0, 30);
            if (strlen($row['text']) > 30) {
                $infotext .= "...";
            }
        } else {
            $infotext = $ln_rankings_no_allianz_infos;
        }
        $i++;
        $nn++;
        $inhalt[$nn]['ali_name'] = generate_allilink($alli);
        $inhalt[$nn]['ali_test'] = $infotext;
        $inhalt[$nn]['points'] = $row['points'];
        $inhalt[$nn]['platz'] = $i;
        $ali_flag = get_allianz_flag($row['aid']);
        $inhalt[$nn]['ali_flag'] = $ali_flag;
        $inhalt[$nn]['ali_anz'] = $row['members'];
    }
    for ($i = 0; $i < $maxpage + 1; $i++) {
        $pagesbit .= "<option value=\"{$i}\">" . ($i + 1) . "</option>";
    }
    $tpl->assign('page', $pagesbit);
    $tpl->assign('daten', $inhalt);
    template_out('ranking_ali.html', $modul_name);
    exit;
}
Example #21
0
    }
    $id = $_GET['id'] * 1;
    $db->query("UPDATE `cc" . $n . "_badwords` SET `badword` = '" . $db->escape_string($_POST['title']) . "', `in_mail` = '" . $db->escape_string($_POST['in_mail']) . "' WHERE `badword_id` = '" . $id . "'");
    $action = 'main';
}
if ($action == 'new') {
    if (!isset($_POST['title'])) {
        error_msg('Kein Titel &uuml;bergeben!');
        exit;
    }
    if (!isset($_POST['in_mail'])) {
        $_POST['in_mail'] = 0;
    } else {
        $_POST['in_mail'] = 1;
    }
    $db->query("INSERT INTO `cc" . $n . "_badwords` (`badword`, `in_mail`) VALUES ('" . $db->escape_string($_POST['title']) . "', '" . $db->escape_string($_POST['in_mail']) . "')");
    $action = 'main';
}
if ($action == 'main') {
    $badwords = array();
    $words = $db->query("SELECT `badword_id`, `badword`, `in_mail` FROM `cc" . $n . "_badwords`");
    $i = 0;
    while ($badword = $db->fetch_array($words)) {
        $badwords[$i]['id'] = $badword['badword_id'];
        $badwords[$i]['title'] = $badword['badword'];
        $badwords[$i]['in_mail'] = $badword['in_mail'];
        $i++;
    }
    $tpl->assign('badwords', $badwords);
    template_out('list.html', $modul_name);
}
Example #22
0
            $type = "Ja <input class=\"radio\" type=\"radio\" name=\"" . $row['varname'] . "\" value=\"1\"" . ($row['value'] == 1 ? " checked" : "") . "> Nein <input type=\"radio\" name=\"" . $row['varname'] . "\" value=\"0\"" . ($row['value'] == 0 ? " checked" : "") . ">";
        } elseif ($row['type'] == "text") {
            $type = "<input type=\"text\" class=\"textinput\" value=\"" . $row['value'] . "\" name=\"" . $row['varname'] . "\" size=\"55\">";
        } elseif ($row['type'] == "textarea") {
            $type = "<textarea rows=\"10\" id=\"" . $row['varname'] . "\"  class=\"textarea\" cols=\"50\" name=\"" . $row['varname'] . "\">" . $row['value'] . "</textarea>";
        } else {
            $type = "unbekannter Typ";
        }
        $all = "";
        $option_bit[] = $row['title'];
        $option_bit[] = $type;
    }
    $tpl->assign('menu_name', $menu_name);
    $tpl->assign('save_id', $menu_number);
    $tpl->assign('data', $option_bit);
    $tpl->assign('tr', array('bgcolor="#eeeeee"', 'bgcolor="#dddddd"'));
    template_out('gameoptions_save.html', $modul_name);
}
if ($action == "submitOptions") {
    $optiongroupid = intval($_REQUEST['id']);
    $result = $db->query("SELECT * FROM cc" . $n . "_menu_admin_opt where admin_sub_id='{$optiongroupid}' ");
    while ($row = $db->fetch_array($result)) {
        $varname = $_POST[$row['varname']];
        $db->query("UPDATE cc" . $n . "_menu_admin_opt SET value='" . $varname . "' WHERE varname='" . $row['varname'] . "' AND admin_sub_id='" . $optiongroupid . "'");
    }
    require LITO_ROOT_PATH . "includes/class_options.php";
    $option = new option(LITO_ROOT_PATH . "options/");
    $option->write();
    header("LOCATION: " . LITO_MODUL_PATH_URL . 'acp_gameoptions/gameoptions.php?action=sel_cat&id=' . $optiongroupid);
    exit;
}
Example #23
0
    $i = 0;
    while ($grp_av = $db->fetch_array($grp_av_q)) {
        $grps_av[$i]['id'] = $grp_av['id'];
        $grps_av[$i]['name'] = $grp_av['name'];
        $i++;
    }
    $tpl->assign('grps', $grps_av);
    template_out('edit.html', $modul_name);
}
if ($action == 'res') {
    if (!isset($_GET['id']) || !is_numeric($_GET['id'])) {
        error_msg('ID nicht &uuml;bergeben!');
        exit;
    }
    $countries_q = $db->query("SELECT `islandid`, `name`, `res1`, `res2`, `res3`, `res4` FROM `cc" . $n . "_countries` WHERE `islandid` = '" . $_GET['id'] . "'");
    $countries = array();
    $i = 0;
    $countrie = $db->fetch_array($countries_q);
    $countries[$i]['id'] = $countrie['islandid'];
    $countries[$i]['name'] = $countrie['name'];
    $countries[$i]['res1'] = $countrie['res1'];
    $countries[$i]['res2'] = $countrie['res2'];
    $countries[$i]['res3'] = $countrie['res3'];
    $countries[$i]['res4'] = $countrie['res4'];
    $i++;
    $tpl->assign('countrie', $countries[0]);
    template_out('res.html', $modul_name);
}
?>

Example #24
0
        $row = $db->fetch_array($result);
        $b_label = "Banner Nr.:" . intval($row['maxi_b']) + 1;
    }
    $b_code = str_replace("'", '"', $b_code);
    $db->query("INSERT INTO cc" . $n . "_banner_mgr(banner_code, banner_label ,banner_count  \t,active) VALUES ('" . $b_code . "','{$b_label}','0','0')");
    header("LOCATION: banner.php");
}
if ($action == "edit") {
    $news_id = intval($_GET['id']);
    $result_news = $db->query("SELECT * FROM cc" . $n . "_banner_mgr where banner_id ='{$news_id}'");
    $row = $db->fetch_array($result_news);
    $code = $row['banner_code'];
    $tpl->assign('banner_label', $row['banner_label']);
    $tpl->assign('banner_code', $code);
    $tpl->assign('ACTION_SAVE', 'update&id=' . $row['banner_id']);
    template_out('banner.html', $modul_name);
}
if ($action == "activate") {
    $news_id = intval($_GET['id']);
    $result_news = $db->query("SELECT active  FROM cc" . $n . "_banner_mgr where banner_id  ='{$news_id}'");
    $row = $db->fetch_array($result_news);
    $active = $row['active'];
    if ($active == 0) {
        $sql = "update cc" . $n . "_banner_mgr set active='1' where banner_id ='{$news_id}'";
    } else {
        $sql = "update cc" . $n . "_banner_mgr set active='0' where banner_id ='{$news_id}'";
    }
    $update = $db->query($sql);
    header("LOCATION: banner.php");
}
if ($action == "delete") {
Example #25
0
            if ($row['res3'] <= 0) {
                $row['res3']++;
            }
            if ($row['res4'] <= 0) {
                $row['res4']++;
            }
            $numOfMans = $userdata[$row['tabless']];
            $build_time = sec2time($row['stime']);
            $maxi = min(floor($userdata['res1'] / $row['res1']), floor($userdata['res2'] / $row['res2']), floor($userdata['res3'] / $row['res3']), floor($userdata['res4'] / $row['res4']));
            $url = "\"build_deff.php?action=create&soid={$row['sid']}\"";
            $new_found_inhalt = array("\"" . $row['solpic'] . "\"", $row['name'], $row['description'], $op_set_n_res1 . ": " . $row['res1'], $op_set_n_res2 . ": " . $row['res2'], $op_set_n_res3 . ": " . $row['res3'], $op_set_n_res4 . ": " . $row['res4'], $build_time, $numOfMans, $url, $maxi, $row['AP'], $row['VP']);
            array_push($new_found, $new_found_inhalt);
        }
    }
    $tpl->assign('daten', $new_found);
    template_out('build_deff.html', $modul_name);
    exit;
}
if ($action == "create") {
    $num = intval($_POST['num']);
    $soid = intval($_GET['soid']);
    if ($num == 0 || $soid == 0 || $num < 0) {
        show_error('BUILD_DEFF_ERROR_1', $modul_name);
        exit;
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_soldiers WHERE sid='{$soid}'");
    $row = $db->fetch_array($result);
    $row['res1'] = $row['res1'] * $num;
    $row['res2'] = $row['res2'] * $num;
    $row['res3'] = $row['res3'] * $num;
    $row['res4'] = $row['res4'] * $num;
Example #26
0
        }
        header("LOCATION: " . LITO_ROOT_PATH_URL . "/modules/alliance/alliance.php?action=change_ali_text");
        exit;
    }
}
if ($action == "del_pic") {
    $uid = $userdata['userid'];
    $filename = $userdata['userpic'];
    unlink($filename);
    $db->unbuffered_query("update cc" . $n . "_users set userpic='' where  userid = '{$uid}'");
    header("LOCATION: upload_pic.php");
    exit;
}
if ($action == "alibild") {
    $u_pic = $userdata['userpic'];
    template_out('pic_uploads_ali.html', $modul_name);
    exit;
}
if ($action == "del_pic_ali") {
    $uid = $userdata['userid'];
    $ali_id = $userdata['allianzid'];
    $result_e = $db->query("SELECT * FROM cc" . $n . "_allianz WHERE aid ='" . $ali_id . "' ");
    while ($row_e = $db->fetch_array($result_e)) {
        $allianz_i_url = $row_e['image_path'];
        if ($allianz_i_url != "") {
            unlink($allianz_i_url);
        }
    }
    $db->unbuffered_query("update cc" . $n . "_allianz set imageurl='' where  aid= '" . $ali_id . "'");
    header("LOCATION: " . LITO_ROOT_PATH_URL . "/modules/alliance/alliance.php?action=change_ali_text");
    exit;
Example #27
0
        header("LOCATION: forum.php");
        exit;
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_forum_posts where si_post_id = '" . $fp_id . "' ");
    $row = $db->fetch_array($result);
    $com == 1;
    $forum == 1;
    $allianz_t_l = $row['si_post_text'];
    $ft_parent = "<a href=\"forum.php\">Forum</a>" . " / <a href=\"forum.php?action=show_forum&f_id={$f_id}\">" . get_forum_from_id($f_id) . "</a> / " . get_topic_from_id($ft_id);
    $com = 1;
    $forum = 0;
    $take_action = "forum.php?action=edit_save&ft_id={$ft_id}&f_id={$f_id}&fp_id={$fp_id}";
    $tpl->assign('ft_parent', $ft_parent);
    $tpl->assign('take_action', $take_action);
    $tpl->assign('allianz_t_l', $allianz_t_l);
    template_out('forum_new_topics.html', $modul_name);
    exit;
}
if ($action == "edit_save") {
    $ft_id = intval($_GET['ft_id']);
    $f_id = intval($_GET['f_id']);
    $fp_id = intval($_GET['fp_id']);
    if ($ft_id <= 0) {
        header("LOCATION: forum.php");
        exit;
    }
    if ($f_id <= 0) {
        header("LOCATION: forum.php");
        exit;
    }
    if ($fp_id <= 0) {
Example #28
0
        if ($size_new == "") {
            $size = "<span class=\"redfont\">" . $buildingerror1 . "</span>";
        }
        $kost1 = $op_set_n_res1 . ": " . $row_buildings['res1'];
        $kost2 = $op_set_n_res2 . ": " . $row_buildings['res2'];
        $kost3 = $op_set_n_res3 . ": " . $row_buildings['res3'];
        $kost4 = $op_set_n_res4 . ": " . $row_buildings['res4'];
        if (trim($row_buildings['tabless']) == "") {
            $message = "<span class=\"redfont\">" . $buildingerror1 . "</span>";
        }
        $image = "\"" . $row_buildings['buildpic'] . "\"";
        $new_found_inhalt = array($image, $build_name, $size, $build_description, $row_buildings['res1'], $row_buildings['res2'], $row_buildings['res3'], $row_buildings['res4'], $buildtime, $row_buildings['size'], $message, $userdata['size'], $userdata['usesize']);
        array_push($new_found, $new_found_inhalt);
    }
    $tpl->assign('daten', $new_found);
    template_out('buildings.html', $modul_name);
    exit;
}
if ($action == "build") {
    $bid = intval($_GET['bid']);
    if (!$bid) {
        show_error('BUILDING_ERROR_2', $modul_name);
        exit;
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_buildings WHERE bid='{$bid}'");
    $row = $db->fetch_array($result);
    if ($row['size'] > $userdata['size'] - $userdata['usesize']) {
        show_error('BUILDING_ERROR_3', $modul_name);
        exit;
    }
    if ($userdata['build_town'] < $row['require1'] || $userdata['build_explore'] < $row['require2']) {
Example #29
0
        if ($debug_where) {
            $debug_where = "{$debug_where} AND  db_type ={$debugs_level}";
        } elseif (!$debug_where) {
            $debug_where = "WHERE  db_type={$debugs_level}";
        }
    }
    if ($debug_where) {
        $debug_sql = "{$debug_sql} {$debug_where}";
    }
    $optionbit = "";
    $inhalt = array();
    $result = $db->query($debug_sql);
    $i = 0;
    while ($row = $db->fetch_array($result)) {
        $debug_date = date("d.m.Y, H:i:s", $row['db_time']);
        $inhalt[$i]['debug_id'] = $row['debug_id'];
        $inhalt[$i]['db_type'] = $row['db_type'];
        $inhalt[$i]['fromuserid'] = $row['fromuserid'];
        $inhalt[$i]['db_text'] = $row['db_text'];
        $inhalt[$i]['debug_date'] = $debug_date;
        $i++;
    }
    $result = $db->query("SELECT * FROM cc" . $n . "_users");
    while ($row = $db->fetch_array($result)) {
        $optionbit .= "<option value=\"" . $row['userid'] . "\">" . $row['username'] . "</option>";
    }
    $tpl->assign('optionbit', $optionbit);
    $tpl->assign('debug_output', $inhalt);
    template_out('debug.html', $modul_name);
    exit;
}
Example #30
0
    $tpl->assign('load_ress_2', $load_ress_2);
    $tpl->assign('load_ress_3', $load_ress_3);
    $tpl->assign('load_ress_4', $load_ress_4);
    $tpl->assign('load_size', $load_size);
    $tpl->assign('load_points', $load_points);
    $tpl->assign('load_buildtime', $load_buildtime);
    $tpl->assign('load_req_level', $load_req_level);
    $tpl->assign('load_b_pic', $load_b_pic);
    $tpl->assign('description', $description);
    $tpl->assign('make_aktion', $make_aktion);
    $tpl->assign('required', $required);
    $tpl->assign('load_reg1', $load_reg1);
    $tpl->assign('load_reg2', $load_reg2);
    $tpl->assign('positions', $positions);
    $tpl->assign('error_buildings', $error_buildings);
    template_out('edit_building.html', $modul_name);
    exit;
}
if ($action == "update") {
    $upd_id = intval($_GET['id']);
    if ($upd_id <= 0) {
        error_msg("Daten konnten nicht gespeichert werden.");
        exit;
    }
    $name = trim($_POST['buildingname']);
    $url = trim($_POST['url']);
    $buildpic = trim($_POST['buildpic']);
    $kost1 = intval($_POST['kost1']);
    $kost2 = intval($_POST['kost2']);
    $kost3 = intval($_POST['kost3']);
    $kost4 = intval($_POST['kost4']);