Exemplo n.º 1
0
    $type = $_FILES['file']['type'];
    $tmp_name = $_FILES['file']['tmp_name'];
    $error = $_FILES['file']['error'];
    $posty->upload_img($filename, $type, $error, $tmp_name);
}
if (isset($_GET['succes'])) {
    echo "<font color='red'>DOJEBANO!</font> <BR /><BR />";
}
if (isset($_POST['link'])) {
    $usr->upload_movie($_POST['link'], $_SESSION['user_id'], $_POST['name']);
    unset($_POST['link']);
    echo "<font color='red'>DOJEBANO!</font> <BR /><BR />";
}
if (isset($_GET['d'])) {
    if ($_GET['co'] == 'film') {
        $posty->post_delete($_GET['d']);
        unset($_GET['co']);
    } else {
        $posty->img_delete($_GET['d']);
        unset($_GET['co']);
    }
    unset($_GET['d']);
    echo "<font color='red'>WYJEBANO!</font> <BR /><BR />";
}
if (isset($_SESSION['msg'])) {
    echo $_SESSION['msg'];
    unset($_SESSION['msg']);
}
$all = $posty->get_all_imgs();
foreach ($all as $instance) {
    echo $instance['date'] . " // " . $instance['name'] . " // <a href='" . $instance['link'] . "'>" . $instance['link'] . "</a> // <a href='admin.php?d=" . $instance['id'] . "&co=img'>usuń</a> <BR />";