コード例 #1
0
ファイル: functions.php プロジェクト: aberrios/WEBTHESGO
function getUserIcons($cs_lang, $users_id, $nick, $hidden = 0, $email = 0, $icq = 0, $jabber = 0, $url = 0, $skype = 0)
{
    global $account;
    $allow = $users_id == $account['users_id'] or $account['access_users'] > 4 ? 1 : 0;
    $hidden = explode(',', $hidden);
    if (in_array('users_email', $hidden) && empty($allow)) {
        $email = '';
    }
    if (in_array('users_icq', $hidden) && empty($allow)) {
        $icq = '';
    }
    if (in_array('users_jabber', $hidden) && empty($allow)) {
        $jabber = '';
    }
    if (in_array('users_skype', $hidden) && empty($allow)) {
        $skype = '';
    }
    if (in_array('users_url', $hidden) && empty($allow)) {
        $url = '';
    }
    $icons = '';
    $icons .= !empty($email) ? cs_html_mail($email, cs_icon('mail_generic')) : '';
    $icons .= $account['access_users'] >= 2 ? cs_link(cs_icon('mail_send'), 'messages', 'create', 'to_id=' . $users_id, 0, $cs_lang['send_message']) : '';
    $icons .= !empty($icq) ? cs_html_link('http://www.icq.com/people/' . $icq, cs_icon('licq'), 1, 0, $cs_lang['icq']) : '';
    $icons .= !empty($jabber) ? cs_html_jabbermail($jabber, cs_icon('jabber_protocol')) : '';
    $icons .= !empty($skype) ? cs_html_link('skype:' . $skype . '?userinfo', cs_html_img('http://mystatus.skype.com/smallicon/' . $skype, '16', '16', '0', 'Skype'), 0, 0, $cs_lang['skype']) : '';
    $icons .= !empty($url) ? cs_html_link('http://' . $url, cs_icon('gohome'), 1, 0, $cs_lang['homepage']) : '';
    return $icons;
}
コード例 #2
0
ファイル: functions.php プロジェクト: aberrios/WEBTHESGO
function cs_manage($mod, $action, $def_mod, $def_action, $merge = array(), $head = array())
{
    global $account, $cs_lang;
    $merge = is_array($merge) ? $merge : array();
    $show = $mod . '/' . $action;
    if (empty($head['message'])) {
        $head['message'] = '';
    }
    $data = array('head' => $head);
    $data['content'] = array();
    $options = array('info' => 0, 'size' => 48, 'theme' => '');
    $options['theme'] = empty($account['users_view']) ? 'manage' : 'manage_' . $account['users_view'];
    if ($account['users_view'] == 'list') {
        $options['size'] = 16;
        if ($show == 'clansphere/admin') {
            $options['theme'] = 'manage_admin';
            $options['info'] = 1;
        }
    }
    $mod_array = cs_checkdirs('mods', $show);
    $content = array_merge($merge, $mod_array);
    ksort($content);
    $loop = 0;
    foreach ($content as $mod) {
        if (!array_key_exists('dir', $mod)) {
            $mod['dir'] = $def_mod;
        }
        if (!array_key_exists('file', $mod)) {
            $mod['file'] = $def_action;
        }
        $acc_dir = 'access_' . $mod['dir'];
        if (array_key_exists($acc_dir, $account) and $account[$acc_dir] >= $mod['show'][$show]) {
            $cs_lap = cs_icon($mod['icon'], $options['size'], 0, 0);
            $data['content'][$loop]['img_1'] = $cs_lap;
            $data['content'][$loop]['txt_1'] = $mod['name'];
            $data['content'][$loop]['link_1'] = cs_url($mod['dir'], $mod['file']);
            if (!empty($options['info'])) {
                if (file_exists('mods/' . $mod['dir'] . '/create.php')) {
                    $data['content'][$loop]['create_1'] = cs_link(cs_icon('editpaste', 16, $cs_lang['create']), $mod['dir'], 'create');
                } else {
                    $data['content'][$loop]['create_1'] = '';
                }
                if (file_exists('mods/' . $mod['dir'] . '/manage.php')) {
                    $data['content'][$loop]['manage_1'] = cs_link(cs_icon('kfm', 16, $cs_lang['manage']), $mod['dir'], 'manage');
                } else {
                    $data['content'][$loop]['manage_1'] = '';
                }
                if (file_exists('mods/' . $mod['dir'] . '/options.php')) {
                    $data['content'][$loop]['options_1'] = cs_link(cs_icon('package_settings', 16, $cs_lang['options']), $mod['dir'], 'options');
                } else {
                    $data['content'][$loop]['options_1'] = '';
                }
            }
            $loop++;
        }
    }
    $data['head']['total'] = $loop;
    return cs_subtemplate(__FILE__, $data, 'clansphere', $options['theme']);
}
コード例 #3
0
ファイル: functions.php プロジェクト: aberrios/WEBTHESGO
function cs_datacontrol($data_id, $div = 0, $style = '', $more = '')
{
    global $cs_main, $cs_lang, $account;
    $content = '';
    $mod = $cs_main['mod'];
    $get_axx = 'mods/' . $mod . '/access.php';
    $axx_file = array();
    include $get_axx;
    if (!empty($div)) {
        $content .= '<div style="' . $style . '" ' . $more . '>';
    }
    if ($account['access_' . $mod] >= $axx_file['edit']) {
        $img_edit = cs_icon('edit', 16, $cs_lang['edit']);
        $content .= cs_link($img_edit, $mod, 'edit', 'id=' . $data_id, 0, $cs_lang['edit']);
    }
    if ($account['access_' . $mod] >= $axx_file['remove']) {
        $img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
        $content .= cs_link($img_del, $mod, 'remove', 'id=' . $data_id, 0, $cs_lang['remove']);
    }
    if (!empty($div)) {
        $content .= '</div>';
    }
    return $content;
}
コード例 #4
0
ファイル: center.php プロジェクト: aberrios/WEBTHESGO
        $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');
コード例 #5
0
ファイル: guests.php プロジェクト: aberrios/WEBTHESGO
    if (!empty($surname) and !empty($name)) {
        $data['eventguests'][$run]['name'] = $surname . ', ' . $name;
    } elseif (!empty($surname) or !empty($name)) {
        $data['eventguests'][$run]['name'] = $surname . $name;
    } else {
        $data['eventguests'][$run]['name'] = '';
    }
    if (empty($cs_eventguests[$run]['eventguests_phone'])) {
        if (in_array('users_phone', $hidden)) {
            $cs_eventguests[$run]['eventguests_phone'] = empty($allow) ? '' : cs_html_italic(1) . $cs_eventguests[$run]['users_phone'] . cs_html_italic(0);
        } elseif (!empty($allow)) {
            $cs_eventguests[$run]['eventguests_phone'] = $cs_eventguests[$run]['users_phone'];
        }
    }
    if (empty($cs_eventguests[$run]['eventguests_mobile'])) {
        if (in_array('users_mobile', $hidden)) {
            $cs_eventguests[$run]['eventguests_mobile'] = empty($allow) ? '' : cs_html_italic(1) . $cs_eventguests[$run]['users_mobile'] . cs_html_italic(0);
        } elseif (!empty($allow)) {
            $cs_eventguests[$run]['eventguests_mobile'] = $cs_eventguests[$run]['users_mobile'];
        }
    }
    $data['eventguests'][$run]['user'] = empty($cs_eventguests[$run]['users_id']) ? '-' : cs_user($cs_eventguests[$run]['users_id'], $cs_eventguests[$run]['users_nick'], $cs_eventguests[$run]['users_active'], $cs_eventguests[$run]['users_delete']);
    $data['eventguests'][$run]['since'] = cs_date('unix', $cs_eventguests[$run]['eventguests_since']);
    $data['eventguests'][$run]['phone'] = empty($cs_eventguests[$run]['eventguests_phone']) ? '&nbsp;' : cs_html_img('symbols/' . $cs_main['img_path'] . '/16/linphone.' . $cs_main['img_ext'], 16, 16, 'title="' . $cs_eventguests[$run]['eventguests_phone'] . '"');
    $data['eventguests'][$run]['mobile'] = empty($cs_eventguests[$run]['eventguests_mobile']) ? '&nbsp;' : cs_html_img('symbols/' . $cs_main['img_path'] . '/16/sms_protocol.' . $cs_main['img_ext'], 16, 16, 'title="' . $cs_eventguests[$run]['eventguests_mobile'] . '"');
    $data['eventguests'][$run]['status'] = $cs_lang['status_' . $cs_eventguests[$run]['eventguests_status']];
    $data['eventguests'][$run]['notice'] = empty($cs_eventguests[$run]['eventguests_notice']) ? '&nbsp;' : cs_icon('txt', 16, $cs_lang['notice']);
    $data['eventguests'][$run]['edit'] = cs_link(cs_icon('edit', 16, $cs_lang['edit']), 'events', 'guestsadm', 'id=' . $cs_eventguests[$run]['eventguests_id'], 0, $cs_lang['edit']);
    $data['eventguests'][$run]['remove'] = cs_link(cs_icon('editdelete', 16, $cs_lang['remove']), 'events', 'guestsdel', 'id=' . $cs_eventguests[$run]['eventguests_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'events', 'guests');
コード例 #6
0
ファイル: center.php プロジェクト: aberrios/WEBTHESGO
$sqd_loop = count($sqd_data);
for ($run = 0; $run < $sqd_loop; $run++) {
    $data['squad'][$run]['selected'] = $sqd_data[$run]['squads_id'] == $squads_id ? ' selected="selected"' : '';
    $data['squad'][$run]['id'] = $sqd_data[$run]['squads_id'];
    $data['squad'][$run]['name'] = cs_secure($sqd_data[$run]['squads_name']);
}
if (empty($sqd_loop)) {
    $data['squad'] = array();
}
$data['lang']['msg'] = !empty($msg) ? $msg : '';
$select = 'mem.members_admin AS members_admin, mem.members_order AS members_order, mem.users_id AS users_id, usr.users_nick AS users_nick, usr.users_delete AS users_delete, usr.users_active AS users_active, mem.members_task, mem.members_id AS members_id';
$from = 'members mem INNER JOIN {pre}_users usr ON mem.users_id = usr.users_id';
$where = "mem.squads_id = '" . $squads_id . "'";
$cs_members = cs_sql_select(__FILE__, $from, $select, $where, $order, 0, 0);
$members_loop = count($cs_members);
$data['sort']['user'] = cs_sort('members', 'center', 0, $squads_id, 1, $sort);
$data['sort']['task'] = cs_sort('members', 'center', 0, $squads_id, 3, $sort);
$img_edit = cs_icon('edit', 16, $cs_lang['edit']);
$img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
if (empty($members_loop)) {
    $data['members'] = '';
}
for ($run = 0; $run < $members_loop; $run++) {
    $users_nick = cs_user($cs_members[$run]['users_id'], $cs_members[$run]['users_nick'], $cs_members[$run]['users_active'], $cs_members[$run]['users_delete']);
    $data['members'][$run]['user'] = empty($cs_members[$run]['members_admin']) ? $users_nick : cs_html_big(1) . $users_nick . cs_html_big(0);
    $data['members'][$run]['task'] = cs_secure($cs_members[$run]['members_task']);
    $data['members'][$run]['order'] = $cs_members[$run]['members_order'];
    $data['members'][$run]['edit'] = cs_link($img_edit, 'members', 'change', 'id=' . $cs_members[$run]['members_id'], 0, $cs_lang['edit']);
    $data['members'][$run]['remove'] = cs_link($img_del, 'members', 'center', 'del_id=' . $cs_members[$run]['members_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'members', 'center');
コード例 #7
0
ファイル: center.php プロジェクト: aberrios/WEBTHESGO
$cs_sort[4] = 'clans_short ASC';
$sort = empty($_REQUEST['sort']) ? 2 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
$data['lang']['getmsg'] = cs_getmsg();
$data['lang']['mod_name'] = $cs_lang[$op_clans['label']];
$own = "users_id = '" . $account['users_id'] . "'";
$clans_count = cs_sql_count(__FILE__, 'clans', $own);
$data['lang']['mod_name'] = $cs_lang[$op_clans['label']];
$data['lang']['new'] = cs_link($cs_lang['new_' . $op_clans['label']], 'clans', 'new');
$data['lang']['all'] = $cs_lang['total'] . ': ';
$data['lang']['count'] = $clans_count;
$data['pages']['list'] = cs_pages('clans', 'center', $clans_count, $start, 0, $sort);
$select = 'clans_name, clans_short, clans_id';
$cs_clans = cs_sql_select(__FILE__, 'clans', $select, $own, $order, $start, $account['users_limit']);
$clans_loop = count($cs_clans);
$data['sort']['name'] = cs_sort('clans', 'center', $start, 0, 1, $sort);
$data['sort']['short'] = cs_sort('clans', 'center', $start, 0, 3, $sort);
if (empty($clans_loop)) {
    $data['clans'] = '';
}
for ($run = 0; $run < $clans_loop; $run++) {
    $data['clans'][$run]['name'] = cs_link(cs_secure($cs_clans[$run]['clans_name']), 'clans', 'view', 'id=' . $cs_clans[$run]['clans_id']);
    $data['clans'][$run]['short'] = cs_secure($cs_clans[$run]['clans_short']);
    $data['clans'][$run]['edit'] = cs_link(cs_icon('edit', 16, $cs_lang['edit']), 'clans', 'change', 'id=' . $cs_clans[$run]['clans_id'], 0, $cs_lang['edit']);
    if ($cs_clans[$run]['clans_id'] == 1) {
        $data['clans'][$run]['remove'] = '-';
    } else {
        $data['clans'][$run]['remove'] = cs_link(cs_icon('editdelete', 16, $cs_lang['remove']), 'clans', 'delete', 'id=' . $cs_clans[$run]['clans_id'], 0, $cs_lang['remove']);
    }
}
echo cs_subtemplate(__FILE__, $data, 'clans', 'center');
コード例 #8
0
ファイル: templates.php プロジェクト: aberrios/WEBTHESGO
function cs_getmsg()
{
    if (!isset($_SESSION['message']) || empty($_SESSION['message'])) {
        return '';
    }
    $data = array();
    if (!empty($_SESSION['messageadd'])) {
        $add = explode(',', $_SESSION['messageadd'], 2);
        $data['msg']['icon'] = empty($add[0]) ? '' : cs_icon($add[0]);
        $data['msg']['id'] = empty($add[1]) ? 'msg_normal' : $add[1];
        unset($_SESSION['messageadd']);
    } else {
        $data['msg']['icon'] = '';
        $data['msg']['id'] = 'msg_normal';
    }
    $data['msg']['text'] = $_SESSION['message'];
    unset($_SESSION['message']);
    return cs_subtemplate(__FILE__, $data, 'clansphere', 'message');
}
コード例 #9
0
ファイル: roots.php プロジェクト: aberrios/WEBTHESGO
        $data['if']['wizard'] = TRUE;
        $data['wizard']['roots'] = cs_link($cs_lang['show'], 'wizard', 'roots');
        $data['wizard']['task_done'] = cs_link($cs_lang['task_done'], 'wizard', 'roots', 'handler=mods&amp;done=1');
    }
}
$cs_access = cs_sql_select(__FILE__, 'access', '*', 0, 0, 0, 0);
$groups = count($cs_access);
$run = 0;
foreach ($modules as $mod) {
    $data['mod'][$run]['icon'] = empty($mod['icon']) ? '' : cs_icon($mod['icon']);
    $data['mod'][$run]['name_url'] = empty($mod['name']) ? '' : cs_link($mod['name'], 'modules', 'view', 'dir=' . $mod['dir']);
    $data['mod'][$run]['version'] = empty($mod['version']) ? '' : $mod['version'];
    $data['mod'][$run]['released'] = empty($mod['released']) ? '' : cs_date('date', $mod['released']);
    $listed = isset($cs_access[0]['access_' . $mod['dir']]) ? 1 : 0;
    $access = 0;
    if (!empty($listed)) {
        for ($run2 = 0; $run2 < $groups; $run2++) {
            $access += $cs_access[$run2]['access_' . $mod['dir']];
        }
    }
    if (!empty($listed) && !empty($access) && empty($mod['protected'])) {
        $data['mod'][$run]['protected'] = cs_link(cs_icon('gpg'), 'modules', 'deactivate', 'dir=' . $mod['dir'], '', $cs_lang['deactivate']);
    } elseif (!empty($listed) && empty($mod['protected'])) {
        $data['mod'][$run]['protected'] = cs_link(cs_icon('submit'), 'modules', 'accessedit', 'dir=' . $mod['dir'] . '&amp;activate', '', $cs_lang['activate']);
    } else {
        $data['mod'][$run]['protected'] = '';
    }
    $data['mod'][$run]['access'] = empty($listed) ? '' : cs_link(cs_icon('access'), 'modules', 'accessedit', 'dir=' . $mod['dir'], '', $cs_lang['access']);
    $run++;
}
echo cs_subtemplate(__FILE__, $data, 'modules', 'roots');
コード例 #10
0
ファイル: roots.php プロジェクト: aberrios/WEBTHESGO
            $cs_options['done_' . $handler . ''] = $save['done_' . $handler];
            break;
        }
    }
}
$run = 0;
$done = 0;
$next = 0;
$next_task = '-';
$data = array('head' => array(), 'wizard' => array());
foreach ($task_array as $step) {
    $data['wizard'][$run]['icon'] = cs_icon($step['icon'], 48);
    $data['wizard'][$run]['link'] = cs_link($cs_lang['' . $step['handler'] . '_name'], $step['mod'], $step['action']);
    $data['wizard'][$run]['text'] = $cs_lang['' . $step['handler'] . '_text'];
    if (empty($cs_options['done_' . $step['handler'] . ''])) {
        $next_task = empty($next) ? cs_link($cs_lang['' . $step['handler'] . '_name'], $step['mod'], $step['action']) : $next_task;
        $data['wizard'][$run]['next'] = empty($next) ? '&gt;&gt; ' . $cs_lang['next_step'] . ' &lt;&lt;' : '';
        $data['wizard'][$run]['done'] = cs_link(cs_icon('cancel'), 'wizard', 'roots', 'handler=' . $step['handler'] . '&amp;done=1');
        $data['wizard'][$run]['class'] = 'b';
        $next++;
    } else {
        $data['wizard'][$run]['next'] = '';
        $data['wizard'][$run]['done'] = cs_link(cs_icon('submit'), 'wizard', 'roots', 'handler=' . $step['handler'] . '&amp;done=0');
        $data['wizard'][$run]['class'] = 'c';
        $done++;
    }
    $run++;
}
$data['head']['next_task'] = $cs_lang['next_step'] . ': ' . $next_task;
$data['head']['parts_done'] = sprintf($cs_lang['parts_done'], $done, $run);
echo cs_subtemplate(__FILE__, $data, 'wizard', 'roots');
コード例 #11
0
ファイル: view.php プロジェクト: aberrios/WEBTHESGO
}
$cs_lang_mod = cs_translate('modules', 1);
$cs_lang_acc = cs_translate('access', 1);
include 'mods/' . $dir . '/info.php';
$cs_lang = empty($cs_lang) ? array() : $cs_lang;
# combine translations of target info file with mods access and modules
$cs_lang = array_merge($cs_lang, $cs_lang_acc, $cs_lang_mod);
$data['mod']['name'] = $mod_info['name'];
$data['mod']['version'] = $mod_info['version'];
$data['mod']['released'] = cs_date('date', $mod_info['released']);
$data['mod']['protected'] = empty($mod_info['protected']) ? $cs_lang['no'] : $cs_lang['yes'];
$data['mod']['creator'] = $mod_info['creator'];
$data['mod']['team'] = $mod_info['team'];
$data['mod']['url'] = cs_html_link('http://' . $mod_info['url'], $mod_info['url']);
$data['mod']['icon_48'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon'], '48');
$data['mod']['icon_16'] = empty($mod_info['icon']) ? '' : cs_icon($mod_info['icon']);
$data['mod']['text'] = $mod_info['text'];
if (!empty($account['access_explorer'])) {
    $data['if']['access_explorer'] = TRUE;
    include_once 'mods/explorer/functions.php';
    $more = 'dir=' . cs_explorer_path('mods/' . $dir, 'escape');
    $data['extended']['link'] = cs_link($cs_lang['jump_to_explorer'], 'explorer', 'roots', $more);
}
if (file_exists('mods/' . $dir . '/access.php')) {
    $sort = empty($_REQUEST['sort']) ? 2 : $_REQUEST['sort'];
    $data['sort']['file'] = cs_sort('modules', 'view', 0, 0, 1, $sort, 'dir=' . $dir);
    $data['sort']['access'] = cs_sort('modules', 'view', 0, 0, 3, $sort, 'dir=' . $dir);
    $axx_file = array();
    include 'mods/' . $dir . '/access.php';
    switch ($sort) {
        case 1:
コード例 #12
0
ファイル: manage.php プロジェクト: aberrios/WEBTHESGO
$cs_lang = cs_translate('faq');
empty($_REQUEST['start']) ? $start = 0 : ($start = $_REQUEST['start']);
$cs_sort[1] = 'faq_question DESC';
$cs_sort[2] = 'faq_question ASC';
$cs_sort[3] = 'categories_id DESC';
$cs_sort[4] = 'categories_id ASC';
$sort = empty($_REQUEST['sort']) ? 4 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
$faq_count = cs_sql_count(__FILE__, 'faq');
$data['lang']['count'] = $faq_count;
$data['pages']['list'] = cs_pages('faq', 'manage', $faq_count, $start, 0, $sort);
$data['lang']['getmsg'] = cs_getmsg();
$cs_faq = cs_sql_select(__FILE__, 'faq', '*', 0, $order, $start, $account['users_limit']);
$faq_loop = count($cs_faq);
$data['sort']['question'] = cs_sort('faq', 'manage', $start, 0, 1, $sort);
$data['sort']['category'] = cs_sort('faq', 'manage', $start, 0, 3, $sort);
if (empty($faq_loop)) {
    $data['faq'] = '';
}
for ($run = 0; $run < $faq_loop; $run++) {
    $data['faq'][$run]['question'] = cs_secure($cs_faq[$run]['faq_question']);
    $cs_faq_user = cs_sql_select(__FILE__, 'users', 'users_nick, users_active, users_delete', "users_id = '" . $cs_faq[$run]['users_id'] . "'");
    $data['faq'][$run]['user'] = cs_user($cs_faq[$run]['users_id'], $cs_faq_user['users_nick'], $cs_faq_user['users_active'], $cs_faq_user['users_delete']);
    $cs_faq_categories = cs_sql_select(__FILE__, 'categories', '*', "categories_id = '" . $cs_faq[$run]['categories_id'] . "'");
    $data['faq'][$run]['cat'] = cs_secure($cs_faq_categories['categories_name']);
    $img_edit = cs_icon('edit');
    $data['faq'][$run]['edit'] = cs_link($img_edit, 'faq', 'edit', 'id=' . $cs_faq[$run]['faq_id'], 0, $cs_lang['edit']);
    $img_del = cs_icon('editdelete');
    $data['faq'][$run]['remove'] = cs_link($img_del, 'faq', 'remove', 'id=' . $cs_faq[$run]['faq_id'], 0, $cs_lang['remove']);
}
echo cs_subtemplate(__FILE__, $data, 'faq', 'manage');
コード例 #13
0
ファイル: blocklist.php プロジェクト: aberrios/WEBTHESGO
$data = array('trash' => array());
$data['status']['msg'] = '';
if (isset($_POST['submit'])) {
    $domain = empty($_POST['blocklist_entry']) ? '' : trim($_POST['blocklist_entry']);
    $exists = cs_sql_count(__FILE__, 'trashmail', 'trashmail_entry = \'' . cs_sql_escape($domain) . '\'');
    if (!empty($domain) and empty($exists)) {
        $trashmail_cells = array('trashmail_entry');
        $trashmail_save = array($domain);
        cs_sql_insert(__FILE__, 'trashmail', $trashmail_cells, $trashmail_save);
        $data['status']['msg'] = cs_icon('submit') . ' ' . $cs_lang['blocklist_success'];
    } else {
        $data['status']['msg'] = cs_icon('error') . ' ' . $cs_lang['blocklist_exists'];
    }
} elseif (!empty($_GET['delete'])) {
    cs_sql_delete(__FILE__, 'trashmail', (int) $_GET['delete']);
    $data['status']['msg'] = cs_icon('submit') . ' ' . $cs_lang['blocklist_delete'];
}
$data['if']['status'] = empty($data['status']['msg']) ? 0 : 1;
$start = empty($_GET['start']) ? 0 : (int) $_GET['start'];
$cs_sort[1] = 'trashmail_entry DESC';
$cs_sort[2] = 'trashmail_entry ASC';
$sort = empty($_GET['sort']) ? 2 : (int) $_GET['sort'];
$order = $cs_sort[$sort];
$trash_count = cs_sql_count(__FILE__, 'trashmail');
$select = 'trashmail_id, trashmail_entry';
$cs_trash = cs_sql_select(__FILE__, 'trashmail', $select, 0, $order, $start, $account['users_limit']);
$trash_loop = count($cs_trash);
$data['head']['pages'] = cs_pages('contact', 'blocklist', $trash_count, $start, 0, $sort);
$data['head']['sort_name'] = cs_sort('contact', 'blocklist', $start, 0, 1, $sort);
$data['head']['message'] = cs_getmsg();
for ($run = 0; $run < $trash_loop; $run++) {
コード例 #14
0
ファイル: charset.php プロジェクト: aberrios/WEBTHESGO
# Check for MySQL version 4.1.8 or above due to charset / collation support
$data['if']['old_mysql'] = 0;
global $cs_db;
$ext_mysql = array('mysql', 'mysqli', 'pdo_mysql');
if (in_array($cs_db['type'], $ext_mysql)) {
    $myv = explode('.', $sql_info['server']);
    settype($myv[2], 'integer');
    if ($myv[0] < 4 or $myv[0] == 4 and $myv[1] < 1 or $myv[0] == 4 and $myv[1] == 1 and $myv[2] < 8) {
        $data['if']['old_mysql'] = 1;
    }
}
# Define test result icons
$data['charset']['check_setup_file'] = empty($data['charset']['result_setup_file']) ? cs_icon('submit') : cs_icon('stop');
$data['charset']['check_tpl_setting'] = empty($data['charset']['result_tpl_setting']) ? cs_icon('submit') : cs_icon('stop');
$data['charset']['check_web_setting'] = empty($data['charset']['result_web_setting']) ? cs_icon('submit') : cs_icon('stop');
$data['charset']['check_sql_setting'] = empty($data['charset']['result_sql_setting']) ? cs_icon('submit') : cs_icon('stop');
# Add positive results to output variables
if (empty($data['charset']['result_setup_file'])) {
    $data['charset']['result_setup_file'] = $cs_main['charset'];
}
if (empty($data['charset']['result_tpl_setting'])) {
    foreach ($tpl_charset as $lowercase => $found) {
        $data['charset']['result_tpl_setting'] .= $found . cs_html_br(1);
    }
}
if (empty($data['charset']['result_web_setting'])) {
    $data['charset']['result_web_setting'] = $web_charset;
}
if (empty($data['charset']['result_sql_setting'])) {
    $data['charset']['result_sql_setting'] = $sql_info['encoding'];
}
コード例 #15
0
ファイル: mail.php プロジェクト: aberrios/WEBTHESGO
        $error++;
        $errormsg .= $cs_lang['error_email'] . cs_html_br(1);
    }
    if (!empty($mail['icq']) and !preg_match('#^[\\d-]*$#', $mail['icq'])) {
        $error++;
        $errormsg .= $cs_lang['error_icq'] . cs_html_br(1);
    }
    if (empty($mail['categories_id'])) {
        $error++;
        $errormsg .= $cs_lang['error_category'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit'])) {
    $data['lang']['head'] = $cs_lang['body_mail'];
} elseif (!empty($error)) {
    $data['lang']['head'] = cs_icon('important') . cs_html_br(1);
    $data['lang']['head'] .= $errormsg;
} else {
    $data['lang']['head'] = $cs_lang['success'];
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['if']['form'] = TRUE;
    $data['if']['done'] = FALSE;
    $categories_data = cs_sql_select(__FILE__, 'categories', '*', "categories_mod = 'contact'", 'categories_order ASC, categories_name', 0, 0);
    foreach ($mail as $key => $value) {
        $data['mail'][$key] = cs_secure($value);
    }
    $data['mail']['categories_id'] = cs_dropdown('categories_id', 'categories_name', $categories_data, $mail['categories_id']);
    if (!empty($captcha)) {
        $data['if']['captcha'] = 1;
    }
コード例 #16
0
ファイル: inbox.php プロジェクト: aberrios/WEBTHESGO
    $id = (int) $_POST['messages_filter'] - 1;
    $time = $messages_data[$id]['messages_time'];
    $where .= " AND messages_time >= '" . $time . "'";
}
$from = 'messages msg INNER JOIN {pre}_users usr ON msg.users_id = usr.users_id';
$select = 'msg.messages_id AS messages_id, msg.messages_subject AS messages_subject, msg.messages_time AS messages_time, ';
$select .= 'msg.messages_view AS messages_view, msg.users_id_to AS users_id_to, msg.users_id AS users_id, usr.users_nick AS users_nick, usr.users_active AS users_active, ';
$select .= 'msg.messages_show_sender AS messages_show_sender,msg.messages_show_receiver AS messages_show_receviver, usr.users_delete AS users_delete';
$data['msgs'] = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$data['msgs'] = fetch_pm_period($data['msgs'], 'messages_time');
$count = fetch_pm_period_count($data['msgs']);
$messages_loop = count($data['msgs']);
$period = 0;
for ($i = 0; $i < $messages_loop; $i++) {
    $data['msgs'][$i]['icon'] = empty($data['msgs'][$i]['messages_view']) ? cs_icon('email', 16, $cs_lang['new']) : cs_icon('mail_generic', 16, $cs_lang['read']);
    if ($data['msgs'][$i]['messages_view'] == 2) {
        $data['msgs'][$i]['icon'] = cs_icon('mail_replay', 16, $cs_lang['answered']);
    }
    $data['msgs'][$i]['messages_time'] = cs_date('unix', $data['msgs'][$i]['messages_time'], 1);
    $data['msgs'][$i]['user_from'] = cs_user($data['msgs'][$i]['users_id'], $data['msgs'][$i]['users_nick'], $data['msgs'][$i]['users_active'], $data['msgs'][$i]['users_delete']);
    $data['msgs'][$i]['messages_subject'] = cs_secure($data['msgs'][$i]['messages_subject']);
    if ($data['msgs'][$i]['period'] === $period) {
        $data['msgs'][$i]['if']['new_period'] = false;
    } else {
        $data['msgs'][$i]['if']['new_period'] = true;
        $data['msgs'][$i]['period_name'] = $cs_lang[$data['msgs'][$i]['period']];
        $data['msgs'][$i]['period_count'] = $count[$data['msgs'][$i]['period']];
        $period = $data['msgs'][$i]['period'];
    }
}
echo cs_subtemplate(__FILE__, $data, 'messages', 'inbox');
コード例 #17
0
ファイル: statistic.php プロジェクト: aberrios/WEBTHESGO
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('database');
$modules = cs_checkdirs('mods');
$static = array();
$total_tables = 0;
$total_datasets = 0;
$run = 0;
global $cs_db;
$sql_infos = cs_sql_version(__FILE__);
foreach ($modules as $mod) {
    if (!empty($mod['tables'][0])) {
        $tables = '';
        $counts = '';
        if (!empty($mod['icon'])) {
            $data['statistic'][$run]['icon'] = cs_icon($mod['icon']);
        } else {
            $data['statistic'][$run]['icon'] = '';
        }
        $data['statistic'][$run]['url'] = cs_url('modules', 'view', 'dir=' . $mod['dir']);
        $data['statistic'][$run]['name'] = $mod['name'];
        asort($mod['tables']);
        foreach ($mod['tables'] as $mod_table) {
            if (isset($static[$mod_table])) {
                cs_error(__FILE__, 'SQL-Table "' . $mod_table . '" is owned by two modules: "' . $static[$mod_table] . '" and "' . $mod['dir'] . '"');
            } else {
                $static[$mod_table] = $mod['dir'];
                $tables .= $mod_table . cs_html_br(1);
                $datasets = cs_sql_count(__FILE__, $mod_table);
                $counts .= $datasets . cs_html_br(1);
                $total_tables++;
コード例 #18
0
ファイル: functions.php プロジェクト: aberrios/WEBTHESGO
function cs_comments_view($com_fid, $mod, $action, $sum, $asc = true, $limit = 0)
{
    $cs_lang = cs_translate('comments');
    $options = cs_sql_option(__FILE__, 'comments');
    global $account, $cs_main;
    $class = 'leftb';
    $start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
    settype($start, 'integer');
    settype($com_fid, 'integer');
    settype($asc, 'boolean');
    settype($limit, 'integer');
    $data['comments']['sum'] = $sum;
    $data['comments']['message'] = cs_getmsg();
    $data['comments']['pages'] = cs_pages($mod, $action, $sum, $start, $com_fid);
    if ($mod == 'board' and !empty($sum)) {
        $data['if']['form'] = TRUE;
    } else {
        $data['if']['form'] = FALSE;
    }
    $where = "comments_mod = '" . cs_sql_escape($mod) . "' AND comments_fid = '" . $com_fid . "'";
    $from = 'comments com LEFT JOIN {pre}_users usr ON com.users_id = usr.users_id ';
    $select = 'com.comments_id AS comments_id, com.comments_ip AS comments_ip, com.comments_guestnick AS comments_guestnick, com.comments_time AS comments_time, com.comments_text AS comments_text, com.comments_edit AS comments_edit, com.users_id AS users_id, usr.users_nick as users_nick, usr.users_laston as users_laston, usr.users_place AS users_place, usr.users_country AS users_country, usr.users_avatar AS users_avatar, usr.users_hidden AS users_hidden, usr.users_active AS users_active, usr.users_delete AS users_delete, usr.users_invisible AS users_invisible';
    $order = $asc == true ? 'comments_id ASC' : 'comments_id DESC';
    $limit = !empty($limit) ? $limit : $account['users_limit'];
    $cs_com = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $limit);
    $com_loop = count($cs_com);
    for ($run = 0; $run < $com_loop; $run++) {
        $class = $class == 'leftb' ? 'leftc' : 'leftb';
        $current = $start + $run + 1;
        $com[$run]['class'] = $class;
        if (empty($cs_com[$run]['users_id'])) {
            $com[$run]['if']['guest'] = TRUE;
            $com[$run]['if']['user'] = FALSE;
            $com[$run]['guestnick'] = cs_secure($cs_com[$run]['comments_guestnick']);
        } else {
            $com[$run]['if']['guest'] = FALSE;
            $com[$run]['if']['user'] = TRUE;
            $src = 'symbols/countries/' . $cs_com[$run]['users_country'] . '.png';
            $com[$run]['flag'] = cs_html_img($src, 11, 16);
            $com[$run]['user'] = cs_user($cs_com[$run]['users_id'], $cs_com[$run]['users_nick'], $cs_com[$run]['users_active'], $cs_com[$run]['users_delete']);
            $com[$run]['status'] = cs_userstatus($cs_com[$run]['users_laston'], $cs_com[$run]['users_invisible']);
            $com[$run]['laston'] = !empty($cs_com[$run]['users_invisible']) ? '--' : cs_date('unix', $cs_com[$run]['users_laston']);
            $com_place = cs_secure($cs_com[$run]['users_place']);
            $hidden = explode(',', $cs_com[$run]['users_hidden']);
            if (in_array('users_place', $hidden)) {
                $com_place = ($account['access_users'] > 4 or $cs_com[$run]['users_id'] == $account['users_id']) ? cs_html_italic(1) . $com_place . cs_html_italic(0) : '';
            }
            $com[$run]['avatar'] = empty($options['show_avatar']) || empty($cs_com[$run]['users_avatar']) ? '' : cs_html_img('uploads/board/' . $cs_com[$run]['users_avatar']);
            $users_place = empty($com_place);
            $com[$run]['place'] = !empty($users_place) ? '-' : $cs_com[$run]['users_place'];
            $who = "users_id = " . (int) $cs_com[$run]['users_id'];
            $count_user_com = cs_sql_count(__FILE__, 'comments', $who);
            $com[$run]['posts'] = $count_user_com;
        }
        $com[$run]['comments_time'] = cs_date('unix', $cs_com[$run]['comments_time'], 1);
        $com[$run]['run'] = $asc == true ? $run + 1 : $com_loop - $run;
        $com[$run]['current'] = $current;
        $com[$run]['comments_text'] = cs_secure($cs_com[$run]['comments_text'], 1, 1);
        if (!empty($cs_com[$run]['comments_edit'])) {
            $edits = explode('/', $cs_com[$run]['comments_edit']);
            $euser = cs_user($edits[0], $edits[1]);
            $com[$run]['comments_edit'] = cs_html_br(3);
            $com[$run]['comments_edit'] .= cs_html_italic(1);
            $com[$run]['comments_edit'] .= sprintf($cs_lang['lastcom'], $euser, cs_date('unix', $edits[2], 1), $edits[3]);
            $com[$run]['comments_edit'] .= cs_html_italic(0);
        } else {
            $com[$run]['comments_edit'] = '';
        }
        if ($mod == 'board') {
            $com[$run]['if']['quote_board'] = TRUE;
            $com[$run]['fid'] = $com_fid;
            $com[$run]['id'] = $cs_com[$run]['comments_id'];
        } else {
            $com[$run]['if']['quote_board'] = FALSE;
        }
        if (!empty($account['users_id']) and $mod != 'board') {
            $com[$run]['if']['edit_delete'] = TRUE;
            $img_quote = cs_icon('xchat', 16, $cs_lang['quote']);
            $com[$run]['edit_delete'] = cs_link($img_quote, $mod, 'com_create', 'id=' . $cs_com[$run]['comments_id'], 0, $cs_lang['quote']);
            if ($cs_com[$run]['users_id'] == $account['users_id'] or $account['access_comments'] >= 4) {
                $img_edit = cs_icon('edit', 16, $cs_lang['edit']);
                $com[$run]['edit_delete'] .= cs_link($img_edit, $mod, 'com_edit', 'id=' . $cs_com[$run]['comments_id'], 0, $cs_lang['edit']);
            }
            if ($account['access_comments'] >= 5) {
                $img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
                $com[$run]['edit_delete'] .= cs_link($img_del, $mod, 'com_remove', 'id=' . $cs_com[$run]['comments_id'], 0, $cs_lang['remove']);
            }
        } else {
            $com[$run]['if']['edit_delete'] = FALSE;
        }
    }
    $data['if']['bottom_pages'] = $sum > $com_loop ? TRUE : FALSE;
    $data['fquote']['icon'] = 'symbols/' . $cs_main['img_path'] . '/16/xchat.' . $cs_main['img_ext'];
    $data['com'] = !empty($com) ? $com : '';
    echo cs_subtemplate(__FILE__, $data, 'comments', 'com_view');
}
コード例 #19
0
ファイル: navadmin.php プロジェクト: aberrios/WEBTHESGO
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$admin = cs_checkdirs('mods', 'clansphere/admin');
foreach ($admin as $mod) {
    $acc_dir = 'access_' . $mod['dir'];
    if (array_key_exists($acc_dir, $account) and $account[$acc_dir] >= $mod['show']['clansphere/admin']) {
        echo cs_icon($mod['icon']);
        echo cs_link($mod['name'], $mod['dir'], 'manage');
        echo cs_html_br(1);
    }
}
コード例 #20
0
ファイル: guestsprint.php プロジェクト: aberrios/WEBTHESGO
        if (in_array('users_mobile', $hidden)) {
            $cs_eventguests[$run]['eventguests_mobile'] = empty($allow) ? '' : cs_html_italic(1) . $cs_eventguests[$run]['users_mobile'] . cs_html_italic(0);
        } elseif (!empty($allow)) {
            $cs_eventguests[$run]['eventguests_mobile'] = $cs_eventguests[$run]['users_mobile'];
        }
    }
    $age = $cs_eventguests[$run]['eventguests_age'];
    if (!empty($cs_eventguests[$run]['users_age'])) {
        $birth = explode('-', $cs_eventguests[$run]['users_age']);
        $age = cs_datereal('Y') - $birth[0];
        if (cs_datereal('m') <= $birth[1]) {
            $age--;
        }
        if (cs_datereal('d') >= $birth[2] and cs_datereal('m') == $birth[1]) {
            $age++;
        }
        if (in_array('users_age', $hidden)) {
            $age = empty($allow) ? '' : cs_html_italic(1) . $age . cs_html_italic(0);
        }
    }
    $data['eventguests'][$run]['number'] = $run + 1;
    $data['eventguests'][$run]['surname'] = $surname;
    $data['eventguests'][$run]['name'] = $name;
    $data['eventguests'][$run]['age'] = empty($age) ? '' : $age;
    $data['eventguests'][$run]['notice'] = cs_secure($cs_eventguests[$run]['eventguests_notice']);
    $data['eventguests'][$run]['user'] = empty($cs_eventguests[$run]['users_id']) ? '-' : cs_user($cs_eventguests[$run]['users_id'], $cs_eventguests[$run]['users_nick'], $cs_eventguests[$run]['users_active'], $cs_eventguests[$run]['users_delete']);
    $data['eventguests'][$run]['status'] = $cs_lang['status_' . $cs_eventguests[$run]['eventguests_status']];
    $data['eventguests'][$run]['phone'] = empty($cs_eventguests[$run]['eventguests_phone']) ? '&nbsp;' : cs_icon('linphone') . $cs_eventguests[$run]['eventguests_phone'];
    $data['eventguests'][$run]['mobile'] = empty($cs_eventguests[$run]['eventguests_mobile']) ? '&nbsp;' : cs_icon('sms_protocol') . $cs_eventguests[$run]['eventguests_mobile'];
}
echo cs_subtemplate(__FILE__, $data, 'events', 'guestsprint');
コード例 #21
0
ファイル: manage.php プロジェクト: aberrios/WEBTHESGO
        $mods['dir'] == $where ? $sel = 1 : ($sel = 0);
        $data['mod'][$run]['sel'] = cs_html_option($mods['name'], $mods['dir'], $sel);
        $run++;
    }
}
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['name'] = cs_sort('categories', 'manage', $start, $where, 1, $sort);
$data['sort']['url'] = cs_sort('categories', 'manage', $start, $where, 3, $sort);
$select = 'categories_id, categories_name, categories_url, categories_subid';
$data['cat'] = cs_sql_select(__FILE__, 'categories', $select, $mdp, $order, $start, $account['users_limit']);
$data['cat'] = cs_catsort($data['cat']);
$categories_loop = !empty($data['cat']) ? count($data['cat']) : '';
for ($run = 0; $run < $categories_loop; $run++) {
    $blank = '';
    if (!empty($data['cat'][$run]['layer'])) {
        for ($i = 0; $i < $data['cat'][$run]['layer']; $i++) {
            $blank .= '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
        }
        $blank .= cs_icon('add_sub_task');
    }
    $data['cat'][$run]['subcat_layer'] = $blank;
    $cs_cat_name = cs_secure($data['cat'][$run]['categories_name']);
    $data['cat'][$run]['category'] = cs_link($cs_cat_name, 'categories', 'view', 'id=' . $data['cat'][$run]['categories_id']);
    $data['cat'][$run]['url'] = '';
    if (!empty($data['cat'][$run]['categories_url'])) {
        $cs_cat_url = cs_secure($data['cat'][$run]['categories_url']);
        $data['cat'][$run]['url'] = cs_html_link('http://' . $cs_cat_url, $cs_cat_url);
    }
    $data['cat'][$run]['id'] = $data['cat'][$run]['categories_id'];
}
echo cs_subtemplate(__FILE__, $data, 'categories', 'manage');
コード例 #22
0
ファイル: thread.php プロジェクト: aberrios/WEBTHESGO
         $img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
         $data['thread_desc']['remove'] = cs_link($img_del, $mod, 'thread_remove', 'id=' . $data['thread']['threads_id'], 0, $cs_lang['remove']);
     }
 }
 $data['if']['closed'] = false;
 if (!empty($data['thread']['threads_close'])) {
     $data['if']['closed'] = true;
     if ($data['thread']['threads_close'] == -1) {
         $message = $cs_lang['thread_closed1'];
     } else {
         $user = cs_sql_select(__FILE__, 'users', 'users_nick,users_active', 'users_id = ' . (int) $data['thread']['threads_close']);
         $user_lnk = cs_user($data['thread']['threads_close'], $user['users_nick'], $user['users_active']);
         $user_lnk .= ' ' . cs_link(cs_icon('mail_send', 16, 'PM'), 'messages', 'create', 'to_id=' . $data['thread']['threads_close']);
         $message = sprintf($cs_lang['thread_closed2'], $user_lnk);
     }
     $data['thread']['closed_img'] = cs_icon('lockoverlay', 48);
     $data['thread']['closed'] = $message;
 }
 $data['if']['modpanel'] = false;
 $data['if']['modp_close'] = false;
 $data['if']['modp_open'] = false;
 $data['if']['modp_delpin'] = false;
 $data['if']['modp_addpin'] = false;
 $allow_close_now = 0;
 //Anfang Modpanel
 if ($account['access_board'] >= 5 or !empty($thread_mods['boardmods_modpanel'])) {
     $allow_close_now = 1;
     $data['if']['modpanel'] = true;
     if (empty($data['thread']['threads_close'])) {
         $data['if']['modp_close'] = true;
     } elseif (!empty($data['thread']['threads_close'])) {
コード例 #23
0
ファイル: archiv.php プロジェクト: aberrios/WEBTHESGO
$from = 'messages';
$select = 'users_id,users_id_to';
$where = "messages_id = '" . $messages_id . "'";
$cs_messages = cs_sql_select(__FILE__, $from, $select, $where);
$messages_users_id = $cs_messages['users_id'];
$messages_users_id_2 = $cs_messages['users_id_to'];
$archivbox_count = cs_sql_count(__FILE__, 'messages', "users_id = '{$users_id}' AND messages_archiv_sender = '1' OR users_id_to = '{$users_id}' AND messages_archiv_receiver = '1'");
$cs_messages_option = cs_sql_option(__FILE__, 'messages');
$max_space = $cs_messages_option['max_space'];
if ($archivbox_count >= $max_space) {
    $error++;
}
if (empty($error)) {
    if ($messages_users_id == $users_id) {
        $messages_archiv_sender = '1';
        $messages_show_sender = '0';
        $messages_cells = array('messages_show_sender', 'messages_archiv_sender');
        $messages_content = array($messages_show_sender, $messages_archiv_sender);
        cs_sql_update(__FILE__, 'messages', $messages_cells, $messages_content, $messages_id);
    }
    if ($messages_users_id_2 == $users_id) {
        $messages_archiv_receiver = '1';
        $messages_show_receiver = '0';
        $messages_cells = array('messages_show_receiver', 'messages_archiv_receiver');
        $messages_content = array($messages_show_receiver, $messages_archiv_receiver);
        cs_sql_update(__FILE__, 'messages', $messages_cells, $messages_content, $messages_id);
    }
    cs_redirect($cs_lang['arch_true'], 'messages', 'center');
} else {
    cs_redirect(cs_icon('important') . ' ' . $cs_lang['arch_max'], 'messages', 'center');
}
コード例 #24
0
ファイル: view.php プロジェクト: aberrios/WEBTHESGO
// $Id$
$cs_lang = cs_translate('faq');
$data = array();
$categories_id = $_GET['id'];
settype($categories_id, 'integer');
$where = "categories_mod = 'faq' AND categories_id = '" . $categories_id . "' AND categories_access <= '" . $account['access_faq'] . "'";
$categories_data = cs_sql_select(__FILE__, 'categories', '*', $where, 'categories_name', 0, 0);
$categories_loop = count($categories_data);
if (!empty($categories_loop)) {
    for ($run = 0; $run < $categories_loop; $run++) {
        $data['cat'][$run]['name'] = cs_secure($categories_data[$run]['categories_name']);
        $data['cat'][$run]['text'] = cs_secure($categories_data[$run]['categories_text']);
        $data['if']['cat_text'] = empty($categories_data[$run]['categories_text']) ? false : true;
    }
    $cs_faq_cat1 = cs_sql_select(__FILE__, 'faq', '*', "categories_id = '" . $categories_id . "'", 'categories_id DESC', 0, 0);
    $faq_loop1 = count($cs_faq_cat1);
    $data['faq'] = array();
    for ($run = 0; $run < $faq_loop1; $run++) {
        $data['faq'][$run]['num'] = cs_secure($run + 1);
        $data['faq'][$run]['question'] = cs_secure($cs_faq_cat1[$run]['faq_question']);
        $data['faq'][$run]['answer'] = cs_secure($cs_faq_cat1[$run]['faq_answer'], 1, 1, 1, 1);
    }
    echo cs_subtemplate(__FILE__, $data, 'faq', 'view');
} else {
    $data['head']['mod'] = $cs_lang['mod_name'];
    $data['head']['action'] = $cs_lang['cat'];
    $data['head']['icon'] = cs_icon('error', 48);
    $cs_lang_error = cs_translate('errors');
    $data['head']['topline'] = $cs_lang_error['403_body'];
    echo cs_subtemplate(__FILE__, $data, 'errors', '403');
}
コード例 #25
0
ファイル: view.php プロジェクト: aberrios/WEBTHESGO
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('access');
$cs_access = cs_sql_select(__FILE__, 'access', '*', "access_id = '" . $account['access_id'] . "'");
unset($cs_access['access_id']);
$data = array();
$run = 0;
$data['lang']['name'] = cs_secure($cs_access['access_name']);
$data['lang']['clansphere'] = $account['access_clansphere'] . ' - ' . $cs_lang['clansphere_' . $account['access_clansphere'] . ''];
$modules = cs_checkdirs('mods');
foreach ($modules as $mod) {
    $acc_dir = 'access_' . $mod['dir'];
    if (array_key_exists($acc_dir, $cs_access) and $mod['dir'] != 'clansphere' and !empty($account[$acc_dir])) {
        if (!empty($mod['icon'])) {
            $data['access'][$run]['icon'] = cs_icon($mod['icon']);
        } else {
            $data['access'][$run]['icon'] = '';
        }
        $data['access'][$run]['name'] = $mod['name'];
        $mod_acc = $cs_access[$acc_dir];
        $data['access'][$run]['access'] = $mod_acc . ' - ' . $cs_lang['lev_' . $mod_acc];
        $run++;
    }
}
echo cs_subtemplate(__FILE__, $data, 'access', 'view');
コード例 #26
0
ファイル: manage.php プロジェクト: aberrios/WEBTHESGO
$sort = empty($_REQUEST['sort']) ? 5 : $_REQUEST['sort'];
$order = $cs_sort[$sort];
$access_count = cs_sql_count(__FILE__, 'access');
$data['lang']['create'] = cs_url('access', 'create');
$data['lang']['count'] = $access_count;
$data['pages']['list'] = cs_pages('access', 'manage', $access_count, $start, 0, $sort);
$select = 'access_id, access_name, access_access, access_clansphere';
$cs_access = cs_sql_select(__FILE__, 'access', $select, 0, $order, $start, $account['users_limit']);
$access_loop = count($cs_access);
$data['lang']['getmsg'] = cs_getmsg();
$data['sort']['name'] = cs_sort('access', 'manage', $start, 0, 1, $sort);
$data['sort']['access'] = cs_sort('access', 'manage', $start, 0, 3, $sort);
$data['sort']['clansphere'] = cs_sort('access', 'manage', $start, 0, 5, $sort);
$img_edit = cs_icon('edit', 16, $cs_lang['edit']);
$img_del = cs_icon('editdelete', 16, $cs_lang['remove']);
$img_users = cs_icon('kdmconfig', 16, $cs_lang['remove']);
if (empty($access_loop)) {
    $data['access'] = '';
}
for ($run = 0; $run < $access_loop; $run++) {
    $data['access'][$run]['name'] = cs_secure($cs_access[$run]['access_name']);
    $data['access'][$run]['access'] = $cs_access[$run]['access_access'] . ' - ' . $cs_lang['lev_' . $cs_access[$run]['access_access']];
    $data['access'][$run]['clansphere'] = $cs_access[$run]['access_clansphere'] . ' - ' . $cs_lang['clansphere_' . $cs_access[$run]['access_clansphere']];
    $data['access'][$run]['edit'] = cs_link($img_edit, 'access', 'edit', 'id=' . $cs_access[$run]['access_id'], 0, $cs_lang['edit']);
    $data['access'][$run]['users'] = cs_link($img_users, 'access', 'users', 'id=' . $cs_access[$run]['access_id'], 0, $cs_lang['user_list']);
    if ($cs_access[$run]['access_id'] < 6) {
        $data['access'][$run]['remove'] = '-';
    } else {
        $data['access'][$run]['remove'] = cs_link($img_del, 'access', 'remove', 'id=' . $cs_access[$run]['access_id'], 0, $cs_lang['remove']);
    }
}
コード例 #27
0
ファイル: matchlist.php プロジェクト: aberrios/WEBTHESGO
$data['vars']['cups_id'] = $cups_id;
$data['pages']['list'] = cs_pages('cups', 'matchlist', $data['vars']['matchcount'], $start, $cups_id, $sort);
$data['if']['brackets'] = $system['cups_brackets'] == CS_CUPS_SYSTEM_LB ? true : false;
$data['sort']['team1'] = cs_sort('cups', 'matchlist', $start, $cups_id, 1, $sort, 'round=' . $round);
$data['sort']['team2'] = cs_sort('cups', 'matchlist', $start, $cups_id, 3, $sort, 'round=' . $round);
$data['sort']['bracket'] = cs_sort('cups', 'matchlist', $start, $cups_id, 5, $sort, 'round=' . $round);
if ($system['cups_system'] == CS_CUPS_TYPE_USERS) {
    $data['lang']['team'] = $cs_lang['player'];
}
$notallowed = array(CS_CUPS_TEAM_UNKNOWN, CS_CUPS_TEAM_BYE);
for ($i = 0; $i < $data['vars']['matchcount']; $i++) {
    $data['matches'][$i]['betlink'] = '';
    if (!empty($account['access_bets']) && $account['access_bets'] > 3) {
        $cupmatch = $data['matches'][$i];
        if ($cupmatch['cupmatches_winner'] == CS_CUPS_TEAM_UNKNOWN && !in_array($cupmatch['squad1_id'], $notallowed) && !in_array($cupmatch['squad2_id'], $notallowed) && empty($cupmatch['cupmatches_accepted1']) && empty($cupmatch['cupmatches_accepted2']) && empty($cupmatch['cupmatches_score1']) && empty($cupmatch['cupmatches_score2'])) {
            $data['matches'][$i]['betlink'] = cs_link(cs_icon('bets'), 'bets', 'create', 'cupmatchid=' . $data['matches'][$i]['cupmatches_id']);
        }
    }
    if ($system['cups_brackets'] == CS_CUPS_SYSTEM_LB) {
        $data['matches'][$i]['bracket'] = empty($data['matches'][$i]['cupmatches_loserbracket']) ? $cs_lang['winners'] : $cs_lang['losers'];
    }
    $data['matches'][$i]['status'] = empty($data['matches'][$i]['cupmatches_accepted1']) || empty($data['matches'][$i]['cupmatches_accepted2']) ? $cs_lang['open'] : $cs_lang['closed'];
    switch ($data['matches'][$i]['squad1_id']) {
        case CS_CUPS_TEAM_UNKNOWN:
            // not determined yet
            $data['matches'][$i]['team1'] = $cs_lang['unknown'];
            break;
        case CS_CUPS_TEAM_BYE:
            // free win
            $data['matches'][$i]['team1'] = $cs_lang['bye'];
            break;
コード例 #28
0
ファイル: center.php プロジェクト: aberrios/WEBTHESGO
    } else {
        $cs_main['def_tpl'] = $cs_main['def_tpl'];
    }
    foreach ($templates as $mod) {
        if ($mod['dir'] == 'install') {
            $tpl_all--;
        } else {
            $data['temp_list'][$run]['name'] = $mod['name'];
            $data['temp_list'][$run]['version'] = $mod['version'];
            $data['temp_list'][$run]['date'] = cs_date('date', $mod['released']);
            if (isset($_GET['template']) and preg_match("=^[_a-z0-9-]+\$=i", $_GET['template'])) {
                $cs_main['template'] = $_GET['template'];
            } else {
                $cs_main['template'] = $cs_main['def_tpl'];
            }
            if ($mod['dir'] == $cs_main['template']) {
                $data['temp_list'][$run]['preview'] = cs_icon('submit', '16', $cs_lang['yes']);
            } else {
                $data['temp_list'][$run]['preview'] = cs_link(cs_icon('cancel', '16', $cs_lang['no']), 'templates', 'center', 'template=' . $mod['dir']);
            }
            if ($mod['dir'] == $cs_main['def_tpl']) {
                $data['temp_list'][$run]['active'] = cs_icon('submit', '16', $cs_lang['yes']);
            } else {
                $data['temp_list'][$run]['active'] = cs_link(cs_icon('cancel', '16', $cs_lang['no']), 'templates', 'center', 'activate=' . $mod['dir']);
            }
            $run++;
        }
    }
}
$data['lang']['body'] = sprintf($cs_lang['body_temp_list'], $tpl_all);
echo cs_subtemplate(__FILE__, $data, 'templates', 'center');
コード例 #29
0
ファイル: manage.php プロジェクト: aberrios/WEBTHESGO
$gbook_loop = count($cs_gbook);
for ($run = 0; $run < $gbook_loop; $run++) {
    if ($cs_gbook[$run]['users_id'] > 0) {
        $gbook[$run]['nick'] = cs_secure($cs_gbook[$run]['users_nick']);
        $gbook[$run]['email'] = cs_secure($cs_gbook[$run]['users_email']);
    } else {
        $gbook[$run]['nick'] = cs_secure($cs_gbook[$run]['gbook_nick']);
        $gbook[$run]['email'] = cs_secure($cs_gbook[$run]['gbook_email']);
    }
    $gbook[$run]['time'] = cs_date('unix', $cs_gbook[$run]['gbook_time'], 1);
    if (empty($user_gb)) {
        $active = cs_link(cs_icon('cancel'), 'gbook', 'manage', 'active=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['active']);
        $deactive = cs_link(cs_icon('submit'), 'gbook', 'manage', 'deactive=' . $cs_gbook[$run]['gbook_id'], 0, $cs_lang['deactive']);
    } else {
        $active = cs_link(cs_icon('cancel'), 'gbook', 'manage', 'active=' . $cs_gbook[$run]['gbook_id'] . '&amp;user_gb=' . $user_gb, 0, $cs_lang['active']);
        $deactive = cs_link(cs_icon('submit'), 'gbook', 'manage', 'deactive=' . $cs_gbook[$run]['gbook_id'] . '&amp;user_gb=' . $user_gb, 0, $cs_lang['deactive']);
    }
    $gbook[$run]['lock'] = empty($cs_gbook[$run]['gbook_lock']) ? $active : $deactive;
    $gbook[$run]['id'] = $cs_gbook[$run]['gbook_id'];
    $gbook[$run]['ip'] = '';
    if ($account['access_gbook'] >= 4) {
        $ip = $cs_gbook[$run]['gbook_ip'];
        if ($account['access_gbook'] == 4) {
            $last = strlen(substr(strrchr($cs_gbook[$run]['gbook_ip'], '.'), 1));
            $ip = strlen($gbook_ip);
            $ip = substr($gbook_ip, 0, $ip - $last);
            $ip = $ip . '*';
        }
        $ip_show = empty($ip) ? '-' : $ip;
        $gbook[$run]['ip'] = cs_html_img('symbols/' . $cs_main['img_path'] . '/16/important.' . $cs_main['img_ext'], 16, 16, 'title="' . $ip_show . '"');
    }
コード例 #30
0
ファイル: edit.php プロジェクト: aberrios/WEBTHESGO
if (isset($_POST['preview']) and empty($error)) {
    $where_user = !empty($id) ? "gbook_users_id = '" . $id . "'" : 0;
    $count_entry = cs_sql_count(__FILE__, 'gbook', $where_user);
    $data['gbook']['entry_count'] = $count_entry + 1;
    $data['gbook']['users_nick'] = $cs_gbook['gbook_nick'];
    $data['gbook']['icon_town'] = empty($cs_gbook['gbook_town']) ? '' : cs_icon('gohome');
    $data['gbook']['town'] = empty($cs_gbook['gbook_town']) ? '' : cs_secure($cs_gbook['gbook_town']);
    $data['gbook']['icon_mail'] = cs_html_link('mailto:' . $cs_gbook['gbook_email'], cs_icon('mail_generic'));
    $icq = cs_html_link('http://www.icq.com/people/' . $cs_gbook['gbook_icq'], cs_icon('licq'));
    $data['gbook']['icon_icq'] = empty($cs_gbook['gbook_icq']) ? '' : $icq;
    $jabber = cs_html_jabbermail($cs_gbook['gbook_jabber'], cs_icon('jabber_protocol'));
    $data['gbook']['icon_jabber'] = empty($cs_gbook['gbook_jabber']) ? '' : $jabber;
    $url = 'http://mystatus.skype.com/smallicon/' . $cs_gbook['gbook_skype'];
    $skype = cs_html_link('skype:' . $cs_gbook['gbook_skype'] . '?userinfo', cs_html_img($url, '16', '16', '0', 'Skype'), '0');
    $data['gbook']['icon_skype'] = empty($cs_gbook['gbook_skype']) ? '' : $skype;
    $url = cs_html_link('http://' . $cs_gbook['gbook_url'], cs_icon('gohome'));
    $data['gbook']['icon_url'] = empty($cs_gbook['gbook_url']) ? '' : $url;
    $data['gbook']['text'] = cs_secure($cs_gbook['gbook_text'], 1, 1);
    $data['gbook']['time'] = cs_date('unix', $cs_gbook['gbook_time'], 1);
    $data['tpl']['preview'] = cs_subtemplate(__FILE__, $data, 'gbook', 'preview');
}
if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) {
    foreach ($cs_gbook as $key => $value) {
        $data['gbook'][$key] = cs_secure($value);
    }
    if ($cs_gbook['users_id'] == 0) {
        $data['tpl']['extension'] = cs_subtemplate(__FILE__, $data, 'gbook', 'extension');
    }
    $data['abcode']['smileys'] = cs_abcode_smileys('gbook_text');
    $data['abcode']['features'] = cs_abcode_features('gbook_text');
    $data['check']['newtime'] = !empty($_POST['gbook_newtime']) ? 'checked="checked"' : '';