<?php
session_start();
error_reporting(0);
if (empty($_SESSION['username']) AND empty($_SESSION['passuser'])){

  echo "<link href='../../css/zalstyle.css' rel='stylesheet' type='text/css'>
  <link rel='shortcut icon' href='../../favicon.png' />
  
  <body class='special-page'>
  <div id='container'>
  <section id='error-number'>
  <img src='../../img/lock.png'>
  <h1>MODUL TIDAK DAPAT DIAKSES</h1>
  <p><span class style=\"font-size:14px; color:#ccc;\">Untuk mengakses modul, Anda harus login dahulu!</p></span><br/>
  </section>
  <section id='error-text'>
  <p><a class='button' href='../../index.php'> <b>LOGIN DI SINI</b> </a></p>
  </section>
  </div>";}
  
else{
include "../../../config/koneksi.php";
include "../../../config/library.php";
include "../../../config/fungsi_thumb.php";

$module=$_GET[module];
$act=$_GET[act];

// Hapus sekilas info
if ($module=='partnership' AND $act=='hapus'){
  mysql_query("DELETE FROM partnership WHERE id_partnership='$_GET[id]'");
  header('location:../../media.php?module='.$module);
}

// Input sekilas info
elseif ($module=='partnership' AND $act=='input'){
    mysql_query("INSERT INTO partnership (nama_partnership,
                                    link_partnership) 
                            VALUES('$_POST[a]',
                                   '$_POST[b]')");
  header('location:../../media.php?module='.$module);
}

// Update sekilas info
elseif ($module=='partnership' AND $act=='update'){
    mysql_query("UPDATE partnership SET nama_partnership = '$_POST[a]', link_partnership='$_POST[b]'
                             WHERE id_partnership = '$_POST[id]'");

  header('location:../../media.php?module='.$module);
}
}
?>
