Exemplo n.º 1
0
<?php

require 'include/config.php';
require 'include/class.source.php';
$n = new Source($db);
if (isset($_POST['submitedit'])) {
    $n->Edit($_POST);
    if ($_POST['type'] != 'bad') {
        Misc::Redirect('sources_list.php');
    } else {
        Misc::Redirect('badsources_list.php');
    }
}
if (isset($_POST['submitdelete'])) {
    $n->Delete($_POST['source_id']);
    if ($_POST['type'] != 'bad') {
        Misc::Redirect('sources_list.php');
    } else {
        Misc::Redirect('badsources_list.php');
    }
}
$s = $n->getSource($_GET['id']);
include 'include/top.php';
?>

<form method="post">
	<input type="hidden" id="hidden" name="source_id" value="<?php 
echo $s['source_id'];
?>
" />
	<p>