Esempio n. 1
0
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
} elseif (isset($_POST['preview'])) {
    $data['head']['body'] = $cs_lang['preview'];
}
if (isset($_POST['preview']) and empty($error)) {
    $data['if']['preview'] = TRUE;
    $data['preview']['date'] = cs_date('unix', $history['history_time'], 1);
    $cs_user = cs_sql_select(__FILE__, 'users', 'users_nick, users_active', "users_id = '" . $history['users_id'] . "'");
    $data['preview']['user'] = cs_user($history['users_id'], $cs_user['users_nick'], $cs_user['users_active']);
    $data['preview']['text'] = cs_secure($history['history_text'], 1, 1, 1, 1);
}
if (!empty($error) or !isset($_POST['submit']) or isset($_POST['preview'])) {
    if (empty($cs_main['rte_html'])) {
        $data['if']['no_rte_html'] = 1;
        $data['history']['abcode_smileys'] = cs_abcode_smileys('history_text', 1);
        $data['history']['abcode_features'] = cs_abcode_features('history_text', 1, 1);
        $data['history']['text'] = $history['history_text'];
        $data['if']['rte_html'] = 0;
    } else {
        $data['if']['rte_html'] = 1;
        $data['if']['no_rte_html'] = 0;
        $data['history']['rte_html'] = cs_rte_html('history_text', $history['history_text']);
    }
    echo cs_subtemplate(__FILE__, $data, 'history', 'create');
} else {
    $history_cells = array_keys($history);
    $history_save = array_values($history);
    cs_sql_insert(__FILE__, 'history', $history_cells, $history_save);
    cs_redirect($cs_lang['create_done'], 'history');
}
Esempio n. 2
0
    if (function_exists('stream_encoding')) {
        stream_encoding($fp, $cs_main['charset']);
    }
    fwrite($fp, $content);
    chmod($filename, 0755);
    fclose($fp);
    if ($account['access_wizard'] == 5) {
        $wizard = cs_sql_count(__FILE__, 'options', "options_name = 'done_cont' AND options_value = '1'");
        if (empty($wizard)) {
            $data['if']['wizzard'] = TRUE;
        }
    }
}
if (!empty($imp_form)) {
    $data = array();
    $data['imprint']['content'] = file_exists($filename) ? $imprint[1] : '';
    if (empty($cs_main['rte_html'])) {
        $data['if']['abcode'] = TRUE;
        $data['if']['rte_html'] = FALSE;
        $data['abcode']['features'] = cs_abcode_features('imprint', 1, 1);
    } else {
        $data['if']['abcode'] = FALSE;
        $data['if']['rte_html'] = TRUE;
        $data['rte']['html'] = cs_rte_html('imprint', $data['imprint']['content']);
    }
    $data['if']['done'] = FALSE;
    $data['if']['form'] = TRUE;
    $data['if']['wizzard'] = FALSE;
}
$data['url']['contact_imp_edit'] = cs_url('contact', 'imp_edit');
echo cs_subtemplate(__FILE__, $data, 'contact', 'imp_edit');
Esempio n. 3
0
        $data['mirror'][$tpl_run]['news_mirror'] = $cs_news["news_mirror_{$num}"];
        $data['mirror'][$tpl_run]['news_mirror_name'] = $cs_news["news_mirror_name_{$num}"];
        $tpl_run++;
    }
    if (empty($cs_main['rte_html'])) {
        $data['abcode']['features'] = cs_abcode_features('news_text', $abcode[3], 1);
        $data['abcode']['smileys'] = cs_abcode_smileys('news_text', 1);
        $data['abcode']['features_readmore'] = cs_abcode_features('news_readmore', $abcode[3], 1);
        $data['abcode']['smileys_readmore'] = cs_abcode_smileys('news_readmore', 1);
        $data['if']['rte_html'] = false;
        $data['if']['abcode'] = true;
    } else {
        $data['if']['rte_html'] = true;
        $data['if']['abcode'] = false;
        $data['rte']['html'] = cs_rte_html('news_text', $cs_news['news_text']);
        $data['rte']['html_readmore'] = cs_rte_html('news_readmore', $cs_news['news_readmore']);
    }
    $data['news']['loop'] = $run_loop;
    $data['news']['news_readmore_active'] = $cs_news['news_readmore_active'] == 1 ? 'checked="checked"' : '';
    $data['news']['news_close'] = $cs_news['news_close'] == 1 ? 'checked="checked"' : '';
    $data['news']['news_public'] = $cs_news['news_public'] == 1 ? 'checked="checked"' : '';
    $data['news']['news_attached'] = $cs_news['news_attached'] == 1 ? 'checked="checked"' : '';
    $data['news']['check_publish'] = !empty($cs_news['news_publishs_at']) ? 'checked="checked"' : '';
    $data['news']['news_publishs_at'] = cs_dateselect('date', 'unix', !empty($cs_news['news_publishs_at']) ? $cs_news['news_publishs_at'] : cs_time(), 1995);
    echo cs_subtemplate(__FILE__, $data, 'news', 'create');
} else {
    $news_cells = array_keys($cs_news);
    $news_save = array_values($cs_news);
    cs_sql_insert(__FILE__, 'news', $news_cells, $news_save);
    cs_cache_delete('news_publish');
    if (!empty($cs_news['news_public'])) {
Esempio n. 4
0
        $cs_static_tpl['static']['table'] = $sel;
        $static_edit['static_comments'] == '1' ? $sel = 'checked="checked"' : ($sel = '');
        $cs_static_tpl['static']['comments'] = $sel;
        if ($account['access_static'] < 5) {
            $cs_static_tpl['if']['access_php'] = FALSE;
            $cs_static_tpl['if']['access_admin'] = FALSE;
        } else {
            $cs_static_tpl['if']['access_php'] = TRUE;
            $cs_static_tpl['if']['access_admin'] = TRUE;
            $cs_static_tpl['check']['admin'] = empty($static_edit['static_admins']) ? '' : 'checked="checked"';
        }
        $cs_static_tpl['static']['id'] = $static_edit['static_id'];
        $cs_static_tpl['static']['lang_form'] = $cs_lang['edit'];
        if (empty($cs_main['rte_html'])) {
            $cs_static_tpl['if']['rte_html'] = 0;
            $cs_static_tpl['if']['no_rte_html'] = 1;
            $cs_static_tpl['abcode']['features'] = cs_abcode_features('static_text', 1, 1);
            $cs_static_tpl['static']['content'] = cs_secure($cs_static_tpl['static']['content']);
        } else {
            $cs_static_tpl['if']['rte_html'] = 1;
            $cs_static_tpl['if']['no_rte_html'] = 0;
            $cs_static_tpl['static']['content'] = cs_rte_html('static_text', $cs_static_tpl['static']['content']);
        }
        echo cs_subtemplate(__FILE__, $cs_action_head, 'static', 'action_head');
        echo cs_subtemplate(__FILE__, $cs_static_tpl, 'static', 'action_form');
    }
} else {
    $cs_action_head['head']['action'] = $cs_lang['edit'];
    $cs_action_head['head']['body'] = $cs_lang['no_access'];
    echo cs_subtemplate(__FILE__, $cs_action_head, 'static', 'action_head');
}
Esempio n. 5
0
} elseif (!empty($error)) {
    $data['head']['body'] = $error;
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $cs_events;
    $data['categories']['dropdown'] = cs_categories_dropdown('events', $cs_events['categories_id']);
    $data['select']['time'] = cs_dateselect('time', 'unix', $cs_events['events_time'], 1995);
    if (empty($cs_main['rte_html'])) {
        $data['if']['abcode'] = TRUE;
        $data['if']['rte_html'] = FALSE;
        $data['abcode']['smileys'] = cs_abcode_smileys('events_more', 1);
        $data['abcode']['features'] = cs_abcode_features('events_more', 1, 1);
    } else {
        $data['if']['abcode'] = FALSE;
        $data['if']['rte_html'] = TRUE;
        $data['rte']['html'] = cs_rte_html('events_more', $cs_events['events_more']);
    }
    $selected = 'selected="selected"';
    $data['check']['multi_no'] = $_POST['events_multi'] == 'no' ? $selected : '';
    $data['check']['multi_yes'] = $_POST['events_multi'] == 'yes' ? $selected : '';
    $data['data']['events_multix'] = $_POST['events_multix'];
    $checked = 'checked="checked"';
    $data['check']['close'] = empty($cs_events['events_close']) ? '' : $checked;
    $data['check']['cancel'] = empty($cs_events['events_cancel']) ? '' : $checked;
    echo cs_subtemplate(__FILE__, $data, 'events', 'create');
} else {
    settype($cs_events['events_guestsmin'], 'integer');
    settype($cs_events['events_guestsmax'], 'integer');
    settype($cs_events['events_needage'], 'integer');
    $events_cells = array_keys($cs_events);
    $events_save = array_values($cs_events);
Esempio n. 6
0
}
if (!empty($error) or !isset($_POST['submit'])) {
    $data['data'] = $cs_links;
    $data['cat']['dropdown'] = cs_categories_dropdown('links', $cs_links['categories_id']);
    $linksstat[0]['links_stats'] = 'on';
    $linksstat[0]['name'] = $cs_lang['online'];
    $linksstat[1]['links_stats'] = 'off';
    $linksstat[1]['name'] = $cs_lang['offline'];
    $data['status']['dropdown'] = cs_dropdown('links_stats', 'name', $linksstat, $cs_links['links_stats']);
    if (empty($cs_main['rte_html'])) {
        $data['if']['abcode'] = TRUE;
        $data['abcode']['smileys'] = cs_abcode_smileys('links_info', 1);
        $data['abcode']['features'] = cs_abcode_features('links_info', 1, 1);
    } else {
        $data['if']['rte_html'] = TRUE;
        $data['rte']['html'] = cs_rte_html('links_info', $cs_links['links_info']);
    }
    $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'] . $img_max['width'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_height'] . $img_max['height'] . ' px' . cs_html_br(1);
    $matches[2] .= $cs_lang['max_size'] . cs_filesize($img_max['size']) . cs_html_br(1);
    $matches[2] .= $cs_lang['filetypes'] . $return_types;
    $data['picup']['clip'] = cs_abcode_clip($matches);
    $data['check']['sponsor'] = empty($cs_links['links_sponsor']) ? '' : 'checked="checked"';
    echo cs_subtemplate(__FILE__, $data, 'links', 'create');
} else {
    $cells = array_keys($cs_links);
Esempio n. 7
0
    $data['head']['body'] = $error;
} elseif (isset($_POST['preview'])) {
    $data['head']['body'] = $cs_lang['preview'];
}
if (isset($_POST['preview']) and empty($error)) {
    $data['if']['preview'] = true;
    $data['preview']['question'] = cs_secure($_POST['faq_frage']);
    $data['preview']['answer'] = cs_secure($faq_antwort, 1, 1, 1, 1);
}
if (!empty($error) or isset($_POST['preview']) or !isset($_POST['submit'])) {
    $data['faq']['cat'] = cs_categories_dropdown('faq', $categories_id);
    $data['faq']['frage'] = $faq_frage;
    if (empty($cs_main['rte_html'])) {
        $data['abcode']['smileys'] = cs_abcode_smileys('faq_antwort', 1);
        $data['abcode']['features'] = cs_abcode_features('faq_antwort', 1, 1);
        $data['if']['rte_html'] = FALSE;
        $data['if']['no_rte_html'] = TRUE;
        $data['faq']['antwort'] = $faq_antwort;
    } else {
        $data['if']['rte_html'] = TRUE;
        $data['if']['no_rte_html'] = FALSE;
        $data['faq']['content'] = cs_rte_html('faq_antwort', $faq_antwort);
    }
    $data['faq']['id'] = $faq_id;
    echo cs_subtemplate(__FILE__, $data, 'faq', 'edit');
} else {
    $faq_cells = array('faq_question', 'faq_answer', 'categories_id');
    $faq_save = array($faq_frage, $faq_antwort, $categories_id);
    cs_sql_update(__FILE__, 'faq', $faq_cells, $faq_save, $faq_id);
    cs_redirect($cs_lang['changes_done'], 'faq');
}
Esempio n. 8
0
        if (!empty($files['picture'])) {
            cs_pictures_upload($files['picture'], 'articles', $articles_id);
        }
        cs_redirect($cs_lang['create_done'], 'articles');
    } else {
        $data['head']['body'] = $errormsg;
    }
} else {
    $data['art']['articles_com'] = '';
    $data['art']['articles_navlist'] = '';
    $data['art']['articles_fornext'] = '';
    $data['art']['articles_headline'] = '';
    $data['art']['articles_text'] = '';
    $data['art']['articles_time'] = cs_time();
    $data['art']['users_id'] = $account['users_id'];
    $data['art']['categories_id'] = 0;
}
$categories_id = empty($data['art']['categories_id']) ? 0 : $data['art']['categories_id'];
$data['categories']['dropdown'] = cs_categories_dropdown('articles', $categories_id);
$data['pictures']['select'] = cs_pictures_select('articles');
$on = "onclick=\"javascript:abc_insert";
if (empty($cs_main['rte_html'])) {
    $data['if']['rte_html'] = 0;
    $data['if']['no_rte_html'] = 1;
    $data['abcode']['features'] = cs_abcode_features('articles_text', 1, 1);
} else {
    $data['if']['rte_html'] = 1;
    $data['if']['no_rte_html'] = 0;
    $data['articles']['content'] = cs_rte_html('articles_text', $data['art']['articles_text']);
}
echo cs_subtemplate(__FILE__, $data, 'articles', 'create');