Example #1
0
    $print_form_height[7] = $print_height;
    $print_form_width[7] = $print_width;
    $height = $print_form_height[$print];
    $width = $print_form_width[$print];
    $error = '';
    if (empty($print)) {
        $error .= $cs_lang['error_print'] . cs_html_br(1);
    }
    if (empty($picture_id)) {
        $error .= $cs_lang['error_pic'] . cs_html_br(1);
    }
}
if (!isset($_POST['preview']) or isset($_POST['preview'])) {
    $data['head']['body'] = $cs_lang['body_print'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (isset($_POST['preview']) and empty($error)) {
    $data['if']['preview'] = TRUE;
    if (extension_loaded('gd')) {
        $data['print']['img'] = cs_html_img("mods/gallery/image.php?pic=" . $picture_id . "&size=" . $width);
        $host = $cs_main['php_self']['website'] . $cs_main['php_self']['dirname'];
        $data['print']['url'] = $host . "mods/gallery/print_now.php?pic=" . $picture_id . "&size=" . $width;
        $data['if']['extension'] = TRUE;
    } else {
        $data['print']['img'] = cs_html_img("mods/gallery/image.php?pic=" . $picture_id, $height, $width, '', $picture_id);
        $data['if']['extension'] = FALSE;
    }
}
$data['picture']['id'] = $picture_id;
echo cs_subtemplate(__FILE__, $data, 'gallery', 'print');
Example #2
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'] . '&user_gb=' . $user_gb, 0, $cs_lang['active']);
        $deactive = cs_link(cs_icon('submit'), 'gbook', 'manage', 'deactive=' . $cs_gbook[$run]['gbook_id'] . '&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 . '"');
    }
}
$data['gbook'] = !empty($gbook) ? $gbook : '';
echo cs_subtemplate(__FILE__, $data, 'gbook', 'manage');
Example #3
0
     }
 }
 if (empty($_POST['submit']) || !empty($error)) {
     $maps_id = empty($_POST['submit']) ? (int) $_GET['id'] : $_POST['maps_id'];
     $cells = 'games_id, maps_name, maps_text, maps_picture, server_name';
     $data['maps'] = cs_sql_select(__FILE__, 'maps', $cells, 'maps_id = \'' . $maps_id . '\'');
     $data['maps']['maps_id'] = empty($error) ? (int) $_GET['id'] : (int) $_POST['maps_id'];
     $data['maps']['message'] = empty($error) ? $cs_lang['fill_in'] : $cs_lang['error_occured'] . $error;
     $data['maps']['maps_name'] = empty($_POST['maps_name']) ? $data['maps']['maps_name'] : $_POST['maps_name'];
     $data['maps']['maps_text'] = empty($_POST['maps_text']) ? $data['maps']['maps_text'] : $_POST['maps_text'];
     $data['abcode']['smileys'] = cs_abcode_smileys('maps_text');
     $data['abcode']['features'] = cs_abcode_features('maps_text');
     $data['maps']['action'] = cs_url('maps', 'edit');
     $data['games'] = cs_sql_select(__FILE__, 'games', 'games_name,games_id', 0, 'games_name', 0, 0);
     $data['games'] = cs_dropdownsel($data['games'], $data['maps']['games_id'], 'games_id');
     $data['maps']['picture'] = empty($data['maps']['maps_picture']) ? '-' : cs_html_img('uploads/maps/' . $data['maps']['maps_picture']);
     $matches[1] = $cs_lang['pic_infos'];
     $return_types = '';
     foreach ($img_filetypes as $add) {
         $return_types .= empty($return_types) ? $add : ', ' . $add;
     }
     $matches[2] = $cs_lang['max_width'] . $options['max_width'] . ' px' . cs_html_br(1);
     $matches[2] .= $cs_lang['max_height'] . $options['max_height'] . ' px' . cs_html_br(1);
     $matches[2] .= $cs_lang['max_size'] . cs_filesize($options['max_size']) . cs_html_br(1);
     $matches[2] .= $cs_lang['filetypes'] . $return_types;
     $data['maps']['matches'] = cs_abcode_clip($matches);
     $data['if']['picture_remove'] = !empty($data['maps']['maps_picture']) ? TRUE : FALSE;
     echo cs_subtemplate(__FILE__, $data, 'maps', 'edit');
 } else {
     $cs_maps['games_id'] = (int) $_POST['games_id'];
     $cs_maps['maps_name'] = $_POST['maps_name'];
Example #4
0
     $data['squads'][$sq_run]['members'] = array();
 }
 $tr = 0;
 for ($run = 0; $run < $members_loop; $run++) {
     $members = $data['squads'][$sq_run]['members'];
     $hidden = explode(',', $members[$run]['users_hidden']);
     $allow = $members[$run]['users_id'] == $account['users_id'] or $account['access_users'] > 4 ? 1 : 0;
     if (empty($members[$run]['users_picture'])) {
         $members[$run]['picture'] = $cs_lang['nopic'];
     } else {
         $place = 'uploads/users/' . $members[$run]['users_picture'];
         $size = getimagesize($cs_main['def_path'] . '/' . $place);
         $members[$run]['picture'] = cs_html_img($place, $size[1], $size[0]);
     }
     $url = 'symbols/countries/' . $members[$run]['users_country'] . '.png';
     $members[$run]['country'] = cs_html_img($url, 11, 16) . ' ';
     $members[$run]['nick'] = $data['squads'][$sq_run]['clans_tagpos'] == 1 ? $data['squads'][$sq_run]['clans_tag'] . ' ' : '';
     $members[$run]['nick'] .= cs_user($members[$run]['users_id'], $members[$run]['users_nick'], $members[$run]['users_active'], $members[$run]['users_delete']);
     $members[$run]['nick'] .= $data['squads'][$sq_run]['clans_tagpos'] == 2 ? ' ' . $data['squads'][$sq_run]['clans_tag'] : '';
     $users_name = !in_array('users_name', $hidden) || !empty($allow) ? $members[$run]['users_name'] : '';
     $users_surname = !in_array('users_surname', $hidden) || !empty($allow) ? $members[$run]['users_surname'] : '';
     $members[$run]['surname'] = empty($users_name) && empty($users_surname) ? ' - ' : $users_name . ' ' . $users_surname;
     $members[$run]['task'] = cs_secure($members[$run]['members_task']);
     $since = empty($members[$run]['members_since']) ? '-' : cs_date('date', $members[$run]['members_since']);
     $members[$run]['since'] = $since;
     $tr++;
     $members[$run]['if']['td'] = FALSE;
     $members[$run]['if']['end_row'] = FALSE;
     if ($tr % 2 != 0 && $tr == $members_loop) {
         $members[$run]['if']['td'] = TRUE;
     } elseif ($tr % 2 == 0 && $tr != $members_loop) {
Example #5
0
                    $cs_gallery_pic['gallery_name'] = $name;
                    $cs_gallery_pic['gallery_status'] = isset($_POST['gallery_status']) ? $_POST['gallery_status'] : 0;
                    $cs_gallery_pic['gallery_access'] = isset($_POST['gallery_access']) ? $_POST['gallery_access'] : 0;
                    $cs_gallery_pic['gallery_watermark'] = $_POST['gallery_watermark'];
                    if (!empty($_POST['gallery_watermark'])) {
                        $watermark_pos = $_POST['watermark_pos'];
                        $watermark_trans = $_POST['gallery_watermark_trans'];
                        $cs_gallery_pic['gallery_watermark_pos'] = $watermark_pos . '|--@--|' . $watermark_trans;
                    }
                    $extension = strlen(strrchr($name, "."));
                    $file = strlen($name);
                    $filename = substr($name, 0, $file - $extension);
                    $cs_gallery_pic['gallery_titel'] = $filename;
                    $cs_gallery_pic['gallery_time'] = cs_time();
                    $gallery_cells = array_keys($cs_gallery_pic);
                    $gallery_save = array_values($cs_gallery_pic);
                    cs_sql_insert(__FILE__, 'gallery', $gallery_cells, $gallery_save);
                }
                $data['pics'][$run]['img'] = cs_html_img('mods/gallery/image.php?picname=' . $name);
                $data['pics'][$run]['name'] = $name;
            }
        }
    }
    cs_redirect($cs_lang['create_done'], 'gallery');
}
if (!isset($_POST['submit_1'])) {
    if (!isset($_POST['submit']) or !empty($error)) {
        $data['if']['start'] = TRUE;
    }
}
echo cs_subtemplate(__FILE__, $data, 'gallery', 'manage_advanced');
Example #6
0
    include_once 'lang/' . $account['users_lang'] . '/countries.php';
    foreach ($cs_country as $short => $full) {
        $short == $cs_clans['clans_country'] ? $sel = 1 : ($sel = 0);
        $data['clans']['country'] .= cs_html_option($full, $short, $sel);
    }
    $data['clans']['country'] .= cs_html_select(0) . ' ' . cs_html_img('symbols/countries/' . $cs_clans['clans_country'] . '.png', 11, 16, 'id="' . $el_id . '"');
    $data['clans']['url'] = cs_secure($cs_clans['clans_url']);
    $data['clans']['since'] = cs_dateselect('since', 'date', $cs_clans['clans_since']);
    $data['clans']['password'] = cs_secure($cs_clans['clans_pwd']);
    $data['users']['nick'] = $users_nick;
    if (empty($cs_clans['clans_picture'])) {
        $data['clans']['pic'] = $cs_lang['nopic'];
    } else {
        $place = 'uploads/clans/' . $cs_clans['clans_picture'];
        $size = getimagesize($cs_main['def_path'] . '/' . $place);
        $data['clans']['pic'] = cs_html_img($place, $size[1], $size[0]);
    }
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . $op_clans['max_width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $op_clans['max_height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_clans['max_size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['clans']['clip'] = cs_abcode_clip($matches);
    $data['data']['id'] = $clans_id;
    echo cs_subtemplate(__FILE__, $data, 'clans', 'edit');
} else {
    $clans_cells = array_keys($cs_clans);
Example #7
0
 if (empty($thread['threads_comments'])) {
     include_once 'mods/board/repair.php';
     $thread['threads_comments'] = cs_threads_comments($thread['threads_id']);
 }
 $icon = 'post_';
 $tid = $thread['threads_id'];
 if (!empty($account['users_id']) and $thread['threads_last_time'] > $cs_readtime and $thread['threads_last_time'] > $thread['read_since']) {
     $icon .= 'unread_';
 }
 if (!empty($thread['threads_close'])) {
     $icon .= 'close_';
 }
 if ($thread['threads_important']) {
     $icon .= 'important_';
 }
 $data['threads'][$run]['icon'] = cs_html_img('symbols/board/' . $icon . '.png');
 if (!empty($thread['threads_important'])) {
     $data['threads'][$run]['important'] = $cs_lang['important'] . ' ';
 } else {
     $data['threads'][$run]['important'] = '';
 }
 $headline = cs_secure($thread['threads_headline']);
 $data['threads'][$run]['headline'] = cs_link($headline, 'board', 'thread', 'where=' . $thread['threads_id']);
 if ($thread['threads_comments'] > $account['users_limit']) {
     $data['threads'][$run]['pages'] = cs_html_br(1);
     $data['threads'][$run]['pages'] .= $cs_lang['page'] . ' ';
     $data['threads'][$run]['pages'] .= cs_pages('board', 'thread', $thread['threads_comments'], 0, $thread['threads_id'], 0, 0, 1);
 } else {
     $data['threads'][$run]['pages'] = '';
 }
 $data['threads'][$run]['comments'] = $thread['threads_comments'];
Example #8
0
    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');
Example #9
0
$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');
    $where = "games_id = '" . $cs_joinus['games_id'] . "'";
    $cs_game = cs_sql_select(__FILE__, 'games', 'games_name, games_id', $where);
    $link = cs_link($cs_game['games_name'], 'games', 'view', 'id=' . $cs_game['games_id']);
    $data['join']['game'] = $img . ' ' . $link;
}
if (empty($cs_joinus['squads_id'])) {
    $data['join']['squad'] = '-';
} else {
    $where = "squads_id = '" . $cs_joinus['squads_id'] . "'";
    $cs_squad = cs_sql_select(__FILE__, 'squads', 'squads_name, squads_id', $where);
    $data['join']['squad'] = cs_link($cs_squad['squads_name'], 'squads', 'view', 'id=' . $cs_squad['squads_id']);
}
$data['join']['webcon'] = empty($cs_joinus['joinus_webcon']) ? '-' : cs_secure($cs_joinus['joinus_webcon']);
$data['join']['lanact'] = empty($cs_joinus['joinus_lanact']) ? '-' : cs_secure($cs_joinus['joinus_lanact']);
$data['join']['date'] = cs_date('date', $cs_joinus['joinus_date']);
Example #10
0
    $pfad = "uploads/abcode";
    $allowed = array('.gif', '.GIF', '.jpg', '.JPG', '.png', '.PNG', 'jpeg', 'JPEG');
    if ($handle = opendir($pfad)) {
        while (false !== ($file = readdir($handle))) {
            $ending = substr($file, -4);
            if ($file[0] != '.' and in_array($ending, $allowed)) {
                $all_smileys[] = $file;
            }
        }
    }
    $result = array_values(array_diff($all_smileys, $act_smileys));
    if (!empty($result)) {
        $counter = 0;
        for ($run = 0; $run < count($result); $run++) {
            $data['file'][$run]['name'] = $result[$run];
            $data['file'][$run]['preview'] = cs_html_img('uploads/abcode/' . $result[$run]);
            $data['file'][$run]['run'] = empty($data['file'][$run]['run']) ? '' : $data['file'][$run]['run'];
            $data['file'][$run]['order'] = empty($_POST['order_' . $counter]) ? '' : (int) $_POST['order_' . $counter];
            $data['file'][$run]['counter'] = $counter;
            $counter++;
        }
    }
} else {
    for ($run = 0; $run < count($data['file']); $run++) {
        $sql_cells = array('abcode_func', 'abcode_pattern', 'abcode_file', 'abcode_order');
        $sql_saves = array('img', $data['file'][$run]['run'], $data['file'][$run]['name'], $data['file'][$run]['order']);
        cs_sql_insert(__FILE__, 'abcode', $sql_cells, $sql_saves);
    }
    cs_cache_delete('abcode_smileys');
    cs_cache_delete('abcode_content');
    cs_redirect($cs_lang['changes_done'], 'abcode', 'manage');
Example #11
0
 $data['news']['news_text'] = cs_secure($cs_news['news_text'], $abcode[0], $abcode[1], $abcode[2], $abcode[3], $abcode[4]);
 if (empty($cs_news['news_readmore_active'])) {
     $data['news']['news_readmore'] = '';
 } else {
     $data['news']['news_readmore'] = cs_secure($cs_news['news_readmore'], $abcode[0], $abcode[1], $abcode[2], $abcode[3], $abcode[4]);
     $data['news']['news_readmore'] .= cs_html_br(2);
 }
 $data['news']['users_link'] = cs_user($cs_news['users_id'], $cs_news['users_nick'], $cs_news['users_active'], $cs_news['users_delete']);
 $data['if']['catimg'] = empty($cs_news['categories_picture']) ? false : true;
 $data['news']['url_catimg'] = empty($data['if']['catimg']) ? '' : 'uploads/categories/' . $cs_news['categories_picture'];
 $data['news']['pictures'] = '';
 if (!empty($cs_news['news_pictures'])) {
     $news_pics = explode("\n", $cs_news['news_pictures']);
     $data['news']['pictures'] = cs_html_br(2);
     foreach ($news_pics as $pic) {
         $link = cs_html_img('uploads/news/thumb-' . $pic);
         $path = $cs_main['php_self']['dirname'];
         $data['news']['pictures'] .= cs_html_link($path . 'uploads/news/picture-' . $pic, $link) . ' ';
     }
 }
 $data['if']['show'] = false;
 if (!empty($cs_news['news_mirror'])) {
     $data['if']['show'] = true;
     $temp_mirror = explode("\n", $cs_news['news_mirror']);
     $temp_mirror_name = explode("\n", $cs_news['news_mirror_name']);
     $tpl_run = 0;
     for ($run_mirror = 1; $run_mirror < count($temp_mirror); $run_mirror++) {
         $num = $run_mirror;
         if ($run_mirror == count($temp_mirror) - 1) {
             $data['mirror'][$tpl_run]['dot'] = '';
         } elseif (!empty($run_mirror)) {
Example #12
0
 $data['head']['mod'] = $cs_lang[$op_squads['label'] . 's'];
 $data['lang']['clan_label'] = $cs_lang[$op_clans['label']];
 $cs_clans = cs_sql_select(__FILE__, 'clans', 'clans_name,clans_id', "clans_pwd != ''", 'clans_name', 0, 0);
 $data['squads']['clan_sel'] = cs_dropdown('clans_id', 'clans_name', $cs_clans, $cs_squads['clans_id']);
 $data['squads']['clans_pwd'] = $clans_pwd;
 if ($data['if']['gamesmod'] == TRUE) {
     $el_id = 'game_1';
     $cs_games = cs_sql_select(__FILE__, 'games', 'games_name,games_id', 0, 'games_name', 0, 0);
     $games_count = count($cs_games);
     $data['squads']['games_sel'] = '';
     for ($run = 0; $run < $games_count; $run++) {
         $sel = $cs_games[$run]['games_id'] == $cs_squads['games_id'] ? 1 : 0;
         $data['squads']['games_sel'] .= cs_html_option($cs_games[$run]['games_name'], $cs_games[$run]['games_id'], $sel);
     }
     $url = 'uploads/games/' . $cs_squads['games_id'] . '.gif';
     $data['squads']['games_img'] = cs_html_img($url, 0, 0, 'id="' . $el_id . '"');
 }
 $matches[1] = $cs_lang['secure_stages'];
 $matches[2] = $cs_lang['stage_1'] . $cs_lang['stage_1_text'] . cs_html_br(1);
 $matches[2] .= $cs_lang['stage_2'] . $cs_lang['stage_2_text'] . cs_html_br(1);
 $matches[2] .= $cs_lang['stage_3'] . $cs_lang['stage_3_text'] . cs_html_br(1);
 $matches[2] .= $cs_lang['stage_4'] . $cs_lang['stage_4_text'];
 $data['squads']['secure_clip'] = cs_abcode_clip($matches);
 $matches[1] = $cs_lang['pic_infos'];
 $return_types = '';
 foreach ($img_filetypes as $add) {
     $return_types .= empty($return_types) ? $add : ', ' . $add;
 }
 $matches[2] = $cs_lang['max_width'] . $op_squads['max_width'] . ' px' . cs_html_br(1);
 $matches[2] .= $cs_lang['max_height'] . $op_squads['max_height'] . ' px' . cs_html_br(1);
 $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_squads['max_size']) . cs_html_br(1);
Example #13
0
         for ($run = 0; $run < $folders_loop; $run++) {
             if (empty($folders[$run]['folders_picture'])) {
                 $cs_lap = cs_html_img('symbols/gallery/image.gif');
             } else {
                 $cs_lap = cs_html_img("uploads/folders/" . $folders[$run]['folders_picture']);
             }
             $more = 'id=' . $id . '&amp;cat_id=' . $folders[$run]['folders_id'];
             $cat_1[$run]['folders_img'] = cs_link($cs_lap, 'usersgallery', 'users', $more);
             $cat_1[$run]['folders_name'] = $folders[$run]['folders_name'];
         }
     }
     $data['cat_1'] = !empty($cat_1) ? $cat_1 : array();
     if (!empty($gallery_loop)) {
         for ($run = 0; $run < $gallery_loop; $run++) {
             $img[$run]['img'] = $cs_gallery[$run]['usersgallery_id'];
             $cs_lap = cs_html_img('symbols/gallery/nowatermark.gif', '100', '100');
             $num = $start + $run;
             $img[$run]['link'] = cs_link($cs_lap, 'usersgallery', 'com_view', 'id=' . $id . '&amp;cat_id=' . $cat_id . '&amp;move=' . $num);
         }
     }
     $data['img'] = !empty($img) ? $img : array();
     if (!empty($data['cat_1']) or !empty($gallery_loop)) {
         $data['data']['pages'] = cs_pages('usersgallery', 'users', $gallery_count, $start, 0, 0, $cols_rows, 0, 'cat_id=' . $cat_id . '&amp;id=' . $id);
     } else {
         $empty_cat['lang']['empty_cat'] = $cs_lang['empty_cat'];
     }
 }
 if (empty($empty_cat['lang']['empty_cat']) and !empty($cat_id)) {
     $cat_list_1['0']['cat_list_1'] = '1';
 } else {
     $cat_list_1['0']['cat_list_1'] = '';
Example #14
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('ranks');
$cs_option = cs_sql_option(__FILE__, 'ranks');
$select = 'ranks_url, ranks_img, ranks_code';
$data = array();
$data['ranks'] = cs_sql_select(__FILE__, 'ranks', $select, 0, 0, 0, $cs_option['max_navlist']);
$ranks_loop = count($data['ranks']);
for ($run = 0; $run < $ranks_loop; $run++) {
    $data['ranks'][$run]['picture'] = '';
    if (!empty($data['ranks'][$run]['ranks_url'])) {
        $picture = cs_html_img($data['ranks'][$run]['ranks_img']);
        $data['ranks'][$run]['picture'] = cs_html_link($data['ranks'][$run]['ranks_url'], $picture);
    } else {
        $data['ranks'][$run]['picture'] = $data['ranks'][$run]['ranks_code'];
    }
}
echo cs_subtemplate(__FILE__, $data, 'ranks', 'navlist');
Example #15
0
    }
}
$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';
Example #16
0
            cs_redirect('', 'users', 'manage');
        } else {
            $error .= $cs_lang['up_error'];
        }
    }
}
if (empty($error)) {
    $data['head']['body'] = $cs_lang['picture_manage'];
} else {
    $data['head']['body'] = $error;
}
if (!empty($error) or empty($files['picture']['tmp_name']) and empty($del)) {
    if (empty($userpic)) {
        $data['users']['current_pic'] = $cs_lang['nopic'];
    } else {
        $size = getimagesize($cs_main['def_path'] . '/uploads/users/' . $userpic);
        $data['users']['current_pic'] = cs_html_img('uploads/users/' . $userpic, $size[1], $size[0]);
    }
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . $op_users['max_width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $op_users['max_height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_users['max_size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['users']['picup_clip'] = cs_abcode_clip($matches);
    $data['users']['id'] = $users_id;
    echo cs_subtemplate(__FILE__, $data, 'users', 'picture_edit');
}
Example #17
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('cash');
$data = array();
$data['op'] = cs_sql_option(__FILE__, 'cash');
$tables = 'cash ca INNER JOIN {pre}_users usr ON ca.users_id = usr.users_id';
$cells = 'ca.cash_id AS cash_id, ca.cash_time AS cash_time, ca.cash_inout AS cash_inout, ca.users_id AS users_id, usr.users_nick AS users_nick, ca.cash_text AS cash_text';
$cells .= ', ca.cash_money AS cash_money, ca.cash_id AS cash_id, usr.users_country AS users_country, usr.users_active AS users_active, usr.users_delete AS users_delete';
$cond = "cash_inout = 'in' AND ca.cash_time LIKE '" . cs_datereal('Y-m') . "%'";
$data['cash'] = cs_sql_select(__FILE__, $tables, $cells, $cond, 'cash_time DESC', 0, 0);
if (!empty($data['cash'])) {
    $count_cash = count($data['cash']);
    for ($run = 0; $run < $count_cash; $run++) {
        $data['cash'][$run]['users_flag'] = cs_html_img('symbols/countries/' . $data['cash'][$run]['users_country'] . '.png');
        $data['cash'][$run]['user'] = cs_user($data['cash'][$run]['users_id'], $data['cash'][$run]['users_nick'], $data['cash'][$run]['users_active'], $data['cash'][$run]['users_delete']);
        $data['cash'][$run]['date'] = cs_date('date', $data['cash'][$run]['cash_time']);
        $data['cash'][$run]['cash_text'] = cs_secure($data['cash'][$run]['cash_text'], 0, 0, 0);
        $data['cash'][$run]['cash_money'] = cs_secure($data['cash'][$run]['cash_money'], 0, 0, 0);
    }
}
echo cs_subtemplate(__FILE__, $data, 'cash', 'view_cash');
Example #18
0
        for ($run = 0; $run < $answers_stop; $run++) {
            $answer_count = 0;
            for ($run_2 = 0; $run_2 < $voted_loop; $run_2++) {
                $voted_answer = $cs_voted[$run_2]['voted_answer'];
                if ($voted_answer == $run + 1) {
                    $answer_count++;
                }
            }
            if (!empty($answer_count)) {
                $answer_percent = $answer_count / $voted_loop * 100;
            } else {
                $answer_percent = '0';
            }
            $answer_percent = round($answer_percent, 1);
            $votes_navlist['results'][$run]['answer'] = $temp[$run + 1];
            $votes_navlist['results'][$run]['percent'] = $answer_percent;
            if (!empty($answer_count)) {
                $votes_navlist['results'][$run]['end_img'] = cs_html_img('symbols/votes/vote02.png', '13', '2');
            } else {
                $votes_navlist['results'][$run]['end_img'] = '';
            }
        }
        $votes_navlist['votes']['id'] = $votes_id;
        $votes_navlist['lang']['current_vote'] = $cs_lang['current_vote'];
        echo cs_subtemplate(__FILE__, $votes_navlist, 'votes', 'navlist_results');
    }
} else {
    if (!empty($votes_form)) {
        echo $cs_lang['no_actvote'];
    }
}
Example #19
0
    }
    if (empty($edit['usersgallery_titel'])) {
        $error .= $cs_lang['no_titel'] . cs_html_br(1);
    }
    if (empty($edit['folders_id'])) {
        $error .= $cs_lang['no_cat'] . cs_html_br(1);
    }
}
if (!isset($_POST['submit'])) {
    $data['head']['body'] = $cs_lang['body_picture'];
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $edit;
    $data['current']['img'] = cs_html_img('mods/gallery/image.php?usersthumb=' . $edit['usersgallery_id']);
    $data['folders']['select'] = make_folders_select('folders_id', $edit['folders_id'], $account['users_id'], 'usersgallery');
    $data['access']['options'] = '';
    $levels = 0;
    while ($levels < 6) {
        $edit['usersgallery_access'] == $levels ? $sel = 1 : ($sel = 0);
        $data['access']['options'] .= cs_html_option($levels . ' - ' . $cs_lang['lev_' . $levels], $levels, $sel);
        $levels++;
    }
    $data['status']['options'] = '';
    $levels = 0;
    while ($levels < 2) {
        $edit['usersgallery_status'] == $levels ? $sel = 1 : ($sel = 0);
        $data['status']['options'] .= cs_html_option($cs_lang['show_' . $levels], $levels, $sel);
        $levels++;
    }
Example #20
0
 $data['wars']['new_map'] = $new_map;
 $data['abcode']['smileys'] = cs_abcode_smileys('rounds_description');
 $data['abcode']['features'] = cs_abcode_features('rounds_description');
 $data['wars']['id'] = $wars_id;
 $data['get']['msg'] = cs_getmsg();
 $tables = 'rounds rnd LEFT JOIN {pre}_maps mps ON rnd.maps_id = mps.maps_id';
 $cells = 'rnd.rounds_id AS rounds_id, rnd.rounds_score1 AS rounds_score1, ';
 $cells .= 'rnd.rounds_score2 AS rounds_score2, mps.maps_name AS maps_name, ';
 $cells .= 'rnd.rounds_order AS rounds_order';
 $sort = 'rnd.rounds_order ASC, rnd.rounds_id ASC';
 $cs_rounds = cs_sql_select(__FILE__, $tables, $cells, 'rnd.wars_id = \'' . $wars_id . '\'', $sort, 0, 0);
 $count = count($cs_rounds);
 if (!empty($cs_rounds)) {
     $data['if']['rounds'] = true;
     $img_up = cs_html_img('symbols/clansphere/up_arrow.png');
     $img_down = cs_html_img('symbols/clansphere/down_arrow.png');
     $run = 0;
     $run2 = 0;
     foreach ($cs_rounds as $round) {
         $run2++;
         $data['maps'][$run]['name'] = $round['maps_name'];
         $data['maps'][$run]['result'] = $round['rounds_score1'] . ' : ' . $round['rounds_score2'];
         $data['maps'][$run]['rounds_id'] = $round['rounds_id'];
         $up = $run2 != 1 ? cs_link($img_up, 'wars', 'rounds', 'id=' . $wars_id . '&amp;up=' . $round['rounds_id']) : '-';
         $down = $run2 != $count ? cs_link($img_down, 'wars', 'rounds', 'id=' . $wars_id . '&amp;down=' . $round['rounds_id']) : '-';
         $data['maps'][$run]['up_down'] = $up . ' ' . $down;
         $run++;
     }
 } else {
     $data['if']['rounds'] = false;
 }
Example #21
0
         $mail = empty($allow) ? '' : $mail;
     }
     $gbook[$run]['icon_mail'] = empty($mail) ? '' : cs_html_link("mailto:{$mail}", cs_icon('mail_generic'));
     $icq = cs_secure($cs_gbook[$run]['users_icq']);
     if (in_array('users_icq', $hidden)) {
         $icq = empty($allow) ? '' : $icq;
     }
     $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']);
Example #22
0
    $matches[2] = $cs_lang['stage_1'] . $cs_lang['stage_1_text'] . cs_html_br(1);
    $matches[2] .= $cs_lang['stage_2'] . $cs_lang['stage_2_text'] . cs_html_br(1);
    $matches[2] .= $cs_lang['stage_3'] . $cs_lang['stage_3_text'] . cs_html_br(1);
    $matches[2] .= $cs_lang['stage_4'] . $cs_lang['stage_4_text'];
    $data['squads']['secure_clip'] = cs_abcode_clip($matches);
    $matches[1] = $cs_lang['pic_infos'];
    $return_types = '';
    foreach ($img_filetypes as $add) {
        $return_types .= empty($return_types) ? $add : ', ' . $add;
    }
    $matches[2] = $cs_lang['max_width'] . $op_squads['max_width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $op_squads['max_height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($op_squads['max_size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['squads']['picup_clip'] = cs_abcode_clip($matches);
    if (empty($cs_squads['squads_picture'])) {
        $data['squads']['current_pic'] = $cs_lang['nopic'];
    } else {
        $place = 'uploads/squads/' . $cs_squads['squads_picture'];
        $size = getimagesize($cs_main['def_path'] . '/' . $place);
        $data['squads']['current_pic'] = cs_html_img($place, $size[1], $size[0]);
        $data['if']['advanced'] = TRUE;
    }
    $data['squads']['id'] = $squads_id;
    echo cs_subtemplate(__FILE__, $data, 'squads', 'edit');
} else {
    $squads_cells = array_keys($cs_squads);
    $squads_save = array_values($cs_squads);
    cs_sql_update(__FILE__, 'squads', $squads_cells, $squads_save, $squads_id);
    cs_redirect($cs_lang['changes_done'], 'squads');
}
Example #23
0
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');
Example #24
0
                $data['cat'][$run]['board'][$board_run]['board_name'] = cs_secure($cs_board[$board_run]['board_name']);
                $data['cat'][$run]['board'][$board_run]['board_order'] = cs_secure($cs_board[$board_run]['board_order']);
                if ($board_run > 0 and $cs_board[$board_run]['board_order'] - 1 >= $cs_board[$board_run - 1]['board_order']) {
                    $data['cat'][$run]['board'][$board_run]['board_up'] = cs_html_img('symbols/clansphere/up_arrow.png') . ' ' . cs_link($cs_lang['up'], 'board', 'sort', 'board=' . $cs_board[$board_run]['board_id'] . '&order=' . $cs_board[$board_run - 1]['board_order']);
                } else {
                    if ($board_run > 0 and $cs_board[$board_run]['board_order'] > 0) {
                        $board_new = $cs_board[$board_run - 1]['board_order'] - 1 > 0 ? $cs_board[$board_run - 1]['board_order'] - 1 : 0;
                        $data['cat'][$run]['board'][$board_run]['board_up'] = cs_html_img('symbols/clansphere/up_arrow.png') . ' ' . cs_link($cs_lang['up'], 'board', 'sort', 'board=' . $cs_board[$board_run]['board_id'] . '&order=' . $board_new);
                    } else {
                        $data['cat'][$run]['board'][$board_run]['board_up'] = '';
                    }
                }
                if ($board_run < $loop_board - 1 and $cs_board[$board_run]['board_order'] + 1 <= $cs_board[$board_run + 1]['board_order']) {
                    $data['cat'][$run]['board'][$board_run]['board_down'] = cs_html_img('symbols/clansphere/down_arrow.png') . ' ' . cs_link($cs_lang['down'], 'board', 'sort', 'board=' . $cs_board[$board_run]['board_id'] . '&order=' . $cs_board[$board_run + 1]['board_order']);
                } else {
                    if ($board_run < $loop_board - 1 and $cs_board[$board_run]['board_order'] < 9999) {
                        $board_new = $cs_board[$board_run + 1]['board_order'] + 1 < 9999 ? $cs_board[$board_run + 1]['board_order'] + 1 : 9999;
                        $data['cat'][$run]['board'][$board_run]['board_down'] = cs_html_img('symbols/clansphere/down_arrow.png') . ' ' . cs_link($cs_lang['down'], 'board', 'sort', 'board=' . $cs_board[$board_run]['board_id'] . '&order=' . $board_new);
                    } else {
                        $data['cat'][$run]['board'][$board_run]['board_down'] = '';
                    }
                }
            }
        } else {
            $data['cat'][$run]['board'] = array();
        }
    }
} else {
    $data['cat'] = '';
}
echo cs_subtemplate(__FILE__, $data, 'board', 'sort');
Example #25
0
        $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');
Example #26
0
settype($files_id, 'integer');
$mirror_id = isset($_REQUEST['target']) ? $_REQUEST['target'] : 0;
settype($mirror_id, 'integer');
$from = 'files';
$select = 'files_count, files_name, files_mirror';
$where = "files_id = '" . $files_id . "'";
$cs_files = cs_sql_select(__FILE__, $from, $select, $where, 0, 0, 1);
$files_loop = count($cs_files);
if (!empty($files_loop)) {
    $files_count = $cs_files['files_count'];
    $files_mirror = $cs_files['files_mirror'];
    $temp_mirror1 = explode("-----", $files_mirror);
    $mirror = explode("\n", $temp_mirror1[$mirror_id]);
    $files_count = $files_count + 1;
    $files_cells = array('files_count');
    $files_save = array($files_count);
    cs_sql_update(__FILE__, 'files', $files_cells, $files_save, $files_id);
    if (empty($advanced) and isset($mirror[1])) {
        header('Location: ' . $mirror[1]);
    } elseif (!empty($advanced)) {
        $data['file']['wait'] = cs_html_img('symbols/files/wait.gif', 0, 0, 0);
        /*print("<meta http-equiv=refresh content='3; URL=$downloadfile'>");
          header("Content-disposition: attachment; filename = $downloadfile");
          header("Content-Type: application/force-download");
          header("Content-Transfer-Encoding: binary");
          header("Pragma: no-cache");
          header("Expires: 0");*/
    }
} else {
    include_once 'mods/errors/404.php';
}
Example #27
0
 $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 : '';
 $data['abcode']['features'] = cs_abcode_features('users_info');
Example #28
0
<?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');
Example #29
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('banners');
$cs_get = cs_get('catid');
$cs_option = cs_sql_option(__FILE__, 'banners');
$data = array();
$where = empty($cs_get['catid']) ? 0 : 'categories_id = ' . $cs_get['catid'];
$data['banners'] = cs_sql_select(__FILE__, 'banners', 'banners_picture, banners_alt, banners_url', $where, 'banners_order ASC', 0, $cs_option['max_navlist']);
$banners_loop = count($data['banners']);
if (empty($data['banners'])) {
    echo $cs_lang['no_banners'];
} else {
    for ($run = 0; $run < $banners_loop; $run++) {
        $go = cs_secure($data['banners'][$run]['banners_picture']);
        $picture = cs_html_img($go, 0, 0, " style=\"margin-bottom:4px\"", cs_secure($data['banners'][$run]['banners_alt']));
        $data['banners'][$run]['image'] = cs_html_link('http://' . cs_secure($data['banners'][$run]['banners_url']), $picture) . ' ';
    }
    echo cs_subtemplate(__FILE__, $data, 'banners', 'navlist');
}
Example #30
0
 $order = 'mem.members_order ASC, usr.users_nick ASC';
 $cs_members = cs_sql_select(__FILE__, $from, $select, $where, $order, 0, 0);
 $members_loop = count($cs_members);
 if (empty($cs_squads[$sq_run]['squads_picture'])) {
     $data['members'][$sq_run]['pic'] = $cs_lang['nopic'];
 } else {
     $place = 'uploads/squads/' . $cs_squads[$sq_run]['squads_picture'];
     $size = getimagesize($cs_main['def_path'] . '/' . $place);
     $data['members'][$sq_run]['pic'] = cs_html_img($place, $size[1], $size[0]);
 }
 $id = 'id=' . $cs_squads[$sq_run]['squads_id'];
 $squads_name = cs_secure($cs_squads[$sq_run]['squads_name']);
 $data['members'][$sq_run]['name'] = cs_link($squads_name, 'squads', 'view', $id);
 if (!empty($cs_squads[$sq_run]['games_id'])) {
     if (file_exists('uploads/games/' . $cs_squads[$sq_run]['games_id'] . '.gif')) {
         $data['members'][$sq_run]['icon'] = cs_html_img('uploads/games/' . $cs_squads[$sq_run]['games_id'] . '.gif');
     } else {
         $data['members'][$sq_run]['icon'] = '';
     }
     $where = "games_id = '" . $cs_squads[$sq_run]['games_id'] . "'";
     $cs_game = cs_sql_select(__FILE__, 'games', 'games_name, games_id', $where);
     $id = 'id=' . $cs_game['games_id'];
     $data['members'][$sq_run]['game'] = ' ' . cs_link($cs_game['games_name'], 'games', 'view', $id);
     $data['members'][$sq_run]['if']['game'] = TRUE;
 } else {
     $data['members'][$sq_run]['if']['game'] = FALSE;
     $data['members'][$sq_run]['game'] = ' - ';
     $data['members'][$sq_run]['icon'] = '';
 }
 if (empty($members_loop)) {
     $data['loop']['squad_members'] = '';