Beispiel #1
0
function creation($sql)
{
    global $host, $user, $password, $dbname;
    $con = new informativo($host, $user, $password, $dbname);
    $rs = $con->query($sql);
    return $rs;
}
 public function delete()
 {
     $obj = new informativo();
     $p = $obj->delete($_GET['id']);
     if ($p[0]) {
         header('Location: index.php?controller=informativo');
     } else {
         $data = array();
         $view = new View();
         $data['msg'] = $p[1];
         $data['url'] = 'index.php?controller=informativo';
         $view->setData($data);
         $view->setTemplate('../view/_Error_App.php');
         $view->setLayout('../template/Layout.php');
         $view->render();
     }
 }