Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('ACTION', true);
- include('../common.php');
- if ( !$session_logged_in )
- {
- echo "Nie masz uprawnień by wyświetlić tę stronę. <a href=\"profile/login.htm\">Zaloguj się</a>.";
- die;
- }
- $page_title = 'Tabela zabiegów';
- include('../includes/page_header.php');
- $mysql_tb = $userdata['user_name'];
- // Tables for this example.php see file: 'test.sql'
- session_start();
- require_once("mte/mte.php");
- $tabledit = new MySQLtabledit();
- #####################
- # required settings #
- #####################
- # database settings:
- include '../config1.php';
- $hostname=$config1['DB_HOST'];
- $username=$config1['DB_USERNAME'];
- $password=$config1['DB_PASSWORD'];
- $db = $config1['DB_DATABASE'];
- $tabledit->database = $db;
- $tabledit->host = $hostname;
- $tabledit->user = $username;
- $tabledit->pass = $password;
- # table of the database you want to edit:
- $tabledit->table = $mysql_tb;
- # the primary key of the table (must be AUTO_INCREMENT):
- $tabledit->primary_key = 'id';
- # the fields you want to see in "list view"
- # Always add the primary key (`employeeNumber)`:
- $tabledit->fields_in_list_view = array('myID', 'Data', 'Rodzaj', 'Inicjaly', 'NazwiskoOperatora', 'Technika', 'NazwaZabiegu', 'Opis', 'id');
- #####################
- # optional settings #
- #####################
- # Head of the page (<h1>head_1<h1>):
- $tabledit->head_1 = "";
- # language (en=English, de=German, fr=French, nl=Dutch):
- $tabledit->language = 'pl';
- # numbers of rows/records in "list view":
- $tabledit->num_rows_list_view = 15;
- # required fields in edit or add record:
- $tabledit->fields_required = array();
- # Fields you want to edit (remove this to edit all the fields).
- #$tabledit->fields_to_edit = array('lastName','email','job');
- # help texts:
- $tabledit->help_text = array(
- 'id' => "Automatycznie przydzielany numer (nie kopiuje się do generowanego indeksu procedur)",
- 'Stanowisko' => 'A - operator; B - I Asysta...',
- 'Opis' => 'Twoja notatka/opis zabiegu (nie kopiuje się do generowanego indeksu procedur)',
- 'Rodzaj' => '',
- 'Data' => '',
- 'Rozpoznanie1' => 'Rozpoznanie przedoperacyjne',
- 'Rozpoznanie2' => 'Rozpoznanie pooperacyjne',
- 'NazwiskoOperatora' => 'Nazwisko osoby wykonującej zabieg',
- 'NazwiskaAsyst' => 'Nazwisko asyst / osoby nadzorującej',
- 'myID' => 'Twoja unikalna nazwa zabiegu (nie kopiuje się do generowanego indeksu procedur)'
- );
- # visible name of the fields:
- $tabledit->show_text = array(
- 'myID' => 'myID',
- 'id' => '(id)',
- 'Data' => 'Data',
- 'Kategoria' => 'Kategoria',
- 'Rodzaj' => 'Rodzaj',
- 'NazwaZabiegu' => 'Nazwa Zabiegu',
- 'NazwaStazu' => 'Nazwa Stażu',
- 'Opis' => 'Opis',
- 'Inicjaly' => 'Inicjały',
- 'Plec' => 'Płeć',
- 'NazwiskoOperatora' => 'Nazwisko Operatora',
- 'NazwiskoIAsysty' => 'Nazwisko I Asysty',
- 'NazwiskoIIAsysty' => 'Nazwisko II Asysty',
- 'NazwiskaAsyst' => 'Nazwiska Asyst',
- 'RodzajZnieczulenia' => 'Rodzaj Znieczulenia'
- );
- # visible name of the fields in list view:
- $tabledit->show_text_listview = array(
- 'myID' => 'myID',
- 'id' => '(id)',
- 'Data' => 'Data',
- 'Kategoria' => 'Kategoria',
- 'Rodzaj' => 'Rodzaj',
- 'NazwaZabiegu' => 'Nazwa Zabiegu',
- 'NazwaStazu' => 'Nazwa Stażu',
- 'Opis' => 'Opis',
- 'Inicjaly' => 'Inicjały',
- 'Plec' => 'Płeć',
- 'NazwiskoOperatora' => 'Nazwisko Operatora',
- 'NazwiskaAsyst' => 'Nazwiska Asyst'
- );
- /*
- # Make selectlist on inputfield based on another table
- # in this example: `employees`.`job` is based on `jobs`.`jobname`:
- $tabledit->lookup_table = array(
- 'job' => array(
- 'query' => "SELECT `id`, `jobname` FROM `jobs`;",
- 'option_value' => 'id',
- 'option_text' => 'jobname'
- )
- );
- */
- $tabledit->width_editor = '100%';
- $tabledit->width_input_fields = '500px';
- $tabledit->width_text_fields = '800px';
- $tabledit->height_text_fields = '500px';
- # warning no .htaccess ('on' or 'off'):
- $tabledit->no_htaccess_warning = 'off';
- ####################################
- # connect, show editor, disconnect #
- ####################################
- $tabledit->database_connect();
- echo "<!DOCTYPE html>
- <html lang='pl'>
- <head>
- <meta charset='utf-8'>
- </head>
- <body>
- ";
- $tabledit->do_it();
- echo "
- </body>
- </html>"
- ;
- $tabledit->database_disconnect();
- include('../includes/page_footer.php');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement