Example #1
0
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;
}
Example #2
0
    if (cs_datereal('d') >= $birth[2] and cs_datereal('m') == $birth[1]) {
        $age++;
    }
    $data['join']['age'] = $content . ' (' . $age . ')';
}
$data['join']['place'] = empty($cs_joinus['joinus_place']) ? '-' : cs_secure($cs_joinus['joinus_place']);
if (empty($cs_joinus['joinus_country'])) {
    $data['join']['country'] = '-';
} else {
    $url = 'symbols/countries/' . $cs_joinus['joinus_country'] . '.png';
    $flag = cs_html_img($url, 11, 16);
    include_once 'lang/' . $account['users_lang'] . '/countries.php';
    $country = $cs_joinus['joinus_country'];
    $data['join']['country'] = $flag . ' ' . $cs_country[$country];
}
$data['join']['email'] = empty($cs_joinus['joinus_email']) ? '-' : cs_html_mail($cs_joinus['joinus_email'], $cs_joinus['joinus_email']);
if (empty($cs_joinus['joinus_icq'])) {
    $data['join']['icq'] = '-';
} else {
    $data['join']['icq'] = cs_html_link('http://www.icq.com/people/' . $cs_joinus['joinus_icq'], $cs_joinus['joinus_icq']);
}
if (empty($cs_joinus['joinus_jabber'])) {
    $data['join']['jabber'] = '-';
} else {
    $cs_joinus['joinus_jabber'] = cs_secure($cs_joinus['joinus_jabber']);
    $data['join']['jabber'] = cs_html_jabbermail($cs_joinus['joinus_jabber']);
}
if (empty($cs_joinus['games_id'])) {
    $data['join']['game'] = '-';
} else {
    $img = cs_html_img('uploads/games/' . $cs_joinus['games_id'] . '.gif');
Example #3
0
         $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0);
     }
     $data['users']['postal_place'] = $content;
 }
 if (empty($cs_user['users_country'])) {
     $data['users']['country'] = '-';
 } else {
     $url = 'symbols/countries/' . $cs_user['users_country'] . '.png';
     $data['users']['country'] = cs_html_img($url, 11, 16);
     include_once 'lang/' . $account['users_lang'] . '/countries.php';
     $country = $cs_user['users_country'];
     $data['users']['country'] .= ' ' . $cs_country[$country];
 }
 $data['users']['registered'] = cs_date('unix', $cs_user['users_register'], 1);
 $data['users']['laston'] = !empty($cs_users['users_invisible']) ? '--' : cs_date('unix', $cs_user['users_laston'], 1);
 $content = cs_html_mail($cs_user['users_email']);
 if (in_array('users_email', $hidden)) {
     $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0);
 }
 $data['users']['email'] = empty($cs_user['users_email']) ? '--' : $content;
 $cs_user['users_url'] = cs_secure($cs_user['users_url']);
 $content = cs_html_link('http://' . $cs_user['users_url'], $cs_user['users_url']);
 if (in_array('users_url', $hidden)) {
     $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0);
 }
 $data['users']['url'] = empty($cs_user['users_url']) ? '--' : $content;
 $content = cs_html_link('http://www.icq.com/people/' . $cs_user['users_icq'], $cs_user['users_icq']);
 if (in_array('users_icq', $hidden)) {
     $content = empty($allow) ? '--' : cs_html_italic(1) . $content . cs_html_italic(0);
 }
 $data['users']['icq'] = empty($cs_user['users_icq']) ? '--' : $content;
Example #4
0
     $skype = cs_secure($cs_gbook[$run]['gbook_skype']);
     $url = 'http://mystatus.skype.com/smallicon/' . $skype;
     $gbook[$run]['icon_skype'] = empty($skype) ? '' : cs_html_link("skype:{$skype}?userinfo", cs_html_img($url, '16', '16', '0', 'Skype'), '0');
     $url = cs_secure($cs_gbook[$run]['gbook_url']);
     $gbook[$run]['icon_url'] = empty($url) ? '' : cs_html_link("http://{$url}", cs_icon('gohome'));
 } else {
     $hidden = explode(',', $cs_gbook[$run]['users_hidden']);
     $allow = $cs_gbook[$run]['users_id'] == $account['users_id'] or $account['access_users'] > 4 ? 1 : 0;
     $gbook[$run]['users_nick'] = cs_user($cs_gbook[$run]['users_id'], $cs_gbook[$run]['users_nick'], $cs_gbook[$run]['users_active'], $cs_gbook[$run]['users_delete']);
     $gbook[$run]['town'] = '';
     $gbook[$run]['icon_town'] = '';
     if (!empty($cs_gbook[$run]['users_place'])) {
         $gbook[$run]['icon_town'] = cs_icon('gohome');
         $gbook[$run]['town'] = cs_secure($cs_gbook[$run]['users_place']);
     }
     $mail = cs_html_mail($cs_gbook[$run]['users_email'], cs_icon('mail_generic'));
     if (in_array('users_email', $hidden)) {
         $mail = empty($allow) ? '' : $mail;
     }
     $gbook[$run]['icon_mail'] = empty($cs_gbook[$run]['users_email']) ? '' : $mail;
     $icq = cs_html_link('http://www.icq.com/people/' . $cs_gbook[$run]['users_icq'], cs_icon('licq'));
     if (in_array('users_icq', $hidden)) {
         $icq = empty($allow) ? '' : $icq;
     }
     $gbook[$run]['icon_icq'] = empty($cs_gbook[$run]['users_icq']) ? '' : $icq;
     $jabber = cs_html_jabbermail($cs_gbook[$run]['users_jabber'], cs_icon('jabber_protocol'));
     if (in_array('users_jabber', $hidden)) {
         $jabber = empty($allow) ? '' : $jabber;
     }
     $gbook[$run]['icon_jabber'] = empty($cs_gbook[$run]['users_jabber']) ? '' : $jabber;
     $url = 'http://mystatus.skype.com/smallicon/' . $cs_gbook[$run]['users_skype'];
Example #5
0
function cs_abcode_mail($matches)
{
    if (strpos($matches[0], '</a>') !== false) {
        return $matches[0];
    }
    if ($matches[0][0] != '[') {
        $matches[1] = $matches[0];
    }
    if (isset($matches['name'])) {
        $matches[1] = $matches[2];
    }
    return cs_html_mail($matches[1]);
}
Example #6
0
// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('fightus');
$cs_get = cs_get('id');
$data = array();
include_once 'lang/' . $account['users_lang'] . '/countries.php';
$fightus_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
$data['fightus']['url_convert_clan'] = cs_url('clans', 'create', 'fightus=' . $fightus_id);
$data['fightus']['url_convert_war'] = cs_url('wars', 'create', 'fightus=' . $fightus_id);
$select = 'fightus_since, fightus_nick, fightus_email, fightus_icq, fightus_jabber, games_id, squads_id, ';
$select .= 'fightus_clan, fightus_short, fightus_country, fightus_url, fightus_date, fightus_more';
$cs_fightus = cs_sql_select(__FILE__, 'fightus', $select, "fightus_id = '" . $fightus_id . "'");
$data['fightus']['since'] = cs_date('unix', $cs_fightus['fightus_since'], 1);
$data['fightus']['nick'] = cs_secure($cs_fightus['fightus_nick']);
$data['fightus']['email'] = cs_html_mail($cs_fightus['fightus_email'], $cs_fightus['fightus_email']);
if (!empty($cs_fightus['fightus_icq'])) {
    $data['fightus']['icq'] = cs_html_link('http://www.icq.com/people/' . $cs_fightus['fightus_icq'], $cs_fightus['fightus_icq']);
} else {
    $data['fightus']['icq'] = '-';
}
if (!empty($cs_fightus['fightus_jabber'])) {
    $data['fightus']['jabber'] = cs_html_jabbermail($cs_fightus['fightus_jabber']);
} else {
    $data['fightus']['jabber'] = '-';
}
if (!empty($cs_fightus['games_id'])) {
    $data['fightus']['game'] = cs_html_img('uploads/games/' . $cs_fightus['games_id'] . '.gif');
    $where = "games_id = '" . $cs_fightus['games_id'] . "'";
    $cs_game = cs_sql_select(__FILE__, 'games', 'games_name, games_id', $where);
    $data['fightus']['game'] .= cs_link($cs_game['games_name'], 'games', 'view', 'id=' . $cs_game['games_id']);