Current File : /home/users/barii/public_html/finansenl.com.pl/system.fotomagnesy.pl/admin/kat.php
<?php
include('../config.php');

$panel = new Panel();

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title> &bull; Prolabel Kreatory Administrator</title>
  <meta name="Keywords" content=""> 
  <meta name="description" content=""> 
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <meta http-equiv="Content-Language" content="pl" />       
  <link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  <link href="/admin/css/style.css" type="text/css" rel="stylesheet" /> 
  <link rel="stylesheet" href="/print.css" type="text/css" media="print">
  
  <style>
  a {color:#333;text-decoration:none}
  </style>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
</head>
<body>
    <div style="padding:20px">
        
        <?php     
        if(isset($_GET['kategorie'])){ 
        if(isset($_GET['usun'])){   
           $panel-> removeKategorie($_GET['usun']);
        }
                    if($_POST['submit']) $panel->SaveKategoria($_POST);
                    echo '<table style="width:100%"><tr><td style="vertical-align:top;width:32%">';
                    echo '<h2>Naklejki</h2>';
                    $panel->Kategorie(1);
                    echo '</td><td style="vertical-align:top;width:32">';
                    echo '<h2>Ozdobniki</h2>';
                    $panel->Kategorie(2);
                    echo '</td><td style="vertical-align:top;width:32%">';
                    echo '<h2>Ramki</h2>';
                    $panel->Kategorie(3);
                    echo '</td></tr></table>';        
        }
        elseif(isset($_GET['kategoria'])){
                    
                    
                if($_GET['kategoria']!=''){
                    $dane = $panel->pobierzDane('kategorie',$_GET['kategoria']);
                }
                    
                    $form['desc'] = 'Kategoria';
                    $form['submit'] = 'Zapisz';
                    $form['action'] = '?kategorie';
                                                    
                    $form = new Form($form);
                    
                    
                    if($_GET['kategoria']!=''){$form->AddField('id', 'id', 'hidden',$dane['id']);}
                    $form->AddField('nazwa', 'Nowa kategoria:', 'text',$dane['nazwa']);
                    $form->AddField('rodzaj', 'Rodzaj:', 'radio',array(1=>'Naklejki','Ozdobniki','Tła'),$dane['rodzaj']);
                    $form->AddField('sort', 'Kolejność:', 'text',$dane['sort']);
                    
                    echo $form->Create();
        
        }
        
        
        
        ?>
        
</body>
</html>