3 require_once("profiller.php");
4 Profiller
::speed("Začínáme");
5 require_once("CiteConfig.php");
6 require_once("CiteOutput.php");
7 require_once("CiteData.php");
8 require_once("CiteFields.php");
9 require_once('Text/LanguageDetect.php');
10 require_once("database.php");
11 require_once("model/Models.php");
12 Profiller
::speed("Načtení vkládaných souborů");
13 //echo CiteConfig::getValue("pokus");
14 CiteConfig
::setValue("output_filter","html");
15 //echo CiteConfig::getValue("output");
16 //CiteOutput::factory()->template("@font-style/italic","Italickej")->template("@font-weight/bold","tlustej")->lineBreak()->out();
17 //CiteOutput::factory("Nazdar ")->lineBreak()->bold("světe")->textFunction("lowercase","Velká Písmenka")->text("normálka")->out();
18 //CiteOutput::factory()->lineBreak()->startBlock("citation")->text("Nazdar")->bold("světe")->closeBlock("citation")->out();
20 CiteConfig
::setValue("output_filter","latex");
21 //CiteOutput::factory()->lineBreak()->startBlock("citation")->text("Nazdar")->bold("světe")->closeBlock("citation")->out();
23 /*CiteFields::field("base")->variable("title")->fontStyle("italic")->fontWeight("bold")->textCase("title");
24 CiteFields::field("base")->variable("publisher");
25 CiteFields::field("base")->variable("date");
37 ->variable("publisher")
42 Profiller
::speed("Styl");
46 array("given"=>"Jan","family"=>"Krka"),
47 array("given"=>"Martin","family"=>"Blažek"),
48 array("given"=>"Pepa","family"=>"Nosek"),
49 array("given"=>"Jirka","family"=>"Cicek"),
50 array("given"=>"Martin","family"=>"Blažek")),
51 "title"=>"Titulek knihy",
53 "publisher"=>"Academia"
57 array("given"=>"Jan","family"=>"Krka"),
58 array("given"=>"Martin","family"=>"Blažek"),
59 array("given"=>"Pepa","family"=>"Nosek"),
60 array("given"=>"Jirka","family"=>"Cicek"),
61 array("given"=>"Martin","family"=>"Blažek")),
62 "title"=>"Tohle je úplně jiná knihA",
64 "publisher"=>"od úplně jinýho s nebez<pečím> nakladatelství"
67 CiteData
::loadData($data);
68 Profiller
::speed("Nahrání datového pole do CiteData");
69 CSL
::printBibliography();
70 Profiller
::speed("Tisk bibliografie");
72 $l = new Text_LanguageDetect();
73 Profiller
::speed("Nahrání třídy LanguageDetect");
74 $res=$l->detect("Takže to češtinou nemá zas tak hrozný problémy Zdá se, že ne. A co řikáš, ty?");
75 Profiller
::speed("Zjištění jazyka");
76 $l->detect("A další jazyk");
77 Profiller
::speed("Zjištění dalšího jazyka");
79 DatabaseConnector
::database("krokobib")
83 Profiller
::speed("Připojení k databázi");
84 DatabaseConnector
::query("publikace")
85 ->table("publication")
86 ->column("publication_type")
87 ->foreign("publication_type","publication_types")
88 ->primary("publication_id")
89 ->table("publication_types")
91 ->primary("publication_type_id")
92 //->link("publication","author")
93 ->link("publication_types","publication")
94 ->where("publication_id=1")
97 ->table("publication")
98 ->column("publication_type")
99 ->foreign("publication_type","publication_types")
100 ->primary("publication_id")
105 ->table("author_role")
109 ->primary("author_id")
110 ->foreign("author_name","name")
111 ->foreign("publication","publication")
112 ->foreign("author_role","author_role")
113 ->link("name","author")
114 ->link("publication","author")
115 ->link("author_role","author")
116 ->where("publication_id=5")
119 Profiller
::speed("Databázový dotaz");
120 echo CiteView
::get();
122 //CiteOutput::factory()->noSpaces()->template("@font-style/italic","Italickej")->template("@font-weight/bold","tlustej")->template("@bibliography/entry")->template("bibstart")->template("bibend")->out();
125 /*SELECT t3.publication_type, t1.family, t1.given, t4.role
126 FROM publication AS t3
127 INNER JOIN author AS t2 ON t3.publication_id = t2.publication
128 INNER JOIN name AS t1 ON t1.name_id = t2.author_name
129 INNER JOIN author_role AS t4 ON t4.id = t2.author_role*/