%%(php;1) $item = zmienna przekazywana w action {{komornik item="$item"}} $new_table = "CREATE TABLE komornik_opinie ( id int(10) unsigned NOT NULL auto_increment, komornik varchar(75) NOT NULL, ocena smallint(6) NOT NULL DEFAULT '0', opinia text NOT NULL, username varchar(75) NOT NULL, ,\n `area` varchar(10) collate utf8_bin NOT NULL,\n `pagename` varchar(50) collate utf8_bin NOT NULL,\n `username` varchar(75) collate utf8_bin NOT NULL,\n `latest` enum('Y','N') collate utf8_bin NOT NULL default 'N',\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin"; // oceny komorników if ($komornik_access) { // if POST, then DB-operations if ($komornik_mode == "add_opinion") { $rsstr = "INSERT INTO komornik_opinie (komornik, ocena, opinia) VALUES ('".$item."', ".$_POST["ocena"].",'".$_POST["opinia"]."');"; //wykonaj operacje na bazie } // show form - on access only } // for all - show results: $rssstr = "SELECT * FROM komornik_opinie WHERE "; // w pliku /formatters/wikka.php od linijki ok. 452 //$text = preg_replace("/(art(\.?)|(§)) (.*? [A-Za-z0-9]*)/i", "{{pu przepis=\"$4\"}}", $text); $text = preg_replace("/((art\.?)|(§)) (.*?) ([A-Za-z0-9]*)/i", "$1 $4 $5", $text); //art. 535 KC //{{pu przepis="353 KC"}} %%