PATH:
root
/
paleypartneradmin1234personel
<?php if(!isset($_SESSION["id_konta"])) { header("Location: ../index.php"); } if(isset ($_GET["o"])) { $opcja = $_GET["o"]; } else { $opcja = 0; } $a = new Module($db, LANGS, "personel", $kat); $p = new Panel($a, LANGS, $a->ref); $options = [ "addDisplayText" => "osobę" ]; $renderTable = [ "id" => [ "name" => "ID", "styles" => "width: 3%; text-align: right", "valueStyles" => "margin: auto; text-align: right" ], "nazwisko" => [ "name" => "Imię i nazwisko", "valueStyles" => "width: 10%; text-align: left" ], "specjalizacja" => [ "name" => "Specjalizacja", "valueStyles" => "text-align: left" ], "krotki" => [ "name" => "Krótki opis", "valueStyles" => "text-align: left", "value" => function($data) { $text = preg_replace("/<br[^>]*>/", " ", strip_tags($data['row']['krotki'], "<br>")); if (strlen($text) > 100) $text = Utils::shortenText($text, 3, 100); return $text; } ], "dlugi" => [ "name" => "Długi opis", "valueStyles" => "text-align: left", "value" => function($data) { $text = preg_replace("/<br[^>]*>/", " ", strip_tags($data['row']['dlugi'], "<br>")); if (strlen($text) > 100) $text = Utils::shortenText($text, 3, 100); return $text; } ], "galeria" => [ "name" => "Galeria", "styles" => "width: 5%; text-align: center", "value" => function($data) { return $data['row']['galeria'] != "" ? "✓" : ""; } ], "pokaz" => [ "name" => "Włączony", "styles" => "width: 70px; text-align: center", "value" => function($data) { return "<form id=\"pokaz" . $data['row']['id'] . "\" method=\"POST\"><input name=\"id\" type=\"hidden\" value=\"" . $data['row']['id'] . "\" /><input name=\"pokaz\" type=\"hidden\" value=\"0\" /><input type=\"checkbox\" name=\"pokaz\"" . ($data['row']['pokaz'] != 0 ? " checked=\"checked\"" : "") . " /></form>"; } ] ]; $renderEditor = [ "nazwisko" => [ "lang" => "single", "displayName" => "Imię i nazwisko", "type" => "text", "displayStyles" => "width: 150px" ], "specjalizacja" => [ "lang" => "single", "displayName" => "Specjalizacja", "type" => "text", // "html", "displayStyles" => "width: 150px" // "fieldStyles" => "height: 300px" ], "spec" => [ "lang" => "all", "displayName" => "Kategoria", "type" => "select", "displayStyles" => "width: 150px", "from" => ["data" => [ ["nazwa" => "Lekarze", "wartosc" => 0], ["nazwa" => "Terapeuci", "wartosc" => 1] ], "name" => "nazwa", "value" => "wartosc"] ], "krotki" => [ "lang" => "single", "displayName" => "Krótki opis", "type" => "html", "displayStyles" => "width: 150px", "fieldStyles" => "height: 150px" ], "dlugi" => [ "lang" => "single", "displayName" => "Długi opis", "type" => "html", "displayStyles" => "width: 150px", "fieldStyles" => "height: 300px" ], "galeria" => [ "lang" => "single", "displayName" => "Galeria", "type" => "image", "displayStyles" => "width: 150px", "buttonStyles" => "margin-left: 20px" ], "pokaz" => [ "lang" => "all", "displayName" => "Włączony", "displayStyles" => "width: 150px", "type" => "checkbox", "fieldStyles" => "width: unset" ] ]; switch ($opcja){ case 1: case 2: include_once 'dodaj_personel.php'; break; default: include_once 'personel.php'; break; } ?>
[-] dodaj_personel.php
[edit]
[+]
..
[-] personel.php
[edit]
[-] index.php
[edit]