Ejemplo n.º 1
0
<?php

if (isset($_POST['action']) && $_POST['action'] == 'add-comment') {
    session_start();
    define('IN_MNews', true);
    define('MN_ROOT', './');
    define('MN_LOGGED', false);
    @(include_once './data/databases/config.php');
    include_once './stuff/inc/mn-functions.php';
    $lng = select_lang();
    include_once './stuff/lang/lang_' . $lng . '.php';
    include_once './stuff/inc/mn-definitions.php';
    if (file_exists($file['banned_ips'])) {
        include_once $file['banned_ips'];
    } else {
        $banned_ips = array();
    }
    $mn_users = load_basic_data('users');
    $post = get_post_data($_POST['post_id']);
    $mn_redir = isset($_POST['redir']) && !empty($_POST['redir']) ? $_POST['redir'] : str_replace('&mn_msg=c_added', '', $_SERVER['HTTP_REFERER']);
    $conf['comments_antiflood'] = isset($conf['comments_antiflood']) && is_numeric($conf['comments_antiflood']) ? $conf['comments_antiflood'] : '30';
    if (isset($_SESSION['mn_logged']) && $_SESSION['mn_logged'] && !check_hash()) {
        session_destroy();
        $url_data = explode('/', $conf['admin_url']);
        setcookie('mn_user_hash', '', time() - 3600, '/', $_SERVER['SERVER_NAME']);
        setcookie('mn_logged', '', time() - 3600, '/', $_SERVER['SERVER_NAME']);
        header('location: ' . $mn_redir . '#mn-comment-form');
        exit;
    } elseif (isset($_SESSION['mn_logged']) && !$_SESSION['mn_logged'] && isset($_COOKIE['mn_user_name']) && isset($_COOKIE['mn_user_hash']) && $conf['users_perm_login']) {
        permanent_login();
    } elseif (in_array(@$_POST['comment_author'], $mn_users) || isset($_POST['comment_pass']) && !empty($_POST['comment_pass'])) {
Ejemplo n.º 2
0
                htmlp_select_option($db2->f("code"), 0, $db2->f("ability"));
            }
        }
        if ($tasktype == "other") {
            htmlp_select_option("other", 1, $t->translate("other"));
        } else {
            htmlp_select_option("other", 0, $t->translate("other"));
        }
        htmlp_select_end();
        htmlp_select_end();
        echo "<BR>\n";
        echo $t->translate("Request-Language") . ":<BR>";
        htmlp_select("reqlang");
        echo "\n";
        $reqlang = $db->f("language");
        select_lang($reqlang);
        htmlp_select_end();
        echo "<BR>\n";
        echo "<BR>\n";
        $reqmessage = $db->f("reqmessage");
        echo $t->translate("Content") . ":<BR>";
        htmlp_textarea("reqmessage", 60, 30, "nowrap", 2000, $reqmessage);
        htmlp_form_end();
        $bx->box_body_end();
        $bx->box_end();
    } else {
        $be->box_full($t->translate("Error"), $t->translate("No such Request"));
    }
}
?>
<!-- end content -->
Ejemplo n.º 3
0
    exit;
}
if (isset($_GET["TEMP"])) {
    FormTemplate();
    exit;
}
if (isset($_GET["Zoom-js"])) {
    ZOOM_JS();
    exit;
}
if (isset($_GET["Zoom-popup"])) {
    ZOOM_POPUP();
    exit;
}
if (isset($_GET["Select-lang"])) {
    select_lang();
    exit;
}
if (isset($_GET["headers-js"])) {
    HEADER_JS();
    exit;
}
if (isset($_GET["Headers-popup"])) {
    HEADERS_POPUP();
    exit;
}
if (isset($_GET["preview"])) {
    ZOOM_PREVIEW();
    exit;
}
if (isset($_POST["tpl-remove"])) {
 select_lang(999);
 htmlp_select_end();
 echo "</td></tr>\n";
 echo "<tr><td align=right valign=top width=30%><BR>" . $t->translate("Other languages") . ":</td><td width=70%>\n";
 echo "<table width=90% border=0>\n";
 echo "<tr>";
 echo "<td width=25% valign=top>2. ";
 htmlp_select("other_lang_1");
 echo "\n";
 select_lang(999);
 htmlp_select_end();
 echo "</td>\n";
 echo "<td width=25% valign=top>3. ";
 htmlp_select("other_lang_2");
 echo "\n";
 select_lang(999);
 htmlp_select_end();
 echo "</td>\n";
 echo "</td></tr>\n";
 echo "</table>\n";
 echo "</td></tr>\n";
 echo "</table>\n";
 $bx->box_body_end();
 $bx->box_end();
 $bx->box_begin();
 $bx->box_title($t->translate("Professional Data"));
 $bx->box_body_begin();
 echo "<table border=0 width=100% align=center cellspacing=0 cellpadding=3>\n";
 echo "<tr><td align=right width=30%>" . $t->translate("Profession") . ":</td><td width=70%>\n";
 htmlp_select("profession");
 $db3->query("SELECT * FROM profession");
Ejemplo n.º 5
0
	if(isset($_POST["SquidTemplateSimple"])){SquidTemplateSimple_save();exit;}
	
	if(isset($_GET["status"])){status();exit;}
	if(isset($_GET["template-settings-js"])){template_settings_js();exit;}
	if(isset($_POST["newtemplate"])){TEMPLATE_ADD_SAVE();exit;}
	if(isset($_POST["template_body"])){ZOOM_SAVE();exit;}
	if(isset($_POST["TEMPLATE_DATA"])){TEMPLATE_SAVE();}
	if(isset($_POST["template_header"])){TEMPLATE_HEADER_SAVE();exit;}
	if(isset($_GET["popup"])){popup();exit;}
	if(isset($_GET["tabs"])){tabs();exit;}
	if(isset($_GET["popup-table"])){popup_table();exit;}
	if(isset($_GET["view-table"])){view_table();exit;}
	if(isset($_GET["TEMP"])){FormTemplate();exit;}
	if(isset($_GET["Zoom-js"])){ZOOM_JS();exit;}
	if(isset($_GET["Zoom-popup"])){ZOOM_POPUP();exit;}
	if(isset($_GET["Select-lang"])){select_lang();exit;}
	if(isset($_GET["headers-js"])){HEADER_JS();exit;}
	if(isset($_GET["Headers-popup"])){HEADERS_POPUP();exit;}
	if(isset($_GET["preview"])){ZOOM_PREVIEW();exit;}
	if(isset($_POST["tpl-remove"])){TEMPLATE_REMOVE();exit;}
	if(isset($_GET["new-template"])){TEMPLATE_ADD();exit;}
	if(isset($_POST["ChooseAclsTplSquid"])){TEMPLATE_AFFECT();exit;}
	if(isset($_GET["replace-js"])){REPLACE_JS();exit;}
	if(isset($_GET["replace-popup"])){REPLACE_POPUP();exit;}
	if(isset($_POST["RebuidSquidTplDefault"])){RebuidSquidTplDefault();exit;}
	if(isset($_POST["replace-from"])){REPLACE_PERFORM();exit;}
	if(isset($_GET["import-default-js"])){IMPORT_DEFAULT_JS();exit;}
	if(isset($_POST["ImportDefault"])){DefaultTemplatesInMysql();exit;}
	
js();
Ejemplo n.º 6
0
<?php

# define ROOT
if (!defined('MN_ROOT')) {
    define('MN_ROOT', str_replace('\\', '/', dirname(__FILE__) . '/'));
}
if (is_dir(MN_ROOT . 'data/posts/') && file_exists(MN_ROOT . 'data/databases/config.php')) {
    # everything looks good, let's include some config files, functions, lang file and definitions
    include_once MN_ROOT . 'stuff/inc/mn-definitions.php';
    @(include_once MN_ROOT . 'data/databases/config.php');
    include_once MN_ROOT . 'stuff/inc/mn-functions.php';
    $lng = empty($mn_lang) ? select_lang() : $mn_lang;
    include_once MN_ROOT . 'stuff/lang/lang_' . $lng . '.php';
    if (defined('DEBUG') && DEBUG == true) {
        error_reporting(E_ALL);
    } else {
        error_reporting(0);
    }
    if (file_exists(MN_ROOT . $file['banned_ips'])) {
        include_once MN_ROOT . $file['banned_ips'];
    } else {
        $banned_ips = array();
    }
    # create url, where we want to show posts, page, ...
    if (!empty($mn_url)) {
        $mn_url = $mn_url;
    } elseif (empty($conf['web_url'])) {
        $mn_url = htmlentities($_SERVER['REQUEST_URI']);
    } else {
        $mn_url = $conf['web_url'];
    }
    htmlp_select_end();
    echo "<BR>\n";
    echo $t->translate("What kind of task") . ":<BR>";
    htmlp_select("tasktype");
    $db2->query("SELECT * FROM prog_abilities WHERE translation='{$la}'");
    while ($db2->next_record()) {
        htmlp_select_option($db2->f("code"), 0, $db2->f("ability"));
    }
    htmlp_select_option("other", 1, $t->translate("other"));
    htmlp_select_end();
    htmlp_select_end();
    echo "<BR>\n";
    echo $t->translate("Request-Language") . ":<BR>";
    htmlp_select("reqlang");
    echo "\n";
    select_lang(18);
    htmlp_select_end();
    echo "<BR>\n";
    echo "<BR>\n";
    echo $t->translate("Content") . ":<BR>";
    htmlp_textarea("reqmessage", 60, 30, "nowrap", 2000, "");
    htmlp_form_end();
    $bx->box_body_end();
    $bx->box_end();
}
?>
<!-- end content -->

<?php 
require "./include/footer.inc";
@page_close();
Ejemplo n.º 8
0
$settings[open_cache] = 1;
//(int)$settings[open_cache];
//
require PHPDISK_ROOT . 'includes/class/cache_file.class.php';
$C['gz']['open'] = $settings['gzipcompress'];
phpdisk_core::gzcompress_open();
$arr = phpdisk_core::init_lang_tpl();
$user_tpl_dir = $arr['user_tpl_dir'];
$admin_tpl_dir = $arr['admin_tpl_dir'];
$auth[is_fms] = $arr['fms'];
$C['lang_type'] = $arr['lang_name'];
if ($settings[open_switch_tpls]) {
    $tpl_sw = select_tpl();
}
if ($settings[open_switch_langs]) {
    $langs_sw = select_lang();
    $plang = gpc('lang', 'C', '');
    $C['lang_type'] = $plang ? check_lang($plang) ? $plang : $C['lang_type'] : $C['lang_type'];
}
require PHPDISK_ROOT . 'includes/lib/php-gettext/gettext.inc.php';
_setlocale(LC_MESSAGES, $C['lang_type']);
_bindtextdomain('phpdisk', 'languages');
_bind_textdomain_codeset('phpdisk', $charset);
_textdomain('phpdisk');
$ads_cache = PHPDISK_ROOT . 'system/global/ads.cache.php';
if (file_exists($ads_cache)) {
    require_once $ads_cache;
} else {
    ads_cache();
}
load_active_plugins();
Ejemplo n.º 9
0
    if ($db->Connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)) {
        $check = $db->GetOne("SELECT COUNT(*) FROM `{$tables['user']['name']}` WHERE `LEVEL` = '1' AND `ACTIVE` = '1'");
        if (!empty($check)) {
            $_SESSION['return'] = DOC_ROOT . '/install/index.php';
            @header('Location: ' . DOC_ROOT . '/admin/login.php');
            @exit;
        } else {
            $_SESSION['nologin'] = true;
        }
    }
} else {
    $_SESSION['nologin'] = true;
}
switch ($step) {
    case 1:
        $tpl->assign('languages', select_lang());
        $tpl->assign('btn_next', 1);
        $tpl->assign('title', _L('Select Language'));
        if (empty($_POST['submit'])) {
            //Clear the entire cache
            $tpl->clear_all_cache();
            //Clear all compiled template files
            $tpl->clear_compiled_tpl();
            SmartyValidate::connect($tpl, true);
            SmartyValidate::register_form('install', true);
            SmartyValidate::register_validator('v_language', 'language', 'dummyValid', false, false, 'trim', 'install');
        } else {
            SmartyValidate::connect($tpl);
            if (SmartyValidate::is_valid($_POST, 'install')) {
                $_SESSION['language'] = !empty($_POST['language']) ? $_POST['language'] : 'en';
                SmartyValidate::disconnect();
Ejemplo n.º 10
0
 echo "</td></tr>\n";
 echo "<tr><td align=right valign=top width=30%><BR>" . $t->translate("Other languages") . ":</td><td width=70%>\n";
 echo "<table width=90% border=0>\n";
 echo "<tr>";
 echo "<td width=25% valign=top>2. ";
 $other_lang_1 = $db->f("other_lang_1");
 htmlp_select("other_lang_1");
 echo "\n";
 select_lang($other_lang_1);
 $other_lang_2 = $db->f("other_lang_2");
 htmlp_select_end();
 echo "</td>\n";
 echo "<td width=25% valign=top>3. ";
 htmlp_select("other_lang_2");
 echo "\n";
 select_lang($other_lang_2);
 htmlp_select_end();
 echo "</td>\n";
 echo "</td></tr>\n";
 echo "</table>\n";
 echo "</td></tr>\n";
 echo "</table>\n";
 $bx->box_body_end();
 $bx->box_end();
 $bx->box_begin();
 $bx->box_title($t->translate("Professional Data"));
 $bx->box_body_begin();
 echo "<table border=0 width=100% align=center cellspacing=0 cellpadding=3>\n";
 $profession = $db->f("profession");
 echo "<tr><td align=right width=30%>" . $t->translate("Profession") . ":</td><td width=70%>\n";
 htmlp_select("profession");