コード例 #1
0
ファイル: del.php プロジェクト: neovictor/test
<?php

$list = delList();
if ($list) {
    foreach ($list as $item) {
        if ($lang['lang'] == 'en') {
            echo "<div>" . $item['titleen'] . "</div><a href=index.php?del=" . $item['id'] . ">" . $lang['delpage'] . "</a>";
        }
        if ($lang['lang'] == 'ua') {
            echo "<div>" . $item['title'] . "</div><a href=index.php?del=" . $item['id'] . ">" . $lang['delpage'] . "</a>";
        }
    }
}
if (!empty($_GET['del'])) {
    delMenu($_GET['del']);
    header("Location: index.php");
}
コード例 #2
0
ファイル: index.php プロジェクト: neovictor/test
    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";
}
if (isset($_SESSION['error'])) {
    echo $_SESSION['error'];
}
//content title and text
if (empty($_GET) and empty($_FILES)) {
    $indextitle = delList();
    foreach ($indextitle as $title) {
        if ($lang['lang'] == 'en') {
            echo "<h4><a href='index.php?id=" . $title['id'] . "'>" . $title['titleen'] . "</a></h4>";
            $indextext = getTexten($title['id']);
            echo "<div>" . substr($indextext, 0, 150) . "...</div>";
            echo "<a href='index.php?id=" . $title['id'] . "'>" . $lang['read more'] . "</a><br>";
        } else {
            if ($lang['lang'] == 'ua') {
                echo "<h4><a href='index.php?id=" . $title['id'] . "'>" . $title['title'] . "</a></h4>";
                $indextext = getText($title['id']);
                echo "<div>" . substr($indextext, 0, 150) . "...</div>";
                echo "<a href='index.php?id=" . $title['id'] . "'>" . $lang['read more'] . "</a><br>";
            }
        }
    }