当前位置: 首页>>代码示例>>PHP>>正文


PHP cs_secure函数代码示例

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


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

示例1: cs_newsletter_to

function cs_newsletter_to($select)
{
    $cs_lang = cs_translate('newsletter');
    $op_squads = cs_sql_option(__FILE__, 'squads', 'label');
    $op_clans = cs_sql_option(__FILE__, 'clans', 'label');
    $dp = cs_html_option('----', '0', 1);
    $dp .= cs_html_option($cs_lang['all_users'], '1');
    $dp .= cs_html_option('»' . $cs_lang['ac_group'], '');
    $usergroups = cs_sql_select(__FILE__, 'access', 'access_id,access_name', 'access_id != 1', 0, 0, 0);
    foreach ($usergroups as $value) {
        $dp .= cs_html_option('   ' . cs_secure($value['access_name']), '2?' . $value['access_id']);
    }
    $dp .= cs_html_option(' »' . $cs_lang[$op_squads['label']], '');
    $squads = cs_sql_select(__FILE__, 'squads', 'squads_id, squads_name', 0, 'squads_name', 0, 0);
    $squads = empty($squads) ? array() : $squads;
    foreach ($squads as $squad) {
        $dp .= cs_html_option('   ' . cs_secure($squad['squads_name']), '3?' . $squad['squads_id']);
    }
    $dp .= cs_html_option('»' . $cs_lang[$op_clans['label']], '');
    $clans = cs_sql_select(__FILE__, 'clans', 'clans_id, clans_name', 0, 'clans_name', 0, 0);
    $clans = empty($clans) ? array() : $clans;
    foreach ($clans as $clan) {
        $dp .= cs_html_option('   ' . cs_secure($clan['clans_name']), '4?' . $clan['clans_id']);
    }
    $data['nl']['to_dropdown'] = $dp;
    return $dp;
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:27,代码来源:functions.php

示例2: cs_update_rss

function cs_update_rss($mod, $action, $name, $desc, $array, $abcode = 0)
{
    global $cs_main;
    $cs_main['rss'] = 1;
    $abcode = is_array($abcode) ? $abcode : array(0 => 1, 1 => 0, 2 => 0, 3 => 0, 4 => 0);
    $target = 'uploads/rss/';
    $name_sec = htmlspecialchars($name, ENT_NOQUOTES, $cs_main['charset']);
    $desc_sec = htmlspecialchars($desc, ENT_NOQUOTES, $cs_main['charset']);
    if (is_writeable($target)) {
        include_once 'system/output/rss_20.php';
        $content = cs_rss_mode(1);
        $content .= cs_rss_channel(1, $mod, $name_sec, $cs_main['php_self']['website'], $desc_sec);
        if (!empty($array)) {
            foreach ($array as $item) {
                if (!empty($item['id']) and !empty($item['title']) and !empty($item['text'])) {
                    $title = htmlspecialchars($item['title'], ENT_NOQUOTES, $cs_main['charset']);
                    $link = $cs_main['php_self']['website'] . cs_url($mod, $action, 'id=' . $item['id'], 'index');
                    $text = empty($item['readmore']) ? $item['text'] : $item['readmore'];
                    $text = cs_secure($text, $abcode[0], $abcode[1], $abcode[2], $abcode[3], $abcode[4]);
                    $text = '<![CDATA[ ' . $text . ' ]]>';
                    if (!empty($abcode[3])) {
                        # use full uri if needed in html content
                        $url_pre = $cs_main['php_self']['website'] . $cs_main['php_self']['dirname'];
                        $pattern = "=(background|href|src)\\=\"(?!http|\\/)(.*?)\"=i";
                        $text = preg_replace($pattern, "\\1=\"" . $url_pre . "\\2\"", $text);
                    }
                    $date = empty($item['time']) ? 0 : date('D, d M Y H:i:s', $item['time']) . ' +0000';
                    # author is presented as 'email (nick)'
                    $author = (empty($item['nick']) or empty($item['author'])) ? '' : $item['author'] . ' (' . cs_secure($item['nick']) . ')';
                    $category = empty($item['cat']) ? '' : htmlspecialchars($item['cat'], ENT_NOQUOTES, $cs_main['charset']);
                    $content .= cs_rss_item($title, $link, $text, $date, $author, $category);
                }
            }
        }
        $content .= cs_rss_channel(0);
        $content .= cs_rss_mode(0);
        $save_file = fopen($target . $mod . '.xml', 'w');
        # set stream encoding if possible to avoid converting issues
        if (function_exists('stream_encoding')) {
            stream_encoding($save_file, $cs_main['charset']);
        }
        fwrite($save_file, $content);
        fclose($save_file);
        @chmod($target . $mod . '.xml', 0755);
    } else {
        cs_error($target, 'cs_update_rss - Unable to write into directory');
    }
    $cs_main['rss'] = 0;
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:49,代码来源:generate.php

示例3: cs_secure

 $data['users']['users_surname'] = cs_secure($cs_user['users_surname']);
 $data['users']['users_age'] = cs_dateselect('age', 'date', $cs_user['users_age']);
 $data['users']['male_check'] = $cs_user['users_sex'] == 'male' ? $sel : '';
 $data['users']['female_check'] = $cs_user['users_sex'] == 'female' ? $sel : '';
 $data['users']['users_height'] = cs_secure($cs_user['users_height']);
 $data['users']['users_postalcode'] = cs_secure($cs_user['users_postalcode']);
 $data['users']['users_place'] = cs_secure($cs_user['users_place']);
 $data['users']['users_adress'] = cs_secure($cs_user['users_adress']);
 $data['users']['users_icq'] = cs_secure($cs_user['users_icq']);
 $data['users']['users_jabber'] = cs_secure($cs_user['users_jabber']);
 $data['users']['users_skype'] = cs_secure($cs_user['users_skype']);
 $data['users']['users_email'] = cs_secure($cs_user['users_email']);
 $data['users']['users_url'] = cs_secure($cs_user['users_url']);
 $data['users']['users_phone'] = cs_secure($cs_user['users_phone']);
 $data['users']['users_mobile'] = cs_secure($cs_user['users_mobile']);
 $data['users']['users_info'] = cs_secure($cs_user['users_info']);
 $data['users']['country_url'] = cs_html_img('symbols/countries/' . $cs_user['users_country'] . '.png', 0, 0, 'id="country_1"');
 $data['hidden']['users_name'] = isset($hidden['users_name']) ? $checked : '';
 $data['hidden']['users_surname'] = isset($hidden['users_surname']) ? $checked : '';
 $data['hidden']['users_age'] = isset($hidden['users_age']) ? $checked : '';
 $data['hidden']['users_height'] = isset($hidden['users_height']) ? $checked : '';
 $data['hidden']['users_postalcode'] = isset($hidden['users_postalcode']) ? $checked : '';
 $data['hidden']['users_place'] = isset($hidden['users_place']) ? $checked : '';
 $data['hidden']['users_adress'] = isset($hidden['users_adress']) ? $checked : '';
 $data['hidden']['users_icq'] = isset($hidden['users_icq']) ? $checked : '';
 $data['hidden']['users_jabber'] = isset($hidden['users_jabber']) ? $checked : '';
 $data['hidden']['users_skype'] = isset($hidden['users_skype']) ? $checked : '';
 $data['hidden']['users_email'] = isset($hidden['users_email']) ? $checked : '';
 $data['hidden']['users_url'] = isset($hidden['users_url']) ? $checked : '';
 $data['hidden']['users_phone'] = isset($hidden['users_phone']) ? $checked : '';
 $data['hidden']['users_mobile'] = isset($hidden['users_mobile']) ? $checked : '';
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:profile.php

示例4: cs_sql_select

        $age--;
    }
    if (cs_datereal('d') >= $birth[2] and cs_datereal('m') == $birth[1]) {
        $age++;
    }
    $content .= ' (' . $age . ')';
    $data['clans']['since'] = $content;
} else {
    $data['clans']['since'] = '-';
}
$select = 'squads_name, games_id, squads_id';
$where = "clans_id = '" . $cs_clans_id . "'";
$cs_squads = cs_sql_select(__FILE__, 'squads', $select, $where, 'squads_order, squads_name', 0, 0);
$squads_loop = count($cs_squads);
$data['lang']['game'] = $cs_lang['game'];
$data['lang']['squads'] = $cs_lang[$op_squads['label']];
$data['lang']['members'] = $cs_lang[$op_members['label']];
if (empty($squads_loop)) {
    $data['squads'] = '';
}
for ($run = 0; $run < $squads_loop; $run++) {
    if (!empty($cs_squads[$run]['games_id'])) {
        $data['squads'][$run]['game'] = cs_html_img('uploads/games/' . $cs_squads[$run]['games_id'] . '.gif');
    } else {
        $data['squads'][$run]['game'] = '';
    }
    $data['squads'][$run]['squads'] = cs_link(cs_secure($cs_squads[$run]['squads_name']), 'squads', 'view', 'id=' . $cs_squads[$run]['squads_id']);
    $where = "squads_id='" . $cs_squads[$run]['squads_id'] . "'";
    $data['squads'][$run]['members'] = cs_sql_count(__FILE__, 'members', $where);
}
echo cs_subtemplate(__FILE__, $data, 'clans', 'view');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例5: cs_cups_get_teams

function cs_cups_get_teams($cups_id, $cups_type, $cs_lang)
{
    switch ($cups_type) {
        case CS_CUPS_TYPE_TEAMS:
            $tables = 'cupsquads cs LEFT JOIN {pre}_';
            $tables .= 'squads team ON cs.squads_id = team.squads_id';
            $cells = 'cs.cupsquads_id AS cupsquads_id, cs.cupsquads_time AS cupsquads_time, cs.squads_id AS squads_id, ';
            $cells .= 'cs.cupsquads_seed AS cupsquads_seed, cs.cupsquads_autoseed AS cupsquads_autoseed, ';
            $cells .= 'team.squads_name AS squads_name';
            break;
        case CS_CUPS_TYPE_USERS:
            $tables = 'cupsquads cs LEFT JOIN {pre}_';
            $tables .= 'users team ON cs.squads_id = team.users_id';
            $cells = 'cs.cupsquads_id AS cupsquads_id, cs.cupsquads_time AS cupsquads_time, cs.squads_id AS squads_id, ';
            $cells .= 'cs.cupsquads_seed AS cupsquads_seed, cs.cupsquads_autoseed AS cupsquads_autoseed, ';
            $cells .= 'team.users_nick AS squads_name, team.users_active AS users_active, team.users_delete AS users_delete';
            break;
    }
    $teams = cs_sql_select(__FILE__, $tables, $cells, 'cs.cups_id = ' . $cups_id, 'cupsquads_autoseed ASC, cupsquads_seed ASC', 0, 0);
    if (!count($teams)) {
        return NULL;
    }
    foreach ($teams as $key => $team) {
        if (empty($team['cupsquads_autoseed'])) {
            $teams[$key]['seed_text'] = $team['cupsquads_seed'];
            $teams[$key]['autoseed_on'] = '';
            $teams[$key]['autoseed_off'] = 'checked';
        } else {
            $teams[$key]['seed_text'] = $cs_lang['auto'];
            $teams[$key]['autoseed_on'] = 'checked';
            $teams[$key]['autoseed_off'] = '';
        }
        $teams[$key]['join'] = cs_date('unix', $teams[$key]['cupsquads_time'], 1);
        switch ($cups_type) {
            case CS_CUPS_TYPE_TEAMS:
                $teams[$key]['link'] = cs_link(cs_secure($team['squads_name']), 'squads', 'view', 'id=' . $team['squads_id']);
                break;
            case CS_CUPS_TYPE_USERS:
                $teams[$key]['link'] = cs_user($team['squads_id'], $team['squads_name'], $team['users_active'], $team['users_delete']);
                break;
        }
    }
    return $teams;
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:44,代码来源:functions.php

示例6: empty

$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$sort = empty($cs_get['sort']) ? 2 : $cs_get['sort'];
if (!empty($cs_post['sort'])) {
    $sort = $cs_post['sort'];
}
$cs_sort[1] = 'linkus_name DESC';
$cs_sort[2] = 'linkus_name ASC';
$cs_sort[3] = 'linkus_banner DESC';
$cs_sort[4] = 'linkus_banner ASC';
$order = $cs_sort[$sort];
$linkus_count = cs_sql_count(__FILE__, 'linkus');
$data['head']['count'] = $linkus_count;
$data['head']['pages'] = cs_pages('linkus', 'manage', $linkus_count, $start, 0, $sort);
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['name'] = cs_sort('linkus', 'manage', $start, 0, 1, $sort);
$data['sort']['banner'] = cs_sort('linkus', 'manage', $start, 0, 3, $sort);
$select = 'linkus_id, linkus_name, linkus_banner';
$data['linkus'] = cs_sql_select(__FILE__, 'linkus', $select, 0, $order, $start, $account['users_limit']);
$linkus_loop = count($data['linkus']);
for ($run = 0; $run < $linkus_loop; $run++) {
    $data['linkus'][$run]['name'] = cs_secure($data['linkus'][$run]['linkus_name']);
    $data['linkus'][$run]['banner'] = cs_secure($data['linkus'][$run]['linkus_banner']);
    $place = 'uploads/linkus/' . $data['linkus'][$run]['linkus_banner'];
    $mass = getimagesize($place);
    $data['linkus'][$run]['mass'] = cs_secure($mass[0] . ' x ' . $mass[1]);
    $data['linkus'][$run]['id'] = $data['linkus'][$run]['linkus_id'];
}
echo cs_subtemplate(__FILE__, $data, 'linkus', 'manage');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:manage.php

示例7: cs_secure

for ($run = 0; $run < $count_squads; $run++) {
    $data['squads'][$run]['name'] = cs_secure($data['squads'][$run]['squads_name']);
}
$data['sort']['date'] = cs_sort('wars', 'list', $start, $squads_id, 1, $sort);
$data['sort']['enemy'] = cs_sort('wars', 'list', $start, $squads_id, 3, $sort);
$data['sort']['category'] = cs_sort('wars', 'list', $start, $squads_id, 5, $sort);
$select = 'war.games_id AS games_id, war.wars_date AS wars_date, war.wars_status AS status, war.clans_id AS clans_id, cln.clans_short AS clans_short, cat.categories_name AS categories_name, war.categories_id AS categories_id, war.wars_score1 AS wars_score1, war.wars_score2 AS wars_score2, war.wars_id AS wars_id';
$from = 'wars war INNER JOIN {pre}_categories cat ON war.categories_id = cat.categories_id ';
$from .= 'INNER JOIN {pre}_clans cln ON war.clans_id = cln.clans_id ';
$cs_wars = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$data['wars'] = '';
$count_wars = count($cs_wars);
for ($run = 0; $run < $count_wars; $run++) {
    $data['wars'][$run]['gameicon'] = cs_html_img('uploads/games/' . $cs_wars[$run]['games_id'] . '.gif');
    $data['wars'][$run]['date'] = cs_date('unix', $cs_wars[$run]['wars_date']);
    $data['wars'][$run]['enemyurl'] = cs_url('clans', 'view', 'id=' . $cs_wars[$run]['clans_id']);
    $data['wars'][$run]['enemy'] = cs_secure($cs_wars[$run]['clans_short']);
    $data['wars'][$run]['caturl'] = cs_url('categories', 'view', 'id=' . $cs_wars[$run]['categories_id']);
    $data['wars'][$run]['category'] = cs_secure($cs_wars[$run]['categories_name']);
    $data['wars'][$run]['url'] = cs_url('wars', 'view', 'id=' . $cs_wars[$run]['wars_id']);
    $data['wars'][$run]['result'] = $cs_wars[$run]['wars_score1'] . ' : ' . $cs_wars[$run]['wars_score2'];
    $data['wars'][$run]['if']['upcoming'] = $cs_wars[$run]['status'] == 'upcoming' ? true : false;
    $data['wars'][$run]['if']['played'] = $cs_wars[$run]['status'] == 'played' ? true : false;
    $data['wars'][$run]['if']['running'] = $cs_wars[$run]['status'] == 'running' ? true : false;
    $data['wars'][$run]['if']['canceled'] = $cs_wars[$run]['status'] == 'canceled' ? true : false;
    $result = $cs_wars[$run]['wars_score1'] - $cs_wars[$run]['wars_score2'];
    $icon = $result >= 1 ? 'green' : 'red';
    $icon = !empty($result) ? $icon : 'grey';
    $data['wars'][$run]['resulticon'] = cs_html_img('symbols/clansphere/' . $icon . '.gif');
}
echo cs_subtemplate(__FILE__, $data, 'wars', 'list');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:list.php

示例8: empty

        $gbook[$run]['icon_icq'] = empty($icq) ? '' : cs_html_link("http://www.icq.com/{$icq}", cs_icon('licq'));
        $jabber = cs_secure($cs_gbook[$run]['users_jabber']);
        if (in_array('users_jabber', $hidden)) {
            $jabber = empty($allow) ? '' : $jabber;
        }
        $gbook[$run]['icon_jabber'] = empty($jabber) ? '' : cs_html_jabbermail($jabber, cs_icon('jabber_protocol'));
        $skype = cs_secure($cs_gbook[$run]['users_skype']);
        $url = 'http://mystatus.skype.com/smallicon/' . $skype;
        $skype = cs_html_link('skype:' . $cs_gbook[$run]['users_skype'] . '?userinfo', cs_html_img($url, '16', '16', '0', 'Skype'), '0');
        if (in_array('users_skype', $hidden)) {
            $skype = empty($allow) ? '' : $skype;
        }
        $gbook[$run]['icon_skype'] = empty($cs_gbook[$run]['users_skype']) ? '' : $skype;
        $url = cs_secure($cs_gbook[$run]['users_url']);
        if (in_array('users_url', $hidden)) {
            $url = empty($allow) ? '' : $url;
        }
        $gbook[$run]['icon_url'] = empty($url) ? '' : cs_html_link("http://{$url}", cs_icon('gohome'));
    }
    $gbook[$run]['text'] = cs_secure($cs_gbook[$run]['gbook_text'], 1, 1);
    $gbook[$run]['time'] = cs_date('unix', $cs_gbook[$run]['gbook_time'], 1);
    if ($cs_gbook[$run]['gbook_lock'] == 0) {
        $gbook[$run]['class'] = 'notpublic';
        $gbook[$run]['de_activate'] = cs_link(cs_icon('submit'), 'gbook', 'center', 'unhide=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['unhide']);
    } else {
        $gbook[$run]['class'] = '';
        $gbook[$run]['de_activate'] = cs_link(cs_icon('editcut'), 'gbook', 'center', 'hide=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['hide']);
    }
}
$data['gbook'] = !empty($gbook) ? $gbook : '';
echo cs_subtemplate(__FILE__, $data, 'gbook', 'center');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:center.php

示例9: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('rules');
$cs_get = cs_get('id');
$data = array();
$categories_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
$where = "categories_id = '" . $categories_id . "' AND categories_access <= '" . $account['access_rules'] . "'";
$data['cat_data'] = cs_sql_select(__FILE__, 'categories', 'categories_name, categories_text', $where, 0, 0);
if (isset($data['cat_data']['name'])) {
    $data['cat_data']['name'] = cs_secure($data['cat_data']['categories_name']);
    $data['cat_data']['text'] = cs_secure($data['cat_data']['categories_text'], 1);
} else {
    $data['cat_data']['name'] = '';
    $data['cat_data']['text'] = '';
}
$select = 'rules_order, rules_title, rules_rule';
$data['rules'] = cs_sql_select(__FILE__, 'rules', $select, "categories_id = '" . $categories_id . "'", 'rules_order ASC', 0, 0);
$rules_loop1 = count($data['rules']);
for ($run = 0; $run < $rules_loop1; $run++) {
    $data['rules'][$run]['order'] = cs_secure($data['rules'][$run]['rules_order']);
    $data['rules'][$run]['title'] = cs_secure($data['rules'][$run]['rules_title']);
    $data['rules'][$run]['rule'] = cs_secure($data['rules'][$run]['rules_rule'], 1);
}
echo cs_subtemplate(__FILE__, $data, 'rules', 'listcat');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:26,代码来源:listcat.php

示例10: empty

 if ($data['match']['squad1_id'] == CS_CUPS_TEAM_UNKNOWN || $data['match']['squad2_id'] == CS_CUPS_TEAM_UNKNOWN) {
     echo $cs_lang['edit_denied'];
     return;
 }
 if ($system['cups_system'] == CS_CUPS_TYPE_TEAMS) {
     $data['match']['team1_id'] = $data['match']['squad1_id'];
     $data['match']['team2_id'] = $data['match']['squad2_id'];
     if (empty($data['match']['squad1_id'])) {
         $data['match']['team1_name'] = $cs_lang['bye'];
     } else {
         $data['match']['team1_name'] = empty($data['match']['squad1_name']) ? '? ID:' . $data['match']['squad1_id'] : cs_secure($data['match']['squad1_name']);
     }
     if (empty($data['match']['squad2_id'])) {
         $data['match']['team2_name'] = $cs_lang['bye'];
     } else {
         $data['match']['team2_name'] = empty($data['match']['squad2_name']) ? '? ID:' . $data['match']['squad2_id'] : cs_secure($data['match']['squad2_name']);
     }
 } else {
     $data['match']['team1_id'] = $data['match']['squad1_id'];
     $data['match']['team2_id'] = $data['match']['squad2_id'];
     if (empty($data['match']['squad1_id'])) {
         $data['match']['team1_name'] = $cs_lang['bye'];
     } else {
         $data['match']['team1_name'] = $data['match']['user1_nick'];
     }
     if (empty($data['match']['squad2_id'])) {
         $data['match']['team2_name'] = $cs_lang['bye'];
     } else {
         $data['match']['team2_name'] = $data['match']['user2_nick'];
     }
 }
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:matchedit.php

示例11: cs_sql_select

    $cs_buddys = cs_sql_select(__FILE__, 'buddys', $cells, "buddys_id = '" . $buddys_id . "'");
}
if (isset($_POST['preview'])) {
    $data['if']['preview'] = TRUE;
    $data['if']['form'] = TRUE;
    $data['if']['done'] = FALSE;
    $data['edit']['buddys_notice'] = cs_secure($cs_buddys['buddys_notice'], 1, 1);
    $data['edit']['id'] = $buddys_id;
}
if (isset($_POST['preview']) or !isset($_POST['submit'])) {
    if (!isset($_POST['preview'])) {
        $data['if']['preview'] = FALSE;
        $data['if']['form'] = TRUE;
        $data['if']['done'] = FALSE;
    }
    $data['edit']['abcode_smileys'] = cs_abcode_smileys('buddys_notice');
    $data['edit']['abcode_features'] = cs_abcode_features('buddys_notice');
    $data['edit']['buddys_notice'] = cs_secure($cs_buddys['buddys_notice']);
    $data['edit']['id'] = $buddys_id;
} else {
    $buddys_id = $_POST['id'];
    settype($buddys_id, 'integer');
    $data['if']['preview'] = FALSE;
    $data['if']['form'] = FALSE;
    $data['if']['done'] = TRUE;
    $buddys_cells = array_keys($cs_buddys);
    $buddys_save = array_values($cs_buddys);
    cs_sql_update(__FILE__, 'buddys', $buddys_cells, $buddys_save, $buddys_id);
    cs_redirect($cs_lang['changes_done'], 'buddys', 'center');
}
echo cs_subtemplate(__FILE__, $data, 'buddys', 'edit');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:edit.php

示例12: empty

}
$wars['war']['report'] = empty($cs_wars['wars_report']) ? '-' : cs_secure($cs_wars['wars_report'], 1, 1);
$wars['war']['report2'] = empty($cs_wars['wars_report2']) ? '-' : cs_secure($cs_wars['wars_report2'], 1, 1);
$tables2 = 'rounds rnd INNER JOIN {pre}_maps mps ON rnd.maps_id = mps.maps_id';
$cells2 = 'rnd.rounds_score1 AS rounds_score1, rnd.rounds_score2 AS rounds_score2, ' . 'rnd.rounds_description AS rounds_description, mps.maps_name AS maps_name, ' . 'rnd.maps_id AS maps_id';
$wars['rounds'] = cs_sql_select(__FILE__, $tables2, $cells2, 'rnd.wars_id = \'' . $wars_id . '\'', 'rnd.rounds_order ASC', 0, 0);
if (!empty($wars['rounds'])) {
    $count_rounds = count($wars['rounds']);
    for ($run = 0; $run < $count_rounds; $run++) {
        $wars['rounds'][$run]['mapurl'] = cs_url('maps', 'view', 'id=' . $wars['rounds'][$run]['maps_id']);
        $wars['rounds'][$run]['maps_name'] = cs_secure($wars['rounds'][$run]['maps_name']);
        $result2 = $wars['rounds'][$run]['rounds_score1'] - $wars['rounds'][$run]['rounds_score2'];
        $icon2 = $result2 >= 1 ? 'green' : 'red';
        $icon2 = !empty($result2) ? $icon2 : 'grey';
        $wars['rounds'][$run]['resulticon'] = cs_html_img('symbols/clansphere/' . $icon2 . '.gif');
        $wars['rounds'][$run]['rounds_description'] = cs_secure($wars['rounds'][$run]['rounds_description'], 1, 1);
    }
} else {
    $wars['rounds'] = array();
}
if ($wars_status == 'upcoming') {
    $condition = 'users_id = \'' . $account['users_id'] . '\' AND squads_id = \'' . $cs_squad['squads_id'] . '\'';
    $squadmember = cs_sql_count(__FILE__, 'members', $condition);
    $wars_access = empty($account['access_wars']) ? 0 : $account['access_wars'];
    if (!empty($squadmember) or $wars_access >= 3) {
        $wars['if']['squadmember'] = TRUE;
        $wars['if']['no_players'] = FALSE;
        $wars['if']['status'] = FALSE;
        $tables = 'players ply INNER JOIN {pre}_users usr ON ply.users_id = usr.users_id';
        $cells = 'ply.users_id AS users_id, ply.players_status AS players_status, ' . 'ply.players_time AS players_time, usr.users_nick AS users_nick, usr.users_active AS users_active';
        $nplayers = cs_sql_select(__FILE__, $tables, $cells, 'ply.wars_id = \'' . $wars_id . '\'', 'ply.players_status DESC', 0, 0);
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:view.php

示例13: cs_translate

<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('links');
$data = array();
$links_count = cs_sql_count(__FILE__, 'links', 'links_sponsor = 1');
$data['head']['body'] = sprintf($cs_lang['all1'], $links_count);
$select = 'links_name, links_url, links_banner, links_info';
$data['links'] = cs_sql_select(__FILE__, 'links', $select, 'links_sponsor = 1', 0, 0, 0);
$links_loop = count($data['links']);
for ($run = 0; $run < $links_loop; $run++) {
    $data['links'][$run]['name'] = cs_secure($data['links'][$run]['links_name']);
    $target = 'http://' . $data['links'][$run]['links_url'];
    $data['links'][$run]['url_img'] = cs_html_link($target, $data['links'][$run]['links_url']);
    if (!empty($data['links'][$run]['links_banner'])) {
        $place = 'uploads/links/' . $data['links'][$run]['links_banner'];
        $img = cs_html_img($place, 0, 0, 0, $data['links'][$run]['links_name']);
        $data['links'][$run]['url_img'] = cs_html_link($target, $img);
    }
    $data['links'][$run]['info'] = cs_secure($data['links'][$run]['links_info'], 1, 1, 1, 1);
}
echo cs_subtemplate(__FILE__, $data, 'links', 'sponsors');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:23,代码来源:sponsors.php

示例14: elseif

    $cs_computers['computers_memory'] = '';
    $cs_computers['computers_processors'] = '';
    $cs_computers['computers_graphics'] = '';
    $cs_computers['computers_sounds'] = '';
    $cs_computers['computers_harddisks'] = '';
    $cs_computers['computers_drives'] = '';
    $cs_computers['computers_screens'] = '';
    $cs_computers['computers_interfaces'] = '';
    $cs_computers['computers_networks'] = '';
    $cs_computers['computers_more'] = '';
}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['body_create'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    foreach ($cs_computers as $key => $value) {
        $data['com'][$key] = cs_secure($value);
    }
    $data['com']['referer'] = empty($_SERVER['HTTP_REFERER']) ? 'center' : $_SERVER['HTTP_REFERER'];
    echo cs_subtemplate(__FILE__, $data, 'computers', 'create');
} else {
    $cs_computers['computers_since'] = cs_time();
    $computers_cells = array_keys($cs_computers);
    $computers_save = array_values($cs_computers);
    cs_sql_insert(__FILE__, 'computers', $computers_cells, $computers_save);
    #$referrer = strpos($_POST['referer'],'manage') === false ? 'center' : 'manage';
    $referrer = $account['access_computers'] < 3 ? 'center' : 'manage';
    cs_redirect($cs_lang['create_done'], 'computers', $referrer);
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:create.php

示例15: cs_pages

$data['head']['mod'] = $cs_lang[$op_squads['label'] . 's'];
$data['lang']['new_label'] = $cs_lang['new_' . $op_squads['label']];
$data['head']['count'] = $squads_count;
$data['head']['pages'] = cs_pages('squads', 'center', $squads_count, $start, 0, $sort);
$data['head']['getmsg'] = cs_getmsg();
$data['lang']['join_label'] = $cs_lang['join_' . $op_squads['label']];
if (!empty($squads_count)) {
    $data['if']['squad_to_leave'] = TRUE;
    $data['lang']['leave_label'] = $cs_lang['leave_' . $op_squads['label']];
}
$data['sort']['squad_name'] = cs_sort('squads', 'center', $start, 0, 1, $sort);
$data['lang']['label'] = $cs_lang[$op_squads['label']];
$data['sort']['members_task'] = cs_sort('squads', 'center', $start, 0, 3, $sort);
$select = 'sqd.squads_name AS squads_name, sqd.squads_id AS squads_id, mem.members_task AS members_task, mem.members_admin AS members_admin';
$from = 'members mem INNER JOIN {pre}_squads sqd ON mem.squads_id = sqd.squads_id';
$where = "mem.users_id = '" . $account['users_id'] . "'";
$data['squads'] = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$squads_loop = count($data['squads']);
for ($run = 0; $run < $squads_loop; $run++) {
    $data['squads'][$run]['id'] = $data['squads'][$run]['squads_id'];
    $data['squads'][$run]['name'] = cs_secure($data['squads'][$run]['squads_name']);
    $data['squads'][$run]['members_task'] = cs_secure($data['squads'][$run]['members_task']);
    if (!empty($data['squads'][$run]['members_admin'])) {
        $data['squads'][$run]['if']['squad_admin'] = TRUE;
        $data['squads'][$run]['if']['no_squad_admin'] = FALSE;
    } else {
        $data['squads'][$run]['if']['squad_admin'] = FALSE;
        $data['squads'][$run]['if']['no_squad_admin'] = TRUE;
    }
}
echo cs_subtemplate(__FILE__, $data, 'squads', 'center');
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:31,代码来源:center.php


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