Ejemplo n.º 1
0
include "pdo.php";
include "functions.php";
if (!empty($_POST['trans'])) {
    $curlang = $_POST['lang'];
    foreach ($_POST as $item => $values) {
        if ($item == 'trans') {
            continue;
        }
        $sql = "UPDATE lang SET {$item}='{$values}' WHERE lang='{$curlang}'";
        $update = $dbPdo->exec($sql);
    }
}
if (!isset($_SESSION['lang'])) {
    $lang = selLang();
} else {
    $lang = selLang($_SESSION['lang']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title><?php 
echo $lang['translation'];
?>
</title>
</head>
<body background='bg.jpg'>
<form action="" method="post">
<table align='center' width='760' border='10' bordercolor='lightblue' background='bgtable.jpg' cellpadding='10' cellspacing='0'>
<tr width='100%'>
<td colspan='2'>
Ejemplo n.º 2
0
if (!isset($_SESSION['name'])) {
    include 'aunt.php';
    include 'menu.php';
} else {
    echo $lang['user'] . " <a href='index.php?profile=" . $_SESSION['name'] . "'>" . $_SESSION['name'] . "</a>";
    include 'menu.php';
}
include 'countuser.php';
?>
		</div>
		</td>	
		<!--вміст-->
		<td width='640' valign='top'>
		<?php 
if (isset($_GET['lang'])) {
    $lang = selLang($_GET['lang']);
    if (!strstr($_SERVER['HTTP_REFERER'], 'lang')) {
        header("Location: {$_SERVER['HTTP_REFERER']}");
    }
}
//del all rating
if (!empty($_GET['delrating']) and $_SESSION['status'] == '3') {
    delAllRating($_GET['delrating']);
}
//role edit
if (isset($_GET['sendrole']) and isset($_SESSION['status']) and $_SESSION['status'] == '3' and $_GET['user'] != 'root') {
    role($_GET['user'], $_GET['role']);
}
//exit and ref-profile
if (isset($_SESSION['name'])) {
    include "exit.php";