• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP main_content函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中main_content函数的典型用法代码示例。如果您正苦于以下问题:PHP main_content函数的具体用法?PHP main_content怎么用?PHP main_content使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了main_content函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: admin_texte

 function admin_texte()
 {
     global $db, $countries;
     if (isset($_POST['submit'])) {
         foreach ($_POST as $key => $value) {
             if (strpos($key, '_h_')) {
                 $lang = substr($key, 0, strpos($key, '_'));
                 $name = substr($key, strpos($key, '_') + 3);
                 $sql = sprintf('UPDATE ' . DB_PRE . 'ecp_texte SET content = \'%s\', content2 = \'%s\' WHERE name= \'%s\' AND lang = \'%s\';', strsave($_POST[$lang . '_' . $name]), strsave($value), strsave($name), strsave($lang));
                 $db->query($sql);
             }
         }
         header('Location: ?section=admin&site=texte');
     } else {
         $tpl = new smarty();
         $lang = get_languages();
         $db->query('SELECT * FROM ' . DB_PRE . 'ecp_texte ORDER BY lang ASC');
         while ($row = $db->fetch_assoc()) {
             foreach ($lang as $key => $value) {
                 if ($value['lang'] == $row['lang']) {
                     $lang[$key]['data'][$row['name']] = htmlspecialchars($row['content']);
                     $lang[$key]['headline'][$row['name']] = htmlspecialchars($row['content2']);
                 }
             }
         }
         $tpl->assign('lang', $lang);
         ob_start();
         $tpl->display(DESIGN . '/tpl/admin/texte.html');
         $content = ob_get_contents();
         ob_end_clean();
         main_content(TEXTE, $content, '', 1);
     }
 }
开发者ID:ECP-Black,项目名称:ECP,代码行数:33,代码来源:texte.php


示例2: get_server

function get_server()
{
    global $db;
    if (!isset($_SESSION['rights']['admin']['server']) and !isset($_SESSION['rights']['superadmin'])) {
        echo NO_ADMIN_RIGHTS;
    } else {
        $tpl = new smarty();
        if (@$_GET['ajax']) {
            ob_end_clean();
        }
        $server = array();
        $result = $db->query('SELECT `serverID`, `gamename`, response, `gametype`, `aktiv`, `displaymenu`, `ip`, `port`, `queryport`, `stat` FROM ' . DB_PRE . 'ecp_server ORDER BY posi ASC');
        while ($row = mysql_fetch_assoc($result)) {
            $data = unserialize($row['response']);
            $row['path'] = 'images/server/maps/' . $row['gametype'] . '/' . $data['s']['game'] . '/' . $data['s']['map'] . '.jpg';
            $server[] = $row;
        }
        $tpl->assign('server', $server);
        ob_start();
        $tpl->display(DESIGN . '/tpl/admin/server_overview.html');
        $content = ob_get_contents();
        ob_end_clean();
        if (@$_GET['ajax']) {
            echo html_ajax_convert($content);
            die;
        }
        main_content(OVERVIEW, '<div id="server_overview">' . $content . '</div>', '', 1);
    }
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:29,代码来源:server.php


示例3: get_links

function get_links()
{
    global $db;
    if (!isset($_SESSION['rights']['admin']['links']) and !isset($_SESSION['rights']['superadmin'])) {
        echo NO_ADMIN_RIGHTS;
    } else {
        $tpl = new smarty();
        if (@$_GET['ajax']) {
            ob_end_clean();
        }
        $links = array();
        $result = $db->query('SELECT `linkID`, `name`, `url`, `bannerurl`, `beschreibung`, `hits` FROM ' . DB_PRE . 'ecp_links ORDER BY name ASC');
        while ($row = mysql_fetch_assoc($result)) {
            $links[] = $row;
        }
        $tpl->assign('links', $links);
        ob_start();
        $tpl->display(DESIGN . '/tpl/admin/links_overview.html');
        $content = ob_get_contents();
        ob_end_clean();
        if (@$_GET['ajax']) {
            echo html_ajax_convert($content);
            die;
        }
        main_content(OVERVIEW, '<div id="links_overview">' . $content . '</div>', '', 1);
    }
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:27,代码来源:links.php


示例4: shoutbox

function shoutbox()
{
    global $db, $countries;
    $tpl = new smarty();
    $anzahl = $db->result(DB_PRE . 'ecp_comments', 'COUNT(comID)', 'bereich="shoutbox"');
    if ($anzahl) {
        $limits = get_sql_limit($anzahl, LIMIT_SHOUTBOX);
        $shouts = array();
        $db->query('SELECT comID, country, username, userID, author, datum, beitrag FROM ' . DB_PRE . 'ecp_comments LEFT JOIN ' . DB_PRE . 'ecp_user ON userID = ID WHERE bereich="shoutbox" ORDER BY datum DESC LIMIT ' . $limits[1] . ',' . LIMIT_SHOUTBOX);
        $anzahl -= $limits[1];
        while ($row = $db->fetch_assoc()) {
            $row['nr'] = format_nr($anzahl--, 0);
            $row['countryname'] = @$countries[$row['country']];
            $row['datum'] = date(LONG_DATE, $row['datum']);
            $shouts[] = $row;
        }
        $tpl->assign('shoutbox', $shouts);
        if ($limits[0] > 1) {
            $tpl->assign('seiten', makepagelink_ajax('?section=shoutbox', 'return load_shout_page({nr});', @$_GET['page'], $limits[0]));
        }
        ob_start();
        $tpl->display(DESIGN . '/tpl/shoutbox/shoutbox.html');
        $content = ob_get_contents();
        ob_end_clean();
        main_content(SHOUTBOX, '<div id="shout_overview">' . $content . '</div>', '', 1);
    } else {
        table(INFO, NO_ENTRIES);
    }
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:29,代码来源:index.php


示例5: admin_joinus

function admin_joinus()
{
    global $db, $countries;
    $tpl = new smarty();
    $db->query('SELECT tname, `joinID`, `name`, b.username, b.email, b.icq, b.msn, `age`, b.country, `teamID`, `comment`, `IP`, `datum`, `closed`, `closedby`, a.username as closedby_username FROM ' . DB_PRE . 'ecp_joinus as b LEFT JOIN ' . DB_PRE . 'ecp_teams ON (teamID = tID) LEFT JOIN ' . DB_PRE . 'ecp_user as a ON (ID=closedby) ORDER BY closed ASC, datum ASC');
    $joinus = array();
    while ($row = $db->fetch_assoc()) {
        $row['datum'] = date(SHORT_DATE, $row['datum']);
        if ($row['joinID'] == (int) @$_GET['id']) {
            $spe = $row;
        }
        $joinus[] = $row;
    }
    if (@$spe) {
        ob_start();
        $tpl1 = new Smarty();
        foreach ($spe as $key => $value) {
            $tpl1->assign($key, $value);
        }
        $tpl1->assign('countryname', $countries[$spe['country']]);
        $tpl1->assign('id', $row['joinID']);
        $tpl1->display(DESIGN . '/tpl/admin/joinus_view.html');
        $tpl->assign('details', ob_get_contents());
        ob_end_clean();
    }
    $tpl->assign('joinus', $joinus);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/joinus.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(JOINUS, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:32,代码来源:joinus.php


示例6: get_teams

function get_teams()
{
    global $db;
    $tpl = new smarty();
    if (@$_GET['ajax']) {
        ob_end_clean();
    }
    $teams = array();
    $result = $db->query('SELECT tname, tID, info FROM ' . DB_PRE . 'ecp_teams ORDER BY posi ASC');
    while ($row = mysql_fetch_assoc($result)) {
        $members = array();
        $subresult = $db->query('SELECT `username`, `mID`, `userID`, `name`, `aufgabe`, `aktiv`, country FROM ' . DB_PRE . 'ecp_members LEFT JOIN ' . DB_PRE . 'ecp_user ON (ID = userID) WHERE teamID = ' . $row['tID'] . ' ORDER BY posi ASC');
        while ($subrow = mysql_fetch_assoc($subresult)) {
            $subrow['aktiv'] ? $subrow['aktiv'] = '<span class="member_aktiv" style="cursor:pointer" onclick="member_switch_status(' . $row['tID'] . ', ' . $subrow['userID'] . ');">' . AKTIV . '</span>' : ($subrow['aktiv'] = '<span style="cursor:pointer" class="member_inaktiv" onclick="member_switch_status(' . $row['tID'] . ', ' . $subrow['userID'] . ');">' . INAKTIV . '</span>');
            if ($subrow['name'] != '') {
                $subrow['username'] = $subrow['name'];
            }
            $members[] = $subrow;
        }
        $row['members'] = $members;
        $teams[] = $row;
    }
    $tpl->assign('teams', $teams);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/teams_overview.html');
    $content = ob_get_contents();
    ob_end_clean();
    if (@$_GET['ajax']) {
        echo html_ajax_convert($content);
        die;
    }
    main_content(OVERVIEW, '<div id="teams_overview">' . $content . '</div>', '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:33,代码来源:teams.php


示例7: admin_server

function admin_server()
{
    global $db;
    $tpl = new smarty();
    $db->query('SELECT `ID`, `verwendung`, `intervall`, `betrag`, `nextbuch` FROM ' . DB_PRE . 'ecp_clankasse_auto');
    $auto = array();
    while ($row = $db->fetch_assoc()) {
        $row['nextbuch'] = date(LONG_DATE, $row['nextbuch']);
        $row['betrag'] = number_format($row['betrag'], 2, ',', '.');
        $auto[] = $row;
    }
    $tpl->assign('auto', $auto);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/clankasse_auto_overview.html');
    $content = ob_get_contents();
    ob_end_clean();
    $tpl->assign('overview', $content);
    $db->query('SELECT a.*, b.username FROM ' . DB_PRE . 'ecp_clankasse_transaktion as a LEFT JOIN ' . DB_PRE . 'ecp_user as b ON b.ID = vonuser ORDER BY datum DESC');
    $buchung = array();
    while ($row = $db->fetch_assoc()) {
        $row['datum'] = date(LONG_DATE, $row['datum']);
        if ($row['vonuser']) {
            $row['verwendung'] .= ' ' . FROM . ' ' . $row['username'];
        }
        $row['geld'] = number_format($row['geld'], 2, ',', '.');
        $buchung[] = $row;
    }
    $tpl->assign('buchung', $buchung);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/clankasse_trans_overview.html');
    $content = ob_get_contents();
    ob_end_clean();
    $tpl->assign('buch_overview', $content);
    $db->query('SELECT username, userID, verwendung, monatgeld FROM ' . DB_PRE . 'ecp_clankasse_member LEFT JOIN ' . DB_PRE . 'ecp_user ON userID = ID ORDER BY username ASC');
    $user = array();
    while ($row = $db->fetch_assoc()) {
        $row['geld'] = number_format($row['monatgeld'], 2, ',', '.');
        $user[] = $row;
    }
    $tpl->assign('user', $user);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/clankasse_user_overview.html');
    $content = ob_get_contents();
    ob_end_clean();
    $tpl->assign('user_trans', $content);
    $konto = $db->fetch_assoc('SELECT * FROM ' . DB_PRE . 'ecp_clankasse');
    $konto['kontostand'] = number_format($konto['kontostand'], 2, ',', '');
    foreach ($konto as $key => $value) {
        $tpl->assign($key, $value);
    }
    $tpl->assign('options', get_options(date('m'), date('Y')));
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/clankasse.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(FINANCES, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:57,代码来源:clankasse.php


示例8: admin_matchtype

function admin_matchtype()
{
    $tpl = new smarty();
    $tpl->assign('matchtype', get_matchtypes());
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/matchtype.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(MATCHTYPE, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:10,代码来源:matchtype.php


示例9: admin_calendar

function admin_calendar()
{
    global $db, $countries;
    $tpl = new smarty();
    $tpl->assign('events', get_events());
    $tpl->assign('lang', get_languages());
    $tpl->assign('rights', get_form_rights());
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/calendar.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(CALENDAR, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:13,代码来源:calendar.php


示例10: admin_cms

function admin_cms()
{
    global $db;
    $tpl = new Smarty();
    $tpl->assign('cms', get_cms());
    $tpl->assign('lang', get_languages());
    $tpl->assign('rights', get_form_rights(@$_POST['rights']));
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/cms.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(OWN_SITES, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:13,代码来源:cms.php


示例11: admin_settings

 function admin_settings()
 {
     global $db, $countries;
     if (isset($_POST['submit'])) {
         unset($_POST['submit']);
         $_POST['SITE_URL'] = strrpos($_POST['SITE_URL'], '/') !== strlen($_POST['SITE_URL']) - 1 ? check_url($_POST['SITE_URL'] . '/') : check_url($_POST['SITE_URL']);
         $sql = 'UPDATE ' . DB_PRE . 'ecp_settings SET ';
         foreach ($_POST as $key => $value) {
             $sql .= $key . ' = "' . strsave($value) . '", ';
         }
         $sql = substr($sql, 0, strlen($sql) - 2);
         if ($db->query($sql)) {
             header('Location: ?section=admin&site=settings');
         }
     } else {
         $dir = scan_dir('templates', true);
         $designs = '';
         foreach ($dir as $value) {
             if (is_dir('templates/' . $value)) {
                 $designs .= '<option ' . ($value == DESIGN ? 'selected="selected"' : '') . ' value="' . $value . '">' . $value . '</option>';
             }
         }
         $tpl = new smarty();
         $tpl->assign('designs', $designs);
         $tpl->assign('langs', get_languages());
         $dir = scan_dir('module', true);
         $start = '';
         foreach ($dir as $value) {
             if (is_dir('module/' . $value)) {
                 $start .= '<option ' . ('modul|' . $value == STARTSEITE ? 'selected="selected"' : '') . ' value="modul|' . $value . '">' . $value . '</option>';
             }
         }
         $start .= '<option value="">-----' . OWN_SITES . '----</option>';
         $db->query('SELECT headline, cmsID FROM ' . DB_PRE . 'ecp_cms ORDER BY headline ASC');
         while ($row = $db->fetch_assoc()) {
             $title = json_decode($row['headline'], true);
             isset($title[LANGUAGE]) ? $title = $title[LANGUAGE] : ($title = $title[DEFAULT_LANG]);
             $start .= '<option ' . ('cms|' . $row['cmsID'] == STARTSEITE ? 'selected="selected"' : '') . ' value="cms|' . $row['cmsID'] . '">' . $title . '</option>';
         }
         $tpl->assign('startseite', $start);
         ob_start();
         $tpl->display(DESIGN . '/tpl/admin/settings.html');
         $content = ob_get_contents();
         ob_end_clean();
         main_content(SETTINGS, $content, '', 1);
     }
 }
开发者ID:ECP-Black,项目名称:ECP,代码行数:47,代码来源:settings.php


示例12: admin_topics

function admin_topics()
{
    global $db;
    $topics = array();
    $db->query('SELECT `tID`, `topicname`, `beschreibung`, `topicbild` FROM ' . DB_PRE . 'ecp_topics ORDER BY topicname ASC');
    while ($row = $db->fetch_assoc()) {
        $topics[] = $row;
    }
    $tpl = new Smarty();
    $tpl->assign('topics', $topics);
    $tpl->assign('pics', get_topic_pics());
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/topics.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(TOPICS, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:17,代码来源:topics.php


示例13: admin_fightus

function admin_fightus()
{
    global $db;
    $tpl = new smarty();
    $db->query('SELECT tname, gamename, icon, matchtypename, a.homepage, `fightusID`, a.clanname, `wardatum`, `bearbeitet`, `vonID`, username FROM ' . DB_PRE . 'ecp_fightus as a LEFT JOIN ' . DB_PRE . 'ecp_teams ON (teamID = tID) LEFT JOIN ' . DB_PRE . 'ecp_wars_games ON (gID=gameID) LEFT JOIN ' . DB_PRE . 'ecp_wars_matchtype ON (mID= matchtypeID) LEFT JOIN ' . DB_PRE . 'ecp_user ON (ID=vonID) ORDER BY bearbeitet ASC, wardatum ASC');
    $fightus = array();
    while ($row = $db->fetch_assoc()) {
        $row['wardatum'] = date(SHORT_DATE, $row['wardatum']);
        $fightus[] = $row;
    }
    $tpl->assign('fightus', $fightus);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/fightus.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(FIGHTUS, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:17,代码来源:fightus.php


示例14: admin_survey

function admin_survey()
{
    global $db, $groups;
    $anzahl = $db->result(DB_PRE . 'ecp_survey', 'COUNT(surveyID)', '1');
    if ($anzahl) {
        $limits = get_sql_limit($anzahl, LIMIT_SURVEY);
        $db->query('SELECT `surveyID`, `start`, `ende`, `frage` FROM `' . DB_PRE . 'ecp_survey` ORDER BY ende DESC LIMIT ' . $limits[1] . ', ' . LIMIT_SURVEY);
        $umfrage = array();
        while ($row = $db->fetch_assoc()) {
            if ($row['start'] > time()) {
                $row['status'] = PLANNED;
                $row['closed'] = 1;
            } elseif ($row['ende'] < time()) {
                $row['status'] = CLOSED;
                $row['closed'] = 1;
            } else {
                $row['status'] = RUN;
            }
            $row['start'] = date(LONG_DATE, $row['start']);
            $row['ende'] = date(LONG_DATE, $row['ende']);
            $umfrage[] = $row;
        }
    }
    $tpl = new smarty();
    $db->query('SELECT groupID, name FROM ' . DB_PRE . 'ecp_groups ORDER by name ASC');
    $rights = '<option value="all" selected="selected">' . ALL . '</option>';
    while ($row = $db->fetch_assoc()) {
        if (isset($groups[$row['name']])) {
            $row['name'] = $groups[$row['name']];
        }
        $rights .= '<option value="' . $row['groupID'] . '">' . $row['name'] . '</option>';
    }
    $tpl->assign('rights', $rights);
    $tpl->assign('anzahl', $anzahl);
    $tpl->assign('umfrage', @$umfrage);
    $tpl->assign('pages', @$limits[0]);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/survey.html');
    $tpl->display(DESIGN . '/tpl/admin/survey_overview.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(SURVEY, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:43,代码来源:survey.php


示例15: admin_awards

function admin_awards()
{
    global $db;
    $awards = array();
    $db->query('SELECT `awardID`, `eventname`, `eventdatum`, `url`, `platz` FROM ' . DB_PRE . 'ecp_awards ORDER BY eventdatum DESC');
    while ($row = $db->fetch_assoc()) {
        $row['eventdatum'] = date('d.m.Y', $row['eventdatum']);
        $awards[] = $row;
    }
    $tpl = new Smarty();
    $tpl->assign('awards', $awards);
    $tpl->assign('teams', get_teams_form());
    $tpl->assign('games', get_games_form());
    $tpl->assign('lang', get_languages());
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/awards.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(AWARDS, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:20,代码来源:awards.php


示例16: admin_downloads

function admin_downloads()
{
    global $db;
    $tpl = new smarty();
    $tpl->assign('lang', get_languages());
    $tpl->assign('rights', get_form_rights(@$_POST['rights']));
    $tpl->assign('kate', download_get_cate(@$_POST['subID']));
    $db->query('SELECT name, dID FROM ' . DB_PRE . 'ecp_downloads ORDER BY name ASC');
    $dl = '<option value="0">' . CHOOSE . '</option>';
    while ($row = $db->fetch_assoc()) {
        $dl .= '<option value="' . $row['dID'] . '">' . $row['name'] . '</option>';
    }
    $tpl->assign('dls', $dl);
    //foreach($_POST AS $key=>$value) $tpl->assign($key, $value);
    ob_start();
    $tpl->display(DESIGN . '/tpl/admin/downloads.html');
    $content = ob_get_contents();
    ob_end_clean();
    main_content(DOWNLOADS, $content, '', 1);
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:20,代码来源:downloads.php


示例17: admin_smilies_add

function admin_smilies_add()
{
    global $db;
    if (!isset($_SESSION['rights']['admin']['smilies']['add']) and !isset($_SESSION['rights']['superadmin'])) {
        echo NO_ADMIN_RIGHTS;
    } else {
        if (@$_FILES['smilie']['tmp_name'] == '') {
            table(ERROR, NOT_NEED_ALL_INPUTS);
            $tpl = new smarty();
            ob_start();
            $tpl->display(DESIGN . '/tpl/admin/smilies.html');
            $content = ob_get_contents();
            ob_end_clean();
            main_content(SMILIES, $content, '', 1);
            get_smilies();
        } elseif ($_FILES['smilie']['type'] != 'image/jpg' and $_FILES['smilie']['type'] != 'image/gif' and $_FILES['smilie']['type'] != 'image/png' and $_FILES['smilie']['type'] != 'image/jpeg') {
            table(ERROR, WRONG_FILE_TYPE);
            $tpl = new smarty();
            ob_start();
            $tpl->display(DESIGN . '/tpl/admin/smilies.html');
            $content = ob_get_contents();
            ob_end_clean();
            main_content(SMILIES, $content, '', 1);
            get_smilies();
        } else {
            ajax_convert_array($_POST);
            ajax_convert_array($_FILES);
            if (move_uploaded_file($_FILES['smilie']['tmp_name'], 'images/smilies/' . str_replace(' ', '_', $_FILES['smilie']['name']))) {
                umask(0);
                chmod('images/smilies/' . str_replace(' ', '_', $_FILES['smilie']['name']), CHMOD);
                $sql = sprintf('INSERT INTO ' . DB_PRE . 'ecp_smilies (`bedeutung`, `filename`) 
								VALUES (\'%s\', \'%s\')', strsave($_POST['bedeutung']), strsave(str_replace(' ', '_', $_FILES['smilie']['name'])));
                if ($db->query($sql)) {
                    header1('?section=admin&site=smilies');
                }
            }
        }
    }
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:39,代码来源:smilies.php


示例18: awards_view

function awards_view($id)
{
    global $db;
    $row = $db->fetch_assoc('SELECT `awardID`, `eventname`, `eventdatum`, `url`, `platz`, `teamID`, `gID`, `preis`, spieler, bericht, tname, icon, gamename FROM `' . DB_PRE . 'ecp_awards` LEFT JOIN ' . DB_PRE . 'ecp_teams ON tID = teamID LEFT JOIN ' . DB_PRE . 'ecp_wars_games ON gameID = gID WHERE awardID = ' . $id);
    if (@$row['eventname']) {
        $tpl = new smarty();
        $row['eventdatum'] = date('d.m.Y', $row['eventdatum']);
        $report = json_decode($row['bericht'], true);
        $spieler = explode(',', $row['spieler']);
        $row['preis'] = htmlentities($row['preis'], ENT_QUOTES, "UTF-8");
        $row['eventname'] = htmlentities($row['eventname'], ENT_QUOTES, "UTF-8");
        foreach ($spieler as $value) {
            if ((int) $value) {
                @($ids .= ' OR ID = ' . $value);
            }
        }
        $db->query('SELECT username, ID FROM ' . DB_PRE . 'ecp_user WHERE ID = 0' . @$ids);
        while ($sub = $db->fetch_assoc()) {
            @($players .= ', <a href="?section=user&id=' . $sub['ID'] . '" >' . $sub['username'] . '</a>');
        }
        $tpl->assign('players', substr(@$players, 2));
        if (isset($report[LANGUAGE])) {
            $row['bericht'] = $report[LANGUAGE];
        } else {
            $row['bericht'] = @$report['de'];
        }
        foreach ($row as $key => $value) {
            $tpl->assign($key, $value);
        }
        ob_start();
        $tpl->display(DESIGN . '/tpl/awards/view.html');
        $content = ob_get_contents();
        ob_end_clean();
        main_content(AWARDS, $content, '', 1);
    } else {
        table(ERROR, NO_ENTRIES_ID);
    }
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:38,代码来源:index.php


示例19: admin_ranks_add

function admin_ranks_add()
{
    global $db;
    if (!isset($_SESSION['rights']['admin']['ranks']['add']) and !isset($_SESSION['rights']['superadmin'])) {
        echo NO_ADMIN_RIGHTS;
    } else {
        if (@$_FILES['rank']['tmp_name'] == '' or $_POST['rankname'] == '') {
            table(ERROR, NOT_NEED_ALL_INPUTS);
            $tpl = new smarty();
            ob_start();
            $tpl->display(DESIGN . '/tpl/admin/ranks.html');
            $content = ob_get_contents();
            ob_end_clean();
            main_content(RANGS, $content, '', 1);
            get_ranks();
        } elseif ($_FILES['rank']['type'] != 'image/jpg' and $_FILES['rank']['type'] != 'image/gif' and $_FILES['rank']['type'] != 'image/png' and $_FILES['rank']['type'] != 'image/jpeg') {
            table(ERROR, WRONG_FILE_TYPE);
            $tpl = new smarty();
            ob_start();
            $tpl->display(DESIGN . '/tpl/admin/ranks.html');
            $content = ob_get_contents();
            ob_end_clean();
            main_content(RANGS, $content, '', 1);
            get_ranks();
        } else {
            if (move_uploaded_file($_FILES['rank']['tmp_name'], 'images/ranks/' . str_replace(' ', '_', $_FILES['rank']['name']))) {
                umask(0);
                chmod('images/ranks/' . str_replace(' ', '_', $_FILES['rank']['name']), CHMOD);
                $sql = sprintf('INSERT INTO ' . DB_PRE . 'ecp_ranks (`rankname`, `iconname`, abposts, fest, money) 
								VALUES (\'%s\', \'%s\', %d, %d, %f)', strsave($_POST['rankname']), strsave(str_replace(' ', '_', $_FILES['rank']['name'])), (int) @$_POST['abposts'], (int) @$_POST['fest'], (double) str_replace(',', '.', @$_POST['money']));
                if ($db->query($sql)) {
                    header1('?section=admin&site=ranks');
                }
            }
        }
    }
}
开发者ID:ECP-Black,项目名称:ECP,代码行数:37,代码来源:ranks.php


示例20: templates

<?php
	include_once('ressources/class.templates.inc');
	include_once('ressources/class.ldap.inc');
	include_once('ressources/class.users.menus.inc');
	include_once('ressources/class.maincf.multi.inc');
	include_once('ressources/class.rtmm.tools.inc');
	if(isset($_GET["org"])){$_GET["ou"]=$_GET["org"];}
	
	if(!PostFixMultiVerifyRights()){
		$tpl=new templates();
		echo "alert('". $tpl->javascript_parse_text("{ERROR_NO_PRIVS}")."');";
		die();exit();
	}	
	
	if(isset($_GET["in-front-ajax"])){popup_js_front();exit;}
	if(isset($_GET["content"])){main_content();exit;}
	if(isset($_GET["left-menus"])){left_menus();exit;}
	if(isset($_GET["add-server"])){add_server_popup();exit;}
	if(isset($_GET["inet_interfaces"])){add_server_save();exit;}
	if(isset($_GET["servers-list"])){server_list();exit;}
	if(isset($_GET["rttm-logs"])){rttm_logs();exit;}
	popup();
			
	
function popup_js_front(){
	$tpl=new templates();
	$page=CurrentPageName();
	if(isset($_GET["encoded"])){
		$ou=base64_decode($_GET["ou"]);
	}
	$html="
开发者ID:rsd,项目名称:artica-1.5,代码行数:31,代码来源:domains.postfix.multi.php



注:本文中的main_content函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP main_logs函数代码示例发布时间:2022-05-15
下一篇:
PHP main_config函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap