View file adm/edittheme.php

File size: 942B
<?php
include_once "../config.php";
include_once "../inc/inc.php";
include_once "../inc/func.php";
include_once "../inc/user.php";
if ($dostup != '1') {
    echo "ПАШШШШШШШОЛНАХУЙ";
    include_once "../themes/$theme/foot.php";
    exit;
} else {
    $thema = (int)$thema;
    $naz = htmlspecialchars(stripslashes($naz));
    $query = 'UPDATE ' . $pref . 'tema SET name_tema = "' . $naz . '" WHERE id=' . $thema;
    $result = mysql_query($query);
    $query = "SELECT * FROM " . $pref . "forum WHERE last_theme_id=" . $thema;
    $res = mysql_fetch_array(mysql_query($query));
    // echo $res['last_theme_id'];
    $ggg = (int)$res['last_theme_id'];
    if ($ggg == $thema) {
        $query = 'UPDATE ' . $pref . 'forum SET last_theme_id = ' . $thema . ', last_theme = "' . $naz . '" WHERE last_theme_id=' . $thema;
        $result = mysql_query($query);
    } 
} 
header("Location: forum.php");

?>