Beispiel #1
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
$cs_post = cs_post('where,start,sort');
$cs_get = cs_get('where,start,sort');
$data = array();
if (!empty($_GET['active'])) {
    cs_sql_update(__FILE__, 'gbook', array('gbook_lock'), array('1'), (int) $_GET['active']);
    cs_redirectmsg($cs_lang['active_done']);
}
if (!empty($_GET['deactive'])) {
    cs_sql_update(__FILE__, 'gbook', array('gbook_lock'), array('0'), (int) $_GET['deactive']);
    cs_redirectmsg($cs_lang['deactive_done']);
}
$id = empty($cs_get['where']) ? 0 : $cs_get['where'];
if (!empty($cs_post['where'])) {
    $id = $cs_post['where'];
}
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$sort = empty($cs_get['sort']) ? 1 : $cs_get['sort'];
if (!empty($cs_post['sort'])) {
    $sort = $cs_post['sort'];
}
$cs_sort[1] = 'gbk.gbook_time DESC';
$cs_sort[2] = 'gbk.gbook_time ASC';
$cs_sort[3] = 'usr.users_email DESC';
Beispiel #2
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery', 1);
$cs_post = cs_post('id');
$cs_get = cs_get('id');
$data = array();
require_once 'mods/gallery/functions.php';
$gallery_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $gallery_id = $cs_post['id'];
}
settype($gallery_id, 'integer');
$edit = cs_sql_select(__FILE__, 'usersgallery', '*', "usersgallery_id = '" . (int) $gallery_id . "'");
$cs_option = cs_sql_option(__FILE__, 'gallery');
$gallery_count_reset = 0;
$new_time = 0;
if (isset($_POST['submit'])) {
    $edit['usersgallery_titel'] = $_POST['gallery_titel'];
    $edit['folders_id'] = empty($_POST['folders_name']) ? $_POST['folders_id'] : make_folders_create('usersgallery', $_POST['folders_name'], $account['users_id']);
    $edit['usersgallery_access'] = $_POST['gallery_access'];
    $edit['usersgallery_status'] = $_POST['gallery_status'];
    $edit['usersgallery_description'] = $_POST['gallery_description'];
    $edit['usersgallery_vote'] = isset($_POST['gallery_vote']) ? $_POST['gallery_vote'] : 0;
    if (!empty($_POST['new_time'])) {
        $edit['usersgallery_time'] = cs_time();
    }
    if (!empty($_POST['gallery_count_reset'])) {
        $edit['usersgallery_count'] = 0;
    }
Beispiel #3
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('linkus');
$cs_post = cs_post('start,sort');
$cs_get = cs_get('start,sort');
$data = array();
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$sort = empty($cs_get['sort']) ? 2 : $cs_get['sort'];
if (!empty($cs_post['sort'])) {
    $sort = $cs_post['sort'];
}
$cs_sort[1] = 'linkus_name DESC';
$cs_sort[2] = 'linkus_name ASC';
$cs_sort[3] = 'linkus_banner DESC';
$cs_sort[4] = 'linkus_banner ASC';
$order = $cs_sort[$sort];
$linkus_count = cs_sql_count(__FILE__, 'linkus');
$data['head']['count'] = $linkus_count;
$data['head']['pages'] = cs_pages('linkus', 'manage', $linkus_count, $start, 0, $sort);
$data['head']['getmsg'] = cs_getmsg();
$data['sort']['name'] = cs_sort('linkus', 'manage', $start, 0, 1, $sort);
$data['sort']['banner'] = cs_sort('linkus', 'manage', $start, 0, 3, $sort);
$select = 'linkus_id, linkus_name, linkus_banner';
$data['linkus'] = cs_sql_select(__FILE__, 'linkus', $select, 0, $order, $start, $account['users_limit']);
$linkus_loop = count($data['linkus']);
for ($run = 0; $run < $linkus_loop; $run++) {
Beispiel #4
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery', 1);
$cs_post = cs_post('id,cat_id,start');
$cs_get = cs_get('id_cat_id,start');
$data = array();
$id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $id = $cs_post['id'];
}
$cat_id = empty($cs_get['cat_id']) ? 0 : $cs_get['cat_id'];
if (!empty($cs_post['cat_id'])) {
    $cat_id = $cs_post['cat_id'];
}
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
require_once 'mods/gallery/functions.php';
$options = cs_sql_option(__FILE__, 'gallery');
$cols = $options['cols'];
$rows = $options['rows'];
$cols_rows = $account['users_limit'];
$access_id = $account['access_usersgallery'];
$data['lang']['getmsg'] = cs_getmsg();
$data['data']['addons'] = cs_addons('users', 'view', $id, 'usersgallery');
if (!empty($id)) {
    if (empty($cat_id)) {
        $from = 'usersgallery';
Beispiel #5
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('files');
$cs_post = cs_post('fid');
$cs_get = cs_get('id');
$fid = empty($cs_post['fid']) ? 0 : $cs_post['fid'];
$quote_id = empty($cs_get['id']) ? 0 : $cs_get['id'];
$cs_files = cs_sql_select(__FILE__, 'files', 'files_close', "files_id = '" . $fid . "'");
require_once 'mods/comments/functions.php';
cs_commments_create($fid, 'files', 'view', $quote_id, $cs_lang['mod_name'], $cs_files['files_close']);
Beispiel #6
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
$cs_post = cs_post('id,from');
$cs_get = cs_get('id,from');
$data = array();
$from = 'list';
$id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $id = $cs_post['id'];
}
if (!empty($_POST['from'])) {
    $from = $_POST['from'];
} elseif (!empty($_GET['from'])) {
    $from = $_GET['from'];
}
$from = cs_secure($from, 0, 0, 0, 0, 0);
$cs_options = cs_sql_option(__FILE__, 'gbook');
$users_id = $account['users_id'];
$error = '';
$ip = cs_getip();
//check if user exists
if ($id != 0) {
    $users_check = cs_sql_count(__FILE__, 'users', "users_id = '" . (int) $id . "'");
    if (empty($users_check)) {
        cs_redirect($cs_lang['user_not_exist'], 'gbook', 'list');
    }
    if ($users_id == 0) {
        $error .= $cs_lang['error_login'] . cs_html_br(1);
Beispiel #7
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
$cs_post = cs_post('start');
$cs_get = cs_get('start');
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$gbook_count = cs_sql_count(__FILE__, 'gbook', "gbook_users_id = '0' AND gbook_lock = '1'");
$data['head']['entry'] = cs_link($cs_lang['submit'], 'gbook', 'entry', 'id=0&amp;from=list');
$data['head']['count'] = $gbook_count;
$data['head']['pages'] = cs_pages('gbook', 'list', $gbook_count, $start);
$data['head']['getmsg'] = cs_getmsg();
$from = 'gbook gbk LEFT JOIN {pre}_users usr ON gbk.users_id = usr.users_id';
$select = 'gbk.gbook_id AS gbook_id, gbk.users_id AS users_id, gbk.gbook_time AS gbook_time, gbk.gbook_nick AS gbook_nick, ';
$select .= 'gbk.gbook_email AS gbook_email, gbk.gbook_icq AS gbook_icq, gbk.gbook_jabber AS gbook_jabber, gbk.gbook_skype AS gbook_skype, ';
$select .= 'gbk.gbook_url AS gbook_url, gbk.gbook_town AS gbook_town, gbk.gbook_text AS gbook_text, gbk.gbook_ip AS gbook_ip, ';
$select .= 'usr.users_nick AS users_nick, usr.users_place AS users_place, usr.users_icq AS users_icq, usr.users_jabber AS users_jabber, ';
$select .= 'usr.users_skype AS users_skype, usr.users_email AS users_email, usr.users_url AS users_url, usr.users_hidden AS users_hidden, usr.users_active AS users_active, usr.users_delete AS users_delete';
$where = "gbook_users_id = '0' AND gbook_lock = '1'";
$order = 'gbk.gbook_id DESC';
$cs_gbook = cs_sql_select(__FILE__, $from, $select, $where, $order, $start, $account['users_limit']);
$gbook_loop = count($cs_gbook);
$c = 0;
for ($run = 0; $run < $gbook_loop; $run++) {
    $entry_count = $gbook_count - $start - $c;
    $c++;
    $gbook[$run]['entry_count'] = $entry_count;
Beispiel #8
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('ajax');
$cs_post = cs_post('ajax_reload');
$files = cs_files();
if (!empty($cs_post['submit'])) {
    $errors = '';
    if (!empty($files['loading']['tmp_name'])) {
        $ext = strtolower(substr(strrchr($files['loading']['name'], '.'), 1));
        if ($ext != 'gif') {
            $errors .= cs_html_br(1) . '- ' . $cs_lang['ext_only_gif'];
        }
    }
    if (empty($errors)) {
        if (!empty($files['loading']['tmp_name'])) {
            cs_upload('ajax', 'loading.gif', $files['loading']['tmp_name']);
        }
        if (empty($cs_post['ajax'])) {
            $cs_post['ajax_reload'] = 0;
        }
        require_once 'mods/clansphere/func_options.php';
        $save = array();
        $save['ajax'] = empty($cs_post['ajax']) ? '0' : (int) $cs_post['for'];
        $save['ajax_reload'] = $cs_post['ajax_reload'];
        cs_optionsave('clansphere', $save);
        # clear cache to not run into trouble on ajax changes
        cs_cache_clear();
        cs_redirect($cs_lang['success'], 'options', 'roots');
    }
Beispiel #9
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery');
$cs_post = cs_post('where,access,start,sort');
$cs_get = cs_get('where,access,start,sort');
$data = array();
$folders_id = empty($cs_get['where']) ? 0 : $cs_get['where'];
if (!empty($cs_post['where'])) {
    $folders_id = $cs_post['where'];
}
$access_id = empty($cs_get['access']) ? 0 : $cs_get['access'];
if (!empty($cs_post['access'])) {
    $access_id = $cs_post['access'];
}
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
$sort = empty($cs_get['sort']) ? 2 : $cs_get['sort'];
if (!empty($cs_post['sort'])) {
    $sort = $cs_post['sort'];
}
require_once 'mods/gallery/functions.php';
$options = cs_sql_option(__FILE__, 'gallery');
$where = 0;
if (!empty($folders_id) and empty($access_id)) {
    $where = "folders_id = '" . cs_sql_escape($folders_id) . "'";
} elseif (!empty($access_id) and empty($folders_id)) {
    $where = "gallery_access = '" . cs_sql_escape($access_id) . "'";
Beispiel #10
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery');
$cs_post = cs_post('where,folders_id');
$cs_get = cs_get('where,folders_id');
$data = array();
$gid = empty($cs_get['where']) ? 0 : $cs_get['where'];
if (!empty($cs_post['where'])) {
    $gid = $cs_post['where'];
}
$folder_id = empty($cs_get['folders_id']) ? 0 : $cs_get['folders_id'];
if (!empty($cs_post['folders_id'])) {
    $folder_id = $cs_post['folders_id'];
}
require_once 'mods/gallery/functions.php';
$time = cs_time();
$voted_ip = cs_getip();
$exp = extension_loaded('gd');
$option = cs_sql_option(__FILE__, 'gallery');
$id = empty($gid) ? $folder_id : $gid;
$select = 'gallery_id, gallery_name, gallery_titel, gallery_description, ';
$select .= 'gallery_time, gallery_vote, gallery_count, folders_id, users_id';
$where = 'gallery_id = ' . $id . ' AND gallery_status = 1 AND gallery_access <=' . $account['access_gallery'];
$cs_gallery = cs_sql_select(__FILE__, 'gallery', $select, $where);
$gallery_loop = count($cs_gallery);
if (empty($gallery_loop)) {
    $data['head']['error'] = cs_link($cs_lang['mod_name'], 'gallery', 'list') . ' - ' . $cs_lang['head_view'];
    echo cs_subtemplate(__FILE__, $data, 'gallery', 'error');
} else {
Beispiel #11
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('news');
$data = array();
$cs_post = cs_post('where');
$cs_get = cs_get('where');
require_once 'mods/categories/functions.php';
$cat_id = empty($cs_get['where']) ? 0 : $cs_get['where'];
if (!empty($cs_post['where'])) {
    $cat_id = $cs_post['where'];
}
$cs_option = cs_sql_option(__FILE__, 'news');
$abcode = explode(",", $cs_option['abcode']);
$where = "nws.news_public = 1 AND cat.categories_access <= " . $account['access_news'];
if (!empty($cat_id)) {
    $cat_where = 'categories_subid = ' . $cat_id;
    $categories = cs_sql_select(__FILE__, 'categories', 'categories_id', $cat_where, 0, 0, 0);
    if (!empty($categories)) {
        $where .= " AND (cat.categories_id = '" . $cat_id . "'";
        for ($a = 0; $a < count($categories); $a++) {
            $where .= " OR cat.categories_id = '" . $categories[$a]['categories_id'] . "'";
        }
        $where .= ")";
    } else {
        $where .= " AND cat.categories_id = '" . $cat_id . "'";
    }
}
$start = empty($_REQUEST['start']) ? 0 : (int) $_REQUEST['start'];
$data['cats']['dropdown'] = cs_categories_dropdown2('news', $cat_id, 0, 'where');
Beispiel #12
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gallery', 1);
$cs_post = cs_post('id,cat_id,more,move');
$cs_get = cs_get('id_cat_id,more,move');
$id = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $id = $cs_post['id'];
}
$cat_id = empty($cs_get['cat_id']) ? 0 : $cs_get['cat_id'];
if (!empty($cs_post['cat_id'])) {
    $cat_id = $cs_post['cat_id'];
}
$detail = empty($cs_get['more']) ? 0 : $cs_get['more'];
if (!empty($cs_post['more'])) {
    $more = $cs_post['more'];
}
$move = empty($cs_get['move']) ? 0 : $cs_get['move'];
if (!empty($cs_post['move'])) {
    $move = $cs_post['move'];
}
$access_id = $account['access_usersgallery'];
$cs_options = cs_sql_option(__FILE__, 'gallery');
$data['data']['addons'] = cs_addons('users', 'view', $id, 'usersgallery');
$data['if']['error'] = FALSE;
$data['if']['view'] = FALSE;
$data['if']['details'] = FALSE;
$data['if']['vote'] = FALSE;
$select = 'usersgallery_id , usersgallery_name, usersgallery_titel, usersgallery_download, ';
Beispiel #13
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('access');
$cs_post = cs_post();
$access_id = empty($_REQUEST['id']) ? 0 : $_REQUEST['id'];
$data = array();
if (isset($cs_post['submit']) && isset($cs_post['users_nick']) && isset($_REQUEST['id'])) {
    $select = 'users_id, access_id, users_nick, users_delete';
    $where = "users_delete = '0' AND users_nick = '" . $cs_post['users_nick'] . "'";
    $cs_user = cs_sql_select(__FILE__, 'users', $select, $where);
    $errormsg = '';
    $errormsg .= count($cs_user) > 0 ? '' : $cs_lang['user_notfound'] . cs_html_br(1);
    $errormsg .= $cs_user['access_id'] != $access_id ? '' : $cs_lang['user_ingroup'] . cs_html_br(1);
    $errormsg .= $account['users_id'] != $cs_user['users_id'] ? '' : $cs_lang['user_account'] . cs_html_br(1);
    $errormsg .= $access_id > 0 ? '' : $cs_lang['no_access'];
    if (empty($errormsg)) {
        $cs_access_user['access_id'] = $access_id;
        $users_id = $cs_user['users_id'];
        $user_cells = array_keys($cs_access_user);
        $user_save = array_values($cs_access_user);
        cs_sql_update(__FILE__, 'users', $user_cells, $user_save, $users_id);
    }
}
if (!isset($cs_post['submit'])) {
    $data['head']['msg'] = $cs_lang['users_head'];
} elseif (!empty($errormsg)) {
    $data['head']['msg'] = $errormsg;
} else {
    $data['head']['msg'] = $cs_lang['user_added'];
Beispiel #14
0
<?php

// ClanSphere 2010 - www.clansphere.net
// $Id$
$cs_lang = cs_translate('gbook');
$cs_post = cs_post('id,where,start');
$cs_get = cs_get('id,where,sort');
$where = empty($cs_get['id']) ? 0 : $cs_get['id'];
if (!empty($cs_post['id'])) {
    $where = $cs_post['id'];
}
$start = empty($cs_get['start']) ? 0 : $cs_get['start'];
if (!empty($cs_post['start'])) {
    $start = $cs_post['start'];
}
if (empty($where)) {
    $where = empty($cs_get['where']) ? 0 : $cs_get['where'];
    if (!empty($cs_post['where'])) {
        $where = $cs_post['where'];
    }
}
$gbook_count = cs_sql_count(__FILE__, 'gbook', "gbook_users_id = '" . $where . "' AND gbook_lock = 1");
$data['head']['addons'] = cs_addons('users', 'view', $where, 'gbook');
$data['head']['pages'] = cs_pages('gbook', 'users', $gbook_count, $start, $where);
$data['head']['new_entry'] = cs_link($cs_lang['submit'], 'gbook', 'entry', 'id=' . $where);
$data['head']['count'] = $gbook_count;
$data['head']['getmsg'] = cs_getmsg();
$from = 'gbook gbk LEFT JOIN {pre}_users usr ON gbk.users_id = usr.users_id';
$select = 'gbk.gbook_id AS gbook_id, gbk.users_id AS users_id, gbk.gbook_time AS gbook_time, ';
$select .= 'gbk.gbook_nick AS gbook_nick, gbk.gbook_email AS gbook_email, gbk.gbook_icq AS gbook_icq, ';
$select .= 'gbk.gbook_jabber AS gbook_jabber, gbk.gbook_skype AS gbook_skype, gbk.gbook_url AS gbook_url, ';