diff --git a/.gitignore b/.gitignore index 342e1cbc2330fef0521ed59857c785d6976733fd..e0efbc438c6a305480a9dd674fb76f88536ee02f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,4 @@ -~dev_rating/application/cache/ -~dev_rating/application/logs/ -~dev_rating/application/config/ -~dev_rating/system/ -~dev_rating/modules/kotwig/cache/ + nbproject/ *.*~ /.project diff --git a/~dev_rating/application/cache/deleteThis.php b/~dev_rating/application/cache/deleteThis.php new file mode 100644 index 0000000000000000000000000000000000000000..3ac00faa65fb817ea29da4755b6c823685234399 --- /dev/null +++ b/~dev_rating/application/cache/deleteThis.php @@ -0,0 +1,8 @@ +<?php + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + diff --git a/~dev_rating/application/cache/twig/deleteThis.php b/~dev_rating/application/cache/twig/deleteThis.php new file mode 100644 index 0000000000000000000000000000000000000000..3ac00faa65fb817ea29da4755b6c823685234399 --- /dev/null +++ b/~dev_rating/application/cache/twig/deleteThis.php @@ -0,0 +1,8 @@ +<?php + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + diff --git a/~dev_rating/application/config/database.php b/~dev_rating/application/config/database.php new file mode 100644 index 0000000000000000000000000000000000000000..2636e3a2f99e0f9e14518a3a7c7d8b05da7e0b4d --- /dev/null +++ b/~dev_rating/application/config/database.php @@ -0,0 +1,31 @@ +<?php defined('SYSPATH') OR die('No direct access allowed.'); + +return array +( + 'default' => array( + 'type' => 'PDO', + 'connection' => array( + /** + * The following options are available for PDO: + * + * string dsn Data Source Name + * string username database username + * string password database password + * boolean persistent use persistent connections? + */ + 'dsn' => 'mysql:host=localhost;dbname=mmcs_rating', + 'username' => 'mmcs_rating', + 'password' => 'Pefnesdy', + 'persistent' => FALSE, + 'options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8') + ), + /** + * The following extra options are available for PDO: + * + * string identifier set the escaping identifier + */ + 'table_prefix' => '', + 'charset' => 'utf8', + 'caching' => FALSE, + ), +); diff --git a/~dev_rating/application/config/security.php b/~dev_rating/application/config/security.php new file mode 100644 index 0000000000000000000000000000000000000000..0f23ac2038c9493b9b111bb00ef33bd025ac4935 --- /dev/null +++ b/~dev_rating/application/config/security.php @@ -0,0 +1,32 @@ +<?php defined('SYSPATH') or die('No direct script access.'); + +return array( + + /* + * Настройки политики безопасности системы + */ + 'securityPolicy' => array( + /* + * Политика безопасности для логина + */ + 'login' => array( + 'allowedSymbols' => 'alpha_dash', // Допустимые символы + ), + /* + * Политика безопасности для пароля + */ + 'password' => array( + 'length' => '5', // Минимальная длина пароля + 'requirements' => '0', // Требования Рє паролю (РїРѕРєР° РЅРµ реализовано) + 'lifetime' => '0' // Время жизни пароля (РїРѕРєР° РЅРµ реализовано) + ), + /* + * Восстановление доступа Рє аккаунту + */ + 'restoring' => array( + 'allowedForTeachers' => 'false', + 'allowedForStudents' => 'true' + ) + ) + +); \ No newline at end of file diff --git a/~dev_rating/application/config/twig.php b/~dev_rating/application/config/twig.php new file mode 100644 index 0000000000000000000000000000000000000000..7e7ddc2e6b673f7715aab2f65038c7915c0bd90c --- /dev/null +++ b/~dev_rating/application/config/twig.php @@ -0,0 +1,38 @@ +<?php defined('SYSPATH') or die('No direct script access.'); + +return array( + + /** + * Twig Loader options + */ + 'loader' => array( + 'extension' => 'twig', // Extension for Twig files + 'path' => 'views', // Path within cascading filesystem for Twig files + ), + + /** + * Twig Environment options + * + * http://twig.sensiolabs.org/doc/api.html#environment-options + */ + 'environment' => array( + 'auto_reload' => (Kohana::$environment == Kohana::DEVELOPMENT), + 'autoescape' => TRUE, + 'base_template_class' => 'Twig_Template', + 'cache' => TWIGPATH.'cache', + 'charset' => 'utf-8', + 'optimizations' => -1, + 'strict_variables' => FALSE, + ), + + /** + * Custom functions and filters + * + * 'functions' => array( + * 'my_method' => array('MyClass', 'my_method'), + * ), + */ + 'functions' => array(), + 'filters' => array(), + +); diff --git a/~dev_rating/application/logs/deleteThis.php b/~dev_rating/application/logs/deleteThis.php new file mode 100644 index 0000000000000000000000000000000000000000..3ac00faa65fb817ea29da4755b6c823685234399 --- /dev/null +++ b/~dev_rating/application/logs/deleteThis.php @@ -0,0 +1,8 @@ +<?php + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + diff --git a/~dev_rating/modules/kotwig/cache/deleteThis.php b/~dev_rating/modules/kotwig/cache/deleteThis.php new file mode 100644 index 0000000000000000000000000000000000000000..3ac00faa65fb817ea29da4755b6c823685234399 --- /dev/null +++ b/~dev_rating/modules/kotwig/cache/deleteThis.php @@ -0,0 +1,8 @@ +<?php + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha.gif b/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha.gif deleted file mode 100644 index 1ade505e9fcda412607e7bc93a25f3caa9263d23..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha.gif and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha.png deleted file mode 100644 index a8acd1511f0ca78fc4a7908cf55d453351c30663..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha3.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha3.png deleted file mode 100644 index e62e50a09cedf6dd6ad53fede0a2c89bd91c7fb4..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/alpha3.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bayeux1.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/bayeux1.jpg deleted file mode 100644 index c67f25225cf7d596bbedf1bb3a0d49d283efc631..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bayeux1.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bg.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/bg.jpg deleted file mode 100644 index 896ea63f8b127c3fa88ee81e2e722308109b674b..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bg.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bgbarcode.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/bgbarcode.png deleted file mode 100644 index 26120a8910cbaba7f429885a7c3a95233641e2d2..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bgbarcode.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bgrock.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/bgrock.jpg deleted file mode 100644 index 2e0553a7a43b9e70033553a41bbe0fb8f6a0fd4a..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bgrock.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders2FF.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders2FF.jpg deleted file mode 100644 index 7c841d4e626a088338ec57118653882bc3499d29..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders2FF.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders2IE.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders2IE.jpg deleted file mode 100644 index 88ff6c5b78f1375a6ac9a2f53b83f465ec9ace7c..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders2IE.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders3FF.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders3FF.jpg deleted file mode 100644 index 9336c606cf811fd750bf4ee637e272007047d683..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders3FF.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders3IE.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders3IE.jpg deleted file mode 100644 index 12a4dfc855dcaf0b755fc2c34c087ea166455bd1..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders3IE.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders4FF.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders4FF.jpg deleted file mode 100644 index a553cd6246c58d2f6821f5be93869906e0ea8c5a..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders4FF.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders4IE.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders4IE.jpg deleted file mode 100644 index bee0359cd02868f8a98f2df70942beedd4788bd1..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/borders4IE.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersFF.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersFF.jpg deleted file mode 100644 index 7da1c84702903dc74dc5f5f873e2979b07aa9916..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersFF.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersIE.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersIE.jpg deleted file mode 100644 index f02003b5f38afde872640283c37dc22213541445..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersIE.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersMPDF2.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersMPDF2.jpg deleted file mode 100644 index cf161ab72e7e8bdaf3b9f8c683a2d6592cf8dc71..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/bordersMPDF2.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/clematis.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/clematis.jpg deleted file mode 100644 index d8078f85e15162f78d1a3dfccc1f9abf129460cc..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/clematis.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example01_basic.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example01_basic.php deleted file mode 100644 index 09ffb3767bdb73f571842026215e717137cfa6cf..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example01_basic.php +++ /dev/null @@ -1,187 +0,0 @@ -<?php - - -$html = ' -<h1><a name="top"></a>mPDF</h1> -<h2>Basic HTML Example</h2> -This file demonstrates most of the HTML elements. -<h3>Heading 3</h3> -<h4>Heading 4</h4> -<h5>Heading 5</h5> -<h6>Heading 6</h6> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<hr /> - -<div><img src="tiger.wmf" style="float:right;">DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> -<div><img src="klematis.jpg" style="opacity: 0.5; float: left;" />DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> - -<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote> - -<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address> - -<pre>PRE: Cum sociis natoque penatibus et magnis dis parturient montes, -nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis -dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras -sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. -Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, -ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui.</pre> - -<div><a href="#top">Hyperlink (<a>)</a></div> -<div><a href="http://www.pallcare.info">Hyperlink (<a>)</a></div> - -<div>Styles - <tt>tt(teletype)</tt> <i>italic</i> <b>bold</b> <big>big</big> <small>small</small> <em>emphasis</em> <strong>strong</strong> <br />new lines<br> -<code>code</code> <samp>sample</samp> <kbd>keyboard</kbd> <var>variable</var> <cite>citation</cite> <abbr>abbr.</abbr> <acronym>ACRONYM</acronym> <sup>sup</sup> <sub>sub</sub> <strike>strike</strike> <s>strike-s</s> <u>underline</u> <del>delete</del> <ins>insert</ins> <q>To be or not to be</q> <font face="sans-serif" color="#880000" size="5">font changing face, size and color</font> -</div> - -<p style="font-size:15pt; color:#440066">Paragraph using the in-line style to determine the font-size (15pt) and colour</p> - - -<h3>Testing BIG, SMALL, UNDERLINE, STRIKETHROUGH, FONT color, ACRONYM, SUPERSCRIPT and SUBSCRIPT</h3> -<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline and <s>strikethrough and <sup>sup</sup></s></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p>The above repeated, but starting with a paragraph with font-size specified (7pt)</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <small>small <s>strikethrough</s> in small span</small> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><small>This tests <u>underline</u> and <s>strikethrough</s> when they are <s><u>used together</u></s> as they both use text-decoration</small></p> - - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p style="font-size:7pt;"><big>Repeated in BIG but with font-size set to 7pt by in-line css: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<ol> -<li>Item <b><u>1</u></b></li> -<li>Item 2<sup>32</sup></li> -<li><small>Item</small> 3</li> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. -<ul> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. </li> -<li>Subitem 2 -<ul> -<li> -Level 3 subitem -</li> -</ul> -</li> -</ul> -</li> -<li>Item 5</li> -</ol> - -<dl> -<dt>Definition list</dt> -<dd>List defined by DL, DD and DT tags</dd> -</dl> - -<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> - -<table border="1"> -<thead> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</thead> -<tbody> -<tr> -<th>More Data</th> -<td>More Data</td> -<td>More Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</tbody> -</table> - -<p>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p> - -<form> - -<b>Textarea</b> -<textarea name="authors" rows="5" cols="80" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> - -<b>Select</b> -<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> followed by text -<br /><br /> - - - -<b>Input Radio</b> -<input type="radio" name="pre_publication" value="0" checked="checked" > No <input type="radio" name="pre_publication" value="1" > Yes -<br /><br /> - - -<b>Input Radio</b> -<input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice -<br /><br /> - - -<b>Input Text</b> -<input type="text" size="190" name="doi" value="10.1258/jrsm.100.5.211"> -<br /><br /> - -<b>Input Password</b> -<input type="password" size="40" name="password" value="secret"> -<br /><br /> - - -<input type="checkbox" name="QPC" value="ON" > Checkboxes<br> -<input type="checkbox" name="QPA" value="ON" > Not selected<br> -<input type="checkbox" name="QLY" value="ON" checked="checked" > Selected<br> -<input type="checkbox" name="QLY" value="ON" disabled="disabled" > Disabled -<br /><br /> - -<input type="submit" name="submit" value="Submit" /> -<input type="image" name="submit" src="goto.gif" /> -<input type="button" name="submit" value="Button" /> -<input type="reset" name="submit" value="Reset" /> - -</form> - -'; - - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF(); - -$mpdf->WriteHTML($html); -$mpdf->Output(); -exit; - -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example02_CSS_styles.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example02_CSS_styles.php deleted file mode 100644 index b423e6bbb4c35ccf72d72bda86f0d4634c4e73f3..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example02_CSS_styles.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php - - - -$html = ' -<h1>mPDF</h1> -<h2>Basic Example Using CSS Styles</h2> -<p class="breadcrumb">Chapter » Topic</p> -<h3>Heading 3</h3> -<h4>Heading 4</h4> -<h5>Heading 5</h5> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -<h4>Heading using Small-Caps - supported from mPDF version 5</h4> -<p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p> -'; - - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('c'); - -$mpdf->SetDisplayMode('fullpage'); - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyleA4.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example03_backgrounds_and_borders.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example03_backgrounds_and_borders.php deleted file mode 100644 index d6f03c1419ca7e65373b24c7283c9f18c434facb..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example03_backgrounds_and_borders.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php - -$html = ' -<style> -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; -} -.radialgradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: radial #00FFFF #FFFF00 0.5 0.5 0.5 0.5 0.65; - margin: auto; -} -.rounded { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - border-radius: 2mm; - background-clip: border-box; -} -h4 { - font-family: sans; - font-weight: bold; - margin-top: 1em; - margin-bottom: 0.5em; -} -div { - padding:1em; - margin-bottom: 1em; - text-align:justify; -} -.example pre { - background-color: #d5d5d5; - margin: 1em 1cm; - padding: 0 0.3cm; -} - -pre { text-align:left } -pre.code { font-family: monospace } - -</style> - -<body style="background-gradient: linear #88FFFF #FFFF44 0 0.5 1 0.5;"> -<h1>mPDF</h1> -<h2>Backgrounds & Borders</h2> - -<div style="border:0.1mm solid #220044; padding:1em 2em; background-color:#ffffcc; "> -<h4>Page background</h4> -<div class="gradient"> -The background colour can be set by CSS styles on the <body> tag. This will set the background for the whole page. In this document, the background has been set as a gradient (see below). -</div> - -<h4>Background Gradients</h4> -<div class="gradient"> -Background can be set as a linear or radial gradient between two colours. The background has been set on this <div> element to a linear gradient. CSS style used here is:<br /> -<span style="font-family: mono; font-size: 9pt;">background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;</span><br /> -The four numbers are coordinates in the form (x1, y1, x2, y2) which defines the gradient vector. x and y are values from 0 to 1, where 1 represents the height or width of the box as it is printed. -<br /> -<br /> -Background gradients can be set on all block elements e.g. P, DIV, H1-H6, as well as on BODY. -</div> -<div class="radialgradient"> -The background has been set on this <div> element to a radial gradient. CSS style used here is:<br /> -<span style="font-family: mono; font-size: 9pt;">background-gradient: radial #00FFFF #FFFF00 0.5 0.5 0.5 0.5 0.65;</span><br /> -The five numbers are coordinates in the form (x1, y1, x2, y2, r) where (x1, y1) is the starting point of the gradient with color1, -(x2, y2) is the center of the circle with color2, and r is the radius of the circle. -(x1, y1) should be inside the circle, otherwise some areas will not be defined. -<br /> -<br /> -Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec mattis lacus ac purus feugiat semper. Donec aliquet nunc odio, vitae pellentesque diam. Pellentesque sed velit lacus. Duis quis dui quis sem consectetur sollicitudin. Cras dolor quam, dapibus et pretium sit amet, elementum vel arcu. Duis rhoncus facilisis erat nec mattis. In hac habitasse platea dictumst. Vivamus hendrerit sem in justo aliquet a pellentesque lorem scelerisque. Suspendisse a augue sed urna rhoncus elementum. Aliquam erat volutpat. -</div> - -<h4>Background Images</h4> -<div style="border:0.1mm solid #880000; background: transparent url(bg.jpg) repeat fixed right top; background-color:#ccffff; "> -The CSS properties background-image, background-position, and background-repeat are supported as defined in CSS2, as well as the shorthand form "background". -<br /> -The background has been set on this <div> element to:<br /> -<span style="font-family: mono; font-size: 9pt;">background: transparent url(\'bg.jpg\') repeat fixed right top;</span><br /> -Background gradients can be set on all block elements e.g. P, DIV, H1-H6, as well as on BODY. -</div> - -<h4>Rounded Borders</h4> -<div class="rounded"> -Rounded corners to borders can be added using border-radius as defined in the draft spec. of <a href="http://www.w3.org/TR/2008/WD-css3-background-20080910/#layering">CSS3</a>. <br /> - -The two length values of the border-*-radius properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. -The first value is the horizontal radius. <br /> -<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 55pt 25pt;</span> 55pt is radius of curve from top end of left border starting to go round to the top.<br /> - -If the second length is omitted it is equal to the first (and the corner is thus a quarter circle). If either length is zero, the corner is square, not rounded.<br /> - -The border-radius shorthand sets all four border-*-radius properties. If values are given before and after a slash, then the values before the slash set the horizontal radius and the values after the slash set the vertical radius. If there is no slash, then the values set both radii equally. The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left. -</div> -<div class="rounded"> -<span style="font-family: mono; font-size: 9pt;">border-radius: 4em;</span><br /> - -would be equivalent to<br /> - -<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 4em;<br /> -border-top-right-radius: 4em;<br /> -border-bottom-right-radius: 4em;<br /> -border-bottom-left-radius: 4em;</span><br /> -<br /> -and<br /> -<span style="font-family: mono; font-size: 9pt;">border-radius: 2em 1em 4em / 0.5em 3em;</span><br /> -would be equivalent to<br /> -<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 2em 0.5em;<br /> -border-top-right-radius: 1em 3em;<br /> -border-bottom-right-radius: 4em 0.5em;<br /> -border-bottom-left-radius: 1em 3em;</span> -</div> - -</div> -'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('s'); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->WriteHTML($html); // Separate Paragraphs defined by font - -$mpdf->Output(); - -exit; - -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example04_images.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example04_images.php deleted file mode 100644 index 9b8c4df6e214145770b94f206f8992fc57624592..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example04_images.php +++ /dev/null @@ -1,207 +0,0 @@ -<?php - - - -$html = ' -<style> -table { border-collapse: collapse; margin-top: 0; text-align: center; } -td { padding: 0.5em; } -h1 { margin-bottom: 0; } -</style> -<h1>mPDF Images</h1> - -<table> -<tr> -<td>GIF</td> -<td>JPG</td> -<td>JPG (CMYK)</td> -<td>PNG</td> -<td>BMP</td> -<td>WMF</td> -<td>SVG</td> -</tr> -<tr> -<td><img style="vertical-align: top" src="tiger.gif" width="80" /></td> -<td><img style="vertical-align: top" src="tiger.jpg" width="80" /></td> -<td><img style="vertical-align: top" src="tigercmyk.jpg" width="80" /></td> -<td><img style="vertical-align: top" src="tiger.png" width="80" /></td> -<td><img style="vertical-align: top" src="tiger.bmp" width="80" /></td> -<td><img style="vertical-align: top" src="tiger2.wmf" width="80" /></td> -<td><img style="vertical-align: top" src="tiger.svg" width="80" /></td> -</tr> -</tr> -<tr> -<td colspan="7" style="text-align: left" ><h4>Opacity 50%</h4></td> -</tr> -<tr> -<tr> -<td><img style="vertical-align: top; opacity: 0.5" src="tiger.gif" width="80" /></td> -<td><img style="vertical-align: top; opacity: 0.5" src="tiger.jpg" width="80" /></td> -<td><img style="vertical-align: top; opacity: 0.5" src="tigercmyk.jpg" width="80" /></td> -<td><img style="vertical-align: top; opacity: 0.5" src="tiger.png" width="80" /></td> -<td><img style="vertical-align: top; opacity: 0.5" src="tiger.bmp" width="80" /></td> -<td><img style="vertical-align: top; opacity: 0.5" src="tiger2.wmf" width="80" /></td> -<td><img style="vertical-align: top; opacity: 0.5" src="tiger.svg" width="80" /></td> -</tr> -</table> - -<h4>Alpha channel</h4> -<table> -<tr> -<td>PNG</td> -<td><img style="vertical-align: top" src="alpha.png" width="85" /></td> -<td style="background-color:#FFCCFF; "><img style="vertical-align: top" src="alpha.png" width="85" /></td> -<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="alpha.png" width="85" /></td> -<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="alpha.png" width="85" /></td> -<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="alpha.png" width="85" /></td> -</tr> -</table> -<h4>Transparency</h4> -<table><tr> -<td>PNG</td> -<td style="background-color:#FFCCFF; "><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td> -<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td> -<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td> -<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger24trns.png" width="85" /></td> -</tr><tr> -<td>GIF</td> -<td style="background-color:#FFCCFF;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td> -<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td> -<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td> -<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger8trns.gif" width="85" /></td> -</tr><tr> -<td>WMF</td> -<td style="background-color:#FFCCFF;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td> -<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td> -<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td> -<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger2.wmf" width="85" /></td> -</tr><tr> -<td>SVG</td> -<td style="background-color:#FFCCFF;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td> -<td style="background-color:#FFFFCC;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td> -<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td> -<td style="background-color:#CCFFFF; background: transparent url(\'bg.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="tiger.svg" width="85" /></td> -</tr></table> - - -Images returned from tiger.php -<div> -GIF <img style="vertical-align: top" src="tiger.php?t=gif" width="85" /> -JPG <img style="vertical-align: top" src="tiger.php?t=jpg" width="85" /> -PNG <img style="vertical-align: top" src="tiger.php?t=png" width="85" /> -WMF <img style="vertical-align: top" src="tiger.php?t=wmf" width="85" /> -SVG <img style="vertical-align: top" src="tiger.php?t=svg" width="85" /> -</div> - -<pagebreak /> - - -<h3>Image Alignment</h3> -<div>From mPDF version 4.2 onwards, in-line images can be individually aligned (vertically). Most of the values for "vertical-align" are supported: top, bottom, middle, baseline, text-top, and text-bottom. The default value for vertical alignment has been changed to baseline, and the default padding to 0, consistent with most browsers. -</div> -<br /> - -<div style="background-color:#CCFFFF;"> -These images <img src="img1.png" style="vertical-align: top;" /> -are <img src="img2.png" style="vertical-align: top;" /> -<b>top</b> <img src="img3.png" style="vertical-align: top;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> -<br /> - -<div style="background-color:#CCFFFF;"> -These images <img src="img1.png" style="vertical-align: text-top;" /> -are <img src="img2.png" style="vertical-align: text-top;" /> -<b>text-top</b> <img src="img3.png" style="vertical-align: text-top;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> -<br /> - -<div style="background-color:#CCFFFF;"> -These images <img src="img1.png" style="vertical-align: bottom;" /> -are <img src="img2.png" style="vertical-align: bottom;" /> -<b>bottom</b> <img src="img3.png" style="vertical-align: bottom;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> -<br /> - -<div style="background-color:#CCFFFF;"> -These images <img src="img1.png" style="vertical-align: text-bottom;" /> -are <img src="img2.png" style="vertical-align: text-bottom;" /> -<b>text-bottom</b> <img src="img3.png" style="vertical-align: text-bottom;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> -<br /> - -<div style="background-color:#CCFFFF;"> -These images <img src="img1.png" style="vertical-align: baseline;" /> -are <img src="img2.png" style="vertical-align: baseline;" /> -<b>baseline</b> <img src="img3.png" style="vertical-align: baseline;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> -<br /> - -<div style="background-color:#CCFFFF;"> -These images <img src="img1.png" style="vertical-align: middle;" /> -are <img src="img2.png" style="vertical-align: middle;" /> -<b>middle</b> <img src="img3.png" style="vertical-align: middle;" /> -aligned <img src="img5.png" style="vertical-align: bottom;" /> -</div> -<br /> - -<h4>Mixed alignment</h4> -<div style="background-color:#CCFFFF;"> -baseline: <img src="sunset.jpg" width="50" style="vertical-align: baseline;" /> -text-bottom: <img src="sunset.jpg" width="30" style="vertical-align: text-bottom;" /> -middle: <img src="sunset.jpg" width="30" style="vertical-align: middle;" /> -bottom: <img src="sunset.jpg" width="80" style="vertical-align: bottom;" /> -text-top: <img src="sunset.jpg" width="50" style="vertical-align: text-top;" /> -top: <img src="sunset.jpg" width="100" style="vertical-align: top;" /> -</div> - -<h3>Image Border and padding</h3> -From mPDF v4.2, Image padding is supported as well as border and margin. -<img src="sunset.jpg" width="100" style="border:3px solid #44FF44; padding: 1em;" /> - -<h3>Rotated Images</h3> -<img src="tiger.png" width="100" /> -<img src="tiger.png" rotate="90" width="100" /> -<img src="tiger.png" rotate="180" width="100" /> -<img src="tiger.png" rotate="-90" width="100" /> -<br /> -<img src="tiger.jpg" width="100" /> -<img src="tiger.jpg" rotate="90" width="100" /> -<img src="tiger.jpg" rotate="180" width="100" /> -<img src="tiger.jpg" rotate="-90" width="100" /> -<br /> -<img src="tiger2.wmf" width="80" /> -<img src="tiger2.wmf" rotate="90" width="80" /> -<img src="tiger2.wmf" rotate="180" width="80" /> -<img src="tiger2.wmf" rotate="-90" width="80" /> -<br /> -<img src="tiger.svg" width="100" /> -<img src="tiger.svg" rotate="90" width="85" /> -<img src="tiger.svg" rotate="180" width="100" /> -<img src="tiger.svg" rotate="-90" width="85" /> -<br /> - -'; -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('c'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example05_tables.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example05_tables.php deleted file mode 100644 index 997614a5d50471a969559f3c8285813251c242a9..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example05_tables.php +++ /dev/null @@ -1,1017 +0,0 @@ -<?php - - - -$html = ' -<h1>mPDF</h1> -<h2>Tables</h2> -<h3>CSS Styles</h3> -<p>The CSS properties for tables and cells is increased over that in html2fpdf. It includes recognition of THEAD, TFOOT and TH.<br />See below for other facilities such as autosizing, and rotation.</p> -<table border="1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> - -<tr><td>Row 2</td> - -<td style="background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;"> -<p>This is data p</p> -This is data out of p -<p style="font-weight:bold; font-size:20pt; background-color:#FFBBFF;">This is bold data p</p> -<b>This is bold data out of p</b><br /> -This is normal data after br -<h3>H3 in a table</h3> -<div>This is data div</div> -This is data out of div -<div style="font-weight:bold;">This is data div (bold)</div> -This is data out of div -</td> - - -<td><p>More data</p><p style="font-size:12pt;">This is large text</p></td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -<tr><td><p>Row 4 <td> cell</p></td><td>This is data</td><td><p>This is data</p></td></tr> -<tr><td>Row 5</td><td>Also data</td><td>Also data</td></tr> -<tr><td>Row 6</td><td>Also data</td><td>Also data</td></tr> -<tr><td>Row 7</td><td>Also data</td><td>Also data</td></tr> -<tr><td>Row 8</td><td>Also data</td><td>Also data</td></tr> -</tbody></table> - -<p>This table has padding-left and -right set to 5mm i.e. padding within the cells. Also border colour and style, font family and size are set by <acronym>CSS</acronym>.</p> -<table align="right" style="border: 1px solid #880000; font-family: Mono; font-size: 7pt; " class="widecells"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td><td><p>This is data p</p></td><td><p>More data</p></td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -<tr><td><p>Row 4 <td> cell</p></td><td>This is data</td><td><p>This is data</p></td></tr> -<tr><td>Row 5</td><td>Also data</td><td>Also data</td></tr> -<tr><td>Row 6</td><td>Also data</td><td>Also data</td></tr> -<tr><td>Row 7</td><td>Also data</td><td>Also data</td></tr> -<tr><td>Row 8</td><td>Also data</td><td>Also data</td></tr> -</tbody></table> - -<p>This table has padding-top and -bottom set to 3mm i.e. padding within the cells. Also background-, border colour and style, font family and size are set by in-line <acronym>CSS</acronym>.</p> -<table style="border: 1px solid #880000; background-color: #BBCCDD; font-family: Mono; font-size: 7pt; " class="tallcells"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td><td><p>This is data p</p></td><td><p>More data</p></td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -</tbody></table> - - -<h3 style="margin-top: 20pt; margin-collapse:collapse;">Table Styles</h3> -<p>The style sheet used for these examples shows some of the table styles I use on my website. The property \'topntail\' defined by a border-type definition e.g. "1px solid #880000" puts a border at the top and bottom of the table, and also below a header row (thead) if defined. Note also that <thead> will automatically turn on the header-repeat i.e. reproduce the header row at the top of each page.</p> -<p>bpmTopic Class</p> -<table class="bpmTopic"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>More data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopic<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopicC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopnTail Class </p> -<table class="bpmTopnTail"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> -<p> </p> -<p>bpmTopnTail<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopnTailC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>TopnTail Class</p> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td class="pmhBottomRight"><b><i>Bottom right align</i></b></td> -<td> -<p>This is data. Can use</p> -<p><b>bold</b> <i>italic </i><sub>sub</sub> or <sup>sup</sup> text</p> -</td> -</tr> -<tr class="oddrow"><th class="pmhBottomRight"> -<p>Bottom right align</p> -</th> -<td class="pmhMiddleCenter" style="border: #000000 1px solid"> -<p>This is data. This cell</p> -<p>uses Cell Styles to set</p> -<p>the borders.</p> -<p>All borders are collapsible</p> -<p>in mPDF.</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 4</th> -<td> -<p>This is data p</p> -</td> -<td>More data</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td colspan="2" class="pmhTopCenter">Also data merged and centered</td> -</tr> -</tbody></table> - -<p> </p> - -<h4>Lists in a Table</h4> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<ol> -<li>Item 1</li> -<li>Item 2 -<ol type="a"> -<li>Subitem of ordered list</li> -<li>Subitem 2 -<ol type="i"> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ol> -</li> -</ol> -</li> -<li>Item 3</li> -<li>Another Item</li> -<li>Subitem -<ol> -<li>Level 3 subitem</li> -</ol> -</li> -<li>Another Item</li> -</ol> -</td> -<td> -Unordered list: -<ul> -<li>Item 1</li> -<li>Item 2 -<ul> -<li>Subitem of unordered list</li> -<li>Subitem 2 -<ul> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ul> -</li> -</ul> -</li> -<li>Item 3</li> -</ul> -</td> -</tr> -</tbody></table> -<p> </p> - - -<h4>Automatic Column Width</h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td>Causes</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing.</td> -</tr> -</tbody></table> - - -<h4>ColSpan & Rowspan</h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td rowspan="2">Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -</tr> -</tbody></table> - - - -<h4>Table Header & Footer Rows</h4> -<p>A table using a header row should repeat the header row across pages:</p> -<p>bpmTopic<b>C</b> Class</p> -<table class="bpmTopicC"> -<thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second column header</p> -</td> -<td>Third column header</td> -</tr> -</thead> -<tfoot> -<tr class="footerrow"><th>Col and Row Footer</th> -<td> -<p>Second column footer</p> -</td> -<td>Third column footer</td> -</tr> -</tfoot> -<tbody> -<tr><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr><th>Row header 2</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th> -<p>Row header 3</p> -</th> -<td> -<p>This is data</p> -</td> -<td>This is data</td> -</tr> -<tr><th>Row header 4</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 9</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -</tbody></table> -<p> </p> - -<h3>Autosizing Tables</h3> -<p>Periodic Table of elements. Tables are set by default to reduce font size if complete words will not fit inside each cell, to a maximum of 1/1.4 * the set font-size. This value can be changed by setting $mpdf->shrink_tables_to_fit=1.8 or using html attribute <table autosize="1.8">.</p> - -<h5>Periodic Table</h5> - -<table style="border:1px solid #000000;" cellPadding="9"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td> -<td colspan="16"></td> -<td>He </td> -</tr> -<tr> -<td>Li </td> -<td>Be </td> -<td colspan="10"></td> -<td>B </td> -<td>C </td> -<td>N </td> -<td>O </td> -<td>F </td> -<td>Ne </td> -</tr> -<tr> -<td>Na </td> -<td>Mg </td> -<td colspan="10"></td> -<td>Al </td> -<td>Si </td> -<td>P </td> -<td>S </td> -<td>Cl </td> -<td>Ar </td> -</tr> -<tr> -<td>K </td> -<td>Ca </td> -<td>Sc </td> -<td>Ti </td> -<td>V </td> -<td>Cr </td> -<td>Mn </td> -<td>Fe </td> -<td>Co </td> -<td>Ni </td> -<td>Cu </td> -<td>Zn </td> -<td>Ga </td> -<td>Ge </td> -<td>As </td> -<td>Se </td> -<td>Br </td> -<td>Kr </td> -</tr> -<tr> -<td>Rb </td> -<td>Sr </td> -<td>Y </td> -<td>Zr </td> -<td>Nb </td> -<td>Mo </td> -<td>Tc </td> -<td>Ru </td> -<td>Rh </td> -<td>Pd </td> -<td>Ag </td> -<td>Cd </td> -<td>In </td> -<td>Sn </td> -<td>Sb </td> -<td>Te </td> -<td>I </td> -<td>Xe </td> -</tr> -<tr> -<td>Cs </td> -<td>Ba </td> -<td>La </td> -<td>Hf </td> -<td>Ta </td> -<td>W </td> -<td>Re </td> -<td>Os </td> -<td>Ir </td> -<td>Pt </td> -<td>Au </td> -<td>Hg </td> -<td>Tl </td> -<td>Pb </td> -<td>Bi </td> -<td>Po </td> -<td>At </td> -<td>Rn </td> -</tr> -<tr> -<td>Fr </td> -<td>Ra </td> -<td>Ac </td> -<td colspan="15"></td> -</tr> -<tr> -<td colspan="18"></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Ce </td> -<td>Pr </td> -<td>Nd </td> -<td>Pm </td> -<td>Sm </td> -<td>Eu </td> -<td>Gd </td> -<td>Tb </td> -<td>Dy </td> -<td>Ho </td> -<td>Er </td> -<td>Tm </td> -<td>Yb </td> -<td>Lu </td> -<td></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Th </td> -<td>Pa </td> -<td>U </td> -<td>Np </td> -<td>Pu </td> -<td>Am </td> -<td>Cm </td> -<td>Bk </td> -<td>Cf </td> -<td>Es </td> -<td>Fm </td> -<td>Md </td> -<td>No </td> -<td>Lr </td> -<td></td> -</tr> -</tbody></table> - -<pagebreak /> - -<h3>Rotating Tables</h3> -<p>This is set to rotate -90 degrees (counterclockwise).</p> - -<h5>Periodic Table</h5> -<p> -<table rotate="-90" class="bpmClearC"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td> -<td colspan="15"></td> -<td></td> -<td>He </td> -</tr> -<tr> -<td>Li </td> -<td>Be </td> -<td colspan="10"></td> -<td>B </td> -<td>C </td> -<td>N </td> -<td>O </td> -<td>F </td> -<td>Ne </td> -</tr> -<tr> -<td>Na </td> -<td>Mg </td> -<td colspan="10"></td> -<td>Al </td> -<td>Si </td> -<td>P </td> -<td>S </td> -<td>Cl </td> -<td>Ar </td> -</tr> -<tr> -<td>K </td> -<td>Ca </td> -<td>Sc </td> -<td>Ti </td> -<td>V </td> -<td>Cr </td> -<td>Mn </td> -<td>Fe </td> -<td>Co </td> -<td>Ni </td> -<td>Cu </td> -<td>Zn </td> -<td>Ga </td> -<td>Ge </td> -<td>As </td> -<td>Se </td> -<td>Br </td> -<td>Kr </td> -</tr> -<tr> -<td>Rb </td> -<td>Sr </td> -<td>Y </td> -<td>Zr </td> -<td>Nb </td> -<td>Mo </td> -<td>Tc </td> -<td>Ru </td> -<td>Rh </td> -<td>Pd </td> -<td>Ag </td> -<td>Cd </td> -<td>In </td> -<td>Sn </td> -<td>Sb </td> -<td>Te </td> -<td>I </td> -<td>Xe </td> -</tr> -<tr> -<td>Cs </td> -<td>Ba </td> -<td>La </td> -<td>Hf </td> -<td>Ta </td> -<td>W </td> -<td>Re </td> -<td>Os </td> -<td>Ir </td> -<td>Pt </td> -<td>Au </td> -<td>Hg </td> -<td>Tl </td> -<td>Pb </td> -<td>Bi </td> -<td>Po </td> -<td>At </td> -<td>Rn </td> -</tr> -<tr> -<td>Fr </td> -<td>Ra </td> -<td>Ac </td> -</tr> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Ce </td> -<td>Pr </td> -<td>Nd </td> -<td>Pm </td> -<td>Sm </td> -<td>Eu </td> -<td>Gd </td> -<td>Tb </td> -<td>Dy </td> -<td>Ho </td> -<td>Er </td> -<td>Tm </td> -<td>Yb </td> -<td>Lu </td> -<td></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Th </td> -<td>Pa </td> -<td>U </td> -<td>Np </td> -<td>Pu </td> -<td>Am </td> -<td>Cm </td> -<td>Bk </td> -<td>Cf </td> -<td>Es </td> -<td>Fm </td> -<td>Md </td> -<td>No </td> -<td>Lr </td> -<td></td> -</tr> -</tbody></table> -<p> </p> - -<pagebreak /> -<h3>Rotated text in Table Cells</h3> - -<h5>Periodic Table</h5> -<table> -<thead> -<tr text-rotate="45"> -<th><p>Element type 1A</p><p>Second line</p><th><p>Element type longer 2A</p></th> -<th>Element type 3B</th> -<th>Element type 4B</th> -<th>Element type 5B</th> -<th>Element type 6B</th> -<th>7B</th><th>8B</th> -<th>Element type 8B R</th> -<th>8B</th> -<th>Element <span>type</span> 1B</th> -<th>2B</th> -<th>Element type 3A</th> -<th>Element type 4A</th> -<th>Element type 5A</th> -<th>Element type 6A</th> -<th>7A</th> -<th>Element type 8A</th> -</tr> -</thead> - -<tbody> -<tr> -<td>H</td> -<td colspan="15"></td> -<td></td> -<td>He </td> -</tr> -<tr> -<td>Li </td> -<td>Be </td> -<td colspan="10"></td> -<td>B </td> -<td>C </td> -<td>N </td> -<td>O </td> -<td>F </td> -<td>Ne </td> -</tr> -<tr> -<td>Na </td> -<td>Mg </td> -<td colspan="10"></td> -<td>Al </td> -<td>Si </td> -<td>P </td> -<td>S </td> -<td>Cl </td> -<td>Ar </td> -</tr> -<tr style="text-rotate: 45"> -<td>K </td> -<td>Ca </td> -<td>Sc </td> -<td>Ti</td> -<td>Va</td> -<td>Cr</td> -<td>Mn</td> -<td>Fe</td> -<td>Co</td> -<td>Ni </td> -<td>Cu </td> -<td>Zn </td> -<td>Ga </td> -<td>Ge </td> -<td>As </td> -<td>Se </td> -<td>Br </td> -<td>Kr </td> -</tr> -<tr> -<td>Rb </td> -<td>Sr </td> -<td>Y </td> -<td>Zr </td> -<td>Nb </td> -<td>Mo </td> -<td>Tc </td> -<td>Ru </td> -<td style="text-align:right; ">Rh</td> -<td>Pd </td> -<td>Ag </td> -<td>Cd </td> -<td>In </td> -<td>Sn </td> -<td>Sb </td> -<td>Te </td> -<td>I </td> -<td>Xe </td> -</tr> -<tr> -<td>Cs </td> -<td>Ba </td> -<td>La </td> -<td>Hf </td> -<td>Ta </td> -<td>W </td> -<td>Re </td> -<td>Os </td> -<td>Ir </td> -<td>Pt </td> -<td>Au </td> -<td>Hg </td> -<td>Tl </td> -<td>Pb </td> -<td>Bi </td> -<td>Po </td> -<td>At </td> -<td>Rn </td> -</tr> -<tr> -<td>Fr </td> -<td>Ra </td> -<td colspan="16">Ac </td> -</tr> -<tr> -<td colspan="3"></td> -<td>Ce </td> -<td>Pr </td> -<td>Nd </td> -<td>Pm </td> -<td>Sm </td> -<td>Eu </td> -<td>Gd </td> -<td>Tb </td> -<td>Dy </td> -<td>Ho </td> -<td>Er </td> -<td>Tm </td> -<td>Yb </td> -<td>Lu </td> -<td></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Th </td> -<td>Pa </td> -<td>U </td> -<td>Np </td> -<td>Pu </td> -<td>Am </td> -<td>Cm </td> -<td>Bk </td> -<td>Cf </td> -<td>Es </td> -<td>Fm </td> -<td>Md </td> -<td>No </td> -<td>Lr </td> -<td></td> -</tr> -</tbody></table> -<p> </p> - -'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyletables.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html,2); - -$mpdf->Output('mpdf.pdf','I'); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example06_tables_nested.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example06_tables_nested.php deleted file mode 100644 index e50764a92c535a24763669b40c29150e3413860e..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example06_tables_nested.php +++ /dev/null @@ -1,532 +0,0 @@ -<?php - - -$html = ' -<head> -<style> -table { - border-collapse: separate; - border: 4px solid #880000; - padding: 3px; - margin: 0px 20px 0px 20px; - empty-cells: hide; - background-color:#FFFFCC; -} -table.outer2 { - border-collapse: separate; - border: 4px solid #088000; - padding: 3px; - margin: 10px 0px; - empty-cells: hide; - background-color: yellow; -} -table.outer2 td { - font-family: Times; -} -table.inner { - border-collapse: collapse; - border: 2px solid #000088; - padding: 3px; - margin: 5px; - empty-cells: show; - background-color:#FFCCFF; -} -td { - border: 1px solid #008800; - padding: 0px; - background-color:#ECFFDF; -} -table.inner td { - border: 1px solid #000088; - padding: 0px; - font-family: monospace; - font-style: italic; - font-weight: bold; - color: #880000; - background-color:#FFECDF; -} -table.collapsed { - border-collapse: collapse; -} -table.collapsed td { - background-color:#EDFCFF; -} - - -</style> -</head> -<body> -<h1>mPDF</h1> -<h2>Tables - Nested</h2> - - -<div style="border: 2px solid #000088; background-color: #DDDDFF; padding: 2mm;"> -Text before table - -<div style="border: 2px solid #008888; background-color: #DCAFCF; padding: 2mm;"> - -<table cellSpacing="2" rotate="-90" align="center" autosize="1.5"> -<tbody> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> - -<table cellSpacing="2"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id <a href="http://www.dummy.com">euismod auctor</a>, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> - - -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> - -<table cellSpacing="2"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td style="background: transparent url(\'bg.jpg\') repeat scroll right top;" >Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> - - -</td> -<td>This is data</td> -</tr> - -<tr> -<td>This is data</td> -<td>This is data</td> -<td> - -<table cellSpacing="2"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> - - -</td> -<td>This is data</td> -</tr> - -<tr> -<td>This is data</td> -<td>This is data</td> -<td> - -<table cellSpacing="2"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> - - -</td> -<td>This is data</td> -</tr> - - -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> - -<tr> -<td>This is data</td> -<td></td> -<td>This is data</td> -<td>This is data</td> -</tr> - -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> - - -</tbody></table> - -</div> - -<p>Text before table</p> - -<table cellSpacing="2" class="outer2" autosize="3" style="page-break-inside:avoid"> -<tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td style="text-align: right;"> -Text before table - -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> -<p>Text after table</p> - - -</td> -<td>This is data</td> -</tr> - -<tr> -<td>Row 2</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> - -<tr> -<td>Row 3</td> -<td style="text-align: center; vertical-align: middle;"> - -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td> - -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> - -</td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> - - -</td> -<td style="vertical-align: bottom; "> -<table cellSpacing="2" class="inner" align="right"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> -</td> -<td>This is data</td> -</tr> - -<tr> -<td>Row 4</td> -<td>This is data</td> -<td><table cellSpacing="2" class="inner"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> - -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> - -<tr> -<td>Row C</td> -<td>C2</td> -<td> - -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> - -</td> -<td>C4</td> -</tr> - -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> - -</tbody></table> - -</td> -<td>This is data</td> -</tr> - - -</tbody></table> - - -</div> - -<p> </p> - - -<div style="border: 1px solid #000088; background-color: #DDDDFF; padding: 5mm;"> -Text before table - -<table cellSpacing="2" class="separate"> -<tbody> -<tr> -<td style="background-color:#FFCCFF;">Row 1</td> -<td>This is data</td> -<td> - -NO NESTING </td> -<td>This is data</td> -</tr> - -<tr> -<td>Row 2</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> - -<tr> -<td>Row 3</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> - -<tr> -<td>Row 4</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> - -</tbody></table> - -</div> - -</body> -'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyletables.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example07_tables_borders.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example07_tables_borders.php deleted file mode 100644 index a0cf4fcb8ffe5e19435a514d446aeb17672237f7..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example07_tables_borders.php +++ /dev/null @@ -1,500 +0,0 @@ -<?php - - - -$html = ' -<html><head> -<style> -table { - font-family: sans-serif; - border: 7mm solid aqua; - border-collapse: collapse; -} -table.table2 { - border: 2mm solid aqua; - border-collapse: collapse; -} -table.layout { - border: 0mm solid black; - border-collapse: collapse; -} -td.layout { - text-align: center; - border: 0mm solid black; -} -td { - padding: 3mm; - border: 2mm solid blue; - vertical-align: middle; -} -td.redcell { - border: 3mm solid red; -} -td.redcell2 { - border: 2mm solid red; -} -</style> -</head> -<body> - -<h1>mPDF</h1> -<h2>Tables - Borders</h2> -<h4>mPDF</h4> - -Border conflict resolution in tables with border-collapse set to "collapse". mPDF follows the rules set by CSS as well as possible, but as you can see, there is some difference in interpretation of the rules: - -<table class="layout"> - -<tr> - <td class="layout">mPDF</td> - <td class="layout">Internet Explorer<br />IE 7</td> - <td class="layout">Firefox<br />v 3.0.3</td> -</tr> - -<tr> - <td class="layout"> - - -<table> -<tr> - <td style="border:5mm solid green">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td rowspan="2" class="redcell" style="border:5mm solid teal">1</td> - <td style="border:3mm solid pink">1</td> - <td style="border:5mm solid purple">1</td> -</tr> -<tr> - <td style="border:2mm solid gray">1</td> - <td>1</td> -</tr> -<tr> - <td class="redcell">1</td> - <td>1</td> - <td>1</td> -</tr> -</table> - - - - </td> - - <td class="layout" rowspan="3"><img src="bordersIE.jpg" /></td> - <td class="layout" rowspan="3"><img src="bordersFF.jpg" /></td> - - -</tr> - -<tr> - <td class="layout" style="text-align: left"> - -<table style="border: 2.5mm solid aqua"> -<tr> - <td class="redcell">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td rowspan="2" class="redcell" style="border:5mm solid green">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td class="redcell">1</td> - <td>1</td> - <td>1</td> -</tr> -</table> - - - </td> -</tr> - -<tr> - <td class="layout"> - -<table> -<tr> - <td class="redcell">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td rowspan="2" >1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td style="border:5mm solid yellow">1</td> - <td>1</td> -</tr> -<tr> - <td class="redcell">1</td> - <td>1</td> - <td>1</td> -</tr> -</table> - - - </td> -</tr> -</table> - - -<pagebreak /> - - -<table class="layout"> - -<tr> - <td class="layout">mPDF</td> - <td class="layout">mPDF < v3</td> - <td class="layout">Internet Explorer<br />IE 7</td> - <td class="layout">Firefox<br />v 3.0.3</td> -</tr> - -<tr> - <td class="layout"> - - -<table class="table2"> -<tr> - <td style="border:2mm solid green">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td rowspan="2" class="redcell2" style="border:2mm solid teal">1</td> - <td style="border:2mm solid pink">1</td> - <td style="border:2mm solid purple">1</td> -</tr> -<tr> - <td style="border:2mm solid gray">1</td> - <td>1</td> -</tr> -<tr> - <td class="redcell2">1</td> - <td>1</td> - <td>1</td> -</tr> -</table> - - - - </td> - - <td class="layout" rowspan="3"><img src="bordersMPDF2.jpg" /></td> - <td class="layout" rowspan="3"><img src="borders2IE.jpg" /></td> - <td class="layout" rowspan="3"><img src="borders2FF.jpg" /></td> - - -</tr> - -<tr> - <td class="layout" style="text-align: left"> - -<table style="border: 2mm solid aqua" class="table2"> -<tr> - <td class="redcell2">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td rowspan="2" class="redcell2" style="border:2mm solid green">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td class="redcell2">1</td> - <td>1</td> - <td>1</td> -</tr> -</table> - - - </td> -</tr> - -<tr> - <td class="layout"> - -<table class="table2"> -<tr> - <td class="redcell2">1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td rowspan="2" >1</td> - <td>1</td> - <td>1</td> -</tr> -<tr> - <td style="border:2mm solid yellow">1</td> - <td>1</td> -</tr> -<tr> - <td class="redcell2">1</td> - <td>1</td> - <td>1</td> -</tr> -</table> - - - </td> -</tr> -</table> - - -<pagebreak /> -<h4>mPDF</h4> - -<table style="border: 10px solid orange"> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px double red">double red</td> -<td style="border: 10px dashed yellow">dashed yellow</td> -<td style="border: 10px dotted green">dotted green</td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px hidden orange">hidden </td> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px none orange">none</td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px ridge blue">ridge blue</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px groove pink">groove pink</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px none orange">none </td> -<td style="border: 10px inset gray">inset gray</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px outset purple">outset purple</td> -<td style="border: 10px none orange">none </td> -</tr> -</table> - -<h4>Firefox</h4> -<img src="borders3FF.jpg" /> - -<br /> - - -<h4>IE 7</h4> -<img src="borders3IE.jpg" /> - -<pagebreak /> - -<div>mPDF</div> - -<table style="border: 10px solid orange; border-collapse: separate;"> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px double red">double red</td> -<td style="border: 10px dashed yellow">dashed yellow</td> -<td style="border: 10px dotted green">dotted green</td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px hidden orange">hidden </td> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px none orange">none</td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px ridge blue">ridge blue</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px solid orange">Data</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px groove pink">groove pink</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px solid orange">Data</td> -</tr> -<tr> -<td style="border: 10px none orange">none </td> -<td style="border: 10px inset gray">inset gray</td> -<td style="border: 10px none orange">none </td> -<td style="border: 10px outset purple">outset purple</td> -<td style="border: 10px none orange">none </td> -</tr> -</table> - -<div>Firefox</div> -<img style="margin:0;" src="borders4FF.jpg" /> - - - -<div>IE 7</div> -<img style="margin:0;" src="borders4IE.jpg" /> - -<pagebreak /> - - -<table style="border: 5px inset teal"> -<tr> -<td style="border: 5px solid orange">solid orange</td> - -<td style="border: 0px none black">none</td> - -<td style="border: 5px double red">double red</td> - -<td style="border: 0px none black">none</td> - -<td style="border: 5px inset gray">inset gray</td> - -<td style="border: 0px none black">none</td> - -<td style="border: 5px outset purple">outset purple</td> - -<td style="border: 0px none black">none</td> - -<td style="border: 5px groove pink">groove pink</td> - -<td style="border: 0px none black">none</td> - -<td style="border: 5px ridge blue">ridge blue</td> -</tr> -</table> - - -<table style="border: 5px inset gray; border-collapse: separate;"> -<tr> -<td style="border: 5px solid orange">solid orange</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px double red">double red</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px inset gray">inset gray</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px outset purple">outset purple</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px groove pink">groove pink</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px ridge blue">ridge blue</td> -</tr> -</table> - - -<table style="border: 5px outset purple; border-collapse: separate;"> -<tr> -<td style="border: 5px solid orange">solid orange</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px double red">double red</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px inset gray">inset gray</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px outset purple">outset purple</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px groove pink">groove pink</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px ridge blue">ridge blue</td> -</tr> -</table> - - -<table style="border: 5px groove pink; border-collapse: separate;"> -<tr> -<td style="border: 5px solid orange">solid orange</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px double red">double red</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px inset gray">inset gray</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px outset purple">outset purple</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px groove pink">groove pink</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px ridge blue">ridge blue</td> -</tr> -</table> - - -<table style="border: 5px ridge blue; border-collapse: separate;"> -<tr> -<td style="border: 5px solid orange">solid orange</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px double red">double red</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px inset gray">inset gray</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px outset purple">outset purple</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px groove pink">groove pink</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px ridge blue">ridge blue</td> -</tr> -</table> - - -<table style="border: 5px double red; border-collapse: separate;"> -<tr> -<td style="border: 5px solid orange">solid orange</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px double red">double red</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px inset gray">inset gray</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px outset purple">outset purple</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px groove pink">groove pink</td> -<td style="border: 0px none black">none</td> -<td style="border: 5px ridge blue">ridge blue</td> -</tr> -</table> - -</body> -</html> -'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('en-GB-x','A4','','',10,10,10,10,6,3); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyletables.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example08_lists.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example08_lists.php deleted file mode 100644 index 6a400f8b190f395698be92838c4e9a9e59c85638..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example08_lists.php +++ /dev/null @@ -1,137 +0,0 @@ -<?php - -$html = ' -<style> -ol, ul { text-align: justify; -} - -.lista { list-style-type: upper-roman; } -.listb{ list-style-type: decimal; font-family: sans-serif; color: blue; font-weight: bold; font-style: italic; font-size: 19pt; } -.listc{ list-style-type: upper-alpha; text-indent: 25mm; } -.listd{ list-style-type: lower-alpha; color: teal; line-height: 2; } -.liste{ list-style-type: disc; } -</style> - - -<h1>mPDF</h1> -<h2>Lists</h2> - -<div style="background-color:#ddccff; padding:0pt; border: 1px solid #555555;"> -<ol class="lista"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listb"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum. -</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol> -<li>No class specified. Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -</ol> -</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</div> -'; -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('-s'); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->WriteHTML($html); - -$mpdf->list_align_style = 'L'; // Determines alignment of numbers in numbered lists -$mpdf->list_number_suffix = ')'; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example09_forms.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example09_forms.php deleted file mode 100644 index ad324918e9429ede49574ff559f17d8987000f68..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example09_forms.php +++ /dev/null @@ -1,206 +0,0 @@ -<?php - - - - -define('_MPDF_PATH','../'); -include("../mpdf.php"); - - -$html = ' -<form> - -<b>Textarea</b> -<textarea name="authors" rows="5" cols="80" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> - -<b>Select</b> -<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> followed by text -<br /><br /> - - - -<b>Input Radio</b> -<input type="radio" name="pre_publication" value="0" checked="checked" > No <input type="radio" name="pre_publication" value="1" > Yes -<br /><br /> - - -<b>Input Radio</b> -<input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice -<br /><br /> - - -<b>Input Text</b> -<input type="text" size="190" name="doi" value="10.1258/jrsm.100.5.211"> -<br /><br /> - -<b>Input Password</b> -<input type="password" size="40" name="password" value="secret"> -<br /><br /> - - -<input type="checkbox" name="QPC" value="ON" /> Checkboxes<br> -<input type="checkbox" name="QPA" value="ON" disabled="disabled" /> Disabled<br> -<input type="checkbox" name="QLY" value="ON" checked="checked" /> Selected -<br /><br /> - -<input type="submit" name="submit" value="Submit" /><br /><br /> - -</form> - -<hr style="width:80%;" /> - -<div> -<form> - -<b>Textarea</b> -<textarea name="authors" rows="5" cols="50" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> - - - -<b>Select</b> -<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> -<br /><br /> - -<b>Input Radio</b> -<input type="radio" name="pre_publication" value="0" checked="checked" > No <input type="radio" name="pre_publication" value="1" > Yes -<br /><br /> - - -<b>Input Radio</b> -<input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice -<br /><br /> - - -<b>Input Text</b> -<input type="text" size="40" name="doi" value="10.1258/jrsm.100.5.211" /> -<br /> - -<b>Input Password</b> -<input type="password" size="40" name="password" value="secret"> -<br /><br /> - -<input type="checkbox" name="QPC" value="ON" /> Checkboxes<br> -<input type="checkbox" name="QPA" value="ON" disabled="disabled" /> Disabled<br> -<input type="checkbox" name="QLY" value="ON" checked="checked" /> Selected -<br /><br /> - -<input type="submit" name="submit" value="Submit" /><br /><br /> - -</form> - -</div> -<hr style="width:100%;" /> - - -<form> - -<table border="1" style="padding:2px;" > - -<tr><td valign="top" align="right"><b>Textarea</b></td><td><textarea name="title" rows="5" cols="50" wrap="virtual">TEXTINTABLE Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea></td></tr> - - - - -<tr><td valign="top" align="right"><b>Select</b></td><td><select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> <input type="hidden" name="old_status" value="A" /> </td></tr> - -<tr><td valign="bottom" align="right"><b>Input Radio</b></td><td><input type="radio" name="pre_publication" value="0" checked > No <input type="radio" name="pre_publication" value="1" > Yes </td></tr> - - -<tr><td valign="top" align="right"><b>Input Radio</b></td><td><input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice </td></tr> - -<tr><td valign="top" align="right"><b>Input Text</b></td><td><input type="text" size="40" name="doi" value="10.1258/jrsm.100.5.211"> </td> -</tr> -</table> - -<br /> -<table border="1" style="padding:8px;"> - -<tr><td valign="top" align="right"><b>Checkbox</b></td><td></td></tr> - -<tr><td><input type="checkbox" name="QPC" value="ON" > Checkboxes<br></td><td><input type="checkbox" name="QSC" value="ON" > Gardening</td></tr> - -<tr><td><input type="checkbox" name="QPA" value="ON" > Holidays<br></td><td><input type="checkbox" name="QPD" value="ON" > Motoring<br></td></tr> - -<tr><td><input type="checkbox" name="QLY" value="ON" checked="checked" > Books</td><td><input type="checkbox" name="QCA" value="ON" > Theatre</td></tr> - -<tr><td><input type="checkbox" name="QNU" value="ON" checked="checked" > Selected option</td><td><input type="checkbox" name="QET" value="ON" > Musicals</td></tr><tr><td><input type="checkbox" name="QBE" value="ON" > Eating out</td><td><input type="checkbox" name="QPY" value="ON" > Events</td></tr> - - - -<tr><td> -<input type="submit" name="submit" value="Submit" /><br /> -</td><td></td></tr></table> -</form> - - -<form> - -<b>Input Radio</b> -<input type="radio" name="pre_publication" value="0" checked="checked" > No <input type="radio" name="pre_publication" value="1" > Yes - -<br /><br /> - -<input type="hidden" name="doi" value="10.1258/jrsm.100.5.211" /> - -<b>Input Radio</b> -<input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice - -<br /><br /> - - -<b>Input Text</b><br /> - -Input text: <input type="text" size="40" name="doi" value="10.1258/jrsm.100.5.211" /> <br /> - -Password: <input type="password" size="40" name="doi" value="pallcare" /> -<br /><br /> - -Checkboxes: <br /> -<input type="checkbox" name="QPC" value="ON" /> Checkboxes<br> -<input type="checkbox" name="QPA" value="ON" disabled="disabled" /> Disabled<br> -<input type="checkbox" name="QLY" value="ON" checked="checked" /> Selected -<br /><br /> - -<input type="image" name="submit" src="goto.gif" /> -<input type="button" name="submit" value="Button" /> -<input type="reset" name="submit" value="Reset" /> -<input type="submit" name="submit" value="Submit" /> -</form> - -'; - -//============================================================== -//============================================================== -//============================================================== -if (isset($_REQUEST['html'])) { echo '<html><head><style>'.file_get_contents('mpdfstyletables.css').'</style></head><body>'.$html.'</body></html>'; exit; } -if (isset($_REQUEST['source'])) { - $file = __FILE__; - header("Content-Type: text/plain"); - header("Content-Length: ". filesize($file)); - header("Content-Disposition: attachment; filename='".$file."'"); - readfile($file); - exit; -} -//============================================================== -//============================================================== -//============================================================== - -$mpdf=new mPDF('c'); - -$mpdf->default_lineheight_correction = 1.2; - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyletables.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->SetColumns(2,'J'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example10_floating_and_fixed_position_elements.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example10_floating_and_fixed_position_elements.php deleted file mode 100644 index 9a4ab1b96b02d970d2f7c6d0b780ad3283ec29b9..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example10_floating_and_fixed_position_elements.php +++ /dev/null @@ -1,103 +0,0 @@ -<?php - -$html = ' -<style> -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; -} -h4 { - font-family: sans; - font-weight: bold; - margin-top: 1em; - margin-bottom: 0.5em; -} -div { - padding:1em; - margin-bottom: 1em; - text-align:justify; -} -.myfixed1 { position: absolute; - overflow: visible; - left: 0; - bottom: 0; - border: 1px solid #880000; - background-color: #FFEEDD; - background-gradient: linear #dec7cd #fff0f2 0 1 0 0.5; - padding: 1.5em; - font-family:sans; - margin: 0; -} -.myfixed2 { position: fixed; - overflow: auto; - right: 0; - bottom: 0mm; - width: 65mm; - border: 1px solid #880000; - background-color: #FFEEDD; - background-gradient: linear #dec7cd #fff0f2 0 1 0 0.5; - padding: 0.5em; - font-family:sans; - margin: 0; - rotate: 90; -} -</style> - -<body> -<h1>mPDF</h1> -<h2>Floating & Fixed Position elements</h2> - -<h4>CSS "Float"</h4> -<div class="gradient"> -Block elements can be positioned alongside each other using the CSS property float: left or right. The clear property can also be used, set as left|right|both. Float is only supported on block elements (i.e. not SPAN etc.) and is not fully compliant with the CSS specification. -Float only works properly if a width is set for the float, otherwise the width is set to the maximum available (full width, or less if floats already set). -<br /> -Margin-right can still be set for a float:right and vice-versa. -<br /> -A block element next to a float has the padding adjusted so that content fits in the remaining width. Text next to a float should wrap correctly, but backgrounds and borders will overlap and/or lie under the floats in a mess. -<br /> -NB The width that is set defines the width of the content-box. So if you have two floats with width=50% and either of them has padding, margin or border, they will not fit together on the page. -</div> - -<div class="gradient" style="float: right; width: 28%; margin-bottom: 0pt; "> -<img src="tiger.wmf" style="float:right" width="70" />This is text in a <div> element that is set to float:right and width:28%. It also has an image with float:right inside. With this exception, you cannot nest elements with the float property set inside one another. -</div> -<div class="gradient" style="float: left; width: 54%; margin-bottom: 0pt; "> -This is text in a <div> element that is set to float:left and width:54%. -</div> - -<div style="clear: both; margin: 0pt; padding: 0pt; "></div> -This is text that follows a <div> element that is set to clear:both. - -<h4>CSS "Position"</h4> -At the bottom of the page are two DIV elements with position:fixed and position:absolute set - -<div class="myfixed1">1 Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div> - -<div class="myfixed2">2 Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div> - - -'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('s'); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->WriteHTML($html); // Separate Paragraphs defined by font - -$mpdf->Output(); - -exit; - -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example11_overflow_auto.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example11_overflow_auto.php deleted file mode 100644 index 6fd990fb71c70a523e8dbe69a34b7f6037e401a6..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example11_overflow_auto.php +++ /dev/null @@ -1,81 +0,0 @@ -<?php - -$html = ' -<div style="position:fixed; left: 0; right: 0; bottom: 0; top: 0;"> -<h1>mPDF</h1> -<h4>Fixed-position block element with Autofit</h4> -<div>Using the CSS properties position and overflow:auto it is possible to fit text to a single page:</div> - -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<div><img src="tiger.wmf" style="float:right;">DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> -<div><img src="klematis.jpg" style="opacity: 0.5; float: left;" />DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> - -<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote> - -<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address> - -<div><a href="dummy'.time().'">Hyperlink (<a>)</a></div> -<div><a href="#top">Hyperlink (<a>)</a></div> -<div><a href="http://www.pallcare.info">Hyperlink (<a>)</a></div> - -<div>Styles - <tt>tt(teletype)</tt> <i>italic</i> <b>bold</b> <big>big</big> <small>small</small> <em>emphasis</em> <strong>strong</strong> <br />new lines<br> -<code>code</code> <samp>sample</samp> <kbd>keyboard</kbd> <var>variable</var> <cite>citation</cite> <abbr>abbr.</abbr> <acronym>ACRONYM</acronym> <sup>sup</sup> <sub>sub</sub> <strike>strike</strike> <s>strike-s</s> <u>underline</u> <del>delete</del> <ins>insert</ins> <q>To be or not to be</q> <font face="sans-serif" color="#880000" size="5">font changing face, size and color</font> -</div> - -<p style="font-size:15pt; color:#440066">Paragraph using the in-line style to determine the font-size (15pt) and colour</p> - -<h3>Testing BIG, SMALL, UNDERLINE, STRIKETHROUGH, FONT color, ACRONYM, SUPERSCRIPT and SUBSCRIPT</h3> -<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline and <s>strikethrough and <sup>sup</sup></s></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p>The above repeated, but starting with a paragraph with font-size specified (7pt)</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <small>small <s>strikethrough</s> in small span</small> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><small>This tests <u>underline</u> and <s>strikethrough</s> when they are <s><u>used together</u></s> as they both use text-decoration</small></p> - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p style="font-size:7pt;"><big>Repeated in BIG but with font-size set to 7pt by in-line css: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> - -<p>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p> -</div> - -'; - - - - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('c'); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; - -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example12_paging_html.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example12_paging_html.php deleted file mode 100644 index 44c5374dda95ecc8a7e1a3a52beeb2132713d896..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example12_paging_html.php +++ /dev/null @@ -1,92 +0,0 @@ -<?php - - -$html = ' - -<pageheader name="myHeaderNoNum" content-left="My Book Title" content-center="myHeader1" content-right="" header-style="font-family:sans-serif; font-size:8pt; color:#880000;" header-style-right="font-size:12pt; font-weight:bold; font-style:italic; color:#088000;" line="on" /> - -<pageheader name="myHeaderNoNumEven" content-left="" content-center="myHeader1Even" content-right="{DATE j-m-Y}" header-style="font-family:sans-serif; font-size:8pt; color:#000088;" header-style-left="font-weight:bold; " line="on" /> - -<pageheader name="myHeader1" content-left="My Book Title" content-center="myHeader1" content-right="{PAGENO}" header-style="font-family:sans-serif; font-size:8pt; color:#880000;" header-style-right="font-size:12pt; font-weight:bold; font-style:italic; color:#088000;" line="on" /> - -<pageheader name="myHeader1Even" content-left="{PAGENO}" content-center="myHeader1Even" content-right="{DATE j-m-Y}" header-style="font-family:sans-serif; font-size:8pt; color:#000088;" header-style-left="font-weight:bold; " line="on" /> - - -<htmlpageheader name="myHTMLHeader1" style="display:none"> -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td> -</tr></table> -</htmlpageheader> - -<htmlpageheader name="myHTMLHeader1Even" style="display:none"> -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%"><span style="font-weight: bold;">Outer header</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td> -</tr></table> -</htmlpageheader> - -<pagefooter name="myFooter1" content-left="My Book Title" content-center="myFooter1" content-right="{PAGENO}" footer-style="font-family:sans-serif; font-size:8pt; font-weight:bold; color:#008800;" footer-style-left="" line="on" /> - -<pagefooter name="myFooter1Even" content-left="{PAGENO}" content-center="myFooter1Even" content-right="{DATE j-m-Y}" footer-style="font-family:sans-serif; font-size:10pt; color:#000880;" footer-style-left="font-weight:bold; " line="on" /> - - -<setpageheader name="myHeaderNoNum" page="O" value="on" show-this-page="1" /> -<setpageheader name="myHeaderNoNumEven" page="E" value="on" /> - -<h1 style="margin-collapse: none; margin-top: 35mm">Introduction</h1> -<div>Introduction</div> -<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. <!--Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. -->Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p> - -<tocpagebreak toc-orientation="landscape" font="mono" font-size="12" indent="5" paging="on" links="on" resetpagenum="1" suppress="off" pagenumstyle="1" orientation="portrait" margin-top="55mm" odd-header-name="myHeader1" odd-header-value="1" even-header-name="html_myHTMLHeader1Even" even-header-value="1" odd-footer-name="myFooter1" odd-footer-value="1" even-footer-name="myFooter1Even" even-footer-value="1" toc-odd-header-name="myHeaderNoNum" toc-odd-header-value="1" toc-even-header-name="myHeaderNoNumEven" toc-even-header-value="1" toc-odd-footer-name="" toc-odd-footer-value="-1" toc-even-footer-name="" toc-even-footer-value="-1" /> - -<h1>Section 2<tocentry content="Section 2" /></h1> -<div>Section 2</div> -<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p> - -<pagebreak type="NEXT-ODD" margin-left="60mm" margin-right="40mm" margin-top="55mm" margin-bottom="30mm" margin-header="12mm" margin-footer="12mm" odd-header-name="html_myHTMLHeader1" odd-header-value="1" even-header-name="myHeader1Even" even-header-value="1" odd-footer-name="myFooter1" odd-footer-value="1" even-footer-name="myFooter1Even" even-footer-value="1" /> - -<h1>Section 3<tocentry content="Section 3" /></h1> -<div>Section 3</div> -<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p> - -<pagebreak orientation="landscape" type="NEXT-ODD" margin-left="60mm" margin-right="40mm" margin-top="55mm" margin-bottom="30mm" margin-header="12mm" margin-footer="12mm" /> - -<h1>Section 4<tocentry content="Section 4" /></h1> -<div>Section 4</div> -<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p> - - -<pagebreak orientation="portrait" type="NEXT-ODD" margin-left="40mm" margin-right="20mm" odd-header-name="myHeader1" odd-header-value="1" even-header-name="myHeader1Even" even-header-value="1" odd-footer-name="myFooter1" odd-footer-value="1" even-footer-name="myFooter1Even" even-footer-value="1" suppress="off" /> - - -<h1>Section 5<tocentry content="Section 5" /></h1> -<div>Section 5</div> -<p>Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p> - -'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); -$mpdf=new mPDF('c'); - -$mpdf->mirrorMargins = true; - -$mpdf->SetDisplayMode('fullpage','two'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example13_paging_css.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example13_paging_css.php deleted file mode 100644 index fc4cf4be61e8fd03c32651c93d0ccdf91ab705f4..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example13_paging_css.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - - - -$html = ' -<htmlpageheader name="myHTMLHeaderOdd" style="display:none"> -<div style="background-color:#BBEEFF" align="center"><b>{PAGENO}</b></div> -</htmlpageheader> -<htmlpageheader name="myHTMLHeaderEven" style="display:none"> -<div style="background-color:#EFFBBE" align="center"><b><i>{PAGENO}</i></b></div> -</htmlpageheader> -<htmlpagefooter name="myHTMLFooterOdd" style="display:none"> -<div style="background-color:#CFFFFC" align="center"><b>{PAGENO}</b></div> -</htmlpagefooter> -<htmlpagefooter name="myHTMLFooterEven" style="display:none"> -<div style="background-color:#FFCCFF" align="center"><b><i>{PAGENO}</i></b></div> -</htmlpagefooter> - - -<pageheader name="myHeader2Odd" content-left="My Book Title" content-center="myHeader2Odd" content-right="{PAGENO}" header-style="font-family:sans-serif; font-size:8pt; font-weight:bold; color:#008800;" header-style-left="" line="on" /> - -<pagefooter name="myFooter2Even" content-left="{PAGENO}" content-center="myFooter2Even" content-right="{DATE j-m-Y}" footer-style="font-family:sans-serif; font-size:10pt; color:#000880;" footer-style-left="font-weight:bold; " line="on" /> - - -<h1 class="heading1">mPDF 1</h1> -<h2>Paged Media using CSS</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> - - -<h1 class="heading2">mPDF 2</h1> -<h2>Paged Media using CSS</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> - - -<h1 class="heading3">mPDF 3</h1> -<h2>Paged Media using CSS</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> - - -<h1 class="heading4">mPDF 4</h1> -<h2>Paged Media using CSS</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> - - -<h1 class="heading5">mPDF 5</h1> -<h2>Paged Media using CSS</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> - - -<h1 class="heading6">mPDF 6</h1> -<h2>Paged Media using CSS</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> - - -<h1 class="heading7">mPDF 7</h1> -<h2>Paged Media using CSS</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> - -'; -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('en-GB-x','A4','','',5,5,5,5,0,0); - -$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins (1 or 0) - -$mpdf->SetDisplayMode('fullpage','two'); - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstylePaged.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example14_page_numbers_ToC_Index_Bookmarks.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example14_page_numbers_ToC_Index_Bookmarks.php deleted file mode 100644 index 70066001b39953e2a8b47029572dd407a1bb772c..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example14_page_numbers_ToC_Index_Bookmarks.php +++ /dev/null @@ -1,207 +0,0 @@ -<?php - - - -//============================================================== -$lorem = "<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p><p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin vel sem at odio varius pretium. Maecenas sed orci. Maecenas varius. Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing. </p><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p>"; -//============================================================== -//============================================================== -//============================================================== -// Set Header and Footer for ToC -$h = array ( - 'odd' => - array ( - 'R' => - array ( - 'content' => 'Odd Header for ToC', - 'font-size' => 8, - 'font-style' => 'B', - 'font-family' => 'DejaVuSansCondensed', - ), - 'line' => 1, - ), - 'even' => - array ( - 'L' => - array ( - 'content' => 'Even Header for ToC', - 'font-size' => 8, - 'font-style' => 'B', - 'font-family' => 'DejaVuSansCondensed', - ), - 'line' => 1, - ), -); - -$f = array ( - 'odd' => - array ( - 'L' => - array ( - 'content' => '{DATE Y-m-d}', - 'font-size' => 8, - 'font-style' => 'BI', - 'font-family' => 'DejaVuSansCondensed', - ), - 'C' => - array ( - 'content' => 'Odd Footer for ToC', - 'font-size' => 8, - 'font-style' => '', - 'font-family' => '', - ), - 'R' => - array ( - 'content' => 'My Handbook', - 'font-size' => 8, - 'font-style' => 'BI', - 'font-family' => 'DejaVuSansCondensed', - ), - 'line' => 1, - ), - 'even' => - array ( - 'L' => - array ( - 'content' => 'My Handbook', - 'font-size' => 8, - 'font-style' => 'BI', - 'font-family' => 'DejaVuSansCondensed', - ), - 'C' => - array ( - 'content' => 'Even Footer for ToC', - 'font-size' => 8, - 'font-style' => '', - 'font-family' => '', - ), - 'R' => - array ( - 'content' => '{DATE Y-m-d}', - 'font-size' => 8, - 'font-style' => 'BI', - 'font-family' => 'DejaVuSansCondensed', - ), - 'line' => 0, - ), -); - -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('en-GB-x','A4','','',32,25,27,25,16,13); - -$mpdf->mirrorMargins = 1; - -$mpdf->SetDisplayMode('fullpage','two'); - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyleA4.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML('<h1>mPDF</h1><h2>Table of Contents & Bookmarks</h2>',2); - - - -// TOC TABLE OF CONTENTS and INDEX+++++++++++++++++++++++++++++++++++++++++++++ -//$mpdf->WriteHTML('<pagebreak type="E" />'); -//$mpdf->WriteHTML('<TOC font="" font-size="" indent="5" resetpagenum="1" pagenumstyle="A", suppress="off" />'); - - -$mpdf->TOCpagebreakByArray(array( - 'tocfont' => '', - 'tocfontsize' => '', - 'tocindent' => '5', - 'TOCusePaging' => true, - 'TOCuseLinking' => '', - 'toc_orientation' => '', - 'toc_mgl' => '45', - 'toc_mgr' => '35', - 'toc_mgt' => '', - 'toc_mgb' => '', - 'toc_mgh' => '', - 'toc_mgf' => '', - 'toc_ohname' => '', - 'toc_ehname' => '', - 'toc_ofname' => '', - 'toc_efname' => '', - 'toc_ohvalue' => 0, - 'toc_ehvalue' => 0, - 'toc_ofvalue' => -1, - 'toc_efvalue' => -1, - 'toc_preHTML' => '<h2>Contents</h2>', - 'toc_postHTML' => '', - 'toc_bookmarkText' => 'Content list', - 'resetpagenum' => '1', - 'pagenumstyle' => 'A', - 'suppress' => 'off', - 'orientation' => '', - 'mgl' => '', - 'mgr' => '', - 'mgt' => '', - 'mgb' => '', - 'mgh' => '', - 'mgf' => '', - 'ohname' => '', - 'ehname' => '', - 'ofname' => '', - 'efname' => '', - 'ohvalue' => 0, - 'ehvalue' => 0, - 'ofvalue' => 0, - 'efvalue' => 0, - 'toc_id' => 0, - 'pagesel' => '', - 'toc_pagesel' => '', - 'sheetsize' => '', - 'toc_sheetsize' => '' - )); - - -$mpdf->setHTMLFooter('<div align="center"><b>{PAGENO} / {nbpg}</b></div>') ; -$mpdf->setHTMLFooter('<div align="center"><b><i>{PAGENO} / {nbpg}</i></b></div>','E') ; - - -//============================================================== -for ($j = 1; $j<7; $j++) { - if ($j==2) $mpdf->WriteHTML('<pagebreak resetpagenum="0" pagenumstyle="a" />',2); - if ($j==3) $mpdf->WriteHTML('<pagebreak resetpagenum="1" pagenumstyle="I" />',2); - if ($j==4) $mpdf->WriteHTML('<pagebreak resetpagenum="0" pagenumstyle="i" />',2); - if ($j==5) $mpdf->WriteHTML('<pagebreak resetpagenum="0" pagenumstyle="1" />',2); - if ($j==6) $mpdf->WriteHTML('<pagebreak resetpagenum="1" pagenumstyle="A" type="NEXT-ODD" /><div style="color:#AA0000">ODD</div>',2); - for ($x = 1; $x<7; $x++) { - $mpdf->WriteHTML('<h4>Section '.$j.'.'.$x.'<bookmark content="Section '.$j.'.'.$x.'" level="0" /><tocentry content="Section '.$j.'.'.$x.'" level="0" /></h4>',2); - $html = ''; - // Split $lorem into words - $words = preg_split('/([\s,\.]+)/',$lorem,-1,PREG_SPLIT_DELIM_CAPTURE); - foreach($words as $i => $e) { - if($i%2==0) { - $y = rand(1,10); // every tenth word - if (preg_match('/^[a-zA-Z]{4,99}$/',$e) && ($y > 8)) { - // If it is just a word use it as an index entry - $content = ucfirst(trim($e)); - $html .= '<indexentry content="'.$content.'" />'; - $html .= '<i>'.$e . '</i>'; - } - else { $html .= $e; } - } - else { $html .= $e; } - } - $mpdf->WriteHTML($html); - } -} -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -// Index - This should be inserted where it is intended to appear in the document - $mpdf->AddPage('','E'); - $mpdf->AddPage(); - $mpdf->WriteHTML('<h2>Index</h2>',2); - $mpdf->CreateIndex(2, '', '', 5, 1, 15, 5, 'trebuchet','sans-serif',true); - - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example15_headers_method_1.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example15_headers_method_1.php deleted file mode 100644 index 7943bde878f3714885317e7cb62e426d46a78752..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example15_headers_method_1.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php - -include("../mpdf.php"); - -$mpdf=new mPDF('c'); - -$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins - -$mpdf->defaultheaderfontsize = 10; /* in pts */ -$mpdf->defaultheaderfontstyle = B; /* blank, B, I, or BI */ -$mpdf->defaultheaderline = 1; /* 1 to include line below header/above footer */ - -$mpdf->defaultfooterfontsize = 12; /* in pts */ -$mpdf->defaultfooterfontstyle = B; /* blank, B, I, or BI */ -$mpdf->defaultfooterline = 1; /* 1 to include line below header/above footer */ - - -$mpdf->SetHeader('{DATE j-m-Y}|{PAGENO}/{nb}|My document'); -$mpdf->SetFooter('{PAGENO}'); /* defines footer for Odd and Even Pages - placed at Outer margin */ - -$mpdf->SetFooter(array( - 'L' => array( - 'content' => 'Text to go on the left', - 'font-family' => 'sans-serif', - 'font-style' => 'B', /* blank, B, I, or BI */ - 'font-size' => '10', /* in pts */ - ), - 'C' => array( - 'content' => '- {PAGENO} -', - 'font-family' => 'serif', - 'font-style' => 'BI', - 'font-size' => '18', /* gives default */ - ), - 'R' => array( - 'content' => 'Printed @ {DATE j-m-Y H:m}', - 'font-family' => 'monospace', - 'font-style' => '', - 'font-size' => '10', - ), - 'line' => 1, /* 1 to include line below header/above footer */ -), 'E' /* defines footer for Even Pages */ -); - - -$html = ' -<h1>mPDF</h1> -<h2>Headers & Footers Method 1</h2> -<h3>Odd / Right page</h3> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -<pagebreak /> -<h3>Even / Left page</h3> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -'; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example16_headers_method_2.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example16_headers_method_2.php deleted file mode 100644 index 0e8c4e419fd98ab9b3853ebdfd99a5b36487be52..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example16_headers_method_2.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php - -include("../mpdf.php"); - -$mpdf=new mPDF('en-x','A4','','',32,25,47,47,10,10); - -$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins - -$header = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td> -</tr></table> -'; -$headerE = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%"><span style="font-weight: bold;">Outer header</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td> -</tr></table> -'; - -$footer = '<div align="center">See <a href="http://mpdf1.com/manual/index.php">documentation manual</a></div>'; -$footerE = '<div align="center">See <a href="http://mpdf1.com/manual/index.php">documentation manual</a></div>'; - - -$mpdf->SetHTMLHeader($header); -$mpdf->SetHTMLHeader($headerE,'E'); -$mpdf->SetHTMLFooter($footer); -$mpdf->SetHTMLFooter($footerE,'E'); - - -$html = ' -<h1>mPDF</h1> -<h2>Headers & Footers Method 2</h2> -<h3>Odd / Right page</h3> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -<pagebreak /> -<h3>Even / Left page</h3> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -'; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example17_headers_method_3.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example17_headers_method_3.php deleted file mode 100644 index 3fd4b96463f5203bd51c39f882951e36bd2b440c..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example17_headers_method_3.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - - - -$html = ' -<!-- defines the headers/footers - this must occur before the headers/footers are set --> - -<!--mpdf -<pageheader name="odds" content-right="My document" header-style-right="color: #880000; font-style: italic;" line="1" /> -<pageheader name="evens" content-right="{DATE j-m-Y}" content-center="{PAGENO}/{nb}" header-style="color: #880000; font-style: italic;" /> -<pagefooter name="odds" content-right="Odd Footer" footer-style-right="color: #880000; font-style: italic;" line="1" /> -<pagefooter name="evens" content-right="{DATE j-m-Y}" content-center="{PAGENO}/{nb}" footer-style="color: #880000; font-style: italic;" /> - -<pageheader name="display" content-center="New header called Display" header-style="color: #000088; font-weight: bold;" /> -mpdf--> - -<!-- set the headers/footers - they will occur from here on in the document --> -<!--mpdf -<setpageheader name="odds" page="odd" value="on" show-this-page="1" /> -<setpageheader name="evens" page="even" value="1" /> -<setpagefooter name="odds" page="O" value="on" /> -<setpagefooter name="evens" page="E" value="1" /> -mpdf--> - -<h1>mPDF</h1> -<h2>Headers & Footers Method 3</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -<pagebreak /> - -<h2>Headers & Footers Method 3</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<pagebreak odd-header-name="display" odd-header-value="1" even-header-name="display" even-header-value="1" /> - -<h2>Headers & Footers</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -'; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('en-GB-x','A4','','',32,25,27,25,16,13); - -$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example18_headers_method_4.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example18_headers_method_4.php deleted file mode 100644 index 251d6cd7f8a8c4dc8d99942493de9b489ed5a5f5..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example18_headers_method_4.php +++ /dev/null @@ -1,84 +0,0 @@ -<?php - - - -$html = ' -<!-- defines the headers/footers - this must occur before the headers/footers are set --> - -<!--mpdf - -<htmlpageheader name="myHTMLHeader1"> -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;"><span style="font-weight: bold;">myHTMLHeader1</span></td> -</tr></table> -</htmlpageheader> - -<htmlpageheader name="myHTMLHeader1Even"> -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%"><span style="font-weight: bold;">myHTMLHeader1Even</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td> -</tr></table> -</htmlpageheader> - -<htmlpageheader name="myHTMLHeader2"> -<table width="100%" style="border-bottom: 1px solid #880000; vertical-align: bottom; font-family: sans; font-size: 9pt; color: #880000;"><tr> -<td width="33%">myHTMLHeader2 p.<span style="font-size:14pt;">{PAGENO}</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;"><span style="font-weight: bold;">myHTMLHeader2</span></td> -</tr></table> -</htmlpageheader> - -<htmlpageheader name="myHTMLHeader2Even"> -<table width="100%" style="border-bottom: 1px solid #880000; vertical-align: bottom; font-family: sans; font-size: 9pt; color: #880000;"><tr> -<td width="33%"><span style="font-weight: bold;">myHTMLHeader2Even</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td> -</tr></table> -</htmlpageheader> - -mpdf--> - -<!-- set the headers/footers - they will occur from here on in the document --> -<!--mpdf -<sethtmlpageheader name="myHTMLHeader1" page="O" value="on" show-this-page="1" /> -<sethtmlpageheader name="myHTMLHeader1Even" page="E" value="on" /> -mpdf--> - -<h1>mPDF</h1> -<h2>Headers & Footers Method 4</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -<pagebreak /> - -<h2>Headers & Footers Method 4</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<!-- Note the html_ prefix when referencing an HTML header using one of the pagebreaks --> -<pagebreak odd-header-name="html_myHTMLHeader2" odd-header-value="1" even-header-name="html_myHTMLHeader2Even" even-header-value="1" /> - -<h2>Headers & Footers Method 4</h2> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> -'; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('en-x','A4','','',32,25,47,47,10,10); - -$mpdf->mirrorMargins = 1; // Use different Odd/Even headers and footers and mirror margins - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example19_page_sizes.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example19_page_sizes.php deleted file mode 100644 index 6c3ca9453d7a35758f15de5079192bb68f2d7014..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example19_page_sizes.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - - - -$hhtml = ' -<htmlpageheader name="myHTMLHeaderOdd" style="display:none"> -<div style="background-color:#BBEEFF" align="center"><b> {PAGENO} </b></div> -</htmlpageheader> -<htmlpagefooter name="myHTMLFooterOdd" style="display:none"> -<div style="background-color:#CFFFFC" align="center"><b> {PAGENO} </b></div> -</htmlpagefooter> -<sethtmlpageheader name="myHTMLHeaderOdd" page="O" value="on" show-this-page="1" /> -<sethtmlpagefooter name="myHTMLFooterOdd" page="O" value="on" show-this-page="1" /> -'; - -//============================================================== -$html = ' -<h1>mPDF Page Sizes</h1> -<h3>Changing page (sheet) sizes within the document</h3> -'; -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('c','A4'); - -$mpdf->WriteHTML($hhtml); - -$mpdf->WriteHTML($html); -$mpdf->WriteHTML('<p>This should print on an A4 (portrait) sheet</p>'); - -$mpdf->WriteHTML('<tocpagebreak sheet-size="A4-L" toc-sheet-size="A5" toc-preHTML="This ToC should print on an A5 sheet" />'); -$mpdf->WriteHTML($html); -$mpdf->WriteHTML('<tocentry content="A4 landscape" /><p>This page appears just after the ToC and should print on an A4 (landscape) sheet</p>'); - -$mpdf->WriteHTML('<pagebreak sheet-size="A5-L" />'); -$mpdf->WriteHTML($html); -$mpdf->WriteHTML('<tocentry content="A5 landscape" /><p>This should print on an A5 (landscape) sheet</p>'); - -$mpdf->WriteHTML('<pagebreak sheet-size="Letter" />'); -$mpdf->WriteHTML($html); -$mpdf->WriteHTML('<tocentry content="Letter portrait" /><p>This should print on an Letter sheet</p>'); - -$mpdf->WriteHTML('<pagebreak sheet-size="150mm 150mm" />'); -$mpdf->WriteHTML($html); -$mpdf->WriteHTML('<tocentry content="150mm square" /><p>This should print on a sheet 150mm x 150mm</p>'); - -$mpdf->WriteHTML('<pagebreak sheet-size="11.69in 8.27in" />'); -$mpdf->WriteHTML($html); -$mpdf->WriteHTML('<tocentry content="A4 landscape (ins)" /><p>This should print on a sheet 11.69in x 8.27in = A4 landscape</p>'); - - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example20_justify.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example20_justify.php deleted file mode 100644 index a6bf2005ae8f7fdaa4e110d582ac35f2d909527a..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example20_justify.php +++ /dev/null @@ -1,147 +0,0 @@ -<?php - - -$html = ' -<h1>mPDF</h1> -<h2>Justification</h2> - -<h4>Tables</h4> -<p>Text can be justified in table cells using in-line or stylesheet CSS. (Note that <p> tags are removed within cells along with any style definition or attributes.)</p> -<table class="bpmTopnTailC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td style="text-align:justify;"><p>Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </p></td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> -<p> </p> - -<h4>Testing Justification with Long Words</h4> -<p>http://www-950.ibm.com/software/globalization/icu/demo/converters?s=ALL&snd=4356&dnd=4356</p> -<h5>Should not split</h5> -<p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplit</i> neque sit amet erat</p> -<p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend et <i>verylongwordthatwontsplit</i> neque sit amet erat</p> - -<h5>Non-breaking Space &nbsp;</h5><p>The next example has a non-breaking space between <i>eleifend</i> and the very long word.</p><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend verylongwordthatwontsplitanywhere neque sit amet erat</p><p>Nbsp will only work in fonts that have a glyph to represent the character i.e. not in the CJK languages nor some Unicode fonts.</p> - - - -<h4>Testing Justification with mixed Styles</h4> -<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> -<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s> and then more text. -</p> -<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big> -</p> -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small> -</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> -<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s> then more text. -</p> -<p></p> -<p style="font-size:7pt;"> -<big>Repeated in BIG: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big> -</p> -'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13); - -$mpdf->SetDisplayMode('fullpage'); - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyletables.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); - -// SPACING -$mpdf->WriteHTML("<h4>Spacing</h4><p>mPDF uses both letter- and word-spacing for text justification. The default is a mixture of both, set by the configurable values jSWord and jSmaxChar. (Only word spacing is used when cursive languages such as Arabic or Indic are detected.) </p>"); - -$mpdf->jSWord = 0; // Proportion (/1) of space (when justifying margins) to allocate to Word vs. Character -$mpdf->jSmaxChar = 0; // Maximum spacing to allocate to character spacing. (0 = no maximum) -$mpdf->WriteHTML("<h5>Character spacing</h5><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>"); - -// Back to default settings -$mpdf->jSWord = 0.4; -$mpdf->jSmaxChar = 2; -$mpdf->WriteHTML("<h5>Word spacing</h5><p style=\"letter-spacing:0\">Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>"); - -$mpdf->WriteHTML("<h5>Mixed Character and Word spacing</h5><p>Maecenas feugiat pede vel risus. Nulla et lectus eleifend <i>verylongwordthatwontsplitanywhere</i> neque sit amet erat</p>"); - - -// ORPHANS -$mpdf->WriteHTML("<h4>Orphans</h4><p>Punctuation marks should not be split when the last word on a line is in <tags> eg <acronym>NATO</acronym>. The punctuation should go to the next line with the word if necessary.</p>"); - -$mpdf->WriteHTML("<p>Punctuation marks should not be split when the last word on a line is in <tags> e.g. <acronym>UNESCO</acronym>. The punctuation should go to the next line with the word if necessary.</p>"); - -$mpdf->WriteHTML("<p>Single marks .,?!;:\xe2\x80\x9e\xe2\x80\x9d should be preserved when last word on a line is in <tags> e.g. <acronym>NATO</acronym>? All of these are automatically protected in mPDF.</p>"); - - -$mpdf->orphansAllowed = 0; - -$mpdf->WriteHTML("<p>Similarly, sub and super texts should not be split when justifying text such as references<sup>23</sup>. (Note that this sentence has the orphansAllowed set to zero.) Altering the value of \$mpdf->orphansAllowed will determine how many extra characters can be preserved on a line; the next line allows 3 (default value 5):</p>"); - - -$mpdf->orphansAllowed = 3; - -$mpdf->WriteHTML("<p>Similarly, sub and super texts should not be split when justifying text such as references<sup>23</sup>. The references should go to the next line with the word if necessary, or remain on the same line.</p>"); - - - -$mpdf->Output(); -exit; - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example21_hyphenation.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example21_hyphenation.php deleted file mode 100644 index 18b525d5f1f13d3934e0f798a7ca4d42d9181eab..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example21_hyphenation.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php - - -$html = ' -<h1>Little Women</h1> -<h2>Chapter One</h2> -<h4>Playing Pilgrims</h4> - -<p> Christmas won\'t be Christmas without any presents, grumbled Jo, lying on the rug.<p> It\'s so dreadful to be poor! sighed Meg, looking down at her old dress.<p> I don\'t think it\'s fair for some girls to have plenty of pretty things, and other girls nothing at all, added little Amy, with an injured sniff.<p> We\'ve got Father and Mother, and each other, said Beth contentedly from her corner.<p>The four young faces on which the firelight shone brightened at the cheerful words, but darkened again as Jo said sadly, We haven\'t got Father, and shall not have him for a long time. She didn\'t say perhaps never, but each silently added it, thinking of Father far away, where the fighting was.<p>Nobody spoke for a minute; then Meg said in an altered tone, You know the reason Mother proposed not having any presents this Christmas was because it is going to be a hard winter for everyone; and she thinks we ought not to spend money for pleasure, when our men are suffering so in the army. We can\'t do much, but we can make our little sacrifices, and ought to do it gladly. But I am afraid I don\'t And Meg shook her head, as she thought regretfully of all the pretty things she wanted.<p> But I don\'t think the little we should spend would do any good. We\'ve each got a dollar, and the army wouldn\'t be much helped by our giving that. I agree not to expect anything from Mother or you, but I do want to buy UNDINE AND SINTRAM for myself. I\'ve wanted it so long, said Jo, who was a bookworm.<p> I planned to spend mine in new music, said Beth, with a little sigh, which no one heard but the hearth brush and kettle holder.<p> I shall get a nice box of Faber\'s drawing pencils. I really need them, said Amy decidedly.<p> Mother didn\'t say anything about our money, and she won\'t wish us to give up everything. Let\'s each buy what we want, and have a little fun. I\'m sure we work hard enough to earn it, cried Jo, examining the heels of her shoes in a gentlemanly manner.<p> I know I do—teaching those tiresome children nearly all day, when I\'m longing to enjoy myself at home, began Meg, in the complaining tone again.<p> You don\'t have half such a hard time as I do, said Jo. How would you like to be shut up for hours with a nervous, fussy old lady, who keeps you trotting, is never satisfied, and worries you till you you\'re ready to fly out the window or cry? <p> It\'s naughty to fret, but I do think washing dishes and keeping things tidy is the worst work in the world. It makes me cross, and my hands get so stiff, I can\'t practice well at all. And Beth looked at her rough hands with a sigh that any one could hear that time.<p> I don\'t believe any of you suffer as I do, cried Amy, for you don\'t have to go to school with impertinent girls, who plague you if you don\'t know your lessons, and laugh at your dresses, and label your father if he isn\'t rich, and insult you when your nose isn\'t nice. <p> If you mean libel, I\'d say so, and not talk about labels, as if Papa was a pickle bottle, advised Jo, laughing.<p> I know what I mean, and you needn\'t be satirical about it. It\'s proper to use good words, and improve your vocabulary, returned Amy, with dignity.<p> Don\'t peck at one another, children. Don\'t you wish we had the money Papa lost when we were little, Jo? Dear me! How happy and good we\'d be, if we had no worries! said Meg, who could remember better times.<p> You said the other day you thought we were a deal happier than the King children, for they were fighting and fretting all the time, in spite of their money. <p> So I did, Beth. Well, I think we are. For though we do have to work, we make fun of ourselves, and are a pretty jolly set, as Jo would say. <p> Jo does use such slang words! observed Amy, with a reproving look at the long figure stretched on the rug.<p>Jo immediately sat up, put her hands in her pockets, and began to whistle.<p> Don\'t, Jo. It\'s so boyish! <p> That\'s why I do it. <p> I detest rude, unladylike girls! <p> I hate affected, niminy-piminy chits! <p> Birds in their little nests agree, sang Beth, the peacemaker, with such a funny face that both sharp voices softened to a laugh, and the pecking ended for that time.<p> Really, girls, you are both to be blamed, said Meg, beginning to lecture in her elder-sisterly fashion. You are old enough to leave off boyish tricks, and to behave better, Josephine. It didn\'t matter so much when you were a little girl, but now you are so tall, and turn up your hair, you should remember that you are a young lady. <p> I\'m not! And if turning up my hair makes me one, I\'ll wear it in two tails till I\'m twenty, cried Jo, pulling off her net, and shaking down a chestnut mane. I hate to think I\'ve got to grow up, and be Miss March, and wear long gowns, and look as prim as a China Aster! It\'s bad enough to be a girl, anyway, when I like boy\'s games and work and manners! I can\'t get over my disappointment in not being a boy. And it\'s worse than ever now, for I\'m dying to go and fight with Papa. And I can only stay home and knit, like a poky old woman! <p>And Jo shook the blue army sock till the needles rattled like castanets, and her ball bounded across the room.<p> Poor Jo! It\'s too bad, but it can\'t be helped. So you must try to be contented with making your name boyish, and playing brother to us girls, said Beth, stroking the rough head with a hand that all the dish washing and dusting in the world could not make ungentle in its touch.<p> As for you, Amy, continued Meg, you are altogether to particular and prim. Your airs are funny now, but you\'ll grow up an affected little goose, if you don\'t take care. I I like your nice manners and refined ways of speaking, when you don\'t try to be elegant. But your absurd words are as bad as Jo\'s slang. <p> If Jo is a tomboy and Amy a goose, what am I, please? asked Beth, ready to share the lecture.<p> You\'re a dear, and nothing else, answered Meg warmly, and no one contradicted her, for the `Mouse\' was the pet of the family.<p>As young readers like to know `how people look\', we will take this moment to give them a little sketch of the four sisters, who sat knitting away in the twilight, while the December snow fell quietly without, and the fire crackled cheerfully within. It was a comfortable room, though the carpet was faded and the furniture very plain, for a good picture or two hung on the walls, books filled the recesses, chrysanthemums and Christmas roses bloomed in the windows, and a pleasant atmosphere of home peace pervaded it.<p>Margaret, the eldest of the four, was sixteen, and very pretty, being plump and fair, with large eyes, plenty of soft brown hair, a sweet mouth, and white hands, of which she was rather vain. Fifteen-year-old Jo was very tall, thin, and brown, and reminded one of a colt, for she never seemed to know what to do with her long limbs, which were very much in her way. She had a decided mouth, a comical nose, and sharp, gray eyes, which appeared to see everything, and were by turns fierce, funny, or thoughtful. Her long, thick hair was her one beauty, but it was usually bundled into a net, to be out of her way. Round shoulders had Jo, big hands and feet, a fly-away look to her clothes, and the uncomfortable appearance of a girl who was rapidly shooting up into a woman and didn\'t like it. Elizabeth, or Beth, as everyone called her, was a rosy, smooth-haired, bright-eyed girl of thirteen, with a shy manner, a timid voice, and a peaceful expression which was seldom disturbed. Her father called her `Little Miss Tranquillity\', and the name suited her excellently, for she seemed to live in a happy world of her own, only venturing out to meet the few whom she trusted and loved. Amy, though the youngest, was a most important person, in her own opinion at least. A regular snow maiden, with blue eyes, and yellow hair curling on her shoulders, pale and slender, and always carrying herself like a young lady mindful of her manners. What the characters of the four sisters were we will leave to be found out.<p>The clock struck six and, having swept up the hearth, Beth put a pair of slippers down to warm. Somehow the sight of the old shoes had a good effect upon the girls, for Mother was coming, and everyone brightened to welcome her. Meg stopped lecturing, and lighted the lamp, Amy got out of the easy chair without being asked, and Jo forgot how tired she was as she sat up to hold the slippers nearer to the blaze.<p> They are quite worn out. Marmee must have a new pair. <p> I thought I\'d get her some with my dollar, said Beth.<p> No, I shall! cried Amy.<p> I\'m the oldest, began Meg, but Jo cut in with a decided, I\'m the man of the family now Papa is away, and I shall provide the slippers, for he told me to take special care of Mother while he was gone. <p> I\'ll tell you what we\'ll do, said Beth, let\'s each get her something for Christmas, and not get anything for ourselves. <p> That\'s like you, dear! What will we get? exclaimed Jo.<p>Everyone thought soberly for a minute, then Meg announced, as if the idea was suggested by the sight of her own pretty hands, I shall give her a nice pair of gloves. <p> Army shoes, best to be had, cried Jo.<p> Some handkerchiefs, all hemmed, said Beth.<p> I\'ll get a little bottle of cologne. She likes it, and it won\'t cost much, so I\'ll have some left to buy my pencils, added Amy.<p> How will we give the things? asked Meg.<p> Put them on the table, and bring her in and see her open the bundles. Don\'t you remember how we used to do on our birthdays? answered Jo.<p> I used to be so frightened when it was my turn to sit in the chair with the crown on, and see you all come marching round to give the presents, with a kiss. I liked the things and the kisses, but it was dreadful to have you sit looking at me while I opened the bundles, said Beth, who was toasting her face and the bread for tea at the same time.<p> Let Marmee think we are getting things for ourselves, and then surprise her. We must go shopping tomorrow afternoon, Meg. There is so much to do about the play for Christmas night, said Jo, marching up and down, with her hands behind her back, and her nose in the air.<p> I don\'t mean to act any more after this time. I\'m getting too old for such things, observed Meg, who was as much a child as ever about `dressing-up\' frolics.<p> You won\'t stop, I know, as long as you can trail round in a white gown with your hair down, and wear gold-paper jewelry. You are the best actress we\'ve got, and there\'ll be an end of everything if you quit the boards, said Jo. We ought to rehearse tonight. Come here, Amy, and do the fainting scene, for you are as stiff as a poker in that. <p> I can\'t help it. I never saw anyone faint, and I don\'t choose to make myself all black and blue, tumbling flat as you do. If I can go down easily, I\'ll drop. If I can\'t, I shall fall into a chair and be graceful. I don\'t care if Hugo does come at me with a pistol, returned Amy, who was not gifted with dramatic power, but was chosen because she was small enough to be borne out shrieking by the villain of the piece.<p> Do it this way. Clasp your hands so, and stagger across the room, crying frantically, `Roderigo` Save me! Save me! and away went Jo, with a melodramatic scream which was truly thrilling.<p>Amy followed, but she poked her hands out stiffly before her, and jerked herself along as if she went by machinery, and her Ow! was more suggestive of pins being run into her than of fear and anguish. Jo gave a despairing groan, and Meg laughed outright, while Beth let her bread burn as she watched the fun with interest.<p> It\'s no use! Do the best you can when the time comes, and if the audience laughs, don\'t blame me. Come on, Meg. <p> Then things went smoothly, for Don Pedro defied the world in a speech of two pages without a single break. Hagar, the witch, chanted an awful incantation over her kettleful of simmering toads, with weird effect. Roderigo rent his chains asunder manfully, and Hugo died in agonies of remorse and arsenic, with a wild, Ha! Ha! <p> It\'s the best we\'ve had yet, said Meg, as the dead villain sat up and rubbed his elbows.<p> I don\'t see how you can write and act such splendid things, Jo. You\'re a regular Shakespeare! exclaimed Beth, who firmly believed that her sisters were gifted with wonderful genius in all things.<p> Not quite, replied Jo modestly. I do think THE WITCHES CURSE, an Operatic Tragedy is rather a nice thing, but I\'d like to try MacBETH, if we only had a trapdoor for Banquo. I always wanted to do the killing part. `Is that a dagger that I see before me? muttered Jo, rolling her eyes and clutching at the air, as she had seen a famous tragedian do.<p> No, it\'s the toasting fork, with Mother\'s shoe on it instead of the bread. Beth\'s stage-struck! cried Meg, and the rehearsal ended in a general burst of laughter.<p> Glad to find you so merry, my girls, said a cheery voice at the door, and actors and audience turned to welcome a tall, motherly lady with a `can I help you\' look about her which was truly delightful. She was not elegantly dressed, but a noble-looking woman, and the girls thought the gray cloak and unfashionable bonnet covered the most splendid mother in the world.<p> Well, dearies, how have you got on today? There was so much to do, getting the boxes ready to go tomorrow, that I didn\'t come home to dinner. Has anyone called, Beth? How is your cold, Meg? Jo, you look tired to death. Come and kiss me, baby. <p>While making these maternal inquiries Mrs. March got her wet things off, her warm slippers on, and sitting down in the easy chair, drew Amy to her lap, preparing to enjoy the happiest hour of her busy day. The girls flew about, trying to make things comfortable, each in her own way. Meg arranged the tea table, Jo brought wood and set chairs, dropping, over-turning, and clattering everything she touched. Beth trotted to and fro between parlor kitchen, quiet and busy, while Amy gave directions to everyone, as she sat with her hands folded.<p>As they gathered about the table, Mrs. March said, with a particularly happy face, I\'ve got a treat for you after supper. <p>A quick, bright smile went round like a streak of sunshine. Beth clapped her hands, regardless of the biscuit she held, and Jo tossed up her napkin, crying, A letter! A letter! Three cheers for Father! <p> Yes, a nice long letter. He is well, and thinks he shall get through the cold season better than we feared. He sends all sorts of loving wishes for Christmas, and an especial message to you girls, said Mrs. March, patting her pocket as if she had got a treasure there.<p> Hurry and get done! Don\'t stop to quirk your little finger and simper over your plate, Amy, cried Jo, choking on her tea and dropping her bread, butter side down, on the carpet in her haste to get at the treat.<p>Beth ate no more, but crept away to sit in her shadowy corner and brood over the delight to come, till the others were ready.<p> I think it was so splendid in Father to go as chaplain when he was too old to be drafted, and not strong enough for a soldier, said Meg warmly.<p> Don\'t I wish I could go as a drummer, a vivan—what\'s its name? Or a nurse, so I could be near him and help him, exclaimed Jo, with a groan.<p> It must be very disagreeable to sleep in a tent, and eat all sorts of bad-tasting things, and drink out of a tin mug, sighed Amy.<p> When will he come home, Marmee? asked Beth, with a little quiver in her voice.<p> Not for many months, dear, unless he is sick. He will stay and do his work faithfully as long as he can, and we won\'t ask for him back a minute sooner than he can be spared. Now come and hear the letter. <p>They all drew to the fire, Mother in the big chair with Beth at her feet, Meg and Amy perched on either arm of the chair, and Jo leaning on the back, where no one would see any sign of emotion if the letter should happen to be touching. Very few letters were written in those hard times that were not touching, especially those which fathers sent home. In this one little was said of the hardships endured, the dangers faced, or the homesickness conquered. It was a cheerful, hopeful letter, full of lively descriptions of camp life, marches, and military news, and only at the end did the writer\'s heart over-flow with fatherly love and longing for the little girls at home.<p> Give them all of my dear love and a kiss. Tell them I think of them by day, pray for them by night, and find my best comfort in their affection at all times. A year seems very long to wait before I see them, but remind them that while we wait we may all work, so that these hard days need not be wasted. I know they will remember all I said to them, that they will be loving children to you, will do their duty faithfully, fight their bosom enemies bravely, and conquer themselves so beautifully that when I come back to them I may be fonder and prouder than ever of my little women. <p>Everybody sniffed when they came to that part. Jo wasn\'t ashamed of the great tear that dropped off the end of her nose, and Amy never minded the rumpling of her curls as she hid her face on her mother\'s shoulder and sobbed out, I am a selfish girl! But I\'ll truly try to be better, so he mayn\'t be disappointed in me by-and-by. <p>We all will, cried Meg. I think too much of my looks and hate to work, but won\'t any more, if I can help it. <p> I\'ll try and be what he loves to call me, `a little woman\' and not be rough and wild, but do my duty here instead of wanting to be somewhere else, said Jo, thinking that keeping her temper at home was a much harder task than facing a rebel or two down South.<p>Beth said nothing, but wiped away her tears with the blue army sock and began to knit with all her might, losing no time in doing the duty that lay nearest her, while she resolved in her quiet little soul to be all that Father hoped to find her when the year brought round the happy coming home.<p>Mrs. March broke the silence that followed Jo\'s words, by saying in her cheery voice, Do you remember how you used to play Pilgrims Progress when you were little things? Nothing delighted you more than to have me tie my piece bags on your backs for burdens, give you hats and sticks and rolls of paper, and let you travel through the house from the cellar, which was the City of Destruction, up, up, to the housetop, where you had all the lovely things you could collect to make a Celestial City. <p> What fun it was, especially going by the lions, fighting Apollyon, and passing through the valley where the hob-goblins were, said Jo.<p> I liked the place where the bundles fell off and tumbled downstairs, said Meg.<p> I don\'t remember much about it, except that I was afraid of the cellar and the dark entry, and always liked the cake and milk we had up at the top. If I wasn\'t too old for such things, I\'d rather like to play it over again, said Amy, who began to talk of renouncing childish things at the mature age of twelve.<p> We never are too old for this, my dear, because it is a play we are playing all the time in one way or another. Out burdens are here, our road is before us, and the longing for goodness and happiness is the guide that leads us through many troubles and mistakes to the peace which is a true Celestial City. Now, my little pilgrims, suppose you begin again, not in play, but in earnest, and see how far on you can get before Father comes home. <p> Really, Mother? Where are our bundles? asked Amy, who was a very literal young lady.<p> Each of you told what your burden was just now, except Beth. I rather think she hasn\'t got any, said her mother.<p> Yes, I have. Mine is dishes and dusters, and envying girls with nice pianos, and being afraid of people. <p>Beth\'s bundle was such a funny one that everybody wanted to laugh, but nobody did, for it would have hurt her feelings very much.<p> Let us do it, said Meg thoughtfully. It is only another name for trying to be good, and the story may help us, for though we do want to be good, it\'s hard work and we forget, and don\'t do our best. <p> We were in the Slough of Despond tonight, and Mother came and pulled us out as Help did in the book. We ought to have our roll of directions, like Christian. What shall we do about that? asked Jo, delighted with the fancy which lent a little romance to the very dull task of doing her duty.<p> Look under your pillows Christmas morning, and you will find your guidebook, replied Mrs. March.<p>They talked over the new plan while old Hannah cleared the table, then out came the four little work baskets, and the needles flew as the girls made sheets for Aunt March. It was uninteresting sewing, but tonight no one grumbled. They adopted Jo\'s plan of dividing the long seams into four parts, and calling the quarters Europe, Asia, Africa, and America, and in that way got on capitally, especially when they talked about the different countries as they stitched their way through them.<p>At nine they stopped work, and sang, as usual, before they went to bed. No one but Beth could get much music out of the old piano, but she had a way of softly touching the yellow keys and making a pleasant accompaniment to the simple songs they sang. Meg had a voice like a flute, and she and her mother led the little choir. Amy chirped like a cricket, and Jo wandered through the airs at her own sweet will, always coming out at the wrong place with a croak or a quaver that spoiled the most pensive tune. They had always done this from the time they could lisp . . . <quote><l>Crinkle, crinkle, \'ittle \'tar, </quote>and it had become a household custom,, for the mother was a born singer. The first sound in the morning was her voice as she went about the house singing like a lark, and the last sound at night was the same cheery sound, for the girls never grew too old for that familiar lullaby.'; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('','A4','','',32,25,27,25,16,13); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->hyphenate = true; - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyleA4.css'); -$mpdf->WriteHTML($stylesheet,1); - -$mpdf->WriteHTML('<h1>Automatic Hyphenation</h1>'); - -$mpdf->SetColumns(4,'J'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example22_columns.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example22_columns.php deleted file mode 100644 index 9b394a45bce1eb4f965ecba8078fcc763b7e1b14..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example22_columns.php +++ /dev/null @@ -1,83 +0,0 @@ -<?php - - - -$html = ' -<h1>mPDF</h1> -<h2>Columns</h2> -'; -//============================================================== - -$loremH = "<h4>Lectus facilisis</h4> -<p>Sed auctor viverra diam. In lacinia lectus.</p> -<p>Praesent tincidunt massa in dolor. Morbi viverra leo quis ipsum. In vitae velit. In aliquam nulla nec mi. Sed accumsan, justo id congue fringilla, diam mauris volutpat ligula, sed aliquet elit diam at felis. Quisque et velit sed eros convallis posuere.</p> -<h5>Nunc tincidunt</h5> -<p>Nunc diam ipsum, consectetuer nec, hendrerit vitae, malesuada a, ante. Nulla ornare aliquet ante. Maecenas in lectus. Morbi porttitor mauris. Praesent ut.</p> -<p>Pede quis ante tincidunt <a href=\"http://www.stlucia.org\">blandit</a>. Maecenas bibendum erat. Curabitur sit amet ante quis velit ultricies facilisis. Ut hendrerit dolor commodo magna. In nec ligula a purus tincidunt adipiscing. Etiam non ante. </p><div>Suspendisse potenti. <indexentry content=\"Inline indexentry <B>\" />Suspendisse accumsan euismod lectus. Nunc commodo pede et turpis. Pellentesque porta mauris sed lorem. Ut nec augue vitae elit eleifend eleifend.Quisque ornare feugiat diam. Duis nulla metus, tempus sit amet, scelerisque a, rutrum at, nisl. Nulla facilisi. Duis metus turpis, molestie nec, laoreet tincidunt, ultrices et, purus. Nullam faucibus aliquam nisi.</div><a href=\"http://www.stlucia.org\"><img src=\"sunset.jpg\" /></a><p>Ut leo. Etiam tempus interdum tortor. Donec porta, arcu vel tincidunt placerat, lacus lorem iaculis diam, id sagittis sapien metus eu nunc. Morbi vitae nunc.<br />Mauris sapien. Phasellus elementum velit sed sapien. Nullam ante diam, consectetuer commodo, dignissim vitae, tempor vel, magna. Donec dictum. <i>Nullam</i> ultrices leo volutpat magna. Mauris blandit purus nec turpis. <a href=\"http://www.stlucia.org\">Curabitur</a> nunc. Aliquam condimentum eleifend<sup>32</sup> lectus. Praesent vitae nibh <b>et libero ullamcorper</b> scelerisque. Nullam auctor. Mauris ipsum nulla, malesuada id, aliquet at, feugiat vitae, eros.</p> - -<div style=\"background-color:#DDDDBB; text-align:center; padding:3px; border:1px solid #880000; \">Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. -<div style=\"background-color:#ADDBBF; text-align:center; padding:3px; border:1px solid #880000; \">Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> - Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> -<p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -"; - - - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('en-GB-x','A4','','',32,25,27,25,16,13); - -$mpdf->SetDisplayMode('fullpage'); - -$stylesheet = file_get_contents('mpdfstyleA4.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -// Bullets in columns are probably best not indented -$mpdf->list_indent_first_level = 0; // 1 or 0 - whether to indent the first level of a list - -$mpdf->max_colH_correction = 1.1; - - - $mpdf->WriteHTML($html,2); - $mpdf->WriteHTML($loremH,2); - - - // consider reducing lineheight when using columns - especially if vAligned justify - $mpdf->SetDefaultBodyCSS('line-height', 1.2); - - - - $mpdf->SetColumns(3,'J'); - $mpdf->WriteHTML($loremH,2); - - $mpdf->SetColumns(0); - $mpdf->WriteHTML('<hr />'); - - - $mpdf->SetColumns(2,'J'); - $mpdf->WriteHTML($loremH,2); - $mpdf->WriteHTML('<hr />'); - $mpdf->SetColumns(0); - $mpdf->WriteHTML('<hr />'); - - $mpdf->SetColumns(3,'J'); - $mpdf->WriteHTML($loremH,2); - - $mpdf->SetColumns(0); - $mpdf->WriteHTML('<hr />'); - $mpdf->SetColumns(2,'J'); - $mpdf->WriteHTML($loremH,2); - - - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example23_orientation.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example23_orientation.php deleted file mode 100644 index 7049d7e194c84a79d904e908daf5cf558fc7f23c..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example23_orientation.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php - - -$html = ' -<h1>mPDF</h1> -<h2>Page Orientation</h2> - -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -<p style="color:red; font-family:serif;">Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> -<p style="color:orange; font-family:serif;">Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p> -<p style="color:green; font-family:serif;">Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p> - -<hr /> - -'; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - - -$mpdf=new mPDF('c','A4','','',42,15,67,67,20,15); - -$mpdf->SetDisplayMode('fullpage','two'); - -$mpdf->mirrorMargins = 1; - - -$header = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td> -</tr></table> -'; -$headerE = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%"><span style="font-weight: bold;">Outer header</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td> -</tr></table> -'; -$longfooter = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%">Left footer p <span style="font-size:14pt;">{PAGENO}</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right footer</span></td> -</tr></table> -'; -$longfooterE = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%"><span style="font-weight: bold;">Outer footer</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;">Inner footer p <span style="font-size:14pt;">{PAGENO}</span></td> -</tr></table> -'; - -$footer = '<div align="center" style="color:blue;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} » {PAGENO} » My document</div>'; -$footerE = '<div align="center" style="color:green;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">Even page footer - {PAGENO} -</div>'; - -$shortheader = '<div align="center" style="color:blue;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} » {PAGENO} » My document</div>'; -$shortheaderE = '<div align="center" style="color:green;font-family:mono;font-size:18pt;font-weight:bold;font-style:italic;">Even page header - {PAGENO} -</div>'; - - -$mpdf->SetHTMLHeader($header); -$mpdf->SetHTMLHeader($headerE,'E'); -$mpdf->setFooter('{PAGENO} of {nbpg} pages||{PAGENO} of {nbpg} pages') ; - - -$mpdf->WriteHTML($html); - - -$mpdf->setHeader(); // Clear headers before adding page -$mpdf->AddPage('L','','','','',25,25,55,45,18,12); - -$mpdf->SetHTMLHeader($shortheader,'',true); // New parameter in v1.4 to add the header to the new page -$mpdf->SetHTMLHeader($shortheaderE,'E',true); -$mpdf->SetHTMLFooter($longfooter); -$mpdf->SetHTMLFooter($longfooterE,'E'); - - -$mpdf->WriteHTML($html); -$mpdf->WriteHTML($html); -$mpdf->WriteHTML($html); - - - -$mpdf->setHeader('{PAGENO} of {nbpg} pages||{PAGENO} of {nbpg} pages') ; -$mpdf->SetHTMLFooter($footer); -$mpdf->SetHTMLFooter($footerE,'E'); - - -$mpdf->WriteHTML($html); -$mpdf->WriteHTML($html); - - -$mpdf->setHeader(); // Clear headers before adding page -$mpdf->AddPage('','','','','',42,15,67,67,20,15); // Default is Portrait (because that was the document default) - - -$mpdf->SetHTMLHeader($shortheader,'',true); // New parameter in v1.4 to add the header to the new page -$mpdf->SetHTMLHeader($shortheaderE,'E',true); -$mpdf->SetHTMLFooter($longfooter); -$mpdf->SetHTMLFooter($longfooterE,'E'); - - -$mpdf->WriteHTML($html); -$mpdf->WriteHTML($html); - - -$mpdf->SetHTMLHeader($header); -$mpdf->SetHTMLHeader($headerE,'E'); -$mpdf->SetHTMLFooter($footer); -$mpdf->SetHTMLFooter($footerE,'E'); - - -$mpdf->WriteHTML($html); -$mpdf->WriteHTML($html); - - -$mpdf->Output('mpdf.pdf','I'); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example24_orientation_2.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example24_orientation_2.php deleted file mode 100644 index 1cbbfdad8983fdbf288b8a7d33e96ab44b9bc24b..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example24_orientation_2.php +++ /dev/null @@ -1,200 +0,0 @@ -<?php - - -$html = ' -<h1>mPDF</h1> -<h2>Page Orientation</h2> - -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -<p style="color:red; font-family:serif;">Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> -<p style="color:orange; font-family:serif;">Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p> -<p style="color:green; font-family:serif;">Integer feugiat venenatis metus. Integer lacinia ultrices ipsum. Proin et arcu. Quisque varius libero. Nullam id arcu. Aenean justo quam, accumsan nec, luctus id, pellentesque molestie, mi. Aliquam sollicitudin feugiat eros. Nunc nisi turpis, consequat id, aliquet et, semper a, augue. Integer nisl ipsum, blandit et, lobortis a, egestas nec, odio. Nulla dolor ligula, nonummy ac, vulputate a, sollicitudin id, orci. Donec laoreet nisl id magna. Curabitur mollis, quam eget fermentum malesuada, risus tortor ullamcorper dolor, nec placerat nisi urna non pede. Aliquam pretium, leo in interdum interdum, ipsum neque accumsan lectus, ac fringilla dui ipsum sed justo. In tincidunt risus convallis odio egestas luctus. Integer volutpat. Donec ultricies, leo in congue iaculis, dolor neque imperdiet nibh, vitae feugiat mi enim nec sapien. Aenean turpis lorem, consequat quis, varius in, posuere vel, eros. Nulla facilisi.</p> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -'; - -$htmlL = ' -<h6>Table in Landscape</h6> -<table class="bpmTopic"> -<thead> -<tr style="text-rotate:45;"> -<td>Type</td> -<td>Details</td> -<td>Notes</td> -</thead> -<tbody> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti. Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti. Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti. Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti. Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti. Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -</tr> -</tbody></table> -'; - -//============================================================== - -$loremH = "<h4>Lectus facilisis</h4> -<p>Sed auctor viverra diam. In lacinia lectus.</p> -<p>Praesent tincidunt massa in dolor. Morbi viverra leo quis ipsum. In vitae velit. In aliquam nulla nec mi. Sed accumsan, justo id congue fringilla, diam mauris volutpat ligula, sed aliquet elit diam at felis. Quisque et velit sed eros convallis posuere.</p> -<h5>Nunc tincidunt</h5> -<p>Nunc diam ipsum, consectetuer nec, hendrerit vitae, malesuada a, ante. Nulla ornare aliquet ante. Maecenas in lectus. Morbi porttitor mauris. Praesent ut.</p> -<p>Pede quis ante tincidunt <a href=\"http://www.stlucia.org\">blandit</a>. Maecenas bibendum erat. Curabitur sit amet ante quis velit ultricies facilisis. Ut hendrerit dolor commodo magna. In nec ligula a purus tincidunt adipiscing. Etiam non ante. </p><div>Suspendisse potenti. <indexentry content=\"Inline indexentry <B>\" />Suspendisse accumsan euismod lectus. Nunc commodo pede et turpis. Pellentesque porta mauris sed lorem. Ut nec augue vitae elit eleifend eleifend. Quisque ornare feugiat diam. Duis nulla metus, tempus sit amet, scelerisque a, rutrum at, nisl. Nulla facilisi. Duis metus turpis, molestie nec, laoreet tincidunt, ultrices et, purus. Nullam faucibus aliquam nisi.</div><a href=\"http://www.stlucia.org\"><img zsrc=\"sunset.jpg\" /></a><p>Ut leo. Etiam tempus interdum tortor. Donec porta, arcu vel tincidunt placerat, lacus lorem iaculis diam, id sagittis sapien metus eu nunc. Morbi vitae nunc.<br />Mauris sapien. Phasellus elementum velit sed sapien. Nullam ante diam, consectetuer commodo, dignissim vitae, tempor vel, magna. Donec dictum. <i>Nullam</i> ultrices leo volutpat magna. Mauris blandit purus nec turpis. <a href=\"http://www.stlucia.org\">Curabitur</a> nunc. Aliquam condimentum eleifend<sup>32</sup> lectus. Praesent vitae nibh <b>et libero ullamcorper</b> scelerisque. Nullam auctor. Mauris ipsum nulla, malesuada id, aliquet at, feugiat vitae, eros.</p> - -<div style=\"background-color:#DDDDBB; text-align:center; padding:3px; border:1px solid #880000; \">Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div><p>Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras eu erat vel libero sodales congue. Sed erat est, interdum nec, elementum eleifend, pretium at, nibh. Praesent massa diam, adipiscing id, mollis sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui. </p> -"; - -//============================================================== -$header = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%">Left header p <span style="font-size:14pt;">{PAGENO}</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;"><span style="font-weight: bold;">Right header</span></td> -</tr></table> -'; -$headerE = ' -<table width="100%" style="border-bottom: 1px solid #000000; vertical-align: bottom; font-family: serif; font-size: 9pt; color: #000088;"><tr> -<td width="33%"><span style="font-weight: bold;">Outer header</span></td> -<td width="33%" align="center"><img src="sunset.jpg" width="126px" /></td> -<td width="33%" style="text-align: right;">Inner header p <span style="font-size:14pt;">{PAGENO}</span></td> -</tr></table> -'; -$header = '<div align="center" style="background-color: #f0f2ff;background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} » {PAGENO} » My document<br />My document<br />See <a href="http://mpdf1.com/manual/index.php">documentation manual</a><br />My document</div>'; -$headerE = '<div align="center" style="background-color: #f0f2ff;background: transparent url(\'bg.jpg\') repeat scroll left top;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">Even page footer - {PAGENO} -<br />My document<br />My document<br />My document</div>'; -$footer = '<div align="center" style="background-color: #f0f2ff;background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">{DATE j-m-Y} » {PAGENO} » My document<br />My document<br />See <a href="http://mpdf1.com/manual/index.php">documentation manual</a><br />My document</div>'; -$footerE = '<div align="center" style="background-color: #f0f2ff;background: transparent url(\'bg.jpg\') repeat scroll right bottom;border-radius: 4mm;font-size:18pt;font-weight:bold;font-style:italic;">Even page footer - {PAGENO} -<br />My document<br />My document<br />My document</div>'; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - - -$mpdf=new mPDF('c','A4','','',42,15,57,57,20,17); - -$mpdf->displayDefaultOrientation = true; - -$mpdf->forcePortraitHeaders = true; -$mpdf->forcePortraitMargins = true; - -$mpdf->SetDisplayMode('fullpage','two'); - -$mpdf->mirrorMargins = 1; - -$stylesheet = file_get_contents('mpdfstyletables.css'); -$mpdf->WriteHTML($stylesheet,1); - -$mpdf->SetHTMLHeader($header); -$mpdf->SetHTMLHeader($headerE,'E'); -$mpdf->SetHTMLFooter($footer); -$mpdf->SetHTMLFooter($footerE,'E'); - -$mpdf->WriteHTML($html); - -$mpdf->AddPage('L'); - -$mpdf->WriteHTML($htmlL); -$mpdf->WriteHTML($htmlL); - -// Columns -$mpdf->AddPage('L'); -$mpdf->SetColumns(3,'J'); -$mpdf->WriteHTML($loremH); - -$mpdf->SetColumns(0); -$mpdf->WriteHTML('<hr />'); - - -$mpdf->SetColumns(2,'J'); -$mpdf->WriteHTML($loremH); -$mpdf->WriteHTML('<hr />'); -$mpdf->SetColumns(0); - -$mpdf->AddPage('L'); - -$mpdf->WriteHTML($htmlL); -$mpdf->WriteHTML($htmlL); - -$mpdf->AddPage(); - -$mpdf->WriteHTML($html); -$mpdf->WriteHTML($html); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example26_RTL.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example26_RTL.php deleted file mode 100644 index 755091a9e2e0dcfc9a8677041e7f50594dbb36af..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example26_RTL.php +++ /dev/null @@ -1,318 +0,0 @@ -<?php - - -$html = " -<h1>mPDF</h1> -<h2>RTL Languages</h2> - -<h4>English</h4> -<p>Please note that I do not understand any of the scripts below. The texts are borrowed from News websites, and I have used words and bits of phrases just to demonstrate the program.</p> - -<h4>Hebrew (pangram)</h4> -<p lang=\"he\">\xd7\x93\xd7\x92 \xd7\xa1\xd7\xa7\xd7\xa8\xd7\x9f \xd7\xa9\xd7\x98 \xd7\x91\xd7\x99\xd7\x9d \xd7\x9e\xd7\x90\xd7\x95\xd7\x9b\xd7\x96\xd7\x91 \xd7\x95\xd7\x9c\xd7\xa4\xd7\xaa\xd7\xa2 \xd7\x9e\xd7\xa6\xd7\x90 \xd7\x97\xd7\x91\xd7\xa8\xd7\x94 </p> - -<p lang=\"he\">\xd7\x90\xd7\x95 \xd7\x94\xd7\xa0\xd7\xa1\xd7\x94 \xd7\x90\xd7\x9c\xd7\x94\xd7\x99\xd7\x9d, \xd7\x9c\xd7\x91\xd7\x95\xd7\x90 \xd7\x9c\xd7\xa7\xd7\x97\xd7\xaa \xd7\x9c\xd7\x95 \xd7\x92\xd7\x95\xd7\x99 \xd7\x9e\xd7\xa7\xd7\xa8\xd7\x91 \xd7\x92\xd7\x95\xd7\x99, \xd7\x91\xd7\x9e\xd7\xa1\xd7\xaa \xd7\x91\xd7\x90\xd7\xaa\xd7\xaa \xd7\x95\xd7\x91\xd7\x9e\xd7\x95\xd7\xa4\xd7\xaa\xd7\x99\xd7\x9d \xd7\x95\xd7\x91\xd7\x9e\xd7\x9c\xd7\x97\xd7\x9e\xd7\x94 \xd7\x95\xd7\x91\xd7\x99\xd7\x93 \xd7\x97\xd7\x96\xd7\xa7\xd7\x94 \xd7\x95\xd7\x91\xd7\x96\xd7\xa8\xd7\x95\xd7\xa2 \xd7\xa0\xd7\x98\xd7\x95\xd7\x99\xd7\x94, \xd7\x95\xd7\x91\xd7\x9e\xd7\x95\xd7\xa8\xd7\x90\xd7\x99\xd7\x9d \xd7\x92\xd7\x93\xd7\x9c\xd7\x99\xd7\x9d: \xd7\x9b\xd7\x9b\xd7\x9c \xd7\x90\xd7\xa9\xd7\xa8-\xd7\xa2\xd7\xa9\xd7\x94 \xd7\x9c\xd7\x9b\xd7\x9d \xd7\x99\xd7\x94\xd7\x95\xd7\x94 \xd7\x90\xd7\x9c\xd7\x94\xd7\x99\xd7\x9b\xd7\x9d, \xd7\x91\xd7\x9e\xd7\xa6\xd7\xa8\xd7\x99\xd7\x9d--\xd7\x9c\xd7\xa2\xd7\x99\xd7\xa0\xd7\x99\xd7\x9a </p> - -<p lang=\"he\">\xd7\x9c\xd7\x9b\xd7\x9f \xd7\x97\xd7\x9b\xd7\x95 \xd7\x9c\xd7\x99 \xd7\xa0\xd7\x90\xd7\x9d \xd7\x99\xd7\x94\xd7\x95\xd7\x94 \xd7\x9c\xd7\x99\xd7\x95\xd7\x9d \xd7\xa7\xd7\x95\xd7\x9e\xd7\x99 \xd7\x9c\xd7\xa2\xd7\x93, \xd7\x9b\xd7\x99 \xd7\x9e\xd7\xa9\xd7\xa4\xd7\x98\xd7\x99 \xd7\x9c\xd7\x90\xd7\xa1\xd7\xa3 \xd7\x92\xd7\x95\xd7\x99\xd7\x9d \xd7\x9c\xd7\xa7\xd7\x91\xd7\xa6\xd7\x99 \xd7\x9e\xd7\x9e\xd7\x9c\xd7\x9b\xd7\x95\xd7\xaa, \xd7\x9c\xd7\xa9\xd7\xa4\xd7\x9a \xd7\xa2\xd7\x9c\xd7\x99\xd7\x94\xd7\x9d \xd7\x96\xd7\xa2\xd7\x9e\xd7\x99 \xd7\x9b\xd7\x9c \xd7\x97\xd7\xa8\xd7\x95\xd7\x9f \xd7\x90\xd7\xa4\xd7\x99, \xd7\x9b\xd7\x99 \xd7\x91\xd7\x90\xd7\xa9 \xd7\xa7\xd7\xa0\xd7\x90\xd7\xaa\xd7\x99 \xd7\xaa\xd7\x90\xd7\x9b\xd7\x9c \xd7\x9b\xd7\x9c \xd7\x94\xd7\x90\xd7\xa8\xd7\xa5 </p> - -<p lang=\"he\">\xd7\xa9\xd7\xa4\xd7\x9f \xd7\x90\xd7\x9b\xd7\x9c \xd7\xa7\xd7\xa6\xd7\xaa \xd7\x92\xd7\x96\xd7\xa8 \xd7\x91\xd7\x98\xd7\xa2\xd7\x9d \xd7\x97\xd7\xa1\xd7\x94, \xd7\x95\xd7\x93\xd7\x99. </p> - - - - - -<h4>Arabic</h4> -<p>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2<annotation content=\"\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" subject=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" icon=\"Comment\" color=\"#FE88EF\" author=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" /> - \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb0\xd9\x83\xd8\xb1\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa7\xd8\xa8\xd8\xb9\xd8\xa9 \xd9\x84\xd9\x84\xd8\xba\xd8\xb2\xd9\x88 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd9\x84\xd9\x88\xd9\x8a\xd8\xa9 \xd8\xad\xd8\xa7\xd9\x84\xd9\x8a\xd8\xa7 \xd9\x84\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x86 \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82.</p> - -<p>\xd9\x87\xd9\x84 \xd8\xb3\xd8\xaa\xd8\xb3\xd9\x81\xd8\xb1 \xd8\xa7\xd9\x84\xd8\xac\xd9\x87\xd9\x88\xd8\xaf \xd8\xa7\xd9\x84\xd8\xaf\xd8\xa8\xd9\x84\xd9\x88\xd9\x85\xd8\xa7\xd8\xb3\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xac\xd8\xa7\xd8\xb1\xd9\x8a\xd8\xa9 \xd8\xb9\xd9\x86 \xd8\xad\xd9\x84\xd9\x88\xd9\x84\xd8\x9f \xd9\x88\xd9\x83\xd9\x8a\xd9\x81 \xd8\xaa\xd9\x86\xd8\xb8\xd8\xb1 \xd9\x84\xd9\x84\xd8\xa7\xd8\xaa\xd9\x87\xd8\xa7\xd9\x85\xd8\xa7\xd8\xaa \xd9\x84\xd8\xa8\xd8\xb9\xd8\xb6 \xd9\x87\xd8\xb0\xd9\x87 \xd8\xa7\xd9\x84\xd8\xaf\xd9\x88\xd9\x84 \xd8\xa8\xd8\xa7\xd9\x84\xd8\xaa\xd8\xaf\xd8\xae\xd9\x84 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb4\xd8\xa3\xd9\x86 \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\x8c \xd9\x88\xd8\xa7\xd9\x84\xd8\xaa\xd9\x88\xd8\xb1\xd8\xb7 \xd9\x81\xd9\x8a \xd8\xaf\xd8\xb9\xd9\x85 \xd8\xb9\xd9\x85\xd9\x84\xd9\x8a\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xb9\xd9\x86\xd9\x81\xd8\x9f \xd9\x88\xd8\xa7\xd9\x84\xd9\x89 \xd8\xa7\xd9\x8a \xd9\x85\xd8\xaf\xd9\x89 \xd9\x8a\xd8\xa8\xd8\xaf\xd9\x88 \xd8\xa7\xd9\x84\xd9\x88\xd8\xb6\xd8\xb9 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86\xd8\xb9\xd9\x83\xd8\xa7\xd8\xb3\xd8\xa7 \xd9\x84\xd9\x84\xd8\xb5\xd8\xb1\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xa5\xd9\x82\xd9\x84\xd9\x8a\xd9\x85\xd9\x8a\xd8\xa9 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd9\x85\xd9\x86\xd8\xb7\xd9\x82\xd8\xa9\xd8\x9f</p> - -<p>\xd9\x88\xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa8\xd9\x8a\xd8\xaa \xd8\xa7\xd9\x84\xd8\xa7\xd8\xa8\xd9\x8a\xd8\xb6 "\xd8\xa8\xd8\xb4\xd8\xaf\xd8\xa9" \xd8\xaa\xd9\x81\xd8\xac\xd9\x8a\xd8\xb1 \xd8\xa7\xd9\x8a\xd9\x84\xd8\xa7\xd8\xaa \xd9\x81\xd9\x8a\xd9\x85\xd8\xa7 \xd8\xa7\xd8\xb9\xd8\xb1\xd8\xa8\xd8\xaa \xd9\x88\xd8\xb2\xd8\xa7\xd8\xb1\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xae\xd8\xa7\xd8\xb1\xd8\xac\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xb1\xd9\x88\xd8\xb3\xd9\x8a\xd8\xa9 \xd8\xb9\xd9\x86 "\xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86\xd8\xaa\xd9\x87\xd8\xa7 \xd8\xa7\xd9\x84\xd8\xb4\xd8\xaf\xd9\x8a\xd8\xaf\xd8\xa9" \xd9\x84\xd9\x84\xd8\xad\xd8\xa7\xd8\xaf\xd8\xab" \xd9\x88\xd8\xa7\xd8\xb5\xd9\x81\xd8\xa9 \xd8\xa7\xd9\x8a\xd8\xa7\xd9\x87 \xd8\xa8\xd9\x80"\xd8\xa7\xd9\x84\xd9\x85\xd8\xaa\xd8\xb7\xd8\xb1\xd9\x81" \xd8\xa7\xd9\x84\xd8\xb0\xd9\x8a \xd8\xa7\xd8\xb3\xd8\xaa\xd9\x87\xd8\xaf\xd9\x81 "\xd9\x85\xd8\xaf\xd9\x86\xd9\x8a\xd9\x8a\xd9\x86 \xd9\x85\xd8\xb3\xd8\xa7\xd9\x84\xd9\x85\xd9\x8a\xd9\x86".</p> - -<p>\xd9\x88\xd8\xa7\xd8\xb6\xd8\xa7\xd9\x81\xd8\xaa \xd9\x88\xd8\xb2\xd8\xa7\xd8\xb1\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xae\xd8\xa7\xd8\xb1\xd8\xac\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xb1\xd9\x88\xd8\xb3\xd9\x8a\xd8\xa9 \xd9\x81\xd9\x8a \xd8\xa8\xd9\x8a\xd8\xa7\xd9\x86\xd9\x87\xd8\xa7: "\xd9\x85\xd9\x86 \xd8\xa7\xd9\x84\xd9\x85\xd8\xa4\xd8\xb3\xd9\x81 \xd8\xa7\xd9\x86 \xd9\x8a\xd8\xa3\xd8\xaa\xd9\x8a \xd9\x87\xd8\xb0\xd8\xa7 \xd8\xa7\xd9\x84\xd8\xad\xd8\xa7\xd8\xaf\xd8\xab \xd8\xa8\xd9\x8a\xd9\x86\xd9\x85\xd8\xa7 \xd8\xaa\xd8\xa8\xd8\xb0\xd9\x84 \xd8\xa7\xd9\x84\xd8\xac\xd9\x87\xd9\x88\xd8\xaf \xd9\x84\xd8\xaa\xd8\xae\xd8\xb7\xd9\x8a \xd8\xa7\xd9\x84\xd8\xa7\xd8\xb2\xd9\x85\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xaf\xd8\xa7\xd8\xae\xd9\x84\xd9\x8a\xd8\xa9".</p> - -<p>\xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 \xd9\x85\xd8\xa7 \xd9\x8a\xd9\x85\xd9\x83\xd9\x86 \xd9\x85\xd9\x86 \xd8\xa7\xd8\xac\xd9\x84 \xd8\xa7\xd8\xad\xd8\xaa\xd9\x88\xd8\xa7\xd8\xa1 \xd9\x85\xd8\xb8\xd8\xa7\xd9\x87\xd8\xb1 \xd8\xa7\xd9\x84\xd8\xaa\xd8\xb7\xd8\xb1\xd9\x81 \xd8\xa7\xd9\x84\xd8\xaa\xd9\x8a \xd9\x84\xd8\xa7 \xd9\x85\xd8\xa8\xd8\xb1\xd8\xb1 \xd9\x84\xd9\x87\xd8\xa7 \xd9\x88\xd8\xa7\xd9\x84\xd8\xaa\xd9\x8a \xd9\x84\xd8\xa7 \xd8\xaa\xd9\x81\xd9\x8a\xd8\xaf \xd9\x85\xd8\xb5\xd8\xa7\xd9\x84\xd8\xad \xd8\xa7\xd9\x84\xd8\xb4\xd8\xb9\xd8\xa8 \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a \xd8\xb9\xd9\x84\xd9\x89 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xaf \xd8\xa7\xd9\x84\xd8\xb7\xd9\x88\xd9\x8a\xd9\x84".</p> - -<p>\xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 \xd9\x85\xd8\xa7 \xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 </p> -\xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 \xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 \xd9\x85\xd8\xa7 \xd9\x8a\xd9\x85\xd9\x83\xd9\x86 \xd9\x85\xd9\x86 \xd8\xa7\xd8\xac\xd9\x84</p> - - -<p>\xd9\x83\xd9\x85\xd8\xa7 \xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd9\x81\xd8\xa7\xd8\xb1\xd9\x88 \xd8\xaf\xd9\x8a \xd8\xb3\xd9\x88\xd8\xaa\xd9\x88 \xd9\x85\xd8\xa8\xd8\xb9\xd9\x88\xd8\xab \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x85 \xd8\xa7\xd9\x84\xd9\x85\xd8\xaa\xd8\xad\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xae\xd8\xa7\xd8\xb5 \xd8\xa7\xd9\x84\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb4\xd8\xb1\xd9\x82 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd8\xb3\xd8\xb7 \xd8\xa7\xd9\x84\xd8\xb9\xd9\x85\xd9\x84\xd9\x8a\xd8\xa9 \xd9\x88\xd9\x82\xd8\xa7\xd9\x84 "\xd8\xa7\xd9\x86\xd9\x87 \xd9\x83\xd8\xa7\xd9\x86 \xd9\x87\xd8\xac\xd9\x88\xd9\x85\xd8\xa7 \xd8\xb9\xd9\x84\xd9\x89 \xd8\xa7\xd8\xb4\xd8\xae\xd8\xa7\xd8\xb5 \xd8\xb9\xd8\xa7\xd8\xaf\xd9\x8a\xd9\x8a\xd9\x86 \xd9\x83\xd8\xa7\xd9\x86\xd9\x88\xd8\xa7 \xd9\x8a\xd9\x82\xd9\x88\xd9\x85\xd9\x88\xd9\x86 \xd8\xa8\xd9\x86\xd8\xb4\xd8\xa7\xd8\xb7\xd9\x87\xd9\x85 \xd8\xa7\xd9\x84\xd9\x8a\xd9\x88\xd9\x85\xd9\x8a \xd9\x88\xd9\x87\xd8\xb0\xd8\xa7 \xd8\xa7\xd9\x85\xd8\xb1 \xd9\x84\xd8\xa7 \xd9\x8a\xd9\x85\xd9\x83\xd9\x86 \xd8\xaa\xd8\xa8\xd8\xb1\xd9\x8a\xd8\xb1\xd9\x87".</p> - -<h4>Farsi / Persian (fa)</h4> -<p>\xd9\x85\xd8\xad\xd9\x85\xd8\xaf \xd8\xa7\xd9\x84\xd8\xa8\xd8\xb1\xd8\xa7\xd8\xaf\xd8\xb9\xdb\x8c \xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa2\xda\x98\xd8\xa7\xd9\x86\xd8\xb3 \xd8\xa8\xd9\x8a\xd9\x86 \xd8\xa7\xd9\x84\xd9\x85\xd9\x84\xd9\x84\xdb\x8c \xd8\xa7\xd9\x86\xd8\xb1\xda\x98\xdb\x8c \xd8\xa7\xd8\xaa\xd9\x85\xdb\x8c \xd9\xbe\xd9\x8a\xd8\xb4\xd9\x86\xd9\x87\xd8\xa7\xd8\xaf \xda\xa9\xd8\xb1\xd8\xaf\xd9\x87 \xd8\xa7\xd8\xb3\xd8\xaa \xd8\xaa\xd9\x87\xd8\xb1\xd8\xa7\xd9\x86 \xd8\xa8\xd8\xb1\xd9\x86\xd8\xa7\xd9\x85\xd9\x87 \xd8\xac\xd9\x86\xd8\xac\xd8\xa7\xd9\x84\xdb\x8c \xd8\xba\xd9\x86\xdb\x8c \xd8\xb3\xd8\xa7\xd8\xb2\xdb\x8c \xd8\xa7\xd9\x88\xd8\xb1\xd8\xa7\xd9\x86\xd9\x8a\xd9\x88\xd9\x85 \xd8\xb1\xd8\xa7 \xd9\x85\xd8\xaa\xd9\x88\xd9\x82\xd9\x81 \xda\xa9\xd9\x86\xd8\xaf \xd9\x88 \xd8\xba\xd8\xb1\xd8\xa8 \xd9\x86\xd9\x8a\xd8\xb2 \xd8\xa7\xd8\xac\xd8\xb1\xd8\xa7\xdb\x8c \xd8\xaa\xd8\xad\xd8\xb1\xd9\x8a\xd9\x85 \xd9\x87\xd8\xa7\xdb\x8c \xd8\xaa\xd9\x86\xd8\xa8\xd9\x8a\xd9\x87\xdb\x8c \xd9\x85\xd9\x88\xd8\xb1\xd8\xaf \xd8\xaa\xd8\xa7\xd8\xa6\xd9\x8a\xd8\xaf \xd8\xb3\xd8\xa7\xd8\xb2\xd9\x85\xd8\xa7\xd9\x86 \xd9\x85\xd9\x84\xd9\x84 \xd9\x85\xd8\xaa\xd8\xad\xd8\xaf \xd8\xb1\xd8\xa7 \xd8\xa8\xd9\x87 \xd8\xaa\xd8\xb9\xd9\x88\xd9\x8a\xd9\x82 \xd8\xa8\xd9\x8a\xd8\xa7\xd9\x86\xd8\xaf\xd8\xa7\xd8\xb2\xd8\xaf.</p> - -<p>\xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4\xd8\x8c \xd8\xaf\xd8\xb1 \xda\x86\xd9\x87\xd8\xa7\xd8\xb1\xd9\x85\xdb\x8c\xd9\x86 \xd8\xb3\xd8\xa7\xd9\x84\xda\xaf\xd8\xb1\xd8\xaf \xd8\xa7\xd8\xb4\xd8\xba\xd8\xa7\xd9\x84 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd9\x85\xdb\x8c \xda\xaf\xd9\x88\xdb\x8c\xd8\xaf \xd8\xa7\xd8\xb3\xd8\xaa\xd8\xb1\xd8\xa7\xd8\xaa\xda\x98\xdb\x8c \xd8\xa7\xd8\xb3\xd8\xaa\xd9\x82\xd8\xb1\xd8\xa7\xd8\xb1 \xd9\x86\xdb\x8c\xd8\xb1\xd9\x88\xd9\x87\xd8\xa7\xdb\x8c \xd8\xa2\xd9\x85\xd8\xb1\xdb\x8c\xda\xa9\xd8\xa7\xdb\x8c\xdb\x8c \xd8\xa8\xdb\x8c\xd8\xb4\xd8\xaa\xd8\xb1\xdb\x8c \xd8\xaf\xd8\xb1 \xd8\xa8\xd8\xba\xd8\xaf\xd8\xa7\xd8\xaf\xd8\x8c \xd9\x85\xd8\xaf\xd8\xaa\xdb\x8c \xd8\xb7\xd9\x88\xd9\x84 \xd8\xae\xd9\x88\xd8\xa7\xd9\x87\xd8\xaf \xda\xa9\xd8\xb4\xdb\x8c\xd8\xaf.</p> - -<p>\xd8\xa2\xd9\x85\xd8\xb1\xdb\x8c\xda\xa9\xd8\xa7 \xd9\x88\xdb\x8c\xd8\xb2\xd8\xa7\xdb\x8c \xd8\xb1\xd8\xa6\xdb\x8c\xd8\xb3 \xd8\xac\xd9\x85\xd9\x87\xd9\x88\xd8\xb1 \xd8\xa7\xdb\x8c\xd8\xb1\xd8\xa7\xd9\x86 \xd8\xb1\xd8\xa7 \xd8\xa8\xd9\x87 \xd9\x85\xd9\x86\xd8\xb8\xd9\x88\xd8\xb1 \xd8\xad\xd8\xb6\xd9\x88\xd8\xb1 \xd9\x88\xdb\x8c \xd8\xaf\xd8\xb1 \xd8\xac\xd9\x84\xd8\xb3\xd9\x87 \xd8\xb1\xd8\xa7\xdb\x8c \xda\xaf\xdb\x8c\xd8\xb1\xdb\x8c \xd8\xb4\xd9\x88\xd8\xb1\xd8\xa7\xdb\x8c \xd8\xa7\xd9\x85\xd9\x86\xdb\x8c\xd8\xaa \xd8\xa8\xd8\xb1\xd8\xa7\xdb\x8c \xd9\x82\xd8\xb7\xd8\xb9\xd9\x86\xd8\xa7\xd9\x85\xd9\x87 \xd8\xaa\xd8\xa7\xd8\xb2\xd9\x87 \xd8\xb9\xd9\x84\xdb\x8c\xd9\x87 \xd8\xa7\xdb\x8c\xd9\x86 \xda\xa9\xd8\xb4\xd9\x88\xd8\xb1 \xd8\xb5\xd8\xa7\xd8\xaf\xd8\xb1 \xda\xa9\xd8\xb1\xd8\xaf.</p> - - -<h4>Urdu</h4> -<p lang=\"ur\">\xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xd8\xa7\xd9\x81\xd8\xaa\xd8\xae\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x8c \xd8\xac\xd8\xa8\xd8\xb1\xdb\x8c \xd8\xb1\xd8\xae\xd8\xb5\xd8\xaa \xd9\xbe\xd8\xb1 \xd9\x84\xd8\xa7\xdb\x81\xd9\x88\xd8\xb1\xdb\x81\xd8\xa7\xd8\xa6\xdb\x8c \xda\xa9\xd9\x88\xd8\xb1\xd9\xb9 \xda\xa9\xdb\x92 \xd8\xa7\xdb\x8c\xda\xa9 \xd8\xa7\xd9\x88\xd8\xb1 \xd8\xb3\xd9\x86\xd8\xaf\xda\xbe \xd9\x85\xdb\x8c\xda\xba \xda\xa9\xd8\xa6\xdb\x8c \xd8\xb3\xd9\x88\xd9\x84 \xd8\xac\xd8\xac \xd9\x85\xd8\xb3\xd8\xaa\xd8\xb9\xd9\x81\xdb\x8c \xdb\x81\xd9\x88\xda\xaf\xd8\xa6\xdb\x92 \xdb\x81\xdb\x8c\xda\xba\xdb\x94</p> - -<p lang=\"ur\">\xda\x86\xdb\x8c\xd9\x81 \xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xda\xa9\xdb\x8c \xd8\xb3\xd8\xb1\xda\xaf\xd8\xb1\xd9\x85\xdb\x8c\xd8\xa7\xda\xba \xd9\x85\xd8\xad\xd8\xaf\xd9\x88\xd8\xaf \xda\xa9\xd8\xb1\xd9\x86\xdb\x92 \xd8\xa7\xd9\x88\xd8\xb1 \xd9\xbe\xd9\x88\xd9\x84\xdb\x8c\xd8\xb3 \xd8\xaa\xd8\xb9\xdb\x8c\xd9\x86\xd8\xa7\xd8\xaa\xdb\x8c \xda\xa9\xdb\x92 \xd8\xad\xda\xa9\xd9\x85 \xd9\x86\xd8\xa7\xd9\x85\xdb\x92 \xd9\xbe\xd8\xb1 \xd8\xaf\xd8\xb3\xd8\xaa\xd8\xae\xd8\xb7 \xda\xa9\xd8\xb1\xda\xa9\xdb\x92 \xd8\xba\xd9\x84\xd8\xb7 \xda\xa9\xdb\x8c\xd8\xa7: \xd8\xac\xd9\x86\xd8\xb1\xd9\x84 \xd9\x85\xd8\xb4\xd8\xb1\xd9\x81</p> - -<h4>Pashto (ps)</h4> -<p lang=\"ps\">\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a.</p> - -<p lang=\"ps\">\xd9\x87 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xda\xa9\xdb\x90 \xd9\x8a\xd9\x88\xd9\x87 \xd8\xaa\xd8\xa7\xd8\xb2\xd9\x87 \xd9\x86\xd8\xb8\xd8\xb1 \xd8\xb4\xd9\x85\xdb\x90\xd8\xb1\xd9\x86\xd9\x87 \xda\x9a\xd9\x8a\xd9\x8a \xda\x86\xdb\x90 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\xa7\xd9\x86 \xd9\xbe\xd9\x87 \xd8\xb2\xd9\x8a\xd8\xa7\xd8\xaa\xdb\x90\xd8\xaf\xd9\x88\xd9\x86\xda\xa9\xd9\x8a \xd8\xaa\xd9\x88\xda\xaf\xd9\x87 \xd8\xaf \xd8\xad\xd8\xa7\xd9\x84\xd8\xa7\xd8\xaa\xd9\x88 \xd9\xbe\xd9\x87 \xd8\xa7\xda\x93\xd9\x87 \xd8\xa8\xd8\xaf\xd8\xa8\xd9\x8a\xd9\x86\xd9\x87 \xd8\xaf\xd9\x8a \xd8\xa7\xd9\x88 \xd8\xaf \xd8\xa8\xdb\x90 \xd8\xa8\xd8\xa7\xd9\x88\xd8\xb1\xd9\x8a \xd8\xa7\xd8\xad\xd8\xb3\xd8\xa7\xd8\xb3 \xda\xa9\xd9\x88\xd9\x8a\xd8\x8c \xd8\xae\xd9\x88 \xd8\xae\xd9\xbe\xd9\x84 \xd9\x87\xd9\x8a\xd9\x88\xd8\xa7\xd8\xaf \xd9\x8a\xd9\x88\xd9\x85\xd9\x88\xd9\xbc\xd9\x89 \xd8\xba\xd9\x88\xd8\xa7\xda\x93\xd9\x8a.</p> - - -<h4>Symbols</h4> -<p>\xc2\xa9\xc2\xae\xe2\x84\xa2\xc2\xb5\xe2\x80\xa2\xe2\x80\xa6\xe2\x80\xb2\xe2\x80\xb3\xc2\xa7<>\xe2\x89\xa4\xe2\x89\xa5\xc2\xb0\xe2\x88\x92\xc2\xb1\xc3\xb7\xe2\x81\x84\xc3\x97\xc6\x92\xe2\x88\xab\xe2\x88\x91\xe2\x88\x9e\xe2\x88\x9a\xe2\x89\x88\xe2\x89\xa0\xe2\x89\xa1\xe2\x88\x8f\xc2\xac\xe2\x88\xa9\xe2\x88\x82</p> -<p>\xce\x92\xce\x93\xce\x94\xce\x95\xce\x96\xce\x97\xce\x98\xce\x99\xce\x9a\xce\x9b\xce\x9c\xce\x9d\xce\x9e\xce\x9f\xce\xa0\xce\xa1\xce\xa3\xce\xa4\xce\xa5\xce\xa6\xce\xa7\xce\xa8\xce\xa9</p> -<p>\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xce\xb5\xce\xb6\xce\xb7\xce\xb8\xce\xb9\xce\xba\xce\xbb\xce\xbc\xce\xbd\xce\xbe\xce\xbf\xcf\x80\xcf\x81\xcf\x82\xcf\x83\xcf\x84\xcf\x85\xcf\x86\xcf\x87\xcf\x88\xcf\x89</p> -<p>\xe2\x86\x90\xe2\x86\x91\xe2\x86\x92\xe2\x86\x93\xe2\x86\x94\xe2\x97\x8a\xe2\x99\xa3\xe2\x99\xa5\xe2\x99\xa6</p> - -<h4>Dingbats</h4> -<p>\xc2\xa7<>\xe2\x86\x92\xe2\x86\x94\xe2\x99\xa3\xe2\x99\xa5\xe2\x99\xa6</p> - -<h4>win-1252 </h4> -<p>\xc2\xa2\xe2\x82\xac\xc2\xa9\xc2\xae\xe2\x84\xa2\xe2\x80\xb0\xc2\xb5\xc2\xb7\xe2\x80\xa2\xe2\x80\xa6\xc2\xa7\xc3\x9f\xe2\x80\xb9\xe2\x80\xba\xc2\xab\xc2\xbb\xe2\x80\x98\xe2\x80\x99\xe2\x80\x9c\xe2\x80\x9d\xe2\x80\x9a\xe2\x80\x9e<>\xe2\x80\x93\xe2\x80\x94\xcb\x86\xcb\x9c\xc2\xb0\xc2\xb1\xc3\xb7\xc3\x97\xc2\xbc\xc2\xbd\xc2\xbe\xc6\x92\xc2\xac\xe2\x80\xa0\xe2\x80\xa1</p> -<p>\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x98\xc5\x92\xc5\xa0\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc5\xb8</p> -<p>\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb8\xc5\x93\xc5\xa1\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf</p> - -<h3>Bidirectional text</h3> -<p>Text alignment, unless specified, is neutral and therefore dictated by the 'direction' of the paragraph.</p> - -<p>All text is analysed chunk by chunk (between tags) and at the end of every block (div, p, td). If the text contains RTL characters, those characters and words are reversed.</p> - -<p>\xd9\x88\xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa8\xd9\x8a\xd8\xaa \xd8\xa7\xd9\x84\xd8\xa7\xd8\xa8\xd9\x8a\xd8\xb6 "\xd8\xa8\xd8\xb4\xd8\xaf\xd8\xa9" \xd8\xaa\xd9\x81\xd8\xac\xd9\x8a\xd8\xb1 with some english in the middle \xd8\xa7\xd9\x8a\xd9\x84\xd8\xa7\xd8\xaa \xd9\x81\xd9\x8a\xd9\x85\xd8\xa7 \xd8\xa7\xd8\xb9\xd8\xb1\xd8\xa8\xd8\xaa \xd9\x88\xd8\xb2\xd8\xa7\xd8\xb1\xd8\xa9</p> - -<p>To set the 'directionality' of the whole document e.g. to reverse default alignment, tables, lists etc. you can set the dir attribute or the direction CSS property on the HTML or BODY tag to 'rtl' e.g.</p> -<p><body style=\"direction: rtl\"></p> -<p><body dir=\"rtl\"></p> -<p style=\"text-align: right\">or you can use \$mpdf->SetDirectionality('rtl');</p> - -<pre style=\"direction: ltr; background-color: #DDFFFF; page-break-inside: avoid;\"> -- the document now has a baseline direction; this determines the - - behaviour of blocks for which text-align has not been specifically set - - layout of mirrored page-margins, columns, ToC and Indexes, headers and footers - - base direction can be set by any of: - - \$mpdf->SetDirectionality('rtl'); - - <html dir=\"rtl\" or style=\"direction: rtl;\"> - - <body dir=\"rtl\" or style=\"direction: rtl;\"> - - base direction is an inherited CSS property, so will affect all content, unless... -- direction can be set for all HTML block elements e.g. <DIV><P><TABLE><UL> etc using - - CSS property < style=\"direction: rtl;\"> - - direction can only be set on the top-level element of nested lists - - direction can only be set on <TABLE>, NOT on THEAD, TBODY, TD etc. - - nested tables CAN have different directions -- NOTE that block/table margins/paddings are NOT reversed by direction - NB mPDF <5.1 reversed the margins/paddings for blocks when RTL set. -- language (either CSS \"lang\", using Autofont, or through initial set-up e.g. \$mpdf = new mPDF('ar') ) - no longer affects direction in any way. - NB config_cp.php has been changed as a result; any values of \"dir\" set here are now ineffective -- default text-align is now as per CSS spec: \"a nameless value which is dependent on direction\" - NB default text-align removed in default stylesheet in config.php -- once text-align is specified, it is respected and inherited - NB mPDF <5.1 reversed the text-align property for all blocks when RTL set. -- the configurable value $rtlcss is depracated, as it is no longer required -- improved algorithm for dtermining text direction - - english word blocks are handled in text reversal as one block i.e. dir=\"rtl\" - [arabic text] this will not be reversed [arabic text] - - arabic numerals 0-9 handled correctly - -Although the control of direction for block elements is now more configurable, the control of -text direction (RTL arabic characters) remains fully automatic and unconfigurable. -<BDO> etc has no effect. Enclosing text in silent tags can sometimes help e.g. - content<span>[arabic text]</span>content - -</pre> - -<pagebreak /> -<h3>Tables</h3> -<p>Tables are automatically transposed when the direction is rtl:</p> -<table class=\"bpmTopicC\"><thead> -<tr class=\"headerrow\"><th>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</th> -<td> -<p>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</p> -</td> -<td>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</td> -</tr> -</thead><tbody> -<tr class=\"oddrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -</tr> -<tr class=\"evenrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th> -<td> -<p>\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2</p> -</td> -<td> -<p>\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2</p> -</td> -</tr> -<tr class=\"oddrow\"><th> -<p>\xd9\x82\xd8\xa7\xd9\x84</p> -</th> -<td> -<p>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</p> -</td> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -</tr> -<tr class=\"evenrow\"><th> -<p>\xd9\x82\xd8\xa7\xd9\x84</p> -<p>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</p> -</th> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -<td> -<p>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</p> -</td> -</tr> -<tr class=\"oddrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -</tr> -<tr class=\"evenrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -</tr> -<tr class=\"oddrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -</tr> -<tr class=\"evenrow\"><th>\xd9\x82\xd8\xa7\xd9\x84</th> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -<td>\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</td> -</tr> -</tbody></table> -<p> </p> -<h3>Lists</h3> -<p>Lists will automatically reverse as well (note the use of list-style to set numbering):</p> -<div style=\"background-color:#ddccff; padding:5pt;\"> -<ol style=\"list-style-type: arabic-indic;\"> -<li>\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3</li> -<li>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a - <ul><li>\xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac </li> - <li>\xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2 - <ul> - <li>\xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb0\xd9\x83\xd8\xb1\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa7\xd8\xa8\xd8\xb9\xd8\xa9</li> - <li>\xd9\x84\xd9\x84\xd8\xba\xd8\xb2\xd9\x88 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a</li> - </ul> - </li> -</ul></li> -<li>\xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd9\x84\xd9\x88\xd9\x8a\xd8\xa9 \xd8\xad\xd8\xa7\xd9\x84\xd9\x8a\xd8\xa7</li> -<li>\xd9\x84\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x86 \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82</li> -</ol> -</div> -"; - -//============================================================== - // Set Header and Footer - $h = array ( - 'odd' => - array ( - 'R' => - array ( - 'content' => '{PAGENO}', - 'font-size' => 8, - 'font-style' => 'B', - ), - 'L' => - array ( - 'content' => "\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3", - 'font-size' => 8, - 'font-style' => 'B', - ), - 'line' => 1, - ), - 'even' => - array ( - 'L' => - array ( - 'content' => '{PAGENO}', - 'font-size' => 8, - 'font-style' => 'B', - ), - 'R' => - array ( - 'content' => "\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3", - 'font-size' => 8, - 'font-style' => 'B', - ), - 'line' => 1, - ), -); - - $f = array ( - 'odd' => - array ( - 'L' => - array ( - 'content' => '{DATE Y-m-d}', - 'font-size' => 8, - 'font-style' => 'BI', - ), - 'C' => - array ( - 'content' => '- {PAGENO} -', - 'font-size' => 8, - ), - 'R' => - array ( - 'content' => "\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3", - 'font-size' => 8, - ), - 'line' => 1, - ), - 'even' => - array ( - 'L' => - array ( - 'content' => "\xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3", - 'font-size' => 8, - 'font-style' => 'B', - ), - 'C' => - array ( - 'content' => '- {PAGENO} -', - 'font-size' => 8, - ), - 'R' => - array ( - 'content' => '{DATE Y-m-d}', - 'font-size' => 8, - 'font-style' => 'BI', - ), - 'line' => 1, - ), -); - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - - -$mpdf=new mPDF('ar','A4','','',32,25,27,25,16,13); - -// From mPDF 5.1 onwards you must set: -$mpdf->SetDirectionality('rtl'); -$mpdf->debug = true; -$mpdf->mirrorMargins = true; -$mpdf->useSubstitutions = true; -$mpdf->SetDisplayMode('fullpage','two'); - - -$mpdf->setHeader($h); -$mpdf->setFooter($f); - - -$stylesheet = file_get_contents('mpdfstyletables.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); -$mpdf->AddPage(); - -$mpdf->SetColumns(2,'J'); -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example27_CJK_using_Adobe_fonts.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example27_CJK_using_Adobe_fonts.php deleted file mode 100644 index c46245f9cf9a815c0fa968d9826d85a234ef2780..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example27_CJK_using_Adobe_fonts.php +++ /dev/null @@ -1,91 +0,0 @@ -<?php - -ini_set("memory_limit","256M"); - - -$html = " - -<style> -p { text-align: justify; } -td { text-align: justify; } -</style> -<h1>mPDF</h1> -<h2>CJK Languages</h2> - - -<bookmark content=\"\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1\"> - -<h4>Japanese (pangrams)</h4> -<h5>Iroha Uta </h5> - -<p style=\"font-family: SJIS\">\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80\xe3\x81\xa1\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe3\x82\x8f\xe3\x81\x8b\xe3\x82\x88\xe3\x81\x9f\xe3\x82\x8c\xe3\x81\x9d\xe3\x80\x80\xe3\x81\xa4\xe3\x81\xad\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe3\x81\x86\xe3\x82\x90\xe3\x81\xae\xe3\x81\x8a\xe3\x81\x8f\xe3\x82\x84\xe3\x81\xbe\xe3\x80\x80\xe3\x81\x91\xe3\x81\xb5\xe3\x81\x93\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x81\x8d\xe3\x82\x86\xe3\x82\x81\xe3\x81\xbf\xe3\x81\x97\xe3\x80\x80\xe3\x82\x91\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x99 </p> - -<p lang=\"ja\">\xe8\x89\xb2\xe3\x81\xaf\xe5\x8c\x82\xe3\x81\xb8\xe3\x81\xa9\xe3\x80\x80\xe6\x95\xa3\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe6\x88\x91\xe3\x81\x8c\xe4\xb8\x96\xe8\xaa\xb0\xe3\x81\x9e\xe3\x80\x80\xe5\xb8\xb8\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe6\x9c\x89\xe7\x82\xba\xe3\x81\xae\xe5\xa5\xa5\xe5\xb1\xb1\xe3\x80\x80\xe4\xbb\x8a\xe6\x97\xa5\xe8\xb6\x8a\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb5\x85\xe3\x81\x8d\xe5\xa4\xa2\xe8\xa6\x8b\xe3\x81\x98\xe3\x80\x80\xe9\x85\x94\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x9a\xef\xbc\x88\xe3\x82\x93\xef\xbc\x89 </p> - -<h5>Tori Naku Uta </h5> - -<p style=\"font-family: SJIS\">\xe3\x81\xa8\xe3\x82\x8a\xe3\x81\xaa\xe3\x81\x8f\xe3\x81\x93\xe3\x82\x91\xe3\x81\x99\xe3\x80\x80\xe3\x82\x86\xe3\x82\x81\xe3\x81\x95\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe3\x81\xbf\xe3\x82\x88\xe3\x81\x82\xe3\x81\x91\xe3\x82\x8f\xe3\x81\x9f\xe3\x82\x8b\xe3\x80\x80\xe3\x81\xb2\xe3\x82\x93\xe3\x81\x8b\xe3\x81\x97\xe3\x82\x92\xe3\x80\x80\xe3\x81\x9d\xe3\x82\x89\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x8a\xe3\x81\x8d\xe3\x81\xa4\xe3\x81\xb8\xe3\x81\xab\xe3\x80\x80\xe3\x81\xbb\xe3\x81\xb5\xe3\x81\xad\xe3\x82\x80\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe3\x82\x82\xe3\x82\x84\xe3\x81\xae\xe3\x81\x86\xe3\x81\xa1 </p> - -<p lang=\"ja\">\xe9\xb3\xa5\xe5\x95\xbc\xe3\x81\x8f\xe5\xa3\xb0\xe3\x81\x99\xe3\x80\x80\xe5\xa4\xa2\xe8\xa6\x9a\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe8\xa6\x8b\xe3\x82\x88\xe6\x98\x8e\xe3\x81\x91\xe6\xb8\xa1\xe3\x82\x8b\xe3\x80\x80\xe6\x9d\xb1\xe3\x82\x92\xe3\x80\x80\xe7\xa9\xba\xe8\x89\xb2\xe6\xa0\x84\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb2\x96\xe3\x81\xa4\xe8\xbe\xba\xe3\x81\xab\xe3\x80\x80\xe5\xb8\x86\xe8\x88\xb9\xe7\xbe\xa4\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe9\x9d\x84\xe3\x81\xae\xe4\xb8\xad </p> - -<h5>Ametsuchi No Uta </h5> - -<p style=\"font-family: SJIS\">\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1 \xe3\x81\xbb\xe3\x81\x97 \xe3\x81\x9d\xe3\x82\x89 / \xe3\x82\x84\xe3\x81\xbe \xe3\x81\x8b\xe3\x81\xaf \xe3\x81\xbf\xe3\x81\xad \xe3\x81\x9f\xe3\x81\xab / \xe3\x81\x8f\xe3\x82\x82 \xe3\x81\x8d\xe3\x82\x8a \xe3\x82\x80\xe3\x82\x8d \xe3\x81\x93\xe3\x81\x91 / \xe3\x81\xb2\xe3\x81\xa8 \xe3\x81\x84\xe3\x81\xac \xe3\x81\x86\xe3\x81\xb8 \xe3\x81\x99\xe3\x82\x91 / \xe3\x82\x86\xe3\x82\x8f \xe3\x81\x95\xe3\x82\x8b \xe3\x81\x8a\xe3\x81\xb5 \xe3\x81\x9b\xe3\x82\x88 / \xe3\x81\x88\xe3\x81\xae\xe3\x81\x88*\xe3\x82\x92 \xe3\x81\xaa\xe3\x82\x8c \xe3\x82\x90\xe3\x81\xa6 </p> - -<p lang=\"ja\">\xe5\xa4\xa9 \xe5\x9c\xb0 \xe6\x98\x9f \xe7\xa9\xba / \xe5\xb1\xb1 \xe5\xb7\x9d \xe5\xb3\xb0 \xe8\xb0\xb7 / \xe9\x9b\xb2 \xe9\x9c\xa7 \xe5\xae\xa4 \xe8\x8b\x94 / \xe4\xba\xba \xe7\x8a\xac \xe4\xb8\x8a \xe6\x9c\xab / \xe7\xa1\xab\xe9\xbb\x84 \xe7\x8c\xbf \xe7\x94\x9f\xe3\x81\xb5 \xe7\x82\xba\xe3\x82\x88 / \xe6\xa6\x8e\xe3\x81\xae \xe6\x9e\x9d\xe3\x82\x92 \xe9\xa6\xb4\xe3\x82\x8c \xe5\xb1\x85\xe3\x81\xa6 </p> - -<h5>Taini no Uta </h5> - -<p style=\"font-family: SJIS\">\xe3\x81\x9f\xe3\x82\x90\xe3\x81\xab\xe3\x81\x84\xe3\x81\xa6\xe3\x80\x80\xe3\x81\xaa\xe3\x81\xa4\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9d\xe3\x80\x80\xe3\x81\x8d\xe3\x81\xbf\xe3\x82\x81\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x82\x8a\xe3\x81\x8a\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe3\x82\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x82\x8d\xe3\x81\xae\xe3\x80\x80\xe3\x81\x86\xe3\x81\xa1\xe3\x82\x91\xe3\x81\xb8\xe3\x82\x8b\xe3\x81\x93\xe3\x82\x89\xe3\x80\x80\xe3\x82\x82\xe3\x81\xaf\xe3\x81\xbb\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe3\x81\xb5\xe3\x81\xad\xe3\x81\x8b\xe3\x81\x91\xe3\x81\xac </p> - -<p lang=\"ja\">\xe7\x94\xb0\xe5\xb1\x85\xe3\x81\xab\xe5\x87\xba\xe3\x81\xa7\xe3\x80\x80\xe8\x8f\x9c\xe6\x91\x98\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9e\xe3\x80\x80\xe5\x90\x9b\xe5\x8f\xac\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe6\xb1\x82\xe9\xa3\x9f\xe3\x82\x8a\xe8\xbf\xbd\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe5\xb1\xb1\xe5\x9f\x8e\xe3\x81\xae\xe3\x80\x80\xe6\x89\x93\xe9\x85\x94\xe3\x81\xb8\xe3\x82\x8b\xe5\xad\x90\xe3\x82\x89\xe3\x80\x80\xe8\x97\xbb\xe8\x91\x89\xe5\xb9\xb2\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe8\x88\x9f\xe7\xb9\x8b\xe3\x81\x91\xe3\x81\xac </p> - - -<bookmark content=\"\xe7\xbe\x8e\xe5\x9b\xbd\xe8\x88\xaa\xe7\xa9\xba\xe4\xb8\x9a\xe5\xb7\xa8\"> -<h4>Chinese (simplified) GB2312</h4> - -<p style=\"font-family: GB\">\xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac\xe5\xae\xa4\xe7\x9a\x84\xe6\xb6\x88\xe6\x81\xaf\xe7\xa7\xb0\xef\xbc\x8c\xe4\xb8\xad\xe6\x96\xb9\xe5\x85\x8d\xe9\x99\xa4\xe4\xb8\x8e\xe4\xb8\xad\xe5\x9b\xbd\xe6\x9c\x89\xe5\xa4\x96\xe4\xba\xa4\xe5\x85\xb3\xe7\xb3\xbb\xe7\x9a\x84\xe6\x89\x80\xe6\x9c\x89\xe9\x9d\x9e\xe6\xb4\xb2\xe9\x87\x8d\xe5\x80\xba\xe7\xa9\xb7\xe5\x9b\xbd\xe5\x8f\x8a\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x94\xbf\xe5\xba\x9c\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x9c\x89\xe5\x85\xb3\xe9\x83\xa8\xe9\x97\xa8\xe5\xb7\xb2\xe5\xaf\xb9\xe7\x9b\xb8\xe5\x85\xb3\xe5\x80\xba\xe5\x8a\xa1\xe8\xbf\x9b\xe8\xa1\x8c\xe5\x85\xa8\xe9\x9d\xa2\xe6\xb8\x85\xe7\x90\x86\xe6\xa0\xb8\xe5\xaf\xb9\xef\xbc\x8c\xe5\xaf\xb9\xe4\xb8\x8e\xe4\xb8\xad\xe5\x9b\xbd\xe6\x9c\x89\xe5\xa4\x96\xe4\xba\xa4\xe5\x85\xb3\xe7\xb3\xbb\xe7\x9a\x8433\xe4\xb8\xaa\xe9\x9d\x9e\xe6\xb4\xb2\xe9\x87\x8d\xe5\x80\xba\xe7\xa9\xb7\xe5\x9b\xbd\xe5\x92\x8c\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xef\xbc\x8c\xe5\x85\x8d\xe9\x99\xa4\xe5\x85\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95168\xe7\xac\x94\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x8b\x9f\xe4\xba\x8e2007\xe5\xb9\xb4\xe5\xba\x95\xe5\x89\x8d\xe4\xb8\x8e\xe5\x8f\x97\xe6\x8f\xb4\xe5\x9b\xbd\xe5\x8a\x9e\xe7\x90\x86\xe5\xae\x8c\xe5\x85\x8d\xe5\x80\xba\xe5\x8d\x8f\xe8\xae\xae\xe3\x80\x82</p> - - -<bookmark content=\"\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\"> -<h4>Chinese (Traditional - Hong Kong)</h4> - -<p lang=\"zh-HK\">\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\xe6\x95\x99\xe8\x82\xb2\xe7\xb6\xb2\xe7\xab\x99\xef\xbc\x8c\xe5\xae\x83\xe6\x88\x90\xe5\x8a\x9f\xe7\xb5\x90\xe5\x90\x88\xe4\xba\x86\xe9\xa6\x99\xe6\xb8\xaf\xe8\xb3\xbd\xe9\xa6\xac\xe6\x9c\x83\xe9\x98\xb2\xe6\xad\xa2\xe8\x87\xaa\xe6\xae\xba\xe7\xa0\x94\xe7\xa9\xb6\xe4\xb8\xad\xe5\xbf\x83\xe5\x90\x84\xe6\x96\xb9\xe9\x9d\xa2\xe7\x9a\x84\xe5\xb0\x88\xe6\x89\x8d\xef\xbc\x8c\xe7\x82\xba\xe9\x9d\x92\xe5\xb0\x91\xe5\xb9\xb4\xe4\xba\xba\xe6\x8f\x90\xe4\xbe\x9b\xe7\xb2\xbe\xe7\xa5\x9e\xe5\x81\xa5\xe5\xba\xb7\xe7\x9a\x84\xe8\xa8\x8a\xe6\x81\xaf\xef\xbc\x8c\xe5\xb0\x8d\xe6\x99\xae\xe5\x8f\x8a\xe6\x8a\x91\xe9\xac\xb1\xe7\x97\x87\xe7\x9f\xa5\xe8\xad\x98\xe7\x9a\x84\xe8\xb2\xa2\xe7\x8d\xbb\xe8\x89\xaf\xe5\xa4\x9a\xe3\x80\x82\xe5\x9c\xa8\xe9\xa6\x99\xe6\xb8\xaf\xef\xbc\x8c\xe5\xae\x83\xe6\x9b\xbe\xe7\x8d\xb2\xe9\x81\xb8\xe7\x82\xba\xe3\x80\x8c2004\xe5\xb9\xb4\xe5\x8d\x81\xe5\xa4\xa7\xe5\x81\xa5\xe5\xba\xb7\xe7\xb6\xb2\xe7\xab\x99\xe3\x80\x8d\xe4\xb9\x8b\xe4\xb8\x80\xef\xbc\x8c\xe8\xa9\xb2\xe9\xa0\x85\xe9\x81\xb8\xe8\x88\x89\xe8\x87\xaa2005\xe5\xb9\xb4\xe8\xb5\xb7\xe6\x94\xb9\xe5\x90\x8d\xe7\x8f\xbe\xe6\x99\x82\xe7\x9a\x84\xe3\x80\x8c\xe5\x84\xaa\xe7\xa7\x80\xe7\xb6\xb2\xe7\xab\x99\xe9\x81\xb8\xe8\x88\x89\xe3\x80\x8d\xe3\x80\x82\xe5\x85\xb6\xe8\xb2\xa2\xe7\x8d\xbb\xe5\x9c\xa8\xe5\x9c\x8b\xe9\x9a\x9b\xe9\x96\x93\xe4\xba\xa6\xe5\x82\x99\xe5\x8f\x97\xe8\x82\xaf\xe5\xae\x9a\xef\xbc\x8c2005\xe5\xb9\xb4\xef\xbc\x8c\xe8\xa9\xb2\xe7\xb6\xb2\xe7\xab\x99\xe6\xa6\xae\xe7\x8d\xb2\xe7\xac\xac\xe5\x85\xab\xe5\xb1\x86\xe3\x80\x8c\xe4\xba\x9e\xe6\xb4\xb2\xe5\x89\xb5\xe6\x96\xb0\xe5\xa4\xa7\xe7\x8d\x8e\xe3\x80\x8d\xe9\x8a\x80\xe7\x8d\x8e\xe3\x80\x82</p> - - - -<bookmark content=\"\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98\"> -<h4>Korean</h4> -<p style=\"font-family: UHC\">\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98 \xea\xb3\xa0\xec\x9c\xa0\xec\xa1\xb0\xea\xb1\xb4\xec\x9d\x80 \xec\x9e\x85\xec\x88\xa0\xeb\x81\xbc\xeb\xa6\xac \xeb\xa7\x8c\xeb\x82\x98\xec\x95\xbc \xed\x95\x98\xea\xb3\xa0 \xed\x8a\xb9\xeb\xb3\x84\xed\x95\x9c \xea\xb8\xb0\xec\x88\xa0\xec\x9d\x80 \xed\x95\x84\xec\x9a\x94\xec\xb9\x98 \xec\x95\x8a\xeb\x8b\xa4. </p> - - - -</div> -"; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('+aCJK','A4','','',32,25,27,25,16,13); -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->SetTitle($utxt['zh-CN']); -$mpdf->SetAuthor($utxt['zh-CN']); - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyleA4.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example28_CJK_using_embedded_fonts.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example28_CJK_using_embedded_fonts.php deleted file mode 100644 index 8fb5b61786bc418e2a12380967ec2d944456244c..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example28_CJK_using_embedded_fonts.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php - -ini_set("memory_limit","256M"); - - -$html = " - -<style> -p { text-align: justify; } -td { text-align: justify; } -</style> -<h1>mPDF</h1> -<h2>CJK Languages</h2> - - -<bookmark content=\"\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1\"> - -<h4>Japanese (pangrams)</h4> -<h5>Iroha Uta </h5> - -<p style=\"font-family: IPAMinchoP\">\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80\xe3\x81\xa1\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe3\x82\x8f\xe3\x81\x8b\xe3\x82\x88\xe3\x81\x9f\xe3\x82\x8c\xe3\x81\x9d\xe3\x80\x80\xe3\x81\xa4\xe3\x81\xad\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe3\x81\x86\xe3\x82\x90\xe3\x81\xae\xe3\x81\x8a\xe3\x81\x8f\xe3\x82\x84\xe3\x81\xbe\xe3\x80\x80\xe3\x81\x91\xe3\x81\xb5\xe3\x81\x93\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x81\x8d\xe3\x82\x86\xe3\x82\x81\xe3\x81\xbf\xe3\x81\x97\xe3\x80\x80\xe3\x82\x91\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x99 </p> - -<p lang=\"ja\">\xe8\x89\xb2\xe3\x81\xaf\xe5\x8c\x82\xe3\x81\xb8\xe3\x81\xa9\xe3\x80\x80\xe6\x95\xa3\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe6\x88\x91\xe3\x81\x8c\xe4\xb8\x96\xe8\xaa\xb0\xe3\x81\x9e\xe3\x80\x80\xe5\xb8\xb8\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe6\x9c\x89\xe7\x82\xba\xe3\x81\xae\xe5\xa5\xa5\xe5\xb1\xb1\xe3\x80\x80\xe4\xbb\x8a\xe6\x97\xa5\xe8\xb6\x8a\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb5\x85\xe3\x81\x8d\xe5\xa4\xa2\xe8\xa6\x8b\xe3\x81\x98\xe3\x80\x80\xe9\x85\x94\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x9a\xef\xbc\x88\xe3\x82\x93\xef\xbc\x89 </p> - -<h5>Tori Naku Uta </h5> - -<p style=\"font-family: IPAGothicP\">\xe3\x81\xa8\xe3\x82\x8a\xe3\x81\xaa\xe3\x81\x8f\xe3\x81\x93\xe3\x82\x91\xe3\x81\x99\xe3\x80\x80\xe3\x82\x86\xe3\x82\x81\xe3\x81\x95\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe3\x81\xbf\xe3\x82\x88\xe3\x81\x82\xe3\x81\x91\xe3\x82\x8f\xe3\x81\x9f\xe3\x82\x8b\xe3\x80\x80\xe3\x81\xb2\xe3\x82\x93\xe3\x81\x8b\xe3\x81\x97\xe3\x82\x92\xe3\x80\x80\xe3\x81\x9d\xe3\x82\x89\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x8a\xe3\x81\x8d\xe3\x81\xa4\xe3\x81\xb8\xe3\x81\xab\xe3\x80\x80\xe3\x81\xbb\xe3\x81\xb5\xe3\x81\xad\xe3\x82\x80\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe3\x82\x82\xe3\x82\x84\xe3\x81\xae\xe3\x81\x86\xe3\x81\xa1 </p> - -<p lang=\"ja\">\xe9\xb3\xa5\xe5\x95\xbc\xe3\x81\x8f\xe5\xa3\xb0\xe3\x81\x99\xe3\x80\x80\xe5\xa4\xa2\xe8\xa6\x9a\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe8\xa6\x8b\xe3\x82\x88\xe6\x98\x8e\xe3\x81\x91\xe6\xb8\xa1\xe3\x82\x8b\xe3\x80\x80\xe6\x9d\xb1\xe3\x82\x92\xe3\x80\x80\xe7\xa9\xba\xe8\x89\xb2\xe6\xa0\x84\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe6\xb2\x96\xe3\x81\xa4\xe8\xbe\xba\xe3\x81\xab\xe3\x80\x80\xe5\xb8\x86\xe8\x88\xb9\xe7\xbe\xa4\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe9\x9d\x84\xe3\x81\xae\xe4\xb8\xad </p> - -<h5>Ametsuchi No Uta </h5> - -<p style=\"font-family: IPAGothicP\">\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1 \xe3\x81\xbb\xe3\x81\x97 \xe3\x81\x9d\xe3\x82\x89 / \xe3\x82\x84\xe3\x81\xbe \xe3\x81\x8b\xe3\x81\xaf \xe3\x81\xbf\xe3\x81\xad \xe3\x81\x9f\xe3\x81\xab / \xe3\x81\x8f\xe3\x82\x82 \xe3\x81\x8d\xe3\x82\x8a \xe3\x82\x80\xe3\x82\x8d \xe3\x81\x93\xe3\x81\x91 / \xe3\x81\xb2\xe3\x81\xa8 \xe3\x81\x84\xe3\x81\xac \xe3\x81\x86\xe3\x81\xb8 \xe3\x81\x99\xe3\x82\x91 / \xe3\x82\x86\xe3\x82\x8f \xe3\x81\x95\xe3\x82\x8b \xe3\x81\x8a\xe3\x81\xb5 \xe3\x81\x9b\xe3\x82\x88 / \xe3\x81\x88\xe3\x81\xae\xe3\x81\x88*\xe3\x82\x92 \xe3\x81\xaa\xe3\x82\x8c \xe3\x82\x90\xe3\x81\xa6 </p> - -<p lang=\"ja\">\xe5\xa4\xa9 \xe5\x9c\xb0 \xe6\x98\x9f \xe7\xa9\xba / \xe5\xb1\xb1 \xe5\xb7\x9d \xe5\xb3\xb0 \xe8\xb0\xb7 / \xe9\x9b\xb2 \xe9\x9c\xa7 \xe5\xae\xa4 \xe8\x8b\x94 / \xe4\xba\xba \xe7\x8a\xac \xe4\xb8\x8a \xe6\x9c\xab / \xe7\xa1\xab\xe9\xbb\x84 \xe7\x8c\xbf \xe7\x94\x9f\xe3\x81\xb5 \xe7\x82\xba\xe3\x82\x88 / \xe6\xa6\x8e\xe3\x81\xae \xe6\x9e\x9d\xe3\x82\x92 \xe9\xa6\xb4\xe3\x82\x8c \xe5\xb1\x85\xe3\x81\xa6 </p> - -<h5>Taini no Uta </h5> - -<p style=\"font-family: hannoma\">\xe3\x81\x9f\xe3\x82\x90\xe3\x81\xab\xe3\x81\x84\xe3\x81\xa6\xe3\x80\x80\xe3\x81\xaa\xe3\x81\xa4\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9d\xe3\x80\x80\xe3\x81\x8d\xe3\x81\xbf\xe3\x82\x81\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x82\x8a\xe3\x81\x8a\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe3\x82\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x82\x8d\xe3\x81\xae\xe3\x80\x80\xe3\x81\x86\xe3\x81\xa1\xe3\x82\x91\xe3\x81\xb8\xe3\x82\x8b\xe3\x81\x93\xe3\x82\x89\xe3\x80\x80\xe3\x82\x82\xe3\x81\xaf\xe3\x81\xbb\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe3\x81\xb5\xe3\x81\xad\xe3\x81\x8b\xe3\x81\x91\xe3\x81\xac </p> - -<p lang=\"ja\">\xe7\x94\xb0\xe5\xb1\x85\xe3\x81\xab\xe5\x87\xba\xe3\x81\xa7\xe3\x80\x80\xe8\x8f\x9c\xe6\x91\x98\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9e\xe3\x80\x80\xe5\x90\x9b\xe5\x8f\xac\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe6\xb1\x82\xe9\xa3\x9f\xe3\x82\x8a\xe8\xbf\xbd\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe5\xb1\xb1\xe5\x9f\x8e\xe3\x81\xae\xe3\x80\x80\xe6\x89\x93\xe9\x85\x94\xe3\x81\xb8\xe3\x82\x8b\xe5\xad\x90\xe3\x82\x89\xe3\x80\x80\xe8\x97\xbb\xe8\x91\x89\xe5\xb9\xb2\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe8\x88\x9f\xe7\xb9\x8b\xe3\x81\x91\xe3\x81\xac </p> - - -<bookmark content=\"\xe7\xbe\x8e\xe5\x9b\xbd\xe8\x88\xaa\xe7\xa9\xba\xe4\xb8\x9a\xe5\xb7\xa8\"> -<h4>Chinese (simplified) GB2312</h4> - -<p style=\"font-family: sun-exta\">\xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac\xe5\xae\xa4\xe7\x9a\x84\xe6\xb6\x88\xe6\x81\xaf\xe7\xa7\xb0\xef\xbc\x8c\xe4\xb8\xad\xe6\x96\xb9\xe5\x85\x8d\xe9\x99\xa4\xe4\xb8\x8e\xe4\xb8\xad\xe5\x9b\xbd\xe6\x9c\x89\xe5\xa4\x96\xe4\xba\xa4\xe5\x85\xb3\xe7\xb3\xbb\xe7\x9a\x84\xe6\x89\x80\xe6\x9c\x89\xe9\x9d\x9e\xe6\xb4\xb2\xe9\x87\x8d\xe5\x80\xba\xe7\xa9\xb7\xe5\x9b\xbd\xe5\x8f\x8a\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x94\xbf\xe5\xba\x9c\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x9c\x89\xe5\x85\xb3\xe9\x83\xa8\xe9\x97\xa8\xe5\xb7\xb2\xe5\xaf\xb9\xe7\x9b\xb8\xe5\x85\xb3\xe5\x80\xba\xe5\x8a\xa1\xe8\xbf\x9b\xe8\xa1\x8c\xe5\x85\xa8\xe9\x9d\xa2\xe6\xb8\x85\xe7\x90\x86\xe6\xa0\xb8\xe5\xaf\xb9\xef\xbc\x8c\xe5\xaf\xb9\xe4\xb8\x8e\xe4\xb8\xad\xe5\x9b\xbd\xe6\x9c\x89\xe5\xa4\x96\xe4\xba\xa4\xe5\x85\xb3\xe7\xb3\xbb\xe7\x9a\x8433\xe4\xb8\xaa\xe9\x9d\x9e\xe6\xb4\xb2\xe9\x87\x8d\xe5\x80\xba\xe7\xa9\xb7\xe5\x9b\xbd\xe5\x92\x8c\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xef\xbc\x8c\xe5\x85\x8d\xe9\x99\xa4\xe5\x85\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95168\xe7\xac\x94\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x8b\x9f\xe4\xba\x8e2007\xe5\xb9\xb4\xe5\xba\x95\xe5\x89\x8d\xe4\xb8\x8e\xe5\x8f\x97\xe6\x8f\xb4\xe5\x9b\xbd\xe5\x8a\x9e\xe7\x90\x86\xe5\xae\x8c\xe5\x85\x8d\xe5\x80\xba\xe5\x8d\x8f\xe8\xae\xae\xe3\x80\x82</p> - - -<bookmark content=\"\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\"> -<h4>Chinese (Traditional - Hong Kong)</h4> - -<p lang=\"zh-HK\">\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\xe6\x95\x99\xe8\x82\xb2\xe7\xb6\xb2\xe7\xab\x99\xef\xbc\x8c\xe5\xae\x83\xe6\x88\x90\xe5\x8a\x9f\xe7\xb5\x90\xe5\x90\x88\xe4\xba\x86\xe9\xa6\x99\xe6\xb8\xaf\xe8\xb3\xbd\xe9\xa6\xac\xe6\x9c\x83\xe9\x98\xb2\xe6\xad\xa2\xe8\x87\xaa\xe6\xae\xba\xe7\xa0\x94\xe7\xa9\xb6\xe4\xb8\xad\xe5\xbf\x83\xe5\x90\x84\xe6\x96\xb9\xe9\x9d\xa2\xe7\x9a\x84\xe5\xb0\x88\xe6\x89\x8d\xef\xbc\x8c\xe7\x82\xba\xe9\x9d\x92\xe5\xb0\x91\xe5\xb9\xb4\xe4\xba\xba\xe6\x8f\x90\xe4\xbe\x9b\xe7\xb2\xbe\xe7\xa5\x9e\xe5\x81\xa5\xe5\xba\xb7\xe7\x9a\x84\xe8\xa8\x8a\xe6\x81\xaf\xef\xbc\x8c\xe5\xb0\x8d\xe6\x99\xae\xe5\x8f\x8a\xe6\x8a\x91\xe9\xac\xb1\xe7\x97\x87\xe7\x9f\xa5\xe8\xad\x98\xe7\x9a\x84\xe8\xb2\xa2\xe7\x8d\xbb\xe8\x89\xaf\xe5\xa4\x9a\xe3\x80\x82\xe5\x9c\xa8\xe9\xa6\x99\xe6\xb8\xaf\xef\xbc\x8c\xe5\xae\x83\xe6\x9b\xbe\xe7\x8d\xb2\xe9\x81\xb8\xe7\x82\xba\xe3\x80\x8c2004\xe5\xb9\xb4\xe5\x8d\x81\xe5\xa4\xa7\xe5\x81\xa5\xe5\xba\xb7\xe7\xb6\xb2\xe7\xab\x99\xe3\x80\x8d\xe4\xb9\x8b\xe4\xb8\x80\xef\xbc\x8c\xe8\xa9\xb2\xe9\xa0\x85\xe9\x81\xb8\xe8\x88\x89\xe8\x87\xaa2005\xe5\xb9\xb4\xe8\xb5\xb7\xe6\x94\xb9\xe5\x90\x8d\xe7\x8f\xbe\xe6\x99\x82\xe7\x9a\x84\xe3\x80\x8c\xe5\x84\xaa\xe7\xa7\x80\xe7\xb6\xb2\xe7\xab\x99\xe9\x81\xb8\xe8\x88\x89\xe3\x80\x8d\xe3\x80\x82\xe5\x85\xb6\xe8\xb2\xa2\xe7\x8d\xbb\xe5\x9c\xa8\xe5\x9c\x8b\xe9\x9a\x9b\xe9\x96\x93\xe4\xba\xa6\xe5\x82\x99\xe5\x8f\x97\xe8\x82\xaf\xe5\xae\x9a\xef\xbc\x8c2005\xe5\xb9\xb4\xef\xbc\x8c\xe8\xa9\xb2\xe7\xb6\xb2\xe7\xab\x99\xe6\xa6\xae\xe7\x8d\xb2\xe7\xac\xac\xe5\x85\xab\xe5\xb1\x86\xe3\x80\x8c\xe4\xba\x9e\xe6\xb4\xb2\xe5\x89\xb5\xe6\x96\xb0\xe5\xa4\xa7\xe7\x8d\x8e\xe3\x80\x8d\xe9\x8a\x80\xe7\x8d\x8e\xe3\x80\x82</p> - - - -<bookmark content=\"\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98\"> -<h4>Korean</h4> -<p style=\"font-family: unbatang_0613\">\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98 \xea\xb3\xa0\xec\x9c\xa0\xec\xa1\xb0\xea\xb1\xb4\xec\x9d\x80 \xec\x9e\x85\xec\x88\xa0\xeb\x81\xbc\xeb\xa6\xac \xeb\xa7\x8c\xeb\x82\x98\xec\x95\xbc \xed\x95\x98\xea\xb3\xa0 \xed\x8a\xb9\xeb\xb3\x84\xed\x95\x9c \xea\xb8\xb0\xec\x88\xa0\xec\x9d\x80 \xed\x95\x84\xec\x9a\x94\xec\xb9\x98 \xec\x95\x8a\xeb\x8b\xa4. </p> - -</div> -"; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('-aCJK','A4','','',32,25,27,25,16,13); -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->SetTitle($utxt['zh-CN']); -$mpdf->SetAuthor($utxt['zh-CN']); - -// LOAD a stylesheet -$stylesheet = file_get_contents('mpdfstyleA4.css'); -$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example29_multilingual_autofont.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example29_multilingual_autofont.php deleted file mode 100644 index 1ca99f25a520801b889bfc294ed85c5d75312fcf..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example29_multilingual_autofont.php +++ /dev/null @@ -1,400 +0,0 @@ -<?php -// -$timeo_start = microtime(true); -ini_set("memory_limit","128M"); -// - -$html = " -<style> - -body { font-family: sans; text-align: justify; } -p { font-family: sans; } -div { font-family: sans; } - -</style> - -<p>This document includes many languages. Selection of appropriate fonts is done automatically by using <b>AutoFont</b>. </p> -<h3>Pangrams - (from Wikipedia) </h3> -<p>The quick brown fox jumps over a lazy dog</p> - -<h4>Bulgarian</h4> -<p>\xd0\x96\xd1\x8a\xd0\xbb\xd1\x82\xd0\xb0\xd1\x82\xd0\xb0 \xd0\xb4\xd1\x8e\xd0\xbb\xd1\x8f \xd0\xb1\xd0\xb5\xd1\x88\xd0\xb5 \xd1\x89\xd0\xb0\xd1\x81\xd1\x82\xd0\xbb\xd0\xb8\xd0\xb2\xd0\xb0, \xd1\x87\xd0\xb5 \xd0\xbf\xd1\x83\xd1\x85\xd1\x8a\xd1\x82, \xd0\xba\xd0\xbe\xd0\xb9\xd1\x82\xd0\xbe \xd1\x86\xd1\x8a\xd1\x84\xd0\xbd\xd0\xb0, \xd0\xb7\xd0\xb0\xd0\xbc\xd1\x80\xd1\x8a\xd0\xb7\xd0\xbd\xd0\xb0 \xd0\xba\xd0\xb0\xd1\x82\xd0\xbe \xd0\xb3\xd1\x8c\xd0\xbe\xd0\xbd.</p> - -<p>\xd0\x97\xd0\xb0 \xd0\xbc\xd0\xb8\xd0\xb3 \xd0\xb1\xd1\x8f\xd1\x85 \xd0\xb2 \xd1\x87\xd1\x83\xd0\xb6\xd0\xb4 \xd0\xbf\xd0\xbb\xd1\x8e\xd1\x88\xd0\xb5\xd0\xbd \xd1\x81\xd0\xba\xd1\x8a\xd1\x80\xd1\x86\xd0\xb0\xd1\x89 \xd1\x84\xd0\xbe\xd1\x82\xd1\x8c\xd0\xbe\xd0\xb9\xd0\xbb. </p> - -<h4>Catalan</h4> -<p>Jove xef, porti whisky amb quinze gla\xc3\xa7ons d'hidrogen, coi! </p> - -<p>Aqueix betzol, Jan, comprava whisky de figa </p> - -<h4>Czech</h4> -<p>P\xc5\x99\xc3\xadli\xc5\xa1 \xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd k\xc5\xaf\xc5\x88 \xc3\xbap\xc4\x9bl \xc4\x8f\xc3\xa1belsk\xc3\xa9 \xc3\xb3dy </p> - -<h4>Danish</h4> -<p>H\xc3\xb8j bly gom vandt fr\xc3\xa6k sexquiz p\xc3\xa5 wc </p> - -<h4>Dutch</h4> -<p>Doch Bep, flink sexy qua vorm, zwijgt </p> - -<p>Pa's wijze lynx bezag vroom het fikse aquaduct </p> - -<h4>Finnish</h4> -<p>T\xc3\xb6rkylempij\xc3\xa4 vongahdus </p> - -<h4>French</h4> -<p>Portez ce vieux whisky au juge blond qui fume </p> - -<p>B\xc3\xa2chez la queue du wagon-taxi avec les pyjamas du fakir </p> - -<p>Voyez le brick g\xc3\xa9ant que j'examine pr\xc3\xa8s du wharf </p> - -<h4>German</h4> -<p>Victor jagt zw\xc3\xb6lf Boxk\xc3\xa4mpfer quer \xc3\xbcber den gro\xc3\x9fen Sylter Deich </p> - -<p>\"Fix, Schwyz!\" qu\xc3\xa4kt J\xc3\xbcrgen bl\xc3\xb6d vom Pa\xc3\x9f </p> - -<p>\"Falsches \xc3\x9cben von Xylophonmusik qu\xc3\xa4lt jeden gr\xc3\xb6\xc3\x9feren Zwerg\"</p> - -<h4>Hungarian</h4> -<p>Egy h\xc5\xb1tlen vej\xc3\xa9t f\xc3\xbcl\xc3\xb6ncs\xc3\xadp\xc5\x91, d\xc3\xbch\xc3\xb6s mexik\xc3\xb3i \xc3\xbar Wessel\xc3\xa9nyin\xc3\xa9l m\xc3\xa1zol Quit\xc3\xb3ban. </p> - -<h4>Icelandic</h4> -<p>K\xc3\xa6mi n\xc3\xbd \xc3\xb6xi h\xc3\xa9r ykist \xc3\xbej\xc3\xb3fum n\xc3\xba b\xc3\xa6\xc3\xb0i v\xc3\xadl og \xc3\xa1drepa </p> - -<h4>Irish</h4> -<p>D'fhuascail \xc3\x8dosa \xc3\x9armhac na h\xc3\x93ighe Beannaithe p\xc3\xb3r \xc3\x89ava agus \xc3\x81dhaimh </p> - -<p>D'\xe1\xb8\x9fuascail \xc3\x8dosa \xc3\x9ar\xe1\xb9\x81ac na h\xc3\x93i\xc4\xa1e Beannai\xe1\xb9\xabe p\xc3\xb3r \xc3\x89a\xe1\xb8\x83a agus \xc3\x81\xe1\xb8\x8bai\xe1\xb9\x81 </p> - -<h4>Italian</h4> -<p>\"Quel fez sghembo copre davanti\" </p> - -<p>\"Ma la volpe col suo balzo ha raggiunto il quieto Fido\" </p> - -<p>\"Quel vituperabile xenofobo zelante assaggia il whisky ed esclama: alleluja!\" </p> - -<h4>Lithuanian</h4> -<p>\xc4\xaelinkdama fechtuotojo \xc5\xa1paga sublyk\xc4\x8diojusi pragr\xc4\x99\xc5\xbe\xc4\x97 apval\xc5\xb3 arb\xc5\xabz\xc4\x85 </p> - -<h4>Norwegian</h4> -<p>V\xc3\xa5r s\xc3\xa6re Zulu fra bade\xc3\xb8ya spilte jo whist og quickstep i min taxi. </p> - -<p>H\xc3\xb8vdingens kj\xc3\xa6re squaw f\xc3\xa5r litt pizza i Mexico by </p> - -<h4>Polish</h4> -<p>P\xc3\xb3jd\xc5\xba\xc5\xbce, ki\xc5\x84 t\xc4\x99 chmurno\xc5\x9b\xc4\x87 w g\xc5\x82\xc4\x85b flaszy! </p> - -<p>Pchn\xc4\x85\xc4\x87 w t\xc4\x99 \xc5\x82\xc3\xb3d\xc5\xba je\xc5\xbca lub o\xc5\x9bm skrzy\xc5\x84 fig. </p> - -<p>M\xc4\x99\xc5\xbcny b\xc4\x85d\xc5\xba, chro\xc5\x84 pu\xc5\x82k tw\xc3\xb3j i sze\xc5\x9b\xc4\x87 flag. </p> - -<h4>Portuguese</h4> -<p>Blitz prende ex-vesgo com cheque fajuto. </p> - -<p>Gazeta publica hoje no jornal uma breve nota de faxina na quermesse. </p> - -<p>\xc3\x80 noite, vov\xc3\xb4 Kowalsky v\xc3\xaa o \xc3\xadm\xc3\xa3 cair no p\xc3\xa9 do ping\xc3\xbcim queixoso e vov\xc3\xb3 p\xc3\xb5e a\xc3\xa7\xc3\xbacar no ch\xc3\xa1 de t\xc3\xa2maras do jabuti feliz. </p> - -<p>Lu\xc3\xads arg\xc3\xbcia \xc3\xa0 J\xc3\xbalia que \xc2\xabbra\xc3\xa7\xc3\xb5es, f\xc3\xa9, ch\xc3\xa1, \xc3\xb3xido, p\xc3\xb4r, z\xc3\xa2ng\xc3\xa3o\xc2\xbb eram palavras do portugu\xc3\xaas. </p> - -<h4>Romanian</h4> -<p>Gheorghe, obezul, a reu\xc5\x9fit s\xc4\x83 ob\xc5\xa3in\xc4\x83 juc\xc3\xa2ndu-se un flux \xc3\xaen Quebec de o mie kilowa\xc5\xa3ior\xc4\x83. </p> - -<h4>Russian</h4> -<p>\xd0\x92 \xd1\x87\xd0\xb0\xd1\x89\xd0\xb0\xd1\x85 \xd1\x8e\xd0\xb3\xd0\xb0 \xd0\xb6\xd0\xb8\xd0\xbb \xd0\xb1\xd1\x8b \xd1\x86\xd0\xb8\xd1\x82\xd1\x80\xd1\x83\xd1\x81? \xd0\x94\xd0\xb0, \xd0\xbd\xd0\xbe \xd1\x84\xd0\xb0\xd0\xbb\xd1\x8c\xd1\x88\xd0\xb8\xd0\xb2\xd1\x8b\xd0\xb9 \xd1\x8d\xd0\xba\xd0\xb7\xd0\xb5\xd0\xbc\xd0\xbf\xd0\xbb\xd1\x8f\xd1\x80! </p> - -<p>(Using quasiobsolete spelling for last word to include \xd1\x8a) \xd0\x92 \xd1\x87\xd0\xb0\xd1\x89\xd0\xb0\xd1\x85 \xd1\x8e\xd0\xb3\xd0\xb0 \xd0\xb6\xd0\xb8\xd0\xbb \xd0\xb1\xd1\x8b \xd1\x86\xd0\xb8\xd1\x82\xd1\x80\xd1\x83\xd1\x81? \xd0\x94\xd0\xb0, \xd0\xbd\xd0\xbe \xd1\x84\xd0\xb0\xd0\xbb\xd1\x8c\xd1\x88\xd0\xb8\xd0\xb2\xd1\x8b\xd0\xb9 \xd1\x8d\xd0\xba\xd0\xb7\xd0\xb5\xd0\xbc\xd0\xbf\xd0\xbb\xd1\x8f\xd1\x80\xd1\x8a! </p> - -<p>\xd0\xad\xd1\x85, \xd1\x87\xd1\x83\xd0\xb6\xd0\xb0\xd0\xba! \xd0\x9e\xd0\xb1\xd1\x89\xd0\xb8\xd0\xb9 \xd1\x81\xd1\x8a\xd1\x91\xd0\xbc \xd1\x86\xd0\xb5\xd0\xbd \xd1\x88\xd0\xbb\xd1\x8f\xd0\xbf (\xd1\x8e\xd1\x84\xd1\x82\xd1\x8c) \xe2\x80\x94 \xd0\xb2\xd0\xb4\xd1\x80\xd1\x8b\xd0\xb7\xd0\xb3! </p> - -<p>\xd0\xad\xd0\xba\xd1\x81-\xd0\xb3\xd1\x80\xd0\xb0\xd1\x84? \xd0\x9f\xd0\xbb\xd1\x8e\xd1\x88 \xd0\xb8\xd0\xb7\xd1\x8a\xd1\x8f\xd1\x82. \xd0\x91\xd1\x8c\xd1\x91\xd0\xbc \xd1\x87\xd1\x83\xd0\xb6\xd0\xb4\xd1\x8b\xd0\xb9 \xd1\x86\xd0\xb5\xd0\xbd \xd1\x85\xd0\xb2\xd0\xbe\xd1\x89! </p> - -<p>\xd0\xa1\xd1\x8a\xd0\xb5\xd1\x88\xd1\x8c \xd0\xb5\xd1\x89\xd1\x91 \xd1\x8d\xd1\x82\xd0\xb8\xd1\x85 \xd0\xbc\xd1\x8f\xd0\xb3\xd0\xba\xd0\xb8\xd1\x85 \xd1\x84\xd1\x80\xd0\xb0\xd0\xbd\xd1\x86\xd1\x83\xd0\xb7\xd1\x81\xd0\xba\xd0\xb8\xd1\x85 \xd0\xb1\xd1\x83\xd0\xbb\xd0\xbe\xd0\xba, \xd0\xb4\xd0\xb0 \xd0\xb2\xd1\x8b\xd0\xbf\xd0\xb5\xd0\xb9 \xd0\xb6\xd0\xb5 \xd1\x87\xd0\xb0\xd1\x8e. </p> - -<p>\xd0\xa8\xd0\xb8\xd1\x80\xd0\xbe\xd0\xba\xd0\xb0\xd1\x8f \xd1\x8d\xd0\xbb\xd0\xb5\xd0\xba\xd1\x82\xd1\x80\xd0\xb8\xd1\x84\xd0\xb8\xd0\xba\xd0\xb0\xd1\x86\xd0\xb8\xd1\x8f \xd1\x8e\xd0\xb6\xd0\xbd\xd1\x8b\xd1\x85 \xd0\xb3\xd1\x83\xd0\xb1\xd0\xb5\xd1\x80\xd0\xbd\xd0\xb8\xd0\xb9 \xd0\xb4\xd0\xb0\xd1\x81\xd1\x82 \xd0\xbc\xd0\xbe\xd1\x89\xd0\xbd\xd1\x8b\xd0\xb9 \xd1\x82\xd0\xbe\xd0\xbb\xd1\x87\xd0\xbe\xd0\xba \xd0\xbf\xd0\xbe\xd0\xb4\xd1\x8a\xd1\x91\xd0\xbc\xd1\x83 \xd1\x81\xd0\xb5\xd0\xbb\xd1\x8c\xd1\x81\xd0\xba\xd0\xbe\xd0\xb3\xd0\xbe \xd1\x85\xd0\xbe\xd0\xb7\xd1\x8f\xd0\xb9\xd1\x81\xd1\x82\xd0\xb2\xd0\xb0. </p> - -<h4>Serbian</h4> -<p>\xd0\x89\xd1\x83\xd0\xb1\xd0\xb0\xd0\xb7\xd0\xbd\xd0\xb8 \xd1\x84\xd0\xb5\xd1\x9a\xd0\xb5\xd1\x80\xd1\x9f\xd0\xb8\xd1\x98\xd0\xb0 \xd1\x87\xd0\xb0\xd1\x92\xd0\xb0\xd0\xb2\xd0\xbe\xd0\xb3 \xd0\xbb\xd0\xb8\xd1\x86\xd0\xb0 \xd1\x85\xd0\xbe\xd1\x9b\xd0\xb5 \xd0\xb4\xd0\xb0 \xd0\xbc\xd0\xb8 \xd0\xbf\xd0\xbe\xd0\xba\xd0\xb0\xd0\xb6\xd0\xb5 \xd1\x88\xd1\x82\xd0\xbe\xd1\x81. </p> - -<p>Ljubazni fenjerd\xc5\xbeija \xc4\x8da\xc4\x91avog lica ho\xc4\x87e da mi poka\xc5\xbee \xc5\xa1tos. </p> - -<h4>Slovene</h4> -<p>\xc5\xa0erif bo za vajo spet kuhal doma\xc4\x8de \xc5\xbegance </p> - -<p>Pi\xc5\xa1kur mol\xc4\x8de grabi fi\xc5\xbeol z dna cezijeve hoste </p> - -<h4>Spanish</h4> -<p>El veloz murci\xc3\xa9lago hind\xc3\xba com\xc3\xada feliz cardillo y kiwi. La cig\xc3\xbce\xc3\xb1a tocaba el saxof\xc3\xb3n detr\xc3\xa1s del palenque de paja. </p> - -<p>El ping\xc3\xbcino Wenceslao hizo kil\xc3\xb3metros bajo exhaustiva lluvia y fr\xc3\xado, a\xc3\xb1oraba a su querido cachorro. </p> - -<p>Jovencillo emponzo\xc3\xb1ado de whisky: \xc2\xa1qu\xc3\xa9 figurota exhibe! </p> - -<p>Ese libro explica en su ep\xc3\xadgrafe las haza\xc3\xb1as y aventuras de Don Quijote de la Mancha en Kuwait. </p> - -<p>Queda gazpacho, fibra, l\xc3\xa1tex, jam\xc3\xb3n, kiwi y vi\xc3\xb1as. </p> - -<p>Whisky bueno: \xc2\xa1excitad mi fr\xc3\xa1gil peque\xc3\xb1a vejez! </p> - -<h4>Swedish</h4> -<p>Flygande b\xc3\xa4ckasiner s\xc3\xb6ka hwila p\xc3\xa5 mjuka tuvor. </p> - -<p>Yxskaftbud, ge v\xc3\xa5r wczonm\xc3\xb6 iqhj\xc3\xa4lp. </p> - -<h4>Ukrainian</h4> -<p>\xd0\xa7\xd1\x83\xd1\x94\xd1\x88 \xd1\x97\xd1\x85, \xd0\xb4\xd0\xbe\xd1\x86\xd1\x8e, \xd0\xb3\xd0\xb0? \xd0\x9a\xd1\x83\xd0\xbc\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xb0 \xd0\xb6 \xd1\x82\xd0\xb8, \xd0\xbf\xd1\x80\xd0\xbe\xd1\x89\xd0\xb0\xd0\xb9\xd1\x81\xd1\x8f \xd0\xb1\xd0\xb5\xd0\xb7 \xd2\x91\xd0\xbe\xd0\xbb\xd1\x8c\xd1\x84\xd1\x96\xd0\xb2! </p> - -<p>\xd0\x96\xd0\xb5\xd0\xb1\xd1\x80\xd0\xb0\xd0\xba\xd1\x83\xd1\x8e\xd1\x82\xd1\x8c \xd1\x84\xd1\x96\xd0\xbb\xd0\xbe\xd1\x81\xd0\xbe\xd1\x84\xd0\xb8 \xd0\xbf\xd1\x80\xd0\xb8 \xd2\x91\xd0\xb0\xd0\xbd\xd0\xba\xd1\x83 \xd1\x86\xd0\xb5\xd1\x80\xd0\xba\xd0\xb2\xd0\xb8 \xd0\xb2 \xd0\x93\xd0\xb0\xd0\xb4\xd1\x8f\xd1\x87\xd1\x96, \xd1\x89\xd0\xb5 \xd0\xb9 \xd1\x88\xd0\xb0\xd1\x82\xd1\x80\xd0\xbe \xd1\x97\xd1\x85\xd0\xbd\xd1\x94 \xd0\xbf'\xd1\x8f\xd0\xbd\xd0\xb5 \xd0\xb7\xd0\xbd\xd0\xb0\xd1\x94\xd0\xbc\xd0\xbe. </p> - -<h4>Turkish (pangram)</h4> -<p>Pijamal\xc4\xb1 hasta ya\xc4\x9f\xc4\xb1z \xc5\x9fof\xc3\xb6re \xc3\xa7abucak g\xc3\xbcvendi. </p> - -<h4>Greek</h4> -<h5>Monotonic</h5> -<p>\xce\xa0\xce\xac\xcf\x84\xce\xb5\xcf\x81 \xce\xb7\xce\xbc\xcf\x8e\xce\xbd \xce\xbf \xce\xb5\xce\xbd \xcf\x84\xce\xbf\xce\xb9\xcf\x82 \xce\xbf\xcf\x85\xcf\x81\xce\xb1\xce\xbd\xce\xbf\xce\xaf\xcf\x82 \xce\xb1\xce\xb3\xce\xb9\xce\xb1\xcf\x83\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xce\xbf \xcf\x8c\xce\xbd\xce\xbf\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xce\xb5\xce\xbb\xce\xb8\xce\xad\xcf\x84\xcf\x89 \xce\xb7 \xce\xb2\xce\xb1\xcf\x83\xce\xb9\xce\xbb\xce\xb5\xce\xaf\xce\xb1 \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xce\xb3\xce\xb5\xce\xbd\xce\xb7\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xce\xbf \xce\xb8\xce\xad\xce\xbb\xce\xb7\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85, \xcf\x89\xcf\x82 \xce\xb5\xce\xbd \xce\xbf\xcf\x85\xcf\x81\xce\xb1\xce\xbd\xcf\x8e \xce\xba\xce\xb1\xce\xb9 \xce\xb5\xcf\x80\xce\xaf \xcf\x84\xce\xb7\xcf\x82 \xce\xb3\xce\xb7\xcf\x82\xc2\xb7 \xcf\x84\xce\xbf\xce\xbd \xce\xac\xcf\x81\xcf\x84\xce\xbf\xce\xbd \xce\xb7\xce\xbc\xcf\x8e\xce\xbd \xcf\x84\xce\xbf\xce\xbd \xce\xb5\xcf\x80\xce\xb9\xce\xbf\xcf\x8d\xcf\x83\xce\xb9\xce\xbf\xce\xbd \xce\xb4\xce\xbf\xcf\x82 \xce\xb7\xce\xbc\xce\xaf\xce\xbd \xcf\x83\xce\xae\xce\xbc\xce\xb5\xcf\x81\xce\xbf\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xce\xb9 \xce\xac\xcf\x86\xce\xb5\xcf\x82 \xce\xb7\xce\xbc\xce\xaf\xce\xbd \xcf\x84\xce\xb1 \xce\xbf\xcf\x86\xce\xb5\xce\xbb\xce\xae\xce\xbc\xce\xb1\xcf\x84\xce\xb1 \xce\xb7\xce\xbc\xcf\x8e\xce\xbd, \xcf\x89\xcf\x82 \xce\xba\xce\xb1\xce\xb9 \xce\xb7\xce\xbc\xce\xb5\xce\xaf\xcf\x82 \xce\xb1\xcf\x86\xce\xaf\xce\xb5\xce\xbc\xce\xb5\xce\xbd \xcf\x84\xce\xbf\xce\xb9\xcf\x82 \xce\xbf\xcf\x86\xce\xb5\xce\xb9\xce\xbb\xce\xad\xcf\x84\xce\xb1\xce\xb9\xcf\x82 \xce\xb7\xce\xbc\xcf\x8e\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xce\xb9 \xce\xbc\xce\xb7 \xce\xb5\xce\xb9\xcf\x83\xce\xb5\xce\xbd\xce\xad\xce\xb3\xce\xba\xce\xb7\xcf\x82 \xce\xb7\xce\xbc\xce\xac\xcf\x82 \xce\xb5\xce\xb9\xcf\x82 \xcf\x80\xce\xb5\xce\xb9\xcf\x81\xce\xb1\xcf\x83\xce\xbc\xcf\x8c\xce\xbd, \xce\xb1\xce\xbb\xce\xbb\xce\xac \xcf\x81\xcf\x8d\xcf\x83\xce\xb1\xce\xb9 \xce\xb7\xce\xbc\xce\xac\xcf\x82 \xce\xb1\xcf\x80\xcf\x8c \xcf\x84\xce\xbf\xcf\x85 \xcf\x80\xce\xbf\xce\xbd\xce\xb7\xcf\x81\xce\xbf\xcf\x8d. \xce\xb1\xce\xbc\xce\xae\xce\xbd. </p> - -<h5>Polytonic</h5> -<p>\xce\xa0\xce\xac\xcf\x84\xce\xb5\xcf\x81 \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd \xe1\xbd\x81 \xe1\xbc\x90\xce\xbd \xcf\x84\xce\xbf\xe1\xbf\x96\xcf\x82 \xce\xbf\xe1\xbd\x90\xcf\x81\xce\xb1\xce\xbd\xce\xbf\xe1\xbf\x96\xcf\x82 \xe1\xbc\x81\xce\xb3\xce\xb9\xce\xb1\xcf\x83\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xe1\xbd\xb8 \xe1\xbd\x84\xce\xbd\xce\xbf\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xe1\xbc\x90\xce\xbb\xce\xb8\xce\xad\xcf\x84\xcf\x89 \xe1\xbc\xa1 \xce\xb2\xce\xb1\xcf\x83\xce\xb9\xce\xbb\xce\xb5\xce\xaf\xce\xb1 \xcf\x83\xce\xbf\xcf\x85\xc2\xb7 \xce\xb3\xce\xb5\xce\xbd\xce\xb7\xce\xb8\xce\xae\xcf\x84\xcf\x89 \xcf\x84\xe1\xbd\xb8 \xce\xb8\xce\xad\xce\xbb\xce\xb7\xce\xbc\xce\xac \xcf\x83\xce\xbf\xcf\x85, \xe1\xbd\xa1\xcf\x82 \xe1\xbc\x90\xce\xbd \xce\xbf\xe1\xbd\x90\xcf\x81\xce\xb1\xce\xbd\xe1\xbf\xb7 \xce\xba\xce\xb1\xe1\xbd\xb6 \xe1\xbc\x90\xcf\x80\xe1\xbd\xb6 \xcf\x84\xe1\xbf\x86\xcf\x82 \xce\xb3\xe1\xbf\x86\xcf\x82\xc2\xb7 \xcf\x84\xe1\xbd\xb8\xce\xbd \xe1\xbc\x84\xcf\x81\xcf\x84\xce\xbf\xce\xbd \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd \xcf\x84\xe1\xbd\xb8\xce\xbd \xe1\xbc\x90\xcf\x80\xce\xb9\xce\xbf\xcf\x8d\xcf\x83\xce\xb9\xce\xbf\xce\xbd \xce\xb4\xe1\xbd\xb8\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbf\x96\xce\xbd \xcf\x83\xce\xae\xce\xbc\xce\xb5\xcf\x81\xce\xbf\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xe1\xbd\xb6 \xe1\xbc\x84\xcf\x86\xce\xb5\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbf\x96\xce\xbd \xcf\x84\xe1\xbd\xb0 \xe1\xbd\x80\xcf\x86\xce\xb5\xce\xbb\xce\xae\xce\xbc\xce\xb1\xcf\x84\xce\xb1 \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd, \xe1\xbd\xa1\xcf\x82 \xce\xba\xce\xb1\xe1\xbd\xb6 \xe1\xbc\xa1\xce\xbc\xce\xb5\xe1\xbf\x96\xcf\x82 \xe1\xbc\x80\xcf\x86\xce\xaf\xce\xb5\xce\xbc\xce\xb5\xce\xbd \xcf\x84\xce\xbf\xe1\xbf\x96\xcf\x82 \xe1\xbd\x80\xcf\x86\xce\xb5\xce\xb9\xce\xbb\xce\xad\xcf\x84\xce\xb1\xce\xb9\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbf\xb6\xce\xbd\xc2\xb7 \xce\xba\xce\xb1\xe1\xbd\xb6 \xce\xbc\xe1\xbd\xb4 \xce\xb5\xe1\xbc\xb0\xcf\x83\xce\xb5\xce\xbd\xce\xad\xce\xb3\xce\xba\xe1\xbf\x83\xcf\x82 \xe1\xbc\xa1\xce\xbc\xe1\xbe\xb6\xcf\x82 \xce\xb5\xe1\xbc\xb0\xcf\x82 \xcf\x80\xce\xb5\xce\xb9\xcf\x81\xce\xb1\xcf\x83\xce\xbc\xcf\x8c\xce\xbd, \xe1\xbc\x80\xce\xbb\xce\xbb\xe1\xbd\xb0 \xcf\x81\xe1\xbf\xa6\xcf\x83\xce\xb1\xce\xb9 \xe1\xbc\xa1\xce\xbc\xe1\xbe\xb6\xcf\x82 \xe1\xbc\x80\xcf\x80\xe1\xbd\xb8 \xcf\x84\xce\xbf\xe1\xbf\xa6 \xcf\x80\xce\xbf\xce\xbd\xce\xb7\xcf\x81\xce\xbf\xe1\xbf\xa6. \xe1\xbc\x80\xce\xbc\xce\xae\xce\xbd. </p> - - -<h3>Languages</h3> -<p>(The following are used for demonstration purposes only. Some of the following excerpts are taken from web pages from the BBC Foreign News just to show the script - I have no idea what they actually say!!)</p> - -<h4>Latvian</h4> -<p>Latvijas instit\xc5\xabts veic konsultat\xc4\xabvi koordin\xc4\x93jo\xc5\xa1as funkcijas Latvijas starptautisk\xc4\x81s atpaz\xc4\xabstam\xc4\xabbas jom\xc4\x81; -gatavo un izplata pla\xc5\xa1ai sabiedr\xc4\xabbai pieejamu, svar\xc4\xabgu pamatinform\xc4\x81ciju saturo\xc5\xa1u, viegli izprotamu un iegaum\xc4\x93jamu, k\xc4\x81 ar\xc4\xab pozit\xc4\xabvu iespaidu izraiso\xc5\xa1u visp\xc4\x81r\xc4\x93ju pamatinform\xc4\x81ciju par Latviju, Latvijas dabu, sabiedr\xc4\xabbu, kult\xc5\xabru un v\xc4\x93sturi;</p> - -<h4>Azeri (az)</h4> -<p>Qaz k\xc9\x99m\xc9\x99rinin a\xc3\xa7\xc4\xb1l\xc4\xb1\xc5\x9f\xc4\xb1nda \xc4\xb0ran v\xc9\x99 Erm\xc9\x99nistan\xc4\xb1n prezidentl\xc9\x99ri i\xc5\x9ftirak edibl\xc9\x99r.</p> - -<p>\xc4\xb0ran qaz\xc4\xb1n\xc4\xb1 Erm\xc9\x99nistana n\xc9\x99ql ed\xc9\x99c\xc9\x99k bu k\xc9\x99m\xc9\x99r Yerevan \xc3\xbc\xc3\xa7\xc3\xbcn x\xc3\xbcsusi \xc3\xb6n\xc9\x99m da\xc5\x9f\xc4\xb1y\xc4\xb1r, bel\xc9\x99 ki, b\xc3\xb6y\xc3\xbck etnik az\xc9\x99rbaycanl\xc4\xb1 toplumuna malik \xc4\xb0ran t\xc9\x99lat\xc3\xbcml\xc3\xbc regionda \xc3\xb6z maraqlar\xc4\xb1n\xc4\xb1 qorumaq \xc3\xbc\xc3\xa7\xc3\xbcn \xc3\xa7ox vaxt Erm\xc9\x99nistan\xc4\xb1n m\xc3\xbctt\xc9\x99fiqi kimi g\xc3\xb6r\xc3\xbcn\xc3\xbcb.</p> - -<h4>Bulgarian</h4> -<p>\xd0\x9f\xd0\xbe\xd1\x81\xd0\xbb\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xb8\xd1\x82\xd0\xb5 \xd0\xb4\xd0\xbe\xd0\xbd\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x80\xd0\xbd\xd0\xb8\xd1\x86\xd0\xb8 \xd0\xb2 \xd0\xb1\xd1\x8a\xd0\xbb\xd0\xb3\xd0\xb0\xd1\x80\xd1\x81\xd0\xba\xd0\xb0\xd1\x82\xd0\xb0 \xd0\xb0\xd1\x80\xd0\xbc\xd0\xb8\xd1\x8f \xd1\x89\xd0\xb5 \xd1\x81\xd0\xbb\xd1\x83\xd0\xb6\xd0\xb0\xd1\x82 9 \xd0\xbc\xd0\xb5\xd1\x81\xd0\xb5\xd1\x86\xd0\xb0, \xd0\xba\xd0\xb0\xd0\xba\xd1\x82\xd0\xbe \xd0\xbf\xd0\xbe\xd1\x81\xd1\x82\xd0\xb0\xd0\xbd\xd0\xbe\xd0\xb2\xd1\x8f\xd0\xb2\xd0\xb0 \xd0\xb7\xd0\xb0\xd0\xba\xd0\xbe\xd0\xbd\xd0\xb0 6 \xd0\xbc\xd0\xb5\xd1\x81\xd0\xb5\xd1\x86\xd0\xb0 \xd0\xb5 \xd1\x81\xd1\x8a\xd0\xba\xd1\x80\xd0\xb0\xd1\x82\xd0\xb5\xd0\xbd\xd0\xb8\xd1\x8f\xd1\x82 \xd1\x81\xd1\x80\xd0\xbe\xd0\xba \xd1\x81\xd0\xb0\xd0\xbc\xd0\xbe \xd0\xb7\xd0\xb0 \xd0\xb7\xd0\xb0\xd0\xb2\xd1\x8a\xd1\x80\xd1\x88\xd0\xb8\xd0\xbb\xd0\xb8\xd1\x82\xd0\xb5 \xd0\xb2\xd0\xb8\xd1\x81\xd1\x88\xd0\xb5 \xd0\xbe\xd0\xb1\xd1\x80\xd0\xb0\xd0\xb7\xd0\xbe\xd0\xb2\xd0\xb0\xd0\xbd\xd0\xb8\xd0\xb5 - \xd1\x82\xd0\xb0\xd0\xba\xd0\xb0 \xd0\xbc\xd0\xb8\xd0\xbd\xd0\xb8\xd1\x81\xd1\x82\xd1\x8a\xd1\x80 \xd0\x92\xd0\xb5\xd1\x81\xd0\xb5\xd0\xbb\xd0\xb8\xd0\xbd \xd0\x91\xd0\xbb\xd0\xb8\xd0\xb7\xd0\xbd\xd0\xb0\xd0\xba\xd0\xbe\xd0\xb2 \xd0\xbe\xd1\x82\xd1\x85\xd0\xb2\xd1\x8a\xd1\x80\xd0\xbb\xd0\xb8 \xd1\x80\xd0\xb0\xd0\xb7\xd0\xbb\xd0\xb8\xd1\x87\xd0\xbd\xd0\xb8\xd1\x82\xd0\xb5 \xd0\xb8\xd0\xbd\xd1\x82\xd0\xb5\xd1\x80\xd0\xbf\xd1\x80\xd0\xb5\xd1\x82\xd0\xb0\xd1\x86\xd0\xb8\xd0\xb8 \xd0\xb2 \xd0\xbf\xd1\x83\xd0\xb1\xd0\xbb\xd0\xb8\xd1\x87\xd0\xbd\xd0\xbe\xd1\x82\xd0\xbe \xd0\xbf\xd1\x80\xd0\xbe\xd1\x81\xd1\x82\xd1\x80\xd0\xb0\xd0\xbd\xd1\x81\xd1\x82\xd0\xb2\xd0\xbe \xd0\xbf\xd0\xbe \xd1\x82\xd0\xb5\xd0\xbc\xd0\xb0\xd1\x82\xd0\xb0. \xd0\x9c\xd0\xb8\xd0\xbd\xd0\xb8\xd1\x81\xd1\x82\xd1\x8a\xd1\x80\xd1\x8a\xd1\x82 \xd0\xbd\xd0\xb0 \xd0\xbe\xd1\x82\xd0\xb1\xd1\x80\xd0\xb0\xd0\xbd\xd0\xb0\xd1\x82\xd0\xb0 \xd1\x80\xd0\xb0\xd0\xb7\xd1\x84\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb8\xd1\x80\xd0\xbe\xd0\xb2\xd0\xb0 \xd0\xb2 \xd0\x9a\xd0\xb0\xd0\xb7\xd0\xb0\xd0\xbd\xd0\xbb\xd1\x8a\xd0\xba \xd0\x92\xd1\x82\xd0\xbe\xd1\x80\xd0\xb0\xd1\x82\xd0\xb0 \xd0\xbd\xd0\xb8 \xd1\x80\xd0\xbe\xd1\x82\xd0\xb0 \xd0\xbe\xd1\x82 \xd0\x90\xd1\x88\xd1\x80\xd0\xb0\xd1\x84 \xd0\xb8 \xd0\x92\xd1\x82\xd0\xbe\xd1\x80\xd0\xb8 \xd0\xbf\xd0\xb5\xd1\x85\xd0\xbe\xd1\x82\xd0\xb5\xd0\xbd \xd0\xb2\xd0\xb7\xd0\xb2\xd0\xbe\xd0\xb4, \xd0\xb7\xd0\xb0\xd0\xb2\xd1\x8a\xd1\x80\xd0\xbd\xd0\xb0\xd0\xbb \xd1\x81\xd0\xb5 \xd0\xbe\xd1\x82 \xd0\xbc\xd0\xb8\xd1\x80\xd0\xbe\xd1\x82\xd0\xb2\xd0\xbe\xd1\x80\xd1\x87\xd0\xb5\xd1\x81\xd0\xba\xd0\xb0 \xd0\xbc\xd0\xb8\xd1\x81\xd0\xb8\xd1\x8f \xd0\xbe\xd1\x82 \xd0\x91\xd0\xb0\xd0\xbd\xd1\x8f \xd0\x9b\xd1\x83\xd0\xba\xd0\xb0 \xd0\xb2 \xd0\x91\xd0\xbe\xd1\x81\xd0\xbd\xd0\xb0 \xd0\xb8 \xd0\xa5\xd0\xb5\xd1\x80\xd1\x86\xd0\xb5\xd0\xb3\xd0\xbe\xd0\xb2\xd0\xb8\xd0\xbd\xd0\xb0.</p> - -<h4>Macedonian (mk)</h4> -<p>\xd0\x91\xd1\x83\xd1\x88 \xd1\x80\xd0\xb5\xd1\x87\xd0\xb5 \xd0\xbe\xd1\x82\xd0\xb8 \xd0\xb5 \xd1\x81\xd1\x83\xd1\x88\xd1\x82\xd0\xb8\xd0\xbd\xd1\x81\xd0\xba\xd0\xb8 \xd0\xb4\xd0\xb0 \xd1\x81\xd0\xb5 \xd0\xbe\xd1\x81\xd0\xb8\xd0\xb3\xd1\x83\xd1\x80\xd0\xb8 \xd0\xb1\xd0\xb5\xd0\xb7\xd0\xb1\xd0\xb5\xd0\xb4\xd0\xbd\xd0\xbe\xd1\x81\xd1\x82\xd0\xb0 \xd0\xbd\xd0\xb0 \xd0\x91\xd0\xb0\xd0\xb3\xd0\xb4\xd0\xb0\xd0\xb4 \xd0\xb8 \xd0\xb4\xd0\xb0 \xd1\x81\xd0\xb5 \xd0\xbe\xd0\xb1\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb8 \xd0\xbd\xd0\xbe\xd1\x80\xd0\xbc\xd0\xb0\xd0\xbb\xd0\xbd\xd0\xb8\xd0\xbe\xd1\x82 \xd0\xb6\xd0\xb8\xd0\xb2\xd0\xbe\xd1\x82 \xd0\xb2\xd0\xbe \xd0\xbe\xd1\x81\xd1\x82\xd0\xb0\xd1\x82\xd0\xbe\xd0\xba\xd0\xbe\xd1\x82 \xd0\xbe\xd0\xb4 \xd0\xb7\xd0\xb5\xd0\xbc\xd1\x98\xd0\xb0\xd1\x82\xd0\xb0.</p> - -<p>\xd0\x9c\xd0\xb8\xd1\x82\xd1\x80\xd0\xb5\xd0\xb2\xd0\xb0 \xd1\x98\xd0\xb0 \xd0\xbf\xd1\x80\xd0\xbe\xd0\xb7\xd0\xb2\xd0\xb0 \xd0\xb2\xd0\xbb\xd0\xb0\xd0\xb4\xd0\xb0\xd1\x82\xd0\xb0 \xd0\xb7\xd0\xb0 \xd0\xb8\xd0\xbd\xd0\xb4\xd0\xbe\xd0\xbb\xd0\xb5\xd0\xbd\xd1\x82\xd0\xb5\xd0\xbd \xd0\xbe\xd0\xb4\xd0\xbd\xd0\xbe\xd1\x81 \xd0\xba\xd0\xbe\xd0\xbd \xd0\xbe\xd0\xb2\xd0\xb0 \xd0\xb1\xd0\xb8\xd1\x82\xd0\xba\xd0\xb0\xd1\x82\xd0\xb0 \xd0\xb7\xd0\xb0 \xd0\xb7\xd0\xb0\xd1\x87\xd1\x83\xd0\xb2\xd0\xb8\xd0\xb2\xd0\xb0\xd1\x9a\xd0\xb5 \xd0\xbd\xd0\xb0 \xd1\x83\xd1\x81\xd1\x82\xd0\xb0\xd0\xb2\xd0\xbd\xd0\xbe\xd1\x82\xd0\xbe \xd0\xb8\xd0\xbc\xd0\xb5 \xd0\xbd\xd0\xb0 \xd0\xb7\xd0\xb5\xd0\xbc\xd1\x98\xd0\xb0\xd1\x82\xd0\xb0.</p> - -<h4>Uzbek (uz)</h4> -<p>\xd0\x98\xd1\x80\xd0\xbe\xd2\x9b\xd0\xbb\xd0\xb8\xd0\xba\xd0\xbb\xd0\xb0\xd1\x80 \xd0\xbe\xd1\x80\xd0\xb0\xd1\x81\xd0\xb8\xd0\xb4\xd0\xb0 \xd1\x82\xd1\x83\xd1\x88\xd0\xba\xd1\x83\xd0\xbd\xd0\xbb\xd0\xb8\xd0\xba \xd0\xbe\xd1\x80\xd1\x82\xd0\xb8\xd0\xb1 \xd0\xb1\xd0\xbe\xd1\x80\xd0\xb0\xd1\x8f\xd0\xbf\xd1\x82\xd0\xb8</p> - -<p>\xd0\x98\xd1\x80\xd0\xbe\xd2\x9b\xd0\xb4\xd0\xb0 \xd1\x9e\xd1\x82\xd0\xba\xd0\xb0\xd0\xb7\xd0\xb8\xd0\xbb\xd0\xb3\xd0\xb0\xd0\xbd \xd1\x81\xd1\x9e\xd0\xbd\xd0\xb3\xd0\xb3\xd0\xb8 \xd0\xb6\xd0\xb0\xd0\xbc\xd0\xbe\xd0\xb0\xd1\x82\xd1\x87\xd0\xb8\xd0\xbb\xd0\xb8\xd0\xba \xd1\x84\xd0\xb8\xd0\xba\xd1\x80\xd0\xb8\xd0\xbd\xd0\xb8 \xd1\x9e\xd1\x80\xd0\xb3\xd0\xb0\xd0\xbd\xd0\xb8\xd1\x88 \xd0\xbd\xd0\xb0\xd1\x82\xd0\xb8\xd0\xb6\xd0\xb0\xd0\xbb\xd0\xb0\xd1\x80\xd0\xb8\xd0\xb3\xd0\xb0 \xd0\xba\xd1\x9e\xd1\x80\xd0\xb0, \xd0\xbc\xd0\xb0\xd0\xbc\xd0\xbb\xd0\xb0\xd0\xba\xd0\xb0\xd1\x82 \xd0\xba\xd0\xb5\xd0\xbb\xd0\xb0\xd0\xb6\xd0\xb0\xd0\xb3\xd0\xb8 \xd0\xb1\xd0\xbe\xd1\x80\xd0\xb0\xd1\x81\xd0\xb8\xd0\xb4\xd0\xb0 \xd1\x82\xd1\x83\xd1\x88\xd0\xba\xd1\x83\xd0\xbd \xd0\xba\xd0\xb0\xd0\xb9\xd1\x84\xd0\xb8\xd1\x8f\xd1\x82\xd0\xb4\xd0\xb0 \xd0\xb1\xd1\x9e\xd0\xbb\xd0\xb3\xd0\xb0\xd0\xbd \xd0\xb8\xd1\x80\xd0\xbe\xd2\x9b\xd0\xbb\xd0\xb8\xd0\xba\xd0\xbb\xd0\xb0\xd1\x80 \xd1\x81\xd0\xbe\xd0\xbd\xd0\xb8 \xd1\x82\xd0\xbe\xd0\xb1\xd0\xbe\xd1\x80\xd0\xb0 \xd0\xbe\xd1\x80\xd1\x82\xd0\xb8\xd0\xb1 \xd0\xb1\xd0\xbe\xd1\x80\xd0\xbc\xd0\xbe\xd2\x9b\xd0\xb4\xd0\xb0.</p> - -<h4>Kyrgyz (ky)</h4> -<p>\xd0\x9a\xd0\xb0\xd0\xb7\xd0\xb0\xd0\xba\xd1\x81\xd1\x82\xd0\xb0\xd0\xbd\xd0\xb4\xd0\xb0 \xd0\xb0\xd0\xb9\xd1\x8b\xd0\xbb \xd1\x82\xd1\x83\xd1\x80\xd0\xb3\xd1\x83\xd0\xbd\xd0\xb4\xd0\xb0\xd1\x80\xd1\x8b \xd1\x83\xd1\x80\xd1\x83\xd1\x88\xd0\xb0 \xd0\xba\xd0\xb5\xd1\x82\xd0\xb8\xd0\xbf 3 \xd0\xba\xd0\xb8\xd1\x88\xd0\xb8 \xd0\xba\xd0\xb0\xd0\xb7\xd0\xb0 \xd1\x82\xd0\xb0\xd0\xbf\xd1\x82\xd1\x8b -\xd0\x9a\xd0\xb0\xd0\xb7\xd0\xb0\xd0\xba\xd1\x81\xd1\x82\xd0\xb0\xd0\xbd\xd0\xb4\xd1\x8b\xd0\xbd \xd0\x90\xd0\xbb\xd0\xbc\xd0\xb0\xd1\x82\xd1\x8b \xd1\x88\xd0\xb0\xd0\xb0\xd1\x80\xd1\x8b\xd0\xbd\xd1\x8b\xd0\xbd \xd1\x82\xd1\x83\xd1\x88\xd1\x83\xd0\xbd\xd0\xb4\xd0\xb0\xd0\xb3\xd1\x8b \xd0\xb0\xd0\xb9\xd1\x8b\xd0\xbb\xd0\xb4\xd0\xb0 \xd1\x8d\xd0\xba\xd0\xb8 \xd0\xba\xd0\xb8\xd1\x88\xd0\xb8 \xd0\xbe\xd1\x80\xd1\x82\xd0\xbe\xd1\x81\xd1\x83\xd0\xbd\xd0\xb4\xd0\xb0\xd0\xb3\xd1\x8b \xd1\x87\xd0\xb0\xd1\x82\xd0\xb0\xd0\xba \xd1\x87\xd0\xbe\xd2\xa3 \xd1\x83\xd1\x80\xd1\x83\xd1\x88\xd0\xba\xd0\xb0 \xd0\xb0\xd0\xb9\xd0\xbb\xd0\xb0\xd0\xbd\xd1\x8b\xd0\xbf, \xd0\xb0\xd0\xb3\xd0\xb0 \xd1\x8d\xd0\xbb\xd2\xaf\xd2\xaf \xd1\x87\xd0\xb0\xd0\xba\xd1\x82\xd1\x8b \xd0\xba\xd0\xb8\xd1\x88\xd0\xb8 \xd0\xb0\xd1\x80\xd0\xb0\xd0\xbb\xd0\xb0\xd1\x88\xd0\xba\xd0\xb0\xd0\xbd.</p> - - - -<h4>Albanian (sq)</h4> -<p>Nj\xc3\xab anket\xc3\xab sugjeron se irakian\xc3\xabt kan\xc3\xab nj\xc3\xab pesimiz\xc3\xabm n\xc3\xab rritje p\xc3\xabr t\xc3\xab ardhmen e vendit t\xc3\xab tyre.</p> - -<p>Presidenti shqiptar Alfred Moisiu dekretoi t\xc3\xab h\xc3\xabn\xc3\xabn ndryshimet e propozuara nga kryeministri Sali Berisha n\xc3\xab kabinetin e tij, pas zgjedhjeve lokale.</p> - - -<h4>Vietnamese (vi)</h4> -<p>M\xc3\xb4\xcc\xa3t kha\xcc\x89o sa\xcc\x81t m\xc6\xa1\xcc\x81i cho bi\xc3\xaa\xcc\x81t ng\xc6\xb0\xc6\xa1\xcc\x80i d\xc3\xa2n Iraq nga\xcc\x80y ca\xcc\x80ng ca\xcc\x89m th\xc3\xa2\xcc\x81y bi quan va\xcc\x80 kh\xc3\xb4ng tin t\xc6\xb0\xc6\xa1\xcc\x89ng va\xcc\x80o chi\xcc\x81nh phu\xcc\x89 cu\xcc\x83ng nh\xc6\xb0 li\xc3\xaan qu\xc3\xa2n</p> - -<p>Nga \xc4\x91ang th\xc6\xb0\xcc\xa3c hi\xc3\xaa\xcc\xa3n chi\xc3\xaa\xcc\x81n di\xcc\xa3ch c\xc6\xb0\xcc\x81u h\xc3\xb4\xcc\xa3 sau khi co\xcc\x81 vu\xcc\xa3 n\xc3\xb4\xcc\x89 khi\xcc\x81 methane ta\xcc\xa3i m\xc3\xb4\xcc\xa3t mo\xcc\x89 than \xc6\xa1\xcc\x89 Siberia la\xcc\x80m i\xcc\x81t nh\xc3\xa2\xcc\x81t 61 ng\xc6\xb0\xc6\xa1\xcc\x80i thi\xc3\xaa\xcc\xa3t ma\xcc\xa3ng</p> - -<h4>Thai (pangram)</h4> -<p>\xe0\xb9\x80\xe0\xb8\x9b\xe0\xb9\x87\xe0\xb8\x99\xe0\xb8\xa1\xe0\xb8\x99\xe0\xb8\xb8\xe0\xb8\xa9\xe0\xb8\xa2\xe0\xb9\x8c\xe0\xb8\xaa\xe0\xb8\xb8\xe0\xb8\x94\xe0\xb8\x9b\xe0\xb8\xa3\xe0\xb8\xb0\xe0\xb9\x80\xe0\xb8\xaa\xe0\xb8\xa3\xe0\xb8\xb4\xe0\xb8\x90\xe0\xb9\x80\xe0\xb8\xa5\xe0\xb8\xb4\xe0\xb8\xa8\xe0\xb8\x84\xe0\xb8\xb8\xe0\xb8\x93\xe0\xb8\x84\xe0\xb9\x88\xe0\xb8\xb2 \xe0\xb8\x81\xe0\xb8\xa7\xe0\xb9\x88\xe0\xb8\xb2\xe0\xb8\x9a\xe0\xb8\xa3\xe0\xb8\xa3\xe0\xb8\x94\xe0\xb8\xb2\xe0\xb8\x9d\xe0\xb8\xb9\xe0\xb8\x87\xe0\xb8\xaa\xe0\xb8\xb1\xe0\xb8\x95\xe0\xb8\xa7\xe0\xb9\x8c\xe0\xb9\x80\xe0\xb8\x94\xe0\xb8\xa3\xe0\xb8\xb1\xe0\xb8\x88\xe0\xb8\x89\xe0\xb8\xb2\xe0\xb8\x99 \xe0\xb8\x88\xe0\xb8\x87\xe0\xb8\x9d\xe0\xb9\x88\xe0\xb8\xb2\xe0\xb8\x9f\xe0\xb8\xb1\xe0\xb8\x99\xe0\xb8\x9e\xe0\xb8\xb1\xe0\xb8\x92\xe0\xb8\x99\xe0\xb8\xb2\xe0\xb8\xa7\xe0\xb8\xb4\xe0\xb8\x8a\xe0\xb8\xb2\xe0\xb8\x81\xe0\xb8\xb2\xe0\xb8\xa3 \xe0\xb8\xad\xe0\xb8\xa2\xe0\xb9\x88\xe0\xb8\xb2\xe0\xb8\xa5\xe0\xb9\x89\xe0\xb8\xb2\xe0\xb8\x87\xe0\xb8\x9c\xe0\xb8\xa5\xe0\xb8\xb2\xe0\xb8\x8d\xe0\xb8\xa4\xe0\xb9\x85\xe0\xb9\x80\xe0\xb8\x82\xe0\xb9\x88\xe0\xb8\x99\xe0\xb8\x86\xe0\xb9\x88\xe0\xb8\xb2\xe0\xb8\x9a\xe0\xb8\xb5\xe0\xb8\x91\xe0\xb8\xb2\xe0\xb9\x83\xe0\xb8\x84\xe0\xb8\xa3 \xe0\xb9\x84\xe0\xb8\xa1\xe0\xb9\x88\xe0\xb8\x96\xe0\xb8\xb7\xe0\xb8\xad\xe0\xb9\x82\xe0\xb8\x97\xe0\xb8\xa9\xe0\xb9\x82\xe0\xb8\x81\xe0\xb8\xa3\xe0\xb8\x98\xe0\xb9\x81\xe0\xb8\x8a\xe0\xb9\x88\xe0\xb8\x87\xe0\xb8\x8b\xe0\xb8\xb1\xe0\xb8\x94\xe0\xb8\xae\xe0\xb8\xb6\xe0\xb8\x94\xe0\xb8\xae\xe0\xb8\xb1\xe0\xb8\x94\xe0\xb8\x94\xe0\xb9\x88\xe0\xb8\xb2 \xe0\xb8\xab\xe0\xb8\xb1\xe0\xb8\x94\xe0\xb8\xad\xe0\xb8\xa0\xe0\xb8\xb1\xe0\xb8\xa2\xe0\xb9\x80\xe0\xb8\xab\xe0\xb8\xa1\xe0\xb8\xb7\xe0\xb8\xad\xe0\xb8\x99\xe0\xb8\x81\xe0\xb8\xb5\xe0\xb8\xac\xe0\xb8\xb2\xe0\xb8\xad\xe0\xb8\xb1\xe0\xb8\x8a\xe0\xb8\x8c\xe0\xb8\xb2\xe0\xb8\xaa\xe0\xb8\xb1\xe0\xb8\xa2 \xe0\xb8\x9b\xe0\xb8\x8f\xe0\xb8\xb4\xe0\xb8\x9a\xe0\xb8\xb1\xe0\xb8\x95\xe0\xb8\xb4\xe0\xb8\x9b\xe0\xb8\xa3\xe0\xb8\xb0\xe0\xb8\x9e\xe0\xb8\xa4\xe0\xb8\x95\xe0\xb8\xb4\xe0\xb8\x81\xe0\xb8\x8e\xe0\xb8\x81\xe0\xb8\xb3\xe0\xb8\xab\xe0\xb8\x99\xe0\xb8\x94\xe0\xb9\x83\xe0\xb8\x88 \xe0\xb8\x9e\xe0\xb8\xb9\xe0\xb8\x94\xe0\xb8\x88\xe0\xb8\xb2\xe0\xb9\x83\xe0\xb8\xab\xe0\xb9\x89\xe0\xb8\x88\xe0\xb9\x8a\xe0\xb8\xb0\xe0\xb9\x86 \xe0\xb8\x88\xe0\xb9\x8b\xe0\xb8\xb2 \xe0\xb8\x99\xe0\xb9\x88\xe0\xb8\xb2\xe0\xb8\x9f\xe0\xb8\xb1\xe0\xb8\x87\xe0\xb9\x80\xe0\xb8\xad\xe0\xb8\xa2\xe0\xb8\xaf </p> - - -<!-- RTL LANGUAGES --> -<div style=\"text-align: right;\"> - -<h4>Hebrew (pangram)</h4> -<p>\xd7\x93\xd7\x92 \xd7\xa1\xd7\xa7\xd7\xa8\xd7\x9f \xd7\xa9\xd7\x98 \xd7\x91\xd7\x99\xd7\x9d \xd7\x9e\xd7\x90\xd7\x95\xd7\x9b\xd7\x96\xd7\x91 \xd7\x95\xd7\x9c\xd7\xa4\xd7\xaa\xd7\xa2 \xd7\x9e\xd7\xa6\xd7\x90 \xd7\x97\xd7\x91\xd7\xa8\xd7\x94 </p> - -<p>\xd7\x90\xd7\x95 \xd7\x94\xd7\xa0\xd7\xa1\xd7\x94 \xd7\x90\xd7\x9c\xd7\x94\xd7\x99\xd7\x9d, \xd7\x9c\xd7\x91\xd7\x95\xd7\x90 \xd7\x9c\xd7\xa7\xd7\x97\xd7\xaa \xd7\x9c\xd7\x95 \xd7\x92\xd7\x95\xd7\x99 \xd7\x9e\xd7\xa7\xd7\xa8\xd7\x91 \xd7\x92\xd7\x95\xd7\x99, \xd7\x91\xd7\x9e\xd7\xa1\xd7\xaa \xd7\x91\xd7\x90\xd7\xaa\xd7\xaa \xd7\x95\xd7\x91\xd7\x9e\xd7\x95\xd7\xa4\xd7\xaa\xd7\x99\xd7\x9d \xd7\x95\xd7\x91\xd7\x9e\xd7\x9c\xd7\x97\xd7\x9e\xd7\x94 \xd7\x95\xd7\x91\xd7\x99\xd7\x93 \xd7\x97\xd7\x96\xd7\xa7\xd7\x94 \xd7\x95\xd7\x91\xd7\x96\xd7\xa8\xd7\x95\xd7\xa2 \xd7\xa0\xd7\x98\xd7\x95\xd7\x99\xd7\x94, \xd7\x95\xd7\x91\xd7\x9e\xd7\x95\xd7\xa8\xd7\x90\xd7\x99\xd7\x9d \xd7\x92\xd7\x93\xd7\x9c\xd7\x99\xd7\x9d: \xd7\x9b\xd7\x9b\xd7\x9c \xd7\x90\xd7\xa9\xd7\xa8-\xd7\xa2\xd7\xa9\xd7\x94 \xd7\x9c\xd7\x9b\xd7\x9d \xd7\x99\xd7\x94\xd7\x95\xd7\x94 \xd7\x90\xd7\x9c\xd7\x94\xd7\x99\xd7\x9b\xd7\x9d, \xd7\x91\xd7\x9e\xd7\xa6\xd7\xa8\xd7\x99\xd7\x9d--\xd7\x9c\xd7\xa2\xd7\x99\xd7\xa0\xd7\x99\xd7\x9a </p> - - - - -<h4>Arabic</h4> -<p>\xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb0\xd9\x83\xd8\xb1\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa7\xd8\xa8\xd8\xb9\xd8\xa9 \xd9\x84\xd9\x84\xd8\xba\xd8\xb2\xd9\x88 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd9\x84\xd9\x88\xd9\x8a\xd8\xa9 \xd8\xad\xd8\xa7\xd9\x84\xd9\x8a\xd8\xa7 \xd9\x84\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x86 \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82.</p> - -<p>\xd9\x87\xd9\x84 \xd8\xb3\xd8\xaa\xd8\xb3\xd9\x81\xd8\xb1 \xd8\xa7\xd9\x84\xd8\xac\xd9\x87\xd9\x88\xd8\xaf \xd8\xa7\xd9\x84\xd8\xaf\xd8\xa8\xd9\x84\xd9\x88\xd9\x85\xd8\xa7\xd8\xb3\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xac\xd8\xa7\xd8\xb1\xd9\x8a\xd8\xa9 \xd8\xb9\xd9\x86 \xd8\xad\xd9\x84\xd9\x88\xd9\x84\xd8\x9f \xd9\x88\xd9\x83\xd9\x8a\xd9\x81 \xd8\xaa\xd9\x86\xd8\xb8\xd8\xb1 \xd9\x84\xd9\x84\xd8\xa7\xd8\xaa\xd9\x87\xd8\xa7\xd9\x85\xd8\xa7\xd8\xaa \xd9\x84\xd8\xa8\xd8\xb9\xd8\xb6 \xd9\x87\xd8\xb0\xd9\x87 \xd8\xa7\xd9\x84\xd8\xaf\xd9\x88\xd9\x84 \xd8\xa8\xd8\xa7\xd9\x84\xd8\xaa\xd8\xaf\xd8\xae\xd9\x84 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb4\xd8\xa3\xd9\x86 \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\x8c \xd9\x88\xd8\xa7\xd9\x84\xd8\xaa\xd9\x88\xd8\xb1\xd8\xb7 \xd9\x81\xd9\x8a \xd8\xaf\xd8\xb9\xd9\x85 \xd8\xb9\xd9\x85\xd9\x84\xd9\x8a\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xb9\xd9\x86\xd9\x81\xd8\x9f \xd9\x88\xd8\xa7\xd9\x84\xd9\x89 \xd8\xa7\xd9\x8a \xd9\x85\xd8\xaf\xd9\x89 \xd9\x8a\xd8\xa8\xd8\xaf\xd9\x88 \xd8\xa7\xd9\x84\xd9\x88\xd8\xb6\xd8\xb9 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86\xd8\xb9\xd9\x83\xd8\xa7\xd8\xb3\xd8\xa7 \xd9\x84\xd9\x84\xd8\xb5\xd8\xb1\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xa5\xd9\x82\xd9\x84\xd9\x8a\xd9\x85\xd9\x8a\xd8\xa9 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd9\x85\xd9\x86\xd8\xb7\xd9\x82\xd8\xa9\xd8\x9f</p> - - -<h4>Persian / Farsi</h4> -<p>\xd9\x85\xd8\xad\xd9\x85\xd8\xaf \xd8\xa7\xd9\x84\xd8\xa8\xd8\xb1\xd8\xa7\xd8\xaf\xd8\xb9\xdb\x8c \xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa2\xda\x98\xd8\xa7\xd9\x86\xd8\xb3 \xd8\xa8\xd9\x8a\xd9\x86 \xd8\xa7\xd9\x84\xd9\x85\xd9\x84\xd9\x84\xdb\x8c \xd8\xa7\xd9\x86\xd8\xb1\xda\x98\xdb\x8c \xd8\xa7\xd8\xaa\xd9\x85\xdb\x8c \xd9\xbe\xd9\x8a\xd8\xb4\xd9\x86\xd9\x87\xd8\xa7\xd8\xaf \xda\xa9\xd8\xb1\xd8\xaf\xd9\x87 \xd8\xa7\xd8\xb3\xd8\xaa \xd8\xaa\xd9\x87\xd8\xb1\xd8\xa7\xd9\x86 \xd8\xa8\xd8\xb1\xd9\x86\xd8\xa7\xd9\x85\xd9\x87 \xd8\xac\xd9\x86\xd8\xac\xd8\xa7\xd9\x84\xdb\x8c \xd8\xba\xd9\x86\xdb\x8c \xd8\xb3\xd8\xa7\xd8\xb2\xdb\x8c \xd8\xa7\xd9\x88\xd8\xb1\xd8\xa7\xd9\x86\xd9\x8a\xd9\x88\xd9\x85 \xd8\xb1\xd8\xa7 \xd9\x85\xd8\xaa\xd9\x88\xd9\x82\xd9\x81 \xda\xa9\xd9\x86\xd8\xaf \xd9\x88 \xd8\xba\xd8\xb1\xd8\xa8 \xd9\x86\xd9\x8a\xd8\xb2 \xd8\xa7\xd8\xac\xd8\xb1\xd8\xa7\xdb\x8c \xd8\xaa\xd8\xad\xd8\xb1\xd9\x8a\xd9\x85 \xd9\x87\xd8\xa7\xdb\x8c \xd8\xaa\xd9\x86\xd8\xa8\xd9\x8a\xd9\x87\xdb\x8c \xd9\x85\xd9\x88\xd8\xb1\xd8\xaf \xd8\xaa\xd8\xa7\xd8\xa6\xd9\x8a\xd8\xaf \xd8\xb3\xd8\xa7\xd8\xb2\xd9\x85\xd8\xa7\xd9\x86 \xd9\x85\xd9\x84\xd9\x84 \xd9\x85\xd8\xaa\xd8\xad\xd8\xaf \xd8\xb1\xd8\xa7 \xd8\xa8\xd9\x87 \xd8\xaa\xd8\xb9\xd9\x88\xd9\x8a\xd9\x82 \xd8\xa8\xd9\x8a\xd8\xa7\xd9\x86\xd8\xaf\xd8\xa7\xd8\xb2\xd8\xaf.</p> - - - -<h4>Urdu</h4> -<p>تمام انسان آزاد اور حقوق و عزت کے اعتبار سے برابر پیدا ہوۓ ہیں۔ انہیں ضمیر اور عقل ودیعت ہوئی ہی۔ اسلۓ انہیں ایک دوسرے کے ساتھ بھائی چارے کا سلوک کرنا چاہیۓ۔ -</p> - -<h4>Pashto (ps)</h4> -<p>\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a. -</p> - - -<h4>Sindhi (sd)</h4> -<p> -واشنگٽن (م ڊ) آمريڪا چيو آهي ته ڪيري لوگربل تي پاڪ فوج جي تحفظات سان پاڪستان ۾ جمهوري طور آيل زرداري جي حڪومت کي ڪوبه خطرو ناهي، ان سوال تي تي ڪيري لوگربل ۾ پاڪستان کي غير مشروط امداد ڏيڻ جي ڳالهه ڪئي وئي آهي، جڏهن ته فوجي امداد تي شرط لاڳو ڪيا -</p> - -</div> -<!-- END RTL LANGUAGES --> - -<h3>Indic Scripts</h3> - -<h4> -Malayalam -</h4> -<p>സംസ്ഥാനത്ത് രാഷ്ട്രീയ പുകമറ സൃഷ്ടിക്കാനാണ് വോട്ടര്‍പട്ടിക വിവാദത്തിലൂടെ കോണ്‍ഗ്രസ് ശ്രമിക്കുന്നതെന്ന് സിപി‌എം സംസ്ഥാന സെക്രട്ടറി പിണറായി വിജയന്‍ കുറ്റപ്പെടുത്തി. ഉദ്യോഗസ്ഥരെ ഭീഷണിപ്പെടുത്തി വരുതിയില്‍ നിര്‍ത്താനാണ് വയലാര്‍ രവി ഉള്‍പ്പെടെയുള്ളവര്‍ ശ്രമിക്കുന്നതെന്നും പിണറാ‍യി പ്രസ്താവനയില്‍ ആരോപിച്ചു. -</p> - -<h4>Kannada</h4> -<p> -ತಮ್ಮದೇ ಕುಟುಂಬದ ಯುವತಿಯೊಬ್ಬಳನ್ನು ಸತತ ಹಲವಾರು ವರ್ಷ ಭೋಗಿಸಿದ ಭಾರತೀಯ ಮೂಲದ ಮೂವರು ದುರುಳ ಸಂಬಂಧಿಕರು ಅಪರಾಧಿಗಳೆಂದು ಸಾಬೀತಾಗಿದ್ದು, ಇಂಗ್ಲೆಂಡ್ ನ್ಯಾಯಾಲಯವು ದೀರ್ಘಾವಧಿ ಕಠಿಣ ಶಿಕ್ಷೆ ವಿಧಿಸಿದೆ. -</p> - -<h4>Telegu</h4> -<p>ఆగ్నేయ ఇరాన్‌లో ఆదివారం నాడు ఓ ఆత్మాహుతి దాడి జరగడంతో ఇరవై మంది మృతి చెందారు. -<br /> - -ఆగ్నేయ ఇరాన్‌లో ఆత్మాహుతి దాడి జరగడంతో ఐదుగురు ఎలిట్ రెవల్యూషనరీ గార్డ్‌లతో సహా ప్రముఖ కమాండర్‌లతోసహా మొత్తం ఇరవై మంది మృతి చెందినట్లు ఇరాన్ లోక్‌సభ స్పీకర్ అలీ లారిజానీ తెలిపారు. -</p> - - - -<h4>Tamil (ta)</h4> -<p>\xe0\xae\x87\xe0\xae\xb0\xe0\xae\xbe\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xaf \xe0\xae\xae\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x8d \xe0\xae\x85\xe0\xae\xb5\xe0\xae\xa8\xe0\xae\xae\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xaf\x88\xe0\xae\xaf\xe0\xaf\x81\xe0\xae\x9f\xe0\xae\xa9\xe0\xaf\x8d \xe0\xae\x87\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xa4\xe0\xae\xbe\xe0\xae\x95\xe0\xae\xb5\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d, \xe0\xae\xb7\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe \xe0\xae\xae\xe0\xae\xb1\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d \xe0\xae\x9a\xe0\xaf\x81\xe0\xae\xa9\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x8d \xe0\xae\xae\xe0\xaf\x81\xe0\xae\xb0\xe0\xae\xa3\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\x9f\xe0\xaf\x8d\xe0\xae\x9f \xe0\xae\x95\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x81\xe0\xae\x9f\xe0\xae\xa9\xe0\xaf\x8d \xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xb5\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\x9f\xe0\xaf\x8d\xe0\xae\x9f \xe0\xae\xa8\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x88\xe0\xae\xaf\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x8d \xe0\xae\x87\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xa4\xe0\xae\xbe\xe0\xae\x95\xe0\xae\xb5\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d \xe0\xae\x95\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\x95\xe0\xaf\x8d \xe0\xae\x95\xe0\xae\xa3\xe0\xae\xbf\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xaf\x81 \xe0\xae\x92\xe0\xae\xa9\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81 \xe0\xae\x95\xe0\xaf\x82\xe0\xae\xb1\xe0\xaf\x81\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xb1\xe0\xae\xa4\xe0\xaf\x81.</p> - - -<h4>Oriya</h4> -<p>ଓଡ଼ିଆ ଉଇକିପେଡିଆ ଆପଣଙ୍କୁ ସ୍ବାଗତ କରୁଛି। ଏହି ଉନ୍ମୁକ୍ତ ଜ୍ଞାନକୋଷଟି ଇଣ୍ଟରନେଟ ଉପରେ ଆଧାରିତ ଏବଂ ଏହା ବିଶ୍ବର ୫୦ଟି ଭାଷାରେ ଉପଲବ୍ଧ । ଏହାକୁ ଆପଣ ମଧ୍ୟ ବର୍ଦ୍ଧିତ ଓ ପରିବର୍ତିତ କରିପାରିବେ ଏବଂ ଏହାକୁ ଉନ୍ନତ କରିବା ପାଇଁ ନିଜର ଅବଦାନ ଦେଇ ପାରିବେ । ଆପଣଙ୍କ ପସନ୍ଦର ବିଷୟ ଗୁଡିକୁ ଆପଣ ନୂତନ ଭାବେରେ ଯୋଗ କରିପାରିବେ କିମ୍ବା ଏହି ପୃଷ୍ଠାକୁ ସମ୍ପାଦନ କରି ଏହା ସହିତ ଯୋଗ କରିପାରିବ । ସମସ୍ତ ପାଠ ଗୁଡିକ GNU ମୁକ୍ତ ଦଲିଲକରଣ ଲାଇସେନ୍ସର ସର୍ତ୍ତ ଅଧୀନରେ ଉପଲବ୍ଧ । ତଥାପି, ଆପଣ ଏହାକୁ ମୁକ୍ତ ଭାବେର ଇଲେକ୍ଟ୍ରୋନିକ୍ସ ପ୍ରିଣ୍ଟ୍ କିମ୍ବା ଅନ୍ୟାନ୍ୟ ପ୍ରିଣ୍ଟର ମାଧ୍ୟମରେ ବ୍ୟବହାର କରିପାରିବ । -</p> - -<h4>Punjabi</h4> -<p>ਕੇਂਦਰੀ ਗ੍ਰਹਿਮੰਤਰੀ ਪੀ.ਚਿਦੰਬਰਮ ਨੇ ਐਤਵਾਰ ਨੂੰ ਤਮਿਲਨਾਢੂ ਦੇ ਮੁੱਖਮੰਤਰੀ ਐਮ.ਕਰੁਣਾਨਿਧੀ ਨਾਲ ਮੁਲਾਕਾਤ ਕੀਤੀ।ਉਨ੍ਹਾ ਨੇ ਸ਼੍ਰੀਲੰਕਾ 'ਚ ਲਿੱਟੇ ਦੇ ਖਿਲਾਫ਼ ਯੁੱਧ ਦੌਰਾਨ ਉੱਝੜੇ ਹੋਏ ਲੱਗਭਗ ਢਾਈ ਲੱਖ ਤਮਿਲਾਂ ਦੀ ਮੁੜ ਰਿਹਾਇਸ਼ 'ਤੇ ਚਰਚਾ ਕੀਤੀ। -</p> - -<h4>Gujarati (gu)</h4> -<p> -આ વાત હજાર વાર કહેવામાં આવી છે કે ફિલ્મ બનાવતી વખેત હંમેશા સૌથી વધુ ધ્યાન વાર્તા અને સ્ક્રીનપ્લે પર આપવુ જોઈએ. કારણ કે આ કોઈ પણ ફિલ્મની સફળતાનો મુખ્ય આધાર હોય છે. -<br /> -મોટા ફિલ્મ સ્ટાર્સ સાઈન કરવાથી, સ્ટંટ અને ગીતોથી પાણીની અંદર કે આકાશમાં કરોડો રૂપિયા ખર્ચ કરી ફિલ્માવેલા દ્રશ્યોથી કશુ જ નથી થતુ. પરંતુ આ બુનિયાદી વાત અત્યાર સુધી કોઈ લોકોને સમજાતી નથી. -</p> - - -<h4>Hindi (hi)</h4> -<p>\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4 \xe0\xa4\x94\xe0\xa4\xb0 \xe0\xa4\xac\xe0\xa4\xb0\xe0\xa4\xae\xe0\xa5\x82\xe0\xa4\xa1\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xac\xe0\xa5\x80\xe0\xa4\x9a \xe0\xa4\xac\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xb6 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa3 \xe0\xa4\xb0\xe0\xa5\x81\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa5\x88\xe0\xa4\x9a \xe0\xa4\xa6\xe0\xa5\x8b\xe0\xa4\xac\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xbe \xe0\xa4\xb6\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x81 \xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x88. \xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4 \xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xac\xe0\xa4\xb0\xe0\xa4\xae\xe0\xa5\x82\xe0\xa4\xa1\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb8\xe0\xa4\xbe\xe0\xa4\xae\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 414 \xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb2\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa5\x8d\xe0\xa4\xaf \xe0\xa4\xb0\xe0\xa4\x96\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x88. \xe0\xa4\xac\xe0\xa4\xb0\xe0\xa4\xae\xe0\xa5\x82\xe0\xa4\xa1\xe0\xa4\xbe \xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xa6\xe0\xa5\x8b \xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x87\xe0\xa4\x9f \xe0\xa4\x96\xe0\xa5\x8b \xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82.</p> - - -<h4>Nepali (ne) - Devanagari</h4> -<p>\xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xae \xe0\xa4\xb8\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xa0\xe0\xa4\xa8\xe0\xa4\xae\xe0\xa4\xbe \xe0\xa4\xa2\xe0\xa5\x80\xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\x87 \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb8\xe0\xa4\xbe\xe0\xa4\xa5\xe0\xa5\x88 \xe0\xa4\x86\xe0\xa4\x89\xe0\xa4\x82\xe0\xa4\xa6\xe0\xa5\x8b \xe0\xa4\x9c\xe0\xa5\x87\xe0\xa4\xa0 \xe0\xa4\xae\xe0\xa4\xb9\xe0\xa4\xbf\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\xad\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa5\x8d\xe0\xa4\xb0 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xa7\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xb8\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\xb5 \xe0\xa4\xb9\xe0\xa5\x8b\xe0\xa4\xb2\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x8b\xe0\xa4\xb2\xe0\xa4\xbe \xe0\xa4\xad\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xac\xe0\xa4\xb9\xe0\xa4\xb8 \xe0\xa4\x9a\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x95\xe0\xa5\x80\xe0\xa4\xb0\xe0\xa4\xb9\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb2\xe0\xa4\xbe \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\xb5\xe0\xa4\x95\xe0\xa5\x88 \xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xb7\xe0\xa4\xaf\xe0\xa4\xae\xe0\xa4\xbe \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\x9a\xe0\xa4\xa8 \xe0\xa4\x86\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x97 \xe0\xa4\xb0 \xe0\xa4\x86\xe0\xa4\xa0 \xe0\xa4\xa6\xe0\xa4\xb2\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\x97\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbe, \xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\x97\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa5\x88 \xe0\xa4\xad\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\x87 \xe0\xa4\xb0\xe0\xa4\xb9\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xa6\xe0\xa5\x87\xe0\xa4\x96\xe0\xa4\xbf\xe0\xa4\x8f\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\x9b\xe0\xa5\xa4</p> - - -<h4>Bengali (bn)</h4> -<p> -দক্ষিণ ওয়াজিরিস্থানে কর্মরত স্বেচ্ছাসেবী ও ত্রাণ সংস্থাগুলো ধারণা করছে সেনা অভিযানের তীব্রতা বাড়লে এই সংখ্যাটা আরও অনেক বেড়ে যাবে -<br /> -শরণার্থীদের স্রোত সামলাতে তারা ইতিমধ্যেই হিমশিম খাচ্ছেন, ফলে লড়াই থেকে পালিয়ে আসা বেসামরিক মানুষজনের সংখ্যা আরও বাড়লে স্বভাবতই সঙ্কট আরও জটিল হয়ে উঠবে -</p> - - -<h4>Assamese</h4> -<p>অসমীয়া ৱিকিপিডিয়াৰ উদ্দেশ্য হ'ল সম্পূৰ্ণ অসমীয়া ভাষাত এখনি বিশ্বকোষ প্ৰণয়ন কৰা। অন্য কোনো ভাষাৰ প্ৰবন্ধ এই বিশ্বকোষৰ বাবে গ্ৰহন কৰা নহ'ব। বিশ্বকোষৰ অৱদানকাৰীসকললৈ সাদৰেৰে অনুৰোধ জনোৱা হ'ল যাতে তেখেতসকলে অসমীয়া ভাষাৰ প্ৰচলিত বানান পদ্ধতি মানি চলে। বিদেশী শব্দৰ অসমীয়া প্ৰতিৰূপৰ ক্ষেত্ৰত যিহেতু অসমীয়া সাহিত্যিকসকল এতিয়াও ঐক্যমতত উপনীত হ'ব পৰা নাই, ৱিকিপিডিয়াত বিদেশী শব্দৰ যিকোনো ধৰনৰ অসমীয়া ৰূপ গ্ৰাহ্য কৰা হ'ব। -</p> - - - - -<h4>Japanese (pangrams)</h4> -<h5>Iroha Uta SJIS</h5> - -<p>\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80\xe3\x81\xa1\xe3\x82\x8a\xe3\x81\xac\xe3\x82\x8b\xe3\x82\x92\xe3\x80\x80\xe3\x82\x8f\xe3\x81\x8b\xe3\x82\x88\xe3\x81\x9f\xe3\x82\x8c\xe3\x81\x9d\xe3\x80\x80\xe3\x81\xa4\xe3\x81\xad\xe3\x81\xaa\xe3\x82\x89\xe3\x82\x80\xe3\x80\x80\xe3\x81\x86\xe3\x82\x90\xe3\x81\xae\xe3\x81\x8a\xe3\x81\x8f\xe3\x82\x84\xe3\x81\xbe\xe3\x80\x80\xe3\x81\x91\xe3\x81\xb5\xe3\x81\x93\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x81\x8d\xe3\x82\x86\xe3\x82\x81\xe3\x81\xbf\xe3\x81\x97\xe3\x80\x80\xe3\x82\x91\xe3\x81\xb2\xe3\x82\x82\xe3\x81\x9b\xe3\x81\x99 </p> - -<h5>Tori Naku Uta </h5> - -<p>\xe3\x81\xa8\xe3\x82\x8a\xe3\x81\xaa\xe3\x81\x8f\xe3\x81\x93\xe3\x82\x91\xe3\x81\x99\xe3\x80\x80\xe3\x82\x86\xe3\x82\x81\xe3\x81\x95\xe3\x81\xbe\xe3\x81\x9b\xe3\x80\x80\xe3\x81\xbf\xe3\x82\x88\xe3\x81\x82\xe3\x81\x91\xe3\x82\x8f\xe3\x81\x9f\xe3\x82\x8b\xe3\x80\x80\xe3\x81\xb2\xe3\x82\x93\xe3\x81\x8b\xe3\x81\x97\xe3\x82\x92\xe3\x80\x80\xe3\x81\x9d\xe3\x82\x89\xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\x88\xe3\x81\xa6\xe3\x80\x80\xe3\x81\x8a\xe3\x81\x8d\xe3\x81\xa4\xe3\x81\xb8\xe3\x81\xab\xe3\x80\x80\xe3\x81\xbb\xe3\x81\xb5\xe3\x81\xad\xe3\x82\x80\xe3\x82\x8c\xe3\x82\x90\xe3\x81\xac\xe3\x80\x80\xe3\x82\x82\xe3\x82\x84\xe3\x81\xae\xe3\x81\x86\xe3\x81\xa1 </p> - -<h5>Ametsuchi No Uta </h5> - -<p>\xe3\x81\x82\xe3\x82\x81 \xe3\x81\xa4\xe3\x81\xa1 \xe3\x81\xbb\xe3\x81\x97 \xe3\x81\x9d\xe3\x82\x89 / \xe3\x82\x84\xe3\x81\xbe \xe3\x81\x8b\xe3\x81\xaf \xe3\x81\xbf\xe3\x81\xad \xe3\x81\x9f\xe3\x81\xab / \xe3\x81\x8f\xe3\x82\x82 \xe3\x81\x8d\xe3\x82\x8a \xe3\x82\x80\xe3\x82\x8d \xe3\x81\x93\xe3\x81\x91 / \xe3\x81\xb2\xe3\x81\xa8 \xe3\x81\x84\xe3\x81\xac \xe3\x81\x86\xe3\x81\xb8 \xe3\x81\x99\xe3\x82\x91 / \xe3\x82\x86\xe3\x82\x8f \xe3\x81\x95\xe3\x82\x8b \xe3\x81\x8a\xe3\x81\xb5 \xe3\x81\x9b\xe3\x82\x88 / \xe3\x81\x88\xe3\x81\xae\xe3\x81\x88*\xe3\x82\x92 \xe3\x81\xaa\xe3\x82\x8c \xe3\x82\x90\xe3\x81\xa6 </p> - -<h5>Taini no Uta </h5> - -<p>\xe3\x81\x9f\xe3\x82\x90\xe3\x81\xab\xe3\x81\x84\xe3\x81\xa6\xe3\x80\x80\xe3\x81\xaa\xe3\x81\xa4\xe3\x82\x80\xe3\x82\x8f\xe3\x82\x8c\xe3\x82\x92\xe3\x81\x9d\xe3\x80\x80\xe3\x81\x8d\xe3\x81\xbf\xe3\x82\x81\xe3\x81\x99\xe3\x81\xa8\xe3\x80\x80\xe3\x81\x82\xe3\x81\x95\xe3\x82\x8a\xe3\x81\x8a\xe3\x81\xb2\xe3\x82\x86\xe3\x81\x8f\xe3\x80\x80\xe3\x82\x84\xe3\x81\xbe\xe3\x81\x97\xe3\x82\x8d\xe3\x81\xae\xe3\x80\x80\xe3\x81\x86\xe3\x81\xa1\xe3\x82\x91\xe3\x81\xb8\xe3\x82\x8b\xe3\x81\x93\xe3\x82\x89\xe3\x80\x80\xe3\x82\x82\xe3\x81\xaf\xe3\x81\xbb\xe3\x81\x9b\xe3\x82\x88\xe3\x80\x80\xe3\x81\x88\xe3\x81\xb5\xe3\x81\xad\xe3\x81\x8b\xe3\x81\x91\xe3\x81\xac </p> - -<h4>Chinese (simplified) GB2312 GB</h4> - -<p>\xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac\xe5\xae\xa4\xe7\x9a\x84\xe6\xb6\x88\xe6\x81\xaf\xe7\xa7\xb0\xef\xbc\x8c\xe4\xb8\xad\xe6\x96\xb9\xe5\x85\x8d\xe9\x99\xa4\xe4\xb8\x8e\xe4\xb8\xad\xe5\x9b\xbd\xe6\x9c\x89\xe5\xa4\x96\xe4\xba\xa4\xe5\x85\xb3\xe7\xb3\xbb\xe7\x9a\x84\xe6\x89\x80\xe6\x9c\x89\xe9\x9d\x9e\xe6\xb4\xb2\xe9\x87\x8d\xe5\x80\xba\xe7\xa9\xb7\xe5\x9b\xbd\xe5\x8f\x8a\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x94\xbf\xe5\xba\x9c\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x9c\x89\xe5\x85\xb3\xe9\x83\xa8\xe9\x97\xa8\xe5\xb7\xb2\xe5\xaf\xb9\xe7\x9b\xb8\xe5\x85\xb3\xe5\x80\xba\xe5\x8a\xa1\xe8\xbf\x9b\xe8\xa1\x8c\xe5\x85\xa8\xe9\x9d\xa2\xe6\xb8\x85\xe7\x90\x86\xe6\xa0\xb8\xe5\xaf\xb9\xef\xbc\x8c\xe5\xaf\xb9\xe4\xb8\x8e\xe4\xb8\xad\xe5\x9b\xbd\xe6\x9c\x89\xe5\xa4\x96\xe4\xba\xa4\xe5\x85\xb3\xe7\xb3\xbb\xe7\x9a\x8433\xe4\xb8\xaa\xe9\x9d\x9e\xe6\xb4\xb2\xe9\x87\x8d\xe5\x80\xba\xe7\xa9\xb7\xe5\x9b\xbd\xe5\x92\x8c\xe6\x9c\x80\xe4\xb8\x8d\xe5\x8f\x91\xe8\xbe\xbe\xe5\x9b\xbd\xe5\xae\xb6\xef\xbc\x8c\xe5\x85\x8d\xe9\x99\xa4\xe5\x85\xb6\xe6\x88\xaa\xe8\x87\xb32005\xe5\xb9\xb4\xe5\xba\x95168\xe7\xac\x94\xe5\xaf\xb9\xe5\x8d\x8e\xe5\x88\xb0\xe6\x9c\x9f\xe6\x97\xa0\xe6\x81\xaf\xe8\xb4\xb7\xe6\xac\xbe\xe5\x80\xba\xe5\x8a\xa1\xe3\x80\x82\xe6\x8b\x9f\xe4\xba\x8e2007\xe5\xb9\xb4\xe5\xba\x95\xe5\x89\x8d\xe4\xb8\x8e\xe5\x8f\x97\xe6\x8f\xb4\xe5\x9b\xbd\xe5\x8a\x9e\xe7\x90\x86\xe5\xae\x8c\xe5\x85\x8d\xe5\x80\xba\xe5\x8d\x8f\xe8\xae\xae\xe3\x80\x82</p> - - -<h4>Chinese (Traditional - Hong Kong) Big5</h4> - -<p>\xe3\x80\x8c\xe6\x86\x82\xe9\xac\xb1\xe5\xb0\x8f\xe7\x8e\x8b\xe5\xad\x90\xe3\x80\x8d\xe6\x98\xaf\xe4\xb8\x80\xe5\x80\x8b\xe6\x95\x99\xe8\x82\xb2\xe7\xb6\xb2\xe7\xab\x99\xef\xbc\x8c\xe5\xae\x83\xe6\x88\x90\xe5\x8a\x9f\xe7\xb5\x90\xe5\x90\x88\xe4\xba\x86\xe9\xa6\x99\xe6\xb8\xaf\xe8\xb3\xbd\xe9\xa6\xac\xe6\x9c\x83\xe9\x98\xb2\xe6\xad\xa2\xe8\x87\xaa\xe6\xae\xba\xe7\xa0\x94\xe7\xa9\xb6\xe4\xb8\xad\xe5\xbf\x83\xe5\x90\x84\xe6\x96\xb9\xe9\x9d\xa2\xe7\x9a\x84\xe5\xb0\x88\xe6\x89\x8d\xef\xbc\x8c\xe7\x82\xba\xe9\x9d\x92\xe5\xb0\x91\xe5\xb9\xb4\xe4\xba\xba\xe6\x8f\x90\xe4\xbe\x9b\xe7\xb2\xbe\xe7\xa5\x9e\xe5\x81\xa5\xe5\xba\xb7\xe7\x9a\x84\xe8\xa8\x8a\xe6\x81\xaf\xef\xbc\x8c\xe5\xb0\x8d\xe6\x99\xae\xe5\x8f\x8a\xe6\x8a\x91\xe9\xac\xb1\xe7\x97\x87\xe7\x9f\xa5\xe8\xad\x98\xe7\x9a\x84\xe8\xb2\xa2\xe7\x8d\xbb\xe8\x89\xaf\xe5\xa4\x9a\xe3\x80\x82\xe5\x9c\xa8\xe9\xa6\x99\xe6\xb8\xaf\xef\xbc\x8c\xe5\xae\x83\xe6\x9b\xbe\xe7\x8d\xb2\xe9\x81\xb8\xe7\x82\xba\xe3\x80\x8c2004\xe5\xb9\xb4\xe5\x8d\x81\xe5\xa4\xa7\xe5\x81\xa5\xe5\xba\xb7\xe7\xb6\xb2\xe7\xab\x99\xe3\x80\x8d\xe4\xb9\x8b\xe4\xb8\x80\xef\xbc\x8c\xe8\xa9\xb2\xe9\xa0\x85\xe9\x81\xb8\xe8\x88\x89\xe8\x87\xaa2005\xe5\xb9\xb4\xe8\xb5\xb7\xe6\x94\xb9\xe5\x90\x8d\xe7\x8f\xbe\xe6\x99\x82\xe7\x9a\x84\xe3\x80\x8c\xe5\x84\xaa\xe7\xa7\x80\xe7\xb6\xb2\xe7\xab\x99\xe9\x81\xb8\xe8\x88\x89\xe3\x80\x8d\xe3\x80\x82\xe5\x85\xb6\xe8\xb2\xa2\xe7\x8d\xbb\xe5\x9c\xa8\xe5\x9c\x8b\xe9\x9a\x9b\xe9\x96\x93\xe4\xba\xa6\xe5\x82\x99\xe5\x8f\x97\xe8\x82\xaf\xe5\xae\x9a\xef\xbc\x8c2005\xe5\xb9\xb4\xef\xbc\x8c\xe8\xa9\xb2\xe7\xb6\xb2\xe7\xab\x99\xe6\xa6\xae\xe7\x8d\xb2\xe7\xac\xac\xe5\x85\xab\xe5\xb1\x86\xe3\x80\x8c\xe4\xba\x9e\xe6\xb4\xb2\xe5\x89\xb5\xe6\x96\xb0\xe5\xa4\xa7\xe7\x8d\x8e\xe3\x80\x8d\xe9\x8a\x80\xe7\x8d\x8e\xe3\x80\x82</p> - - - -<h4>Korean UHC</h4> - -<p>\xed\x82\xa4\xec\x8a\xa4\xec\x9d\x98 \xea\xb3\xa0\xec\x9c\xa0\xec\xa1\xb0\xea\xb1\xb4\xec\x9d\x80 \xec\x9e\x85\xec\x88\xa0\xeb\x81\xbc\xeb\xa6\xac \xeb\xa7\x8c\xeb\x82\x98\xec\x95\xbc \xed\x95\x98\xea\xb3\xa0 \xed\x8a\xb9\xeb\xb3\x84\xed\x95\x9c \xea\xb8\xb0\xec\x88\xa0\xec\x9d\x80 \xed\x95\x84\xec\x9a\x94\xec\xb9\x98 \xec\x95\x8a\xeb\x8b\xa4. </p> - - -<h4>Mixed</h4> -<p style=\"font-family: 'trebuchet ms';\">Distinguishes multiple languages enclosed in same element (tags): Arabic \xd9\x82\xd8\xa7\xd9\x84 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 -English Cat sat on the large mat -Tamil \xe0\xae\xb7\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe -Hindi \xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4 \xe0\xa4\x94\xe0\xa4\xb0 -Japanese \xe3\x81\x84\xe3\x82\x8d\xe3\x81\xaf\xe3\x81\xab\xe3\x81\xbb\xe3\x81\xb8\xe3\x81\xa8\xe3\x80\x80 -Chinese \xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac -Thai \xe0\xb9\x80\xe0\xb8\x9b\xe0\xb9\x87\xe0\xb8\x99\xe0\xb8\xa1\xe0\xb8\x99\xe0\xb8\xb8\xe0\xb8\xa9\xe0\xb8\xa2 -Viet M\xc3\xb4\xcc\xa3t kha\xcc\x89o sa\xcc\x81t m\xc6\xa1\xcc\x81i cho bi\xc3\xaa\xcc\x81t ng\xc6\xb0\xc6\xa1\xcc\x80i d\xc3\xa2n -Tamil \xe0\xae\xb7\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe -Chinese \xe6\x9d\xa5\xe8\x87\xaa\xe5\x95\x86\xe5\x8a\xa1\xe9\x83\xa8\xe6\x96\xb0\xe9\x97\xbb\xe5\x8a\x9e\xe5\x85\xac -English Cat sat on the large mat -</p> - - -<h4>Unicode Plane 2</h4> -<div> -Unicode Plane 0 (BMP U+0000 - U+FFFF): -\xe9\xbc\x82 \xe9\xbc\x88 \xe9\xbc\x97 \xe9\xbc\xa6 \xe9\xbc\xa7 \xe9\xbc\xb9 \xe9\xbd\x84 \xe9\xbd\x85 \xe9\xbd\x90 \xe9\xbd\x93 \xe9\xbd\x9a \xe9\xbd\xa2 \xe9\xbd\xa9 \xe9\xbd\xbf \xe9\xbe\x8e \xe9\xbe\x99 \xe9\xbe\x9f \xe9\xbe\xa5 -------- -Unicode Plane 2 (SIP characters > U+20000): -\xf0\xa0\x80\xa1 \xf0\xa0\x80\xbe \xf0\xa0\x81\x86 \xf0\xa0\x81\x8e \xf0\xa0\x81\xa8 \xf0\xa0\x82\x86 \xf0\xa0\x82\x87 \xf0\xa0\x82\x8a \xf0\xa0\x82\x94 \xf0\xa0\x83\x8a \xf0\xa0\x83\x8b \xf0\xa0\x83\x8c \xf0\xa0\x83\x8d \xf0\xa0\x83\x91 \xf0\xa0\x83\xae \xf0\xa0\x84\x8c \xf0\xa0\x84\x8e \xf0\xa0\x84\x98 \xf0\xa0\x86\xa4 \xf0\xa0\x86\xa9 \xf0\xa0\x86\xab \xf0\xa0\x87\x81 \xf0\xa0\x87\x94 \xf0\xa0\x87\xb2 \xf0\xa0\x88\x84 \xf0\xa0\x88\x8c \xf0\xa0\x88\x94 \xf0\xa0\x88\xb9 \xf0\xa0\x89\x9b \xf0\xa0\x89\xb4 \xf0\xa0\x89\xb5 \xf0\xa0\x8a\x99 \xf0\xa0\x8a\x9e \xf0\xa0\x8a\xa0 \xf0\xa0\x8a\xb7 \xf0\xa0\x8a\xbf \xf0\xa0\x8b\x80 \xf0\xa0\x8b\xa5 \xf0\xa0\x8c\x8a -------- -Unicode Plane 0 (BMPU+0000 - U+FFFF): -\xe9\xbc\x82 \xe9\xbc\x88 \xe9\xbc\x97 \xe9\xbc\xa6 \xe9\xbc\xa7 \xe9\xbc\xb9 \xe9\xbd\x84 \xe9\xbd\x85 \xe9\xbd\x90 \xe9\xbd\x93 \xe9\xbd\x9a \xe9\xbd\xa2 \xe9\xbd\xa9 \xe9\xbd\xbf \xe9\xbe\x8e \xe9\xbe\x99 \xe9\xbe\x9f \xe9\xbe\xa5 <br /> -</div> - - -"; - - - - - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF(); - -$mpdf->useAdobeCJK = true; // Default setting in config.php - // You can set this to false if you have defined other CJK fonts - -$mpdf->SetAutoFont(AUTOFONT_ALL); // AUTOFONT_CJK | AUTOFONT_THAIVIET | AUTOFONT_RTL | AUTOFONT_INDIC // AUTOFONT_ALL - // () = default ALL, 0 turns OFF (default initially) - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example30_arabic.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example30_arabic.php deleted file mode 100644 index 32428fee80bff2b3a8dcf17cd9387bcab074c370..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example30_arabic.php +++ /dev/null @@ -1,435 +0,0 @@ -<?php - -$html = " -<style> -body, p { font-family: irannastaliq; font-size: 15pt; } -</style> - -<h1>Arabic Languages and Fonts</h1> - -<!-- Koranic -<p style=\"font-family: ar_k_001;\">Fontname: ar_k_001<br /> -الحمد لله رب العالمين والصلاة والسلام على سيد المرسلين سيدنا ومولانا محمد وعلى آله وصحبه صلاة وسلاماً دائمين إلى يوم الدين. -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -</p> - - - -<p style=\"font-family: ar_k_002;\">Fontname: ar_k_002<br /> -الحمد لله رب العالمين والصلاة والسلام على سيد المرسلين سيدنا ومولانا محمد وعلى آله وصحبه صلاة وسلاماً دائمين إلى يوم الدين. -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -</p> - ---> - - -<p style=\"font-family: sans;\">Arabic<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -\xc2\xa2\xe2\x82\xac\xc2\xa9\xc2\xae\xe2\x84\xa2\xe2\x80\xb0\xc2\xb5\xc2\xb7\xe2\x80\xa2\xe2\x80\xa6\xc2\xa7\xc3\x9f\xe2\x80\xb9\xe2\x80\xba\xc2\xab\xc2\xbb\xe2\x80\x98\xe2\x80\x99\xe2\x80\x9c\xe2\x80\x9d\xe2\x80\x9a\xe2\x80\x9e<>\xe2\x80\x93\xe2\x80\x94\xcb\x86\xcb\x9c -\xc2\xb0\xc2\xb1\xc3\xb7\xc3\x97\xc2\xbc\xc2\xbd\xc2\xbe\xc6\x92\xc2\xac\xe2\x80\xa0\xe2\x80\xa1 -<br /> -\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x98\xc5\x92\xc5\xa0\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc5\xb8 -<br /> -\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb8\xc5\x93\xc5\xa1\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf -<br /> -الحمد لله رب العالمين والصلاة والسلام على سيد المرسلين سيدنا ومولانا محمد وعلى آله وصحبه صلاة وسلاماً دائمين إلى يوم الدين. -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -</p> - - - -<p style=\"font-family: serif;\">Arabic<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -\xc2\xa2\xe2\x82\xac\xc2\xa9\xc2\xae\xe2\x84\xa2\xe2\x80\xb0\xc2\xb5\xc2\xb7\xe2\x80\xa2\xe2\x80\xa6\xc2\xa7\xc3\x9f\xe2\x80\xb9\xe2\x80\xba\xc2\xab\xc2\xbb\xe2\x80\x98\xe2\x80\x99\xe2\x80\x9c\xe2\x80\x9d\xe2\x80\x9a\xe2\x80\x9e<>\xe2\x80\x93\xe2\x80\x94\xcb\x86\xcb\x9c -\xc2\xb0\xc2\xb1\xc3\xb7\xc3\x97\xc2\xbc\xc2\xbd\xc2\xbe\xc6\x92\xc2\xac\xe2\x80\xa0\xe2\x80\xa1 -<br /> -\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x98\xc5\x92\xc5\xa0\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc5\xb8 -<br /> -\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb8\xc5\x93\xc5\xa1\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf -<br /> -الحمد لله رب العالمين والصلاة والسلام على سيد المرسلين سيدنا ومولانا محمد وعلى آله وصحبه صلاة وسلاماً دائمين إلى يوم الدين. -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -</p> - - - - - - -<p style=\"font-family: sans;\">Farsi<br /> -همهٔ افراد بشر آزاد به دنیا می‌آیند و از دید حیثیت و حقوق با هم برابرند، همه دارای اندیشه و وجدان هستند و باید در برابر یکدیگر با روح برادری رفتار کنند. -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -</p> - - - -<p style=\"font-family: serif;\">Farsi<br /> -همهٔ افراد بشر آزاد به دنیا می‌آیند و از دید حیثیت و حقوق با هم برابرند، همه دارای اندیشه و وجدان هستند و باید در برابر یکدیگر با روح برادری رفتار کنند. -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -</p> - - - -<p style=\"font-family: sans;\">Urdu<br /> -\xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xd8\xa7\xd9\x81\xd8\xaa\xd8\xae\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x8c \xd8\xac\xd8\xa8\xd8\xb1\xdb\x8c \xd8\xb1\xd8\xae\xd8\xb5\xd8\xaa \xd9\xbe\xd8\xb1 \xd9\x84\xd8\xa7\xdb\x81\xd9\x88\xd8\xb1\xdb\x81\xd8\xa7\xd8\xa6\xdb\x8c \xda\xa9\xd9\x88\xd8\xb1\xd9\xb9 \xda\xa9\xdb\x92 \xd8\xa7\xdb\x8c\xda\xa9 \xd8\xa7\xd9\x88\xd8\xb1 \xd8\xb3\xd9\x86\xd8\xaf\xda\xbe \xd9\x85\xdb\x8c\xda\xba \xda\xa9\xd8\xa6\xdb\x8c \xd8\xb3\xd9\x88\xd9\x84 \xd8\xac\xd8\xac \xd9\x85\xd8\xb3\xd8\xaa\xd8\xb9\xd9\x81\xdb\x8c \xdb\x81\xd9\x88\xda\xaf\xd8\xa6\xdb\x92 \xdb\x81\xdb\x8c\xda\xba\xdb\x94 -<br /> -\xda\x86\xdb\x8c\xd9\x81 \xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xda\xa9\xdb\x8c \xd8\xb3\xd8\xb1\xda\xaf\xd8\xb1\xd9\x85\xdb\x8c\xd8\xa7\xda\xba \xd9\x85\xd8\xad\xd8\xaf\xd9\x88\xd8\xaf \xda\xa9\xd8\xb1\xd9\x86\xdb\x92 \xd8\xa7\xd9\x88\xd8\xb1 \xd9\xbe\xd9\x88\xd9\x84\xdb\x8c\xd8\xb3 \xd8\xaa\xd8\xb9\xdb\x8c\xd9\x86\xd8\xa7\xd8\xaa\xdb\x8c \xda\xa9\xdb\x92 \xd8\xad\xda\xa9\xd9\x85 \xd9\x86\xd8\xa7\xd9\x85\xdb\x92 \xd9\xbe\xd8\xb1 \xd8\xaf\xd8\xb3\xd8\xaa\xd8\xae\xd8\xb7 \xda\xa9\xd8\xb1\xda\xa9\xdb\x92 \xd8\xba\xd9\x84\xd8\xb7 \xda\xa9\xdb\x8c\xd8\xa7: \xd8\xac\xd9\x86\xd8\xb1\xd9\x84 \xd9\x85\xd8\xb4\xd8\xb1\xd9\x81 -</p> - -<p style=\"font-family: serif;\">Urdu<br /> -\xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xd8\xa7\xd9\x81\xd8\xaa\xd8\xae\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x8c \xd8\xac\xd8\xa8\xd8\xb1\xdb\x8c \xd8\xb1\xd8\xae\xd8\xb5\xd8\xaa \xd9\xbe\xd8\xb1 \xd9\x84\xd8\xa7\xdb\x81\xd9\x88\xd8\xb1\xdb\x81\xd8\xa7\xd8\xa6\xdb\x8c \xda\xa9\xd9\x88\xd8\xb1\xd9\xb9 \xda\xa9\xdb\x92 \xd8\xa7\xdb\x8c\xda\xa9 \xd8\xa7\xd9\x88\xd8\xb1 \xd8\xb3\xd9\x86\xd8\xaf\xda\xbe \xd9\x85\xdb\x8c\xda\xba \xda\xa9\xd8\xa6\xdb\x8c \xd8\xb3\xd9\x88\xd9\x84 \xd8\xac\xd8\xac \xd9\x85\xd8\xb3\xd8\xaa\xd8\xb9\xd9\x81\xdb\x8c \xdb\x81\xd9\x88\xda\xaf\xd8\xa6\xdb\x92 \xdb\x81\xdb\x8c\xda\xba\xdb\x94 -<br /> -\xda\x86\xdb\x8c\xd9\x81 \xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xda\xa9\xdb\x8c \xd8\xb3\xd8\xb1\xda\xaf\xd8\xb1\xd9\x85\xdb\x8c\xd8\xa7\xda\xba \xd9\x85\xd8\xad\xd8\xaf\xd9\x88\xd8\xaf \xda\xa9\xd8\xb1\xd9\x86\xdb\x92 \xd8\xa7\xd9\x88\xd8\xb1 \xd9\xbe\xd9\x88\xd9\x84\xdb\x8c\xd8\xb3 \xd8\xaa\xd8\xb9\xdb\x8c\xd9\x86\xd8\xa7\xd8\xaa\xdb\x8c \xda\xa9\xdb\x92 \xd8\xad\xda\xa9\xd9\x85 \xd9\x86\xd8\xa7\xd9\x85\xdb\x92 \xd9\xbe\xd8\xb1 \xd8\xaf\xd8\xb3\xd8\xaa\xd8\xae\xd8\xb7 \xda\xa9\xd8\xb1\xda\xa9\xdb\x92 \xd8\xba\xd9\x84\xd8\xb7 \xda\xa9\xdb\x8c\xd8\xa7: \xd8\xac\xd9\x86\xd8\xb1\xd9\x84 \xd9\x85\xd8\xb4\xd8\xb1\xd9\x81 -</p> - - -<p style=\"font-family: sans;\">Pashto<br /> -\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a. -<br /> -\xd9\x87 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xda\xa9\xdb\x90 \xd9\x8a\xd9\x88\xd9\x87 \xd8\xaa\xd8\xa7\xd8\xb2\xd9\x87 \xd9\x86\xd8\xb8\xd8\xb1 \xd8\xb4\xd9\x85\xdb\x90\xd8\xb1\xd9\x86\xd9\x87 \xda\x9a\xd9\x8a\xd9\x8a \xda\x86\xdb\x90 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\xa7\xd9\x86 \xd9\xbe\xd9\x87 \xd8\xb2\xd9\x8a\xd8\xa7\xd8\xaa\xdb\x90\xd8\xaf\xd9\x88\xd9\x86\xda\xa9\xd9\x8a \xd8\xaa\xd9\x88\xda\xaf\xd9\x87 \xd8\xaf \xd8\xad\xd8\xa7\xd9\x84\xd8\xa7\xd8\xaa\xd9\x88 \xd9\xbe\xd9\x87 \xd8\xa7\xda\x93\xd9\x87 \xd8\xa8\xd8\xaf\xd8\xa8\xd9\x8a\xd9\x86\xd9\x87 \xd8\xaf\xd9\x8a \xd8\xa7\xd9\x88 \xd8\xaf \xd8\xa8\xdb\x90 \xd8\xa8\xd8\xa7\xd9\x88\xd8\xb1\xd9\x8a \xd8\xa7\xd8\xad\xd8\xb3\xd8\xa7\xd8\xb3 \xda\xa9\xd9\x88\xd9\x8a\xd8\x8c \xd8\xae\xd9\x88 \xd8\xae\xd9\xbe\xd9\x84 \xd9\x87\xd9\x8a\xd9\x88\xd8\xa7\xd8\xaf \xd9\x8a\xd9\x88\xd9\x85\xd9\x88\xd9\xbc\xd9\x89 \xd8\xba\xd9\x88\xd8\xa7\xda\x93\xd9\x8a. -</p> - -<p style=\"font-family: serif;\">Pashto<br /> -\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a. -<br /> -\xd9\x87 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xda\xa9\xdb\x90 \xd9\x8a\xd9\x88\xd9\x87 \xd8\xaa\xd8\xa7\xd8\xb2\xd9\x87 \xd9\x86\xd8\xb8\xd8\xb1 \xd8\xb4\xd9\x85\xdb\x90\xd8\xb1\xd9\x86\xd9\x87 \xda\x9a\xd9\x8a\xd9\x8a \xda\x86\xdb\x90 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\xa7\xd9\x86 \xd9\xbe\xd9\x87 \xd8\xb2\xd9\x8a\xd8\xa7\xd8\xaa\xdb\x90\xd8\xaf\xd9\x88\xd9\x86\xda\xa9\xd9\x8a \xd8\xaa\xd9\x88\xda\xaf\xd9\x87 \xd8\xaf \xd8\xad\xd8\xa7\xd9\x84\xd8\xa7\xd8\xaa\xd9\x88 \xd9\xbe\xd9\x87 \xd8\xa7\xda\x93\xd9\x87 \xd8\xa8\xd8\xaf\xd8\xa8\xd9\x8a\xd9\x86\xd9\x87 \xd8\xaf\xd9\x8a \xd8\xa7\xd9\x88 \xd8\xaf \xd8\xa8\xdb\x90 \xd8\xa8\xd8\xa7\xd9\x88\xd8\xb1\xd9\x8a \xd8\xa7\xd8\xad\xd8\xb3\xd8\xa7\xd8\xb3 \xda\xa9\xd9\x88\xd9\x8a\xd8\x8c \xd8\xae\xd9\x88 \xd8\xae\xd9\xbe\xd9\x84 \xd9\x87\xd9\x8a\xd9\x88\xd8\xa7\xd8\xaf \xd9\x8a\xd9\x88\xd9\x85\xd9\x88\xd9\xbc\xd9\x89 \xd8\xba\xd9\x88\xd8\xa7\xda\x93\xd9\x8a. -</p> - - - -<!-- - -<p style=\"font-family: sd_1_001;\">Fontname: sd_1_001<br /> -فوج طرفان ڪيري لوگربل جي مخالفت سبب زرداري حڪومت کي خطرو ناهي:آمريڪا -<br /> -واشنگٽن (م ڊ) آمريڪا چيو آهي ته ڪيري لوگربل تي پاڪ فوج جي تحفظات سان پاڪستان ۾ جمهوري طور آيل زرداري جي حڪومت کي ڪوبه خطرو ناهي، ان سوال تي تي ڪيري لوگربل ۾ پاڪستان کي غير مشروط امداد ڏيڻ جي ڳالهه ڪئي وئي آهي، جڏهن ته فوجي امداد تي شرط لاڳو ڪيا -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -</p> - - -<p style=\"font-family: sd_1_002;\">Fontname: sd_1_002<br /> -فوج طرفان ڪيري لوگربل جي مخالفت سبب زرداري حڪومت کي خطرو ناهي:آمريڪا -<br /> -واشنگٽن (م ڊ) آمريڪا چيو آهي ته ڪيري لوگربل تي پاڪ فوج جي تحفظات سان پاڪستان ۾ جمهوري طور آيل زرداري جي حڪومت کي ڪوبه خطرو ناهي، ان سوال تي تي ڪيري لوگربل ۾ پاڪستان کي غير مشروط امداد ڏيڻ جي ڳالهه ڪئي وئي آهي، جڏهن ته فوجي امداد تي شرط لاڳو ڪيا -<br /> -٠.١.٢.٣.٤.٥.٦.٧.٨.٩ -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -</p> - ---> - - - -From http://titus.uni-frankfurt.de/unicode/alphabet/arabtest.htm -<br /> - -1. Arabic: -<br /> -ا ـا ـاـ اـ -<br /> -ب ـب ـبـ بـ -<br /> -ت ـت ـتـ تـ -<br /> -ج ـج ـجـ جـ -<br /> -ح ـح ـحـ حـ -<br /> -خ ـخ ـخـ خـ -<br /> -د ـد ـد د -<br /> -ذ ـذ ـذ ذ -<br /> -ر ـر ـر ر -<br /> -ز ـز ـز ز -<br /> -س ـس ـسـ سـ -<br /> -ش ـش ـشـ شـ -<br /> -ص ـص ـصـ صـ -<br /> -ض ـض ـضـ ضـ -<br /> -ط ـط ـطـ طـ -<br /> -ظ ـظ ـظـ ظـ -<br /> -ع ـع ـعـ عـ -<br /> -غ ـغ ـغـ غـ -<br /> -ف ـف ـفـ فـ -<br /> -ق ـق ـقـ قـ -<br /> -ك ـك ـكـ كـ -<br /> -ل ـل ـلـ لـ -<br /> -م ـم ـمـ مـ -<br /> -ن ـن ـنـ نـ -<br /> -ه ـه ـهـ هـ -<br /> -و ـو ـوـ وـ -<br /> -ي ـي ـيـ يـ -<br /> -<br /> - -2. Persian: -<br /> -Four extra letters: پ چ ژ گ -<br /> -ـپ ـپـ پـ -<br /> -ـچ ـچـ پچ -<br /> -ـژ ـژـ ژـ -<br /> -ـگ ـگـ گـ -<br /> -Original Arabic letter ك -modified Persian letter ک -<br /> -Original Arabic letter ي -modified Persian letter ى<br /> -<br /> -همهٔ افراد بشر آزاد به دنیا می‌آیند و از دید حیثیت و حقوق با هم برابرند، همه دارای اندیشه و وجدان هستند و باید در برابر یکدیگر با روح برادری رفتار کنند. -<br /> -<br /> - -3. Pashto: -<br /> -<div style=\"font-family: sans;\"> -ا ـا ـاـ اـ -ب ـب ـبـ بـ -پ ـپ ـپـ پـ -ت ـت ـتـ تـ -ټ ـټ ـټـ ټـ -ث ـث ـثـ ثـ -ج ـج ـجـ جـ -ځ ـځ ـځـ ځـ -چ ـچ ـچـ چـ -څ ـڅ ـڅـ څـ -ح ـح ـحـ حـ -خ ـخ ـخـ خـ - -د ـد ـدـ دـ -ډ ـډ ـډـ ډـ -ذ ـذ ـذـ ذـ -ر ـر ـرـ رـ -ړ ـړ ـړـ ړـ -ز ـز ـزـ زـ -ژ ـژ ـژـ ژـ -ږ ـږ ـږـ ږـ -س ـس ـسـ سـ -ش ـش ـشـ شـ -ښ ـښ ـښـ ښـ - -ص ـص ـصـ صـ -ض ـض ـضـ ضـ -ط ـط ـطـ طـ -ظ ـظ ـظـ ظـ -ع ـع ـعـ عـ -غ ـغ ـغـ غـ -ف ـف ـفـ فـ -ق ـق ـقـ قـ -ک ـک ـکـ کـ -ګ ـګ ـګـ ګـ -ل ـل ـلـ لـ -م ـم ـمـ مـ - -ن ـن ـنـ نـ -ڼ ـڼ ـڼـ ڼـ -ڼ ـڼ ـڼـ ڼـ -ؤ ـؤ ـؤـ ؤـ -ه ـه ـهـ هـ -ۀ ـۀ ـۀـ ۀـ -ی ـی ـیـ یـ -ي ـي ـيـ يـ -ې ـې ـېـ ېـ -ۍ ـۍ ـۍـ ۍـ -ئ ـئ ـئـ ئـ -<br /> -<br /> -</div> - - -4. Urdu: -<br /> -<div style=\"font-family: sans;\"> -ا ـا ـاـ اـ -ب ـب ـبـ بـ -پ ـپ ـپـ پـ -ت ـت ـتـ تـ -ٹ ـٹ ـٹـ ٹـ -ث ـث ـثـ ثـ -ج ـج ـجـ جـ -ح ـح ـحـ حـ -خ ـخ ـخـ خـ -د ـد ـدـ دـ -ڈ ـڈ ـڈـ ڈـ -ذ ـذ ـذـ ذـ -ر ـر ـرـ رـ -ڑ ـڑ ـڑـ ڑـ -ژ ـژ ـژـ ژـ -س ـس ـسـ سـ -ش ـش ـشـ شـ -ص ـص ـصـ صـ -ض ـض ـضـ ضـ -ط ـط ـطـ طـ -ظ ـظ ـظـ ظـ -ع ـع ـعـ عـ -غ ـغ ـغـ غـ -ف ـف ـفـ فـ -ق ـق ـقـ قـ -ک ـک ـکـ کـ -گ ـگ ـگـ گـ -ل ـل ـلـ لـ -م ـم ـمـ مـ -ن ـن ـنـ نـ -و ـو ـوـ وـ -ہ ﮩ ﮨ -ھ ـھ ـھـ ھـ -ء ـء ـءـ ءـ -ی ـی ـیـ یـ -ے ـے ـےـ ےـ -<br /> -تمام انسان آزاد اور حقوق و عزت کے اعتبار سے برابر پیدا ہوۓ ہیں۔ انہیں ضمیر اور عقل ودیعت ہوئی ہی۔ اسلۓ انہیں ایک دوسرے کے ساتھ بھائی چارے کا سلوک کرنا چاہیۓ۔ -<br /> -<br /> -</div> - -<!-- - -5. Sindhi: -<br /> -<div style=\"font-family: sd_1_001;\"> - ڄ ـڄ ـڄـ ڄـ - ٺ ـٺ ـٺـ ٺـ - ٽ ـٽ ـٽـ ٽـ - ٿ ـٿ ـٿـ ٿـ - ڀ ـڀ ـڀـ ڀـ - ٻ ـٻ ـٻـ ٻـ - ڙ ـڙ ـڙـ ڙـ - ڍ ـڍ ـڍـ ڍـ - ڊ ـڊ ـڊـ ڊـ - ڏ ـڏ ـڏـ ڏـ - ڌ ـڌ ـڌـ ڌـ - ڇ ـڇ ـڇـ ڇـ - ڃ ـڃ ـڃـ ڃـ - ڦ ـڦ ـڦـ ڦـ - ڻ ـڻ ـڻـ ڻـ - ڱ ـڱ ـڱـ ڱـ - ڳ ـڳ ـڳـ ڳـ - ڪ ـڪ ـڪـ ڪـ -<br /> - -ج ھ ڄ ج پ ث ٺ ٽ ٿ ت ڀ ٻ ب ا -ڙ ر ذ ڍ ڊ ڏ ڌ د خ ح ڇ چ ڃ -ق ڦ ف غ ع ظ ط ض ص ش س ز ڙھ -ي ه و ڻ ن م ل ڱ گھ ڳ گ ک ڪ -<br /> -<br /> -</div> - ---> - - -<h4>Arabic</h4> -<p>\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4 \xd9\x81\xd9\x8a \xd8\xad\xd8\xaf\xd9\x8a\xd8\xab \xd9\x85\xd8\xaa\xd9\x84\xd9\x81\xd8\xb2<annotation content=\"\xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" subject=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" icon=\"Comment\" color=\"#FE88EF\" author=\"\xd8\xac\xd9\x88\xd8\xb1\xd8\xac\" /> - \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb0\xd9\x83\xd8\xb1\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb1\xd8\xa7\xd8\xa8\xd8\xb9\xd8\xa9 \xd9\x84\xd9\x84\xd8\xba\xd8\xb2\xd9\x88 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xb1\xd9\x8a\xd9\x83\xd9\x8a \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd9\x84\xd9\x88\xd9\x8a\xd8\xa9 \xd8\xad\xd8\xa7\xd9\x84\xd9\x8a\xd8\xa7 \xd9\x84\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x86 \xd9\x84\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82.</p> - -<p>\xd9\x87\xd9\x84 \xd8\xb3\xd8\xaa\xd8\xb3\xd9\x81\xd8\xb1 \xd8\xa7\xd9\x84\xd8\xac\xd9\x87\xd9\x88\xd8\xaf \xd8\xa7\xd9\x84\xd8\xaf\xd8\xa8\xd9\x84\xd9\x88\xd9\x85\xd8\xa7\xd8\xb3\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xac\xd8\xa7\xd8\xb1\xd9\x8a\xd8\xa9 \xd8\xb9\xd9\x86 \xd8\xad\xd9\x84\xd9\x88\xd9\x84\xd8\x9f \xd9\x88\xd9\x83\xd9\x8a\xd9\x81 \xd8\xaa\xd9\x86\xd8\xb8\xd8\xb1 \xd9\x84\xd9\x84\xd8\xa7\xd8\xaa\xd9\x87\xd8\xa7\xd9\x85\xd8\xa7\xd8\xaa \xd9\x84\xd8\xa8\xd8\xb9\xd8\xb6 \xd9\x87\xd8\xb0\xd9\x87 \xd8\xa7\xd9\x84\xd8\xaf\xd9\x88\xd9\x84 \xd8\xa8\xd8\xa7\xd9\x84\xd8\xaa\xd8\xaf\xd8\xae\xd9\x84 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb4\xd8\xa3\xd9\x86 \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\x8c \xd9\x88\xd8\xa7\xd9\x84\xd8\xaa\xd9\x88\xd8\xb1\xd8\xb7 \xd9\x81\xd9\x8a \xd8\xaf\xd8\xb9\xd9\x85 \xd8\xb9\xd9\x85\xd9\x84\xd9\x8a\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xb9\xd9\x86\xd9\x81\xd8\x9f \xd9\x88\xd8\xa7\xd9\x84\xd9\x89 \xd8\xa7\xd9\x8a \xd9\x85\xd8\xaf\xd9\x89 \xd9\x8a\xd8\xa8\xd8\xaf\xd9\x88 \xd8\xa7\xd9\x84\xd9\x88\xd8\xb6\xd8\xb9 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd8\xa7\xd9\x86\xd8\xb9\xd9\x83\xd8\xa7\xd8\xb3\xd8\xa7 \xd9\x84\xd9\x84\xd8\xb5\xd8\xb1\xd8\xa7\xd8\xb9\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd8\xa5\xd9\x82\xd9\x84\xd9\x8a\xd9\x85\xd9\x8a\xd8\xa9 \xd9\x81\xd9\x8a \xd8\xa7\xd9\x84\xd9\x85\xd9\x86\xd8\xb7\xd9\x82\xd8\xa9\xd8\x9f</p> - -<p>\xd9\x88\xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd8\xa8\xd9\x8a\xd8\xaa \xd8\xa7\xd9\x84\xd8\xa7\xd8\xa8\xd9\x8a\xd8\xb6 "\xd8\xa8\xd8\xb4\xd8\xaf\xd8\xa9" \xd8\xaa\xd9\x81\xd8\xac\xd9\x8a\xd8\xb1 \xd8\xa7\xd9\x8a\xd9\x84\xd8\xa7\xd8\xaa \xd9\x81\xd9\x8a\xd9\x85\xd8\xa7 \xd8\xa7\xd8\xb9\xd8\xb1\xd8\xa8\xd8\xaa \xd9\x88\xd8\xb2\xd8\xa7\xd8\xb1\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xae\xd8\xa7\xd8\xb1\xd8\xac\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xb1\xd9\x88\xd8\xb3\xd9\x8a\xd8\xa9 \xd8\xb9\xd9\x86 "\xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86\xd8\xaa\xd9\x87\xd8\xa7 \xd8\xa7\xd9\x84\xd8\xb4\xd8\xaf\xd9\x8a\xd8\xaf\xd8\xa9" \xd9\x84\xd9\x84\xd8\xad\xd8\xa7\xd8\xaf\xd8\xab" \xd9\x88\xd8\xa7\xd8\xb5\xd9\x81\xd8\xa9 \xd8\xa7\xd9\x8a\xd8\xa7\xd9\x87 \xd8\xa8\xd9\x80"\xd8\xa7\xd9\x84\xd9\x85\xd8\xaa\xd8\xb7\xd8\xb1\xd9\x81" \xd8\xa7\xd9\x84\xd8\xb0\xd9\x8a \xd8\xa7\xd8\xb3\xd8\xaa\xd9\x87\xd8\xaf\xd9\x81 "\xd9\x85\xd8\xaf\xd9\x86\xd9\x8a\xd9\x8a\xd9\x86 \xd9\x85\xd8\xb3\xd8\xa7\xd9\x84\xd9\x85\xd9\x8a\xd9\x86".</p> - -<p>\xd9\x88\xd8\xa7\xd8\xb6\xd8\xa7\xd9\x81\xd8\xaa \xd9\x88\xd8\xb2\xd8\xa7\xd8\xb1\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xae\xd8\xa7\xd8\xb1\xd8\xac\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xb1\xd9\x88\xd8\xb3\xd9\x8a\xd8\xa9 \xd9\x81\xd9\x8a \xd8\xa8\xd9\x8a\xd8\xa7\xd9\x86\xd9\x87\xd8\xa7: "\xd9\x85\xd9\x86 \xd8\xa7\xd9\x84\xd9\x85\xd8\xa4\xd8\xb3\xd9\x81 \xd8\xa7\xd9\x86 \xd9\x8a\xd8\xa3\xd8\xaa\xd9\x8a \xd9\x87\xd8\xb0\xd8\xa7 \xd8\xa7\xd9\x84\xd8\xad\xd8\xa7\xd8\xaf\xd8\xab \xd8\xa8\xd9\x8a\xd9\x86\xd9\x85\xd8\xa7 \xd8\xaa\xd8\xa8\xd8\xb0\xd9\x84 \xd8\xa7\xd9\x84\xd8\xac\xd9\x87\xd9\x88\xd8\xaf \xd9\x84\xd8\xaa\xd8\xae\xd8\xb7\xd9\x8a \xd8\xa7\xd9\x84\xd8\xa7\xd8\xb2\xd9\x85\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xaf\xd8\xa7\xd8\xae\xd9\x84\xd9\x8a\xd8\xa9".</p> - -<p>\xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 \xd9\x85\xd8\xa7 \xd9\x8a\xd9\x85\xd9\x83\xd9\x86 \xd9\x85\xd9\x86 \xd8\xa7\xd8\xac\xd9\x84 \xd8\xa7\xd8\xad\xd8\xaa\xd9\x88\xd8\xa7\xd8\xa1 \xd9\x85\xd8\xb8\xd8\xa7\xd9\x87\xd8\xb1 \xd8\xa7\xd9\x84\xd8\xaa\xd8\xb7\xd8\xb1\xd9\x81 \xd8\xa7\xd9\x84\xd8\xaa\xd9\x8a \xd9\x84\xd8\xa7 \xd9\x85\xd8\xa8\xd8\xb1\xd8\xb1 \xd9\x84\xd9\x87\xd8\xa7 \xd9\x88\xd8\xa7\xd9\x84\xd8\xaa\xd9\x8a \xd9\x84\xd8\xa7 \xd8\xaa\xd9\x81\xd9\x8a\xd8\xaf \xd9\x85\xd8\xb5\xd8\xa7\xd9\x84\xd8\xad \xd8\xa7\xd9\x84\xd8\xb4\xd8\xb9\xd8\xa8 \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a \xd8\xb9\xd9\x84\xd9\x89 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd8\xaf \xd8\xa7\xd9\x84\xd8\xb7\xd9\x88\xd9\x8a\xd9\x84".</p> - -<p>\xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 \xd9\x85\xd8\xa7 \xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 </p> - -<p>\xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 \xd9\x88\xd8\xaf\xd8\xb9\xd8\xaa \xd9\x85\xd9\x88\xd8\xb3\xd9\x83\xd9\x88 \xd8\xa7\xd9\x84\xd8\xb3\xd9\x84\xd8\xb7\xd8\xa7\xd8\xaa \xd8\xa7\xd9\x84\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\xd9\x8a\xd8\xa9 \xd8\xa7\xd9\x84\xd9\x89 "\xd8\xa8\xd8\xb0\xd9\x84 \xd9\x83\xd9\x84 \xd9\x85\xd8\xa7 \xd9\x8a\xd9\x85\xd9\x83\xd9\x86 \xd9\x85\xd9\x86 \xd8\xa7\xd8\xac\xd9\x84</p> - - -<p>\xd9\x83\xd9\x85\xd8\xa7 \xd8\xa7\xd8\xaf\xd8\xa7\xd9\x86 \xd8\xa7\xd9\x84\xd9\x81\xd8\xa7\xd8\xb1\xd9\x88 \xd8\xaf\xd9\x8a \xd8\xb3\xd9\x88\xd8\xaa\xd9\x88 \xd9\x85\xd8\xa8\xd8\xb9\xd9\x88\xd8\xab \xd8\xa7\xd9\x84\xd8\xa7\xd9\x85\xd9\x85 \xd8\xa7\xd9\x84\xd9\x85\xd8\xaa\xd8\xad\xd8\xaf\xd8\xa9 \xd8\xa7\xd9\x84\xd8\xae\xd8\xa7\xd8\xb5 \xd8\xa7\xd9\x84\xd9\x89 \xd8\xa7\xd9\x84\xd8\xb4\xd8\xb1\xd9\x82 \xd8\xa7\xd9\x84\xd8\xa7\xd9\x88\xd8\xb3\xd8\xb7 \xd8\xa7\xd9\x84\xd8\xb9\xd9\x85\xd9\x84\xd9\x8a\xd8\xa9 \xd9\x88\xd9\x82\xd8\xa7\xd9\x84 "\xd8\xa7\xd9\x86\xd9\x87 \xd9\x83\xd8\xa7\xd9\x86 \xd9\x87\xd8\xac\xd9\x88\xd9\x85\xd8\xa7 \xd8\xb9\xd9\x84\xd9\x89 \xd8\xa7\xd8\xb4\xd8\xae\xd8\xa7\xd8\xb5 \xd8\xb9\xd8\xa7\xd8\xaf\xd9\x8a\xd9\x8a\xd9\x86 \xd9\x83\xd8\xa7\xd9\x86\xd9\x88\xd8\xa7 \xd9\x8a\xd9\x82\xd9\x88\xd9\x85\xd9\x88\xd9\x86 \xd8\xa8\xd9\x86\xd8\xb4\xd8\xa7\xd8\xb7\xd9\x87\xd9\x85 \xd8\xa7\xd9\x84\xd9\x8a\xd9\x88\xd9\x85\xd9\x8a \xd9\x88\xd9\x87\xd8\xb0\xd8\xa7 \xd8\xa7\xd9\x85\xd8\xb1 \xd9\x84\xd8\xa7 \xd9\x8a\xd9\x85\xd9\x83\xd9\x86 \xd8\xaa\xd8\xa8\xd8\xb1\xd9\x8a\xd8\xb1\xd9\x87".</p> - -<h4>Farsi / Persian (fa)</h4> -<p>\xd9\x85\xd8\xad\xd9\x85\xd8\xaf \xd8\xa7\xd9\x84\xd8\xa8\xd8\xb1\xd8\xa7\xd8\xaf\xd8\xb9\xdb\x8c \xd8\xb1\xd8\xa6\xd9\x8a\xd8\xb3 \xd8\xa2\xda\x98\xd8\xa7\xd9\x86\xd8\xb3 \xd8\xa8\xd9\x8a\xd9\x86 \xd8\xa7\xd9\x84\xd9\x85\xd9\x84\xd9\x84\xdb\x8c \xd8\xa7\xd9\x86\xd8\xb1\xda\x98\xdb\x8c \xd8\xa7\xd8\xaa\xd9\x85\xdb\x8c \xd9\xbe\xd9\x8a\xd8\xb4\xd9\x86\xd9\x87\xd8\xa7\xd8\xaf \xda\xa9\xd8\xb1\xd8\xaf\xd9\x87 \xd8\xa7\xd8\xb3\xd8\xaa \xd8\xaa\xd9\x87\xd8\xb1\xd8\xa7\xd9\x86 \xd8\xa8\xd8\xb1\xd9\x86\xd8\xa7\xd9\x85\xd9\x87 \xd8\xac\xd9\x86\xd8\xac\xd8\xa7\xd9\x84\xdb\x8c \xd8\xba\xd9\x86\xdb\x8c \xd8\xb3\xd8\xa7\xd8\xb2\xdb\x8c \xd8\xa7\xd9\x88\xd8\xb1\xd8\xa7\xd9\x86\xd9\x8a\xd9\x88\xd9\x85 \xd8\xb1\xd8\xa7 \xd9\x85\xd8\xaa\xd9\x88\xd9\x82\xd9\x81 \xda\xa9\xd9\x86\xd8\xaf \xd9\x88 \xd8\xba\xd8\xb1\xd8\xa8 \xd9\x86\xd9\x8a\xd8\xb2 \xd8\xa7\xd8\xac\xd8\xb1\xd8\xa7\xdb\x8c \xd8\xaa\xd8\xad\xd8\xb1\xd9\x8a\xd9\x85 \xd9\x87\xd8\xa7\xdb\x8c \xd8\xaa\xd9\x86\xd8\xa8\xd9\x8a\xd9\x87\xdb\x8c \xd9\x85\xd9\x88\xd8\xb1\xd8\xaf \xd8\xaa\xd8\xa7\xd8\xa6\xd9\x8a\xd8\xaf \xd8\xb3\xd8\xa7\xd8\xb2\xd9\x85\xd8\xa7\xd9\x86 \xd9\x85\xd9\x84\xd9\x84 \xd9\x85\xd8\xaa\xd8\xad\xd8\xaf \xd8\xb1\xd8\xa7 \xd8\xa8\xd9\x87 \xd8\xaa\xd8\xb9\xd9\x88\xd9\x8a\xd9\x82 \xd8\xa8\xd9\x8a\xd8\xa7\xd9\x86\xd8\xaf\xd8\xa7\xd8\xb2\xd8\xaf.</p> - -<p>\xd8\xac\xd9\x88\xd8\xb1\xd8\xac \xd8\xa8\xd9\x88\xd8\xb4\xd8\x8c \xd8\xaf\xd8\xb1 \xda\x86\xd9\x87\xd8\xa7\xd8\xb1\xd9\x85\xdb\x8c\xd9\x86 \xd8\xb3\xd8\xa7\xd9\x84\xda\xaf\xd8\xb1\xd8\xaf \xd8\xa7\xd8\xb4\xd8\xba\xd8\xa7\xd9\x84 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xd9\x85\xdb\x8c \xda\xaf\xd9\x88\xdb\x8c\xd8\xaf \xd8\xa7\xd8\xb3\xd8\xaa\xd8\xb1\xd8\xa7\xd8\xaa\xda\x98\xdb\x8c \xd8\xa7\xd8\xb3\xd8\xaa\xd9\x82\xd8\xb1\xd8\xa7\xd8\xb1 \xd9\x86\xdb\x8c\xd8\xb1\xd9\x88\xd9\x87\xd8\xa7\xdb\x8c \xd8\xa2\xd9\x85\xd8\xb1\xdb\x8c\xda\xa9\xd8\xa7\xdb\x8c\xdb\x8c \xd8\xa8\xdb\x8c\xd8\xb4\xd8\xaa\xd8\xb1\xdb\x8c \xd8\xaf\xd8\xb1 \xd8\xa8\xd8\xba\xd8\xaf\xd8\xa7\xd8\xaf\xd8\x8c \xd9\x85\xd8\xaf\xd8\xaa\xdb\x8c \xd8\xb7\xd9\x88\xd9\x84 \xd8\xae\xd9\x88\xd8\xa7\xd9\x87\xd8\xaf \xda\xa9\xd8\xb4\xdb\x8c\xd8\xaf.</p> - -<p>\xd8\xa2\xd9\x85\xd8\xb1\xdb\x8c\xda\xa9\xd8\xa7 \xd9\x88\xdb\x8c\xd8\xb2\xd8\xa7\xdb\x8c \xd8\xb1\xd8\xa6\xdb\x8c\xd8\xb3 \xd8\xac\xd9\x85\xd9\x87\xd9\x88\xd8\xb1 \xd8\xa7\xdb\x8c\xd8\xb1\xd8\xa7\xd9\x86 \xd8\xb1\xd8\xa7 \xd8\xa8\xd9\x87 \xd9\x85\xd9\x86\xd8\xb8\xd9\x88\xd8\xb1 \xd8\xad\xd8\xb6\xd9\x88\xd8\xb1 \xd9\x88\xdb\x8c \xd8\xaf\xd8\xb1 \xd8\xac\xd9\x84\xd8\xb3\xd9\x87 \xd8\xb1\xd8\xa7\xdb\x8c \xda\xaf\xdb\x8c\xd8\xb1\xdb\x8c \xd8\xb4\xd9\x88\xd8\xb1\xd8\xa7\xdb\x8c \xd8\xa7\xd9\x85\xd9\x86\xdb\x8c\xd8\xaa \xd8\xa8\xd8\xb1\xd8\xa7\xdb\x8c \xd9\x82\xd8\xb7\xd8\xb9\xd9\x86\xd8\xa7\xd9\x85\xd9\x87 \xd8\xaa\xd8\xa7\xd8\xb2\xd9\x87 \xd8\xb9\xd9\x84\xdb\x8c\xd9\x87 \xd8\xa7\xdb\x8c\xd9\x86 \xda\xa9\xd8\xb4\xd9\x88\xd8\xb1 \xd8\xb5\xd8\xa7\xd8\xaf\xd8\xb1 \xda\xa9\xd8\xb1\xd8\xaf.</p> - - -<h4>Urdu</h4> -<p style=\"font-family: sans;\">\xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xd8\xa7\xd9\x81\xd8\xaa\xd8\xae\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x8c \xd8\xac\xd8\xa8\xd8\xb1\xdb\x8c \xd8\xb1\xd8\xae\xd8\xb5\xd8\xaa \xd9\xbe\xd8\xb1 \xd9\x84\xd8\xa7\xdb\x81\xd9\x88\xd8\xb1\xdb\x81\xd8\xa7\xd8\xa6\xdb\x8c \xda\xa9\xd9\x88\xd8\xb1\xd9\xb9 \xda\xa9\xdb\x92 \xd8\xa7\xdb\x8c\xda\xa9 \xd8\xa7\xd9\x88\xd8\xb1 \xd8\xb3\xd9\x86\xd8\xaf\xda\xbe \xd9\x85\xdb\x8c\xda\xba \xda\xa9\xd8\xa6\xdb\x8c \xd8\xb3\xd9\x88\xd9\x84 \xd8\xac\xd8\xac \xd9\x85\xd8\xb3\xd8\xaa\xd8\xb9\xd9\x81\xdb\x8c \xdb\x81\xd9\x88\xda\xaf\xd8\xa6\xdb\x92 \xdb\x81\xdb\x8c\xda\xba\xdb\x94</p> - -<p style=\"font-family: serif;\">\xda\x86\xdb\x8c\xd9\x81 \xd8\xac\xd8\xb3\xd9\xb9\xd8\xb3 \xda\xa9\xdb\x8c \xd8\xb3\xd8\xb1\xda\xaf\xd8\xb1\xd9\x85\xdb\x8c\xd8\xa7\xda\xba \xd9\x85\xd8\xad\xd8\xaf\xd9\x88\xd8\xaf \xda\xa9\xd8\xb1\xd9\x86\xdb\x92 \xd8\xa7\xd9\x88\xd8\xb1 \xd9\xbe\xd9\x88\xd9\x84\xdb\x8c\xd8\xb3 \xd8\xaa\xd8\xb9\xdb\x8c\xd9\x86\xd8\xa7\xd8\xaa\xdb\x8c \xda\xa9\xdb\x92 \xd8\xad\xda\xa9\xd9\x85 \xd9\x86\xd8\xa7\xd9\x85\xdb\x92 \xd9\xbe\xd8\xb1 \xd8\xaf\xd8\xb3\xd8\xaa\xd8\xae\xd8\xb7 \xda\xa9\xd8\xb1\xda\xa9\xdb\x92 \xd8\xba\xd9\x84\xd8\xb7 \xda\xa9\xdb\x8c\xd8\xa7: \xd8\xac\xd9\x86\xd8\xb1\xd9\x84 \xd9\x85\xd8\xb4\xd8\xb1\xd9\x81</p> - -<h4>Pashto (ps)</h4> -<p style=\"font-family: sans;\">\xd9\xbe\xd9\x87 \xda\xa9\xd8\xa7\xd8\xa8\xd9\x84 \xd8\xa7\xd9\x88 \xda\xa9\xd9\x86\xd8\xaf\xd9\x87\xd8\xa7\xd8\xb1 \xda\xa9\xdb\x90 \xd8\xaf\xd9\x88\xd9\x88 \xda\x81\xd8\xa7\xd9\x86\xd9\x85\xd8\xb1\xda\xaf\xd9\x88 \xd8\xa8\xd8\xb1\xd9\x8a\xd8\xaf\xd9\x88\xd9\x86\xd9\x88 \xd9\x84\xda\x96 \xd8\xaa\xd8\xb1 \xd9\x84\xda\x96\xd9\x87 \xd9\x8a\xd9\x88 \xd9\x85\xd8\xa7\xd8\xb4\xd9\x88\xd9\x85 \xd9\x88\xda\x98\xd9\x84\xd9\x89 \xd8\xa7\xd9\x88 \xd8\xa7\xd8\xaa\xd9\x87 \xd8\xaa\xd9\x86\xd9\x87 \xd9\x86\xd9\x88\xd8\xb1 \xd9\x89\xdb\x90 \xd9\xbc\xd9\xbe\xd9\x8a\xd8\xa7\xd9\x86 \xda\xa9\xda\x93\xd9\x8a.</p> - -<p style=\"font-family: serif;\">\xd9\x87 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82 \xda\xa9\xdb\x90 \xd9\x8a\xd9\x88\xd9\x87 \xd8\xaa\xd8\xa7\xd8\xb2\xd9\x87 \xd9\x86\xd8\xb8\xd8\xb1 \xd8\xb4\xd9\x85\xdb\x90\xd8\xb1\xd9\x86\xd9\x87 \xda\x9a\xd9\x8a\xd9\x8a \xda\x86\xdb\x90 \xd8\xb9\xd8\xb1\xd8\xa7\xd9\x82\xd9\x8a\xd8\xa7\xd9\x86 \xd9\xbe\xd9\x87 \xd8\xb2\xd9\x8a\xd8\xa7\xd8\xaa\xdb\x90\xd8\xaf\xd9\x88\xd9\x86\xda\xa9\xd9\x8a \xd8\xaa\xd9\x88\xda\xaf\xd9\x87 \xd8\xaf \xd8\xad\xd8\xa7\xd9\x84\xd8\xa7\xd8\xaa\xd9\x88 \xd9\xbe\xd9\x87 \xd8\xa7\xda\x93\xd9\x87 \xd8\xa8\xd8\xaf\xd8\xa8\xd9\x8a\xd9\x86\xd9\x87 \xd8\xaf\xd9\x8a \xd8\xa7\xd9\x88 \xd8\xaf \xd8\xa8\xdb\x90 \xd8\xa8\xd8\xa7\xd9\x88\xd8\xb1\xd9\x8a \xd8\xa7\xd8\xad\xd8\xb3\xd8\xa7\xd8\xb3 \xda\xa9\xd9\x88\xd9\x8a\xd8\x8c \xd8\xae\xd9\x88 \xd8\xae\xd9\xbe\xd9\x84 \xd9\x87\xd9\x8a\xd9\x88\xd8\xa7\xd8\xaf \xd9\x8a\xd9\x88\xd9\x85\xd9\x88\xd9\xbc\xd9\x89 \xd8\xba\xd9\x88\xd8\xa7\xda\x93\xd9\x8a.</p> -"; -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('ar'); - -$mpdf->SetDirectionality('rtl'); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; - -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example32_indic.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example32_indic.php deleted file mode 100644 index 9bfdee78ca925e8941c69f272a4734bb6396a605..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example32_indic.php +++ /dev/null @@ -1,219 +0,0 @@ -<?php - - -$html = " -<style> -body, p { font-size: 15pt;} -h3 { font-size: 15pt; margin-bottom:0; } -</style> - -<h1> Indic Fonts and Languages</h1> - -<h3 style=\"font-family: sans;\"> -Malayalam -</h3> -<p style=\"font-family:ind_ml_1_001\">സംസ്ഥാനത്ത് രാഷ്ട്രീയ പുകമറ സൃഷ്ടിക്കാനാണ് വോട്ടര്‍പട്ടിക വിവാദത്തിലൂടെ കോണ്‍ഗ്രസ് ശ്രമിക്കുന്നതെന്ന് സിപി‌എം സംസ്ഥാന സെക്രട്ടറി പിണറായി വിജയന്‍ കുറ്റപ്പെടുത്തി. ഉദ്യോഗസ്ഥരെ ഭീഷണിപ്പെടുത്തി വരുതിയില്‍ നിര്‍ത്താനാണ് വയലാര്‍ രവി ഉള്‍പ്പെടെയുള്ളവര്‍ ശ്രമിക്കുന്നതെന്നും പിണറാ‍യി പ്രസ്താവനയില്‍ ആരോപിച്ചു. -<br /> - -വയലാര്‍ രവിക്കെതിരെ ഇതിന് നടപടി സ്വീകരിക്കണമെന്നും പിണറായി ആവശ്യപ്പെട്ടു. അക്രമപ്രവര്‍ത്തനങ്ങളെ പ്രോത്സാഹിപ്പിക്കുന്നതാണ് രവിയുടെ വാക്കുകള്‍. അധികാരത്തിന്‍റെ മത്ത് തലയ്ക്ക് പിടിച്ചിരിക്കുന്നത് കൊണ്ടാണ് കോണ്‍ഗ്രസുകാര്‍ ഇങ്ങനെ പെരുമാറുന്നതെന്നും പിണറായി ചൂണ്ടിക്കാട്ടി. -<br /> - -സ്വതന്ത്രമായി നടക്കുന്ന കണ്ണൂരിലെ തെരഞ്ഞെടുപ്പിനെ അട്ടിമറിക്കാനാണ് യു‌ഡി‌എഫ് ശ്രമിക്കുന്നതെന്നും പിണറായി ആരോപിച്ചു. -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -൦൧൨൩൪൫൬൭൮൯ -</p> - -<h3 style=\"font-family:sans\">Kannada</h3> -<p style=\"font-family:ind_kn_1_001\"> -ತಮ್ಮದೇ ಕುಟುಂಬದ ಯುವತಿಯೊಬ್ಬಳನ್ನು ಸತತ ಹಲವಾರು ವರ್ಷ ಭೋಗಿಸಿದ ಭಾರತೀಯ ಮೂಲದ ಮೂವರು ದುರುಳ ಸಂಬಂಧಿಕರು ಅಪರಾಧಿಗಳೆಂದು ಸಾಬೀತಾಗಿದ್ದು, ಇಂಗ್ಲೆಂಡ್ ನ್ಯಾಯಾಲಯವು ದೀರ್ಘಾವಧಿ ಕಠಿಣ ಶಿಕ್ಷೆ ವಿಧಿಸಿದೆ. -<br /> - -27ರ ಹರೆಯದ ಯುವತಿಯನ್ನು ಆಕೆಯ ಮಲತಂದೆ, ಮಲದೊಡ್ಡಪ್ಪ ಮತ್ತು ಭಾವ ಅತ್ಯಾಚಾರ ನಡೆಸಿದ್ದು ಕಾರ್ಡಿಫ್ ಕ್ರೌನ್ ನ್ಯಾಯಾಲಯದಲ್ಲಿ ರುಜುವಾತಾದ ಕಾರಣ ಶಿಕ್ಷೆ ಘೋಷಿಸಲಾಗಿದೆ. ಅಪರಾಧಿಗಳಲ್ಲಿ ಮಲತಂದೆ ಮತ್ತು ಮಲದೊಡ್ಡಪ್ಪ ಅಕ್ರಮ ವಲಸಿಗರಾಗಿದ್ದು, ಶಿಕ್ಷೆಯ ಅವಧಿ ಮುಗಿದ ನಂತರ ಅವರನ್ನು ಭಾರತಕ್ಕೆ ಗಡಿಪಾರು ಮಾಡಲಾಗುತ್ತದೆ. -<br /> - -55ರ ಹರೆಯದ ಮಲದೊಡ್ಡಪ್ಪ ಮತ್ತು 50ರ ಹರೆಯದ ಮಲತಂದೆಗೆ ಕ್ರಮವಾಗಿ 20 ಮತ್ತು 15 ವರ್ಷಗಳ ಕಾಲ ಜೈಲು ಶಿಕ್ಷೆ ವಿಧಿಸಲಾಗಿದೆ. 27ರ ಹರೆಯದ ಆಕೆಯ ಭಾವನಿಗೆ 12 ವರ್ಷಗಳ ದಂಡನೆ ನೀಡಲಾಗಿದೆ. -<br /> - -ಬಾಲಕಿಯನ್ನೇ ಅತ್ಯಾಚಾರ ಮಾಡಿದ್ದರು.. -ಯುವತಿಗೆ 14 ವರ್ಷವಿದ್ದಾಗ ಆಕೆಯ ಗರ್ಭಕ್ಕೆ ತಾನೇ ಕಾರಣವಾಗಿರುವುದನ್ನೂ ಮಲ ದೊಡ್ಡಪ್ಪ ವಿಚಾರಣೆ ಅವಧಿಯಲ್ಲಿ ಒಪ್ಪಿಕೊಂಡಿದ್ದಾನೆ. ಆತ ಏಳು ಬಾರಿ ಆಕೆಯನ್ನು ಅತ್ಯಾಚಾರ ಮಾಡಿದ್ದು, ಮೂರು ಬಾರಿ ಮಗುವಾಗಿದ್ದಾಗ ಅನುಚಿತ ವರ್ತನೆ ತೋರಿಸಿದ್ದ. ಅಲ್ಲದೆ ಹಲ್ಲೆ ಕೂಡ ನಡೆಸಿದ್ದ ಎಂದು ನ್ಯಾಯಾಲಯ ವಿವರಣೆ ನೀಡಿದೆ. -<br /> - -ಯುವತಿಗೆ ಆಕೆ ಬಾಲಕಿಯಾಗಿದ್ದಾಗಲೇ ಇವರು ಲೈಂಗಿಕ ಹಿಂಸೆ ನೀಡಲು ಆರಂಭಿಸಿದ್ದನ್ನು ನ್ಯಾಯಾಲಯ ಹೊರಗೆಳೆದಿತ್ತು. ಆಕೆ ಐದರ ಹರೆಯದ ಬಾಲಕಿಯಾಗಿದ್ದಾಗ ಮಲದೊಡ್ಡಪ್ಪ ಅತ್ಯಾಚಾರ ಮಾಡಿದ್ದ. 14ನೇ ವರ್ಷದಲ್ಲಿ ಆಕೆ ಗರ್ಭಿಣಿಯಾಗಿದ್ದಳು. ಆ ಸಂದರ್ಭದಲ್ಲಿ ಆಕೆಯನ್ನು ಕೂಡಿ ಹಾಕಿದ್ದ ಕಾರಣ ಮನೆಗೆ ಭೇಟಿ ನೀಡುವವರಿಗೆ ಯಾವುದೇ ವಿಚಾರಗಳು ತಿಳಿಯುತ್ತಿರಲಿಲ್ಲ. -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -೦೧೨೩೪೫೬೭೮೯ -</p> - -<h3 style=\"font-family:ind_te_1_001\">Telegu</h3> -<p style=\"font-family:ind_te_1_001\">ఆగ్నేయ ఇరాన్‌లో ఆదివారం నాడు ఓ ఆత్మాహుతి దాడి జరగడంతో ఇరవై మంది మృతి చెందారు. -<br /> - -ఆగ్నేయ ఇరాన్‌లో ఆత్మాహుతి దాడి జరగడంతో ఐదుగురు ఎలిట్ రెవల్యూషనరీ గార్డ్‌లతో సహా ప్రముఖ కమాండర్‌లతోసహా మొత్తం ఇరవై మంది మృతి చెందినట్లు ఇరాన్ లోక్‌సభ స్పీకర్ అలీ లారిజానీ తెలిపారు. -<br /> - -ఆదివారం జరిగిన దాడుల్లో భద్రతాదళాలకు చెందిన కమాండర్ జనరల్ నూర్ అలీ శుశాత్రీ, మరో కమాండర్ రజబ్ అలీ మొహమ్మద్‌ జాదేహ్ తదితరులున్నారని, వీరితోపాటు పలువురు తీవ్రగాయాలపాలైనారని ఆయన చెప్పారు. -<br /> - -మృతి చెందిన కమాండర్లు పాకిస్థాన్‌ సరిహద్దుల్లోనున్న పిశిన్ ప్రాంతంలో ఓ సమావేశంలో పాల్గొనేందుకు కారులో బయలు దేరి వెళ్ళారని, ఆ సమయంలో ఆత్మాహుతి దళానికి చెందిన సభ్యుడు తనను తాను పేల్చేసుకోవడంతో ఈ దుర్ఘటన జరిగిందని ఆయన వివరించారు. -<br /> - -ఇదిలావుండగా ఇప్పటివరకు ఈ దాడులకు బాధ్యత వహిస్తూ ఏ సంస్థ ప్రకటించలేదు. కాని ఈ దుర్ఘటన వెనుక సున్నీ ఉగ్రవాద సంస్థ జుందల్లా హస్తం ఉండొచ్చని, ఈ సంస్థ ఆగ్నేయ ఇరాన్‌లో రెవల్యూషనరీ గార్డ్, షియాలపై దాడులు చేసేందుకు పూనుకునుంటుందని భద్రతా దళాలు అనుమానం వ్యక్తం చేసాయి. -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -౦౧౨౩౪౫౬౭౮౯ -</p> - - - -<h3 style=\"font-family:ind_ta_1_001\">Tamil (ta)</h3> -<p lang=\"ta\">\xe0\xae\x87\xe0\xae\xb0\xe0\xae\xbe\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xaf \xe0\xae\xae\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x8d \xe0\xae\x85\xe0\xae\xb5\xe0\xae\xa8\xe0\xae\xae\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xaf\x88\xe0\xae\xaf\xe0\xaf\x81\xe0\xae\x9f\xe0\xae\xa9\xe0\xaf\x8d \xe0\xae\x87\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xa4\xe0\xae\xbe\xe0\xae\x95\xe0\xae\xb5\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d, \xe0\xae\xb7\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbe \xe0\xae\xae\xe0\xae\xb1\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d \xe0\xae\x9a\xe0\xaf\x81\xe0\xae\xa9\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x8d \xe0\xae\xae\xe0\xaf\x81\xe0\xae\xb0\xe0\xae\xa3\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\x9f\xe0\xaf\x8d\xe0\xae\x9f \xe0\xae\x95\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x81\xe0\xae\x9f\xe0\xae\xa9\xe0\xaf\x8d \xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xb5\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\x9f\xe0\xaf\x8d\xe0\xae\x9f \xe0\xae\xa8\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x88\xe0\xae\xaf\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x8d \xe0\xae\x87\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xa4\xe0\xae\xbe\xe0\xae\x95\xe0\xae\xb5\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d \xe0\xae\x95\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\x95\xe0\xaf\x8d \xe0\xae\x95\xe0\xae\xa3\xe0\xae\xbf\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xaf\x81 \xe0\xae\x92\xe0\xae\xa9\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81 \xe0\xae\x95\xe0\xaf\x82\xe0\xae\xb1\xe0\xaf\x81\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xb1\xe0\xae\xa4\xe0\xaf\x81.</p> - -<p style=\"font-family:ind_ta_1_001\">\xe0\xae\x87\xe0\xae\xb2\xe0\xae\x99\xe0\xaf\x8d\xe0\xae\x95\xe0\xaf\x88 \xe0\xae\xb5\xe0\xaf\x86\xe0\xae\xb3\xe0\xae\xbf\xe0\xae\xaf\xe0\xaf\x81\xe0\xae\xb1\xe0\xae\xb5\xe0\xaf\x81 \xe0\xae\x85\xe0\xae\xae\xe0\xaf\x88\xe0\xae\x9a\xe0\xaf\x8d\xe0\xae\x9a\xe0\xae\xb0\xe0\xaf\x8d \xe0\xae\xb0\xe0\xaf\x8b\xe0\xae\xb9\xe0\xae\xbf\xe0\xae\xa4 \xe0\xae\xaa\xe0\xaf\x8b\xe0\xae\x95\xe0\xaf\x8a\xe0\xae\xb2\xe0\xaf\x8d\xe0\xae\xb2\xe0\xae\xbe\xe0\xae\x95\xe0\xae\xae \xe0\xae\x85\xe0\xae\xb5\xe0\xae\xb0\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x8d, \xe0\xae\x87\xe0\xae\xa9\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81 \xe0\xae\xaa\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\x9f\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x8d\xe0\xae\xb2\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x8d \xe0\xae\x87\xe0\xae\xa8\xe0\xaf\x8d\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\xaf \xe0\xae\xb5\xe0\xaf\x86\xe0\xae\xb3\xe0\xae\xbf\xe0\xae\xaf\xe0\xaf\x81\xe0\xae\xb1\xe0\xae\xb5\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xb1\xe0\xaf\x88 \xe0\xae\x85\xe0\xae\xae\xe0\xaf\x88\xe0\xae\x9a\xe0\xaf\x8d\xe0\xae\x9a\xe0\xae\xb0\xe0\xaf\x8d \xe0\xae\xaa\xe0\xae\xbf\xe0\xae\xb0\xe0\xae\xa3\xe0\xae\xbe\xe0\xae\xaa\xe0\xaf\x8d \xe0\xae\xae\xe0\xaf\x81\xe0\xae\x95\xe0\xae\xb0\xe0\xaf\x8d\xe0\xae\x9c\xe0\xae\xbf \xe0\xae\x89\xe0\xae\xb3\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\x9f \xe0\xae\xae\xe0\xaf\x81\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xa4\xe0\xaf\x8d \xe0\xae\xa4\xe0\xae\xb2\xe0\xaf\x88\xe0\xae\xb5\xe0\xae\xb0\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x88\xe0\xae\x9a\xe0\xaf\x8d \xe0\xae\x9a\xe0\xae\xa8\xe0\xaf\x8d\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xaa\xe0\xaf\x8d \xe0\xae\xaa\xe0\xaf\x87\xe0\xae\x9a\xe0\xaf\x8d\xe0\xae\x9a\xe0\xaf\x81 \xe0\xae\xa8\xe0\xae\x9f\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\xaf\xe0\xaf\x81\xe0\xae\xb3\xe0\xaf\x8d\xe0\xae\xb3\xe0\xae\xbe\xe0\xae\xb0\xe0\xaf\x8d.</p> - -<p style=\"font-family:ind_ta_1_001\">\xe0\xae\x87\xe0\xae\xb0\xe0\xae\xbe\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x8d \xe0\xae\x85\xe0\xae\xae\xe0\xaf\x86\xe0\xae\xb0\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95 \xe0\xae\xae\xe0\xae\xb1\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81\xe0\xae\xae\xe0\xaf\x8d \xe0\xae\xaa\xe0\xae\xbf\xe0\xae\xb0\xe0\xae\xbf\xe0\xae\x9f\xe0\xaf\x8d\xe0\xae\x9f\xe0\xae\xbf\xe0\xae\xb7\xe0\xaf\x8d \xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xaf\x81\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x88\xe0\xae\x95\xe0\xaf\x8d \xe0\xae\x95\xe0\xaf\x8a\xe0\xae\xa9\xe0\xaf\x8d\xe0\xae\xb1 \xe0\xae\xb5\xe0\xaf\x86\xe0\xae\x9f\xe0\xae\xbf\xe0\xae\xae\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xa8\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x8d \xe0\xae\xa4\xe0\xaf\x8a\xe0\xae\xb4\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x8d \xe0\xae\xa8\xe0\xaf\x81\xe0\xae\x9f\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\xae\xe0\xaf\x8d \xe0\xae\x89\xe0\xae\x9f\xe0\xaf\x8d\xe0\xae\xaa\xe0\xae\x9f \xe0\xae\xaa\xe0\xae\xb2\xe0\xaf\x8d\xe0\xae\xb5\xe0\xaf\x87\xe0\xae\xb1\xe0\xaf\x81 \xe0\xae\x89\xe0\xae\xa4\xe0\xae\xb5\xe0\xae\xbf\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x88 \xe0\xae\x87\xe0\xae\xb0\xe0\xae\xbe\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xb2\xe0\xaf\x8d \xe0\xae\x89\xe0\xae\xb3\xe0\xaf\x8d\xe0\xae\xb3 \xe0\xae\xa4\xe0\xaf\x80\xe0\xae\xb5\xe0\xae\xbf\xe0\xae\xb0\xe0\xae\xb5\xe0\xae\xbe\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x81\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xaf\x81 \xe0\xae\x87\xe0\xae\xb0\xe0\xae\xbe\xe0\xae\xa9\xe0\xaf\x8d \xe0\xae\xb5\xe0\xae\xb4\xe0\xae\x99\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xa4\xe0\xae\xb1\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbe\xe0\xae\xa9 \xe0\xae\x86\xe0\xae\xa4\xe0\xae\xbe\xe0\xae\xb0\xe0\xae\x99\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb3\xe0\xaf\x8d \xe0\xae\x85\xe0\xae\xa4\xe0\xae\xbf\xe0\xae\x95\xe0\xae\xb0\xe0\xae\xbf\xe0\xae\xa4\xe0\xaf\x8d\xe0\xae\xa4\xe0\xaf\x81 \xe0\xae\xb5\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\xb5\xe0\xae\xa4\xe0\xaf\x88 \xe0\xae\x85\xe0\xae\xae\xe0\xaf\x86\xe0\xae\xb0\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbe \xe0\xae\x95\xe0\xae\xb5\xe0\xae\xa9\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xb1\xe0\xae\xa4\xe0\xaf\x81 \xe0\xae\x8e\xe0\xae\xa9\xe0\xaf\x8d\xe0\xae\xb1\xe0\xaf\x81 \xe0\xae\x85\xe0\xae\xae\xe0\xaf\x86\xe0\xae\xb0\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95 \xe0\xae\x85\xe0\xae\xb0\xe0\xae\x9a\xe0\xaf\x81\xe0\xae\xa4\xe0\xaf\x8d \xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xb1\xe0\xaf\x88\xe0\xae\xa4\xe0\xaf\x8d \xe0\xae\xa4\xe0\xaf\x81\xe0\xae\xa3\xe0\xaf\x88\xe0\xae\x9a\xe0\xaf\x8d \xe0\xae\x9a\xe0\xaf\x86\xe0\xae\xaf\xe0\xae\xb2\xe0\xae\xb0\xe0\xaf\x8d \xe0\xae\xa8\xe0\xae\xbf\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xb2\xe0\xae\xb8\xe0\xaf\x8d \xe0\xae\xaa\xe0\xaf\x87\xe0\xae\xb0\xe0\xaf\x8d\xe0\xae\xa3\xe0\xaf\x8d\xe0\xae\xb8\xe0\xaf\x8d \xe0\xae\x95\xe0\xaf\x82\xe0\xae\xb1\xe0\xae\xbf\xe0\xae\xaf\xe0\xae\xbf\xe0\xae\xb0\xe0\xaf\x81\xe0\xae\x95\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xbf\xe0\xae\xb1\xe0\xae\xbe\xe0\xae\xb0\xe0\xaf\x8d. -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -௦௧௨௩௪௫௬௭௮௯ -</p> - - -<h3 style=\"font-family:ind_or_1_001\">Oriya</h3> -<p style=\"font-family:ind_or_1_001\">ଓଡ଼ିଆ ଉଇକିପେଡିଆ ଆପଣଙ୍କୁ ସ୍ବାଗତ କରୁଛି। ଏହି ଉନ୍ମୁକ୍ତ ଜ୍ଞାନକୋଷଟି ଇଣ୍ଟରନେଟ ଉପରେ ଆଧାରିତ ଏବଂ ଏହା ବିଶ୍ବର ୫୦ଟି ଭାଷାରେ ଉପଲବ୍ଧ । ଏହାକୁ ଆପଣ ମଧ୍ୟ ବର୍ଦ୍ଧିତ ଓ ପରିବର୍ତିତ କରିପାରିବେ ଏବଂ ଏହାକୁ ଉନ୍ନତ କରିବା ପାଇଁ ନିଜର ଅବଦାନ ଦେଇ ପାରିବେ । ଆପଣଙ୍କ ପସନ୍ଦର ବିଷୟ ଗୁଡିକୁ ଆପଣ ନୂତନ ଭାବେରେ ଯୋଗ କରିପାରିବେ କିମ୍ବା ଏହି ପୃଷ୍ଠାକୁ ସମ୍ପାଦନ କରି ଏହା ସହିତ ଯୋଗ କରିପାରିବ । ସମସ୍ତ ପାଠ ଗୁଡିକ GNU ମୁକ୍ତ ଦଲିଲକରଣ ଲାଇସେନ୍ସର ସର୍ତ୍ତ ଅଧୀନରେ ଉପଲବ୍ଧ । ତଥାପି, ଆପଣ ଏହାକୁ ମୁକ୍ତ ଭାବେର ଇଲେକ୍ଟ୍ରୋନିକ୍ସ ପ୍ରିଣ୍ଟ୍ କିମ୍ବା ଅନ୍ୟାନ୍ୟ ପ୍ରିଣ୍ଟର ମାଧ୍ୟମରେ ବ୍ୟବହାର କରିପାରିବ । -<br /> - -ଓଡ଼ିଆ ଉଇକିପେଡିଆରେ ଏ ପର୍ଯ୍ୟନ୍ତ ୫୫୩ଟି ପ୍ରସଙ୍ଗ ଯୋଗ କରାଯାଇଛି। -<br /> - -ଉଇକିପେଡିଆର ଓଡ଼ିଆ ସଂସ୍କରଣର କାର୍ଯ୍ୟ ପ୍ରଥମ ଥର ପାଇଁ ୨୦୦୪ ମସିହାରେ ପ୍ରାରମ୍ଭ ହୋଇଥିଲା ଏହା ଏବେ ମଧ୍ୟ ନିର୍ମାଣଧୀନ । ଆମେ ଏହା ଆଶା କରୁଛୁ ଯେ ବ୍ୟବାହାରକାରୀ ମାନେ ଏହାକୁ ସମୃଦ୍ଧ କରିପାରିବେ । ଓଡ଼ିଆ ଉଇକିପେଡିଆରେ ଆପଣ କିଛି ଯୋଗ କିମ୍ବା ସମ୍ପାଦନା କରିବା ପାଇଁ ଚାହିଁଲେ, ସର୍ବ ପ୍ରଥମେ ଆପଣଙ୍କ ନିକଟରେ ଗୋଟିଏ ୟୁନିକୋଡ୍ ଭିତ୍ତିକ ଓଡ଼ିଆ ଅନ୍ତରା ପୃଷ୍ଠ ଥିବା ଉଚିତ୍ । ଏହା ମୁକ୍ତ ସଙ୍କେତ ହୋଇଥିବାରୁ ଏହାକୁ ଆପଣ ଇଣ୍ଟରନେଟରୁ ମାଗଣାରେ ପାଇପାରିବେ । ଆପଣ ଇଂରାଜୀ ଉଇକିପେଡିଆକୁ ଅନୁବାଦ କରି କିମ୍ବା ନିକଟ ଅତୀତରେ ହୋଇଥିବା ଗୁରୁତ୍ଵପୂର୍ଣ୍ଣ ଘଟଣା ମାନଙ୍କୁ ଯୋଗ କରି, ଓଡ଼ିଆ ୱିକିପେଡିଆକୁ ସମୃଦ୍ଧ କରିପାରିବ । କୌଣସି ନୂତନ ପାଠ୍ୟ ଯୋଗ କରିବା ପୂର୍ବରୁ ଆପଣଙ୍କୁ ଏହା ଧ୍ୟାନ ରଖିବା ପାଇଁ ହେବ ଯେ, ଏହି ପୃଷ୍ଠାରେ ଅନ୍ୟ ବ୍ୟବାହାରକାରୀ ମାନଙ୍କ ପାଇଁ ସମ୍ପାଦନର ସୁଯୋଗ ରହିବା ଉଚିତ । କୌଣସି ବିଷୟବସ୍ତୁର ସ୍ବତଃ ସଂରକ୍ଷଣ ଉଇକିପେଡିଆର ନିୟମକୁ ଅବମାନନା କରିଥାଏ । ବ୍ୟବାହାରକାରୀ ମାନେ କେବଳ ତାଙ୍କର ନିଜ ଲେଖାକୁ ସମ୍ପାଦନ କରିପାରିବେ । ଉଇକିପେଡିଆର ନିୟମ, କର୍ମ ପଦ୍ଧତି ଏବଂ ଅନ୍ୟାନ୍ୟ ସୂଚନା ପାଇଁ Wikipedia:ଆଲୋଚନା ସଭା-- କୁ ଯାଇ ଆଲୋଚନା କରନ୍ତୁ। -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -୦୧୨୩୪୫୬୭୮୯ -</p> - -<h3 style=\"font-family:ind_pa_1_001\">Punjabi</h3> -<p style=\"font-family:ind_pa_1_001\">ਕੇਂਦਰੀ ਗ੍ਰਹਿਮੰਤਰੀ ਪੀ.ਚਿਦੰਬਰਮ ਨੇ ਐਤਵਾਰ ਨੂੰ ਤਮਿਲਨਾਢੂ ਦੇ ਮੁੱਖਮੰਤਰੀ ਐਮ.ਕਰੁਣਾਨਿਧੀ ਨਾਲ ਮੁਲਾਕਾਤ ਕੀਤੀ।ਉਨ੍ਹਾ ਨੇ ਸ਼੍ਰੀਲੰਕਾ 'ਚ ਲਿੱਟੇ ਦੇ ਖਿਲਾਫ਼ ਯੁੱਧ ਦੌਰਾਨ ਉੱਝੜੇ ਹੋਏ ਲੱਗਭਗ ਢਾਈ ਲੱਖ ਤਮਿਲਾਂ ਦੀ ਮੁੜ ਰਿਹਾਇਸ਼ 'ਤੇ ਚਰਚਾ ਕੀਤੀ। -<br /> - -ਦ੍ਰਮੁਕ ਨੇਤਾ ਦੇ ਨਾਲ ਸੰਖੇਪ ਮੁਲਾਕਾਤ ਬਾਅਦ ਚਿਦੰਬਰਮ ਨੇ ਕਿਹਾ ਹੈ ਕਿ ਕੇਂਦਰ ਤਮਿਲਾਂ ਦੀ ਮੁੜ ਰਿਹਾਇਸ਼ ਲਈ ਜਰੂਰਤ ਪੈਣ 'ਤੇ ਸ਼੍ਰੀਲੰਕਾ ਨੂੰ ਹੋਰ ਜ਼ਿਆਦਾ ਧਨ ਦੇਵੇਗਾ।ਅਸੀਂ ਪਹਿਲਾ ਹੀ 500 ਕਰੋੜ ਰੁੱਪਏ ਦੇ ਚੁੱਕੇ ਹਾਂ। -<br /> - -ਚਿਦੰਬਰਮ ਨੇ ਕਿਹਾ ਹੈ ਕਿ ਕਰੁਣਾਨਿਧੀ ਦੇ ਨਾਲ ਉਨ੍ਹਾ ਦੀ ਚਰਚਾ ਪਿੱਛਲੇ ਹਫ਼ਤੇ ਦਸ ਸਾਂਸਦਾਂ ਦੇ ਪ੍ਰਤਿਨਿਧੀਮੰਡਲ ਦੇ ਸ਼੍ਰੀਲੰਕਾ ਦੌਰੇ 'ਤੇ ਕੇਂਦਰਤ ਸੀ,ਜੋ ਜਾਤੀ ਤਮਿਲਾ ਨੂੰ ਮਿਲੀ ਅਤੇ ਉਨ੍ਹਾ ਦੀ ਦਸ਼ਾ ਬਾਰੇ ਜਾਣਿਆ। -<br /> - -ਉਨ੍ਹਾ ਨੇ ਕਿਹਾ ਕਿ ਸ਼੍ਰੀਲਕਾ ਦੇ ਤਮਿਲਾਂ ਨੂੰ ਉਨ੍ਹਾ ਦੇ ਮੂਲ ਸਥਾਨਾਂ 'ਤੇ ਬਸਾਉਣ ਦੇ ਤੌਰ ਤਰੀਕਿਆਂ 'ਤੇ ਚਰਚਾ ਹੋਈ ਅਤੇ ਸਾਂਸਦਾ ਦੀ ਟੀਮ ਨੂੰ ਦਿੱਤੇ ਭਰੋਸੇ ਬਾਅਦ ਕੋਲੰਬੋ ਦੁਆਰਾ ਪਿੱਛਲੇ ਹਫ਼ਤੇ ਮੁੜ ਰਿਹਾਇਸ਼ ਪ੍ਰਕ੍ਰਿਆ ਸ਼ੁਰੂ ਕੀਤੇ ਜਾਣ ਬਾਅਦ ਤੋਂ ਲੱਗਭਗ ਪੰਜ ਹਜ਼ਾਰ ਲੋਕਾਂ ਨੂੰ ਉਨ੍ਹਾ ਦੇ ਘਰਾਂ ਨੂੰ ਵਾਪਸ ਭੇਜਿਆ ਜਾ ਚੁੱਕਿਆ ਹੈ।ਚਿਦੰਬਰਮ ਨੇ ਕਿਹਾ ਹੈ ਕਿ ਹਾਲਾਂਕਿ ਪ੍ਰਕ੍ਰਿਆ ਧੀਮੀ ਹੈ,ਲੇਕਿਨ ਗਤੀ ਪਕੜ ਲਵੇਗੀ। -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -੦੧੨੩੪੫੬੭੮੯ - -</p> - -<h3 style=\"font-family:ind_gu_1_001\">Gujarati (gu)</h3> -<p style=\"font-family:ind_gu_1_001\">Examples at: http://in.gujarati.yahoo.com/</p> -<p style=\"font-family:ind_gu_1_001\">http://gujarati.webdunia.com/entertainment/bollywood/filmreview/0910/17/1091017017_1.htm</p> -<p style=\"font-family:ind_gu_1_001\"> -આ વાત હજાર વાર કહેવામાં આવી છે કે ફિલ્મ બનાવતી વખેત હંમેશા સૌથી વધુ ધ્યાન વાર્તા અને સ્ક્રીનપ્લે પર આપવુ જોઈએ. કારણ કે આ કોઈ પણ ફિલ્મની સફળતાનો મુખ્ય આધાર હોય છે. -<br /> -મોટા ફિલ્મ સ્ટાર્સ સાઈન કરવાથી, સ્ટંટ અને ગીતોથી પાણીની અંદર કે આકાશમાં કરોડો રૂપિયા ખર્ચ કરી ફિલ્માવેલા દ્રશ્યોથી કશુ જ નથી થતુ. પરંતુ આ બુનિયાદી વાત અત્યાર સુધી કોઈ લોકોને સમજાતી નથી. -<br /> - -કરોડો રૂપિયાના ખર્ચ પર બનાવેલ 'બ્લૂ' આનુ તાજુ ઉદાહરણ છે. પૈસા એના પર ખર્ચ કરવામાં આવે જ્યા બચાવી શકાતો હતો અને ત્યાં બચાવ્યો જ્યા ખર્ચ કરવો જોઈતો હતો. એક સારી વાર્તા તેની સાથે સંકળાયેલા નિર્માતા-નિર્દેશક ન શોધી શક્યા. -<br /> - -વર્ષો પહેલા ખજાનાથી લદાયેલુ એક જહાજ ડૂબી ગયુ હતુ. આરવ (અક્ષય કુમાર)તેને શોધીને શ્રીમંત બનવા માંગે છે. આ કામમાં તેને સાગર (સંજય દત્ત)ની મદદ જોઈએ, જે તેને માતે કામ કરે છે. સાગર એ માટે તૈયાર નથી. બાળપણમાં સાગર અને તેના પિતાએ એ ડૂબેલા જહાજને શોધી લીધુ હતુ, પરંતુ સાગરની ભૂલથી તેના પિતાનુ મૃત્યુ થઈ ગયુ હતુ. સાગર એ આધાતથી બહાર ન આવી શક્યો. સાગરનો એક ભાઈ સૈમ(જાયદ ખાન) છે, જેને રિસ્ક લેવાનો નશો છે. ગેરકાયદેસર કામ દરમિયાન એ ફંસાય જાય છે અને કેટલાક લોકો તેના જીવના દુશ્મન બની જાય છે. તેઓ તેની પાસે પૈસા માંગે છે. પોતાના ભાઈને મુસીબતમાં જોઈએ આરવની વાત સાગર માની લે છે અને તે એ છુપા ખજાનાને શોધવા નીકળે છે. છેવટે એ રહસ્ય બહાર પડે છે કે સૈમને ફસાવવા પાછળ આરવનો જ હાથ હતો, જેથી સાગર ખજાનાની શોધ કાઢવામાં તેની મદદ કરે. -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -૦૧૨૩૪૫૬૭૮૯ -</p> - - -<h3 style=\"font-family:ind_hi_1_001\">Hindi (hi)</h3> -<p style=\"font-family:ind_hi_1_001\">\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4 \xe0\xa4\x94\xe0\xa4\xb0 \xe0\xa4\xac\xe0\xa4\xb0\xe0\xa4\xae\xe0\xa5\x82\xe0\xa4\xa1\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xac\xe0\xa5\x80\xe0\xa4\x9a \xe0\xa4\xac\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xb6 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa3 \xe0\xa4\xb0\xe0\xa5\x81\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa5\x88\xe0\xa4\x9a \xe0\xa4\xa6\xe0\xa5\x8b\xe0\xa4\xac\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xbe \xe0\xa4\xb6\xe0\xa5\x81\xe0\xa4\xb0\xe0\xa5\x81 \xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x88. \xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\xa4 \xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xac\xe0\xa4\xb0\xe0\xa4\xae\xe0\xa5\x82\xe0\xa4\xa1\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb8\xe0\xa4\xbe\xe0\xa4\xae\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x89\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa1 414 \xe0\xa4\xb0\xe0\xa4\xa8\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb2\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7\xe0\xa5\x8d\xe0\xa4\xaf \xe0\xa4\xb0\xe0\xa4\x96\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x88. \xe0\xa4\xac\xe0\xa4\xb0\xe0\xa4\xae\xe0\xa5\x82\xe0\xa4\xa1\xe0\xa4\xbe \xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xa6\xe0\xa5\x8b \xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa5\x87\xe0\xa4\x9f \xe0\xa4\x96\xe0\xa5\x8b \xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\xb9\xe0\xa5\x88\xe0\xa4\x82.</p> - -<p style=\"font-family:ind_hi_1_001\">\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\x95\xe0\xa4\xbf\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xb8\xe0\xa5\x81\xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa5\x80\xe0\xa4\xae \xe0\xa4\x95\xe0\xa5\x8b\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x9f \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xae\xe0\xa5\x81\xe0\xa4\x96\xe0\xa5\x8d\xe0\xa4\xaf \xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xa7\xe0\xa5\x80\xe0\xa4\xb6 \xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb2\xe0\xa4\x82\xe0\xa4\xac\xe0\xa4\xbf\xe0\xa4\xa4 \xe0\xa4\x95\xe0\xa4\xbf\xe0\xa4\x8f \xe0\xa4\x9c\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa4\x88 \xe0\xa4\x9c\xe0\xa4\x9c\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\x85\xe0\xa4\xaa\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xaa\xe0\xa4\xa6 \xe0\xa4\xb8\xe0\xa5\x87 \xe0\xa4\x87\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa5\x80\xe0\xa4\xab\xe0\xa4\xbc\xe0\xa4\xbe \xe0\xa4\xa6\xe0\xa5\x87 \xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xaf\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x88.</p> - -<p style=\"font-family:ind_hi_1_001\">\xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\x98\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\x9a\xe0\xa4\xb2 \xe0\xa4\xaa\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xa4 \xe0\xa4\xae\xe0\xa4\xa7\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xb0\xe0\xa4\xbe\xe0\xa4\xa4\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\xbf \xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xa1\xe0\xa4\xbc \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa7\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb2 \xe0\xa4\xa6\xe0\xa5\x87\xe0\xa4\xb5 \xe0\xa4\x95\xe0\xa5\x80 \xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\x82\xe0\xa4\xa4\xe0\xa4\xbf \xe0\xa4\x96\xe0\xa4\xa1\xe0\xa4\xbc\xe0\xa4\xbe \xe0\xa4\xa5\xe0\xa4\xbe\xe0\xa5\xa4 \xe0\xa4\x89\xe0\xa4\xb8 \xe0\xa4\xaa\xe0\xa4\xb0 \xe0\xa4\x89\xe0\xa4\x97\xe0\xa5\x87 \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x8f \xe0\xa4\x9b\xe0\xa5\x8b\xe0\xa4\x9f\xe0\xa5\x87-\xe0\xa4\x9b\xe0\xa5\x8b\xe0\xa4\x9f\xe0\xa5\x87 \xe0\xa4\xb5\xe0\xa5\x83\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xb7 \xe0\xa4\x87\xe0\xa4\xb8 \xe0\xa4\xaa\xe0\xa5\x8d\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0 \xe0\xa4\xa6\xe0\xa4\xb7\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xbf\xe0\xa4\x97\xe0\xa5\x8b\xe0\xa4\x9a\xe0\xa4\xb0 \xe0\xa4\xb9\xe0\xa5\x8b\xe0\xa4\xa4\xe0\xa5\x87 \xe0\xa4\xa5\xe0\xa5\x87, \xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa5\x8b \xe0\xa4\xaf\xe0\xa5\x87 \xe0\xa4\x89\xe0\xa4\xb8\xe0\xa4\x95\xe0\xa5\x80 \xe0\xa4\x9c\xe0\xa4\x9f\xe0\xa4\xbe\xe0\xa4\x8f\xe0\xa4\x82 \xe0\xa4\xb9\xe0\xa5\x88 \xe0\xa4\x94\xe0\xa4\xb0 \xe0\xa4\x85\xe0\xa4\xb7\xe0\xa5\x8d\xe0\xa4\x9f\xe0\xa4\xad\xe0\xa5\x81\xe0\xa4\x9c\xe0\xa4\xbe \xe0\xa4\xa6\xe0\xa5\x87\xe0\xa4\xb5\xe0\xa5\x80 \xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xb0 \xe0\xa4\x9c\xe0\xa4\xbf\xe0\xa4\xb8\xe0\xa4\x95\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa4\xb2\xe0\xa4\xb6 \xe0\xa4\xaa\xe0\xa4\xb0 \xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa5\x87\xe0\xa4\xa4 \xe0\xa4\xaa\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\x8f\xe0\xa4\x82 \xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\xaf\xe0\xa5\x81 \xe0\xa4\x95\xe0\xa5\x80 \xe0\xa4\xae\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa6-\xe0\xa4\xae\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa6 \xe0\xa4\xa4\xe0\xa4\xb0\xe0\xa4\x82\xe0\xa4\x97\xe0\xa5\x8b\xe0\xa4\x82 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\xb2\xe0\xa4\xb9\xe0\xa4\xb0\xe0\xa4\xbe \xe0\xa4\xb0\xe0\xa4\xb9\xe0\xa5\x80 \xe0\xa4\xa5\xe0\xa5\x80\xe0\xa4\x82, \xe0\xa4\x89\xe0\xa4\xb8 \xe0\xa4\xa6\xe0\xa5\x87\xe0\xa4\xb5 \xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa4\xb8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\x95 \xe0\xa4\xb9\xe0\xa5\x88 \xe0\xa4\xae\xe0\xa4\x82\xe0\xa4\xa6\xe0\xa4\xbf\xe0\xa4\xb0 \xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x82 \xe0\xa4\x8f\xe0\xa4\x95 \xe0\xa4\x9d\xe0\xa4\xbf\xe0\xa4\xb2\xe0\xa4\xae\xe0\xa4\xbf\xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\xa4\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\x86 \xe0\xa4\xa6\xe0\xa5\x80\xe0\xa4\xaa\xe0\xa4\x95 \xe0\xa4\xa5\xe0\xa4\xbe, \xe0\xa4\x9c\xe0\xa4\xbf\xe0\xa4\xb8\xe0\xa5\x87 \xe0\xa4\xa6\xe0\xa5\x87\xe0\xa4\x96\xe0\xa4\x95\xe0\xa4\xb0 \xe0\xa4\x95\xe0\xa4\xbf\xe0\xa4\xb8\xe0\xa5\x80 \xe0\xa4\xa7\xe0\xa5\x81\xe0\xa4\x82\xe0\xa4\xa7\xe0\xa4\xb2\xe0\xa5\x87 \xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa5\x87 \xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb9\xe0\xa5\x8b \xe0\xa4\x9c\xe0\xa4\xbe\xe0\xa4\xa4\xe0\xa4\xbe \xe0\xa4\xa5\xe0\xa4\xbe\xe0\xa5\xa4 -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br /> -०१२३४५६७८९ -</p> - -<h3 style=\"font-family:ind_hi_1_001\">Nepali (ne) - Devanagari</h3> -<p style=\"font-family:ind_hi_1_001\">\xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xae \xe0\xa4\xb8\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\x97\xe0\xa4\xa0\xe0\xa4\xa8\xe0\xa4\xae\xe0\xa4\xbe \xe0\xa4\xa2\xe0\xa5\x80\xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\x87 \xe0\xa4\xb9\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa5\x81\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb8\xe0\xa4\xbe\xe0\xa4\xa5\xe0\xa5\x88 \xe0\xa4\x86\xe0\xa4\x89\xe0\xa4\x82\xe0\xa4\xa6\xe0\xa5\x8b \xe0\xa4\x9c\xe0\xa5\x87\xe0\xa4\xa0 \xe0\xa4\xae\xe0\xa4\xb9\xe0\xa4\xbf\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\xad\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa5\x8d\xe0\xa4\xb0 \xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xa7\xe0\xa4\xbe\xe0\xa4\xa8\xe0\xa4\xb8\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\xb5 \xe0\xa4\xb9\xe0\xa5\x8b\xe0\xa4\xb2\xe0\xa4\xbe \xe0\xa4\x95\xe0\xa4\xbf \xe0\xa4\xa8\xe0\xa4\xb9\xe0\xa5\x8b\xe0\xa4\xb2\xe0\xa4\xbe \xe0\xa4\xad\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xac\xe0\xa4\xb9\xe0\xa4\xb8 \xe0\xa4\x9a\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\x95\xe0\xa5\x80\xe0\xa4\xb0\xe0\xa4\xb9\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\xb2\xe0\xa4\xbe \xe0\xa4\x9a\xe0\xa5\x81\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\xb5\xe0\xa4\x95\xe0\xa5\x88 \xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xb7\xe0\xa4\xaf\xe0\xa4\xae\xe0\xa4\xbe \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\x9a\xe0\xa4\xa8 \xe0\xa4\x86\xe0\xa4\xaf\xe0\xa5\x8b\xe0\xa4\x97 \xe0\xa4\xb0 \xe0\xa4\x86\xe0\xa4\xa0 \xe0\xa4\xa6\xe0\xa4\xb2\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\x97\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa4\xbe, \xe0\xa4\xac\xe0\xa5\x87\xe0\xa4\x97\xe0\xa5\x8d\xe0\xa4\xb2\xe0\xa5\x88 \xe0\xa4\xad\xe0\xa4\xa8\xe0\xa4\xbe\xe0\xa4\x87 \xe0\xa4\xb0\xe0\xa4\xb9\xe0\xa5\x87\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xa6\xe0\xa5\x87\xe0\xa4\x96\xe0\xa4\xbf\xe0\xa4\x8f\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\x9b\xe0\xa5\xa4</p> - -<p style=\"font-family:ind_hi_1_001\">\xe0\xa4\xb8\xe0\xa4\x82\xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xa7\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\xb8\xe0\xa4\xad\xe0\xa4\xbe\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\x9a\xe0\xa4\xa8\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\x97\xe0\xa4\xbf \xe0\xa4\xa8\xe0\xa5\x87\xe0\xa4\x95\xe0\xa4\xaa\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\x93\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa5\x80\xe0\xa4\xb2\xe0\xa4\xbe\xe0\xa4\x88 \xe0\xa4\xb8\xe0\xa4\xae\xe0\xa5\x87\xe0\xa4\x9f\xe0\xa5\x87\xe0\xa4\xb0 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xb0\xe0\xa4\xbf\xe0\xa4\xae \xe0\xa4\xb8\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0 \xe0\xa4\x97\xe0\xa4\xa0\xe0\xa4\xa8\xe0\xa4\x97\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa8\xe0\xa5\x87 \xe0\xa4\xa4\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa5\x80 \xe0\xa4\xad\xe0\xa5\x88\xe0\xa4\xb0\xe0\xa4\xb9\xe0\xa4\x81\xe0\xa4\xa6\xe0\xa4\xbe \xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\x93\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\xa6\xe0\xa5\x80 \xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\x95\xe0\xa4\xb0\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb9\xe0\xa4\xb0\xe0\xa5\x82\xe0\xa4\xb2\xe0\xa5\x87 \xe0\xa4\x8f\xe0\xa4\x95\xe0\xa4\x9c\xe0\xa4\xa8\xe0\xa4\xbe \xe0\xa4\xb9\xe0\xa5\x8b\xe0\xa4\x9f\xe0\xa4\xb2 \xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\x95\xe0\xa4\xae\xe0\xa4\xbe\xe0\xa4\xa5\xe0\xa4\xbf \xe0\xa4\x97\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\xad\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\x8f\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\x85\xe0\xa4\xad\xe0\xa4\xa6\xe0\xa5\x8d\xe0\xa4\xb0 \xe0\xa4\xb5\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xb5\xe0\xa4\xb9\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa4\x95\xe0\xa5\x8b \xe0\xa4\xb5\xe0\xa4\xbf\xe0\xa4\xb0\xe0\xa5\x8b\xe0\xa4\xa7\xe0\xa4\xae\xe0\xa4\xbe \xe0\xa4\xb5\xe0\xa5\x8d\xe0\xa4\xaf\xe0\xa4\xbe\xe0\xa4\xaa\xe0\xa4\xbe\xe0\xa4\xb0\xe0\xa5\x80\xe0\xa4\xb9\xe0\xa4\xb0\xe0\xa5\x81\xe0\xa4\xb2\xe0\xa5\x87 \xe0\xa4\x85\xe0\xa4\xa8\xe0\xa4\xbf\xe0\xa4\xb6\xe0\xa5\x8d\xe0\xa4\x9a\xe0\xa4\xbf\xe0\xa4\xa4\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\xb2\xe0\xa4\xbf\xe0\xa4\xa8 \xe0\xa4\xb9\xe0\xa4\xa1\xe0\xa5\x8d\xe0\xa4\xa4\xe0\xa4\xbe\xe0\xa4\xb2 \xe0\xa4\x86\xe0\xa4\xb9\xe0\xa5\x8d\xe0\xa4\xb5\xe0\xa4\xbe\xe0\xa4\xa8 \xe0\xa4\x97\xe0\xa4\xb0\xe0\xa5\x87\xe0\xa4\x95\xe0\xa4\xbe \xe0\xa4\x9b\xe0\xa4\xa8\xe0\xa5\x8d\xe0\xa5\xa4</p> - -<h3 style=\"font-family:ind_bn_1_001\">Bengali (bn)</h3> -<p style=\"font-family:ind_bn_1_001\"> -দক্ষিণ ওয়াজিরিস্থানে কর্মরত স্বেচ্ছাসেবী ও ত্রাণ সংস্থাগুলো ধারণা করছে সেনা অভিযানের তীব্রতা বাড়লে এই সংখ্যাটা আরও অনেক বেড়ে যাবে -<br /> -শরণার্থীদের স্রোত সামলাতে তারা ইতিমধ্যেই হিমশিম খাচ্ছেন, ফলে লড়াই থেকে পালিয়ে আসা বেসামরিক মানুষজনের সংখ্যা আরও বাড়লে স্বভাবতই সঙ্কট আরও জটিল হয়ে উঠবে -<br /> -দক্ষিণ ওয়াজিরিস্তান থেকে পাওয়া খবরে বলা হচ্ছে সেনাবাহিনী সেখানে তিনদিক থেকে আক্রমণ চালাচ্ছে এবং ওই অঞ্চলে প্রবেশ করা আর বেরোনোর পথ তারাই নিয়ন্ত্রণ করছে - আর তালেবানের ঘাঁটিগুলোর ওপর হামলা চালানো হচ্ছে আকাশপথে এবং অর্টিলারি বাহিনীর সাহায্যে -<br /> -তালেবান জঙ্গীরা ইতিমধ্যেই হুঁশিয়ারি দিয়েছে এক ইঞ্চি জমিও তারা বিনা যুদ্ধে ছেড়ে দেবে না - আর ইসলামাবাদ থেকে বিবিসির ওরলা গুয়েরিন বলছেন তারা সে-কথা অক্ষরে অক্ষরে পালন করছে -<br /> -!\"#$%&'()*+,-./0123456789:;<=>?<br /> -@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_<br /> -`abcdefghijklmnopqrstuvwxyz{|}~ -<br />০১২৩৪৫৬৭৮৯ -</p> - - -<h3 style=\"font-family:ind_bn_1_001\">Assamese</h3> -<p style=\"font-family:ind_bn_1_001\">অসমীয়া ৱিকিপিডিয়াৰ উদ্দেশ্য হ'ল সম্পূৰ্ণ অসমীয়া ভাষাত এখনি বিশ্বকোষ প্ৰণয়ন কৰা। অন্য কোনো ভাষাৰ প্ৰবন্ধ এই বিশ্বকোষৰ বাবে গ্ৰহন কৰা নহ'ব। বিশ্বকোষৰ অৱদানকাৰীসকললৈ সাদৰেৰে অনুৰোধ জনোৱা হ'ল যাতে তেখেতসকলে অসমীয়া ভাষাৰ প্ৰচলিত বানান পদ্ধতি মানি চলে। বিদেশী শব্দৰ অসমীয়া প্ৰতিৰূপৰ ক্ষেত্ৰত যিহেতু অসমীয়া সাহিত্যিকসকল এতিয়াও ঐক্যমতত উপনীত হ'ব পৰা নাই, ৱিকিপিডিয়াত বিদেশী শব্দৰ যিকোনো ধৰনৰ অসমীয়া ৰূপ গ্ৰাহ্য কৰা হ'ব। -<br /> - -গণবিশ্বকোষৰ সফলতাৰ নেপথ্যৰ আটাইতকৈ শক্তিশালী ধাৰণাটো হৈছে সহযোগিতামূলক সংকলন, যি মানৱ জাতিৰ সাফল্যৰ মূল চাবিকাঠি পাৰস্পৰিক সহযোগিতাক আৰু এখোপ ওপৰলৈ উঠাই নিছে| এই গণবিশ্বকোষবিলাকৰ বিভিন্ন নিবন্ধৰ লেখকসকল সম্পূৰ্ণ অপেচাদাৰী ইন্টাৰনেট ব্যৱহাৰকৰোঁতা। এই লেখকসকলে নিজৰ নিজৰ ৰাপ বা পাৰদৰ্শীতা থকা বিষয় সম্পৰ্কে বিভিন্ন নিবন্ধ লিখি আন পাঠকক উপকৃত কৰে আৰু নিজেও উপকৃত হয়। -<br /> - -অসমীয়া গণবিশ্বকোষ (যাৰ মুখ্য পৃষ্ঠাটো বৰ্তমান আপুনি পঢ়ি আছে) হৈছে এখন অসমীয়া বিশ্বকোষ প্ৰস্তুত কৰাৰ এক অভূতপূৰ্ব তথা অভিনৱ প্ৰয়াস, যাক যিকোনো পাঠকে পৃথিৱীৰ যিকোনো ঠাইৰ পৰা ইন্টাৰনেটৰ জৰিয়তে বিনামূল্যে ব্যৱহাৰ কৰিব পাৰিব। এই প্ৰকল্প আচলতে \"ৱিকিপেডিয়া\" নামৰ এক বৃহত্তৰ প্ৰকল্পৰ অংশ| পৃথিবীৰ বিভিন্ন ভাষাত সকলোৱে বিনামূল্যে ব্যৱহাৰ তথা সম্পাদনা কৰিব পৰা বিশ্বকোষ প্ৰস্তুত কৰাৰ উদ্দেশ্যেৰে ৱিকিপিডিয়া নামৰ ইন্টাৰনেট-পৃষ্ঠাত ২০০১ চনত আৰম্ভ কৰা মুখ্য প্ৰকল্পৰ অধীনত বৰ্ত্তমান প্ৰায় শতাধিক ভাষাৰ যোগদানেৰে সম্বৃদ্ধ হোৱা এইলানি গণবিশ্বকোষে আজি প্ৰায় পাঁচলাখতকৈও অধিক প্ৰবন্ধৰে পৃথিৱীৰ বিভিন্ন প্ৰান্তৰ পাঠকক ইন্টাৰনেটৰ জৰিয়তে বিশ্বকোষ সেৱা আগবঢ়াইছে। -</p> - - -"; - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('-s','A4','','',32,25,27,25,16,13); - -$mpdf->SetDisplayMode('fullpage'); - -//$mpdf->useSubstitutionsMB = true; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example35_watermarks.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example35_watermarks.php deleted file mode 100644 index 02337f8b713eaf8081c84e19933d9a71af02502b..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example35_watermarks.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -$html = ' -<h1>mPDF</h1> -<h2>Watermarks</h2> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<hr /> - -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> - -<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote> - -<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address> - -'; - - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('c'); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->SetWatermarkText('DRAFT'); -$mpdf->watermark_font = 'DejaVuSansCondensed'; -$mpdf->showWatermarkText = true; - - -$mpdf->WriteHTML($html); -$mpdf->AddPage(); - -$mpdf->SetWatermarkImage('tiger.wmf', 1, '', array(160,10)); -$mpdf->showWatermarkImage = true; - -$mpdf->WriteHTML('<h2>Using a Watermark as a Header</h2>'); -$mpdf->WriteHTML($html); -$mpdf->AddPage(); - -$mpdf->SetWatermarkImage('tiger.wmf', 0.15, 'F'); - -$mpdf->WriteHTML('<h2>Using a Watermark Image as Background</h2>'); -$mpdf->WriteHTML($html); - - -$mpdf->Output(); -exit; - -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example36_annotations_and_Attached_files.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example36_annotations_and_Attached_files.php deleted file mode 100644 index 63e8c5d21e2794561cd3027d5f43eb837fd16755..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example36_annotations_and_Attached_files.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - - - -$html = ' -<h1>mPDF</h1> -<h2>Annotations</h2> -<h5>Heading 5<annotation content="This is an annotation'."\n".'in the middle of the text" subject="My Subject" icon="Comment" color="#FE88EF" author="Ian Back" /></h5> -<h6>Heading 6</h6> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. <i>Fusce</i><annotation content="Fusce is a funny word!" subject="Idle Comments" icon="Note" author="Ian Back" pos-x="195" /> eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at <span title="This annotation was automatically defined from the title attribute of a span element">eleifend</span> lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada<annotation file="tiger.jpg" content="This is a file attachment (embedded file) -Double-click to open attached file -Right-click to save file on your computer" icon="Graph" title="Attached File: tiger.jpg" pos-x="195" /> sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -'; -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('c'); - -$mpdf->title2annots = true; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example37_barcodes.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example37_barcodes.php deleted file mode 100644 index 34ec8829e4cd6a4525a5c17916254bd346c64dd6..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example37_barcodes.php +++ /dev/null @@ -1,437 +0,0 @@ -<?php - - -$html = ' -<html> -<head> -<style> -body {font-family: sans-serif; - font-size: 9pt; - background: transparent url(\'bgbarcode.png\') repeat-y scroll left top; -} -h5, p { margin: 0pt; -} -table.items { - font-size: 9pt; - border-collapse: collapse; - border: 3px solid #880000; -} -td { vertical-align: top; -} -table thead td { background-color: #EEEEEE; - text-align: center; -} -table tfoot td { background-color: #AAFFEE; - text-align: center; -} -.barcode { - padding: 1.5mm; - margin: 0; - vertical-align: top; - color: #000000; -} -.barcodecell { - text-align: center; - vertical-align: middle; - padding: 0; -} -</style> -</head> -<body> - -<!--mpdf -<htmlpagefooter name="myfooter"> -<div style="border-top: 1px solid #000000; font-size: 9pt; text-align: center; padding-top: 3mm; "> -Page {PAGENO} of {nb} -</div> -</htmlpagefooter> - -<sethtmlpagefooter name="myfooter" value="on" /> -mpdf--> - -<h1>mPDF</h1> -<h2>Barcodes</h2> -<p>NB <b>Quiet zones</b> - The barcode object includes space to the right/left or top/bottom only when the specification states a \'quiet zone\' or \'light margin\'. All the examples below also have CSS property set on the barcode object i.e. padding: 1.5mm; </p> - -<h3>EAN-13 Barcodes (EAN-2 and EAN-5)</h3> -<p>NB EAN-13, UPC-A, UPC-E, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p> -<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">EAN13</td> -<td>Standard EAN-13 barcode. Accepts 12 or 13 characters (creating checksum digit if required). [0-9] numeric only.</td> -<td class="barcodecell"><barcode code="978-0-9542246-0" text="1" class="barcode" /></td> -</tr> -<tr> -<td align="center">ISBN</td> -<td>Standard EAN-13 barcode with \'ISBN\' number shown above [shown at height="0.66"]</td> -<td class="barcodecell"><barcode code="978-0-9542246-0" type="ISBN" class="barcode" height="0.66" text="1" /></td> -</tr> -<tr> -<td align="center">ISSN</td> -<td>Standard EAN-13 barcode with \'ISSN\' number shown above [shown at size="0.8"]</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8" type="ISSN" size="0.8" class="barcode" text="1" /></td> -</tr> -</tbody> -</table> - -<h3>EAN-8, UPC-A and UPC-E Barcodes</h3> -<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p> -<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">UPCA</td> -<td>UPC-A barcode. This is a subset of the EAN-13. (098277211236) Accepts 11 or 12 characters (creating checksum digit if required). [0-9] numeric only</td> -<td class="barcodecell"><barcode code="09827721123" type="UPCA" class="barcode" /></td> -</tr> -<tr> -<td align="center">UPCE</td> -<td>UPC-E barcode. Requires the UPC-A code to be entered as above (e.g. 042100005264 to give 425261). NB mPDF will die with an error message if the code is not valid, as only some UPC-A codes can be converted into valid UPC-E codes. UPC-E doesn\'t have a check digit encoded explicity, rather the check digit is encoded in the parity of the other six characters. The check digit that is encoded is the check digit from the original UPC-A barcode.</td> -<td class="barcodecell"><barcode code="04210000526" type="UPCE" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN8</td> -<td>EAN-8. Accepts 7 or 8 characters (creating checksum digit if required). [0-9] numeric only</td> -<td class="barcodecell"><barcode code="2468123" type="EAN8" class="barcode" /></td> -</tr> -</tbody> -</table> - -<h3>EAN-2 and EAN-5 supplements, and combined forms</h3> -<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">EAN2</td> -<td colspan="2">EAN-2 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Used to denote an issue of a periodical. EAN-2 supplement accepts 2 digits [0-9] only, EAN-5 five.</td> -</tr> -<tr> -<td align="center">EAN5</td> -<td colspan="2">EAN-5 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Usually used in conjunction with EAN-13 for the price of books. 90000 is the code for no price. </td> -</tr> -<tr> -<td align="center">EAN13P2</td> -<td>Standard EAN-13 barcode with 2-digit UPC supplement (07)</td> -<td class="barcodecell"><barcode code="978-0-9542246-0 07" type="EAN13P2" class="barcode" /></td> -</tr> -<tr> -<td align="center">ISBNP2</td> -<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 2-digit EAN-2 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISBNP2" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">ISSNP2</td> -<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 2-digit EAN-2 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISSNP2" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">UPCAP2</td> -<td>UPC-A barcode with 2-digit EAN-2 supplement. This is a subset of the EAN-13. </td> -<td class="barcodecell"><barcode code="00633895260 24" type="UPCAP2" class="barcode" /></td> -</tr> -<tr> -<td align="center">UPCEP2</td> -<td>UPC-E barcode with 2-digit EAN-2 supplement. </td> -<td class="barcodecell"><barcode code="042100005264 07" type="UPCEP2" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN8P2</td> -<td>EAN-8 barcode with 2-digit EAN-2 supplement</td> -<td class="barcodecell"><barcode code="5512345 07" type="EAN8P2" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN13P5</td> -<td>Standard EAN-13 barcode with 5-digit UPC supplement (90000)</td> -<td class="barcodecell"><barcode code="978-0-9542246-0 90000" type="EAN13P5" class="barcode" /></td> -</tr> -<tr> -<td align="center">ISBNP5</td> -<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 5-digit EAN-5 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISBNP5" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">ISSNP5</td> -<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 5-digit EAN-5 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISSNP5" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">UPCAP5</td> -<td>UPC-A barcode with 5-digit EAN-5 supplement. This is a subset of the EAN-13</td> -<td class="barcodecell"><barcode code="07567816412 90000" type="UPCAP5" class="barcode" /></td> -</tr> -<tr> -<td align="center">UPCEP5</td> -<td>UPC-E barcode with 5-digit EAN-5 supplement. (042100005264 90000)</td> -<td class="barcodecell"><barcode code="042100005264 90000" type="UPCEP5" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN8P5</td> -<td>EAN-8 barcode with 5-digit EAN-5 supplement (55123457 90000)</td> -<td class="barcodecell"><barcode code="55123457 90000" type="EAN8P5" class="barcode" /></td> -</tr> -</tbody> -</table> - -<h3>Postcode Barcodes</h3> -<p>These all have sizes fixed by their specification. Although they can be altered using \'size\' it is not recommended. \'height\' is ignored.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">IMB</td> -<td>Intelligent Mail Barcode - also known as: USPS OneCode 4-State Customer Barcode, OneCode 4CB, USPS 4CB, 4-CB, 4-State Customer Barcode, USPS OneCode Solution Barcode. (01234567094987654321-01234567891) Accepts: Up to 31 digits (required 20-digit Tracking Code, and up to 11-digit Routing Code; this may be 0, 5, 9, or 11 digits). If the Routing code is included, it should be spearated by a hyphen - like this example.</td> -<td class="barcodecell"><barcode code="01234567094987654321-01234567891" type="IMB" class="barcode" /></td> -</tr> -<tr> -<td align="center">RM4SCC</td> -<td>Royal Mail 4-state Customer barcode (SN34RD1A). Accepts: max. 9 characters. Valid characters: [A-Z,0-9] Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="SN34RD1A" type="RM4SCC" class="barcode" /></td> -</tr> -<tr> -<td align="center">KIX</td> -<td>Dutch KIX version of Royal Mail 4-state Customer barcode (SN34RD1A). Valid characters: [A-Z,0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="SN34RD1A" type="KIX" class="barcode" /></td> -</tr> -<tr> -<td align="center">POSTNET</td> -<td>POSTNET barcode. Accepts 5, 9 or 11 digits. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="123456789" type="POSTNET" class="barcode" /></td> -</tr> -<tr> -<td align="center">PLANET</td> -<td>PLANET barcode. Accepts 11 or 13 digits. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="00123456789" type="PLANET" class="barcode" /></td> -</tr> -</tbody> -</table> - - -<h3>Variable width Barcodes</h3> -<p>These barcodes are all of variable length depending on the code entered. There is no recommended maximum size for any of these specs, but all recommend a minimum X-dimension (width of narrowest bar) as 7.5mil (=0.19mm). The default used here is twice the minimum i.e. X-dim = 0.38mm.</p> -<p>The specifications give a minimum height of 15% of the barcode length (which can be variable). The bar height in mPDF is set to a default value of 10mm. </p> -<p>\'size\' will scale the barcode in both dimensions. mPDF will accept any number, but bear in mind that size="0.5" will set the bar width to the minimum. The \'height\' attribute further allows scaling - this factor is applied to already scaled barcode. Thus size="2" height="0.5" will give a barcode twice the default width (X-dim=0.76mm) and at the default height set in mPDF i.e. 10mm.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<tr> -<td align="center">C128A</td> -<td>CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="CODE 128 A" type="C128A" class="barcode" /></td> -</tr> -<tr> -<td align="center">C128B</td> -<td>CODE 128 B. Valid characters: [Upper / Lower Case + All ASCII Printable Characters]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="ABC123abc@456" type="C128B" class="barcode" /></td> -</tr> -<tr> -<td align="center">C128C</td> -<td>CODE 128 C. Valid characters: [0-9]. Must be an even number of digits. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="0123456789" type="C128C" class="barcode" /></td> -</tr> - -<tr> -<td align="center">EAN128C [A/B/C]</td> -<td>EAN128 (A, B, and C). Specified variant of Code 128, utilising an FNC1 start code. Also known as UCC/EAN-128 or GS1-128. Valid characters: [cf. Code 128]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="0112345678912343" type="EAN128C" class="barcode" /></td> -</tr> - -<tr> -<td align="center">C39</td> -<td>CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. Valid characters: [0-9 A-Z \'-\' . Space $/+%]</td> -<td class="barcodecell"><barcode code="TEC-IT" type="C39" class="barcode" /></td> -</tr> -<tr> -<td align="center">C39+</td> -<td>CODE 39 + CHECKSUM. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="39OR93" type="C39+" class="barcode" /></td> -</tr> -<tr> -<td align="center">C39E</td> -<td>CODE 39 EXTENDED. Valid characters: [ASCII-characters between 0..127]</td> -<td class="barcodecell"><barcode code="CODE 39 E" type="C39E" class="barcode" /></td> -</tr> -<tr> -<td align="center">C39E+</td> -<td>CODE 39 EXTENDED + CHECKSUM. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="CODE 39 E+" type="C39E+" class="barcode" /></td> -</tr> - -<tr> -<td align="center">S25</td> -<td>Standard 2 of 5. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="54321068" type="S25" class="barcode" /></td> -</tr> -<tr> -<td align="center">S25+</td> -<td>Standard 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="54321068" type="S25+" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25</td> -<td>Interleaved 2 of 5. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="54321068" type="I25" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25+</td> -<td>Interleaved 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="54321068" type="I25+" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25B</td> -<td>Interleaved 2 of 5 with bearer bars. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="1234567" type="I25B" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25B+</td> -<td>Interleaved 2 of 5 + CHECKSUM with bearer bars. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="1234567" type="I25B+" class="barcode" /></td> -</tr> - -<tr> -<td align="center">C93</td> -<td>CODE 93 - USS-93 (extended). Valid characters: [ASCII-characters between 0..127]. Checksum digits: automatic.</td> -<td class="barcodecell"><barcode code="39OR93" type="C93" class="barcode" /></td> -</tr> - -<tr> -<td align="center">MSI</td> -<td>MSI. Modified Plessey. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="01234567897" type="MSI" class="barcode" /></td> -</tr> -<tr> -<td align="center">MSI+</td> -<td>MSI + CHECKSUM (module 11). Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="0123456789" type="MSI+" class="barcode" /></td> -</tr> - -<tr> -<td align="center">CODABAR</td> -<td>CODABAR. Valid characters: [0-9 \'-\' $:/.+ ABCD] ABCD are used as stop and start characters e.g. A34698735B</td> -<td class="barcodecell"><barcode code="A34698735B" type="CODABAR" class="barcode" /></td> -</tr> - -<tr> -<td align="center">CODE11</td> -<td>CODE 11. Valid characters: [0-9 and \'-\']. Checksum digits: 1 (or 2 if length of code is > 10 characters) - automatic.</td> -<td class="barcodecell"><barcode code="123-456-789" type="CODE11" class="barcode" /></td> -</tr> - - -</tbody> -</table> - -<!-- QR-CODE -<h3>2D Code (QR-code)</h3> -<p>A nominal height and width for these barcodes is set as 25mm. \'size\' will scale both the height and width.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<tr> -<td align="center">QR-code</td> -<td>QR-code. Accepts numeric, alphanumeric or binary input, with specified error level: L, M, Q, H.</td> -<td class="barcodecell"><barcode code="Your message here" type="QR" class="barcode" size="0.8" error="M" /></td> -</tr> -</tbody> -</table> ---> - - -<br /> - -<div> -<h5>Useful links</h5> -<p><a href="http://www.adams1.com">http://www.adams1.com</a></p> -<p><a href="http://www.tec-it.com/Download/PDF/Barcode_Reference_EN.pdf">http://www.tec-it.com/Download/PDF/Barcode_Reference_EN.pdf</a></p> -<p><a href="http://www.tec-it.com/en/support/knowbase/symbologies/barcode-overview/linear/Default.aspx">http://www.tec-it.com/en/support/knowbase/symbologies/barcode-overview/linear/Default.aspx</a></p> -<p><a href="http://www.gs1uk.org/downloads/bar_code/Bar%20coding%20getting%20it%20right.pdf">http://www.gs1uk.org/downloads/bar_code/Bar%20coding%20getting%20it%20right.pdf</a></p> -<p><a href="http://web.archive.org/web/19990501035133/http://www.uc-council.org/d36-d.htm">http://web.archive.org/web/19990501035133/http://www.uc-council.org/d36-d.htm (EAN2 and EAN5)</a></p> -<p><a href="http://www.barcodeisland.com/ean13.phtml">http://www.barcodeisland.com/ean13.phtml (UPC-A)</a></p> -<p><a href="http://www.idautomation.com/fonts/postnet/#Specifications">http://www.idautomation.com/fonts/postnet/#Specifications</a></p> -<p><a href="http://www.outputlinks.com/sites/AFP/ibm_bcocafaq.pdf">http://www.outputlinks.com/sites/AFP/ibm_bcocafaq.pdf</a></p> -<p><a href="https://ribbs.usps.gov/intelligentmail_mailpieces/documents/tech_guides/USPSIMB_Tech_Resource_Guide.pdf">https://ribbs.usps.gov/intelligentmail_mailpieces/documents/tech_guides/USPSIMB_Tech_Resource_Guide.pdf (Intelligent Mail)</a></p> -<p><a href="http://www.mailsorttechnical.com/downloads_mailsort_user_guide.cfm">http://www.mailsorttechnical.com/downloads_mailsort_user_guide.cfm</a></p> - -<p><a href="http://www.mailsorttechnical.com/docs/mug_jun_2009/MUG_10_2008_Mailsort_700.pdf">http://www.mailsorttechnical.com/docs/mug_jun_2009/MUG_10_2008_Mailsort_700.pdf</a> page 20</p> - - -</div> - -<pagebreak /> -<div> -<h3>Human-readable text</h3> -Human-readable text is only produced as part of the barcode object in EAN-13, ISBN, ISSN, EAN-8, UPC-A and UPC-E. Here is an example to add text to a barcode: -</div> - -<div style="border:1px solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: lucidaconsole, mono;"> - -<div style="position:fixed; right: 50mm; top: 60mm; border: 0.2mm solid #000000; text-align: center; padding: 0.5mm; padding-top: 2mm;"><br /> -<barcode code="00034698735346987355" type="EAN128C" /><br /><br /> -<div style="font-family: ocrb;">(00) 0346987 35346987 355</div><br /> -</div> - -</div> - -<div style="position:fixed; right: 50mm; top: 60mm; border: 0.2mm solid #000000; text-align: center; padding: 0.5mm; padding-top: 2mm;"> -<barcode code="00034698735346987355" type="EAN128C" /><br /> -<div style="font-family: ocrb;">(00) 0346987 35346987 355</div> -</div> - -</body> -</html> -'; -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('','','','',20,15,25,25,10,10); -$mpdf->WriteHTML($html); -$mpdf->Output(); - -exit; - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example38_dot_tab.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example38_dot_tab.php deleted file mode 100644 index 7426d54b6ab121fdd7bf9f2b278912830afb0651..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example38_dot_tab.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - - -$html = '<h3>Menu</h3> - -<div style="border: 0.2mm solid #000088; padding: 1em;"> -<p style="text-align: left;">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus <dottab /> £37.00</p> - -<p style="text-align: left;">Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat <dottab /> £3700.00</p> - -<p style="text-align: left; color: #880000;">Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus <dottab /> £27.00</p> - -<p style="text-align: left;">Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod <dottab /> £7.00</p> - -<p style="text-align: left;">Donec et nulla. Sed quis orci <dottab /> £1137.00</p> -</div> -'; - - -include("../mpdf.php"); - -$mpdf=new mPDF(); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; - - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example39_PDFA_compliance.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example39_PDFA_compliance.php deleted file mode 100644 index dace6ba77bf65a4f3c8a64e51ddaa73b67fde62f..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example39_PDFA_compliance.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php - - - -$html = ' -<h1>mPDF</h1> -<h2>PDFA Compliance</h2> -<p>PDF/A1-b is a file format for the long-term archiving of electronic documents. This is an example of a PDF/A1-b compliant files.</p> -'; -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF(); - -$mpdf->PDFA = true; -$mpdf->PDFAauto = true; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example40_MPDFI_thumbnails.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example40_MPDFI_thumbnails.php deleted file mode 100644 index 709ea8d1392fe56b22ef0c45d8f4c71a9ba071a9..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example40_MPDFI_thumbnails.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php - -include("../mpdf.php"); - -$mpdf=new mPDF(); -$mpdf->SetImportUse(); - -$mpdf->Thumbnail('sample_orientation2.pdf', 4, 5); // number per row // spacing in mm - -$mpdf->WriteHTML('<pagebreak /><div>Now with rotated pages</div>'); - -$mpdf->Thumbnail('sample_orientation3.pdf', 4); // number per row // spacing in mm - - -$mpdf->Output(); - -exit; - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example41_MPDFI_template.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example41_MPDFI_template.php deleted file mode 100644 index 12f592db84a25ded92fe17ee66f15692bf5b8822..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example41_MPDFI_template.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -include("../mpdf.php"); - -$mpdf=new mPDF('','','','',15,15,57,16,9,9); -$mpdf->SetImportUse(); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->SetCompression(false); - -// Add First page -$pagecount = $mpdf->SetSourceFile('sample_basic.pdf'); - -$crop_x = 50; -$crop_y = 50; -$crop_w = 100; -$crop_h = 100; - -$tplIdx = $mpdf->ImportPage(2, $crop_x, $crop_y, $crop_w, $crop_h); - -$x = 50; -$y = 50; -$w = 100; -$h = 100; - -$mpdf->UseTemplate($tplIdx, $x, $y, $w, $h); - -$mpdf->Rect($x, $y, $w, $h); - -$mpdf->Output('newpdf.pdf', 'I'); - -exit; - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example42_MPDFI_templatedoc.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example42_MPDFI_templatedoc.php deleted file mode 100644 index 2b670ca39f07b5d6207a351ce1d24e3fb16f42f8..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example42_MPDFI_templatedoc.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php - -include("../mpdf.php"); - -$mpdf=new mPDF('','','','',15,15,47,16,9,9); -$mpdf->SetImportUse(); - -$mpdf->SetDocTemplate('sample_logoheader2.pdf',1); // 1|0 to continue after end of document or not - used on matching page numbers - -//=================================================== -$mpdf->AddPage(); -$mpdf->WriteHTML('Hallo World'); -$mpdf->AddPage(); -$mpdf->WriteHTML('Hallo World'); -$mpdf->AddPage(); -$mpdf->WriteHTML('Hallo World'); -//=================================================== - -$mpdf->RestartDocTemplate(); - -//=================================================== -$mpdf->AddPage(); -$mpdf->WriteHTML('Hallo World'); -$mpdf->AddPage(); -$mpdf->WriteHTML('Hallo World'); -$mpdf->AddPage(); -$mpdf->WriteHTML('Hallo World'); -//=================================================== - - -$mpdf->Output(); - -exit; - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example43_MPDFI_booklet.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example43_MPDFI_booklet.php deleted file mode 100644 index 8144a3a02b84a145c87d58a65202f47277bcdeaf..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example43_MPDFI_booklet.php +++ /dev/null @@ -1,121 +0,0 @@ -<?php - -$html = ' -<html><head> - <meta http-equiv="Content-Language" content="en-GB"> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <style> - body { font-family:"Times New Roman"; font-size:14pt; } - p { margin: 0; } - </style> -</head><body> - -<!-- SECTION 1 --> -<h1>mPDF Example Booklet</h1> -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> - -<h4>Little Women - Chapter One - Playing Pilgrims</h4> - -<p> Christmas won\'t be Christmas without any presents, grumbled Jo, lying on the rug.</p><p> It\'s so dreadful to be poor! sighed Meg, looking down at her old dress.</p><p> I don\'t think it\'s fair for some girls to have plenty of pretty things, and other girls nothing at all, added little Amy, with an injured sniff.</p><p> We\'ve got Father and Mother, and each other, said Beth contentedly from her corner.</p><p>The four young faces on which the firelight shone brightened at the cheerful words, but darkened again as Jo said sadly, We haven\'t got Father, and shall not have him for a long time. She didn\'t say perhaps never, but each silently added it, thinking of Father far away, where the fighting was.</p><p>Nobody spoke for a minute; then Meg said in an altered tone, You know the reason Mother proposed not having any presents this Christmas was because it is going to be a hard winter for everyone; and she thinks we ought not to spend money for pleasure, when our men are suffering so in the army. We can\'t do much, but we can make our little sacrifices, and ought to do it gladly. But I am afraid I don\'t And Meg shook her head, as she thought regretfully of all the pretty things she wanted.</p><p> But I don\'t think the little we should spend would do any good. We\'ve each got a dollar, and the army wouldn\'t be much helped by our giving that. I agree not to expect anything from Mother or you, but I do want to buy UNDINE AND SINTRAM for myself. I\'ve wanted it so long, said Jo, who was a bookworm.</p><p> I planned to spend mine in new music, said Beth, with a little sigh, which no one heard but the hearth brush and kettle holder.</p><p> I shall get a nice box of Faber\'s drawing pencils. I really need them, said Amy decidedly.</p><p> Mother didn\'t say anything about our money, and she won\'t wish us to give up everything. Let\'s each buy what we want, and have a little fun. I\'m sure we work hard enough to earn it, cried Jo, examining the heels of her shoes in a gentlemanly manner.</p><p> I know I do—teaching those tiresome children nearly all day, when I\'m longing to enjoy myself at home, began Meg, in the complaining tone again.</p><p> You don\'t have half such a hard time as I do, said Jo. How would you like to be shut up for hours with a nervous, fussy old lady, who keeps you trotting, is never satisfied, and worries you till you you\'re ready to fly out the window or cry? </p><p> It\'s naughty to fret, but I do think washing dishes and keeping things tidy is the worst work in the world. It makes me cross, and my hands get so stiff, I can\'t practice well at all. And Beth looked at her rough hands with a sigh that any one could hear that time.</p><p> I don\'t believe any of you suffer as I do, cried Amy, for you don\'t have to go to school with impertinent girls, who plague you if you don\'t know your lessons, and laugh at your dresses, and label your father if he isn\'t rich, and insult you when your nose isn\'t nice. </p><p> If you mean libel, I\'d say so, and not talk about labels, as if Papa was a pickle bottle, advised Jo, laughing.</p><p> I know what I mean, and you needn\'t be satirical about it. It\'s proper to use good words, and improve your vocabulary, returned Amy, with dignity.</p><p> Don\'t peck at one another, children. Don\'t you wish we had the money Papa lost when we were little, Jo? Dear me! How happy and good we\'d be, if we had no worries! said Meg, who could remember better times.</p><p> You said the other day you thought we were a deal happier than the King children, for they were fighting and fretting all the time, in spite of their money. </p><p> So I did, Beth. Well, I think we are. For though we do have to work, we make fun of ourselves, and are a pretty jolly set, as Jo would say. </p><p> Jo does use such slang words! observed Amy, with a reproving look at the long figure stretched on the rug.</p><p>Jo immediately sat up, put her hands in her pockets, and began to whistle.</p><p> Don\'t, Jo. It\'s so boyish! </p><p> That\'s why I do it. </p><p> I detest rude, unladylike girls! </p><p> I hate affected, niminy-piminy chits! </p><p> Birds in their little nests agree, sang Beth, the peacemaker, with such a funny face that both sharp voices softened to a laugh, and the pecking ended for that time.</p><p> Really, girls, you are both to be blamed, said Meg, beginning to lecture in her elder-sisterly fashion. You are old enough to leave off boyish tricks, and to behave better, Josephine. It didn\'t matter so much when you were a little girl, but now you are so tall, and turn up your hair, you should remember that you are a young lady. </p><p> I\'m not! And if turning up my hair makes me one, I\'ll wear it in two tails till I\'m twenty, cried Jo, pulling off her net, and shaking down a chestnut mane. I hate to think I\'ve got to grow up, and be Miss March, and wear long gowns, and look as prim as a China Aster! It\'s bad enough to be a girl, anyway, when I like boy\'s games and work and manners! I can\'t get over my disappointment in not being a boy. And it\'s worse than ever now, for I\'m dying to go and fight with Papa. And I can only stay home and knit, like a poky old woman! </p><p>And Jo shook the blue army sock till the needles rattled like castanets, and her ball bounded across the room.</p><p> Poor Jo! It\'s too bad, but it can\'t be helped. So you must try to be contented with making your name boyish, and playing brother to us girls, said Beth, stroking the rough head with a hand that all the dish washing and dusting in the world could not make ungentle in its touch.</p><p> As for you, Amy, continued Meg, you are altogether to particular and prim. Your airs are funny now, but you\'ll grow up an affected little goose, if you don\'t take care. I I like your nice manners and refined ways of speaking, when you don\'t try to be elegant. But your absurd words are as bad as Jo\'s slang. </p><p> If Jo is a tomboy and Amy a goose, what am I, please? asked Beth, ready to share the lecture.</p><p> You\'re a dear, and nothing else, answered Meg warmly, and no one contradicted her, for the \'Mouse\' was the pet of the family.</p> - -<h4>Little Women - Chapter One - Playing Pilgrims</h4> - -<p> Christmas won\'t be Christmas without any presents, grumbled Jo, lying on the rug.</p><p> It\'s so dreadful to be poor! sighed Meg, looking down at her old dress.</p><p> I don\'t think it\'s fair for some girls to have plenty of pretty things, and other girls nothing at all, added little Amy, with an injured sniff.</p><p> We\'ve got Father and Mother, and each other, said Beth contentedly from her corner.</p><p>The four young faces on which the firelight shone brightened at the cheerful words, but darkened again as Jo said sadly, We haven\'t got Father, and shall not have him for a long time. She didn\'t say perhaps never, but each silently added it, thinking of Father far away, where the fighting was.</p><p>Nobody spoke for a minute; then Meg said in an altered tone, You know the reason Mother proposed not having any presents this Christmas was because it is going to be a hard winter for everyone; and she thinks we ought not to spend money for pleasure, when our men are suffering so in the army. We can\'t do much, but we can make our little sacrifices, and ought to do it gladly. But I am afraid I don\'t And Meg shook her head, as she thought regretfully of all the pretty things she wanted.</p><p> But I don\'t think the little we should spend would do any good. We\'ve each got a dollar, and the army wouldn\'t be much helped by our giving that. I agree not to expect anything from Mother or you, but I do want to buy UNDINE AND SINTRAM for myself. I\'ve wanted it so long, said Jo, who was a bookworm.</p><p> I planned to spend mine in new music, said Beth, with a little sigh, which no one heard but the hearth brush and kettle holder.</p><p> I shall get a nice box of Faber\'s drawing pencils. I really need them, said Amy decidedly.</p><p> Mother didn\'t say anything about our money, and she won\'t wish us to give up everything. Let\'s each buy what we want, and have a little fun. I\'m sure we work hard enough to earn it, cried Jo, examining the heels of her shoes in a gentlemanly manner.</p><p> I know I do—teaching those tiresome children nearly all day, when I\'m longing to enjoy myself at home, began Meg, in the complaining tone again.</p><p> You don\'t have half such a hard time as I do, said Jo. How would you like to be shut up for hours with a nervous, fussy old lady, who keeps you trotting, is never satisfied, and worries you till you you\'re ready to fly out the window or cry? </p><p> It\'s naughty to fret, but I do think washing dishes and keeping things tidy is the worst work in the world. It makes me cross, and my hands get so stiff, I can\'t practice well at all. And Beth looked at her rough hands with a sigh that any one could hear that time.</p><p> I don\'t believe any of you suffer as I do, cried Amy, for you don\'t have to go to school with impertinent girls, who plague you if you don\'t know your lessons, and laugh at your dresses, and label your father if he isn\'t rich, and insult you when your nose isn\'t nice. </p><p> If you mean libel, I\'d say so, and not talk about labels, as if Papa was a pickle bottle, advised Jo, laughing.</p><p> I know what I mean, and you needn\'t be satirical about it. It\'s proper to use good words, and improve your vocabulary, returned Amy, with dignity.</p><p> Don\'t peck at one another, children. Don\'t you wish we had the money Papa lost when we were little, Jo? Dear me! How happy and good we\'d be, if we had no worries! said Meg, who could remember better times.</p><p> You said the other day you thought we were a deal happier than the King children, for they were fighting and fretting all the time, in spite of their money. </p><p> So I did, Beth. Well, I think we are. For though we do have to work, we make fun of ourselves, and are a pretty jolly set, as Jo would say. </p><p> Jo does use such slang words! observed Amy, with a reproving look at the long figure stretched on the rug.</p><p>Jo immediately sat up, put her hands in her pockets, and began to whistle.</p><p> Don\'t, Jo. It\'s so boyish! </p><p> That\'s why I do it. </p><p> I detest rude, unladylike girls! </p><p> I hate affected, niminy-piminy chits! </p><p> Birds in their little nests agree, sang Beth, the peacemaker, with such a funny face that both sharp voices softened to a laugh, and the pecking ended for that time.</p><p> Really, girls, you are both to be blamed, said Meg, beginning to lecture in her elder-sisterly fashion. You are old enough to leave off boyish tricks, and to behave better, Josephine. It didn\'t matter so much when you were a little girl, but now you are so tall, and turn up your hair, you should remember that you are a young lady. </p><p> I\'m not! And if turning up my hair makes me one, I\'ll wear it in two tails till I\'m twenty, cried Jo, pulling off her net, and shaking down a chestnut mane. I hate to think I\'ve got to grow up, and be Miss March, and wear long gowns, and look as prim as a China Aster! It\'s bad enough to be a girl, anyway, when I like boy\'s games and work and manners! I can\'t get over my disappointment in not being a boy. And it\'s worse than ever now, for I\'m dying to go and fight with Papa. And I can only stay home and knit, like a poky old woman! </p><p>And Jo shook the blue army sock till the needles rattled like castanets, and her ball bounded across the room.</p><p> Poor Jo! It\'s too bad, but it can\'t be helped. So you must try to be contented with making your name boyish, and playing brother to us girls, said Beth, stroking the rough head with a hand that all the dish washing and dusting in the world could not make ungentle in its touch.</p><p> As for you, Amy, continued Meg, you are altogether to particular and prim. Your airs are funny now, but you\'ll grow up an affected little goose, if you don\'t take care. I I like your nice manners and refined ways of speaking, when you don\'t try to be elegant. But your absurd words are as bad as Jo\'s slang. </p><p> If Jo is a tomboy and Amy a goose, what am I, please? asked Beth, ready to share the lecture.</p><p> You\'re a dear, and nothing else, answered Meg warmly, and no one contradicted her, for the \'Mouse\' was the pet of the family.</p> - -</body></html>'; - -//============================================================== -//============================================================== -//============================================================== - - -include("../mpdf.php"); - -$mpdf=new mPDF('c','A4','','',32,25,27,25,16,13); - -$mpdf->mirrorMargins = 1; -$mpdf->SetDisplayMode('fullpage','two'); -$mpdf->useOnlyCoreFonts = true; -$mpdf->defaultfooterfontsize = 13; -$mpdf->AddPage(); -$mpdf->Image('clematis.jpg',0,0,210,297,'jpg','',true, false); // e.g. the last "false" allows a full page picture -$mpdf->y = 70; -$mpdf->Shaded_box('mPDF Example File', 'Arial', '', 28, '70%', 'DF', 3, '#FFFFFF', '#000044', 10); - -$mpdf->AddPage(); -$mpdf->SetFooter('{PAGENO}'); -$mpdf->WriteHTML($html); - - -$mpdf->AddPage('','NEXT-EVEN'); -$mpdf->SetFooter(); -$mpdf->SetAlpha(0.5); -$mpdf->Image('clematis.jpg',0,0,210,297,'jpg','',true, false); // e.g. the last "false" allows a full page picture -$mpdf->SetAlpha(1); - -$mpdf->writeBarcode('978-0-9542246-0-8', 1, 130, 230, 1,0, 3,3,4,4); - -// Save the pages to a file -$mpdf->Output('test.pdf','F'); -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - -function GetBookletPages($np, $backcover=true) { - $lastpage = $np; - $np = 4*ceil($np/4); - $pp = array(); - for ($i=1; $i<=$np/2; $i++) { - $p1 = $np - $i + 1; - if ($backcover) { - if ($i == 1) { $p1 = $lastpage; } - else if ($p1 >= $lastpage) { $p1 = 0; } - } - if ($i % 2 == 1) { - $pp[] = array( $p1, $i ); - } - else { - $pp[] = array( $i, $p1 ); - } - } - return $pp; -} - - - -$mpdf=new mPDF('','A4-L','','',0,0,0,0,0,0); -$mpdf->SetImportUse(); -$ow = $mpdf->h; -$oh = $mpdf->w; -$pw = $mpdf->w / 2; -$ph = $mpdf->h; - -$mpdf->SetDisplayMode('fullpage'); - -$pagecount = $mpdf->SetSourceFile('test.pdf'); -$pp = GetBookletPages($pagecount); - -foreach($pp AS $v) { - $mpdf->AddPage(); - if ($v[0]>0 && $v[0]<=$pagecount) { - $tplIdx = $mpdf->ImportPage($v[0], 0,0,$ow,$oh); - $mpdf->UseTemplate($tplIdx, 0, 0, $pw, $ph); - } - if ($v[1]>0 && $v[1]<=$pagecount) { - $tplIdx = $mpdf->ImportPage($v[1], 0,0,$ow,$oh); - $mpdf->UseTemplate($tplIdx, $pw, 0, $pw, $ph); - } -} - -$mpdf->Output(); - -exit; - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example44_MPDFI_yearbook.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example44_MPDFI_yearbook.php deleted file mode 100644 index 2420b9f36fffde279803a9ab09a188c5365b07ea..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example44_MPDFI_yearbook.php +++ /dev/null @@ -1,150 +0,0 @@ -<?php - -// First write all your entries to a PDF file, forcing each entry to fit on one page -include("../mpdf.php"); - -// Define the maximum containing box width & height for each text box as it will appear on the final page (no padding or margin here) -$pw = 80; -$ph = 110; -$minK = 0.7; // Maximum scaling factor 0.7 = 70% -$inc = 0.01; // Increment to change scaling factor 0.05 = 5% -$spacing = 10; // millimetres (vertically and horizonatlly between boxes in output) shrinks if boxes too big -$border = 3; // millimetres round final boxes (-1 for no border) -$align = 'T'; // T(op) or M(iddle) for content of final output boxes - -// Only change the first parameter of the next line e.g. utf-8 -$mpdf = new mPDF('', array(($pw*(1/$minK)),($ph*(1/$minK))), '','', 0,($pw*(1/$minK))-$pw,0,($ph*(1/$minK))-$ph,0,0); - -$pph = array(); - - -// FOR EACH ENTRY FOR YOUR YEARBOOK saving the page height in $pph (where $html is the HTML code for the entry): -// $pph[$i] = SinglePage($html, $pw, $ph, $minK); - -//============================================================== -// .. but we will use this for an example - -$html1 = ' -<style> -div { text-align: justify; } -</style> -<h2>Joanne Smith 2002-2007</h2><div>This is the normal text in the div: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque, <img src="tiger.wmf" width="100" style="float: right; margin: 4px; " /> risus at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed,<img src="tiger.jpg" width="100" style="float: left; margin: 4px; " /> nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </div> -'; - -$html2 = ' -<style> -div { text-align: justify; } -</style> -<h2>Tim Another 2001-2007</h2><div>This is the normal text in the div: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque, <img src="tiger.jpg" width="100" style="float: right; margin: 4px; " /> risus at eleifend lacus sapien et risus. Phasellus metus, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. <br /> -Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </div> -'; - -for($i=1; $i<=10; $i++) { - // $html = $html; - if ($i % 3 == 1) { $html = $html2; } - else { $html = $html1; } - $pph[$i] = SinglePage($html, $pw, $ph, $minK) ; // $pph saves the actual height of each page -} -//============================================================== -// Save the pages to a file -$mpdf->Output('test.pdf','F'); - -// Now collate those pages using IMPORT - 4 pages to one page - -$mpdf=new mPDF(); -$mpdf->SetImportUse(); -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->SetHeader('{DATE j-m-Y}|My Yearbook 2005|{PAGENO}'); -$mpdf->SetFooter('|Printed using mPDF|'); - -$pagecount = $mpdf->SetSourceFile('test.pdf'); -for($i=1; $i<=$pagecount; $i++) { - if ($i % 4 == 1) { $mpdf->AddPage(); } - $pgheight = $mpdf->h - $mpdf->tMargin - $mpdf->bMargin; - $hspacing = min($spacing,($mpdf->pgwidth - $pw*2) ); - $vspacing = min($spacing,($pgheight - $ph*2) ); - $x1 = $mpdf->lMargin + ($mpdf->pgwidth/2 - $hspacing/2 - $pw)/2; - $x2 = $mpdf->lMargin + $mpdf->pgwidth/2 + $hspacing/2 + ($mpdf->pgwidth/2 - $hspacing/2 - $pw)/2; - $y1 = $mpdf->tMargin + ($pgheight /2 - $vspacing/2 - $ph)/2; - $y2 = $mpdf->tMargin + $pgheight /2 + $vspacing/2 + ($pgheight /2 - $vspacing/2 - $ph)/2; - if ($i % 4 == 1) { $x = $x1; $y = $y1; } - else if ($i % 4 == 2) { $x = $x2; $y = $y1; } - else if ($i % 4 == 3) { $x = $x1; $y = $y2; } - else if ($i % 4 == 0) { $x = $x2; $y = $y2; } - $tplIdx = $mpdf->ImportPage($i, 0,0,$pw,$pph[$i]); - - if ($align=='T') { $mpdf->UseTemplate($tplIdx, $x, $y, $pw, $pph[$i]); } - else { $mpdf->UseTemplate($tplIdx, $x, ($y + (($ph - $pph[$i])/2)), $pw, $pph[$i]); } - - if ($border >= 0) { $mpdf->Rect($x-$border, $y-$border, $pw+2*$border, $ph+2*$border); } -} - -$mpdf->Output(); - -exit; - -//============================================================== -function SinglePage($html, $pw, $ph, $minK=1, $inc=0.1) { -// returns height of page -global $mpdf; - $mpdf->AddPage('','','','','','',($mpdf->w - $pw),'',($mpdf->h - $ph),0,0); - $k = 1; - - $currpage = $mpdf->page; - $mpdf->WriteHTML($html); - - $newpage = $mpdf->page; - while($currpage != $newpage) { - for($u=0;$u<=($newpage-$currpage);$u++) { - // DELETE PAGE - the added page - unset($mpdf->pages[$mpdf->page]); - if (isset($mpdf->ktAnnots[$mpdf->page])) { unset( $mpdf->ktAnnots[$mpdf->page] ); } - if (isset($mpdf->tbrot_Annots[$mpdf->page])) { unset( $mpdf->tbrot_Annots[$mpdf->page] ); } - if (isset($mpdf->kwt_Annots[$mpdf->page])) { unset( $mpdf->kwt_Annots[$mpdf->page] ); } - if (isset($mpdf->PageAnnots[$mpdf->page])) { unset( $mpdf->PageAnnots[$mpdf->page] ); } - if (isset($mpdf->ktBlock[$mpdf->page])) { unset( $mpdf->ktBlock[$mpdf->page] ); } - if (isset($mpdf->PageLinks[$mpdf->page])) { unset( $mpdf->PageLinks[$mpdf->page] ); } - if (isset($mpdf->pageoutput[$mpdf->page])) { unset( $mpdf->pageoutput[$mpdf->page] ); } - // Go to page before - so can addpage - $mpdf->page--; - } - // mPDF 2.4 Float Images - if (count($mpdf->floatbuffer)) { - $mpdf->objectbuffer[] = $mpdf->floatbuffer['objattr']; - $mpdf->printobjectbuffer(false); - $mpdf->objectbuffer = array(); - $mpdf->floatbuffer = array(); - $mpdf->float = false; - } - - - $k += $inc; - if ((1/$k) < $minK) { die("Page no. ".$mpdf->page." is too large to fit"); } - $w = $pw * $k; - $h = $ph * $k; - $mpdf->_beginpage('','',($mpdf->w - $w),'',($mpdf->h - $h)); - $currpage = $mpdf->page; - - $mpdf->_out('2 J'); - $mpdf->_out(sprintf('%.2f w',0.1*$mpdf->k)); - $mpdf->SetFont($mpdf->default_font,'',$mpdf->default_font_size ,true,true); // forces write - $mpdf->SetDrawColor(0); - $mpdf->SetFillColor(255); - $mpdf->SetTextColor(0); - $mpdf->ColorFlag=false; - - // Start Transformation - $mpdf->StartTransform(); - $mpdf->transformScale((100/$k), (100/$k), 0, 0); - - $mpdf->WriteHTML($html); - - $newpage = $mpdf->page; - - //Stop Transformation - $mpdf->StopTransform(); - } - return ($mpdf->y / $k); -} -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example46_progress_bars_simple.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example46_progress_bars_simple.php deleted file mode 100644 index 8c60b29235ccfd7f5bc7d2f9582e50b99ec07fde..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example46_progress_bars_simple.php +++ /dev/null @@ -1,1608 +0,0 @@ -<?php - -//============================================================== -//============================================================== -define("_JPGRAPH_PATH", '../../jpgraph_5/jpgraph/'); // must define this before including mpdf.php file -$JpgUseSVGFormat = true; - -define('_MPDF_URI','../'); // must be a relative or absolute URI - not a file system path -//============================================================== -//============================================================== - - -ini_set("memory_limit","64M"); - -$html = ' -<html><head> - <meta http-equiv="Content-Language" content="en-GB"> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <style> - body { font-family:"Times New Roman"; font-size:10pt; } - p.littlewomen { margin: 0; font-family: sans-serif; text-align: justify; } - - h1, h2, h3, h4, h5, h6 { font-family: DejaVuSansCondensed; } - table {font-family: DejaVuSansCondensed; font-size: 9pt; line-height: 1.2; - vertical-align: top; - margin-top: 2pt; margin-bottom: 5pt; - border-collapse: collapse; } - - thead { font-weight: bold; vertical-align: bottom; } - - th { font-weight: bold; - text-align:left; - padding-left: 2mm; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - td { padding-left: 2mm; - text-align:left; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - th p { text-align: left; margin:0pt; } - td p { text-align: left; margin:0pt; } - - table.widecells td { - padding-left: 5mm; - padding-right: 5mm; - } - table.tallcells td { - padding-top: 3mm; - padding-bottom: 3mm; - } .sub td { vertical-align:top; border-top:0px; border-bottom:0px; padding:2px; padding-right:8px; - margin:0; font-size:9pt; } - .sub { align:center; border:#888888 1px solid; } - thead td { font-weight: bold; } - - table.nested { - border-collapse: separate; - border: 4px solid #880000; - padding: 3px; - margin: 0px 20px 0px 20px; - empty-cells: hide; - background-color:#FFFFCC; - } - table.nested td { - border: 1px solid #008800; - padding: 0px; - background-color:#ECFFDF; - } - table.outer2 { - border-collapse: separate; - border: 4px solid #088000; - padding: 3px; - margin: 10px 0px; - empty-cells: hide; - background-color: yellow; - } - table.outer2 td { - font-family: Times; - border: 1px solid #008800; - padding: 0px; - background-color:#ECFFDF; - } - table.inner { - border-collapse: collapse; - border: 2px solid #000088; - padding: 3px; - margin: 5px; - empty-cells: show; - background-color:#FFCCFF; - } - table.inner td { - border: 1px solid #000088; - padding: 0px; - font-family: monospace; - font-style: italic; - font-weight: bold; - color: #880000; - background-color:#FFECDF; - } - table.collapsed { - border-collapse: collapse; - } - table.collapsed td { - background-color:#EDFCFF; - } - .headerrow td, .headerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - .footerrow td, .footerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - - .evenrow td, .evenrow th { background-color: #f5f8f5; } - .oddrow td, .oddrow th { background-color: #e3ece4; } - - .bpmTopic { background-color: #e3ece4; } - .bpmTopicC { background-color: #e3ece4; } - .bpmNoLines { background-color: #e3ece4; } - .bpmNoLinesC { background-color: #e3ece4; } - .bpmClear { } - .bpmClearC { text-align: center; } - .bpmTopnTail { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailC { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailClear { topntail: 0.02cm solid #495b4a; } - .bpmTopnTailClearC { topntail: 0.02cm solid #495b4a; } - - .bpmTopicC td, .bpmTopicC td p { text-align: center; } - .bpmNoLinesC td, .bpmNoLinesC td p { text-align: center; } - .bpmClearC td, .bpmClearC td p { text-align: center; } - .bpmTopnTailC td, .bpmTopnTailC td p { text-align: center; } - .bpmTopnTailClearC td, .bpmTopnTailClearC td p { text-align: center; } - - .pmhMiddleCenter { text-align:center; vertical-align:middle; } - .pmhMiddleRight { text-align:right; vertical-align:middle; } - .pmhBottomCenter { text-align:center; vertical-align:bottom; } - .pmhBottomRight { text-align:right; vertical-align:bottom; } - .pmhTopCenter { text-align:center; vertical-align:top; } - .pmhTopRight { text-align:right; vertical-align:top; } - .pmhTopLeft { text-align:left; vertical-align:top; } - .pmhBottomLeft { text-align:left; vertical-align:bottom; } - .pmhMiddleLeft { text-align:left; vertical-align:middle; } - - .bpmTopic td, .bpmTopic th { border-top: 1px solid #FFFFFF; } - .bpmTopicC td, .bpmTopicC th { border-top: 1px solid #FFFFFF; } - .bpmTopnTail td, .bpmTopnTail th { border-top: 1px solid #FFFFFF; } - .bpmTopnTailC td, .bpmTopnTailC th { border-top: 1px solid #FFFFFF; } - .lista { list-style-type: upper-roman; } - .listb{ list-style-type: decimal; font-family: sans-serif; color: blue; font-weight: bold; font-style: italic; font-size: 19pt; } - .listc{ list-style-type: upper-alpha; text-indent: 25mm; } - .listd{ list-style-type: lower-alpha; color: teal; line-height: 2; } - .liste{ list-style-type: disc; } - - .roundgradient { - border:0.05mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - border-radius: 10mm / 10mm; - background-clip: border-box; - padding: 3.3mm; - } - .phpcode { - border:1px solid #555555; - background-color: #DDDDDD; - padding: 1em; - font-size:8pt; - font-family: lucidaconsole, mono; - } - </style> -</head><body> - -<!-- DEFINE HEADERS & FOOTERS --> -<htmlpageheader name="myHTMLHeaderOdd"> -<div style="font-family:sans-serif; background-color:#BBEEFF" align="center"><b>mPDF Example File</b></div> -</htmlpageheader> -<htmlpageheader name="myHTMLHeaderEven"> -<div style="font-family:sans-serif; background-color:#EFFBBE" align="center"><b><i>mPDF Example File</i></b></div> -</htmlpageheader> -<htmlpagefooter name="myHTMLFooterOdd" style="display:none"> -<div style="font-family:sans-serif; background-color:#CFFFFC" align="center"><b>{PAGENO}/{nbpg}</b></div> -</htmlpagefooter> -<htmlpagefooter name="myHTMLFooterEven" style="display:none"> -<div style="font-family:sans-serif; background-color:#FFCCFF" align="center"><b><i>{PAGENO}/{nbpg}</i></b></div> -</htmlpagefooter> - -<pagefooter name="myFooter2Odd" content-left="" content-center="mPDF Example File" content-right="{PAGENO}/{nbpg}" footer-style="font-family:sans-serif; font-size:9pt; font-weight:bold; color:#000088;" footer-style-right="font-weight: bold;" line="on" /> - -<pagefooter name="myFooter2Even" content-left="{PAGENO}/{nbpg}" content-center="mPDF Example File" content-right="{DATE j-m-Y}" footer-style="font-family:sans-serif; font-size:10pt; color:#880000;" footer-style-left="font-weight:bold;" line="on" /> - - -<!-- FRONT COVER --> -<div style="position: absolute; left:0; right: 0; top: 0; bottom: 0;"> -<img src="clematis.jpg" style="width: 210mm; height: 297mm; margin: 0;" /> -</div> - -<div style="position: absolute; left:32mm; right: 25mm; top: 70mm; width: 58%; margin-right: auto; margin-left:auto; "> -<div style="padding: 1em; font-family: Arial; font-weight: bold; font-size: 28pt; border: 3px solid #000044; border-radius: 5mm; background-clip: border-box; color: #000044; background-color: #FFFFFF;"> -mPDF Example File -</div> -</div> - -<pagebreak /> - -<p>The front cover can also be produced like this:</p> -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->Image(\'clematis.jpg\',0,0,210,297,\'jpg\',\'\',true, false); -// the last "false" allows a full page picture - -$mpdf->y = 70; -$mpdf->Shaded_box(\'mPDF Example File\', \'Trebuchet\', \'\', 28, \'70%\', \'DF\', 3, \'#FFFFFF\', \'#000044\', 10); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - - -<!-- TABLES OF CONTENTS --> -<tocpagebreak toc-preHTML="<h2>CONTENTS</h2>" links="1" toc-bookmarkText="Contents" resetpagenum="1" pagenumstyle="1" -odd-header-name="html_myHTMLHeaderOdd" odd-header-value="1" even-header-name="html_myHTMLHeaderEven" even-header-value="1" odd-footer-name="myFooter2Odd" odd-footer-value="1" even-footer-name="myFooter2Even" even-footer-value="1" /> - -<tocpagebreak name="Figures" toc-preHTML="<h2>FIGURES</h2>" links="1" toc-bookmarkText="Figures" /> - -<tocpagebreak name="Tables" toc-preHTML="<h2>TABLES</h2>" links="1" toc-bookmarkText="Tables" /> - - - -<!-- SECTION 1 --> -<h1>(H1) mPDF</h1> -<h2>(H2) Section 1<bookmark content="Section 1" level="0" /></h2> -<h3>(H3) HTML Markup<bookmark content="HTML Markup" level="1" /><tocentry name="" content="HTML Markup" level="0" /><indexentry content="HTML Markup" /></h3> - -<tocentry name="" content="HTML Markup" level="1" /> -<tocentry name="" content="HTML Markup" level="2" /> - -<h4>Heading 4</h4> -<h5>Heading 5</h5> -<h6>Heading 6</h6> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<hr /> - -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> - -<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote> - -<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address> - -<pre>PRE: Cum sociis natoque penatibus et magnis dis parturient montes, -nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis -dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras -sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. -Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, -ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui.</pre> - -<div><a href="http://mpdf.bpm1.com/manual/">Hyperlink (<a>)</a></div> - -<div>Styles - <tt>tt(teletype)</tt> <i>italic</i> <b>bold</b> <big>big</big> <small>small</small> <em>emphasis</em> <strong>strong</strong> <br />new lines<br> -<code>code</code> <samp>sample</samp> <kbd>keyboard</kbd> <var>variable</var> <cite>citation</cite> <abbr>abbr.</abbr> <acronym>ACRONYM</acronym> <sup>sup</sup> <sub>sub</sub> <strike>strike</strike> <s>strike-s</s> <u>underline</u> <del>delete</del> <ins>insert</ins> <q>To be or not to be</q> <font face="sans-serif" color="#880000" size="5">font changing face, size and color</font> -</div> - -<p style="font-size:15pt; color:#440066">Paragraph using the in-line style to determine the font-size (15pt) and colour</p> - - -<h3>Testing BIG, SMALL, UNDERLINE, STRIKETHROUGH, FONT color, ACRONYM, SUPERSCRIPT and SUBSCRIPT</h3> -<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline and <s>strikethrough and <sup>sup</sup></s></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p>The above repeated, but starting with a paragraph with font-size specified (7pt)</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <small>small <s>strikethrough</s> in small span</small> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><small>This tests <u>underline</u> and <s>strikethrough</s> when they are <s><u>used together</u></s> as they both use text-decoration</small></p> - - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p style="font-size:7pt;"><big>Repeated in BIG but with font-size set to 7pt by in-line css: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<ol> -<li>Item <b><u>1</u></b></li> -<li>Item 2<sup>32</sup></li> -<li><small>Item</small> 3</li> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. -<ul> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. </li> -<li>Subitem 2 -<ul> -<li> -Level 3 subitem -</li> -</ul> -</li> -</ul> -</li> -<li>Item 5</li> -</ol> - -<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> -<tocentry name="Tables" content="Basic table" level="0" /> -<table border="1" cellpadding="5"> -<thead> -<tr> -<th>Data</th> -<th>Data</th> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</thead> -<tbody> -<tr> -<th>More Data</th> -<td>More Data</td> -<td>More Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</tbody> -</table> - -This paragraph has border-radius and background-gradient set. Minimum padding is recommended as 1/3rd of the border-radius. Or can use $mpdf->autoPadding. -<p class="roundgradient">Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> - - - -<!-- HYPHENATION --> -<pagebreak /> -<h3>Hyphenation<bookmark content="Hyphenation" level="1" /><tocentry name="" content="Hyphenation" level="0" /><indexentry content="Hyphenation" /></h3> - -<h4>Little Women - Chapter One - Playing Pilgrims</h4> -<columns column-count="4" vAlign="J" column-gap="7" /> - -<p class="littlewomen"> Christmas won\'t be Christmas without any presents, grumbled Jo, lying on the rug.</p><p class="littlewomen"> It\'s so dreadful to be poor! sighed Meg, looking down at her old dress.</p><p class="littlewomen"> I don\'t think it\'s fair for some girls to have plenty of pretty things, and other girls nothing at all, added little Amy, with an injured sniff.</p><p class="littlewomen"> We\'ve got Father and Mother, and each other, said Beth contentedly from her corner.</p><p class="littlewomen">The four young faces on which the firelight shone brightened at the cheerful words, but darkened again as Jo said sadly, We haven\'t got Father, and shall not have him for a long time. She didn\'t say perhaps never, but each silently added it, thinking of Father far away, where the fighting was.</p><p class="littlewomen">Nobody spoke for a minute; then Meg said in an altered tone, You know the reason Mother proposed not having any presents this Christmas was because it is going to be a hard winter for everyone; and she thinks we ought not to spend money for pleasure, when our men are suffering so in the army. We can\'t do much, but we can make our little sacrifices, and ought to do it gladly. But I am afraid I don\'t And Meg shook her head, as she thought regretfully of all the pretty things she wanted.</p><p class="littlewomen"> But I don\'t think the little we should spend would do any good. We\'ve each got a dollar, and the army wouldn\'t be much helped by our giving that. I agree not to expect anything from Mother or you, but I do want to buy UNDINE AND SINTRAM for myself. I\'ve wanted it so long, said Jo, who was a bookworm.</p><p class="littlewomen"> I planned to spend mine in new music, said Beth, with a little sigh, which no one heard but the hearth brush and kettle holder.</p><p class="littlewomen"> I shall get a nice box of Faber\'s drawing pencils. I really need them, said Amy decidedly.</p><p class="littlewomen"> Mother didn\'t say anything about our money, and she won\'t wish us to give up everything. Let\'s each buy what we want, and have a little fun. I\'m sure we work hard enough to earn it, cried Jo, examining the heels of her shoes in a gentlemanly manner.</p><p class="littlewomen"> I know I do—teaching those tiresome children nearly all day, when I\'m longing to enjoy myself at home, began Meg, in the complaining tone again.</p><p class="littlewomen"> You don\'t have half such a hard time as I do, said Jo. How would you like to be shut up for hours with a nervous, fussy old lady, who keeps you trotting, is never satisfied, and worries you till you you\'re ready to fly out the window or cry? </p><p class="littlewomen"> It\'s naughty to fret, but I do think washing dishes and keeping things tidy is the worst work in the world. It makes me cross, and my hands get so stiff, I can\'t practice well at all. And Beth looked at her rough hands with a sigh that any one could hear that time.</p><p class="littlewomen"> I don\'t believe any of you suffer as I do, cried Amy, for you don\'t have to go to school with impertinent girls, who plague you if you don\'t know your lessons, and laugh at your dresses, and label your father if he isn\'t rich, and insult you when your nose isn\'t nice. </p><p class="littlewomen"> If you mean libel, I\'d say so, and not talk about labels, as if Papa was a pickle bottle, advised Jo, laughing.</p><p class="littlewomen"> I know what I mean, and you needn\'t be satirical about it. It\'s proper to use good words, and improve your vocabulary, returned Amy, with dignity.</p><p class="littlewomen"> Don\'t peck at one another, children. Don\'t you wish we had the money Papa lost when we were little, Jo? Dear me! How happy and good we\'d be, if we had no worries! said Meg, who could remember better times.</p><p class="littlewomen"> You said the other day you thought we were a deal happier than the King children, for they were fighting and fretting all the time, in spite of their money. </p><p class="littlewomen"> So I did, Beth. Well, I think we are. For though we do have to work, we make fun of ourselves, and are a pretty jolly set, as Jo would say. </p><p class="littlewomen"> Jo does use such slang words! observed Amy, with a reproving look at the long figure stretched on the rug.</p><p class="littlewomen">Jo immediately sat up, put her hands in her pockets, and began to whistle.</p><p class="littlewomen"> Don\'t, Jo. It\'s so boyish! </p><p class="littlewomen"> That\'s why I do it. </p><p class="littlewomen"> I detest rude, unladylike girls! </p><p class="littlewomen"> I hate affected, niminy-piminy chits! </p><p class="littlewomen"> Birds in their little nests agree, sang Beth, the peacemaker, with such a funny face that both sharp voices softened to a laugh, and the pecking ended for that time.</p><p class="littlewomen"> Really, girls, you are both to be blamed, said Meg, beginning to lecture in her elder-sisterly fashion. You are old enough to leave off boyish tricks, and to behave better, Josephine. It didn\'t matter so much when you were a little girl, but now you are so tall, and turn up your hair, you should remember that you are a young lady. </p><p class="littlewomen"> I\'m not! And if turning up my hair makes me one, I\'ll wear it in two tails till I\'m twenty, cried Jo, pulling off her net, and shaking down a chestnut mane. I hate to think I\'ve got to grow up, and be Miss March, and wear long gowns, and look as prim as a China Aster! It\'s bad enough to be a girl, anyway, when I like boy\'s games and work and manners! I can\'t get over my disappointment in not being a boy. And it\'s worse than ever now, for I\'m dying to go and fight with Papa. And I can only stay home and knit, like a poky old woman! </p><p class="littlewomen">And Jo shook the blue army sock till the needles rattled like castanets, and her ball bounded across the room.</p><p class="littlewomen"> Poor Jo! It\'s too bad, but it can\'t be helped. So you must try to be contented with making your name boyish, and playing brother to us girls, said Beth, stroking the rough head with a hand that all the dish washing and dusting in the world could not make ungentle in its touch.</p><p class="littlewomen"> As for you, Amy, continued Meg, you are altogether to particular and prim. Your airs are funny now, but you\'ll grow up an affected little goose, if you don\'t take care. I I like your nice manners and refined ways of speaking, when you don\'t try to be elegant. But your absurd words are as bad as Jo\'s slang. </p><p class="littlewomen"> If Jo is a tomboy and Amy a goose, what am I, please? asked Beth, ready to share the lecture.</p><p class="littlewomen"> You\'re a dear, and nothing else, answered Meg warmly, and no one contradicted her, for the \'Mouse\' was the pet of the family.</p> - -<columns column-count="1" /> - - - - - - -<!-- LISTS --> -<pagebreak /> -<h3>Lists<bookmark content="Lists" level="1" /><tocentry name="" content="Lists" level="0" /><indexentry content="Lists" /></h3> -<div style="background-color:#ddccff; padding:0pt; border: 1px solid #555555;"> -<ol class="lista"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listb"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum. -</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol> -<li>No class specified. Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -</ol> -</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</div> - -<!-- TABLES --> -<pagebreak /> -<h3>Tables<bookmark content="Tables" level="1" /><tocentry name="" content="Tables" level="0" /><tocentry name="Tables" content="Tables - general" level="0" /><indexentry content="Tables" /></h3> -<p>mPDF supports all in-line properties inside tables.</p> -<table border="1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td> -<td> -<p>This is data p</p> -This is data out of p -<p style="font-weight:bold; font-size:20pt; background-color:#FFBBFF;">This is bold data p</p> -<b>This is bold data out of p</b><br /> -This is normal data after br -<h3>Heading 3 inside a table</h3> -Text here lorem <i>ipsum</i> ibisque totum.<sup>32</sup> -<div>This is data div</div> -This is data out of div -<div style="font-weight:bold;">This is data div (bold)</div> -This is data out of div -</td> - -<td>Also data</td></tr> -</tbody></table> - -<p>This table has padding-top and -bottom set to 3mm i.e. padding within the cells. Also background-, border colour and style, font family and size are set by in-line <acronym>CSS</acronym>.</p> -<table style="border: 1px solid #880000; background-color: #BBCCDD; font-family: Mono; font-size: 7pt; " class="tallcells"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td><td><p>This is data p</p></td><td><p>More data</p></td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -</tbody></table> - - -<h4>Tables<bookmark content="Table styles" level="2" /><tocentry name="Tables" content="Table styles" level="0" /><indexentry content="Table:styles" /></h4> -<p>The style sheet used for these examples shows some of the table styles I use on my website. The property \'topntail\' defined by a border-type definition e.g. "1px solid #880000" puts a border at the top and bottom of the table, and also below a header row (thead) if defined. Note also that <thead> will automatically turn on the header-repeat i.e. reproduce the header row at the top of each page.</p> -<p>bpmTopic Class</p> -<table class="bpmTopic"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>More data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopic<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopicC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopnTail Class </p> -<table class="bpmTopnTail"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> -<p> </p> -<p>bpmTopnTail<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopnTailC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>TopnTail Class</p> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td class="pmhBottomRight"><b><i>Bottom right align</i></b></td> -<td> -<p>This is data. Can use</p> -<p><b>bold</b> <i>italic </i><sub>sub</sub> or <sup>sup</sup> text</p> -</td> -</tr> -<tr class="oddrow"><th class="pmhBottomRight"> -<p>Bottom right align</p> -</th> -<td class="pmhMiddleCenter" style="border: #000000 1px solid"> -<p>This is data. This cell</p> -<p>uses Cell Styles to set</p> -<p>the borders.</p> -<p>All borders are collapsible</p> -<p>in mPDF.</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 4</th> -<td> -<p>This is data p</p> -</td> -<td>More data</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td colspan="2" class="pmhTopCenter">Also data merged and centered</td> -</tr> -</tbody></table> - -<p> </p> - -<h4>Lists in a Table<bookmark content="Lists in a table" level="2" /><tocentry name="Tables" content="Lists in a table" level="0" /><indexentry content="Table:lists inside" /></h4> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<ol> -<li>Item 1</li> -<li>Item 2 -<ol type="a"> -<li>Subitem of ordered list</li> -<li>Subitem 2 -<ol type="i"> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ol> -</li> -</ol> -</li> -<li>Item 3</li> -<li>Another Item</li> -<li>Subitem -<ol> -<li>Level 3 subitem</li> -</ol> -</li> -<li>Another Item</li> -</ol> -</td> -<td> -Unordered list: -<ul> -<li>Item 1</li> -<li>Item 2 -<ul> -<li>Subitem of unordered list</li> -<li>Subitem 2 -<ul> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ul> -</li> -</ul> -</li> -<li>Item 3</li> -</ul> -</td> -</tr> -</tbody></table> -<p> </p> - - -<h4>Automatic Column Width<bookmark content="Automatic Column Width" level="2" /><tocentry name="Tables" content="Automatic column width" level="0" /><indexentry content="Table:automatic column width" /></h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td>Causes</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing.</td> -</tr> -</tbody></table> - - -<h4>Column span<bookmark content="Column span" level="2" /><tocentry name="Tables" content="Column span" level="0" /><indexentry content="Table:column span" /></h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -</tr> -</tbody></table> - - - -<h4>Header & Footer Rows<bookmark content="Header Rows" level="2" /><tocentry name="Tables" content="Header rows" level="0" /><indexentry content="Table:header rows" /></h4> -<p>A table using a header or footer row should repeat the header/footer row across pages:</p> -<p>bpmTopic<b>C</b> Class</p> -<table class="bpmTopicC"> -<thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second column header</p> -</td> -<td>Third column header</td> -</tr> -</thead> -<tfoot> -<tr class="headerrow"><th>Col and Row Footer</th> -<td> -<p>Second column footer</p> -</td> -<td>Third column footer</td> -</tr> -</tfoot> -<tbody> -<tr><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr><th>Row header 2</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th> -<p>Row header 3</p> -</th> -<td> -<p>This is data</p> -</td> -<td>This is data</td> -</tr> -<tr><th>Row header 4</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 9</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -</tbody></table> -<p> </p> - -<h4>Autosizing Tables<bookmark content="Autosizing Tables" level="2" /><tocentry name="Tables" content="Autosizing tables" level="0" /><indexentry content="Table:autosizing" /></h4> -<p>Periodic Table of elements. Tables are set by default to reduce font size if complete words will not fit inside each cell, to a maximum of 1/1.4 * the set font-size. This value can be changed by setting $mpdf->shrink_tables_to_fit=1.8 or using html attribute <table autosize="1.8">.</p> - -<h5>Periodic Table</h5> - -<table style="border:1px solid #000000;" cellPadding="14"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td><td colspan="16"></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td>Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td> -<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td><td>Rh </td><td>Pd </td><td>Ag </td><td>Cd </td> -<td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td><td>Au </td> -<td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td>Ac </td><td colspan="15"></td> -</tr> -<tr> -<td colspan="18"></td></tr> -<tr> -<td colspan="3"></td><td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td> -<td>Dy </td><td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td><td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td><td>Cf </td> -<td>Es </td><td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> - -<pagebreak /> - -<h4>Rotated Tables<bookmark content="Rotated Tables" level="2" /><tocentry name="Tables" content="Rotated table" level="0" /><indexentry content="Table:rotated" /></h4> -<p>This is set to rotate -90 degrees (counterclockwise).</p> - -<h5>Periodic Table</h5> -<p> -<table rotate="-90" class="bpmClearC"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td><td colspan="15"></td><td></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td>Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td><td>Cu </td> -<td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td><td>Rh </td><td>Pd </td> -<td>Ag </td><td>Cd </td><td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td><td>Au </td> -<td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td>Ac </td> -</tr> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td colspan="3"></td><td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td><td>Dy </td> -<td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td><td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td> -<td>Cf </td><td>Es </td><td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> -<p> </p> - -<pagebreak /> -<h4>Rotated text in Tables<bookmark content="Rotated text in Tables" level="2" /><tocentry name="Tables" content="Rotated text in table" level="0" /><indexentry content="Table:rotated text" /></h4> - -<h5>Periodic Table</h5> -<table> -<thead> -<tr text-rotate="45"> -<th><p>Element type 1A</p><p>Second line</p><th><p>Element type longer 2A</p></th> -<th>Element type 3B</th><th>Element type 4B</th><th>Element type 5B</th><th>Element type 6B</th><th>7B</th><th>8B</th> -<th>Element type 8B R</th><th>8B</th><th>Element <span>type</span> 1B</th><th>2B</th> -<th>Element type 3A</th><th>Element type 4A</th><th>Element type 5A</th><th>Element type 6A</th><th>7A</th><th>Element type 8A</th> -</tr> -</thead> - -<tbody> -<tr> -<td>H</td><td colspan="15"></td><td></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr style="text-rotate: 45"> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti</td><td>Va</td><td>Cr</td><td>Mn</td><td>Fe</td><td>Co</td><td>Ni </td> -<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td> -<td style="text-align:right; ">Rh</td><td>Pd </td><td>Ag </td><td>Cd </td><td>In </td><td>Sn </td> -<td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td> -<td>Pt </td><td>Au </td><td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td colspan="16">Ac </td> -</tr> -<tr> -<td colspan="3"></td> -<td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td><td>Dy </td> -<td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td><td>Cf </td><td>Es </td> -<td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> - - -<pagebreak /> - - - -<h4>Nested Tables<bookmark content="Nested Tables" level="2" /><tocentry name="Tables" content="Nested tables" level="0" /><indexentry content="Table:nested" /></h4> - -<div style="border: 2px solid #000088; background-color: #DDDDFF; padding: 2mm;"> -Text before table - -<div style="border: 2px solid #008888; background-color: #DCAFCF; padding: 2mm;"> - -<table cellSpacing="2" rotate="-90" align="center" autosize="1.5" class="nested" style="page-break-inside: avoid; "> -<tbody> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id <a href="http://www.dummy.com">euismod auctor</a>, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td></td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -</tbody></table> - -</div> - - - -<p>Text before table</p> - -<table cellSpacing="2" class="outer2" autosize="3" style="page-break-inside:avoid"> -<tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td style="text-align: right;"> -Text before table -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -<p>Text after table</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 3</td> -<td style="text-align: center; vertical-align: middle;"> -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td> -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> -</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td style="vertical-align: bottom; "> -<table cellSpacing="2" class="inner" align="right"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 4</td> -<td>This is data</td> -<td><table cellSpacing="2" class="inner"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td> -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> -</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -</tbody></table> - - -</div> - - -<!-- FORMS --> -<pagebreak /> -<h3>Forms<bookmark content="Forms" level="1" /><tocentry name="" content="Forms" level="0" /><indexentry content="Forms" /></h3> -<form> -<b>Textarea</b> -<textarea name="authors" rows="5" cols="80" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. -Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> -<b>Select</b> -<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> followed by text -<br /><br /> -<b>Input Radio</b> -<input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice -<br /><br /> -<b>Input Text</b> -<input type="text" size="190" name="doi" value="10.1258/jrsm.100.5.211"> -<br /><br /> -<b>Input Password</b> -<input type="password" size="40" name="password" value="secret"> -<br /><br /> -<input type="checkbox" name="QPC" value="ON" > Checkboxes<br> -<input type="checkbox" name="QPA" value="ON" > Not selected<br> -<input type="checkbox" name="QPA" value="ON" disabled="disabled"> Disabled<br> -<input type="checkbox" name="QLY" value="ON" checked="checked" > Selected -<br /><br /> -<input type="submit" name="submit" value="Submit" /> -<input type="image" name="submit" src="goto.gif" /> -<input type="button" name="submit" value="Button" /> -<input type="reset" name="submit" value="Reset" /> -<br /><br /> -</form> - - -<!-- ANNOTATIONS --> -<pagebreak /> -<h3>Annotations<bookmark content="Annotations" level="1" /><tocentry name="" content="Annotations" level="0" /><indexentry content="Annotations" /></h3> -<p>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate.<annotation content="This is an annotation'."\n".'in the middle of the text" subject="My Subject" icon="Comment" color="#FE88EF" author="Ian Back" /> Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. <i>Fusce</i><annotation content="Fusce is a funny word!" subject="Idle Comments" icon="Note" author="Ian Back" pos-x="198" /> eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -<!-- GRAPH --> -<pagebreak /> -<h3>Graphs<bookmark content="Graphs" level="1" /><tocentry name="" content="Graphs" level="0" /><indexentry content="Graphs" /></h3> -<table id="tbl_1" class="sub"><tbody><tr><td></td><td align="right"><b>Female</b></td><td align="right"><b>Male</b></td></tr><tr><td>35 - 44</td><td align="right"><b>4</b></td><td align="right"><b>2</b></td></tr><tr><td>45 - 54</td><td align="right"><b>5</b></td><td align="right"><b>7</b></td></tr><tr><td>55 - 64</td><td align="right"><b>21</b></td><td align="right"><b>18</b></td></tr><tr><td>65 - 74</td><td align="right"><b>11</b></td><td align="right"><b>14</b></td></tr><tr><td>75 - 84</td><td align="right"><b>10</b></td><td align="right"><b>10</b></td></tr><tr><td>85 - 94</td><td align="right"><b>2</b></td><td align="right"><b>1</b></td></tr><tr><td>95 - 104</td><td align="right"><b>1</b></td><td align="right"><b></b></td></tr> -<tr><td>TOTAL</td><td align="right">54</td><td align="right">52</td></tr> -</tbody></table> - -<h5>Subscriptions for 2008-09<tocentry name="Figures" content="Graph: Subscriptions for 2008-09" /></h5> -<jpgraph table="tbl_1" type="bar" stacked="0" dpi="300" title="New subscriptions" splines="1" bandw="0" antialias="1" label-y="% patients" label-x="Age group" axis-x="text" axis-y="lin" percent="0" series="cols" data-col-begin="2" data-row-begin="2" data-col-end="0" data-row-end="-1" show-values="1" width="600" legend-overlap="1" hide-grid="1" hide-y-axis="1" /> - - - -<!-- FULL IMAGES & BARCODE --> -<pagebreak /> -<h3>Full Images & Barcode<bookmark content="Full Images & Barcode" level="1" /><tocentry name="Figures" content="Full size image & Barcode" level="0" /><indexentry content="Image:full-size" /><tocentry name="" content="Barcode" level="0" /><indexentry content="Barcode" /></h3> -<p>On the first and last page of this document, an image is reproduced full page size by placing it inside a DIV element with CSS "position:absolute". In all other situations, images are constrained to the width and height of the printable page (i.e. inside the margins). The image on the back page has CSS "opacity:0.5".</p> - - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->SetAlpha(0.5); -$mpdf->Image(\'clematis.jpg\',0,0,210,297,\'jpg\',\'\',true, false); -// the last "false" allows a full page picture -$mpdf->SetAlpha(1); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - -<p>The back cover also has an ISBN barcode</p> - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->writeBarcode(\'978-0-9542246-0-8\', 1, 130, 230, 1,0, 3,3,4,4); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - -<p>But next is inserted the Index, which can also be done like this:</p> - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->AddPage(\'\',NEXT-ODD\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',-1,-1,-1,-1); -$mpdf->WriteHTML(\'<h2>Index<bookmark content="Index" /></h2>\'); -$mpdf->WriteHTML(\'<indexinsert cols="2" font="serif" div-font="sans-serif" links="on" />\'); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - - - -<!-- INDEX --> -<pagebreak type="NEXT-ODD" odd-header-value="-1" even-header-value="-1" odd-footer-value="-1" even-footer-value="-1" /> -<h2>Index<bookmark content="Index" /></h2> -<indexinsert cols="2" font="serif" div-font="sans-serif" links="on" /> - - - -<!-- BACK COVER & BARCODE --> -<pagebreak type="NEXT-EVEN" /> -<div style="position: absolute; left:0; right: 0; top: 0; bottom: 0;"> -<img src="clematis.jpg" style="width: 210mm; height: 297mm; margin: 0; opacity: 0.5;" /> -</div> - -<div style="position: absolute; right: 35mm; bottom: 35mm; "> -<barcode code="978-0-9542246-0" type="ISBN" style="padding: 2.5mm; border: 0.1mm solid #000000;" height="0.66" text="1" /> -</div> - - - -</body></html>'; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('s','A4','','',25,15,21,22,10,10); - -$mpdf->StartProgressBarOutput(); - -$mpdf->mirrorMargins = 1; -$mpdf->SetDisplayMode('fullpage','two'); -$mpdf->useGraphs = true; -$mpdf->list_number_suffix = ')'; -$mpdf->hyphenate = true; - -$mpdf->debug = true; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example47_progress_bars_simple_custom.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example47_progress_bars_simple_custom.php deleted file mode 100644 index 69f11e8cd694396844297530012e55d11ab83dbf..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example47_progress_bars_simple_custom.php +++ /dev/null @@ -1,1609 +0,0 @@ -<?php - -//============================================================== -//============================================================== -define("_JPGRAPH_PATH", '../../jpgraph_5/jpgraph/'); // must define this before including mpdf.php file -$JpgUseSVGFormat = true; - -define('_MPDF_URI','../'); // must be a relative or absolute URI - not a file system path -//============================================================== -//============================================================== - - -ini_set("memory_limit","64M"); - -$html = ' -<html><head> - <meta http-equiv="Content-Language" content="en-GB"> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <style> - body { font-family:"Times New Roman"; font-size:10pt; } - p.littlewomen { margin: 0; font-family: sans-serif; text-align: justify; } - - h1, h2, h3, h4, h5, h6 { font-family: DejaVuSansCondensed; } - table {font-family: DejaVuSansCondensed; font-size: 9pt; line-height: 1.2; - vertical-align: top; - margin-top: 2pt; margin-bottom: 5pt; - border-collapse: collapse; } - - thead { font-weight: bold; vertical-align: bottom; } - - th { font-weight: bold; - text-align:left; - padding-left: 2mm; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - td { padding-left: 2mm; - text-align:left; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - th p { text-align: left; margin:0pt; } - td p { text-align: left; margin:0pt; } - - table.widecells td { - padding-left: 5mm; - padding-right: 5mm; - } - table.tallcells td { - padding-top: 3mm; - padding-bottom: 3mm; - } .sub td { vertical-align:top; border-top:0px; border-bottom:0px; padding:2px; padding-right:8px; - margin:0; font-size:9pt; } - .sub { align:center; border:#888888 1px solid; } - thead td { font-weight: bold; } - - table.nested { - border-collapse: separate; - border: 4px solid #880000; - padding: 3px; - margin: 0px 20px 0px 20px; - empty-cells: hide; - background-color:#FFFFCC; - } - table.nested td { - border: 1px solid #008800; - padding: 0px; - background-color:#ECFFDF; - } - table.outer2 { - border-collapse: separate; - border: 4px solid #088000; - padding: 3px; - margin: 10px 0px; - empty-cells: hide; - background-color: yellow; - } - table.outer2 td { - font-family: Times; - border: 1px solid #008800; - padding: 0px; - background-color:#ECFFDF; - } - table.inner { - border-collapse: collapse; - border: 2px solid #000088; - padding: 3px; - margin: 5px; - empty-cells: show; - background-color:#FFCCFF; - } - table.inner td { - border: 1px solid #000088; - padding: 0px; - font-family: monospace; - font-style: italic; - font-weight: bold; - color: #880000; - background-color:#FFECDF; - } - table.collapsed { - border-collapse: collapse; - } - table.collapsed td { - background-color:#EDFCFF; - } - .headerrow td, .headerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - .footerrow td, .footerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - - .evenrow td, .evenrow th { background-color: #f5f8f5; } - .oddrow td, .oddrow th { background-color: #e3ece4; } - - .bpmTopic { background-color: #e3ece4; } - .bpmTopicC { background-color: #e3ece4; } - .bpmNoLines { background-color: #e3ece4; } - .bpmNoLinesC { background-color: #e3ece4; } - .bpmClear { } - .bpmClearC { text-align: center; } - .bpmTopnTail { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailC { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailClear { topntail: 0.02cm solid #495b4a; } - .bpmTopnTailClearC { topntail: 0.02cm solid #495b4a; } - - .bpmTopicC td, .bpmTopicC td p { text-align: center; } - .bpmNoLinesC td, .bpmNoLinesC td p { text-align: center; } - .bpmClearC td, .bpmClearC td p { text-align: center; } - .bpmTopnTailC td, .bpmTopnTailC td p { text-align: center; } - .bpmTopnTailClearC td, .bpmTopnTailClearC td p { text-align: center; } - - .pmhMiddleCenter { text-align:center; vertical-align:middle; } - .pmhMiddleRight { text-align:right; vertical-align:middle; } - .pmhBottomCenter { text-align:center; vertical-align:bottom; } - .pmhBottomRight { text-align:right; vertical-align:bottom; } - .pmhTopCenter { text-align:center; vertical-align:top; } - .pmhTopRight { text-align:right; vertical-align:top; } - .pmhTopLeft { text-align:left; vertical-align:top; } - .pmhBottomLeft { text-align:left; vertical-align:bottom; } - .pmhMiddleLeft { text-align:left; vertical-align:middle; } - - .bpmTopic td, .bpmTopic th { border-top: 1px solid #FFFFFF; } - .bpmTopicC td, .bpmTopicC th { border-top: 1px solid #FFFFFF; } - .bpmTopnTail td, .bpmTopnTail th { border-top: 1px solid #FFFFFF; } - .bpmTopnTailC td, .bpmTopnTailC th { border-top: 1px solid #FFFFFF; } - .lista { list-style-type: upper-roman; } - .listb{ list-style-type: decimal; font-family: sans-serif; color: blue; font-weight: bold; font-style: italic; font-size: 19pt; } - .listc{ list-style-type: upper-alpha; text-indent: 25mm; } - .listd{ list-style-type: lower-alpha; color: teal; line-height: 2; } - .liste{ list-style-type: disc; } - - .roundgradient { - border:0.05mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - border-radius: 10mm / 10mm; - background-clip: border-box; - padding: 3.3mm; - } - .phpcode { - border:1px solid #555555; - background-color: #DDDDDD; - padding: 1em; - font-size:8pt; - font-family: lucidaconsole, mono; - } - </style> -</head><body> - -<!-- DEFINE HEADERS & FOOTERS --> -<htmlpageheader name="myHTMLHeaderOdd"> -<div style="font-family:sans-serif; background-color:#BBEEFF" align="center"><b>mPDF Example File</b></div> -</htmlpageheader> -<htmlpageheader name="myHTMLHeaderEven"> -<div style="font-family:sans-serif; background-color:#EFFBBE" align="center"><b><i>mPDF Example File</i></b></div> -</htmlpageheader> -<htmlpagefooter name="myHTMLFooterOdd" style="display:none"> -<div style="font-family:sans-serif; background-color:#CFFFFC" align="center"><b>{PAGENO}/{nbpg}</b></div> -</htmlpagefooter> -<htmlpagefooter name="myHTMLFooterEven" style="display:none"> -<div style="font-family:sans-serif; background-color:#FFCCFF" align="center"><b><i>{PAGENO}/{nbpg}</i></b></div> -</htmlpagefooter> - -<pagefooter name="myFooter2Odd" content-left="" content-center="mPDF Example File" content-right="{PAGENO}/{nbpg}" footer-style="font-family:sans-serif; font-size:9pt; font-weight:bold; color:#000088;" footer-style-right="font-weight: bold;" line="on" /> - -<pagefooter name="myFooter2Even" content-left="{PAGENO}/{nbpg}" content-center="mPDF Example File" content-right="{DATE j-m-Y}" footer-style="font-family:sans-serif; font-size:10pt; color:#880000;" footer-style-left="font-weight:bold;" line="on" /> - - -<!-- FRONT COVER --> -<div style="position: absolute; left:0; right: 0; top: 0; bottom: 0;"> -<img src="clematis.jpg" style="width: 210mm; height: 297mm; margin: 0;" /> -</div> - -<div style="position: absolute; left:32mm; right: 25mm; top: 70mm; width: 58%; margin-right: auto; margin-left:auto; "> -<div style="padding: 1em; font-family: Arial; font-weight: bold; font-size: 28pt; border: 3px solid #000044; border-radius: 5mm; background-clip: border-box; color: #000044; background-color: #FFFFFF;"> -mPDF Example File -</div> -</div> - -<pagebreak /> - -<p>The front cover can also be produced like this:</p> -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->Image(\'clematis.jpg\',0,0,210,297,\'jpg\',\'\',true, false); -// the last "false" allows a full page picture - -$mpdf->y = 70; -$mpdf->Shaded_box(\'mPDF Example File\', \'Trebuchet\', \'\', 28, \'70%\', \'DF\', 3, \'#FFFFFF\', \'#000044\', 10); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - - -<!-- TABLES OF CONTENTS --> -<tocpagebreak toc-preHTML="<h2>CONTENTS</h2>" links="1" toc-bookmarkText="Contents" resetpagenum="1" pagenumstyle="1" -odd-header-name="html_myHTMLHeaderOdd" odd-header-value="1" even-header-name="html_myHTMLHeaderEven" even-header-value="1" odd-footer-name="myFooter2Odd" odd-footer-value="1" even-footer-name="myFooter2Even" even-footer-value="1" /> - -<tocpagebreak name="Figures" toc-preHTML="<h2>FIGURES</h2>" links="1" toc-bookmarkText="Figures" /> - -<tocpagebreak name="Tables" toc-preHTML="<h2>TABLES</h2>" links="1" toc-bookmarkText="Tables" /> - - - -<!-- SECTION 1 --> -<h1>(H1) mPDF</h1> -<h2>(H2) Section 1<bookmark content="Section 1" level="0" /></h2> -<h3>(H3) HTML Markup<bookmark content="HTML Markup" level="1" /><tocentry name="" content="HTML Markup" level="0" /><indexentry content="HTML Markup" /></h3> - -<tocentry name="" content="HTML Markup" level="1" /> -<tocentry name="" content="HTML Markup" level="2" /> - -<h4>Heading 4</h4> -<h5>Heading 5</h5> -<h6>Heading 6</h6> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<hr /> - -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> - -<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote> - -<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address> - -<pre>PRE: Cum sociis natoque penatibus et magnis dis parturient montes, -nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis -dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras -sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. -Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, -ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui.</pre> - -<div><a href="http://mpdf.bpm1.com/manual/">Hyperlink (<a>)</a></div> - -<div>Styles - <tt>tt(teletype)</tt> <i>italic</i> <b>bold</b> <big>big</big> <small>small</small> <em>emphasis</em> <strong>strong</strong> <br />new lines<br> -<code>code</code> <samp>sample</samp> <kbd>keyboard</kbd> <var>variable</var> <cite>citation</cite> <abbr>abbr.</abbr> <acronym>ACRONYM</acronym> <sup>sup</sup> <sub>sub</sub> <strike>strike</strike> <s>strike-s</s> <u>underline</u> <del>delete</del> <ins>insert</ins> <q>To be or not to be</q> <font face="sans-serif" color="#880000" size="5">font changing face, size and color</font> -</div> - -<p style="font-size:15pt; color:#440066">Paragraph using the in-line style to determine the font-size (15pt) and colour</p> - - -<h3>Testing BIG, SMALL, UNDERLINE, STRIKETHROUGH, FONT color, ACRONYM, SUPERSCRIPT and SUBSCRIPT</h3> -<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline and <s>strikethrough and <sup>sup</sup></s></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p>The above repeated, but starting with a paragraph with font-size specified (7pt)</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <small>small <s>strikethrough</s> in small span</small> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><small>This tests <u>underline</u> and <s>strikethrough</s> when they are <s><u>used together</u></s> as they both use text-decoration</small></p> - - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p style="font-size:7pt;"><big>Repeated in BIG but with font-size set to 7pt by in-line css: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<ol> -<li>Item <b><u>1</u></b></li> -<li>Item 2<sup>32</sup></li> -<li><small>Item</small> 3</li> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. -<ul> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. </li> -<li>Subitem 2 -<ul> -<li> -Level 3 subitem -</li> -</ul> -</li> -</ul> -</li> -<li>Item 5</li> -</ol> - -<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> -<tocentry name="Tables" content="Basic table" level="0" /> -<table border="1" cellpadding="5"> -<thead> -<tr> -<th>Data</th> -<th>Data</th> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</thead> -<tbody> -<tr> -<th>More Data</th> -<td>More Data</td> -<td>More Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</tbody> -</table> - -This paragraph has border-radius and background-gradient set. Minimum padding is recommended as 1/3rd of the border-radius. Or can use $mpdf->autoPadding. -<p class="roundgradient">Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> - - - -<!-- HYPHENATION --> -<pagebreak /> -<h3>Hyphenation<bookmark content="Hyphenation" level="1" /><tocentry name="" content="Hyphenation" level="0" /><indexentry content="Hyphenation" /></h3> - -<h4>Little Women - Chapter One - Playing Pilgrims</h4> -<columns column-count="4" vAlign="J" column-gap="7" /> - -<p class="littlewomen"> Christmas won\'t be Christmas without any presents, grumbled Jo, lying on the rug.</p><p class="littlewomen"> It\'s so dreadful to be poor! sighed Meg, looking down at her old dress.</p><p class="littlewomen"> I don\'t think it\'s fair for some girls to have plenty of pretty things, and other girls nothing at all, added little Amy, with an injured sniff.</p><p class="littlewomen"> We\'ve got Father and Mother, and each other, said Beth contentedly from her corner.</p><p class="littlewomen">The four young faces on which the firelight shone brightened at the cheerful words, but darkened again as Jo said sadly, We haven\'t got Father, and shall not have him for a long time. She didn\'t say perhaps never, but each silently added it, thinking of Father far away, where the fighting was.</p><p class="littlewomen">Nobody spoke for a minute; then Meg said in an altered tone, You know the reason Mother proposed not having any presents this Christmas was because it is going to be a hard winter for everyone; and she thinks we ought not to spend money for pleasure, when our men are suffering so in the army. We can\'t do much, but we can make our little sacrifices, and ought to do it gladly. But I am afraid I don\'t And Meg shook her head, as she thought regretfully of all the pretty things she wanted.</p><p class="littlewomen"> But I don\'t think the little we should spend would do any good. We\'ve each got a dollar, and the army wouldn\'t be much helped by our giving that. I agree not to expect anything from Mother or you, but I do want to buy UNDINE AND SINTRAM for myself. I\'ve wanted it so long, said Jo, who was a bookworm.</p><p class="littlewomen"> I planned to spend mine in new music, said Beth, with a little sigh, which no one heard but the hearth brush and kettle holder.</p><p class="littlewomen"> I shall get a nice box of Faber\'s drawing pencils. I really need them, said Amy decidedly.</p><p class="littlewomen"> Mother didn\'t say anything about our money, and she won\'t wish us to give up everything. Let\'s each buy what we want, and have a little fun. I\'m sure we work hard enough to earn it, cried Jo, examining the heels of her shoes in a gentlemanly manner.</p><p class="littlewomen"> I know I do—teaching those tiresome children nearly all day, when I\'m longing to enjoy myself at home, began Meg, in the complaining tone again.</p><p class="littlewomen"> You don\'t have half such a hard time as I do, said Jo. How would you like to be shut up for hours with a nervous, fussy old lady, who keeps you trotting, is never satisfied, and worries you till you you\'re ready to fly out the window or cry? </p><p class="littlewomen"> It\'s naughty to fret, but I do think washing dishes and keeping things tidy is the worst work in the world. It makes me cross, and my hands get so stiff, I can\'t practice well at all. And Beth looked at her rough hands with a sigh that any one could hear that time.</p><p class="littlewomen"> I don\'t believe any of you suffer as I do, cried Amy, for you don\'t have to go to school with impertinent girls, who plague you if you don\'t know your lessons, and laugh at your dresses, and label your father if he isn\'t rich, and insult you when your nose isn\'t nice. </p><p class="littlewomen"> If you mean libel, I\'d say so, and not talk about labels, as if Papa was a pickle bottle, advised Jo, laughing.</p><p class="littlewomen"> I know what I mean, and you needn\'t be satirical about it. It\'s proper to use good words, and improve your vocabulary, returned Amy, with dignity.</p><p class="littlewomen"> Don\'t peck at one another, children. Don\'t you wish we had the money Papa lost when we were little, Jo? Dear me! How happy and good we\'d be, if we had no worries! said Meg, who could remember better times.</p><p class="littlewomen"> You said the other day you thought we were a deal happier than the King children, for they were fighting and fretting all the time, in spite of their money. </p><p class="littlewomen"> So I did, Beth. Well, I think we are. For though we do have to work, we make fun of ourselves, and are a pretty jolly set, as Jo would say. </p><p class="littlewomen"> Jo does use such slang words! observed Amy, with a reproving look at the long figure stretched on the rug.</p><p class="littlewomen">Jo immediately sat up, put her hands in her pockets, and began to whistle.</p><p class="littlewomen"> Don\'t, Jo. It\'s so boyish! </p><p class="littlewomen"> That\'s why I do it. </p><p class="littlewomen"> I detest rude, unladylike girls! </p><p class="littlewomen"> I hate affected, niminy-piminy chits! </p><p class="littlewomen"> Birds in their little nests agree, sang Beth, the peacemaker, with such a funny face that both sharp voices softened to a laugh, and the pecking ended for that time.</p><p class="littlewomen"> Really, girls, you are both to be blamed, said Meg, beginning to lecture in her elder-sisterly fashion. You are old enough to leave off boyish tricks, and to behave better, Josephine. It didn\'t matter so much when you were a little girl, but now you are so tall, and turn up your hair, you should remember that you are a young lady. </p><p class="littlewomen"> I\'m not! And if turning up my hair makes me one, I\'ll wear it in two tails till I\'m twenty, cried Jo, pulling off her net, and shaking down a chestnut mane. I hate to think I\'ve got to grow up, and be Miss March, and wear long gowns, and look as prim as a China Aster! It\'s bad enough to be a girl, anyway, when I like boy\'s games and work and manners! I can\'t get over my disappointment in not being a boy. And it\'s worse than ever now, for I\'m dying to go and fight with Papa. And I can only stay home and knit, like a poky old woman! </p><p class="littlewomen">And Jo shook the blue army sock till the needles rattled like castanets, and her ball bounded across the room.</p><p class="littlewomen"> Poor Jo! It\'s too bad, but it can\'t be helped. So you must try to be contented with making your name boyish, and playing brother to us girls, said Beth, stroking the rough head with a hand that all the dish washing and dusting in the world could not make ungentle in its touch.</p><p class="littlewomen"> As for you, Amy, continued Meg, you are altogether to particular and prim. Your airs are funny now, but you\'ll grow up an affected little goose, if you don\'t take care. I I like your nice manners and refined ways of speaking, when you don\'t try to be elegant. But your absurd words are as bad as Jo\'s slang. </p><p class="littlewomen"> If Jo is a tomboy and Amy a goose, what am I, please? asked Beth, ready to share the lecture.</p><p class="littlewomen"> You\'re a dear, and nothing else, answered Meg warmly, and no one contradicted her, for the \'Mouse\' was the pet of the family.</p> - -<columns column-count="1" /> - - - - - - -<!-- LISTS --> -<pagebreak /> -<h3>Lists<bookmark content="Lists" level="1" /><tocentry name="" content="Lists" level="0" /><indexentry content="Lists" /></h3> -<div style="background-color:#ddccff; padding:0pt; border: 1px solid #555555;"> -<ol class="lista"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listb"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum. -</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol> -<li>No class specified. Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -</ol> -</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</div> - -<!-- TABLES --> -<pagebreak /> -<h3>Tables<bookmark content="Tables" level="1" /><tocentry name="" content="Tables" level="0" /><tocentry name="Tables" content="Tables - general" level="0" /><indexentry content="Tables" /></h3> -<p>mPDF supports all in-line properties inside tables.</p> -<table border="1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td> -<td> -<p>This is data p</p> -This is data out of p -<p style="font-weight:bold; font-size:20pt; background-color:#FFBBFF;">This is bold data p</p> -<b>This is bold data out of p</b><br /> -This is normal data after br -<h3>Heading 3 inside a table</h3> -Text here lorem <i>ipsum</i> ibisque totum.<sup>32</sup> -<div>This is data div</div> -This is data out of div -<div style="font-weight:bold;">This is data div (bold)</div> -This is data out of div -</td> - -<td>Also data</td></tr> -</tbody></table> - -<p>This table has padding-top and -bottom set to 3mm i.e. padding within the cells. Also background-, border colour and style, font family and size are set by in-line <acronym>CSS</acronym>.</p> -<table style="border: 1px solid #880000; background-color: #BBCCDD; font-family: Mono; font-size: 7pt; " class="tallcells"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td><td><p>This is data p</p></td><td><p>More data</p></td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -</tbody></table> - - -<h4>Tables<bookmark content="Table styles" level="2" /><tocentry name="Tables" content="Table styles" level="0" /><indexentry content="Table:styles" /></h4> -<p>The style sheet used for these examples shows some of the table styles I use on my website. The property \'topntail\' defined by a border-type definition e.g. "1px solid #880000" puts a border at the top and bottom of the table, and also below a header row (thead) if defined. Note also that <thead> will automatically turn on the header-repeat i.e. reproduce the header row at the top of each page.</p> -<p>bpmTopic Class</p> -<table class="bpmTopic"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>More data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopic<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopicC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopnTail Class </p> -<table class="bpmTopnTail"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> -<p> </p> -<p>bpmTopnTail<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopnTailC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>TopnTail Class</p> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td class="pmhBottomRight"><b><i>Bottom right align</i></b></td> -<td> -<p>This is data. Can use</p> -<p><b>bold</b> <i>italic </i><sub>sub</sub> or <sup>sup</sup> text</p> -</td> -</tr> -<tr class="oddrow"><th class="pmhBottomRight"> -<p>Bottom right align</p> -</th> -<td class="pmhMiddleCenter" style="border: #000000 1px solid"> -<p>This is data. This cell</p> -<p>uses Cell Styles to set</p> -<p>the borders.</p> -<p>All borders are collapsible</p> -<p>in mPDF.</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 4</th> -<td> -<p>This is data p</p> -</td> -<td>More data</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td colspan="2" class="pmhTopCenter">Also data merged and centered</td> -</tr> -</tbody></table> - -<p> </p> - -<h4>Lists in a Table<bookmark content="Lists in a table" level="2" /><tocentry name="Tables" content="Lists in a table" level="0" /><indexentry content="Table:lists inside" /></h4> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<ol> -<li>Item 1</li> -<li>Item 2 -<ol type="a"> -<li>Subitem of ordered list</li> -<li>Subitem 2 -<ol type="i"> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ol> -</li> -</ol> -</li> -<li>Item 3</li> -<li>Another Item</li> -<li>Subitem -<ol> -<li>Level 3 subitem</li> -</ol> -</li> -<li>Another Item</li> -</ol> -</td> -<td> -Unordered list: -<ul> -<li>Item 1</li> -<li>Item 2 -<ul> -<li>Subitem of unordered list</li> -<li>Subitem 2 -<ul> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ul> -</li> -</ul> -</li> -<li>Item 3</li> -</ul> -</td> -</tr> -</tbody></table> -<p> </p> - - -<h4>Automatic Column Width<bookmark content="Automatic Column Width" level="2" /><tocentry name="Tables" content="Automatic column width" level="0" /><indexentry content="Table:automatic column width" /></h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td>Causes</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing.</td> -</tr> -</tbody></table> - - -<h4>Column span<bookmark content="Column span" level="2" /><tocentry name="Tables" content="Column span" level="0" /><indexentry content="Table:column span" /></h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -</tr> -</tbody></table> - - - -<h4>Header & Footer Rows<bookmark content="Header Rows" level="2" /><tocentry name="Tables" content="Header rows" level="0" /><indexentry content="Table:header rows" /></h4> -<p>A table using a header or footer row should repeat the header/footer row across pages:</p> -<p>bpmTopic<b>C</b> Class</p> -<table class="bpmTopicC"> -<thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second column header</p> -</td> -<td>Third column header</td> -</tr> -</thead> -<tfoot> -<tr class="headerrow"><th>Col and Row Footer</th> -<td> -<p>Second column footer</p> -</td> -<td>Third column footer</td> -</tr> -</tfoot> -<tbody> -<tr><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr><th>Row header 2</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th> -<p>Row header 3</p> -</th> -<td> -<p>This is data</p> -</td> -<td>This is data</td> -</tr> -<tr><th>Row header 4</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 9</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -</tbody></table> -<p> </p> - -<h4>Autosizing Tables<bookmark content="Autosizing Tables" level="2" /><tocentry name="Tables" content="Autosizing tables" level="0" /><indexentry content="Table:autosizing" /></h4> -<p>Periodic Table of elements. Tables are set by default to reduce font size if complete words will not fit inside each cell, to a maximum of 1/1.4 * the set font-size. This value can be changed by setting $mpdf->shrink_tables_to_fit=1.8 or using html attribute <table autosize="1.8">.</p> - -<h5>Periodic Table</h5> - -<table style="border:1px solid #000000;" cellPadding="14"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td><td colspan="16"></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td>Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td> -<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td><td>Rh </td><td>Pd </td><td>Ag </td><td>Cd </td> -<td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td><td>Au </td> -<td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td>Ac </td><td colspan="15"></td> -</tr> -<tr> -<td colspan="18"></td></tr> -<tr> -<td colspan="3"></td><td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td> -<td>Dy </td><td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td><td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td><td>Cf </td> -<td>Es </td><td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> - -<pagebreak /> - -<h4>Rotated Tables<bookmark content="Rotated Tables" level="2" /><tocentry name="Tables" content="Rotated table" level="0" /><indexentry content="Table:rotated" /></h4> -<p>This is set to rotate -90 degrees (counterclockwise).</p> - -<h5>Periodic Table</h5> -<p> -<table rotate="-90" class="bpmClearC"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td><td colspan="15"></td><td></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td>Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td><td>Cu </td> -<td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td><td>Rh </td><td>Pd </td> -<td>Ag </td><td>Cd </td><td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td><td>Au </td> -<td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td>Ac </td> -</tr> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td colspan="3"></td><td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td><td>Dy </td> -<td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td><td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td> -<td>Cf </td><td>Es </td><td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> -<p> </p> - -<pagebreak /> -<h4>Rotated text in Tables<bookmark content="Rotated text in Tables" level="2" /><tocentry name="Tables" content="Rotated text in table" level="0" /><indexentry content="Table:rotated text" /></h4> - -<h5>Periodic Table</h5> -<table> -<thead> -<tr text-rotate="45"> -<th><p>Element type 1A</p><p>Second line</p><th><p>Element type longer 2A</p></th> -<th>Element type 3B</th><th>Element type 4B</th><th>Element type 5B</th><th>Element type 6B</th><th>7B</th><th>8B</th> -<th>Element type 8B R</th><th>8B</th><th>Element <span>type</span> 1B</th><th>2B</th> -<th>Element type 3A</th><th>Element type 4A</th><th>Element type 5A</th><th>Element type 6A</th><th>7A</th><th>Element type 8A</th> -</tr> -</thead> - -<tbody> -<tr> -<td>H</td><td colspan="15"></td><td></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr style="text-rotate: 45"> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti</td><td>Va</td><td>Cr</td><td>Mn</td><td>Fe</td><td>Co</td><td>Ni </td> -<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td> -<td style="text-align:right; ">Rh</td><td>Pd </td><td>Ag </td><td>Cd </td><td>In </td><td>Sn </td> -<td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td> -<td>Pt </td><td>Au </td><td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td colspan="16">Ac </td> -</tr> -<tr> -<td colspan="3"></td> -<td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td><td>Dy </td> -<td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td><td>Cf </td><td>Es </td> -<td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> - - -<pagebreak /> - - - -<h4>Nested Tables<bookmark content="Nested Tables" level="2" /><tocentry name="Tables" content="Nested tables" level="0" /><indexentry content="Table:nested" /></h4> - -<div style="border: 2px solid #000088; background-color: #DDDDFF; padding: 2mm;"> -Text before table - -<div style="border: 2px solid #008888; background-color: #DCAFCF; padding: 2mm;"> - -<table cellSpacing="2" rotate="-90" align="center" autosize="1.5" class="nested" style="page-break-inside: avoid; "> -<tbody> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id <a href="http://www.dummy.com">euismod auctor</a>, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td></td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -</tbody></table> - -</div> - - - -<p>Text before table</p> - -<table cellSpacing="2" class="outer2" autosize="3" style="page-break-inside:avoid"> -<tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td style="text-align: right;"> -Text before table -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -<p>Text after table</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 3</td> -<td style="text-align: center; vertical-align: middle;"> -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td> -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> -</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td style="vertical-align: bottom; "> -<table cellSpacing="2" class="inner" align="right"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 4</td> -<td>This is data</td> -<td><table cellSpacing="2" class="inner"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td> -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> -</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -</tbody></table> - - -</div> - - -<!-- FORMS --> -<pagebreak /> -<h3>Forms<bookmark content="Forms" level="1" /><tocentry name="" content="Forms" level="0" /><indexentry content="Forms" /></h3> -<form> -<b>Textarea</b> -<textarea name="authors" rows="5" cols="80" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. -Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> -<b>Select</b> -<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> followed by text -<br /><br /> -<b>Input Radio</b> -<input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice -<br /><br /> -<b>Input Text</b> -<input type="text" size="190" name="doi" value="10.1258/jrsm.100.5.211"> -<br /><br /> -<b>Input Password</b> -<input type="password" size="40" name="password" value="secret"> -<br /><br /> -<input type="checkbox" name="QPC" value="ON" > Checkboxes<br> -<input type="checkbox" name="QPA" value="ON" > Not selected<br> -<input type="checkbox" name="QPA" value="ON" disabled="disabled"> Disabled<br> -<input type="checkbox" name="QLY" value="ON" checked="checked" > Selected -<br /><br /> -<input type="submit" name="submit" value="Submit" /> -<input type="image" name="submit" src="goto.gif" /> -<input type="button" name="submit" value="Button" /> -<input type="reset" name="submit" value="Reset" /> -<br /><br /> -</form> - - -<!-- ANNOTATIONS --> -<pagebreak /> -<h3>Annotations<bookmark content="Annotations" level="1" /><tocentry name="" content="Annotations" level="0" /><indexentry content="Annotations" /></h3> -<p>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate.<annotation content="This is an annotation'."\n".'in the middle of the text" subject="My Subject" icon="Comment" color="#FE88EF" author="Ian Back" /> Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. <i>Fusce</i><annotation content="Fusce is a funny word!" subject="Idle Comments" icon="Note" author="Ian Back" pos-x="198" /> eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -<!-- GRAPH --> -<pagebreak /> -<h3>Graphs<bookmark content="Graphs" level="1" /><tocentry name="" content="Graphs" level="0" /><indexentry content="Graphs" /></h3> -<table id="tbl_1" class="sub"><tbody><tr><td></td><td align="right"><b>Female</b></td><td align="right"><b>Male</b></td></tr><tr><td>35 - 44</td><td align="right"><b>4</b></td><td align="right"><b>2</b></td></tr><tr><td>45 - 54</td><td align="right"><b>5</b></td><td align="right"><b>7</b></td></tr><tr><td>55 - 64</td><td align="right"><b>21</b></td><td align="right"><b>18</b></td></tr><tr><td>65 - 74</td><td align="right"><b>11</b></td><td align="right"><b>14</b></td></tr><tr><td>75 - 84</td><td align="right"><b>10</b></td><td align="right"><b>10</b></td></tr><tr><td>85 - 94</td><td align="right"><b>2</b></td><td align="right"><b>1</b></td></tr><tr><td>95 - 104</td><td align="right"><b>1</b></td><td align="right"><b></b></td></tr> -<tr><td>TOTAL</td><td align="right">54</td><td align="right">52</td></tr> -</tbody></table> - -<h5>Subscriptions for 2008-09<tocentry name="Figures" content="Graph: Subscriptions for 2008-09" /></h5> -<jpgraph table="tbl_1" type="bar" stacked="0" dpi="300" title="New subscriptions" splines="1" bandw="0" antialias="1" label-y="% patients" label-x="Age group" axis-x="text" axis-y="lin" percent="0" series="cols" data-col-begin="2" data-row-begin="2" data-col-end="0" data-row-end="-1" show-values="1" width="600" legend-overlap="1" hide-grid="1" hide-y-axis="1" /> - - - -<!-- FULL IMAGES & BARCODE --> -<pagebreak /> -<h3>Full Images & Barcode<bookmark content="Full Images & Barcode" level="1" /><tocentry name="Figures" content="Full size image & Barcode" level="0" /><indexentry content="Image:full-size" /><tocentry name="" content="Barcode" level="0" /><indexentry content="Barcode" /></h3> -<p>On the first and last page of this document, an image is reproduced full page size by placing it inside a DIV element with CSS "position:absolute". In all other situations, images are constrained to the width and height of the printable page (i.e. inside the margins). The image on the back page has CSS "opacity:0.5".</p> - - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->SetAlpha(0.5); -$mpdf->Image(\'clematis.jpg\',0,0,210,297,\'jpg\',\'\',true, false); -// the last "false" allows a full page picture -$mpdf->SetAlpha(1); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - -<p>The back cover also has an ISBN barcode</p> - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->writeBarcode(\'978-0-9542246-0-8\', 1, 130, 230, 1,0, 3,3,4,4); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - -<p>But next is inserted the Index, which can also be done like this:</p> - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->AddPage(\'\',NEXT-ODD\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',-1,-1,-1,-1); -$mpdf->WriteHTML(\'<h2>Index<bookmark content="Index" /></h2>\'); -$mpdf->WriteHTML(\'<indexinsert cols="2" font="serif" div-font="sans-serif" links="on" />\'); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - - - -<!-- INDEX --> -<pagebreak type="NEXT-ODD" odd-header-value="-1" even-header-value="-1" odd-footer-value="-1" even-footer-value="-1" /> -<h2>Index<bookmark content="Index" /></h2> -<indexinsert cols="2" font="serif" div-font="sans-serif" links="on" /> - - - -<!-- BACK COVER & BARCODE --> -<pagebreak type="NEXT-EVEN" /> -<div style="position: absolute; left:0; right: 0; top: 0; bottom: 0;"> -<img src="clematis.jpg" style="width: 210mm; height: 297mm; margin: 0; opacity: 0.5;" /> -</div> - -<div style="position: absolute; right: 35mm; bottom: 35mm; "> -<barcode code="978-0-9542246-0" type="ISBN" style="padding: 2.5mm; border: 0.1mm solid #000000;" height="0.66" text="1" /> -</div> - - - -</body></html>'; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('s','A4','','',25,15,21,22,10,10); -$mpdf->progbar_altHTML = '<html><body> - <div style="margin-top: 5em; text-align: center; font-family: Verdana; font-size: 12px;"><img style="vertical-align: middle" src="loading.gif" /> Creating PDF file. Please wait...</div>'; -$mpdf->StartProgressBarOutput(); - -$mpdf->mirrorMargins = 1; -$mpdf->SetDisplayMode('fullpage','two'); -$mpdf->useGraphs = true; -$mpdf->list_number_suffix = ')'; -$mpdf->hyphenate = true; - -$mpdf->debug = true; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example48_progress_bars_advanced.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example48_progress_bars_advanced.php deleted file mode 100644 index 898fa6b7c2e98505b779bcedadd1562cb4dc2026..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example48_progress_bars_advanced.php +++ /dev/null @@ -1,1609 +0,0 @@ -<?php - -//============================================================== -//============================================================== -define("_JPGRAPH_PATH", '../../jpgraph_5/jpgraph/'); // must define this before including mpdf.php file -$JpgUseSVGFormat = true; - -define('_MPDF_URI','../'); // must be a relative or absolute URI - not a file system path -//============================================================== -//============================================================== - - -ini_set("memory_limit","64M"); - -$html = ' -<html><head> - <meta http-equiv="Content-Language" content="en-GB"> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - <style> - body { font-family:"Times New Roman"; font-size:10pt; } - p.littlewomen { margin: 0; font-family: sans-serif; text-align: justify; } - - h1, h2, h3, h4, h5, h6 { font-family: DejaVuSansCondensed; } - table {font-family: DejaVuSansCondensed; font-size: 9pt; line-height: 1.2; - vertical-align: top; - margin-top: 2pt; margin-bottom: 5pt; - border-collapse: collapse; } - - thead { font-weight: bold; vertical-align: bottom; } - - th { font-weight: bold; - text-align:left; - padding-left: 2mm; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - td { padding-left: 2mm; - text-align:left; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - th p { text-align: left; margin:0pt; } - td p { text-align: left; margin:0pt; } - - table.widecells td { - padding-left: 5mm; - padding-right: 5mm; - } - table.tallcells td { - padding-top: 3mm; - padding-bottom: 3mm; - } .sub td { vertical-align:top; border-top:0px; border-bottom:0px; padding:2px; padding-right:8px; - margin:0; font-size:9pt; } - .sub { align:center; border:#888888 1px solid; } - thead td { font-weight: bold; } - - table.nested { - border-collapse: separate; - border: 4px solid #880000; - padding: 3px; - margin: 0px 20px 0px 20px; - empty-cells: hide; - background-color:#FFFFCC; - } - table.nested td { - border: 1px solid #008800; - padding: 0px; - background-color:#ECFFDF; - } - table.outer2 { - border-collapse: separate; - border: 4px solid #088000; - padding: 3px; - margin: 10px 0px; - empty-cells: hide; - background-color: yellow; - } - table.outer2 td { - font-family: Times; - border: 1px solid #008800; - padding: 0px; - background-color:#ECFFDF; - } - table.inner { - border-collapse: collapse; - border: 2px solid #000088; - padding: 3px; - margin: 5px; - empty-cells: show; - background-color:#FFCCFF; - } - table.inner td { - border: 1px solid #000088; - padding: 0px; - font-family: monospace; - font-style: italic; - font-weight: bold; - color: #880000; - background-color:#FFECDF; - } - table.collapsed { - border-collapse: collapse; - } - table.collapsed td { - background-color:#EDFCFF; - } - .headerrow td, .headerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - .footerrow td, .footerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - - .evenrow td, .evenrow th { background-color: #f5f8f5; } - .oddrow td, .oddrow th { background-color: #e3ece4; } - - .bpmTopic { background-color: #e3ece4; } - .bpmTopicC { background-color: #e3ece4; } - .bpmNoLines { background-color: #e3ece4; } - .bpmNoLinesC { background-color: #e3ece4; } - .bpmClear { } - .bpmClearC { text-align: center; } - .bpmTopnTail { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailC { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailClear { topntail: 0.02cm solid #495b4a; } - .bpmTopnTailClearC { topntail: 0.02cm solid #495b4a; } - - .bpmTopicC td, .bpmTopicC td p { text-align: center; } - .bpmNoLinesC td, .bpmNoLinesC td p { text-align: center; } - .bpmClearC td, .bpmClearC td p { text-align: center; } - .bpmTopnTailC td, .bpmTopnTailC td p { text-align: center; } - .bpmTopnTailClearC td, .bpmTopnTailClearC td p { text-align: center; } - - .pmhMiddleCenter { text-align:center; vertical-align:middle; } - .pmhMiddleRight { text-align:right; vertical-align:middle; } - .pmhBottomCenter { text-align:center; vertical-align:bottom; } - .pmhBottomRight { text-align:right; vertical-align:bottom; } - .pmhTopCenter { text-align:center; vertical-align:top; } - .pmhTopRight { text-align:right; vertical-align:top; } - .pmhTopLeft { text-align:left; vertical-align:top; } - .pmhBottomLeft { text-align:left; vertical-align:bottom; } - .pmhMiddleLeft { text-align:left; vertical-align:middle; } - - .bpmTopic td, .bpmTopic th { border-top: 1px solid #FFFFFF; } - .bpmTopicC td, .bpmTopicC th { border-top: 1px solid #FFFFFF; } - .bpmTopnTail td, .bpmTopnTail th { border-top: 1px solid #FFFFFF; } - .bpmTopnTailC td, .bpmTopnTailC th { border-top: 1px solid #FFFFFF; } - .lista { list-style-type: upper-roman; } - .listb{ list-style-type: decimal; font-family: sans-serif; color: blue; font-weight: bold; font-style: italic; font-size: 19pt; } - .listc{ list-style-type: upper-alpha; text-indent: 25mm; } - .listd{ list-style-type: lower-alpha; color: teal; line-height: 2; } - .liste{ list-style-type: disc; } - - .roundgradient { - border:0.05mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - border-radius: 10mm / 10mm; - background-clip: border-box; - padding: 3.3mm; - } - .phpcode { - border:1px solid #555555; - background-color: #DDDDDD; - padding: 1em; - font-size:8pt; - font-family: lucidaconsole, mono; - } - </style> -</head><body> - -<!-- DEFINE HEADERS & FOOTERS --> -<htmlpageheader name="myHTMLHeaderOdd"> -<div style="font-family:sans-serif; background-color:#BBEEFF" align="center"><b>mPDF Example File</b></div> -</htmlpageheader> -<htmlpageheader name="myHTMLHeaderEven"> -<div style="font-family:sans-serif; background-color:#EFFBBE" align="center"><b><i>mPDF Example File</i></b></div> -</htmlpageheader> -<htmlpagefooter name="myHTMLFooterOdd" style="display:none"> -<div style="font-family:sans-serif; background-color:#CFFFFC" align="center"><b>{PAGENO}/{nbpg}</b></div> -</htmlpagefooter> -<htmlpagefooter name="myHTMLFooterEven" style="display:none"> -<div style="font-family:sans-serif; background-color:#FFCCFF" align="center"><b><i>{PAGENO}/{nbpg}</i></b></div> -</htmlpagefooter> - -<pagefooter name="myFooter2Odd" content-left="" content-center="mPDF Example File" content-right="{PAGENO}/{nbpg}" footer-style="font-family:sans-serif; font-size:9pt; font-weight:bold; color:#000088;" footer-style-right="font-weight: bold;" line="on" /> - -<pagefooter name="myFooter2Even" content-left="{PAGENO}/{nbpg}" content-center="mPDF Example File" content-right="{DATE j-m-Y}" footer-style="font-family:sans-serif; font-size:10pt; color:#880000;" footer-style-left="font-weight:bold;" line="on" /> - - -<!-- FRONT COVER --> -<div style="position: absolute; left:0; right: 0; top: 0; bottom: 0;"> -<img src="clematis.jpg" style="width: 210mm; height: 297mm; margin: 0;" /> -</div> - -<div style="position: absolute; left:32mm; right: 25mm; top: 70mm; width: 58%; margin-right: auto; margin-left:auto; "> -<div style="padding: 1em; font-family: Arial; font-weight: bold; font-size: 28pt; border: 3px solid #000044; border-radius: 5mm; background-clip: border-box; color: #000044; background-color: #FFFFFF;"> -mPDF Example File -</div> -</div> - -<pagebreak /> - -<p>The front cover can also be produced like this:</p> -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->Image(\'clematis.jpg\',0,0,210,297,\'jpg\',\'\',true, false); -// the last "false" allows a full page picture - -$mpdf->y = 70; -$mpdf->Shaded_box(\'mPDF Example File\', \'Trebuchet\', \'\', 28, \'70%\', \'DF\', 3, \'#FFFFFF\', \'#000044\', 10); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - - -<!-- TABLES OF CONTENTS --> -<tocpagebreak toc-preHTML="<h2>CONTENTS</h2>" links="1" toc-bookmarkText="Contents" resetpagenum="1" pagenumstyle="1" -odd-header-name="html_myHTMLHeaderOdd" odd-header-value="1" even-header-name="html_myHTMLHeaderEven" even-header-value="1" odd-footer-name="myFooter2Odd" odd-footer-value="1" even-footer-name="myFooter2Even" even-footer-value="1" /> - -<tocpagebreak name="Figures" toc-preHTML="<h2>FIGURES</h2>" links="1" toc-bookmarkText="Figures" /> - -<tocpagebreak name="Tables" toc-preHTML="<h2>TABLES</h2>" links="1" toc-bookmarkText="Tables" /> - - - -<!-- SECTION 1 --> -<h1>(H1) mPDF</h1> -<h2>(H2) Section 1<bookmark content="Section 1" level="0" /></h2> -<h3>(H3) HTML Markup<bookmark content="HTML Markup" level="1" /><tocentry name="" content="HTML Markup" level="0" /><indexentry content="HTML Markup" /></h3> - -<tocentry name="" content="HTML Markup" level="1" /> -<tocentry name="" content="HTML Markup" level="2" /> - -<h4>Heading 4</h4> -<h5>Heading 5</h5> -<h6>Heading 6</h6> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - -<hr /> - -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> -<div>DIV: Proin aliquet lorem id felis. Curabitur vel libero at mauris nonummy tincidunt. Donec imperdiet. Vestibulum sem sem, lacinia vel, molestie et, laoreet eget, urna. Curabitur viverra faucibus pede. Morbi lobortis. Donec dapibus. Donec tempus. Ut arcu enim, rhoncus ac, venenatis eu, porttitor mollis, dui. Sed vitae risus. In elementum sem placerat dui. Nam tristique eros in nisl. Nulla cursus sapien non quam porta porttitor. Quisque dictum ipsum ornare tortor. Fusce ornare tempus enim. </div> - -<blockquote>Blockquote: Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus. Maecenas arcu justo, malesuada eu, dapibus ac, adipiscing vitae, turpis. Fusce mollis. Aliquam egestas. In purus dolor, facilisis at, fermentum nec, molestie et, metus.</blockquote> - -<address>Address: Vestibulum feugiat, orci at imperdiet tincidunt, mauris erat facilisis urna, sagittis ultricies dui nisl et lectus. Sed lacinia, lectus vitae dictum sodales, elit ipsum ultrices orci, non euismod arcu diam non metus.</address> - -<pre>PRE: Cum sociis natoque penatibus et magnis dis parturient montes, -nascetur ridiculus mus. In suscipit turpis vitae odio. Integer convallis -dui at metus. Fusce magna. Sed sed lectus vitae enim tempor cursus. Cras -sed, posuere et, urna. Quisque ut leo. Aliquam interdum hendrerit tortor. -Vestibulum elit. Vestibulum et arcu at diam mattis commodo. Nam ipsum sem, -ultricies at, rutrum sit amet, posuere nec, velit. Sed molestie mollis dui.</pre> - -<div><a href="http://mpdf.bpm1.com/manual/">Hyperlink (<a>)</a></div> - -<div>Styles - <tt>tt(teletype)</tt> <i>italic</i> <b>bold</b> <big>big</big> <small>small</small> <em>emphasis</em> <strong>strong</strong> <br />new lines<br> -<code>code</code> <samp>sample</samp> <kbd>keyboard</kbd> <var>variable</var> <cite>citation</cite> <abbr>abbr.</abbr> <acronym>ACRONYM</acronym> <sup>sup</sup> <sub>sub</sub> <strike>strike</strike> <s>strike-s</s> <u>underline</u> <del>delete</del> <ins>insert</ins> <q>To be or not to be</q> <font face="sans-serif" color="#880000" size="5">font changing face, size and color</font> -</div> - -<p style="font-size:15pt; color:#440066">Paragraph using the in-line style to determine the font-size (15pt) and colour</p> - - -<h3>Testing BIG, SMALL, UNDERLINE, STRIKETHROUGH, FONT color, ACRONYM, SUPERSCRIPT and SUBSCRIPT</h3> -<p>This is <s>strikethrough</s> in <b><s>block</s></b> and <small>small <s>strikethrough</s> in <i>small span</i></small> and <big>big <s>strikethrough</s> in big span</big> and then <u>underline and <s>strikethrough and <sup>sup</sup></s></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p>This is a <font color="#008800">green reference<sup>32-47</sup></font> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><big>Repeated in <u>BIG</u>: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p>The above repeated, but starting with a paragraph with font-size specified (7pt)</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <small>small <s>strikethrough</s> in small span</small> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is <s>strikethrough</s> in block and <big>big <s>strikethrough</s> in big span</big> and then <u>underline</u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</p> - -<p style="font-size:7pt;">This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> then <s>Strikethrough reference<sup>32-47</sup></s> and <s>strikethrough reference<sub>32-47</sub></s></p> - -<p><small>This tests <u>underline</u> and <s>strikethrough</s> when they are <s><u>used together</u></s> as they both use text-decoration</small></p> - - -<p><small>Repeated in small: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</small></p> - -<p style="font-size:7pt;"><big>Repeated in BIG but with font-size set to 7pt by in-line css: This is reference<sup>32-47</sup> and <u>underlined reference<sup>32-47</sup></u> then reference<sub>32-47</sub> and <u>underlined reference<sub>32-47</sub></u> but out of span again but <font color="#000088">blue</font> font and <acronym>ACRONYM</acronym> text</big></p> - -<ol> -<li>Item <b><u>1</u></b></li> -<li>Item 2<sup>32</sup></li> -<li><small>Item</small> 3</li> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. -<ul> -<li>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo. </li> -<li>Subitem 2 -<ul> -<li> -Level 3 subitem -</li> -</ul> -</li> -</ul> -</li> -<li>Item 5</li> -</ol> - -<p>Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> -<tocentry name="Tables" content="Basic table" level="0" /> -<table border="1" cellpadding="5"> -<thead> -<tr> -<th>Data</th> -<th>Data</th> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</thead> -<tbody> -<tr> -<th>More Data</th> -<td>More Data</td> -<td>More Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -<tr> -<th>Data</th> -<td>Data</td> -<td>Data</td> -<td>Data<br />2nd line</td> -</tr> -</tbody> -</table> - -This paragraph has border-radius and background-gradient set. Minimum padding is recommended as 1/3rd of the border-radius. Or can use $mpdf->autoPadding. -<p class="roundgradient">Sed bibendum. Nunc eleifend ornare velit. Sed consectetuer urna in erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Mauris sodales semper metus. Maecenas justo libero, pretium at, malesuada eu, mollis et, arcu. Ut suscipit pede in nulla. Praesent elementum, dolor ac fringilla posuere, elit libero rutrum massa, vel tincidunt dui tellus a ante. Sed aliquet euismod dolor. Vestibulum sed dui. Duis lobortis hendrerit quam. Donec tempus orci ut libero. Pellentesque suscipit malesuada nisi. </p> - - - -<!-- HYPHENATION --> -<pagebreak /> -<h3>Hyphenation<bookmark content="Hyphenation" level="1" /><tocentry name="" content="Hyphenation" level="0" /><indexentry content="Hyphenation" /></h3> - -<h4>Little Women - Chapter One - Playing Pilgrims</h4> -<columns column-count="4" vAlign="J" column-gap="7" /> - -<p class="littlewomen"> Christmas won\'t be Christmas without any presents, grumbled Jo, lying on the rug.</p><p class="littlewomen"> It\'s so dreadful to be poor! sighed Meg, looking down at her old dress.</p><p class="littlewomen"> I don\'t think it\'s fair for some girls to have plenty of pretty things, and other girls nothing at all, added little Amy, with an injured sniff.</p><p class="littlewomen"> We\'ve got Father and Mother, and each other, said Beth contentedly from her corner.</p><p class="littlewomen">The four young faces on which the firelight shone brightened at the cheerful words, but darkened again as Jo said sadly, We haven\'t got Father, and shall not have him for a long time. She didn\'t say perhaps never, but each silently added it, thinking of Father far away, where the fighting was.</p><p class="littlewomen">Nobody spoke for a minute; then Meg said in an altered tone, You know the reason Mother proposed not having any presents this Christmas was because it is going to be a hard winter for everyone; and she thinks we ought not to spend money for pleasure, when our men are suffering so in the army. We can\'t do much, but we can make our little sacrifices, and ought to do it gladly. But I am afraid I don\'t And Meg shook her head, as she thought regretfully of all the pretty things she wanted.</p><p class="littlewomen"> But I don\'t think the little we should spend would do any good. We\'ve each got a dollar, and the army wouldn\'t be much helped by our giving that. I agree not to expect anything from Mother or you, but I do want to buy UNDINE AND SINTRAM for myself. I\'ve wanted it so long, said Jo, who was a bookworm.</p><p class="littlewomen"> I planned to spend mine in new music, said Beth, with a little sigh, which no one heard but the hearth brush and kettle holder.</p><p class="littlewomen"> I shall get a nice box of Faber\'s drawing pencils. I really need them, said Amy decidedly.</p><p class="littlewomen"> Mother didn\'t say anything about our money, and she won\'t wish us to give up everything. Let\'s each buy what we want, and have a little fun. I\'m sure we work hard enough to earn it, cried Jo, examining the heels of her shoes in a gentlemanly manner.</p><p class="littlewomen"> I know I do—teaching those tiresome children nearly all day, when I\'m longing to enjoy myself at home, began Meg, in the complaining tone again.</p><p class="littlewomen"> You don\'t have half such a hard time as I do, said Jo. How would you like to be shut up for hours with a nervous, fussy old lady, who keeps you trotting, is never satisfied, and worries you till you you\'re ready to fly out the window or cry? </p><p class="littlewomen"> It\'s naughty to fret, but I do think washing dishes and keeping things tidy is the worst work in the world. It makes me cross, and my hands get so stiff, I can\'t practice well at all. And Beth looked at her rough hands with a sigh that any one could hear that time.</p><p class="littlewomen"> I don\'t believe any of you suffer as I do, cried Amy, for you don\'t have to go to school with impertinent girls, who plague you if you don\'t know your lessons, and laugh at your dresses, and label your father if he isn\'t rich, and insult you when your nose isn\'t nice. </p><p class="littlewomen"> If you mean libel, I\'d say so, and not talk about labels, as if Papa was a pickle bottle, advised Jo, laughing.</p><p class="littlewomen"> I know what I mean, and you needn\'t be satirical about it. It\'s proper to use good words, and improve your vocabulary, returned Amy, with dignity.</p><p class="littlewomen"> Don\'t peck at one another, children. Don\'t you wish we had the money Papa lost when we were little, Jo? Dear me! How happy and good we\'d be, if we had no worries! said Meg, who could remember better times.</p><p class="littlewomen"> You said the other day you thought we were a deal happier than the King children, for they were fighting and fretting all the time, in spite of their money. </p><p class="littlewomen"> So I did, Beth. Well, I think we are. For though we do have to work, we make fun of ourselves, and are a pretty jolly set, as Jo would say. </p><p class="littlewomen"> Jo does use such slang words! observed Amy, with a reproving look at the long figure stretched on the rug.</p><p class="littlewomen">Jo immediately sat up, put her hands in her pockets, and began to whistle.</p><p class="littlewomen"> Don\'t, Jo. It\'s so boyish! </p><p class="littlewomen"> That\'s why I do it. </p><p class="littlewomen"> I detest rude, unladylike girls! </p><p class="littlewomen"> I hate affected, niminy-piminy chits! </p><p class="littlewomen"> Birds in their little nests agree, sang Beth, the peacemaker, with such a funny face that both sharp voices softened to a laugh, and the pecking ended for that time.</p><p class="littlewomen"> Really, girls, you are both to be blamed, said Meg, beginning to lecture in her elder-sisterly fashion. You are old enough to leave off boyish tricks, and to behave better, Josephine. It didn\'t matter so much when you were a little girl, but now you are so tall, and turn up your hair, you should remember that you are a young lady. </p><p class="littlewomen"> I\'m not! And if turning up my hair makes me one, I\'ll wear it in two tails till I\'m twenty, cried Jo, pulling off her net, and shaking down a chestnut mane. I hate to think I\'ve got to grow up, and be Miss March, and wear long gowns, and look as prim as a China Aster! It\'s bad enough to be a girl, anyway, when I like boy\'s games and work and manners! I can\'t get over my disappointment in not being a boy. And it\'s worse than ever now, for I\'m dying to go and fight with Papa. And I can only stay home and knit, like a poky old woman! </p><p class="littlewomen">And Jo shook the blue army sock till the needles rattled like castanets, and her ball bounded across the room.</p><p class="littlewomen"> Poor Jo! It\'s too bad, but it can\'t be helped. So you must try to be contented with making your name boyish, and playing brother to us girls, said Beth, stroking the rough head with a hand that all the dish washing and dusting in the world could not make ungentle in its touch.</p><p class="littlewomen"> As for you, Amy, continued Meg, you are altogether to particular and prim. Your airs are funny now, but you\'ll grow up an affected little goose, if you don\'t take care. I I like your nice manners and refined ways of speaking, when you don\'t try to be elegant. But your absurd words are as bad as Jo\'s slang. </p><p class="littlewomen"> If Jo is a tomboy and Amy a goose, what am I, please? asked Beth, ready to share the lecture.</p><p class="littlewomen"> You\'re a dear, and nothing else, answered Meg warmly, and no one contradicted her, for the \'Mouse\' was the pet of the family.</p> - -<columns column-count="1" /> - - - - - - -<!-- LISTS --> -<pagebreak /> -<h3>Lists<bookmark content="Lists" level="1" /><tocentry name="" content="Lists" level="0" /><indexentry content="Lists" /></h3> -<div style="background-color:#ddccff; padding:0pt; border: 1px solid #555555;"> -<ol class="lista"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum. Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listb"> -<li>Text here lorem ipsum ibisque totum.</li> -<li><span style="color:green; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</span></li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum. -</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listc"> -<li>Big text indent 25mm: Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol class="listd"> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum. -<ol class="liste"> -<li>Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum. -<ol> -<li>No class specified. Text here lorem ipsum ibisque totum.</li> -<li style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</li> -</ol> -</li> -</ol> -</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem <span style="color:red; font-size:9pt; font-family:courier; font-weight: normal; font-style: normal;">ipsum</span> ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -<li>Text here lorem ipsum ibisque totum.</li> -</ol> -</div> - -<!-- TABLES --> -<pagebreak /> -<h3>Tables<bookmark content="Tables" level="1" /><tocentry name="" content="Tables" level="0" /><tocentry name="Tables" content="Tables - general" level="0" /><indexentry content="Tables" /></h3> -<p>mPDF supports all in-line properties inside tables.</p> -<table border="1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td> -<td> -<p>This is data p</p> -This is data out of p -<p style="font-weight:bold; font-size:20pt; background-color:#FFBBFF;">This is bold data p</p> -<b>This is bold data out of p</b><br /> -This is normal data after br -<h3>Heading 3 inside a table</h3> -Text here lorem <i>ipsum</i> ibisque totum.<sup>32</sup> -<div>This is data div</div> -This is data out of div -<div style="font-weight:bold;">This is data div (bold)</div> -This is data out of div -</td> - -<td>Also data</td></tr> -</tbody></table> - -<p>This table has padding-top and -bottom set to 3mm i.e. padding within the cells. Also background-, border colour and style, font family and size are set by in-line <acronym>CSS</acronym>.</p> -<table style="border: 1px solid #880000; background-color: #BBCCDD; font-family: Mono; font-size: 7pt; " class="tallcells"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr><td>Row 2</td><td><p>This is data p</p></td><td><p>More data</p></td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -</tbody></table> - - -<h4>Tables<bookmark content="Table styles" level="2" /><tocentry name="Tables" content="Table styles" level="0" /><indexentry content="Table:styles" /></h4> -<p>The style sheet used for these examples shows some of the table styles I use on my website. The property \'topntail\' defined by a border-type definition e.g. "1px solid #880000" puts a border at the top and bottom of the table, and also below a header row (thead) if defined. Note also that <thead> will automatically turn on the header-repeat i.e. reproduce the header row at the top of each page.</p> -<p>bpmTopic Class</p> -<table class="bpmTopic"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>More data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopic<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopicC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>bpmTopnTail Class </p> -<table class="bpmTopnTail"><thead></thead><tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td> -<p>Row 3</p> -</td> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td> -<p>Row 4 <td> cell</p> -</td> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> -<p> </p> -<p>bpmTopnTail<b>C</b> Class (centered) Odd and Even rows</p> -<table class="bpmTopnTailC"><thead> -<tr class="headerrow"><th>Col/Row Header</th> -<td> -<p>Second column header p</p> -</td> -<td>Third column header</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<p>This is data p</p> -</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th> -<p>Row header 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th> -<p>Row header 4</p> -<p><th> cell acting as header</p> -</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="oddrow"><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr class="evenrow"><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -</tbody></table> - -<p> </p> - -<p>TopnTail Class</p> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td class="pmhBottomRight"><b><i>Bottom right align</i></b></td> -<td> -<p>This is data. Can use</p> -<p><b>bold</b> <i>italic </i><sub>sub</sub> or <sup>sup</sup> text</p> -</td> -</tr> -<tr class="oddrow"><th class="pmhBottomRight"> -<p>Bottom right align</p> -</th> -<td class="pmhMiddleCenter" style="border: #000000 1px solid"> -<p>This is data. This cell</p> -<p>uses Cell Styles to set</p> -<p>the borders.</p> -<p>All borders are collapsible</p> -<p>in mPDF.</p> -</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 4</th> -<td> -<p>This is data p</p> -</td> -<td>More data</td> -</tr> -<tr class="oddrow"><th>Row header 5</th> -<td colspan="2" class="pmhTopCenter">Also data merged and centered</td> -</tr> -</tbody></table> - -<p> </p> - -<h4>Lists in a Table<bookmark content="Lists in a table" level="2" /><tocentry name="Tables" content="Lists in a table" level="0" /><indexentry content="Table:lists inside" /></h4> -<table class="bpmTopnTail"><thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second</p> -<p>column</p> -</td> -<td class="pmhTopRight">Top right align</td> -</tr> -</thead><tbody> -<tr class="oddrow"><th> -<p>Row header 1 p</p> -</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr class="evenrow"><th>Row header 2</th> -<td> -<ol> -<li>Item 1</li> -<li>Item 2 -<ol type="a"> -<li>Subitem of ordered list</li> -<li>Subitem 2 -<ol type="i"> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ol> -</li> -</ol> -</li> -<li>Item 3</li> -<li>Another Item</li> -<li>Subitem -<ol> -<li>Level 3 subitem</li> -</ol> -</li> -<li>Another Item</li> -</ol> -</td> -<td> -Unordered list: -<ul> -<li>Item 1</li> -<li>Item 2 -<ul> -<li>Subitem of unordered list</li> -<li>Subitem 2 -<ul> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -<li>Level 3 subitem</li> -</ul> -</li> -</ul> -</li> -<li>Item 3</li> -</ul> -</td> -</tr> -</tbody></table> -<p> </p> - - -<h4>Automatic Column Width<bookmark content="Automatic Column Width" level="2" /><tocentry name="Tables" content="Automatic column width" level="0" /><indexentry content="Table:automatic column width" /></h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td>Causes</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Ut magna ipsum, tempus in, condimentum at, rutrum et, nisl. Vestibulum interdum luctus sapien. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Maecenas consectetuer eros quis massa. Mauris semper velit vehicula purus. Duis lacus. Aenean pretium consectetuer mauris. Ut purus sem, consequat ut, fermentum sit amet, ornare sit amet, ipsum. Donec non nunc. Maecenas fringilla. Curabitur libero. In dui massa, malesuada sit amet, hendrerit vitae, viverra nec, tortor. Donec varius. Ut ut dolor et tellus adipiscing adipiscing.</td> -</tr> -</tbody></table> - - -<h4>Column span<bookmark content="Column span" level="2" /><tocentry name="Tables" content="Column span" level="0" /><indexentry content="Table:column span" /></h4> -<table class="bpmTopnTail"><tbody> -<tr> -<td>Causes</td> -<td colspan="2">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. <br /> -Ut a eros at ligula vehicula pretium; maecenas feugiat pede vel risus.<br /> -Suspendisse potenti</td> -</tr> -<tr> -<td>Mechanisms</td> -<td>Fusce eleifend neque sit amet erat.<br /> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus.</td> -<td>Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla.<br /> -Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</td> -</tr> -</tbody></table> - - - -<h4>Header & Footer Rows<bookmark content="Header Rows" level="2" /><tocentry name="Tables" content="Header rows" level="0" /><indexentry content="Table:header rows" /></h4> -<p>A table using a header or footer row should repeat the header/footer row across pages:</p> -<p>bpmTopic<b>C</b> Class</p> -<table class="bpmTopicC"> -<thead> -<tr class="headerrow"><th>Col and Row Header</th> -<td> -<p>Second column header</p> -</td> -<td>Third column header</td> -</tr> -</thead> -<tfoot> -<tr class="headerrow"><th>Col and Row Footer</th> -<td> -<p>Second column footer</p> -</td> -<td>Third column footer</td> -</tr> -</tfoot> -<tbody> -<tr><th>Row header 1</th> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr><th>Row header 2</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th> -<p>Row header 3</p> -</th> -<td> -<p>This is data</p> -</td> -<td>This is data</td> -</tr> -<tr><th>Row header 4</th> -<td>This is data</td> -<td> -<p>This is data</p> -</td> -</tr> -<tr><th>Row header 5</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 6</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 7</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 8</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Row header 9</th> -<td>Also data</td> -<td>Also data</td> -</tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -<tr><th>Another Row header</th><td>Also data</td><td>Also data</td></tr> -</tbody></table> -<p> </p> - -<h4>Autosizing Tables<bookmark content="Autosizing Tables" level="2" /><tocentry name="Tables" content="Autosizing tables" level="0" /><indexentry content="Table:autosizing" /></h4> -<p>Periodic Table of elements. Tables are set by default to reduce font size if complete words will not fit inside each cell, to a maximum of 1/1.4 * the set font-size. This value can be changed by setting $mpdf->shrink_tables_to_fit=1.8 or using html attribute <table autosize="1.8">.</p> - -<h5>Periodic Table</h5> - -<table style="border:1px solid #000000;" cellPadding="14"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td><td colspan="16"></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td>Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td> -<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td><td>Rh </td><td>Pd </td><td>Ag </td><td>Cd </td> -<td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td><td>Au </td> -<td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td>Ac </td><td colspan="15"></td> -</tr> -<tr> -<td colspan="18"></td></tr> -<tr> -<td colspan="3"></td><td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td> -<td>Dy </td><td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td><td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td><td>Cf </td> -<td>Es </td><td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> - -<pagebreak /> - -<h4>Rotated Tables<bookmark content="Rotated Tables" level="2" /><tocentry name="Tables" content="Rotated table" level="0" /><indexentry content="Table:rotated" /></h4> -<p>This is set to rotate -90 degrees (counterclockwise).</p> - -<h5>Periodic Table</h5> -<p> -<table rotate="-90" class="bpmClearC"><thead> -<tr><th>1A</th><th>2A</th><th>3B</th><th>4B</th><th>5B</th><th>6B</th><th>7B</th><th>8B</th><th>8B</th><th>8B</th><th>1B</th><th>2B</th><th>3A</th><th>4A</th><th>5A</th><th>6A</th><th>7A</th><th>8A</th></tr></thead><tbody> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td>H </td><td colspan="15"></td><td></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td>Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td><td>Cu </td> -<td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td><td>Rh </td><td>Pd </td> -<td>Ag </td><td>Cd </td><td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td><td>Au </td> -<td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td>Ac </td> -</tr> -<tr> -<td></td> -<td colspan="18"></td> -</tr> -<tr> -<td colspan="3"></td><td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td><td>Dy </td> -<td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td><td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td> -<td>Cf </td><td>Es </td><td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> -<p> </p> - -<pagebreak /> -<h4>Rotated text in Tables<bookmark content="Rotated text in Tables" level="2" /><tocentry name="Tables" content="Rotated text in table" level="0" /><indexentry content="Table:rotated text" /></h4> - -<h5>Periodic Table</h5> -<table> -<thead> -<tr text-rotate="45"> -<th><p>Element type 1A</p><p>Second line</p><th><p>Element type longer 2A</p></th> -<th>Element type 3B</th><th>Element type 4B</th><th>Element type 5B</th><th>Element type 6B</th><th>7B</th><th>8B</th> -<th>Element type 8B R</th><th>8B</th><th>Element <span>type</span> 1B</th><th>2B</th> -<th>Element type 3A</th><th>Element type 4A</th><th>Element type 5A</th><th>Element type 6A</th><th>7A</th><th>Element type 8A</th> -</tr> -</thead> - -<tbody> -<tr> -<td>H</td><td colspan="15"></td><td></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td colspan="10"></td><td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td colspan="10"></td><td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr style="text-rotate: 45"> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti</td><td>Va</td><td>Cr</td><td>Mn</td><td>Fe</td><td>Co</td><td>Ni </td> -<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td>Ru </td> -<td style="text-align:right; ">Rh</td><td>Pd </td><td>Ag </td><td>Cd </td><td>In </td><td>Sn </td> -<td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td>La </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td> -<td>Pt </td><td>Au </td><td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td colspan="16">Ac </td> -</tr> -<tr> -<td colspan="3"></td> -<td>Ce </td><td>Pr </td><td>Nd </td><td>Pm </td><td>Sm </td><td>Eu </td><td>Gd </td><td>Tb </td><td>Dy </td> -<td>Ho </td><td>Er </td><td>Tm </td><td>Yb </td><td>Lu </td><td></td> -</tr> -<tr> -<td colspan="3"></td> -<td>Th </td><td>Pa </td><td>U </td><td>Np </td><td>Pu </td><td>Am </td><td>Cm </td><td>Bk </td><td>Cf </td><td>Es </td> -<td>Fm </td><td>Md </td><td>No </td><td>Lr </td><td></td> -</tr> -</tbody></table> - - -<pagebreak /> - - - -<h4>Nested Tables<bookmark content="Nested Tables" level="2" /><tocentry name="Tables" content="Nested tables" level="0" /><indexentry content="Table:nested" /></h4> - -<div style="border: 2px solid #000088; background-color: #DDDDFF; padding: 2mm;"> -Text before table - -<div style="border: 2px solid #008888; background-color: #DCAFCF; padding: 2mm;"> - -<table cellSpacing="2" rotate="-90" align="center" autosize="1.5" class="nested" style="page-break-inside: avoid; "> -<tbody> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id <a href="http://www.dummy.com">euismod auctor</a>, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td> -<table cellSpacing="2" class="nested"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td></td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -</tbody></table> - -</div> - - - -<p>Text before table</p> - -<table cellSpacing="2" class="outer2" autosize="3" style="page-break-inside:avoid"> -<tbody> -<tr> -<td>Row 1</td> -<td>This is data</td> -<td style="text-align: right;"> -Text before table -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -<p>Text after table</p> -</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 2</td> -<td>This is data</td> -<td>This is data</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 3</td> -<td style="text-align: center; vertical-align: middle;"> -<table cellSpacing="2" class="inner" width="80%"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td> -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> -</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td style="vertical-align: bottom; "> -<table cellSpacing="2" class="inner" align="right"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td>B3</td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td>C3</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -<tr> -<td>Row 4</td> -<td>This is data</td> -<td><table cellSpacing="2" class="inner"> -<tbody> -<tr> -<td>Row A</td> -<td>A2</td> -<td>A3</td> -<td>A4</td> -</tr> -<tr> -<td>Row B</td> -<td>B2</td> -<td style="text-align:center;"><img src="sunset.jpg" width="84" style="border:3px solid #44FF44; vertical-align:top; " /></td> -<td>B4</td> -</tr> -<tr> -<td>Row C</td> -<td>C2</td> -<td> -<table cellSpacing="2"> -<tbody> -<tr> -<td>F1</td> -<td>F2</td> -</tr> -<tr> -<td>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec et nulla. Sed quis orci.</td> -<td>G2</td> -</tr> -</tbody></table> -</td> -<td>C4</td> -</tr> -<tr> -<td>Row D</td> -<td>D2</td> -<td>D3</td> -<td>D4</td> -</tr> -</tbody></table> -</td> -<td>This is data</td> -</tr> -</tbody></table> - - -</div> - - -<!-- FORMS --> -<pagebreak /> -<h3>Forms<bookmark content="Forms" level="1" /><tocentry name="" content="Forms" level="0" /><indexentry content="Forms" /></h3> -<form> -<b>Textarea</b> -<textarea name="authors" rows="5" cols="80" wrap="virtual">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. -Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> -<b>Select</b> -<select size="1" name="status"><option value="A">Active</option><option value="W" >New item from auto_manager: pending validation</option><option value="I" selected="selected">Incomplete record - pending</option><option value="X" >Flagged for Deletion</option> </select> followed by text -<br /><br /> -<b>Input Radio</b> -<input type="radio" name="recommended" value="0" > No <input type="radio" name="recommended" value="1" > Keep <input type="radio" name="recommended" value="2" checked="checked" > Choice -<br /><br /> -<b>Input Text</b> -<input type="text" size="190" name="doi" value="10.1258/jrsm.100.5.211"> -<br /><br /> -<b>Input Password</b> -<input type="password" size="40" name="password" value="secret"> -<br /><br /> -<input type="checkbox" name="QPC" value="ON" > Checkboxes<br> -<input type="checkbox" name="QPA" value="ON" > Not selected<br> -<input type="checkbox" name="QPA" value="ON" disabled="disabled"> Disabled<br> -<input type="checkbox" name="QLY" value="ON" checked="checked" > Selected -<br /><br /> -<input type="submit" name="submit" value="Submit" /> -<input type="image" name="submit" src="goto.gif" /> -<input type="button" name="submit" value="Button" /> -<input type="reset" name="submit" value="Reset" /> -<br /><br /> -</form> - - -<!-- ANNOTATIONS --> -<pagebreak /> -<h3>Annotations<bookmark content="Annotations" level="1" /><tocentry name="" content="Annotations" level="0" /><indexentry content="Annotations" /></h3> -<p>Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate.<annotation content="This is an annotation'."\n".'in the middle of the text" subject="My Subject" icon="Comment" color="#FE88EF" author="Ian Back" /> Donec luctus. Cras euismod tellus vel leo. Cras tellus. Fusce aliquet. Curabitur tincidunt viverra ligula. Fusce eget erat. Donec pede. Vestibulum id felis. Phasellus tincidunt ligula non pede. Morbi turpis. In vitae dui non erat placerat malesuada. Mauris adipiscing congue ante. Proin at erat. Aliquam mattis. </p> -<p>P: Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. <i>Fusce</i><annotation content="Fusce is a funny word!" subject="Idle Comments" icon="Note" author="Ian Back" pos-x="198" /> eleifend neque sit amet erat. Integer consectetuer nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien. Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -<!-- GRAPH --> -<pagebreak /> -<h3>Graphs<bookmark content="Graphs" level="1" /><tocentry name="" content="Graphs" level="0" /><indexentry content="Graphs" /></h3> -<table id="tbl_1" class="sub"><tbody><tr><td></td><td align="right"><b>Female</b></td><td align="right"><b>Male</b></td></tr><tr><td>35 - 44</td><td align="right"><b>4</b></td><td align="right"><b>2</b></td></tr><tr><td>45 - 54</td><td align="right"><b>5</b></td><td align="right"><b>7</b></td></tr><tr><td>55 - 64</td><td align="right"><b>21</b></td><td align="right"><b>18</b></td></tr><tr><td>65 - 74</td><td align="right"><b>11</b></td><td align="right"><b>14</b></td></tr><tr><td>75 - 84</td><td align="right"><b>10</b></td><td align="right"><b>10</b></td></tr><tr><td>85 - 94</td><td align="right"><b>2</b></td><td align="right"><b>1</b></td></tr><tr><td>95 - 104</td><td align="right"><b>1</b></td><td align="right"><b></b></td></tr> -<tr><td>TOTAL</td><td align="right">54</td><td align="right">52</td></tr> -</tbody></table> - -<h5>Subscriptions for 2008-09<tocentry name="Figures" content="Graph: Subscriptions for 2008-09" /></h5> -<jpgraph table="tbl_1" type="bar" stacked="0" dpi="300" title="New subscriptions" splines="1" bandw="0" antialias="1" label-y="% patients" label-x="Age group" axis-x="text" axis-y="lin" percent="0" series="cols" data-col-begin="2" data-row-begin="2" data-col-end="0" data-row-end="-1" show-values="1" width="600" legend-overlap="1" hide-grid="1" hide-y-axis="1" /> - - - -<!-- FULL IMAGES & BARCODE --> -<pagebreak /> -<h3>Full Images & Barcode<bookmark content="Full Images & Barcode" level="1" /><tocentry name="Figures" content="Full size image & Barcode" level="0" /><indexentry content="Image:full-size" /><tocentry name="" content="Barcode" level="0" /><indexentry content="Barcode" /></h3> -<p>On the first and last page of this document, an image is reproduced full page size by placing it inside a DIV element with CSS "position:absolute". In all other situations, images are constrained to the width and height of the printable page (i.e. inside the margins). The image on the back page has CSS "opacity:0.5".</p> - - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->SetAlpha(0.5); -$mpdf->Image(\'clematis.jpg\',0,0,210,297,\'jpg\',\'\',true, false); -// the last "false" allows a full page picture -$mpdf->SetAlpha(1); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - -<p>The back cover also has an ISBN barcode</p> - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->writeBarcode(\'978-0-9542246-0-8\', 1, 130, 230, 1,0, 3,3,4,4); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - -<p>But next is inserted the Index, which can also be done like this:</p> - -<!-- EXAMPLE PHP CODE --> -<div class="phpcode">'. nl2br(htmlspecialchars('/* ALTERNATIVE PHP METHOD */ -$mpdf->AddPage(\'\',NEXT-ODD\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',-1,-1,-1,-1); -$mpdf->WriteHTML(\'<h2>Index<bookmark content="Index" /></h2>\'); -$mpdf->WriteHTML(\'<indexinsert cols="2" font="serif" div-font="sans-serif" links="on" />\'); -')) .'</div> -<!-- END EXAMPLE PHP CODE --> - - - -<!-- INDEX --> -<pagebreak type="NEXT-ODD" odd-header-value="-1" even-header-value="-1" odd-footer-value="-1" even-footer-value="-1" /> -<h2>Index<bookmark content="Index" /></h2> -<indexinsert cols="2" font="serif" div-font="sans-serif" links="on" /> - - - -<!-- BACK COVER & BARCODE --> -<pagebreak type="NEXT-EVEN" /> -<div style="position: absolute; left:0; right: 0; top: 0; bottom: 0;"> -<img src="clematis.jpg" style="width: 210mm; height: 297mm; margin: 0; opacity: 0.5;" /> -</div> - -<div style="position: absolute; right: 35mm; bottom: 35mm; "> -<barcode code="978-0-9542246-0" type="ISBN" style="padding: 2.5mm; border: 0.1mm solid #000000;" height="0.66" text="1" /> -</div> - - - -</body></html>'; - -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF('s','A4','','',25,15,21,22,10,10); - -$mpdf->progbar_heading = 'mPDF file progress (Advanced)'; -$mpdf->StartProgressBarOutput(2); - -$mpdf->mirrorMargins = 1; -$mpdf->SetDisplayMode('fullpage','two'); -$mpdf->useGraphs = true; -$mpdf->list_number_suffix = ')'; -$mpdf->hyphenate = true; - -$mpdf->debug = true; - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example49_changelog.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example49_changelog.php deleted file mode 100644 index 279979dba394aab478bdfba156c1f213422b36ff..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example49_changelog.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -ini_set("memory_limit","384M"); - -// This is because changelog.txt contains over 100000 characters, and preg_* functions in mPDF won't work. -ini_set("pcre.backtrack_limit","200000"); - -include("../mpdf.php"); - -$mpdf=new mPDF(); - -$mpdf->tabSpaces = 6; - -$mpdf->allow_charset_conversion=true; -$mpdf->charset_in='windows-1252'; - - -//============================================================== - -$html = ' -<h1>mPDF</h1> -<h2>ChangeLog</h2> -<div style="border:1px solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: lucidaconsole, mono;"> -'; -$lines = file('../CHANGELOG.txt'); - -$html .= '<pre>'; -foreach($lines AS $line) { - $html .= htmlspecialchars($line); -} -$html .= '</pre>'; -$html .= '</div>'; - -//============================================================== - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example50_new_mPDF_3_features.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example50_new_mPDF_3_features.php deleted file mode 100644 index 903d3497868f139bd83c1c0fe82e9397440345ef..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example50_new_mPDF_3_features.php +++ /dev/null @@ -1,1905 +0,0 @@ -<?php - -$html = ' -<style> -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; -} -.radialgradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: radial #00FFFF #FFFF00 0.5 0.5 0.5 0.5 0.65; - margin: auto; -} -.rounded { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - border-radius: 2mm; - background-clip: border-box; -} -h4 { - font-family: sans; - font-weight: bold; - margin-top: 1em; - margin-bottom: 0.5em; -} -div { - padding:1em; - margin-bottom: 1em; - text-align:justify; -} -.example pre { - background-color: #d5d5d5; - margin: 1em 1cm; - padding: 0 0.3cm; -} - -pre { text-align:left } -pre.code { font-family: monospace } - -table.html4colortable {margin:auto; width:80%; border:none } -table.html4colortable TD {border:none; padding:0} -td .colorsquare { display:block;width:16px;height:16px;border:2px solid black } - -table.x11colortable td {text-align:center; background: white; } -table.x11colortable td.c { text-transform:uppercase } -table.x11colortable td:first-child, table.x11colortable td:first-child+td { border:1px solid black } -table.x11colortable th {text-align:center; background:black; color:white } - -table.tprofile th.title {background:gray; color:white} -table.tprofile th { width:29%;padding:2px } -table.tprofile td { width:71%;padding:2px } - -table.hslexample { background: #808080; padding:1em; margin:0; float:left; } -table.hslexample td,table.hslexample th { font-size:smaller;width:3em } -</style> -<!-- TEST FLOAT --> -<body style="background-gradient: linear #88FFFF #FFFF44 0 0.5 1 0.5;"> -<h2>mPDF Version 3.0</h2> -<h1>New Features</h1> - -<div style="border:0.1mm solid #220044; padding:1em 2em; background-color:#ffffcc; "> -<h4>Page background</h4> -<div class="gradient"> -The background colour can now be set by CSS styles on the <body> tag. This will set the background for the whole page. In this document, the background has been set as a gradient (see below). -</div> - -<h4>Background Gradients</h4> -<div class="gradient"> -Background can be set as a linear or radial gradient between two colours. The background has been set on this <div> element to a linear gradient. CSS style used here is:<br /> -<span style="font-family: mono; font-size: 9pt;">background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5;</span><br /> -The four numbers are coordinates in the form (x1, y1, x2, y2) which defines the gradient vector. x and y are values from 0 to 1, where 1 represents the height or width of the box as it is printed. -<br /> -<br /> -Background gradients can be set on all block elements e.g. P, DIV, H1-H6, as well as on BODY. -</div> -<div class="radialgradient"> -The background has been set on this <div> element to a radial gradient. CSS style used here is:<br /> -<span style="font-family: mono; font-size: 9pt;">background-gradient: radial #00FFFF #FFFF00 0.5 0.5 0.5 0.5 0.65;</span><br /> -The five numbers are coordinates in the form (x1, y1, x2, y2, r) where (x1, y1) is the starting point of the gradient with color1, -(x2, y2) is the center of the circle with color2, and r is the radius of the circle. -(x1, y1) should be inside the circle, otherwise some areas will not be defined. -<br /> -<br /> -Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec mattis lacus ac purus feugiat semper. Donec aliquet nunc odio, vitae pellentesque diam. Pellentesque sed velit lacus. Duis quis dui quis sem consectetur sollicitudin. Cras dolor quam, dapibus et pretium sit amet, elementum vel arcu. Duis rhoncus facilisis erat nec mattis. In hac habitasse platea dictumst. Vivamus hendrerit sem in justo aliquet a pellentesque lorem scelerisque. Suspendisse a augue sed urna rhoncus elementum. Aliquam erat volutpat. -</div> - -<h4>Background Images</h4> -<div style="border:0.1mm solid #880000; background: transparent url(bg.jpg) repeat fixed right top; background-color:#ccffff; "> -The CSS properties background-image, background-position, and background-repeat are supported as defined in CSS2, as well as the shorthand form "background". -<br /> -The background has been set on this <div> element to:<br /> -<span style="font-family: mono; font-size: 9pt;">background: transparent url(\'bg.jpg\') repeat fixed right top;</span><br /> -Background gradients can be set on all block elements e.g. P, DIV, H1-H6, as well as on BODY. -</div> - -<h4>Rounded Borders</h4> -<div class="rounded"> -Rounded corners to borders can be added using border-radius as defined in the draft spec. of <a href="http://www.w3.org/TR/2008/WD-css3-background-20080910/#layering">CSS3</a>. <br /> - -The two length values of the border-*-radius properties define the radii of a quarter ellipse that defines the shape of the corner of the outer border edge. -The first value is the horizontal radius. <br /> -<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 55pt 25pt;</span> 55pt is radius of curve from top end of left border starting to go round to the top.<br /> - -If the second length is omitted it is equal to the first (and the corner is thus a quarter circle). If either length is zero, the corner is square, not rounded.<br /> - -The border-radius shorthand sets all four border-*-radius properties. If values are given before and after a slash, then the values before the slash set the horizontal radius and the values after the slash set the vertical radius. If there is no slash, then the values set both radii equally. The four values for each radii are given in the order top-left, top-right, bottom-right, bottom-left. If bottom-left is omitted it is the same as top-right. If bottom-right is omitted it is the same as top-left. If top-right is omitted it is the same as top-left. -</div> -<div class="rounded"> -<span style="font-family: mono; font-size: 9pt;">border-radius: 4em;</span><br /> - -would be equivalent to<br /> - -<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 4em;<br /> -border-top-right-radius: 4em;<br /> -border-bottom-right-radius: 4em;<br /> -border-bottom-left-radius: 4em;</span><br /> -<br /> -and<br /> -<span style="font-family: mono; font-size: 9pt;">border-radius: 2em 1em 4em / 0.5em 3em;</span><br /> -would be equivalent to<br /> -<span style="font-family: mono; font-size: 9pt;">border-top-left-radius: 2em 0.5em;<br /> -border-top-right-radius: 1em 3em;<br /> -border-bottom-right-radius: 4em 0.5em;<br /> -border-bottom-left-radius: 1em 3em;</span> -</div> - -<h4>Interlaced and alpha-channel-set PNG images supported</h4> -<div class="rounded"> -Prior to version 3.0, mPDF has not supported PNG images which are interlaced, or images with transparency - now it does. -<div style="float: left; width: 45%; background-color: #CCFFFF; margin-bottom: 0pt; ">With a blue background-color set, this PNG image with transparency appears like this: -<br /><img src="alpha.png" width="70" /> -</div> -<div style="float: right; width: 45%; background-color: #FFFFCC; margin-bottom: 0pt; ">With a different background-color set, the same image appears like this: -<br /><img src="alpha.png" width="70" /> -</div> -<div style="clear: both; margin-bottom: 0pt; ">This will not work with background-gradient or background-image (the background-color is used to paint the transparent parts of the image).</div> -</div> - - -</div> - - -<h4>CSS "Float"</h4> -<div> -Block elements can be positioned alongside each other using the CSS property float: left or right. The clear property can also be used, set as left|right|both. Float is only supported on block elements (i.e. not SPAN etc.) and is not fully compliant with the CSS specification. -Float only works properly if a width is set for the float, otherwise the width is set to the maximum available (full width, or less if floats already set). -<br /> -Margin-right can still be set for a float:right and vice-versa. -<br /> -A block element next to a float has the padding adjusted so that content fits in the remaining width. Text next to a float should wrap correctly, but backgrounds and borders will overlap and/or lie under the floats in a mess. -<br /> -NB The width that is set defines the width of the content-box. So if you have two floats with width=50% and either of them has padding, margin or border, they will not fit together on the page. -</div> -<div class="gradient" style="float: right; width: 28%; margin-bottom: 0pt; "> -This is text in a <div> element that is set to float:right and width:28%. -</div> -<div class="gradient" style="float: left; width: 54%; margin-bottom: 0pt; "> -This is text in a <div> element that is set to float:left and width:54%. -</div> - -<div style="clear: both; margin: 0pt; padding: 0pt; "></div> -This is text that follows a <div> element that is set to clear:both. - - - -<h4>HTML Headers now support hyperlinks</h4> -<div class="gradient"> -Hyperlinks can now be included in HTML headers and footers. See the link to the documentation manual in the footer of this document. -</div> - - -contd... - -<pagebreak resetpagenum="20" /> -<h4>Resetting Page Numbering</h4> -<div class="gradient"> -Page numbers can now be reset to any value (rather than just 1) during the document i.e. in any function/tag that supports resetting the numbering: AddPage(), <pagebreak> etc. -<br /> -Note that the page number has been reset to 20 from this page. -</div> - -<h4>Page Numbering - additional text</h4> -<div class="gradient"> -Text can be defined to appear before and after page numbers ($pagenumPrefix; $pagenumSuffix; $nbpgPrefix; $nbpgSuffix;) -<br /> -This document has a non-HTML header defined with the right content as \'{PAGENO}{<span>nbpg</span>}\'.<br /> -The following values have been set:<br /> -<span style="font-family: mono; font-size: 9pt;">$mpdf->pagenumPrefix = \'Page \';<br /> -$mpdf->pagenumSuffix = \'\';<br /> -$mpdf->nbpgPrefix = \' of \';<br /> -$mpdf->nbpgSuffix = \' pages.\';</span> -<br /> -<br /> - -This is only recommended in non-HTML headers and footers. Although the text is added correctly in HTML headers & footers, the text alignment is not readjusted after substitution e.g. if it used in the right margin. -</div> - -<h4>Other New features</h4> -<div style="border:0.1mm solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: mono;"> -- internal links supported in Indexes (parameter added to CreateIndex() and CreateReference()<br /> $useLinking=true;)<br /> -- improved handling of <br>, block elements, and text lines inside tables<br /> -- borders of block-level elements & table cell borders supported (partially) in columns<br /> -- optional error reporting for problems with Images ($showImageErrors=true;)<br /> -- ToC will word-wrap long entries<br /> -- internal links (Bookmarks, IndexEntry and ToCEntry) rewritten to give more accurate positioning<br /> (when used as <tag>)<br /> -- autofont algorithm improved for CJK languages<br /> -</div> - - - <h4>All SVG color keywords supported</h4> - <p style="margin: 0pt;">This table provides a list of all the named colors supported by mPDF. The - list is precisely the same as the <a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords">SVG 1.0 color - keyword names</a>. - The two color swatches on the left illustrate setting the background color - of a table cell in two ways: The first column uses the named color value, - and the second column uses the respective numeric color value. - </p> -<table align="center" class="x11colortable" style="background-color: white" > - <tbody> - <tr> - <th style="background: black ">Named - </th><th>Numeric - </th><th>Color name - - </th><th>Hex rgb - - </th><th>Decimal - - </th></tr><tr> - <td class="c" style="background: aliceblue "> - - </td><td class="c" style="background: rgb(240, 248, 255) "> - - </td><td>aliceblue - - </td><td class="c" style="background-color: #FFFFFF; ">#f0f8ff - - </td><td class="c" style="background-color: #FFFFFF; ">240,248,255 - - </td></tr><tr> - <td class="c" style="background: antiquewhite "> - - </td><td class="c" style="background: rgb(250, 235, 215) "> - - </td><td>antiquewhite - - </td><td class="c" style="background-color: #FFFFFF; ">#faebd7 - - </td><td class="c" style="background-color: #FFFFFF; ">250,235,215 - - </td></tr><tr> - <td class="c" style="background: aqua "> - - </td><td class="c" style="background: rgb(0, 255, 255) "> - - </td><td>aqua - - </td><td class="c" style="background-color: #FFFFFF; ">#00ffff - - </td><td class="c" style="background-color: #FFFFFF; ">0,255,255 - - </td></tr><tr> - <td class="c" style="background: aquamarine "> - - </td><td class="c" style="background: rgb(127, 255, 212) "> - - </td><td>aquamarine - - </td><td class="c" style="background-color: #FFFFFF; ">#7fffd4 - - </td><td class="c" style="background-color: #FFFFFF; ">127,255,212 - - </td></tr><tr> - <td class="c" style="background: azure "> - - </td><td class="c" style="background: rgb(240, 255, 255) "> - - </td><td>azure - - </td><td class="c" style="background-color: #FFFFFF; ">#f0ffff - - </td><td class="c" style="background-color: #FFFFFF; ">240,255,255 - - </td></tr><tr> - <td class="c" style="background: beige "> - - </td><td class="c" style="background: rgb(245, 245, 220) "> - - </td><td>beige - - </td><td class="c" style="background-color: #FFFFFF; ">#f5f5dc - - </td><td class="c" style="background-color: #FFFFFF; ">245,245,220 - - </td></tr><tr> - <td class="c" style="background: bisque "> - - </td><td class="c" style="background: rgb(255, 228, 196) "> - - </td><td>bisque - - </td><td class="c" style="background-color: #FFFFFF; ">#ffe4c4 - - </td><td class="c" style="background-color: #FFFFFF; ">255,228,196 - - </td></tr><tr> - <td class="c" style="background: black "> - - </td><td class="c" style="background: rgb(0, 0, 0) "> - - </td><td>black - - </td><td class="c" style="background-color: #FFFFFF; ">#000000 - - </td><td class="c" style="background-color: #FFFFFF; ">0,0,0 - - </td></tr><tr> - <td class="c" style="background: blanchedalmond "> - - </td><td class="c" style="background: rgb(255, 235, 205) "> - - </td><td>blanchedalmond - - </td><td class="c" style="background-color: #FFFFFF; ">#ffebcd - - </td><td class="c" style="background-color: #FFFFFF; ">255,235,205 - - </td></tr><tr> - <td class="c" style="background: blue "> - - </td><td class="c" style="background: rgb(0, 0, 255) "> - - </td><td>blue - - </td><td class="c" style="background-color: #FFFFFF; ">#0000ff - - </td><td class="c" style="background-color: #FFFFFF; ">0,0,255 - - </td></tr><tr> - <td class="c" style="background: blueviolet "> - - </td><td class="c" style="background: rgb(138, 43, 226) "> - - </td><td>blueviolet - - </td><td class="c" style="background-color: #FFFFFF; ">#8a2be2 - - </td><td class="c" style="background-color: #FFFFFF; ">138,43,226 - - </td></tr><tr> - <td class="c" style="background: brown "> - - </td><td class="c" style="background: rgb(165, 42, 42) "> - - </td><td>brown - - </td><td class="c" style="background-color: #FFFFFF; ">#a52a2a - - </td><td class="c" style="background-color: #FFFFFF; ">165,42,42 - - </td></tr><tr> - <td class="c" style="background: burlywood "> - - </td><td class="c" style="background: rgb(222, 184, 135) "> - - </td><td>burlywood - - </td><td class="c" style="background-color: #FFFFFF; ">#deb887 - - </td><td class="c" style="background-color: #FFFFFF; ">222,184,135 - - </td></tr><tr> - <td class="c" style="background: cadetblue "> - - </td><td class="c" style="background: rgb(95, 158, 160) "> - - </td><td>cadetblue - - </td><td class="c" style="background-color: #FFFFFF; ">#5f9ea0 - - </td><td class="c" style="background-color: #FFFFFF; ">95,158,160 - - </td></tr><tr> - <td class="c" style="background: chartreuse "> - - </td><td class="c" style="background: rgb(127, 255, 0) "> - - </td><td>chartreuse - - </td><td class="c" style="background-color: #FFFFFF; ">#7fff00 - - </td><td class="c" style="background-color: #FFFFFF; ">127,255,0 - - </td></tr><tr> - <td class="c" style="background: chocolate "> - - </td><td class="c" style="background: rgb(210, 105, 30) "> - - </td><td>chocolate - - </td><td class="c" style="background-color: #FFFFFF; ">#d2691e - - </td><td class="c" style="background-color: #FFFFFF; ">210,105,30 - - </td></tr><tr> - <td class="c" style="background: coral "> - - </td><td class="c" style="background: rgb(255, 127, 80) "> - - </td><td>coral - - </td><td class="c" style="background-color: #FFFFFF; ">#ff7f50 - - </td><td class="c" style="background-color: #FFFFFF; ">255,127,80 - - </td></tr><tr> - <td class="c" style="background: cornflowerblue "> - - </td><td class="c" style="background: rgb(100, 149, 237) "> - - </td><td>cornflowerblue - - </td><td class="c" style="background-color: #FFFFFF; ">#6495ed - - </td><td class="c" style="background-color: #FFFFFF; ">100,149,237 - - </td></tr><tr> - <td class="c" style="background: cornsilk "> - - </td><td class="c" style="background: rgb(255, 248, 220) "> - - </td><td>cornsilk - - </td><td class="c" style="background-color: #FFFFFF; ">#fff8dc - - </td><td class="c" style="background-color: #FFFFFF; ">255,248,220 - - </td></tr><tr> - <td class="c" style="background: crimson "> - - </td><td class="c" style="background: rgb(220, 20, 60) "> - - </td><td>crimson - - </td><td class="c" style="background-color: #FFFFFF; ">#dc143c - - </td><td class="c" style="background-color: #FFFFFF; ">220,20,60 - - </td></tr><tr> - <td class="c" style="background: cyan "> - - </td><td class="c" style="background: rgb(0, 255, 255) "> - - </td><td>cyan - - </td><td class="c" style="background-color: #FFFFFF; ">#00ffff - - </td><td class="c" style="background-color: #FFFFFF; ">0,255,255 - - </td></tr><tr> - <td class="c" style="background: darkblue "> - - </td><td class="c" style="background: rgb(0, 0, 139) "> - - </td><td>darkblue - - </td><td class="c" style="background-color: #FFFFFF; ">#00008b - - </td><td class="c" style="background-color: #FFFFFF; ">0,0,139 - - </td></tr><tr> - <td class="c" style="background: darkcyan "> - - </td><td class="c" style="background: rgb(0, 139, 139) "> - - </td><td>darkcyan - - </td><td class="c" style="background-color: #FFFFFF; ">#008b8b - - </td><td class="c" style="background-color: #FFFFFF; ">0,139,139 - - </td></tr><tr> - <td class="c" style="background: darkgoldenrod "> - - </td><td class="c" style="background: rgb(184, 134, 11) "> - - </td><td>darkgoldenrod - - </td><td class="c" style="background-color: #FFFFFF; ">#b8860b - - </td><td class="c" style="background-color: #FFFFFF; ">184,134,11 - - </td></tr><tr> - <td class="c" style="background: darkgray "> - - </td><td class="c" style="background: rgb(169, 169, 169) "> - - </td><td>darkgray - - </td><td class="c" style="background-color: #FFFFFF; ">#a9a9a9 - - </td><td class="c" style="background-color: #FFFFFF; ">169,169,169 - - </td></tr><tr> - <td class="c" style="background: darkgreen "> - - </td><td class="c" style="background: rgb(0, 100, 0) "> - - </td><td>darkgreen - - </td><td class="c" style="background-color: #FFFFFF; ">#006400 - - </td><td class="c" style="background-color: #FFFFFF; ">0,100,0 - - </td></tr><tr> - <td class="c" style="background: darkgrey "> - - </td><td class="c" style="background: rgb(169, 169, 169) "> - - </td><td>darkgrey - - </td><td class="c" style="background-color: #FFFFFF; ">#a9a9a9 - - </td><td class="c" style="background-color: #FFFFFF; ">169,169,169 - - </td></tr><tr> - <td class="c" style="background: darkkhaki "> - - </td><td class="c" style="background: rgb(189, 183, 107) "> - - </td><td>darkkhaki - - </td><td class="c" style="background-color: #FFFFFF; ">#bdb76b - - </td><td class="c" style="background-color: #FFFFFF; ">189,183,107 - - </td></tr><tr> - <td class="c" style="background: darkmagenta "> - - </td><td class="c" style="background: rgb(139, 0, 139) "> - - </td><td>darkmagenta - - </td><td class="c" style="background-color: #FFFFFF; ">#8b008b - - </td><td class="c" style="background-color: #FFFFFF; ">139,0,139 - - </td></tr><tr> - <td class="c" style="background: darkolivegreen "> - - </td><td class="c" style="background: rgb(85, 107, 47) "> - - </td><td>darkolivegreen - - </td><td class="c" style="background-color: #FFFFFF; ">#556b2f - - </td><td class="c" style="background-color: #FFFFFF; ">85,107,47 - - </td></tr><tr> - <td class="c" style="background: darkorange "> - - </td><td class="c" style="background: rgb(255, 140, 0) "> - - </td><td>darkorange - - </td><td class="c" style="background-color: #FFFFFF; ">#ff8c00 - - </td><td class="c" style="background-color: #FFFFFF; ">255,140,0 - - </td></tr><tr> - <td class="c" style="background: darkorchid "> - - </td><td class="c" style="background: rgb(153, 50, 204) "> - - </td><td>darkorchid - - </td><td class="c" style="background-color: #FFFFFF; ">#9932cc - - </td><td class="c" style="background-color: #FFFFFF; ">153,50,204 - - </td></tr><tr> - <td class="c" style="background: darkred "> - - </td><td class="c" style="background: rgb(139, 0, 0) "> - - </td><td>darkred - - </td><td class="c" style="background-color: #FFFFFF; ">#8b0000 - - </td><td class="c" style="background-color: #FFFFFF; ">139,0,0 - - </td></tr><tr> - <td class="c" style="background: darksalmon "> - - </td><td class="c" style="background: rgb(233, 150, 122) "> - - </td><td>darksalmon - - </td><td class="c" style="background-color: #FFFFFF; ">#e9967a - - </td><td class="c" style="background-color: #FFFFFF; ">233,150,122 - - </td></tr><tr> - <td class="c" style="background: darkseagreen "> - - </td><td class="c" style="background: rgb(143, 188, 143) "> - - </td><td>darkseagreen - - </td><td class="c" style="background-color: #FFFFFF; ">#8fbc8f - - </td><td class="c" style="background-color: #FFFFFF; ">143,188,143 - - </td></tr><tr> - <td class="c" style="background: darkslateblue "> - - </td><td class="c" style="background: rgb(72, 61, 139) "> - - </td><td>darkslateblue - - </td><td class="c" style="background-color: #FFFFFF; ">#483d8b - - </td><td class="c" style="background-color: #FFFFFF; ">72,61,139 - - </td></tr><tr> - <td class="c" style="background: darkslategray "> - - </td><td class="c" style="background: rgb(47, 79, 79) "> - - </td><td>darkslategray - - </td><td class="c" style="background-color: #FFFFFF; ">#2f4f4f - - </td><td class="c" style="background-color: #FFFFFF; ">47,79,79 - - </td></tr><tr> - <td class="c" style="background: darkslategrey "> - - </td><td class="c" style="background: rgb(47, 79, 79) "> - - </td><td>darkslategrey - - </td><td class="c" style="background-color: #FFFFFF; ">#2f4f4f - - </td><td class="c" style="background-color: #FFFFFF; ">47,79,79 - - </td></tr><tr> - <td class="c" style="background: darkturquoise "> - - </td><td class="c" style="background: rgb(0, 206, 209) "> - - </td><td>darkturquoise - - </td><td class="c" style="background-color: #FFFFFF; ">#00ced1 - - </td><td class="c" style="background-color: #FFFFFF; ">0,206,209 - - </td></tr><tr> - <td class="c" style="background: darkviolet "> - - </td><td class="c" style="background: rgb(148, 0, 211) "> - - </td><td>darkviolet - - </td><td class="c" style="background-color: #FFFFFF; ">#9400d3 - - </td><td class="c" style="background-color: #FFFFFF; ">148,0,211 - - </td></tr><tr> - <td class="c" style="background: deeppink "> - - </td><td class="c" style="background: rgb(255, 20, 147) "> - - </td><td>deeppink - - </td><td class="c" style="background-color: #FFFFFF; ">#ff1493 - - </td><td class="c" style="background-color: #FFFFFF; ">255,20,147 - - </td></tr><tr> - <td class="c" style="background: deepskyblue "> - - </td><td class="c" style="background: rgb(0, 191, 255) "> - - </td><td>deepskyblue - - </td><td class="c" style="background-color: #FFFFFF; ">#00bfff - - </td><td class="c" style="background-color: #FFFFFF; ">0,191,255 - - </td></tr><tr> - <td class="c" style="background: dimgray "> - - </td><td class="c" style="background: rgb(105, 105, 105) "> - - </td><td>dimgray - - </td><td class="c" style="background-color: #FFFFFF; ">#696969 - - </td><td class="c" style="background-color: #FFFFFF; ">105,105,105 - - </td></tr><tr> - <td class="c" style="background: dimgrey "> - - </td><td class="c" style="background: rgb(105, 105, 105) "> - - </td><td>dimgrey - - </td><td class="c" style="background-color: #FFFFFF; ">#696969 - - </td><td class="c" style="background-color: #FFFFFF; ">105,105,105 - - </td></tr><tr> - <td class="c" style="background: dodgerblue "> - - </td><td class="c" style="background: rgb(30, 144, 255) "> - - </td><td>dodgerblue - - </td><td class="c" style="background-color: #FFFFFF; ">#1e90ff - - </td><td class="c" style="background-color: #FFFFFF; ">30,144,255 - - </td></tr><tr> - <td class="c" style="background: firebrick "> - - </td><td class="c" style="background: rgb(178, 34, 34) "> - - </td><td>firebrick - - </td><td class="c" style="background-color: #FFFFFF; ">#b22222 - - </td><td class="c" style="background-color: #FFFFFF; ">178,34,34 - - </td></tr><tr> - <td class="c" style="background: floralwhite "> - - </td><td class="c" style="background: rgb(255, 250, 240) "> - - </td><td>floralwhite - - </td><td class="c" style="background-color: #FFFFFF; ">#fffaf0 - - </td><td class="c" style="background-color: #FFFFFF; ">255,250,240 - - </td></tr><tr> - <td class="c" style="background: forestgreen "> - - </td><td class="c" style="background: rgb(34, 139, 34) "> - - </td><td>forestgreen - - </td><td class="c" style="background-color: #FFFFFF; ">#228b22 - - </td><td class="c" style="background-color: #FFFFFF; ">34,139,34 - - </td></tr><tr> - <td class="c" style="background: fuchsia "> - - </td><td class="c" style="background: rgb(255, 0, 255) "> - - </td><td>fuchsia - - </td><td class="c" style="background-color: #FFFFFF; ">#ff00ff - - </td><td class="c" style="background-color: #FFFFFF; ">255,0,255 - - </td></tr><tr> - <td class="c" style="background: gainsboro "> - - </td><td class="c" style="background: rgb(220, 220, 220) "> - - </td><td>gainsboro - - </td><td class="c" style="background-color: #FFFFFF; ">#dcdcdc - - </td><td class="c" style="background-color: #FFFFFF; ">220,220,220 - - </td></tr><tr> - <td class="c" style="background: ghostwhite "> - - </td><td class="c" style="background: rgb(248, 248, 255) "> - - </td><td>ghostwhite - - </td><td class="c" style="background-color: #FFFFFF; ">#f8f8ff - - </td><td class="c" style="background-color: #FFFFFF; ">248,248,255 - - </td></tr><tr> - <td class="c" style="background: gold "> - - </td><td class="c" style="background: rgb(255, 215, 0) "> - - </td><td>gold - - </td><td class="c" style="background-color: #FFFFFF; ">#ffd700 - - </td><td class="c" style="background-color: #FFFFFF; ">255,215,0 - - </td></tr><tr> - <td class="c" style="background: goldenrod "> - - </td><td class="c" style="background: rgb(218, 165, 32) "> - - </td><td>goldenrod - - </td><td class="c" style="background-color: #FFFFFF; ">#daa520 - - </td><td class="c" style="background-color: #FFFFFF; ">218,165,32 - - </td></tr><tr> - <td class="c" style="background: gray "> - - </td><td class="c" style="background: rgb(128, 128, 128) "> - - </td><td>gray - - </td><td class="c" style="background-color: #FFFFFF; ">#808080 - - </td><td class="c" style="background-color: #FFFFFF; ">128,128,128 - - </td></tr><tr> - <td class="c" style="background: green "> - - </td><td class="c" style="background: rgb(0, 128, 0) "> - - </td><td>green - - </td><td class="c" style="background-color: #FFFFFF; ">#008000 - - </td><td class="c" style="background-color: #FFFFFF; ">0,128,0 - - </td></tr><tr> - <td class="c" style="background: greenyellow "> - - </td><td class="c" style="background: rgb(173, 255, 47) "> - - </td><td>greenyellow - - </td><td class="c" style="background-color: #FFFFFF; ">#adff2f - - </td><td class="c" style="background-color: #FFFFFF; ">173,255,47 - - </td></tr><tr> - <td class="c" style="background: grey "> - - </td><td class="c" style="background: rgb(128, 128, 128) "> - - </td><td>grey - - </td><td class="c" style="background-color: #FFFFFF; ">#808080 - - </td><td class="c" style="background-color: #FFFFFF; ">128,128,128 - - </td></tr><tr> - <td class="c" style="background: honeydew "> - - </td><td class="c" style="background: rgb(240, 255, 240) "> - - </td><td>honeydew - - </td><td class="c" style="background-color: #FFFFFF; ">#f0fff0 - - </td><td class="c" style="background-color: #FFFFFF; ">240,255,240 - - </td></tr><tr> - <td class="c" style="background: hotpink "> - - </td><td class="c" style="background: rgb(255, 105, 180) "> - - </td><td>hotpink - - </td><td class="c" style="background-color: #FFFFFF; ">#ff69b4 - - </td><td class="c" style="background-color: #FFFFFF; ">255,105,180 - - </td></tr><tr> - <td class="c" style="background: indianred "> - - </td><td class="c" style="background: rgb(205, 92, 92) "> - - </td><td>indianred - - </td><td class="c" style="background-color: #FFFFFF; ">#cd5c5c - - </td><td class="c" style="background-color: #FFFFFF; ">205,92,92 - - </td></tr><tr> - <td class="c" style="background: indigo "> - - </td><td class="c" style="background: rgb(75, 0, 130) "> - - </td><td>indigo - - </td><td class="c" style="background-color: #FFFFFF; ">#4b0082 - - </td><td class="c" style="background-color: #FFFFFF; ">75,0,130 - - </td></tr><tr> - <td class="c" style="background: ivory "> - - </td><td class="c" style="background: rgb(255, 255, 240) "> - - </td><td>ivory - - </td><td class="c" style="background-color: #FFFFFF; ">#fffff0 - - </td><td class="c" style="background-color: #FFFFFF; ">255,255,240 - - </td></tr><tr> - <td class="c" style="background: khaki "> - - </td><td class="c" style="background: rgb(240, 230, 140) "> - - </td><td>khaki - - </td><td class="c" style="background-color: #FFFFFF; ">#f0e68c - - </td><td class="c" style="background-color: #FFFFFF; ">240,230,140 - - </td></tr><tr> - <td class="c" style="background: lavender "> - - </td><td class="c" style="background: rgb(230, 230, 250) "> - - </td><td>lavender - - </td><td class="c" style="background-color: #FFFFFF; ">#e6e6fa - - </td><td class="c" style="background-color: #FFFFFF; ">230,230,250 - - </td></tr><tr> - <td class="c" style="background: lavenderblush "> - - </td><td class="c" style="background: rgb(255, 240, 245) "> - - </td><td>lavenderblush - - </td><td class="c" style="background-color: #FFFFFF; ">#fff0f5 - - </td><td class="c" style="background-color: #FFFFFF; ">255,240,245 - - </td></tr><tr> - <td class="c" style="background: lawngreen "> - - </td><td class="c" style="background: rgb(124, 252, 0) "> - - </td><td>lawngreen - - </td><td class="c" style="background-color: #FFFFFF; ">#7cfc00 - - </td><td class="c" style="background-color: #FFFFFF; ">124,252,0 - - </td></tr><tr> - <td class="c" style="background: lemonchiffon "> - - </td><td class="c" style="background: rgb(255, 250, 205) "> - - </td><td>lemonchiffon - - </td><td class="c" style="background-color: #FFFFFF; ">#fffacd - - </td><td class="c" style="background-color: #FFFFFF; ">255,250,205 - - </td></tr><tr> - <td class="c" style="background: lightblue "> - - </td><td class="c" style="background: rgb(173, 216, 230) "> - - </td><td>lightblue - - </td><td class="c" style="background-color: #FFFFFF; ">#add8e6 - - </td><td class="c" style="background-color: #FFFFFF; ">173,216,230 - - </td></tr><tr> - <td class="c" style="background: lightcoral "> - - </td><td class="c" style="background: rgb(240, 128, 128) "> - - </td><td>lightcoral - - </td><td class="c" style="background-color: #FFFFFF; ">#f08080 - - </td><td class="c" style="background-color: #FFFFFF; ">240,128,128 - - </td></tr><tr> - <td class="c" style="background: lightcyan "> - - </td><td class="c" style="background: rgb(224, 255, 255) "> - - </td><td>lightcyan - - </td><td class="c" style="background-color: #FFFFFF; ">#e0ffff - - </td><td class="c" style="background-color: #FFFFFF; ">224,255,255 - - </td></tr><tr> - <td class="c" style="background: lightgoldenrodyellow "> - - </td><td class="c" style="background: rgb(250, 250, 210) "> - - </td><td>lightgoldenrodyellow - - </td><td class="c" style="background-color: #FFFFFF; ">#fafad2 - - </td><td class="c" style="background-color: #FFFFFF; ">250,250,210 - - </td></tr><tr> - <td class="c" style="background: lightgray "> - - </td><td class="c" style="background: rgb(211, 211, 211) "> - - </td><td>lightgray - - </td><td class="c" style="background-color: #FFFFFF; ">#d3d3d3 - - </td><td class="c" style="background-color: #FFFFFF; ">211,211,211 - - </td></tr><tr> - <td class="c" style="background: lightgreen "> - - </td><td class="c" style="background: rgb(144, 238, 144) "> - - </td><td>lightgreen - - </td><td class="c" style="background-color: #FFFFFF; ">#90ee90 - - </td><td class="c" style="background-color: #FFFFFF; ">144,238,144 - - </td></tr><tr> - <td class="c" style="background: lightgrey "> - - </td><td class="c" style="background: rgb(211, 211, 211) "> - - </td><td>lightgrey - - </td><td class="c" style="background-color: #FFFFFF; ">#d3d3d3 - - </td><td class="c" style="background-color: #FFFFFF; ">211,211,211 - - </td></tr><tr> - <td class="c" style="background: lightpink "> - - </td><td class="c" style="background: rgb(255, 182, 193) "> - - </td><td>lightpink - - </td><td class="c" style="background-color: #FFFFFF; ">#ffb6c1 - - </td><td class="c" style="background-color: #FFFFFF; ">255,182,193 - - </td></tr><tr> - <td class="c" style="background: lightsalmon "> - - </td><td class="c" style="background: rgb(255, 160, 122) "> - - </td><td>lightsalmon - - </td><td class="c" style="background-color: #FFFFFF; ">#ffa07a - - </td><td class="c" style="background-color: #FFFFFF; ">255,160,122 - - </td></tr><tr> - <td class="c" style="background: lightseagreen "> - - </td><td class="c" style="background: rgb(32, 178, 170) "> - - </td><td>lightseagreen - - </td><td class="c" style="background-color: #FFFFFF; ">#20b2aa - - </td><td class="c" style="background-color: #FFFFFF; ">32,178,170 - - </td></tr><tr> - <td class="c" style="background: lightskyblue "> - - </td><td class="c" style="background: rgb(135, 206, 250) "> - - </td><td>lightskyblue - - </td><td class="c" style="background-color: #FFFFFF; ">#87cefa - - </td><td class="c" style="background-color: #FFFFFF; ">135,206,250 - - </td></tr><tr> - <td class="c" style="background: lightslategray "> - - </td><td class="c" style="background: rgb(119, 136, 153) "> - - </td><td>lightslategray - - </td><td class="c" style="background-color: #FFFFFF; ">#778899 - - </td><td class="c" style="background-color: #FFFFFF; ">119,136,153 - - </td></tr><tr> - <td class="c" style="background: lightslategrey "> - - </td><td class="c" style="background: rgb(119, 136, 153) "> - - </td><td>lightslategrey - - </td><td class="c" style="background-color: #FFFFFF; ">#778899 - - </td><td class="c" style="background-color: #FFFFFF; ">119,136,153 - - </td></tr><tr> - <td class="c" style="background: lightsteelblue "> - - </td><td class="c" style="background: rgb(176, 196, 222) "> - - </td><td>lightsteelblue - - </td><td class="c" style="background-color: #FFFFFF; ">#b0c4de - - </td><td class="c" style="background-color: #FFFFFF; ">176,196,222 - - </td></tr><tr> - <td class="c" style="background: lightyellow "> - - </td><td class="c" style="background: rgb(255, 255, 224) "> - - </td><td>lightyellow - - </td><td class="c" style="background-color: #FFFFFF; ">#ffffe0 - - </td><td class="c" style="background-color: #FFFFFF; ">255,255,224 - - </td></tr><tr> - <td class="c" style="background: lime "> - - </td><td class="c" style="background: rgb(0, 255, 0) "> - - </td><td>lime - - </td><td class="c" style="background-color: #FFFFFF; ">#00ff00 - - </td><td class="c" style="background-color: #FFFFFF; ">0,255,0 - - </td></tr><tr> - <td class="c" style="background: limegreen "> - - </td><td class="c" style="background: rgb(50, 205, 50) "> - - </td><td>limegreen - - </td><td class="c" style="background-color: #FFFFFF; ">#32cd32 - - </td><td class="c" style="background-color: #FFFFFF; ">50,205,50 - - </td></tr><tr> - <td class="c" style="background: linen "> - - </td><td class="c" style="background: rgb(250, 240, 230) "> - - </td><td>linen - - </td><td class="c" style="background-color: #FFFFFF; ">#faf0e6 - - </td><td class="c" style="background-color: #FFFFFF; ">250,240,230 - - </td></tr><tr> - <td class="c" style="background: magenta "> - - </td><td class="c" style="background: rgb(255, 0, 255) "> - - </td><td>magenta - - </td><td class="c" style="background-color: #FFFFFF; ">#ff00ff - - </td><td class="c" style="background-color: #FFFFFF; ">255,0,255 - - </td></tr><tr> - <td class="c" style="background: maroon "> - - </td><td class="c" style="background: rgb(128, 0, 0) "> - - </td><td>maroon - - </td><td class="c" style="background-color: #FFFFFF; ">#800000 - - </td><td class="c" style="background-color: #FFFFFF; ">128,0,0 - - </td></tr><tr> - <td class="c" style="background: mediumaquamarine "> - - </td><td class="c" style="background: rgb(102, 205, 170) "> - - </td><td>mediumaquamarine - - </td><td class="c" style="background-color: #FFFFFF; ">#66cdaa - - </td><td class="c" style="background-color: #FFFFFF; ">102,205,170 - - </td></tr><tr> - <td class="c" style="background: mediumblue "> - - </td><td class="c" style="background: rgb(0, 0, 205) "> - - </td><td>mediumblue - - </td><td class="c" style="background-color: #FFFFFF; ">#0000cd - - </td><td class="c" style="background-color: #FFFFFF; ">0,0,205 - - </td></tr><tr> - <td class="c" style="background: mediumorchid "> - - </td><td class="c" style="background: rgb(186, 85, 211) "> - - </td><td>mediumorchid - - </td><td class="c" style="background-color: #FFFFFF; ">#ba55d3 - - </td><td class="c" style="background-color: #FFFFFF; ">186,85,211 - - </td></tr><tr> - <td class="c" style="background: mediumpurple "> - - </td><td class="c" style="background: rgb(147, 112, 219) "> - - </td><td>mediumpurple - - </td><td class="c" style="background-color: #FFFFFF; ">#9370db - - </td><td class="c" style="background-color: #FFFFFF; ">147,112,219 - - </td></tr><tr> - <td class="c" style="background: mediumseagreen "> - - </td><td class="c" style="background: rgb(60, 179, 113) "> - - </td><td>mediumseagreen - - </td><td class="c" style="background-color: #FFFFFF; ">#3cb371 - - </td><td class="c" style="background-color: #FFFFFF; ">60,179,113 - - </td></tr><tr> - <td class="c" style="background: mediumslateblue "> - - </td><td class="c" style="background: rgb(123, 104, 238) "> - - </td><td>mediumslateblue - - </td><td class="c" style="background-color: #FFFFFF; ">#7b68ee - - </td><td class="c" style="background-color: #FFFFFF; ">123,104,238 - - </td></tr><tr> - <td class="c" style="background: mediumspringgreen "> - - </td><td class="c" style="background: rgb(0, 250, 154) "> - - </td><td>mediumspringgreen - - </td><td class="c" style="background-color: #FFFFFF; ">#00fa9a - - </td><td class="c" style="background-color: #FFFFFF; ">0,250,154 - - </td></tr><tr> - <td class="c" style="background: mediumturquoise "> - - </td><td class="c" style="background: rgb(72, 209, 204) "> - - </td><td>mediumturquoise - - </td><td class="c" style="background-color: #FFFFFF; ">#48d1cc - - </td><td class="c" style="background-color: #FFFFFF; ">72,209,204 - - </td></tr><tr> - <td class="c" style="background: mediumvioletred "> - - </td><td class="c" style="background: rgb(199, 21, 133) "> - - </td><td>mediumvioletred - - </td><td class="c" style="background-color: #FFFFFF; ">#c71585 - - </td><td class="c" style="background-color: #FFFFFF; ">199,21,133 - - </td></tr><tr> - <td class="c" style="background: midnightblue "> - - </td><td class="c" style="background: rgb(25, 25, 112) "> - - </td><td>midnightblue - - </td><td class="c" style="background-color: #FFFFFF; ">#191970 - - </td><td class="c" style="background-color: #FFFFFF; ">25,25,112 - - </td></tr><tr> - <td class="c" style="background: mintcream "> - - </td><td class="c" style="background: rgb(245, 255, 250) "> - - </td><td>mintcream - - </td><td class="c" style="background-color: #FFFFFF; ">#f5fffa - - </td><td class="c" style="background-color: #FFFFFF; ">245,255,250 - - </td></tr><tr> - <td class="c" style="background: mistyrose "> - - </td><td class="c" style="background: rgb(255, 228, 225) "> - - </td><td>mistyrose - - </td><td class="c" style="background-color: #FFFFFF; ">#ffe4e1 - - </td><td class="c" style="background-color: #FFFFFF; ">255,228,225 - - </td></tr><tr> - <td class="c" style="background: moccasin "> - - </td><td class="c" style="background: rgb(255, 228, 181) "> - - </td><td>moccasin - - </td><td class="c" style="background-color: #FFFFFF; ">#ffe4b5 - - </td><td class="c" style="background-color: #FFFFFF; ">255,228,181 - - </td></tr><tr> - <td class="c" style="background: navajowhite "> - - </td><td class="c" style="background: rgb(255, 222, 173) "> - - </td><td>navajowhite - - </td><td class="c" style="background-color: #FFFFFF; ">#ffdead - - </td><td class="c" style="background-color: #FFFFFF; ">255,222,173 - - </td></tr><tr> - <td class="c" style="background: navy "> - - </td><td class="c" style="background: rgb(0, 0, 128) "> - - </td><td>navy - - </td><td class="c" style="background-color: #FFFFFF; ">#000080 - - </td><td class="c" style="background-color: #FFFFFF; ">0,0,128 - - </td></tr><tr> - <td class="c" style="background: oldlace "> - - </td><td class="c" style="background: rgb(253, 245, 230) "> - - </td><td>oldlace - - </td><td class="c" style="background-color: #FFFFFF; ">#fdf5e6 - - </td><td class="c" style="background-color: #FFFFFF; ">253,245,230 - - </td></tr><tr> - <td class="c" style="background: olive "> - - </td><td class="c" style="background: rgb(128, 128, 0) "> - - </td><td>olive - - </td><td class="c" style="background-color: #FFFFFF; ">#808000 - - </td><td class="c" style="background-color: #FFFFFF; ">128,128,0 - - </td></tr><tr> - <td class="c" style="background: olivedrab "> - - </td><td class="c" style="background: rgb(107, 142, 35) "> - - </td><td>olivedrab - - </td><td class="c" style="background-color: #FFFFFF; ">#6b8e23 - - </td><td class="c" style="background-color: #FFFFFF; ">107,142,35 - - </td></tr><tr> - <td class="c" style="background: orange "> - - </td><td class="c" style="background: rgb(255, 165, 0) "> - - </td><td>orange - - </td><td class="c" style="background-color: #FFFFFF; ">#ffa500 - - </td><td class="c" style="background-color: #FFFFFF; ">255,165,0 - - </td></tr><tr> - <td class="c" style="background: orangered "> - - </td><td class="c" style="background: rgb(255, 69, 0) "> - - </td><td>orangered - - </td><td class="c" style="background-color: #FFFFFF; ">#ff4500 - - </td><td class="c" style="background-color: #FFFFFF; ">255,69,0 - - </td></tr><tr> - <td class="c" style="background: orchid "> - - </td><td class="c" style="background: rgb(218, 112, 214) "> - - </td><td>orchid - - </td><td class="c" style="background-color: #FFFFFF; ">#da70d6 - - </td><td class="c" style="background-color: #FFFFFF; ">218,112,214 - - </td></tr><tr> - <td class="c" style="background: palegoldenrod "> - - </td><td class="c" style="background: rgb(238, 232, 170) "> - - </td><td>palegoldenrod - - </td><td class="c" style="background-color: #FFFFFF; ">#eee8aa - - </td><td class="c" style="background-color: #FFFFFF; ">238,232,170 - - </td></tr><tr> - <td class="c" style="background: palegreen "> - - </td><td class="c" style="background: rgb(152, 251, 152) "> - - </td><td>palegreen - - </td><td class="c" style="background-color: #FFFFFF; ">#98fb98 - - </td><td class="c" style="background-color: #FFFFFF; ">152,251,152 - - </td></tr><tr> - <td class="c" style="background: paleturquoise "> - - </td><td class="c" style="background: rgb(175, 238, 238) "> - - </td><td>paleturquoise - - </td><td class="c" style="background-color: #FFFFFF; ">#afeeee - - </td><td class="c" style="background-color: #FFFFFF; ">175,238,238 - - </td></tr><tr> - <td class="c" style="background: palevioletred "> - - </td><td class="c" style="background: rgb(219, 112, 147) "> - - </td><td>palevioletred - - </td><td class="c" style="background-color: #FFFFFF; ">#db7093 - - </td><td class="c" style="background-color: #FFFFFF; ">219,112,147 - - </td></tr><tr> - <td class="c" style="background: papayawhip "> - - </td><td class="c" style="background: rgb(255, 239, 213) "> - - </td><td>papayawhip - - </td><td class="c" style="background-color: #FFFFFF; ">#ffefd5 - - </td><td class="c" style="background-color: #FFFFFF; ">255,239,213 - - </td></tr><tr> - <td class="c" style="background: peachpuff "> - - </td><td class="c" style="background: rgb(255, 218, 185) "> - - </td><td>peachpuff - - </td><td class="c" style="background-color: #FFFFFF; ">#ffdab9 - - </td><td class="c" style="background-color: #FFFFFF; ">255,218,185 - - </td></tr><tr> - <td class="c" style="background: peru "> - - </td><td class="c" style="background: rgb(205, 133, 63) "> - - </td><td>peru - - </td><td class="c" style="background-color: #FFFFFF; ">#cd853f - - </td><td class="c" style="background-color: #FFFFFF; ">205,133,63 - - </td></tr><tr> - <td class="c" style="background: pink "> - - </td><td class="c" style="background: rgb(255, 192, 203) "> - - </td><td>pink - - </td><td class="c" style="background-color: #FFFFFF; ">#ffc0cb - - </td><td class="c" style="background-color: #FFFFFF; ">255,192,203 - - </td></tr><tr> - <td class="c" style="background: plum "> - - </td><td class="c" style="background: rgb(221, 160, 221) "> - - </td><td>plum - - </td><td class="c" style="background-color: #FFFFFF; ">#dda0dd - - </td><td class="c" style="background-color: #FFFFFF; ">221,160,221 - - </td></tr><tr> - <td class="c" style="background: powderblue "> - - </td><td class="c" style="background: rgb(176, 224, 230) "> - - </td><td>powderblue - - </td><td class="c" style="background-color: #FFFFFF; ">#b0e0e6 - - </td><td class="c" style="background-color: #FFFFFF; ">176,224,230 - - </td></tr><tr> - <td class="c" style="background: purple "> - - </td><td class="c" style="background: rgb(128, 0, 128) "> - - </td><td>purple - - </td><td class="c" style="background-color: #FFFFFF; ">#800080 - - </td><td class="c" style="background-color: #FFFFFF; ">128,0,128 - - </td></tr><tr> - <td class="c" style="background: red "> - - </td><td class="c" style="background: rgb(255, 0, 0) "> - - </td><td>red - - </td><td class="c" style="background-color: #FFFFFF; ">#ff0000 - - </td><td class="c" style="background-color: #FFFFFF; ">255,0,0 - - </td></tr><tr> - <td class="c" style="background: rosybrown "> - - </td><td class="c" style="background: rgb(188, 143, 143) "> - - </td><td>rosybrown - - </td><td class="c" style="background-color: #FFFFFF; ">#bc8f8f - - </td><td class="c" style="background-color: #FFFFFF; ">188,143,143 - - </td></tr><tr> - <td class="c" style="background: royalblue "> - - </td><td class="c" style="background: rgb(65, 105, 225) "> - - </td><td>royalblue - - </td><td class="c" style="background-color: #FFFFFF; ">#4169e1 - - </td><td class="c" style="background-color: #FFFFFF; ">65,105,225 - - </td></tr><tr> - <td class="c" style="background: saddlebrown "> - - </td><td class="c" style="background: rgb(139, 69, 19) "> - - </td><td>saddlebrown - - </td><td class="c" style="background-color: #FFFFFF; ">#8b4513 - - </td><td class="c" style="background-color: #FFFFFF; ">139,69,19 - - </td></tr><tr> - <td class="c" style="background: salmon "> - - </td><td class="c" style="background: rgb(250, 128, 114) "> - - </td><td>salmon - - </td><td class="c" style="background-color: #FFFFFF; ">#fa8072 - - </td><td class="c" style="background-color: #FFFFFF; ">250,128,114 - - </td></tr><tr> - <td class="c" style="background: sandybrown "> - - </td><td class="c" style="background: rgb(244, 164, 96) "> - - </td><td>sandybrown - - </td><td class="c" style="background-color: #FFFFFF; ">#f4a460 - - </td><td class="c" style="background-color: #FFFFFF; ">244,164,96 - - </td></tr><tr> - <td class="c" style="background: seagreen "> - - </td><td class="c" style="background: rgb(46, 139, 87) "> - - </td><td>seagreen - - </td><td class="c" style="background-color: #FFFFFF; ">#2e8b57 - - </td><td class="c" style="background-color: #FFFFFF; ">46,139,87 - - </td></tr><tr> - <td class="c" style="background: seashell "> - - </td><td class="c" style="background: rgb(255, 245, 238) "> - - </td><td>seashell - - </td><td class="c" style="background-color: #FFFFFF; ">#fff5ee - - </td><td class="c" style="background-color: #FFFFFF; ">255,245,238 - - </td></tr><tr> - <td class="c" style="background: sienna "> - - </td><td class="c" style="background: rgb(160, 82, 45) "> - - </td><td>sienna - - </td><td class="c" style="background-color: #FFFFFF; ">#a0522d - - </td><td class="c" style="background-color: #FFFFFF; ">160,82,45 - - </td></tr><tr> - <td class="c" style="background: silver; "> - - </td><td class="c" style="background: rgb(192, 192, 192) "> - - </td><td>silver - - </td><td class="c" style="background-color: #FFFFFF; ">#c0c0c0 - - </td><td class="c" style="background-color: #FFFFFF; ">192,192,192 - - </td></tr><tr> - <td class="c" style="background: skyblue "> - - </td><td class="c" style="background: rgb(135, 206, 235) "> - - </td><td>skyblue - - </td><td class="c" style="background-color: #FFFFFF; ">#87ceeb - - </td><td class="c" style="background-color: #FFFFFF; ">135,206,235 - - </td></tr><tr> - <td class="c" style="background: slateblue "> - - </td><td class="c" style="background: rgb(106, 90, 205) "> - - </td><td>slateblue - - </td><td class="c" style="background-color: #FFFFFF; ">#6a5acd - - </td><td class="c" style="background-color: #FFFFFF; ">106,90,205 - - </td></tr><tr> - <td class="c" style="background: slategray "> - - </td><td class="c" style="background: rgb(112, 128, 144) "> - - </td><td>slategray - - </td><td class="c" style="background-color: #FFFFFF; ">#708090 - - </td><td class="c" style="background-color: #FFFFFF; ">112,128,144 - - </td></tr><tr> - <td class="c" style="background: slategrey "> - - </td><td class="c" style="background: rgb(112, 128, 144) "> - - </td><td>slategrey - - </td><td class="c" style="background-color: #FFFFFF; ">#708090 - - </td><td class="c" style="background-color: #FFFFFF; ">112,128,144 - - </td></tr><tr> - <td class="c" style="background: snow "> - - </td><td class="c" style="background: rgb(255, 250, 250) "> - - </td><td>snow - - </td><td class="c" style="background-color: #FFFFFF; ">#fffafa - - </td><td class="c" style="background-color: #FFFFFF; ">255,250,250 - - </td></tr><tr> - <td class="c" style="background: springgreen "> - - </td><td class="c" style="background: rgb(0, 255, 127) "> - - </td><td>springgreen - - </td><td class="c" style="background-color: #FFFFFF; ">#00ff7f - - </td><td class="c" style="background-color: #FFFFFF; ">0,255,127 - - </td></tr><tr> - <td class="c" style="background: steelblue "> - - </td><td class="c" style="background: rgb(70, 130, 180) "> - - </td><td>steelblue - - </td><td class="c" style="background-color: #FFFFFF; ">#4682b4 - - </td><td class="c" style="background-color: #FFFFFF; ">70,130,180 - - </td></tr><tr> - <td class="c" style="background: tan "> - - </td><td class="c" style="background: rgb(210, 180, 140) "> - - </td><td>tan - - </td><td class="c" style="background-color: #FFFFFF; ">#d2b48c - - </td><td class="c" style="background-color: #FFFFFF; ">210,180,140 - - </td></tr><tr> - <td class="c" style="background: teal "> - - </td><td class="c" style="background: rgb(0, 128, 128) "> - - </td><td>teal - - </td><td class="c" style="background-color: #FFFFFF; ">#008080 - - </td><td class="c" style="background-color: #FFFFFF; ">0,128,128 - - </td></tr><tr> - <td class="c" style="background: thistle "> - - </td><td class="c" style="background: rgb(216, 191, 216) "> - - </td><td>thistle - - </td><td class="c" style="background-color: #FFFFFF; ">#d8bfd8 - - </td><td class="c" style="background-color: #FFFFFF; ">216,191,216 - - </td></tr><tr> - <td class="c" style="background: tomato "> - - </td><td class="c" style="background: rgb(255, 99, 71) "> - - </td><td>tomato - - </td><td class="c" style="background-color: #FFFFFF; ">#ff6347 - - </td><td class="c" style="background-color: #FFFFFF; ">255,99,71 - - </td></tr><tr> - <td class="c" style="background: turquoise "> - - </td><td class="c" style="background: rgb(64, 224, 208) "> - - </td><td>turquoise - - </td><td class="c" style="background-color: #FFFFFF; ">#40e0d0 - - </td><td class="c" style="background-color: #FFFFFF; ">64,224,208 - - </td></tr><tr> - <td class="c" style="background: violet "> - - </td><td class="c" style="background: rgb(238, 130, 238) "> - - </td><td>violet - - </td><td class="c" style="background-color: #FFFFFF; ">#ee82ee - - </td><td class="c" style="background-color: #FFFFFF; ">238,130,238 - - </td></tr><tr> - <td class="c" style="background: wheat "> - - </td><td class="c" style="background: rgb(245, 222, 179) "> - - </td><td>wheat - - </td><td class="c" style="background-color: #FFFFFF; ">#f5deb3 - - </td><td class="c" style="background-color: #FFFFFF; ">245,222,179 - - </td></tr><tr> - <td class="c" style="background: white "> - - </td><td class="c" style="background: rgb(255, 255, 255) "> - - </td><td>white - - </td><td class="c" style="background-color: #FFFFFF; ">#ffffff - - </td><td class="c" style="background-color: #FFFFFF; ">255,255,255 - - </td></tr><tr> - <td class="c" style="background: whitesmoke "> - - </td><td class="c" style="background: rgb(245, 245, 245) "> - - </td><td>whitesmoke - - </td><td class="c" style="background-color: #FFFFFF; ">#f5f5f5 - - </td><td class="c" style="background-color: #FFFFFF; ">245,245,245 - - </td></tr><tr> - <td class="c" style="background: yellow "> - - </td><td class="c" style="background: rgb(255, 255, 0) "> - - </td><td>yellow - - </td><td class="c" style="background-color: #FFFFFF; ">#ffff00 - - </td><td class="c" style="background-color: #FFFFFF; ">255,255,0 - - </td></tr><tr> - <td class="c" style="background: yellowgreen "> - - </td><td class="c" style="background: rgb(154, 205, 50) "> - - </td><td>yellowgreen - - </td><td class="c" style="background-color: #FFFFFF; ">#9acd32 - - </td><td class="c" style="background-color: #FFFFFF; ">154,205,50 - </td></tr></tbody></table> - - -'; - - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - - -$mpdf=new mPDF('c','A4','','',15,15,20,20,5,5); - -//============================================================== - -$mpdf->pagenumPrefix = 'Page '; -$mpdf->pagenumSuffix = ''; -$mpdf->nbpgPrefix = ' of '; -$mpdf->nbpgSuffix = ' pages.'; -$header = array( - 'L' => array( - ), - 'C' => array( - ), - 'R' => array( - 'content' => '{PAGENO}{nbpg}', - 'font-family' => 'sans', - 'font-style' => '', - 'font-size' => '9', /* gives default */ - ), - 'line' => 1, -); -$footer = ' -<table width="100%" style="border-top: 0.1mm solid #000000; vertical-align: top; font-family: sans; font-size: 9pt; color: #000055;"><tr> -<td width="50%"></td> -<td width="50%" align="right">See <a href="http://mpdf1.com/manual/index.php">documentation manual</a> for further details</td> -</tr></table> -'; - -$mpdf->SetHeader($header,'O'); -$mpdf->SetHTMLFooter($footer); -//============================================================== - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example51_new_mPDF_4_features.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example51_new_mPDF_4_features.php deleted file mode 100644 index 8882ad241094b094d867f60d1dbb66bdbd7c2c73..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example51_new_mPDF_4_features.php +++ /dev/null @@ -1,615 +0,0 @@ -<?php - -$html = ' -<style> -body { font-family: sans; } -h4, p { margin: 0pt; -} -h5 { margin-bottom: 0; } -table.items { - font-size: 9pt; - border-collapse: collapse; - border: 3px solid #880000; - background-color: #FFFFFF; -} -td { vertical-align: top; -} -table thead td { background-color: #EEEEEE; - text-align: center; -} -table tfoot td { background-color: #AAFFEE; - text-align: center; -} -.barcode { - padding: 1.5mm; - margin: 0; - vertical-align: top; - color: #000000; -} -.barcodecell { - text-align: center; - vertical-align: middle; - padding: 0; -} - -@page { - background-gradient: linear #00FFFF #FFFF00 0 0.5 1 0.5; - odd-header-name: html_myHTMLHeaderOdd; - even-header-name: html_myHTMLHeaderEven; - odd-footer-name: html_myHTMLFooterOdd; - even-footer-name: html_myHTMLFooterEven; -} -#myfixed { - position: fixed; - overflow: auto; - height: 60mm; - margin-left: auto; - right: 30mm; - top: 150mm; - border: 1px solid #880000; - background-color: #EEDDFF; - padding: 3em; - text-align: justify; - text-indent: 3em; - font-size: 10pt; - font-family:sans; - font-style: italic; - line-height: 1.8; - color: red; -} -.myfixed2 { position: absolute; - overflow: visible; - left: 0; - right: 0; - width: 100mm; - top: 40mm; - margin-left: auto; - margin-right: auto; - border: 1px solid #000088; - background-color: #EEDDFF; - background: transparent url(\'bg.jpg\') repeat scroll right top; - padding: 1.5em; - font-family:sans; -} -.myfixed3 { position: absolute; - overflow: visible; - right: 0; - bottom: 0; - border: 1px solid #000088; - background-color: #EEDDFF; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - padding: 1.5em; - font-family:sans; -} -.myfixed4 { position: absolute; - overflow: auto; - left: 150mm; - right: 0; - top: 100mm; - height: 10mm; - border: 1px solid #000088; - background-color: #EEDDFF; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - padding: 0.5em; - font-family:sans; -} -.myfixed5 { position: absolute; - overflow: visible; - left: 150mm; - right: 0; - top: 125mm; - height: 10mm; - border: 1px solid #000088; - background-color: #EEDDFF; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - padding: 0.5em; - font-family:sans; -} -.myfixed6 { position: absolute; - overflow: hidden; - right: 150mm; - left: 0; - top: 110mm; - height: 10mm; - border: 1px solid #000088; - background-color: #EEDDFF; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - padding: 0.5em; - font-family:sans; -} -.myfixed7 { position: absolute; - right: 140mm; - top: 130mm; - width: auto; - border: 1px solid #000088; - background-color: #EEDDFF; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - padding: 0.5em; - font-family:sans; -} -div.indic, div.arabic { - font-size: 14pt; -} -div.indic h5, div.arabic h5 { - margin: 0; -} -div.indic p, div.arabic p, div.arabic li { - margin: 0; - margin-botom: 1em; - line-height: 1.8; -} -div.arabic p, div.arabic h5, div.arabic h4, div.arabic td { - text-align: right; -} -div.arabic td { - text-align: right; - font-size: 14pt; - padding: 1em; -} -h2 { color: #880000; margin-bottom: 0.2em; } -h4 { margin-bottom: 0.2em; } -</style> -<htmlpageheader name="myHTMLHeaderOdd" style="display:none"> -<div style="background-color:#BBEEFF" align="center"><b>Page {PAGENO} of {nb}</b></div> -</htmlpageheader> -<htmlpageheader name="myHTMLHeaderEven" style="display:none"> -<div style="background-color:#EFFBBE" align="center"><b><i>{PAGENO}</i></b></div> -</htmlpageheader> -<htmlpagefooter name="myHTMLFooterOdd" style="display:none"> -<div style="background-color:#CFFFFC" align="center"><b>{PAGENO}</b></div> -</htmlpagefooter> -<htmlpagefooter name="myHTMLFooterEven" style="display:none"> -<div style="background-color:#FFCCFF" align="center"><b><i>{PAGENO}</i></b></div> -</htmlpagefooter> - - -<h1>mPDF Version 4.0 New features</h1> -<ul><li>Ability to embed font subsets (much smaller files)</li> -<li>Support for Fixed position block elements</li> -<li>Support for Indic languages including consonant conjuncts</li> -<li>Much improved support for Arabic languages</li> -<li>New utility to help create your own fonts</li> -<li>Increased support for barcodes</li> -</ul> - -<h2>Indic Fonts/Languages</h2> -<h5>From BBC World Service Hindi News (http://www.bbc.co.uk/hindi/)</h5> -<div class="indic"> -<h4 lang="hi">कुछ और तथ्य पॉप</h4> -<p lang="hi">जैक्सन मामले से जुड़े नए तथ्य सामने आए.</p> -</div> - - -<h5>From BBC World Service Tamil News (http://www.bbc.co.uk/tamil/)</h5> -<div class="indic"> -<h4 lang="ta">செய்தியரங்கம்</h4> -<p lang="ta">இலங்கையில் சிறுபான்மைக் கட்சிகளுக்கிடையில் பொது இணக்கப்பாட்டை எட்டும் முயற்சியில் ...</p> -</div> - -<h5>From Yahoo Indian- Malayalam (http://in.malayalam.yahoo.com/)</h5> -<div class="indic"> -<h4 lang="ml">പഴശ്ശിരാജ മെഗാഹിറ്റ്; ‘സ്വ.ലേ’ മുന്നേറുന്നു</h4> -<p lang="ml">പഴശ്ശിരാജ മലയാള സിനിമയുടെ ചരിത്രത്തിലെ ഏറ്റവും വലിയ വിജയമാകുകയാണ്. 30 ദിവസങ്ങള്‍ പിന്നിട്ടപ്പോള്‍ ചിത്രത്തിന്‍റെ കളക്ഷന്‍ 12 കോടി...</p> -</div> - -<h5>From Yahoo Indian- Punjabi (http://in.punjabi.yahoo.com/)</h5> -<div class="indic"> -<h4 lang="pa">ਚਾਂਸ ਪੇ ਡਾਂਸ ਸ਼ਾਹਿਦ ਦੀ ਕਹਾਣੀ</h4> -<p lang="pa">ਕੇਨ ਘੋਸ਼ ਦੀ ਫ਼ਿਲਮ ਚਾਂਸ ਪੇ ਡਾਂਸ ਫ਼ਿਲਮ ਵਿੱਚ ਸ਼ਾਹਿਦ ਕਪੂਰ ਮੁੱਖ ਭੂਮਿਕਾ ਵਿੱਚ ਹਨ। ਫ਼ਿਲਮ ਦੇ ਬਾਰੇ ਵਿੱਚ ਕਿਹਾ ਜਾ ਸਕਦਾ ਹੈ ਕਿ ਇਹ ਆਪ ਸ਼ਾਹਿਦ ਦੀ ਕਹਾਣੀ ਹੈ। ਫ਼ਿਲਮ ਦਾ ਨਾਇਕ ਮੱਧਮ ਪਰਿਵਾਰ ਦਾ ਦੱਸਿਆ ਗਿਆ ਹੈ ਅਤੇ ਕਈ...</p> -</div> - -<h5>From Yahoo Indian- Gujarati (http://in.gujarati.yahoo.com/)</h5> -<div class="indic"> -<h4 lang="gu">શિલ્પા અને રાજ આજે સાત ફેરા લેશે</h4> -<p lang="gu">બોલીવુડ સુંદરી શિલ્પા શેટ્ટી પોતાના મંગેતર ભારતીય મૂળના બ્રિટિશ ઉદ્યોગપતિ રાજ કુંદ્રા સાથે આજે લગ્ન બંધનમાં બંધાય જશે. વિવાહ સમારંભ રાજના મિત્ર કિરણ બાવાના ખંડાલામાં આવેલ ફાર્મ...</p> -</div> -<pagebreak /> - -<h2>Arabic Fonts/Languages</h2> -<h5>From BBC World Service Arabic News (http://www.bbc.co.uk/arabic/)</h5> -<div class="arabic"> -<h4 lang="ar">بيع قفاز مايكل جاكسون بـ 350 الف دولار</h4> -<p lang="ar">بيع القفاز الجلدي المرصع الذي ارتداه مايكل جاكسون للمرة الاولى عام 1983 خلال اول خطوة من رقصته الشهيرة "السير على القمر (مون ووك)" بسعر 350 الف دولار السبت في نيويورك خلال مزاد لمقتنيات المغني الامريكي الراحل.</p> -</div> - -<h5 style="text-align: right;">In alternative fonts (available with mPDF):</h5> -<div class="arabic"> -<table border="1" style="border-collapse: collapse;" width="100%"> <tr> <td> -<p style="font-family: ar_1_002">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_1_003">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_1_004">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_1_005">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_1_006">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -</td><td> -<p style="font-family: ar_1_007">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_2_001">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_2_002">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_2_003">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -<p style="font-family: ar_2_004">بيع قفاز مايكل جاكسون بـ 350 الف دولار</p> -</td></tr></table> -</div> - - - -<h5>From BBC World Service Persian News (http://www.bbc.co.uk/persian/)</h5> -<div class="arabic"> -<h4 lang="fa">\'طبق نظرسنجی دولت انتخابات به دور دوم کشیده می شد\'</h4> -<p lang="fa">علیرضا زاکانی نماینده تهران در مجلس گفته که یک روز پیش از برگزاری انتخابات ریاست جمهوری در ایران، نظرسنجی وزارت کشور و وزارت اطلاعات ایران نشان می داد که انتخابات به دور دوم کشیده می شود.</p> -</div> - - -<h5>From BBC World Service Urdu News (http://www.bbc.co.uk/urdu/)</h5> -<div class="arabic"> -<h4 lang="ur">جیکسن کا دستانہ 35 لاکھ ڈالر کا</h4> -<p lang="ur">امریکی پاپ سنگر مائیکل جیکسن کا دستانہ جس پر نقلی ہیرے جڑے ہوئے تھے اور جو انھیں پہلی مرتبہ ’مون واک‘ پیش کیئے جانے پر ملا تھا پینتیس لاکھ ڈالر میں نیلام ہو گیا ہے۔</p> -</div> - - -<h5>From BBC World Service Pashto News (http://www.bbc.co.uk/pashto/)</h5> -<div class="arabic"> -<h4 lang="ps">ستاسي پيغامونه اود خوښى سندرې</h4> -<p lang="ps">د موسيقۍ داخپرونې په افغانستان کې داېف اېم په څپود سهار په لسو بجو اوريدلى شى</p> -</div> - - -<pagebreak /> -<h2>Fixed-position block elements</h2> -mPDF 4.0 supports fixed-position block elements (at least partially). This page has some examples of fixed-position elements. -<div id="myfixed"> -<div style="border: 1px solid #000088; background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; background-color: #DDFFEE; padding: 0.5em;">#1. Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula eros vehicula pretium. Maecenas feugiat pede vel risus. <span title="Nulla is marked by a span">Nulla</span> et lectus. Fusce eleifend neque sit amet erat. Integer <a href="mailto:admin@bpm1.com">consectetuer</a> nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. -<p>Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula eros vehicula pretium. Maecenas feugiat pede vel risus. <span title="Nulla is marked by a span">Nulla</span> et lectus. Fusce eleifend neque sit amet erat. Integer <a href="mailto:admin@bpm1.com">consectetuer</a> nulla non orci. Morbi feugiat pulvinar dolor. Cras odio. </p> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt eros turpis, vel aliquam quam eros odio et sapien. -<div style="border: 1px solid #008800; background-color: #EEFFDD; text-align: left; padding: 0.5em;"> -Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt eros turpis, vel aliquam quam eros odio et sapien. -</div> -Mauris ante pede, eros auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </div> -</div> - -<div class="myfixed2">#2. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. <div style="border: 1px dotted green; padding: 1em; background-color: #FFEEFF; color: red">Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div>Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div> - -<div class="myfixed3">#3. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi. Praesent sit amet pede quis metus aliquet vulputate. Donec luctus. Cras euismod tellus vel leo.</div> - -<div class="myfixed4">#4. overflow: auto<br />Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi.</div> - -<div class="myfixed5">#5. overflow: visible<br />Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi.</div> - -<div class="myfixed6">#6. overflow: hidden<br />Praesent pharetra nulla in turpis. Sed ipsum nulla, sodales nec, vulputate in, scelerisque vitae, magna. Sed egestas justo nec ipsum. Nulla facilisi.</div> - -<div class="myfixed7">#7. width: auto<br />Shrink-to-fit</div> - -<pagebreak /> -<h2>Barcodes</h2> -<p>NB <b>Quiet zones</b> - The barcode object includes space to the right/left or top/bottom only when the specification states a \'quiet zone\' or \'light margin\'. All the examples below also have CSS property set on the barcode object i.e. padding: 1.5mm; </p> - -<h3>EAN-13 Barcodes (EAN-2 and EAN-5)</h3> -<p>NB EAN-13, UPC-A, UPC-E, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p> -<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">EAN13</td> -<td>Standard EAN-13 barcode. Accepts 12 or 13 characters (creating checksum digit if required). [0-9] numeric only.</td> -<td class="barcodecell"><barcode code="978-0-9542246-0" class="barcode" /></td> -</tr> -<tr> -<td align="center">ISBN</td> -<td>Standard EAN-13 barcode with \'ISBN\' number shown above [shown at height="0.66"]</td> -<td class="barcodecell"><barcode code="978-0-9542246-0" type="ISBN" class="barcode" height="0.66" text="1" /></td> -</tr> -<tr> -<td align="center">ISSN</td> -<td>Standard EAN-13 barcode with \'ISSN\' number shown above [shown at size="0.8"]</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8" type="ISSN" size="0.8" class="barcode" text="1" /></td> -</tr> -</tbody> -</table> - -<h3>EAN-8, UPC-A and UPC-E Barcodes</h3> -<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code (see below).</p> -<p>A nominal height and width for these barcodes is defined by the specification. \'size\' will scale both the height and width. Values between 0.8 and 2 are allowed (i.e. 80% to 200% of the nominal size). \'height\' can also be varied as a factor of 1; this is applied after the scaling factor used for \'size\'.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">UPCA</td> -<td>UPC-A barcode. This is a subset of the EAN-13. (098277211236) Accepts 11 or 12 characters (creating checksum digit if required). [0-9] numeric only</td> -<td class="barcodecell"><barcode code="09827721123" type="UPCA" class="barcode" /></td> -</tr> -<tr> -<td align="center">UPCE</td> -<td>UPC-E barcode. Requires the UPC-A code to be entered as above (e.g. 042100005264 to give 425261). NB mPDF will die with an error message if the code is not valid, as only some UPC-A codes can be converted into valid UPC-E codes. UPC-E doesn\'t have a check digit encoded explicity, rather the check digit is encoded in the parity of the other six characters. The check digit that is encoded is the check digit from the original UPC-A barcode.</td> -<td class="barcodecell"><barcode code="04210000526" type="UPCE" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN8</td> -<td>EAN-8 (5512345) Accepts 7 or 8 characters (creating checksum digit if required). [0-9] numeric only</td> -<td class="barcodecell"><barcode code="2468123" type="EAN8" class="barcode" /></td> -</tr> -</tbody> -</table> - -<h3>EAN-2 and EAN-5 supplements, and combined forms</h3> -<p>UPC-A, UPC-E, EAN-13, and EAN-8 may all include an additional bar code(EAN-2 and EAN-5) to the right of the main bar code.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">EAN2</td> -<td colspan="2">EAN-2 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Used to denote an issue of a periodical. EAN-2 supplement accepts 2 digits [0-9] only, EAN-5 five.</td> -</tr> -<tr> -<td align="center">EAN5</td> -<td colspan="2">EAN-5 supplement barcode. mPDF does not generate EAN-5 barcode on its own; see supplements below. Usually used in conjunction with EAN-13 for the price of books. 90000 is the code for no price. </td> -</tr> -<tr> -<td align="center">EAN13P2</td> -<td>Standard EAN-13 barcode with 2-digit UPC supplement (07)</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="EAN13P2" class="barcode" /></td> -</tr> -<tr> -<td align="center">ISBNP2</td> -<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 2-digit EAN-2 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISBNP2" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">ISSNP2</td> -<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 2-digit EAN-2 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 07" type="ISSNP2" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">UPCAP2</td> -<td>UPC-A barcode with 2-digit EAN-2 supplement. This is a subset of the EAN-13. (075678164125 07)</td> -<td class="barcodecell"><barcode code="00633895260 24" type="UPCAP2" class="barcode" /></td> -</tr> -<tr> -<td align="center">UPCEP2</td> -<td>UPC-E barcode with 2-digit EAN-2 supplement. (042100005264 07)</td> -<td class="barcodecell"><barcode code="042100005264 07" type="UPCEP2" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN8P2</td> -<td>EAN-8 barcode with 2-digit EAN-2 supplement (55123457 07)</td> -<td class="barcodecell"><barcode code="55123457 07" type="EAN8P2" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN13P5</td> -<td>Standard EAN-13 barcode with 5-digit UPC supplement (90000)</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="EAN13P5" class="barcode" /></td> -</tr> -<tr> -<td align="center">ISBNP5</td> -<td>Standard EAN-13 barcode with \'ISBN\' number shown above, and 5-digit EAN-5 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISBNP5" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">ISSNP5</td> -<td>Standard EAN-13 barcode with \'ISSN\' number shown above, and 5-digit EAN-5 supplement</td> -<td class="barcodecell"><barcode code="978-0-9542246-0-8 90000" type="ISSNP5" class="barcode" text="1" /></td> -</tr> -<tr> -<td align="center">UPCAP5</td> -<td>UPC-A barcode with 5-digit EAN-5 supplement. This is a subset of the EAN-13. (075678164125 90000)</td> -<td class="barcodecell"><barcode code="075678164125 90000" type="UPCAP5" class="barcode" /></td> -</tr> -<tr> -<td align="center">UPCEP5</td> -<td>UPC-E barcode with 5-digit EAN-5 supplement. (042100005264 90000)</td> -<td class="barcodecell"><barcode code="042100005264 90000" type="UPCEP5" class="barcode" /></td> -</tr> -<tr> -<td align="center">EAN8P5</td> -<td>EAN-8 barcode with 5-digit EAN-5 supplement (55123457 90000)</td> -<td class="barcodecell"><barcode code="55123457 90000" type="EAN8P5" class="barcode" /></td> -</tr> -</tbody> -</table> - -<pagebreak /> -<h3>Postcode Barcodes</h3> -<p>These all have sizes fixed by their specification. Although they can be altered using \'size\' it is not recommended. \'height\' is ignored.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<!-- ITEMS HERE --> -<tr> -<td align="center">IMB</td> -<td>Intelligent Mail Barcode - also known as: USPS OneCode 4-State Customer Barcode, OneCode 4CB, USPS 4CB, 4-CB, 4-State Customer Barcode, USPS OneCode Solution Barcode. (01234567094987654321-01234567891) Accepts: Up to 31 digits (required 20-digit Tracking Code, and up to 11-digit Routing Code; this may be 0, 5, 9, or 11 digits). If the Routing code is included, it should be spearated by a hyphen - like this example.</td> -<td class="barcodecell"><barcode code="01234567094987654321-01234567891" type="IMB" class="barcode" /></td> -</tr> -<tr> -<td align="center">RM4SCC</td> -<td>Royal Mail 4-state Customer barcode (SN34RD1A). Accepts: max. 9 characters. Valid characters: [A-Z,0-9] Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="SN34RD1A" type="RM4SCC" class="barcode" /></td> -</tr> -<tr> -<td align="center">KIX</td> -<td>Dutch KIX version of Royal Mail 4-state Customer barcode (SN34RD1A). Valid characters: [A-Z,0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="SN34RD1A" type="KIX" class="barcode" /></td> -</tr> -<tr> -<td align="center">POSTNET</td> -<td>POSTNET barcode. Accepts 5, 9 or 11 digits. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="123456789" type="POSTNET" class="barcode" /></td> -</tr> -<tr> -<td align="center">PLANET</td> -<td>PLANET barcode. Accepts 11 or 13 digits. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="00123456789" type="PLANET" class="barcode" /></td> -</tr> -</tbody> -</table> - - -<h3>Variable width Barcodes</h3> -<p>These barcodes are all of variable length depending on the code entered. There is no recommended maximum size for any of these specs, but all recommend a minimum X-dimension (width of narrowest bar) as 7.5mil (=0.19mm). The default used here is twice the minimum i.e. X-dim = 0.38mm.</p> -<p>The specifications give a minimum height of 15% of the barcode length (which can be variable). The bar height in mPDF is set to a default value of 10mm. </p> -<p>\'size\' will scale the barcode in both dimensions. mPDF will accept any number, but bear in mind that size="0.5" will set the bar width to the minimum. The \'height\' attribute further allows scaling - this factor is applied to already scaled barcode. Thus size="2" height="0.5" will give a barcode twice the default width (X-dim=0.76mm) and at the default height set in mPDF i.e. 10mm.</p> -<table class="items" width="100%" cellpadding="8" border="1"> -<thead> -<tr> -<td width="10%">CODE</td> -<td>DESCRIPTION</td> -<td>BARCODE</td> -</tr> -</thead> -<tbody> -<tr> -<td align="center">C128A</td> -<td>CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="CODE 128 A" type="C128A" class="barcode" /></td> -</tr> -<tr> -<td align="center">C128B</td> -<td>CODE 128 B. Valid characters: [Upper / Lower Case + All ASCII Printable Characters]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="ABC123abc@456" type="C128B" class="barcode" /></td> -</tr> -<tr> -<td align="center">C128C</td> -<td>CODE 128 C. Valid characters: [0-9]. Must be an even number of digits. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="0123456789" type="C128C" class="barcode" /></td> -</tr> - -<tr> -<td align="center">EAN128C [A/B/C]</td> -<td>EAN128 (A, B, and C). Specified variant of Code 128, utilising an FNC1 start code. Also known as UCC/EAN-128 or GS1-128. Valid characters: [cf. Code 128]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="0112345678912343" type="EAN128C" class="barcode" /></td> -</tr> - -<tr> -<td align="center">C39</td> -<td>CODE 39 - ANSI MH10.8M-1983 - USD-3 - 3 of 9. Valid characters: [0-9 A-Z \'-\' . Space $/+%]</td> -<td class="barcodecell"><barcode code="TEC-IT" type="C39" class="barcode" /></td> -</tr> -<tr> -<td align="center">C39+</td> -<td>CODE 39 + CHECKSUM. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="39OR93" type="C39+" class="barcode" /></td> -</tr> -<tr> -<td align="center">C39E</td> -<td>CODE 39 EXTENDED. Valid characters: [ASCII-characters between 0..127]</td> -<td class="barcodecell"><barcode code="CODE 39 E" type="C39E" class="barcode" /></td> -</tr> -<tr> -<td align="center">C39E+</td> -<td>CODE 39 EXTENDED + CHECKSUM. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="CODE 39 E+" type="C39E+" class="barcode" /></td> -</tr> - -<tr> -<td align="center">S25</td> -<td>Standard 2 of 5. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="54321068" type="S25" class="barcode" /></td> -</tr> -<tr> -<td align="center">S25+</td> -<td>Standard 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="54321068" type="S25+" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25</td> -<td>Interleaved 2 of 5. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="54321068" type="I25" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25+</td> -<td>Interleaved 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="54321068" type="I25+" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25B</td> -<td>Interleaved 2 of 5 with bearer bars. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="1234567" type="I25B" class="barcode" /></td> -</tr> -<tr> -<td align="center">I25B+</td> -<td>Interleaved 2 of 5 + CHECKSUM with bearer bars. Valid characters: [0-9]. Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="1234567" type="I25B+" class="barcode" /></td> -</tr> - -<tr> -<td align="center">C93</td> -<td>CODE 93 - USS-93 (extended). Valid characters: [ASCII-characters between 0..127]. Checksum digits: automatic.</td> -<td class="barcodecell"><barcode code="39OR93" type="C93" class="barcode" /></td> -</tr> - -<tr> -<td align="center">MSI</td> -<td>MSI. Modified Plessey. Valid characters: [0-9]</td> -<td class="barcodecell"><barcode code="01234567897" type="MSI" class="barcode" /></td> -</tr> -<tr> -<td align="center">MSI+</td> -<td>MSI + CHECKSUM (module 11). Checksum digit: automatic.</td> -<td class="barcodecell"><barcode code="0123456789" type="MSI+" class="barcode" /></td> -</tr> - -<tr> -<td align="center">CODABAR</td> -<td>CODABAR. Valid characters: [0-9 \'-\' $:/.+ ABCD] ABCD are used as stop and start characters e.g. A34698735B</td> -<td class="barcodecell"><barcode code="A34698735B" type="CODABAR" class="barcode" /></td> -</tr> - -<tr> -<td align="center">CODE11</td> -<td>CODE 11. Valid characters: [0-9 and \'-\']. Checksum digits: 1 (or 2 if length of code is > 10 characters) - automatic.</td> -<td class="barcodecell"><barcode code="123-456-789" type="CODE11" class="barcode" /></td> -</tr> - - -</tbody> -</table> - -'; - - -//============================================================== -//============================================================== -//============================================================== -include("../mpdf.php"); - -$mpdf=new mPDF('s'); - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); - -exit; - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example52_lineheight.htm b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example52_lineheight.htm deleted file mode 100644 index 73eca93a2c54b35dde28465492eac6c7caa87c3a..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example52_lineheight.htm +++ /dev/null @@ -1,36 +0,0 @@ -<html> -<head> -<style> -body { font-family: Arial, Helvetica, sans-serif; } -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; -} -</style> -</head> -<body> -<h4>Line-height & vertical alignment</h4> -<div>In these examples, top and bottom padding are set to 0, so the block height = line height.</div> -<div>The inline text (set to a larger font-size) inherits the line-height as a factor of the largest font-size i.e. the line height will expand to reflect the largest font on the line.<br /> -Line-height: "normal" (set in mPDF by default as 1.33).</div> -<p class="gradient" style="font-size: 10pt; line-height: normal; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size Â</span> and normal again</p> - -<div>Line-height: 2.0 When using relative line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the largest font.</div> -<p class="gradient" style="font-size: 10pt; line-height: 2.0; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size Â</span> and normal again</p> - -<div>Line-heights set as a percentages are computed on the base font-size, and are then inherited and treated the same as absolute lengths. This is also true for "em" values. The line-height of this line is set as 200% of the paragraph font-size (10pt).<br /> -When using absolute line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the base font.<br /> -This means that as far as possible, multiple lines will remain equally spaced<br /> -Line-height: 200% </div> -<p class="gradient" style="font-size: 10pt; line-height: 200%; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size Â</span> and normal again</p> - -<div>If the line includes a font-size greater than 1.6 times the computed line-height, then the text baseline is dropped so that the text will approximately fit within the line-height. -<br />Line-height: 2em</div> -<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 18pt;">18pt font-size Â</span> and normal again</p> - -<div>If the line includes a font-size greater than 2 times the computed line-height, then the line-height is increased to accommodate the larger fontsize.<br /> -Line-height: 2em</div> -<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 24pt;">24pt font-size Â</span> and normal again</p> -</body> -</html> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example52_new_mPDF_4-2_features.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example52_new_mPDF_4-2_features.php deleted file mode 100644 index fb30356f533218633dd732ca6fe153e43212e0ed..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example52_new_mPDF_4-2_features.php +++ /dev/null @@ -1,492 +0,0 @@ -<?php - - -ini_set("memory_limit","256M"); - - -$html = ' -<style> -body { - font-family: sans-serif; -} -@page { - margin-top: 2.0cm; - margin-bottom: 2.0cm; - margin-left: 2.3cm; - margin-right: 1.7cm; - margin-header: 8mm; - margin-footer: 8mm; - footer: html_myHTMLFooter; - background-color:#ffffff; -} - -@page :first { - margin-top: 6.5cm; - margin-bottom: 2cm; - header: html_myHTMLHeader; - footer: _blank; - resetpagenum: 1; - background-gradient: linear #FFFFFF #FFFF44 0 0.5 1 0.5; - background: #ccffff url(bgbarcode.png) repeat-y fixed left top; -} -@page letterhead { - margin-top: 2.0cm; - margin-bottom: 2.0cm; - margin-left: 2.3cm; - margin-right: 1.7cm; - margin-header: 8mm; - margin-footer: 8mm; - footer: html_myHTMLFooter; - background-color:#ffffff; -} - -@page letterhead :first { - margin-top: 6.5cm; - margin-bottom: 2cm; - header: html_myHTMLHeader; - footer: _blank; - resetpagenum: 1; -} -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; -} -.rounded { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - border-radius: 2mm; - background-clip: border-box; -} -h4 { - font-weight: bold; - margin-top: 1em; - margin-bottom: 0.3em; -} -div.text { - padding:1em; - margin-bottom: 0.25em; - text-align:justify; -} -div.artificial { - font-family: arialuni; /* custom font using MS Arial Unicode */ -} -p { margin-top: 0; } -.code { - font-family: mono; - font-size: 9pt; - background-color: #d5d5d5; - margin: 1em 1cm; - padding: 0 0.3cm; -} - - -</style> - -<body> - -<!--mpdf - -<htmlpageheader name="myHTMLHeader"> -<div style="float:right; width: 90; height: 90; text-align: right; vertical-align: bottom; border: 1mm double #000088"><img src="tiger.png" width="90" /></div> - -<div style="color:#0000BB;"><span style="font-weight: bold; font-size: 14pt;">mPDF Version 4.2</span><br />123 Anystreet<br />Your City<br />GD12 4LP<br /><span style="font-size: 15pt;">☎</span> 01777 123 567 -</div> - -<div style="clear: both; margin-top: 1cm; text-align: right;">{DATE jS F Y}</div> - -</htmlpageheader> - -<htmlpagefooter name="myHTMLFooter"> -<table width="100%" style="border-top: 0.1mm solid #000000; vertical-align: top; font-size: 9pt; color: #000055;"><tr> -<td width="25%"></td> -<td width="50%" align="center">See <a href="http://mpdf1.com/manual/index.php">documentation manual</a> for further details</td> -<td width="25%" align="right">Page {PAGENO} of {nbpg} pages</td> -</tr></table> -</htmlpagefooter> - -mpdf--> - -<h2>mPDF Version 4.2</h2> -<h2>New Features</h2> - -<div class="gradient text"> -<ul> -<li>image handling improved</li> -<li>table layout - additional control over resizing</li> -<li>vertical-alignment of images - better support for all CSS types</li> -<li>top and bottom margins collapse between block elements</li> -<li>improved support for CSS line-height</li> -<li>display progress bar whilst generating file</li> -<li>CSS @page selector can be specified when adding a pagebreak</li> -<li>CSS @page selector allows different margins, backgrounds, headers/footers on :first :left and :right pages</li> -<li>PNG images with alpha channel fully supported</li> -<li>ability to generate italic and bold font variants from base font file</li> -<li>CJK fonts to embed as subsets</li> -<li>"double" border on block elements</li> -<li>character substitution for missing characters in UTF-8 fonts</li> -<li>direct passing of dynamically produced image data</li> -<li>background-gradient and background-image can now co-exist </li> -</ul> - -Note: automatic top- and bottom-margin to accomodate varying header/footer size was introduced in v4.0 but was not highlighted cf. AutoHeaderMargin in the Manual. - -</div> -<br /> - -<div class="gradient text"> -<h4>Page backgrounds</h4> -Background images, gradients and/or colours can be used together on the same page. On this page, the bars on the left hand side are created using a background-image, whilst a background-gradient sets the background to the whole page. -</div> -<br /> - -<div class="gradient text" style="background-color: #d9def0; border-style: double; border-color:#444444; border-width:1mm;"> -<h4>CSS "double" border</h4> -Block elements can now use the CSS property: border(style) = double. See also the tiger logo in the header of this page. -</div> -<br /> - -<div class="gradient text"> -<h4>CJK fonts to embed as subsets</h4> -When writing documents with Chinese, Japanese or Korean characters, mPDF has previously required the end-user to download Adobe\'s free CJK font pack. -The ability to embed font subsets now makes it feasible to use open license CJK fonts. 2 fonts are now available to download as an additional font-pack: -<ul> -<li>zn_hannom_a - contains all characters in the SJIS, BIG-5, and GBK codepages; original file was Han Nom A font (Hi-res version) from http://vietunicode.sourceforge.net/fonts/fonts_hannom.html</li> -<li>unbatang_0613 - contains all the (Korean) characters in the UHC codepage; original file from from http://kldp.net/projects/unfonts/download</li> -</ul> -The following characters only added an extra 15kB to the size of this PDF file, and approximately 0.15 seconds extra to compile:<br /> -Chinese (traditional) <span style="font-family:zn_hannom_a">'."\xe6\x86\x82\xe9\xac\xb1".'</span> ; chinese (simplified) <span style="font-family:zn_hannom_a">'."\xe6\x9d\xa5\xe8\x87\xaa".'</span> ; japanese <span style="font-family:zn_hannom_a">'."\xe3\x81\x9f\xe3\x82\x90".'</span> ; korean <span style="font-family:unBatang_0613">'."\xed\x82\xa4\xec\x8a\xa4".'</span> -</div> -<br /> - -<div class="artificial gradient text"> -<h4>Artificial Bold and Italic</h4> -The text in this block is in ArialUnicodeMS font. Using embedded subsets it covers most characters you want to print - BUT it does not have bold, italic, or bold-italic forms.<br /> -From version 4.2, mPDF will create "artificial" font styles if they are not available as separate font files:<br /> -<p style="font-weight: bold">The quick brown fox jumps over a lazy dog</p> -<p style="font-style: italic">The quick brown fox jumps over a lazy dog</p> -<p style="font-weight: bold; font-style: italic">The quick brown fox jumps over a lazy dog</p> -</div> -<br /> - -<div class="gradient text" style="font-family: \'Trebuchet MS\'"> -<h4>Character substitution in UTF-8 files</h4> -This paragraph has the font-family set to Trebuchet MS, and the document has the default font set as DejaVuSansCondensed. -The following characters are not present in the Trebuchet font, and are substituted from the core Adobe Zapfdingbats font:<br /> - -✐ ✑ ✒ ✓ ✔ ✕ ✖ ✗ ✘ ✙ ✚ ✛ ✜ ✝ ✞ ✟<br /> -The characters are not present in the Trebuchet font, and are substituted from the (default) DejaVuSansCondensed font:<br /> -ʀ ʁ ʂ ʃ ʄ ʅ ʆ ʇ ʈ ʉ ʊ ʋ ʌ ʍ ʎ ʏ<br /> -Character substitution in UTF-8 files is enabled by setting: -<p class="code"> -$mpdf->useSubstitutionsMB = true; -</p> -<div style="color:red; padding:0; margin:0;">NB In mPDF 5.0 this has changed to -<p class="code" style="padding:0; margin:0;"> -$mpdf->useSubstitutions = true; -</p> -</div> -It is not recommended to enable this for regular use, as it will add to the processing time. -</div> - - - -<pagebreak /> - -<h2>Margin-collapse</h2> -<p>mPDF has always allowed margins to be collapsed at the top and bottom of pages. This is specified by the custom CSS property "margin-collapse: collapse"</p> - -<p>mPDF 4.2 also allows margins to collapse between block elements on the page. This is the default behaviour in browsers, and has been enabled in mPDF 4.2 by default.</p> - -<p>In the next 2 paragraphs, the first one has the margin-bottom set to 3em, and the second has the margin-top set to 0em. So the vertical-space between paragraphs is 3em:</p> - -<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-bottom: 3em;">The quick brown fox jumps over a lazy dog</p> -<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-top: 0em;">The quick brown fox jumps over a lazy dog</p> - -<p>In the next 2 paragraphs, the first one has the margin-bottom set to 2em, and the second has the margin-top set to 1em. The margins collapse to the larger of the adjoining margins i.e. 2em:</p> - -<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-bottom: 2em;">The quick brown fox jumps over a lazy dog</p> -<p class="gradient" style="font-size: 10pt; padding: 0 0.3em; margin-top: 1em;">The quick brown fox jumps over a lazy dog</p> - - -<pagebreak /> - -<h2>Images</h2> - -<h4>PNG Alpha channel</h4> -PNG alpha channel transparency is now fully supported, and works against solid backgrounds, gradients or background images: -<table> -<tr> -<td><img style="vertical-align: top" src="alpha.png" width="90" /></td> -<td style="background-color:#FFCCFF; "><img style="vertical-align: top" src="alpha.png" width="90" /></td> -<td style="background-color:#CCFFFF;"><img style="vertical-align: top" src="alpha.png" width="90" /></td> -<td style="background-color:#CCFFFF; background-gradient: linear #88FFFF #FFFF44 0 0.5 1 0.5; "><img style="vertical-align: top" src="alpha.png" width="90" /></td> -<td style="background-color:#CCFFFF; background: transparent url(\'bgrock.jpg\') repeat scroll right top;"><img style="vertical-align: top" src="alpha.png" width="90" /></td> -</tr> -</table> - -<br /> - -<h4>Image Border and padding</h4> -Image padding is now supported as well as border and margin: -<img src="sunset.jpg" width="100" style="border:3px solid #44FF44; padding: 1em; vertical-align: text-top; " /> -<br /> - -<h4>Vertical alignment</h4> -<div>From mPDF version 4.2 onwards, most of the values for "vertical-align" are supported: top, bottom, middle, baseline, text-top, and text-bottom.<br /> -<b>Note:</b> The default value for vertical alignment has been changed to baseline, and the default padding to 0, consistent with most browsers. -</div> -<br /> -<div class="gradient" style="font-size: 80%;"> -baseline: <img src="sunset.jpg" width="50" style="vertical-align: baseline;" /> -text-bottom: <img src="sunset.jpg" width="30" style="vertical-align: text-bottom;" /> -middle: <img src="sunset.jpg" width="30" style="vertical-align: middle;" /> -bottom: <img src="sunset.jpg" width="80" style="vertical-align: bottom;" /> -text-top: <img src="sunset.jpg" width="50" style="vertical-align: text-top;" /> -top: <img src="sunset.jpg" width="100" style="vertical-align: top;" /> -</div> - - -<pagebreak /> -<h4>Image Alignment</h4> -<div>From mPDF version 4.2 onwards, in-line images can be individually aligned (vertically). -</div> - -<div class="gradient" style="margin: 0.5em 0;"> -These images <img src="img1.png" style="vertical-align: top;" /> -are <img src="img2.png" style="vertical-align: top;" /> -<b>top</b> <img src="img3.png" style="vertical-align: top;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> - -<div class="gradient" style="margin: 0.5em 0;"> -These images <img src="img1.png" style="vertical-align: text-top;" /> -are <img src="img2.png" style="vertical-align: text-top;" /> -<b>text-top</b> <img src="img3.png" style="vertical-align: text-top;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> - -<div class="gradient" style="margin: 0.5em 0;"> -These images <img src="img1.png" style="vertical-align: bottom;" /> -are <img src="img2.png" style="vertical-align: bottom;" /> -<b>bottom</b> <img src="img3.png" style="vertical-align: bottom;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> - -<div class="gradient" style="margin: 0.5em 0;"> -These images <img src="img1.png" style="vertical-align: text-bottom;" /> -are <img src="img2.png" style="vertical-align: text-bottom;" /> -<b>text-bottom</b> <img src="img3.png" style="vertical-align: text-bottom;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> - -<div class="gradient" style="margin: 0.5em 0;"> -These images <img src="img1.png" style="vertical-align: baseline;" /> -are <img src="img2.png" style="vertical-align: baseline;" /> -<b>baseline</b> <img src="img3.png" style="vertical-align: baseline;" /> -aligned <img src="img4.png" style="vertical-align: middle;" /> -</div> - -<div class="gradient" style="margin: 0.5em 0;"> -These images <img src="img1.png" style="vertical-align: middle;" /> -are <img src="img2.png" style="vertical-align: middle;" /> -<b>middle</b> <img src="img3.png" style="vertical-align: middle;" /> -aligned <img src="img5.png" style="vertical-align: bottom;" /> -</div> - - -<pagebreak /> -<h4>Images from PHP</h4> - -<br /> -<img src="var:smileyface" /> -<br /> -This image was created with the following code: - -<p class="code"> - $img = imagecreatetruecolor(200, 200);<br /> - $white = imagecolorallocate($img, 255, 255, 255);<br /> - $red = imagecolorallocate($img, 255, 0, 0);<br /> - $green = imagecolorallocate($img, 0, 255, 0);<br /> - $blue = imagecolorallocate($img, 0, 0, 255);<br /> - imagearc($img, 100, 100, 200, 200, 0, 360, $white);<br /> - imagearc($img, 100, 100, 150, 150, 25, 155, $red);<br /> - imagearc($img, 60, 75, 50, 50, 0, 360, $green);<br /> - imagearc($img, 140, 75, 50, 50, 0, 360, $blue);<br /> - ob_start();<br /> - imagejpeg($img);<br /> - $mpdf->smileyface = ob_get_clean(); <br /> - imagedestroy($img);<br /> -</p> -and written to the document using: -<p class="code"> -<img src="var:smileyface" /> -</p> - - -<pagebreak> -<h4>Line-height inheritance</h4> -Line-height inheritance has been altered to follow the CSS2 recommendation: -<ul> -<li>normal is inherited as "normal"</li> -<li>1.2 is inherited as a factor</li> -<li>120% is converted to an actual value and then inherited as the computed value</li> -<li>em is converted to an actual value and then inherited as the computed value</li> -<li>px pt mm are inherited as fixed values</li> -</ul> - -<div>Relative values (e.g. 1.3, normal)</div> -<div style="font-size: 12pt; line-height: 2.0; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;"> -This DIV has the line-height set as "2.0" and font-size as 12pt. The line-height is therefore 24pt, but the factor of 2 is inherited...<br /> -Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse... -<div style="font-size: 8pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;"> -This DIV has the font-size set as 8pt. The line-height of 2 is inherited...<br /> -Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. -<div style="font-size: 18pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;"> -This DIV has the font-size set as 18pt. The line-height of 2 is inherited...<br /> -Nulla felis erat, imperdiet eu, ullamcorper non... -</div> -</div> -</div> -<br /> -<div>Absolute values (e.g. 130%, 1.3em, 18pt)</div> -<div style="font-size: 12pt; line-height: 200%; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;"> -This DIV has the line-height set as "200%" and font-size as 12pt. The computed line-height of 24pt is inherited...<br /> -Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse... -<div style="font-size: 8pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;"> -This DIV has the font-size set as 8pt. The computed line-height of 24pt is inherited...<br /> -Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci. -<div style="font-size: 18pt; border: 0.2mm solid #880000; background-color: #FFEECC; padding: 0.3em;"> -This DIV has the font-size set as 18pt. The computed line-height of 24pt is inherited...<br /> -Nulla felis erat, imperdiet eu, ullamcorper non... -</div> -</div> -</div> - - -<pagebreak /> -<h4>Line-height & vertical alignment</h4> -<div>In these examples, top and bottom padding are set to 0, so the block height = line height.</div> -<div>The inline text (set to a larger font-size) inherits the line-height as a factor of the largest font-size i.e. the line height will expand to reflect the largest font on the line.<br /> -Line-height: "normal" (set in mPDF by default as 1.33).</div> -<p class="gradient" style="font-size: 10pt; line-height: normal; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size Â</span> and normal again</p> - -<div>Line-height: 2.0 When using relative line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the largest font.</div> -<p class="gradient" style="font-size: 10pt; line-height: 2.0; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size Â</span> and normal again</p> - -<div>Line-heights set as a percentages are computed on the base font-size, and are then inherited and treated the same as absolute lengths. This is also true for "em" values. The line-height of this line is set as 200% of the paragraph font-size (10pt).<br /> -When using absolute line-heights, the text is aligned vertically so that the centre-line of the line goes throught the middle of the base font.<br /> -This means that as far as possible, multiple lines will remain equally spaced<br /> -Line-height: 200% </div> -<p class="gradient" style="font-size: 10pt; line-height: 200%; padding: 0 0.3em;">Normal text <span style="font-size: 16pt;">16pt font-size Â</span> and normal again</p> - -<div>If the line includes a font-size greater than 1.6 times the computed line-height, then the text baseline is dropped so that the text will approximately fit within the line-height. -<br />Line-height: 2em</div> -<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 18pt;">18pt font-size Â</span> and normal again</p> - -<div>If the line includes a font-size greater than 2 times the computed line-height, then the line-height is increased to accommodate the larger fontsize.<br /> -Line-height: 2em</div> -<p class="gradient" style="font-size: 10pt; line-height: 2em; padding: 0 0.3em;">Normal text <span style="font-size: 24pt;">24pt font-size Â</span> and normal again</p> - -<br /> -This broadly reflects the behaviour of IE and Firefox. Note that tall characters such as  may fall outside the computed line-heights. See the same in an <a href="example52_lineheight.htm">HTML page</a>. - - -<pagebreak page-selector="letterhead" /> -<h2>Extended use of CSS @page selectors</h2> -The CSS @page selector, together with the pseudo-selectors :first :left :right have increased support in mPDF 4.2<br /> -A named @page can be selected when forcing a new page, e.g. this page was started with:<br /> -<span style="font-family: mono; font-size: 9pt;"><pagebreak page-selector="letterhead" /></span> -<br /> -The header and background on this page (and page 1 of the document) are set by the CSS selector: @page letterhead :first {} whilst subsequent pages have no header, a footer, and no background. -<br /> -CSS @page selectors allow different margins, backgrounds, headers/footers to be set on :first :left and :right pages. Only fixed or mirrored left- and right-margins are supported (i.e. cannot specify different margins for :left and :right). -<br /> -This layout can be used to produce company letters with only the first page on letterheaded paper. - -<pagebreak /> -<h2>Table Layout control</h2> -<p>mPDF attempts to layout tables according to HTML and CSS specifications. However, because of the difference between screen and paged media, mPDF resizes tables when necessary to make them fit the page. This will happen if the minimum table-width is greater than the page-width. Minimum table-width is defined as the minimum width to accomodate the longest word in each column i.e. words will never be split. -</p> -<p>This resizing (minimum-width) can be disabled using a custom CSS property "overflow" on the TABLE tag. There are 4 options:</p> -<table style="overflow: auto"> (this is the default, using resizing) -<table border="1" style="overflow: auto; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -</tr></table> -<br /> -<table style="overflow: visible"> (disables resizing, but allows overflow to show) -<table border="1" style="overflow: visible; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -</tr></table> -<br /> - -<table style="overflow: hidden"> (disables resizing, and hides/clips any overflow) -<table border="1" style="overflow: hidden; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -</tr></table> -<br /> - -<table style="overflow: wrap"> (forces words to break as necessary) -<table border="1" style="overflow: wrap; border-collapse: collapse; padding: 0.1em; background-color: #DDFFFF"><tr> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -<td>Verylongwordwithnospacesinitatall</td> -</tr></table> -<br /> - - - -'; -if ($_REQUEST['html']) { echo $html; exit; } - - -//============================================================== -//============================================================== -//============================================================== -define('_MPDF_URI','../'); // required for the progress bar - -include("../mpdf.php"); - -$mpdf=new mPDF('','A4','','',15,15,20,20,5,5); - -$mpdf->StartProgressBarOutput(2); // 2 => advanced mode - -$mpdf->SetDisplayMode('fullpage'); - -$mpdf->useSubstitutions = true; - -// Dynamically create image in var:smileyface - $img = imagecreatetruecolor(200, 200); - $white = imagecolorallocate($img, 255, 255, 255); - $red = imagecolorallocate($img, 255, 0, 0); - $green = imagecolorallocate($img, 0, 255, 0); - $blue = imagecolorallocate($img, 0, 0, 255); - imagearc($img, 100, 100, 200, 200, 0, 360, $white); - imagearc($img, 100, 100, 150, 150, 25, 155, $red); - imagearc($img, 60, 75, 50, 50, 0, 360, $green); - imagearc($img, 140, 75, 50, 50, 0, 360, $blue); - ob_start(); - imagejpeg($img); - $mpdf->smileyface = ob_get_clean(); - imagedestroy($img); - - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example53_new_mPDF_v5-0_fonts.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example53_new_mPDF_v5-0_fonts.php deleted file mode 100644 index c09430cfdbc6abbb930ae67b28462bf59a791b33..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example53_new_mPDF_v5-0_fonts.php +++ /dev/null @@ -1,433 +0,0 @@ -<?php -ini_set("memory_limit","128M"); - - -$html = ' -<style> -body { - font-family: sans-serif; - font-size: 10pt; -} -h4 { - font-variant: small-caps; -} -h5 { - margin-bottom: 0; - color: #110044; -} -dl { - margin: 0; -} -</style> -<h1></a>mPDF</h1> -<h2>Fonts in mPDF Version 5.x</h2> - -<p>mPDF version 5 supports Truetype fonts, reading and embedding directly from the .ttf font files. Fonts must follow the Truetype specification and use Unicode mapping to the characters. Truetype collections (.ttc files) and Opentype files (.otf) in Truetype format are also supported.</p> - -<h4>Easy to add new fonts</h4> -<ol> -<li>Upload the Truetype font file to the fonts directory (/ttfonts)</li> -<li>Define the font file details in the configuration file (config_fonts.php)</li> -<li>Access the font by specifying it in your HTML code as the CSS font-family</li> -</ol> - -<div>These are some examples of Windows fonts:</div> -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;"> -<div style="font-family: Arial">Arial - The quick, sly fox jumped over the lazy brown dog.</div> -<div style="font-family: \'Comic Sans MS\'">Comic Sans MS - The quick, sly fox jumped over the lazy brown dog.</div> -<div style="font-family: \'Trebuchet MS\'">Trebuchet - The quick, sly fox jumped over the lazy brown dog.</div> -<div style="font-family: Calibri">Calibri - The quick, sly fox jumped over the lazy brown dog.</div> -<div style="font-family: Quillscript">QuillScript - The quick, sly fox jumped over the lazy brown dog.</div> -<div style="font-family: \'Lucida Console\'">Lucidaconsole - The quick, sly fox jumped over the lazy brown dog.</div> -<div style="font-family: Tahoma">Tahoma - The quick, sly fox jumped over the lazy brown dog.</div> -<div style="font-family: \'Alba Super\'">AlbaSuper - The quick, sly fox jumped over the lazy brown dog.</div> -</div> - -<h4>Full Unicode support</h4> - -<p>The DejaVu fonts distributed with mPDF contain an extensive set of characters, but it is easy to add fonts to access uncommon characters.</p> - -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;"> -<dl> -<dt>Georgian (DejaVuSansCondensed)</dt> -<dd style="font-family:\'Dejavu Sans Condensed\';">Ⴀ Ⴁ Ⴂ Ⴃ Ⴄ Ⴅ Ⴆ Ⴇ Ⴈ Ⴉ Ⴊ Ⴋ Ⴌ Ⴍ Ⴎ Ⴏ Ⴐ Ⴑ Ⴒ Ⴓ</dd> -<dt>Cherokee (Quivira)</dt> -<dd style="font-family:quivira;">Ꭰ Ꭱ Ꭲ Ꭳ Ꭴ Ꭵ Ꭶ Ꭷ Ꭸ Ꭹ Ꭺ Ꭻ Ꭼ Ꭽ Ꭾ Ꭿ Ꮀ Ꮁ Ꮂ</dd> -<dt>Runic (Junicode)</dt> -<dd style="font-family:junicode;">ᚠ ᚡ ᚢ ᚣ ᚤ ᚥ ᚦ ᚧ ᚨ ᚩ ᚪ ᚫ ᚬ ᚭ ᚮ ᚯ ᚰ ᚱ ᚲ ᚳ ᚴ ᚵ ᚶ ᚷ ᚸ ᚹ ᚺ ᚻ ᚼ</dd> -<dt>Greek Extended (Quivira)</dt> -<dd style="font-family:quivira;">ἀ ἁ ἂ ἃ ἄ ἅ ἆ ἇ Ἀ Ἁ Ἂ Ἃ Ἄ Ἅ Ἆ Ἇ ἐ ἑ ἒ ἓ ἔ ἕ </dd> -<dt>IPA Extensions (Quivira)</dt> -<dd style="font-family:quivira;">ɐ ɑ ɒ ɓ ɔ ɕ ɖ ɗ ɘ ə ɚ ɛ ɜ ʣ ʤ ʥ ʦ ʧ ʨ ʩ ʪ ʫ </dd> -<dt>Letterlike Symbols (Symbola)</dt> -<dd style="font-family:symbola;">℀ ℁ ℂ ℃ ℄ ℅ ℆ ℇ ℈ ℉ ℊ ℋ ℌ ℍ ℎ ℏ ℐ ℑ ℒ ℓ ℔ ℕ № ℗ ℘ ℙ ℚ ℛ ℜ </dd> -<dt>Mathematical Operators (Symbola)</dt> -<dd style="font-family:symbola;">∀ ∁ ∂ ∃ ∄ ∅ ∆ ∇ ∈ ∉ ∊ ∋ ∌ ∍ ∎ ∏ ∐ ∑ − ∓ ∔ ∕ ∖ ∗ ∘ ∙ √ ∛ ∜ ∝ ∞ </dd> -<dt>Miscellaneous Technical (Symbola)</dt> -<dd style="font-family:symbola;">⌀ ⌁ ⌂ ⌃ ⌄ ⌅ ⌆ ⌇⌎ ⌏ ⌐ ⌑ ⌒ ⌓ ⌔ ⌕ ⌖ ⌗ ⌘ ⌙ ⌚ ⌛ ⌠ ⌡ ⌢ ⌣ ⌤ ⌥ ⌦ ⌧ </dd> -<dt>Enclosed Alphanumerics (Quivira)</dt> -<dd style="font-family:quivira;">① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⑯</dd> -<dt>Miscellaneous Symbols (DejaVuSansCondensed)</dt> -<dd style="font-family:\'Dejavu Sans Condensed\';">☀ ☁ ☂ ☃ ☄ ★ ☆ ☇ ☈ ☉ ☊ ☋ ☌ ☍ ☎ ☏ ☐ ☑ ☒ </dd> -<dt>Supplemental Arrows-B (Symbola)</dt> -<dd style="font-family:symbola;">⤀ ⤁ ⤂ ⤃ ⤄ ⤅ ⤆ ⤇ ⤈ ⤉ ⤊ ⤋ ⤐ ⤑ ⤔ ⤕ ⤖ ⤗ ⤘ ⥶ ⥷ ⥸ ⥹ ⥺ ⥻ ⥼ ⥽ </dd> -</dl> -</div> -The online manual lists a number of open-source fonts available to cover uncommon characters: <a href="http://mpdf1.com/manual/index.php?tid=451">http://mpdf1.com/manual/index.php?tid=451</a> - -<pagebreak /> -<h2>Complex scripts</h2> - -<p>Although all characters may be displayed, there are various reasons why a script may not appear as expected.</p> - -<h4>Right-to-left languages (Hebrew, Arabic etc.)</h4> -Arabic languages and Hebrew are written in a right-to-left direction (RTL). mPDF recognises both Arabic and Hebrew languages and reverses text direction automatically. - -<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; font-family:tahoma; text-align: center;"> -ألسّلام عليكم שלום -</div> - -Arabic languages (but not Hebrew) also change the form of the letter depending on its position in the text e.g. these are the initial, medial, final, and isolated forms of arabic letter \'ain\': - -<div style="font-family:xbriyaz; border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; text-align: center;"> ع ـع ـعـ عـ </div> -The isolated characters are contained in the Unicode block \'Arabic\' U+0600 - U+06FF.<br /> -The initial, medial and final forms are contained in Unicode Blocks \'Arabic Presentation Forms\' A and B (U+FB50 - U+FDFF, U+FE70 - U+FEFE). Note that quite a large number of fonts contain the isolated characters but not the presentation forms. Fonts used with mPDF must contain the \'Arabic Presentation Forms\' in order to display arabic text correctly. mPDF automatically converts letters to their initial/medial/final forms in several languages: arabic, persian/farsi, urdu, sindhi and pashto. - -<p>Arabic text is used for many different languages e.g. persian/farsi, urdu, pashto etc. These languages often contain letters unique to that language. \'Arabic\' fonts do not always contain the full set of arabic charcters necessary for all languages. </p> - -<p>Other RTL languages (using other alphabets) are reversed in order, but not otherwise processed, by mPDF e.g. Syriac, Thaana, N\'Ko, and Samaritan.</p> - - -<h4>Indic languages</h4> -Indic languages are also complex scripts which require some processing of characters before display. For example some vowels consist of 2 characters, to be placed before and after the adjacent consonant e.g. -<div style="font-family:ind_ml_1_001; border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; text-align: center;"> - <div style="font-size:normal">U+0D1C + U+0D4C [vowel AU] = [written together as &#x0D1C;&#x0D4C;]</div> - ജ + ൌ = ജൌ</div> -<p style="margin-bottom: 0">Consonant conjuncts are where two adjacent characters are written as a single \'conjunct\' form e.g.</p> -<div style="font-family:ind_hi_1_001; border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt; text-align: center;"> प + ॡ = पॣ</div> -<p style="margin-bottom: 0">mPDF can support some of these languages, but requires specially prepared font files that are unique to mPDF.<br /> -Supported languages: Bengali, Devanāgarī, Gujarāti, Gurmukhi, Kannada, Malayalam, Oriya, Tamil, Telugu</p> - -<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 18pt;"> - <span style="font-family:ind_bn_1_001;">আসসালামু আলাইকুম </span> - <span style="font-family:ind_gu_1_001;">નમસ્તે </span> - <span style="font-family:ind_ml_1_001;">നമസ്കാരം </span> - <span style="font-family:ind_hi_1_001;">नमस्ते </span> - <span style="font-family:ind_ta_1_001;">வணக்கம்! </span> -</div> -Complex scripts <b>not</b> supported: Khmer, Sinhala, Tibetan, Myanmar (Burmese), Balinese - -<h4>Vertical writing</h4> -<div>Vertical writing is not supported by mPDF (e.g. Mongolian and Phags-pa) although the individual characters can be displayed using suitable fonts.</div> - -<pagebreak /> - -<h4>Combining diacritics</h4> -<p>In Unicode, letters with diacritics (e.g. ÁáȦȧÄä) are usually represented as a single character e.g. Unicode U+0196 is an A Umlaut. There are 4 blocks in Unicode of diacritics or \'marks\' which can be used to combine with adjacent letters: Combining Diacritical Marks (U+0300 - U+036F), Combining Diacritical Marks Supplement (U+1DC0 - U+1DFF), Combining Marks for Symbols(U+20D0 - U+20FF) and Combining Half Marks (U+FE20 - U+FE2F). </p> - - -<p>Software applications use special positioning information stored in OpenType font files to resposition the diacritic/mark depending on the context. mPDF does not support this repositioning and is dependent on the font design and original placement of the diacritic: -</p> - - -<div style="border:0.2mm solid #000088; padding: 0.5em; background-color: #EEEEEE; font-size: 14pt;"> -<div style="font-family:\'Dejavu Sans Condensed\';">Á á Ȧ ȧ Ä ä ï (Precomposed characters: DejaVu Sans Condensed)</div> -<div style="font-family:\'Dejavu Sans Condensed\';">Á á Ȧ ȧ Ä ä ï (Using diacritics: DejaVu Sans Condensed)</div> -<div style="font-family:\'Arial Unicode MS\';">Á á Ȧ ȧ Ä ä ï (Arial Unicode MS)</div> -<div style="font-family:\'Times New Roman\';">Á á Ȧ ȧ Ä ä ï (Times New Roman)</div> -<div style="font-family:\'Courier new\';">Á á Ȧ ȧ Ä ä ï (Courier New)</div> -</div> -<p><b>It is recommended to use precomposed characters whenever possible with mPDF.</b></p> - - -<pagebreak /> - -<h2>Unicode Supplementary Planes</h2> -<p>The original Unicode allocated characters between x0000 and xFFFF (65,536 characters). This \'Basic Multilingual Plane\' supported most characters in common use, including a large number of Unified Chinese-Japanese-Korean characters (CJK). Later the Unicode standard was extended to 16 Planes. </p> - -<p>The first plane (plane 0), the Basic Multilingual Plane (BMP), is where most characters have been assigned so far.</p> -<p>Plane 1, the Supplementary Multilingual Plane (SMP), is mostly used for historic scripts such as Linear B, but is also used for musical and mathematical symbols.</p> -<p>Plane 2, the Supplementary Ideographic Plane (SIP), is used for about 40,000 Unified Han (CJK) Ideographs.</p> - -<p>mPDF version 5 supports fonts containing characters from all Unicode Planes. By choosing the correct font, almost every single character from Unicode 5 can be displayed in a PDF file.</p> - -<h4>Unicode Supplementary Multilingual Plane (SMP or Plane 1) U+10000 - U+1FFFF</h4> -<h5>Gothic text</h5> -<div> -This paragraph shows Gothic text. These characters lie in the Unicode Supplementary Multilingual Plane U+10330 - U+1034F. -</div> -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;"> -<div style="font-family:damase"> -𐌰 𐌱 𐌲 𐌳 𐌴 𐌵 𐌶 𐌷 𐌸 𐌹 𐌺 𐌻 𐌼 𐌽 𐌾 𐌿 𐍀 𐍁 𐍂 𐍃 𐍄 𐍅 𐍆 𐍇 𐍈 𐍉 𐍊 -</div> -</div> -<div> -Font: MPH2BDamase (damase_v.2.ttf) available from: http://www.wazu.jp/gallery/views/View_MPH2BDamase.html -</div> - -<h5>Egyptian Hieroglyphics</h5> -<div> -This paragraph shows Egyptian Hieroglyphics. These characters lie in the Unicode Supplementary Multilingual Plane U+13000 - U+1342F. -</div> -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;"> -<div style="font-family:aegyptus; font-size: 24pt"> -𓀀 𓀁 𓀂 𓀃 𓀄 𓀅 𓀆 𓀇 𓀈 𓀉 𓀊 𓀋 𓀌 𓀍 𓀎 𓀏 𓀐 𓀑 -</div> -</div> -<div> -Font: Aegyptus.otf available from: http://users.teilar.gr/~g1951d/ -</div> - -<p>SMP contains mainly ancient scripts - see <a href="http://mpdf1.com/manual/index.php?tid=451">http://mpdf1.com/manual/index.php?tid=451</a> for full list.</p> - -<p>mPDF uses a different method to embed fonts in the PDF file if they include characters from SMP or SIP, because the characters cannot be represented by a 4 character hex code 0000-FFFF. This method is less eficient than the default method, and it can be suppressed by adding the font name to the array \'BMPonly\' in the config_fonts.php configuration file. </p> - -<p>Note that the DejaVu fonts distributed with mPDF and (GNU)FreeSans and FreeSerif fonts do contain a few characters in the SMP plane, but most users will not require them and by default they have been added to the array \'BMPonly\'.</p> - -<pagebreak /> - -<h4>CJK characters</h4> -<p>Below are examples of all the CJK Unicode blocks contained in the Basic Multilingual Plane and Supplemental Ideographic Plane</p> - -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;"> -<h5>Plane 0 (BMP)</h5> -<dl style="font-family:sun-exta;"> -<dt>CJK Radicals Supplement</dt> -<dd>⺎ ⺏ ⺐ ⺑ ⺒ ⺓ ⺔ ⺕ ⺖ ⺗ ⺘ ⺙ ⺛ ⺜ ⺝ ⺞ ⺟ ⺠ ⺡ ⺢ ⺣ ⺤ ⺥ ⺦ ⺧ ⺨ ⺩ ⺪ </dd> -<dt>Kangxi Radicals</dt> -<dd>⼳ ⼴ ⼵ ⼶ ⼷ ⼸ ⼹ ⼺ ⼻ ⼼ ⼽ ⼾ ⼿ ⽀ ⽁ ⽂ ⽃ ⽄ ⽅ ⽆ ⽇ ⽈ ⽉ ⽊ ⽋ ⽌ ⽍ </dd> -<dt>Ideographic Description Characters</dt> -<dd>⿰ ⿱ ⿲ ⿳ ⿴ ⿵ ⿶ ⿷ ⿸ ⿹ ⿺ ⿻ </dd> -<dt>CJK Symbols and Punctuation</dt> -<dd> 〈 〉 《 》 「 」 『 』 【 】 〒 〓 〔 〕 〖 〗 〘 〙 〚 〛 〜 〝 〞 〦 〧 〨 〩 〪 </dd> -<dt>Hiragana</dt> -<dd>ぁ あ ぃ い ぅ う ぇ え ぉ お か が き ぎ く ぐ け げ こ ご さ ざ </dd> -<dt>Katakana</dt> -<dd>゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ カ ガ キ ギ ク グ ケ ゲ コ ゴ </dd> -<dt>Bopomofo</dt> -<dd>ㄅ ㄆ ㄇ ㄈ ㄉ ㄊ ㄋ ㄌ ㄍ ㄎ ㄏ ㄐ ㄑ ㄒ ㄓ ㄔ ㄕ ㄖ </dd> -<dt>Hangul Compatibility Jamo</dt> -<dd>ㄱ ㄲ ㄳ ㄴ ㄵ ㄶ ㄷ ㄸ ㄹ ㄺ ㄻ ㄼ ㄽ ㄾ ㄿ ㅀ ㅁ ㅂ </dd> -<dt>Kanbun</dt> -<dd>㆐ ㆑ ㆒ ㆓ ㆔ ㆕ ㆖ ㆗ ㆘ ㆙ ㆚ ㆛ ㆜ ㆝ ㆞ ㆟ </dd> -<dt>Bopomofo Extended</dt> -<dd>ㆠ ㆡ ㆢ ㆣ ㆤ ㆥ ㆦ ㆧ ㆨ ㆩ ㆪ ㆫ ㆬ ㆭ ㆮ ㆯ ㆰ ㆱ ㆲ ㆳ ㆴ ㆵ ㆶ ㆷ </dd> -<dt>Katakana Phonetic Extensions</dt> -<dd>ㇰ ㇱ ㇲ ㇳ ㇴ ㇵ ㇶ ㇷ ㇸ ㇹ ㇺ ㇻ ㇼ ㇽ ㇾ ㇿ </dd> -<dt>Enclosed CJK Letters and Months</dt> -<dd>㈄ ㈅ ㈆ ㈇ ㈈ ㈉ ㈊ ㈋ ㈌ ㈍ ㈎ ㈏ ㈐ ㈑ ㈒ ㈓ ㈔ ㈕ ㈖ ㈗ ㈘ ㈙ ㈚ ㈛ ㈜ </dd> -<dt>CJK Compatibility</dt> -<dd>㌀ ㌁ ㌂ ㌃ ㌄ ㌅ ㌆ ㌇ ㌈ ㌉ ㌊ ㌋ ㌌ ㌍ ㌎ ㌏ ㌐ ㌑ ㌒ ㌓ ㌔ ㌕ ㌖ ㌗ ㌘ </dd> -<dt>CJK Unified Ideographs Extension A</dt> -<dd>㐀 㐁 㐂 㐃 㐄 㐅 㐆 㐇 㐈 㐉 㐊 㐋 㐌 㐍 㐎 㐏 㐐 㐑 㐒 㐓 㐔 㐕 㐖 㐗 㐘 </dd> -<dt>CJK Unified Ideographs</dt> -<dd>一 丁 丂 七 丄 丅 丆 万 丈 三 上 下 丌 不 与 丏 丐 丑 丒 专 且 丕 世 丗 丘 </dd> -<dt>Yi Syllables</dt> -<dd>ꀀ ꀁ ꀂ ꀃ ꀄ ꀅ ꀆ ꀇ ꀈ ꀉ ꀊ ꀋ ꀌ ꀍ ꀎ ꀏ ꀐ ꀑ ꀒ ꀓ ꀔ ꀕ ꀖ ꀗ ꀘ ꀙ ꀚ </dd> -<dt>Yi Radicals</dt> -<dd>꒐ ꒑ ꒒ ꒓ ꒔ ꒕ ꒖ ꒗ ꒘ ꒙ ꒚ ꒛ ꒜ ꒝ ꒞ ꒟ ꒠ ꒡ ꒢ ꒣ ꒤ ꒥ ꒦ ꒧ ꒨ ꒩ </dd> -<dt>Hangul Syllables</dt> -<dd>가 각 갂 갃 간 갅 갆 갇 갈 갉 갊 갋 갌 갍 갎 갏 감 갑 값 갓 갔 강 갖 갗 갘 </dd> -<dt>CJK Compatibility Ideographs</dt> -<dd>豈 更 車 賈 滑 串 句 龜 契 金 喇 奈 懶 癩 羅 蘿 螺 裸 邏 樂 洛 烙 珞 落 酪 </dd> -</dl> - -<h5>Plane 2 (SIP)</h5> -<dl style="font-family:sun-exta;"> -<dt>CJK Unified Ideographs Extension B</dt> -<dd>𠀀 𠀁 𠀂 𠀃 𠀄 𠀅 𠀆 𠀇 𠀈 𠀉 𠀊 𠀋 𠀌 𠀍 𠀎 𠀏 𠀐 𠀑 𠀒 𠀓 </dd> - -<dt>CJK Unified Ideographs Extension C</dt> -<dd>𪜀 𪜁 𪜂 𪜃 𪜄 𪜅 𪜆 𪜇 𪜈 𪜉 𪜊 𪜋 𪜌 𪜍 𪜎 𪜏 𪜐 𪜑 𪜒 𪜓 </dd> - -<dt>CJK Compatibility Ideographs Supplement</dt> -<dd>丽 丸 乁 𠄢 你 侮 侻 倂 偺 備 僧 像 㒞 𠘺 免 兔 兤 具 𠔜 㒹 </dd> -</dl> - -</div> - -<pagebreak /> - -<h4>Using CJK fonts in mPDF</h4> - -<p>Fonts containing CJK characters are large files, typically 10-30MB. Adobe provides a free download of an \'Asian font pack\' allowing you to create PDF files without including (embedding) the font information in the file. This keeps the file size to a minimum and minimises resource usage on your website generating the PDF file. However, users will have to download the Adobe font packs to read the file, and other PDF software will not display the text correctly.</p> - -<p>mPDF allows you to embed subsets of CJK fonts keeping file size down, although there is increased memory usage to generate these files.</p> - -<p>Some CJK fonts are broken up into 2 files because of the size of the files. One freely available font with almost complete coverage of all CJK characters (in both BMP and SIP) is \'Sun\' available from Alan Wood\'s excellent website: <a href="http://www.alanwood.net/unicode/fonts-east-asian.html">http://www.alanwood.net/unicode/fonts-east-asian.html</a>. This comes as 2 files, Sun-ExtA and Sun-ExtB (both about 20MB in size) containing the characters from BMP and SIP respectively. -</p> - -<p>mPDF allows you to treat these as one font by defining the second file as an SIP-extension of the first in the config_fonts.php configuration file. The following text includes random characters from the BMP and SIP mixed together:</p> - -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;"> -<div style="font-family:sun-extA;"> -鼂 鼈 鼗 𣈏 𣈥 鼦 鼧 𣈯 𣈱 鼹 齄 𣈲 𣈳 齅 齐 𣈴 𣉖 齓 齚 𣉢 𣊁 齢 齩 𣊉 𣊊 -</div> -</div> - -<p>This is the entry in the config_fonts.php configuration file:</p> -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;"> -$this->fontdata = array(<br /> -...<br /> - "sun-exta" => array(<br /> - \'R\' => "Sun-ExtA.ttf",<br /> - \'sip-ext\' => \'sun-extb\',<br /> - ),<br /> - "sun-extb" => array(<br /> - \'R\' => "Sun-ExtB.ttf",<br /> - ),<br /> -<br /> -...<br /> -); -</div> - - -<p>This is the HTML code - note only the sun-exta font-family needs to be referenced:</p> -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;"> -<div style="font-family:sun-extA;"> -&#40706; &#40712; &#40727; &#x2320f; &#x23225; &#40742; &#40743; &#x2322f; &#x23231; &#40761; &#40772; &#x23232; &#x23233; &#40773; &#40784; &#x23234; &#x23256; &#40787; &#40794; &#x23262; &#x23281; &#40802; &#40809; &#x23289; &#x2328a; -</div> -</div> - -<p>NB You may also need to edit the value $this->useAdobeCJK=false in config.php or use new mPDF(\'-aCJK\'), and edit the config_cp.php configuration file.</p> - - -<pagebreak /> - -<h4>TrueType Collections</h4> - -<p>TrueType Collections (.ttc files) contain more than one font. mPDF treats each font separately by defining the TTCfontID array in the config_fonts.php configuration file. </p> - -<p>This example uses the Windows MingLiU fonts, which consist of 2 files containing 6 fonts (note that mingliub is not a Bold variant): </p> - -<p>Font collection file (mingliu.ttc) contains the following fonts:<br /> -[1] MingLiU (mingliu) Regular<br /> -[2] PMingLiU (pmingliu) Regular (Proportional)<br /> -[3] MingLiU_HKSCS (mingliu_hkscs) Regular<br /> -</p> - -<p>Font collection file (mingliub.ttc) contains the following fonts:<br /> -[1] MingLiU-ExtB (mingliu-extb) Regular<br /> -[2] PMingLiU-ExtB (pmingliu-extb) Regular (Proportional)<br /> -[3] MingLiU_HKSCS-ExtB (mingliu_hkscs-extb) Regular<br /> -</p> - -<p>The following text includes characters from both BMP and SIP:</p> - -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE;"> -<div style="font-family:mingliu;"> -鼂 鼦 齄 齐 齢 齩 𣊉 𣊊 -</div> -<div style="font-family:mingliu_hkscs;"> -鼂 鼦 齄 齐 齢 齩 𣊉 𣊊 -</div> -<div style="font-family:pmingliu;"> -鼂 鼦 齄 齐 齢 齩 𣊉 𣊊 -</div> -</div> - -<p>This is the entry in the config_fonts.php configuration file:</p> -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;"> -$this->fontdata = array(<br /> -...<br /> - "mingliu" => array(<br /> - \'R\' => "mingliu.ttc",<br /> - \'TTCfontID\' => array (<br /> - \'R\' => 1,<br /> - ),<br /> - \'sip-ext\' => \'mingliu-extb\',<br /> - ),<br /> - - "pmingliu" => array(<br /> - \'R\' => "mingliu.ttc",<br /> - \'TTCfontID\' => array (<br /> - \'R\' => 2,<br /> - ),<br /> - \'sip-ext\' => \'pmingliu-extb\',<br /> - ),<br /> - - "mingliu_hkscs" => array(<br /> - \'R\' => "mingliu.ttc",<br /> - \'TTCfontID\' => array (<br /> - \'R\' => 3,<br /> - ),<br /> - \'sip-ext\' => \'mingliu_hkscs-extb\',<br /> - ),<br /> - - "mingliu-extb" => array(<br /> - \'R\' => "mingliub.ttc",<br /> - \'TTCfontID\' => array (<br /> - \'R\' => 1,<br /> - ),<br /> - ),<br /> - - "pmingliu-extb" => array(<br /> - \'R\' => "mingliub.ttc",<br /> - \'TTCfontID\' => array (<br /> - \'R\' => 2,<br /> - ),<br /> - ),<br /> - - "mingliu_hkscs-extb" => array(<br /> - \'R\' => "mingliub.ttc",<br /> - \'TTCfontID\' => array (<br /> - \'R\' => 3,<br /> - ),<br /> - ),<br /> -<br /> -...<br /> -); -</div> - - -<p>This is the HTML code:</p> -<div style="border:0.2mm solid #000088; padding: 1em; background-color: #EEEEEE; font-family: \'Courier new\'; font-size: 8.5pt;"> -<div style="font-family:mingliu;"> -&#40706; &#40742; &#40772; &#40784; &#40802; &#40809; &#x23289; &#x2328a; -</div> -<br /> -<div style="font-family:mingliu_hkscs;"> -&#40706; &#40742; &#40772; &#40784; &#40802; &#40809; &#x23289; &#x2328a; -</div> -<br /> -<div style="font-family:pmingliu;"> -&#40706; &#40742; &#40772; &#40784; &#40802; &#40809; &#x23289; &#x2328a; -</div> -</div> - - -'; - -//============================================================== -//============================================================== -//============================================================== -if ($_REQUEST['html']) { echo $html; exit; } -if ($_REQUEST['source']) { - $file = __FILE__; - header("Content-Type: text/plain"); - header("Content-Length: ". filesize($file)); - header("Content-Disposition: attachment; filename='".$file."'"); - readfile($file); - exit; -} -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - -include("../mpdf.php"); - -$mpdf=new mPDF(); - -$mpdf->WriteHTML($html); - -$mpdf->Output(); -exit; - -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example54_new_mPDF_v5-1_features_gradients_and_images.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example54_new_mPDF_v5-1_features_gradients_and_images.php deleted file mode 100644 index e271cd9a638fe8759a31bdf4de0082298a2e07cf..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example54_new_mPDF_v5-1_features_gradients_and_images.php +++ /dev/null @@ -1,499 +0,0 @@ -<?php - - -include("../mpdf.php"); - -$mpdf=new mPDF(''); - -//============================================================== -$html = ' -<style> -body { - font-family: sans-serif; - font-size: 10pt; -} -h4 { - font-variant: small-caps; -} -h5 { - margin-bottom: 0; - color: #110044; -} -p { margin-top: 0; } -dl { - margin: 0; -} -table { - border-spacing: 0.5em; - border: 7px dashed teal; -} -.table1 { - background-image: -moz-linear-gradient(left, #07cdde 20%, #00f200 ); -} -.table1 tr.thisrow1 { - background-image-resolution: 300dpi; - background: transparent url(\'bayeux1.jpg\') repeat scroll left top; -} -.table1 tr.thisrow1 td { - height: 28mm; -} -.table1 tr.thisrow2 { - background-image: none; - background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 ); - background: -webkit-gradient(linear, left bottom, left top, color-stop(0.29, rgb(90,83,12)), color-stop(0.65, rgb(117,117,39)), color-stop(0.83, rgb(153,153,67))); -} -.table3 { - border-collapse: collapse; - /* background-gradient: linear #07cdde #00f200 1 0 0.5 1; */ - background: -moz-linear-gradient(left, #07cdde 20%, #00f200 ); -} -tr.thisrow { - border: 3px dashed red; - background: transparent url(\'bayeux1.jpg\') repeat scroll left top; -} -.table3 tr.thisrow { - border: 3px dashed orange; - background: transparent url(\'bgrock.jpg\') repeat scroll left top; -} -tfoot tr { - border: 5px dashed blue; - /* background-gradient: linear #c7Fdde #FF0000 1 0 0.5 0; */ - background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 ); -} -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background: linear-gradient(top, #c7cdde, #f0f2ff); -} -.rounded { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background: linear-gradient(top, #c7cdde, #f0f2ff); - border-radius: 2mm; - background-clip: border-box; -} -div.text { - padding:1em; - margin: 1em 0; - text-align:justify; -} -.code { - font-family: mono; - font-size: 9pt; - background-color: #d5d5d5; - margin: 1em 1cm; - padding: 0 0.3cm; -} -</style> -<body style="background: -moz-repeating-radial-gradient(rgba(255,0,0,0.1), rgba(0,0,255,0.1) 40px, rgba(255,0,0,0.1) 80px)"> - -<div style="position:fixed; top: 0; right: 0"><img src="tux.svg" width="110" /></div> - -<h1></a>mPDF</h1> -<h2>New features in mPDF Version 5.1</h2> - -<div class="rounded text"> -<ul> -<li>CSS background (images, colours or gradients) on <TR> and <TABLE></li> -<li>CSS border on <TR> (only in border-collapsed mode)</li> -<li>support for Mozilla and CSS3 gradient syntax: -<ul> -<li>-moz-linear-gradient, linear-gradient</li> -<li>-moz-radial-gradient, radial-gradient</li> -<li>-moz-repeating-linear-gradient, linear-repeating-gradient</li> -<li>-moz-repeating-radial-gradient, radial-repeating-gradient</li> -</ul> -</li> -<li>expanded support for gradients (including in SVG images): -<ul> -<li>multiple colour \'stops\'</li> -<li>opacity (transparency)</li> -<li>angle and/or position can be specified</li> -</ul> -</li> -<li>gradient can be used as an image mask (custom mPDF styles: gradient-mask)</li> -<li>CSS3 image-orientation supported for <IMG> (similar to existing custom mPDF attribute: rotate)</li> -<li>CSS3 image-resolution supported for <IMG></li> -<li>background-image-resolution (custom mPDF CSS-type style) to define resolution of background images</li> -<li>improved support for SVG images</li> -<li>SVG and WMF images supported in background-image</li> -<li>file attachments (embedded in PDF file) → → → → → <annotation file="tiger.jpg" content="This is a file attachment (embedded file) -Double-click to open attached file -Right-click to save file on your computer" icon="Paperclip" title="Attached File: tiger.jpg" pos-x="150" /></li> -</ul> -</div> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Tables: borders, background images & gradients</div> - -<div class="rounded text">Background images or gradients can be set on whole tables or table rows (as well as individual table cells)</div> - -<table class="table1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr class="thisrow1"><td>This row has</td><td>a background-image</td><td>of the bayeux tapestry</td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -<tr class="thisrow2"><td>This row has</td><td>a gradient set</td><td>which spans all 3 cells</td></tr> -<tr><td>Row 5</td><td>Also data</td><td>Also data</td></tr> -</tbody></table> - - -<div class="rounded text">Border can be set on table rows (only when border-collapse is set to collapse)</div> - -<table class="table3" border="1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr class="thisrow"><td>Row 2</td><td>This is data<br />This is data<br />This is data<br />This is data</td><td>Also data</td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -</tbody></table> - - -<!-- ============================================================== --> - - -<div style="margin-top: 2em; height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mozilla and CSS3 gradient syntax</div> - -<div style="height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div> -<h2>Linear gradients</h2> -<h4> Angle set AND points e.g. -moz-linear-gradient(34% 84% 30deg, red, orange, yellow...</h4> -<table style="border-collapse: collapse; repeat scroll left top; border: none;"> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);">top right 210 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);">30% 80% 60 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);">10px 40px 325 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);">bottom left 135deg </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -</table> - - -<h4> Points set only e.g. -moz-linear-gradient(bottom left, red, orange, yellow...</h4> - -<table style="border-collapse: collapse; repeat scroll left top; border: none;"> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);">bottom right</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);">top</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);">10px 40px</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);">30% 10%</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -</table> - -<pagebreak /> - -<h4> Angle set but no points e.g. -moz-linear-gradient(30deg, red, orange, yellow...</h4> - -<table style="border-collapse: collapse; repeat scroll left top; border: none;"> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);">90 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);">120 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);">180 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);">210 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -</table> - - - -<div class="rounded text"> -<p>Linear and radial gradients are not specified in the CSS2 specification. The CSS3 draft specification gives a way of outputting gradients, but currently this is not supported by any browser.</p> -<p>Mozilla (Firefox) has developed its own way of producing gradients, which approximates to the CSS3 draft specification: </p> -<ul> -<li><i>-moz-linear-gradient</i> </li> -<li><i>-moz-repeating-linear-gradient</i></li> -<li><i>-moz-radial-gradient</i> and </li> -<li><i>-moz-repeating-radial-gradient</i></li> -</ul> -<p>WebKit (Safari, Chrome etc.) have a separate way of defining gradients using <i>-webkit-gradient</i></p> -<p>Microsoft (IE) does not support any such method of specifying gradients, but does have a function <i>filter: progid:DXImageTransform.Microsoft.gradient()</i> </p> -<p>When writing HTML for cross-browser compatibility, it is common to see something like this in a stylesheet:</p> -<p class="code"> -background: #999999; /* for non-css3 browsers */<br /> -filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\'); /* for IE */<br /> -background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#000000)); /* for webkit browsers */<br /> -background: -moz-linear-gradient(top, #cccccc, #000000); /* for firefox 3.6+ */<br /> -</p> - - - -<p>mPDF versions <= 5.0 supported a custom style property <i>background-gradient</i> which accepted both linear and radial gradients. These continue to be supported (and both old and new forms can be used together); note the differences:</p> -<ul> -<li>mPDF background-gradients are output underneath background-images, and both can be specified; whereas the new CSS3/Mozilla-type gradients are defined as a type of background-image</li> -<li>CSS3/Mozilla gradients support multiple colour-stops, opacity, repeating-gradients, and a greater number of options for defining the gradient axis (linear gradients) or shape and extent (radial gradients)</li> -</ul> - -<p>mPDF will attempt to parse a CSS stylesheet written for cross-browser compatibility:</p> -<ul> -<li>parse and support <i>-moz</i> type gradients</li> -<li>parse and support CSS3 gradient syntax</li> -<li>ignore <i>-webkit</i> syntax gradients</li> -</ul> - - -<p>More details can be found at:</p> -<ul> -<li>Mozilla linear - <a href="https://developer.mozilla.org/en/CSS/-moz-linear-gradient">https://developer.mozilla.org/en/CSS/-moz-linear-gradient</a></li> -<li>Mozilla radial - <a href="https://developer.mozilla.org/en/CSS/-moz-radial-gradient">https://developer.mozilla.org/en/CSS/-moz-radial-gradient</a></li> -<li>Mozilla gradients use - <a href="https://developer.mozilla.org/en/Using_gradients">https://developer.mozilla.org/en/Using_gradients</a></li> -<li>CSS3 linear gradients - <a href="http://dev.w3.org/csswg/css3-images/#linear-gradients">http://dev.w3.org/csswg/css3-images/#linear-gradients</a></li> -<li>CSS3 radial gradients - <a href="http://dev.w3.org/csswg/css3-images/#radial-gradients">http://dev.w3.org/csswg/css3-images/#radial-gradients</a></li> -<li>WebKit gradients - <a href="http://webkit.org/blog/175/introducing-css-gradients/">http://webkit.org/blog/175/introducing-css-gradients/</a></li> -</ul> -</div> - - - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Repeating gradients</div> - -<p class="code"> -background: repeating-linear-gradient(red, blue 20px, red 40px); -<br /> <br /> -background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px); -</p> - -<div style="float: right; width: 250px; height: 150px; background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px);"> </div> - -<div style="float: left; width: 250px; height: 150px; background: repeating-linear-gradient(red, blue 20px, red 40px);"> </div> -<br style="clear: both;" /> -<br /> -<br /> - -<p class="code"> -background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px); -<br /> <br /> -background: repeating-radial-gradient(red, blue 20px, red 40px); -</p> -<div style="float: right; width: 250px; height: 150px; background: repeating-radial-gradient(red, blue 20px, red 40px);"> </div> - -<div style="float: left; width: 250px; height: 150px; background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px);"> </div> -<br style="clear: both;" /> - - -<pagebreak /> - - -<h2>Radial gradients</h2> - -<div style="float: right; width: 250px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8; -border-radius: 155px / 100px; --moz-border-radius: 155px / 100px; -box-shadow: 10px 10px 25px #CCC; --moz-box-shadow: 5px 5px 25px #CCC; -background-image: -moz-radial-gradient(70% 30%, ellipse , #ffffff 0%, #F56991 50%, #8A2624 100%);"> </div> - - -<div style="float: left; width: 150px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8; -border-radius: 100px; --moz-border-radius: 100px; -box-shadow: 10px 10px 25px #CCC; --moz-box-shadow: 5px 5px 25px #CCC; -background-image: -moz-radial-gradient(70% 30%, circle , #ffffff 0%, #E56991 50%, #8A2624 100%);"> </div> -<br style="clear: both;" /> - - -<div style="float: right; width: 150px; height: 150px; border: 0.2mm solid black; -background: radial-gradient(bottom left, farthest-side, red, blue 50px, pink); -background-image: -moz-radial-gradient(red, yellow, #1E90FF); -background: -webkit-gradient(linear, left bottom, left top, color-stop(0.48, rgb(107,14,86)), color-stop(0.74, rgb(140,41,112)), color-stop(0.87, rgb(168,70,146)));"> </div> - -<div style="float: left; width: 150px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(red 5%, yellow 25%, #1E90FF 50%);"> </div> -<br style="clear: both;" /> - -<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, circle, red, yellow, #1E90FF);"> </div> - -<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, ellipse, red, yellow, #1E90FF);"> </div> -<br style="clear: both;" /> - -<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse closest-side, red, yellow 10%, #1E90FF 50%, white);"> </div> - -<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse farthest-corner, red, yellow 10%, #1E90FF 50%, white);"> </div> -<br style="clear: both;" /> - - -<p style="background-image: -moz-radial-gradient(center , red, orange, yellow, green, blue, indigo, violet);"> <br /> <br /> <br /> <br /> <br /> <br /> </p> - -<p style="background-image: -moz-radial-gradient(center , circle closest-side, blue 0%, red 100%);"> <br /> <br /> <br /> <br /> <br /> </p> - - - - -<pagebreak /> - - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Gradient Image mask</div> - -<div class="rounded text">Gradients (linear or radial) can also be used to produce \'masks\' for images. The same syntax is used as for background gradients (e.g. -moz-linear-gradient) but is set using a custom mPDF style: <i>gradient-mask</i>. The rgba() method for defining colours is used: colours are ignored, but the opacity value is used to mask the image.</div> - -<p class="code"><img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<br /><br /><img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<br /><br /><img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" /> -</p> - -<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" /> - - -<br /> - - - - -<pagebreak /> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image orientation</div> - -<div class="rounded text">Images can be rotated using a custom mPDF HTML attribute: rotate. mPDF now also supports the draft CSS3 property of image-orientation. Rotation can be expressed in degrees, radians or grad units; it is corrected if necessary to an orthogonal rotation i.e. 90, 180 or 270 degrees. NB This does not work on background-images.</div> -<p class="code"><img src="tiger2.png" style="image-orientation: -90deg" width="100" /> -<br /> -<img src="tiger2.png" style="image-orientation: 3.14159rad" width="100" /> -</p> - -<img src="tiger2.png" width="100" /> -<img src="tiger2.png" style="image-orientation: 75deg;" width="100" /> -<img src="tiger2.png" style="image-orientation: 180deg; image-resolution: 300dpi; " width="100" /> -<img src="tiger2.png" style="image-orientation: -90deg" width="100" /> - - -<br /> - -<br /> -<br /> -<br /> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image resolution</div> - - -<div class="rounded text">Image files (which do not have an output width or height specified) are displayed in mPDF at the default resolution set by the variable $mpdf->img_dpi. This can be overridden using the draft CSS3 property \'image-resolution\', which can be applied to <IMG> or background-images. -<br /> -The next 3 image files are identical (300px x 300px) but they have been saved with a different specified resolution: the first at 96dpi, the second at 300dpi. -<br /> -NB When used in combination with \'from-image\', a specified resolution is only used if the image does not have an intrinsic resolution. Only JPG, PNG and BMP files store a specified DPI resolution in the file.</div> - -<p class="code"><img src="tiger300px300dpi.png" style="image-resolution: from-image;" /> -<br /><img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" /> -<br /><img src="tiger300px96dpi.png" style="image-resolution: from-image;" /></p> - -<img src="tiger300px300dpi.png" style="image-resolution: from-image;" /> -<img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" /> -<img src="tiger300px96dpi.png" style="image-resolution: from-image;" /> -<br /> <br /> - - - -<pagebreak /> - -<div class="rounded text">Image resolution can also be applied to a background-image. This can be used as an alternative to the custom mPDF style property - \'background-image-resize\'</div> - -<p class="code"><div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"></p> -<div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;">Hallo<br />world -</div> - -<br /> - -<p class="code"><div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"></p> -<div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"> -</div> - - - -<br /> - - -<pagebreak /> - - - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mixed effects</div> - - -<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 90px;background-color: #00f200 ; "> -<div style="padding: 15px; background: -moz-linear-gradient(top right, red, orange, yellow, green, blue, indigo, violet); border-radius: 75px; "> -<div style="padding: 15px; background-gradient: linear #07cdde #00f200 0 0 0.5 1; border-radius: 60px; "> -<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 45px; background-image-resolution: 180dpi; "> -<div style="padding: 15px; background: -moz-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); border-radius: 30px; "> -<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 180dpi; "> -Hallo World -</div> -<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 360dpi; "> -Hallo World -</div> -</div> -</div> -</div> -</div> -</div> - -<br /> - -<div style="background-color:#FF0000 ; width:180px; background-image: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));"> -<img src="tux.svg" width="180" /> -</div> - -'; - -//============================================================== -if ($_REQUEST['html']) { echo $html; exit; } -if ($_REQUEST['source']) { - $file = __FILE__; - header("Content-Type: text/plain"); - header("Content-Length: ". filesize($file)); - header("Content-Disposition: attachment; filename='".$file."'"); - readfile($file); - exit; -} - -//============================================================== -$mpdf->WriteHTML($html); - -//============================================================== -//============================================================== -// OUTPUT -$mpdf->Output(); exit; - - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example55_new_mPDF_v5-1_color_and_other_features.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example55_new_mPDF_v5-1_color_and_other_features.php deleted file mode 100644 index 1cd5bca0497885bff5f73fd394e05f2fbe9f85b7..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example55_new_mPDF_v5-1_color_and_other_features.php +++ /dev/null @@ -1,456 +0,0 @@ -<?php - - -include("../mpdf.php"); - -$mpdf=new mPDF(''); - -$mpdf->useKerning=true; - -$mpdf->restrictColorSpace=3; // forces everything to convert to CMYK colors - -$mpdf->AddSpotColor('PANTONE 534 EC',85,65,47,9); - -//============================================================== -$html = ' -<style> -@page { - sheet-size: A4; - size: 17cm 25cm; - margin: 10%; /* % of page-box width for LR, height for TB */ - margin-header: 5mm; - margin-footer: 5mm; - margin-left: 2cm; - margin-right: 1cm; - marks: cross crop; - background-image: -moz-repeating-radial-gradient(rgba(255,0,0,0.1), rgba(0,0,255,0.1) 40px, rgba(255,0,0,0.1) 80px); -} -body { - font-family: sans-serif; - font-size: 10pt; -} -h4 { - font-variant: small-caps; -} -h5 { - margin-bottom: 0; - color: #110044; -} -p { margin-top: 0; } -dl { - margin: 0; -} -table { - border-spacing: 0.5em; - border: 7px dashed teal; -} -.table1 { - background-image: -moz-linear-gradient(left, #07cdde 20%, #00f200 ); -} -.table1 tr.thisrow1 { - background-image-resolution: 300dpi; - background: transparent url(\'bayeux1.jpg\') repeat scroll left top; -} -.table1 tr.thisrow1 td { - height: 28mm; -} -.table1 tr.thisrow2 { - background-image: none; - background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 ); - background: -webkit-gradient(linear, left bottom, left top, color-stop(0.29, rgb(90,83,12)), color-stop(0.65, rgb(117,117,39)), color-stop(0.83, rgb(153,153,67))); -} -.table3 { - border-collapse: collapse; - /* background-gradient: linear #07cdde #00f200 1 0 0.5 1; */ - background: -moz-linear-gradient(left, #07cdde 20%, #00f200 ); -} -tr.thisrow { - border: 3px dashed red; - background: transparent url(\'bayeux1.jpg\') repeat scroll left top; -} -.table3 tr.thisrow { - border: 3px dashed orange; - background: transparent url(\'bgrock.jpg\') repeat scroll left top; -} -tfoot tr { - border: 5px dashed blue; - /* background-gradient: linear #c7Fdde #FF0000 1 0 0.5 0; */ - background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 ); -} -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background: linear-gradient(top, #c7cdde, #f0f2ff); -} -.rounded { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background: linear-gradient(top, #c7cdde, #f0f2ff); - border-radius: 2mm; - background-clip: border-box; -} -div.text { - padding:1em; - margin: 1em 0; - text-align:justify; -} -.code { - font-family: mono; - font-size: 9pt; - background-color: #d5d5d5; - margin: 1em 1cm; - padding: 0 0.3cm; -} -</style> -<body> - -<div style="position:fixed; top: 0; right: 0"><img src="tux.svg" width="110" /></div> - -<h1></a>mPDF</h1> -<h2>Other new features in mPDF Version 5.1</h2> - -<div class="rounded text"> -<ul> -<li>Kerning</li> -<li>Letter- and word-spacing</li> -<li>Small-caps improved to work with justified text, and now with kerning, letter- and word-spacing</li> -<li>Bleed area on @page media</li> -<li>Colorspace and colour conversion (almost everything except BMP images)</li> -<li>Spot colours</li> -<li>PDF/X files</li> -<li>dir="rtl"</li> -<li>numeric list-styles for arabic and indic</li> -</ul> -</div> - - -<!-- ============================================================== --> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Kerning</div> - -<div class="rounded text">Font kerning is supported. This corrects the inter-character spacing between specific pairs of letters. It is dependent on kerning information being available in the original font file. -<br /> -You need to set $mpdf->useKerning=true; either in the config.php configuration file, or at runtime. This causes the kerning information to be loaded when fonts are accessed (and will therefore increase memory usage). -<br /> -You can then set kerning on or off using the draft CSS3 style property "font-kerning". Values of normal or auto will turn kerning on; "none" will turn kerning off. -</div> - -<div style="border: 0.2mm solid black; font-family: arial; font-size: 40pt;"> -Off: AWAY To War. -</div> - -<div style="border: 0.2mm solid black; font-family: arial; font-size: 40pt; font-kerning: auto;"> -On: AWAY To War. -</div> - -<!-- ============================================================== --> -<pagebreak /> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Letter and word spacing & text justification</div> - -<div class="rounded text">Letter- and word-spacing can be set on almost all block and in-line style elements, using the CSS properties letter-spacing and word-spacing. Values of normal or a length can be specified (em or ex recommended). -Note that setting the letter-spacing value (including setting it to zero) will prevent any additional letter-spacing to be added when full-justifying text. The word-spacing value, however, is a <i>minimum</i> value, and can be increased in order to justify text. -<br /> -<br /> -Text-align: justify - no longer uses configurable variable $jSpacing= C | W | \'\' -<br /> -The default value is for mixed letter- and word-spacing, set by jSWord and jSmaxChar -<br /> -If a line contains a cursive script (RTL or Indic [devanagari, punjabi, bengali]) then it prevents letter-spacing -for justification on that line - effectively the same as setting letter-spacing:0 -<br /> -Spacing values have been removed from the config_cp.php configuration file, so the "lang" property -(in config_cp) no longer determines justification behaviour (this includes the use of Autofont()). -<br /> -When using RTL or Indic [devanagari, punjabi, bengali] scripts, you should set CSS letter-spacing:0 -whenever you use text-align:justify. -</div> - -<p style="border: 0.2mm solid black; padding: 0.3em;">Nulla felis erat, imperdiet eu, ullamcorper non, nonummy quis, elit. Suspendisse potenti. Ut a eros at ligula vehicula pretium. Maecenas feugiat pede vel risus. Nulla et lectus. <span style="letter-spacing: 0.2em; color: red;">Letter spacing set at 0.2em. Fusce eleifend neque sit amet erat. Integer consectetuer nulla non orci.</span> Morbi feugiat pulvinar dolor. Cras odio. Donec mattis, nisi id euismod auctor, neque metus pellentesque risus, at eleifend lacus sapien et risus. <span style="word-spacing: 1em; color: teal;">Word spacing set at 1em. Phasellus metus. Phasellus feugiat, lectus ac aliquam molestie, leo lacus tincidunt turpis, vel aliquam quam odio et sapien.</span> Mauris ante pede, auctor ac, suscipit quis, malesuada sed, nulla. Integer sit amet odio sit amet lectus luctus euismod. Donec et nulla. Sed quis orci. </p> - - -<!-- ============================================================== --> -<pagebreak /> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Colours</div> - -<div class="rounded text">Whenever a colour can be specified in a style, additional formats are now supported: rgb(), rgba(), hsl(), hsla(), cmyk(), cmyka(), or spot(). -<br /> -Spot colours need to be defined at the start of the script using e.g. $mpdf->AddSpotColor(\'PANTONE 534 EC\',85,65,47,9); -<br /> -The four values define the CMYK values used when the spot colour is not available. A tint % can be specified when using the spot colour in the document. -</div> - -<div style="border: 0.2mm solid black; background-color: rgba(150,150,255, 0.5); color: rgb(0,150,150);">background-color: rgba(150,150,255, 0.5); color: rgb(0,150,150);</div> -<div style="border: 0.2mm solid black; background-color: rgba(60%,60%,100%, 0.5); color: rgb(0,60%,60%);">background-color: rgba(60%,60%,100%, 0.5); color: rgb(0,60%,60%);</div> -<div style="border: 0.2mm solid black; background-color: hsla(180,30%,25%, 0.5); color: hsl(360,100%,50%);">background-color: hsla(180,30%,25%, 0.5); color: hsl(360,100%,50%);</div> -<div style="border: 0.2mm solid black; background-color: cmyka(0,100,0,30, 0.3); color: spot(PANTONE 534 EC,90%);">background-color: cmyka(85,65,0,30, 0.3); color: spot(PANTONE 300 EC,80%);</div> -<br /> -<br /> - -<!-- ============================================================== --> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">@page media</div> - -<div class="rounded text">When using @page to create a print publication with page-size less than sheet-size, the bleed margin is now configurable. -Backgrounds/gradients/images now use the bleed box as their "container box", rather than the whole page. (See this document as an example.) -<br /> -Crop- and cross-marks can now both be used together, and are more configurable. -Also, background-image-opacity and background-image-resize have been extended to work with @page CSS. -<br /> -The following values can be set in the configuration file, config.php: -$this->bleedMargin<br /> -$this->crossMarkMargin<br /> -$this->cropMarkMargin<br /> -$this->cropMarkLength<br /> -$this->nonPrintMargin<br /> -</div> - -<!-- ============================================================== --> -<pagebreak /> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Colorspace and colour conversion </div> - -<div class="rounded text">PDF files can contain objects using different colorSpaces e.g. Grayscale, RGB and CMYK. By default, -mPDF creates PDF files using the colours as they are specified: font colour may be set (e.g. #880000) as an RGB colour, and the -file may contain JPG images in RGB or CMYK format. -<br /> -In some circumstances, you may wish to create a PDF file with restricted colorSpaces e.g. printers will often want files -which contain only CMYK, spot colours, or grayscale, but <i>not</i> RGB. -<br /> -Additional methods for defining colours can be used (see above), but alternatively you can set mPDF to restrict the colorSpace by setting -the value for $mpdf->restrictColorSpace: -<br /> -1 - allow GRAYSCALE only [converts CMYK/RGB->gray] -<br /> -2 - allow RGB / SPOT COLORS / Grayscale [converts CMYK->RGB] -<br /> -3 - allow CMYK / SPOT COLORS / Grayscale [converts RGB->CMYK] -<br /> -This will attempt to convert every colour value used in the document to the permitted colorSpace(s). Almost everything including images -will be converted (except BMP images), and the conversion of images may take significant time. -<br /> -This example file is set to (3) CMYK; compare the appearance of the Tux penguin in this file and in the previous example file (RGB). -</div> -<br /> -<br /> - -<!-- ============================================================== --> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">PDF/A and PDF/X files</div> - -<div class="rounded text">mPDF can produce files which (attempt to) meet the PDF/A and PDF/X specifications. In addition to restricted colorSpace, -PDF/A and /X files cannot contain images or colour values with "transparency". -<br /> -Please note that full compliance with the PDF/A or /X specification is not guaranteed. -</div> - -<!-- ============================================================== --> -<pagebreak /> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">RTL (right-to-left) text</div> - -<div class="rounded text"><div>Handling of RTL (right-to-left) languages has been significantly rewritten, and is likely to cause -changes to the resulting files if you have previously been using mPDF. The changes have made mPDF -act more like a browser, respecting the HTML/CSS rules. -Changes include:</div> -<ul> -<li>the document now has a baseline direction; this determines the - <ul> - <li>behaviour of blocks for which text-align has not been specifically set</li> - <li>layout of mirrored page-margins, columns, ToC and Indexes, headers / footers</li> - <li>base direction can be set by any of: - <ul> - <li>$mpdf->SetDirectionality(\'rtl\');</li> - <li><html dir="rtl" or style="direction: rtl;"></li> - <li><body dir="rtl" or style="direction: rtl;"></li> - </ul></li> - <li>base direction is an inherited CSS property, so will affect all content, unless...</li> - </ul></li> -<li>direction can be set for all HTML block elements e.g. <DIV><P><TABLE><UL> etc using - <ul> - <li>CSS property <style="direction: rtl;"> </li> - <li>direction can only be set on the top-level element of nested lists</li> - <li>direction can only be set on <TABLE>, NOT on THEAD, TBODY, TD etc.</li> - <li>nested tables CAN have different directions</li> - </ul></li> -<li>NOTE that block/table margins/paddings are NOT reversed by direction</li> -<li>language (either CSS "lang", using Autofont, or through initial set-up e.g. $mpdf = new mPDF(\'ar\') ) - no longer affects direction in any way.<br /> - NB config_cp.php has been changed as a result; any values of "dir" set here are now ineffective</li> -<li>default text-align is now as per CSS spec: "a nameless value which is dependent on direction"<br /> - NB default text-align removed in default stylesheet in config.php </li> -<li>once text-align is specified, it is respected and inherited<br /> - NB mPDF <5.1 reversed the text-align property for all blocks when RTL set.</li> -<li>the configurable value $rtlcss is depracated, as it is no longer required</li> -<li>improved algorithm for dtermining text direction - <ul> - <li>english word blocks are handled in text reversal as one block i.e. dir="rtl"<br /> - [arabic text] this will not be reversed [arabic text]</li> - <li>arabic numerals 0-9 handled correctly</li> - </ul></li> -</ul> -Although the control of direction for block elements is now more configurable, the control of -text direction (RTL arabic characters) remains fully automatic and unconfigurable. -<BDO> etc has no effect. Enclosing text in silent tags can sometimes help e.g.: - content<span>[arabic text]</span>content -</div> - - -<!-- ============================================================== --> -<pagebreak /> -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">List styles</div> -<div class="rounded text">Additional numerical list-styles are supported. All of these (except Tamil) are consistent with the draft CSS3 specification:<br /> -<b>list-style</b>: arabic-indic | bengali | devanagari | gujarati | gurmukhi | kannada | malayalam | oriya | persian | telugu | thai | urdu | tamil - -</div> - -<style> -ul.arabic { font-family:\'XB Zar\'; text-align: right; direction: rtl; } -ol.arabic { font-family:\'XB Zar\'; list-style: arabic-indic; text-align: right; direction: rtl; } -ol.persian { font-family:\'XB Zar\'; list-style: persian; text-align: right; direction: rtl; } -ol.urdu { font-family:\'XB Zar\'; list-style: urdu; text-align: right; direction: rtl; } -ol.bengali { font-family: ind_bn_1_001; list-style: bengali; } -ol.devanagari { font-family: ind_hi_1_001; list-style: devanagari; } -ol.gujarati { font-family: ind_gu_1_001; list-style: gujarati; } -ol.gurmukhi { font-family: ind_pa_1_001; list-style: gurmukhi; } -ol.kannada { font-family: ind_kn_1_001; list-style: kannada; } -ol.malayalam { font-family: ind_ml_1_001; list-style: malayalam ; } -ol.oriya { font-family: ind_or_1_001; list-style: oriya ; } -ol.tamil { font-family: ind_ta_1_001; list-style: tamil ; } -ol.telugu { font-family: ind_te_1_001; list-style: telugu ; } -</style> - -<ul class="arabic"> - - -<li>Arabic -<ol class="arabic"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -<li>Six</li> -</ol> -</li> -<li>Persian -<ol class="persian"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -<li>Six</li> -</ol> -</li> -<li>Urdu -<ol class="urdu"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -<li>Six</li> -</ol> -</li> - -</ul> - -<ul> - -<li>Bengali -<ol class="bengali"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Devanagari -<ol class="devanagari"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Gujarati -<ol class="gujarati"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Gurmukhi -<ol class="gurmukhi"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Kannada -<ol class="kannada"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Malayalam -<ol class="malayalam"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Oriya -<ol class="oriya"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Tamil -<ol class="tamil"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> -<li>Telugu -<ol class="telugu"> -<li>One</li> -<li>Two</li> -<li>Three</li> -<li>Four</li> -<li>Five</li> -</ol> -</li> - -</ul> - -'; - -//============================================================== -$mpdf->WriteHTML($html); - -//============================================================== -//============================================================== -// OUTPUT -$mpdf->Output(); exit; - - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example56_new_mPDF_v5-1_features_grayscale.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example56_new_mPDF_v5-1_features_grayscale.php deleted file mode 100644 index 7d87cc0c14fd9d44d33f8e303b5e5d4d25f82343..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example56_new_mPDF_v5-1_features_grayscale.php +++ /dev/null @@ -1,497 +0,0 @@ -<?php - - -include("../mpdf.php"); - -$mpdf=new mPDF(''); - -$mpdf->restrictColorSpace = 1; // forces to grayscale -//============================================================== -$html = ' -<style> -body { - font-family: sans-serif; - font-size: 10pt; -} -h4 { - font-variant: small-caps; -} -h5 { - margin-bottom: 0; - color: #110044; -} -p { margin-top: 0; } -dl { - margin: 0; -} -table { - border-spacing: 0.5em; - border: 7px dashed teal; -} -.table1 { - background-image: -moz-linear-gradient(left, #07cdde 20%, #00f200 ); -} -.table1 tr.thisrow1 { - background-image-resolution: 300dpi; - background: transparent url(\'bayeux1.jpg\') repeat scroll left top; -} -.table1 tr.thisrow1 td { - height: 28mm; -} -.table1 tr.thisrow2 { - background-image: none; - background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 ); - background: -webkit-gradient(linear, left bottom, left top, color-stop(0.29, rgb(90,83,12)), color-stop(0.65, rgb(117,117,39)), color-stop(0.83, rgb(153,153,67))); -} -.table3 { - border-collapse: collapse; - /* background-gradient: linear #07cdde #00f200 1 0 0.5 1; */ - background: -moz-linear-gradient(left, #07cdde 20%, #00f200 ); -} -tr.thisrow { - border: 3px dashed red; - background: transparent url(\'bayeux1.jpg\') repeat scroll left top; -} -.table3 tr.thisrow { - border: 3px dashed orange; - background: transparent url(\'bgrock.jpg\') repeat scroll left top; -} -tfoot tr { - border: 5px dashed blue; - /* background-gradient: linear #c7Fdde #FF0000 1 0 0.5 0; */ - background: -moz-linear-gradient(left, #c7Fdde 20%, #FF0000 ); -} -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background: linear-gradient(top, #c7cdde, #f0f2ff); -} -.rounded { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background: linear-gradient(top, #c7cdde, #f0f2ff); - border-radius: 2mm; - background-clip: border-box; -} -div.text { - padding:1em; - margin: 1em 0; - text-align:justify; -} -.code { - font-family: mono; - font-size: 9pt; - background-color: #d5d5d5; - margin: 1em 1cm; - padding: 0 0.3cm; -} -</style> -<body style="background: -moz-repeating-radial-gradient(rgba(255,0,0,0.1), rgba(0,0,255,0.1) 40px, rgba(255,0,0,0.1) 80px)"> - -<div style="position:fixed; top: 0; right: 0"><img src="tux.svg" width="110" /></div> - -<h1></a>mPDF</h1> -<h2>New features in mPDF Version 5.1</h2> - -<div class="rounded text"> -<p>This is a copy of Example 54, but all object colours are converted to grayscale using simply:</p> -<p class="code">$mpdf->restrictColorSpace = 1;</p> -</div> - -<div class="rounded text"> -<ul> -<li>CSS background (images, colours or gradients) on <TR> and <TABLE></li> -<li>CSS border on <TR> (only in border-collapsed mode)</li> -<li>support for Mozilla and CSS3 gradient syntax: -<ul> -<li>-moz-linear-gradient, linear-gradient</li> -<li>-moz-radial-gradient, radial-gradient</li> -<li>-moz-repeating-linear-gradient, linear-repeating-gradient</li> -<li>-moz-repeating-radial-gradient, radial-repeating-gradient</li> -</ul> -</li> -<li>expanded support for gradients (including in SVG images): -<ul> -<li>multiple colour \'stops\'</li> -<li>opacity (transparency)</li> -<li>angle and/or position can be specified</li> -</ul> -</li> -<li>etc...</li> -</ul> -</div> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Tables: borders, background images & gradients</div> - -<div class="rounded text">Background images or gradients can be set on whole tables or table rows (as well as individual table cells)</div> - -<table class="table1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr class="thisrow1"><td>This row has</td><td>a background-image</td><td>of the bayeux tapestry</td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -<tr class="thisrow2"><td>This row has</td><td>a gradient set</td><td>which spans all 3 cells</td></tr> -<tr><td>Row 5</td><td>Also data</td><td>Also data</td></tr> -</tbody></table> - - -<div class="rounded text">Border can be set on table rows (only when border-collapse is set to collapse)</div> - -<table class="table3" border="1"> -<tbody><tr><td>Row 1</td><td>This is data</td><td>This is data</td></tr> -<tr class="thisrow"><td>Row 2</td><td>This is data<br />This is data<br />This is data<br />This is data</td><td>Also data</td></tr> -<tr><td><p>Row 3</p></td><td><p>This is long data</p></td><td>This is data</td></tr> -</tbody></table> - - -<!-- ============================================================== --> - - -<div style="margin-top: 2em; height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mozilla and CSS3 gradient syntax</div> - -<div style="height: 2mm; background-image: -moz-linear-gradient(45deg, red, blue);"> </div> -<h2>Linear gradients</h2> -<h4> Angle set AND points e.g. -moz-linear-gradient(34% 84% 30deg, red, orange, yellow...</h4> -<table style="border-collapse: collapse; repeat scroll left top; border: none;"> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);">top right 210 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top right 210deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);">30% 80% 60 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 80% 60deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);">10px 40px 325 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px 325deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);">bottom left 135deg </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom left 135deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -</table> - - -<h4> Points set only e.g. -moz-linear-gradient(bottom left, red, orange, yellow...</h4> - -<table style="border-collapse: collapse; repeat scroll left top; border: none;"> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);">bottom right</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(bottom right, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);">top</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(top, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);">10px 40px</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(10px 40px, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);">30% 10%</td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(30% 10%, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -</table> - -<pagebreak /> - -<h4> Angle set but no points e.g. -moz-linear-gradient(30deg, red, orange, yellow...</h4> - -<table style="border-collapse: collapse; repeat scroll left top; border: none;"> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);">90 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);">120 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(120deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);">180 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(180deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -<tr> -<td style="height: 25mm; width: 135mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);">210 degrees </td> -<td> </td> -<td style="height: 25mm; width: 10mm; background-image: -moz-linear-gradient(210deg, red, orange, yellow, green, blue, indigo, violet);"> </td> -</tr> -</table> - - - -<div class="rounded text"> -<p>Linear and radial gradients are not specified in the CSS2 specification. The CSS3 draft specification gives a way of outputting gradients, but currently this is not supported by any browser.</p> -<p>Mozilla (Firefox) has developed its own way of producing gradients, which approximates to the CSS3 draft specification: </p> -<ul> -<li><i>-moz-linear-gradient</i> </li> -<li><i>-moz-repeating-linear-gradient</i></li> -<li><i>-moz-radial-gradient</i> and </li> -<li><i>-moz-repeating-radial-gradient</i></li> -</ul> -<p>WebKit (Safari, Chrome etc.) have a separate way of defining gradients using <i>-webkit-gradient</i></p> -<p>Microsoft (IE) does not support any such method of specifying gradients, but does have a function <i>filter: progid:DXImageTransform.Microsoft.gradient()</i> </p> -<p>When writing HTML for cross-browser compatibility, it is common to see something like this in a stylesheet:</p> -<p class="code"> -background: #999999; /* for non-css3 browsers */<br /> -filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#cccccc\', endColorstr=\'#000000\'); /* for IE */<br /> -background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#000000)); /* for webkit browsers */<br /> -background: -moz-linear-gradient(top, #cccccc, #000000); /* for firefox 3.6+ */<br /> -</p> - - - -<p>mPDF versions <= 5.0 supported a custom style property <i>background-gradient</i> which accepted both linear and radial gradients. These continue to be supported (and both old and new forms can be used together); note the differences:</p> -<ul> -<li>mPDF background-gradients are output underneath background-images, and both can be specified; whereas the new CSS3/Mozilla-type gradients are defined as a type of background-image</li> -<li>CSS3/Mozilla gradients support multiple colour-stops, opacity, repeating-gradients, and a greater number of options for defining the gradient axis (linear gradients) or shape and extent (radial gradients)</li> -</ul> - -<p>mPDF will attempt to parse a CSS stylesheet written for cross-browser compatibility:</p> -<ul> -<li>parse and support <i>-moz</i> type gradients</li> -<li>parse and support CSS3 gradient syntax</li> -<li>ignore <i>-webkit</i> syntax gradients</li> -</ul> - - -<p>More details can be found at:</p> -<ul> -<li>Mozilla linear - <a href="https://developer.mozilla.org/en/CSS/-moz-linear-gradient">https://developer.mozilla.org/en/CSS/-moz-linear-gradient</a></li> -<li>Mozilla radial - <a href="https://developer.mozilla.org/en/CSS/-moz-radial-gradient">https://developer.mozilla.org/en/CSS/-moz-radial-gradient</a></li> -<li>Mozilla gradients use - <a href="https://developer.mozilla.org/en/Using_gradients">https://developer.mozilla.org/en/Using_gradients</a></li> -<li>CSS3 linear gradients - <a href="http://dev.w3.org/csswg/css3-images/#linear-gradients">http://dev.w3.org/csswg/css3-images/#linear-gradients</a></li> -<li>CSS3 radial gradients - <a href="http://dev.w3.org/csswg/css3-images/#radial-gradients">http://dev.w3.org/csswg/css3-images/#radial-gradients</a></li> -<li>WebKit gradients - <a href="http://webkit.org/blog/175/introducing-css-gradients/">http://webkit.org/blog/175/introducing-css-gradients/</a></li> -</ul> -</div> - - - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Repeating gradients</div> - -<p class="code"> -background: repeating-linear-gradient(red, blue 20px, red 40px); -<br /> <br /> -background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px); -</p> - -<div style="float: right; width: 250px; height: 150px; background: -moz-repeating-linear-gradient(top left -45deg, red, red 10px, rgba(255,255,255,0) 10px, rgba(255,255,255,0) 20px);"> </div> - -<div style="float: left; width: 250px; height: 150px; background: repeating-linear-gradient(red, blue 20px, red 40px);"> </div> -<br style="clear: both;" /> -<br /> -<br /> - -<p class="code"> -background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px); -<br /> <br /> -background: repeating-radial-gradient(red, blue 20px, red 40px); -</p> -<div style="float: right; width: 250px; height: 150px; background: repeating-radial-gradient(red, blue 20px, red 40px);"> </div> - -<div style="float: left; width: 250px; height: 150px; background: repeating-radial-gradient(20px 30px, circle farthest-side, red, yellow, green 10px, yellow 15px, red 20px);"> </div> -<br style="clear: both;" /> - - -<pagebreak /> - - -<h2>Radial gradients</h2> - -<div style="float: right; width: 250px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8; -border-radius: 155px / 100px; --moz-border-radius: 155px / 100px; -box-shadow: 10px 10px 25px #CCC; --moz-box-shadow: 5px 5px 25px #CCC; -background-image: -moz-radial-gradient(70% 30%, ellipse , #ffffff 0%, #F56991 50%, #8A2624 100%);"> </div> - - -<div style="float: left; width: 150px; height: 150px; padding: 15px; background: #F56991; color: #E8F3F8; -border-radius: 100px; --moz-border-radius: 100px; -box-shadow: 10px 10px 25px #CCC; --moz-box-shadow: 5px 5px 25px #CCC; -background-image: -moz-radial-gradient(70% 30%, circle , #ffffff 0%, #E56991 50%, #8A2624 100%);"> </div> -<br style="clear: both;" /> - - -<div style="float: right; width: 150px; height: 150px; border: 0.2mm solid black; -background: radial-gradient(bottom left, farthest-side, red, blue 50px, pink); -background-image: -moz-radial-gradient(red, yellow, #1E90FF); -background: -webkit-gradient(linear, left bottom, left top, color-stop(0.48, rgb(107,14,86)), color-stop(0.74, rgb(140,41,112)), color-stop(0.87, rgb(168,70,146)));"> </div> - -<div style="float: left; width: 150px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(red 5%, yellow 25%, #1E90FF 50%);"> </div> -<br style="clear: both;" /> - -<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, circle, red, yellow, #1E90FF);"> </div> - -<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(bottom left, ellipse, red, yellow, #1E90FF);"> </div> -<br style="clear: both;" /> - -<div style="float: right; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse closest-side, red, yellow 10%, #1E90FF 50%, white);"> </div> - -<div style="float: left; width: 300px; height: 150px; border: 0.2mm solid black; background-image: -moz-radial-gradient(ellipse farthest-corner, red, yellow 10%, #1E90FF 50%, white);"> </div> -<br style="clear: both;" /> - - -<p style="background-image: -moz-radial-gradient(center , red, orange, yellow, green, blue, indigo, violet);"> <br /> <br /> <br /> <br /> <br /> <br /> </p> - -<p style="background-image: -moz-radial-gradient(center , circle closest-side, blue 0%, red 100%);"> <br /> <br /> <br /> <br /> <br /> </p> - - - - -<pagebreak /> - - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Gradient Image mask</div> - -<div class="rounded text">Gradients (linear or radial) can also be used to produce \'masks\' for images. The same syntax is used as for background gradients (e.g. -moz-linear-gradient) but is set using a custom mPDF style: <i>gradient-mask</i>. The rgba() method for defining colours is used: colours are ignored, but the opacity value is used to mask the image.</div> - -<p class="code"><img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<br /><br /><img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<br /><br /><img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" /> -</p> - -<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 30%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<img src="windmill.jpg" style="gradient-mask: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));" /> -<img src="windmill.jpg" style="gradient-mask: -moz-linear-gradient(left, rgba(0,0,0,0) , rgba(0,0,0,1) 50% , rgba(0,0,0,0) 100%);" /> - - -<br /> - - - - -<pagebreak /> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image orientation</div> - -<div class="rounded text">Images can be rotated using a custom mPDF HTML attribute: rotate. mPDF now also supports the draft CSS3 property of image-orientation. Rotation can be expressed in degrees, radians or grad units; it is corrected if necessary to an orthogonal rotation i.e. 90, 180 or 270 degrees. NB This does not work on background-images.</div> -<p class="code"><img src="tiger2.png" style="image-orientation: -90deg" width="100" /> -<br /> -<img src="tiger2.png" style="image-orientation: 3.14159rad" width="100" /> -</p> - -<img src="tiger2.png" width="100" /> -<img src="tiger2.png" style="image-orientation: 75deg;" width="100" /> -<img src="tiger2.png" style="image-orientation: 180deg; image-resolution: 300dpi; " width="100" /> -<img src="tiger2.png" style="image-orientation: -90deg" width="100" /> - - -<br /> - -<br /> -<br /> -<br /> - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Image resolution</div> - - -<div class="rounded text">Image files (which do not have an output width or height specified) are displayed in mPDF at the default resolution set by the variable $mpdf->img_dpi. This can be overridden using the draft CSS3 property \'image-resolution\', which can be applied to <IMG> or background-images. -<br /> -The next 3 image files are identical (300px x 300px) but they have been saved with a different specified resolution: the first at 96dpi, the second at 300dpi. -<br /> -NB When used in combination with \'from-image\', a specified resolution is only used if the image does not have an intrinsic resolution. Only JPG, PNG and BMP files store a specified DPI resolution in the file.</div> - -<p class="code"><img src="tiger300px300dpi.png" style="image-resolution: from-image;" /> -<br /><img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" /> -<br /><img src="tiger300px96dpi.png" style="image-resolution: from-image;" /></p> - -<img src="tiger300px300dpi.png" style="image-resolution: from-image;" /> -<img src="tiger300px300dpi.png" style="image-resolution: 150dpi;" /> -<img src="tiger300px96dpi.png" style="image-resolution: from-image;" /> -<br /> <br /> - - - -<pagebreak /> - -<div class="rounded text">Image resolution can also be applied to a background-image. This can be used as an alternative to the custom mPDF style property - \'background-image-resize\'</div> - -<p class="code"><div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"></p> -<div height="300px" width="300px" style="background: #FFCCEE url(tiger300px96dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;">Hallo<br />world -</div> - -<br /> - -<p class="code"><div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"></p> -<div height="300px" width="300px" style="background-image: url(tiger300px300dpi.png); background-image-resolution: from-image; border: 0.2mm solid black;"> -</div> - - - -<br /> - - -<pagebreak /> - - - -<div style="font-family: Arial; font-size: 18pt; color: rgb(49,124,209)">Mixed effects</div> - - -<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 90px;background-color: #00f200 ; "> -<div style="padding: 15px; background: -moz-linear-gradient(top right, red, orange, yellow, green, blue, indigo, violet); border-radius: 75px; "> -<div style="padding: 15px; background-gradient: linear #07cdde #00f200 0 0 0.5 1; border-radius: 60px; "> -<div style="padding: 15px; background: url(flowers-pattern.jpg) repeat right; border-radius: 45px; background-image-resolution: 180dpi; "> -<div style="padding: 15px; background: -moz-linear-gradient(left, red, orange, yellow, green, blue, indigo, violet); border-radius: 30px; "> -<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 180dpi; "> -Hallo World -</div> -<div style="padding: 15px; background: url(alpha3.png) repeat top left; border-radius: 15px; background-image-resolution: 360dpi; "> -Hallo World -</div> -</div> -</div> -</div> -</div> -</div> - -<br /> - -<div style="background-color:#FF0000 ; width:180px; background-image: -moz-radial-gradient(center, ellipse closest-side, rgba(255,255,255,1), rgba(255,255,255,1) 70%, rgba(255,255,255,0) 90%, rgba(255,255,255,0));"> -<img src="tux.svg" width="180" /> -</div> - -'; - -//============================================================== -if ($_REQUEST['html']) { echo $html; exit; } -if ($_REQUEST['source']) { - $file = __FILE__; - header("Content-Type: text/plain"); - header("Content-Length: ". filesize($file)); - header("Content-Disposition: attachment; filename='".$file."'"); - readfile($file); - exit; -} - -//============================================================== -$mpdf->WriteHTML($html); - -//============================================================== -//============================================================== -// OUTPUT -$mpdf->Output(); exit; - - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example57_new_mPDF_v5-3_active_forms.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example57_new_mPDF_v5-3_active_forms.php deleted file mode 100644 index 2427f5a6f65040e9dda26470964b6ed048a79463..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example57_new_mPDF_v5-3_active_forms.php +++ /dev/null @@ -1,233 +0,0 @@ -<?php - - -include("../mpdf.php"); - -$mpdf=new mPDF(''); - -//============================================================== - -$html = ' -<style> -textarea { -} -input { -} -select { - font-family: arialunicodems -} -</style> -<body> -<h2>Active Forms</h2> - -<form action="http://127.0.0.1/MPDF1.com/common/mpdf/examples/formsubmit.php" method="post"> -<b>Input Text</b> -<input type="text" size="90" name="inputfield" value="" title="The title attribute works like a tool-tip" /> -<br /><br /> - -<b>Readonly</b> -<input type="text" size="90" name="readonlyfield" value="Read-only field. The value will be exported on submit" title="The title does not do anything if the field is read-only" readonly="readonly" /> -<br /><br /> - -<b>Disabled</b> -<input type="text" size="90" name="disabledfield" value="Disabled field. The value will not be exported on submit" title="The title does not do anything if the field is disabled." disabled="disabled" /> -<br /><br /> - -<b>Required</b> -<input type="text" size="90" name="requiredfield" value="" title="This field must be entered before you can submit." required="required" /> -<br /><br /> - -<b>Hidden</b> -<input type="hidden" name="hiddenfield" value="value_of_hidden_field"> -<br /><br /> - -<b>Input Password</b> -<input type="password" size="40" name="password" value="mysecretpassword" title="This field is set to act as a password field." > -<br /><br /> - -<b>Calculations</b> -<input type="text" size="20" name="maths1" value="0" onChange="var a = this.getField(\'maths1\').value; -var b = this.getField(\'maths2\').value; -this.getField(\'maths3\').value = a + b; -" /> + -<input type="text" size="20" name="maths2" value="0" onChange="var a = this.getField(\'maths1\').value; -var b = this.getField(\'maths2\').value; -this.getField(\'maths3\').value = a + b; -" /> = -<input type="text" size="20" name="maths3" value="" readonly="readonly"/> -<br /><br /> - - -<b>Textarea</b> -<textarea name="textareafield" spellcheck="true" rows="5" cols="80" wrap="virtual" title="Textarea tooltip">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> - - -<b>First language</b> -<select name="first_language" editable="editable" onChange=" -var choice = this.getField(\'first_language\').value; -this.getField(\'first_language_display\').value = choice; -"> -<option value="" >- Please select or type in -</option> -<option value="Arabic" >العربية</option> -<option value="Bulgarian" >български език</option> -<option value="Chinese" >汉语</option> -<option value="Czech" >česky</option> -<option value="English" >English</option> -<option value="French" >Français</option> -<option value="Greek" >Ελληνικά</option> -<option value="Japanese" >日本語</option> -<option value="Latvian" >Latviešu valoda</option> -<option value="Russian" >Русско</option> -<option value="Spanish" >Español</option> -<option value="Turkish" >Türkçe</option> -</select> - - -You have selected: <input type="text" size="20" name="first_language_display" value="" readonly="readonly"/> - -<br /><br /> - - -<div> -<b>Spoken language(s)</b><br /> -<select size="6" multiple="multiple" name="spoken_languages"> -<option value="Arabic" >العربية</option> -<option value="Bulgarian" >български език</option> -<option value="Chinese" >汉语</option> -<option value="Czech" >česky</option> -<option value="English" selected="selected">English</option> -<option value="French" >Français</option> -<option value="Greek" >Ελληνικά</option> -<option value="Japanese" >日本語</option> -<option value="Latvian" >Latviešu valoda</option> -<option value="Russian" >Русско</option> -<option value="Spanish" >Español</option> -<option value="Turkish" >Türkçe</option> -</select> -</div> -<br /><br /> - - - -<b>How many languages do you speak?</b> -<input type="radio" name="num_languages" value="1" checked="checked" > One -<input type="radio" name="num_languages" value="2" > Two -<input type="radio" name="num_languages" value="3" > Three -<input type="radio" name="num_languages" value="4" > Four -<input type="radio" name="num_languages" value="5" > Five + - -<br /><br /> - - -<input type="checkbox" name="email" value="email_subscrbe" checked="checked" /> Please send me regular information by e-mail<br> -<input type="checkbox" name="phone" value="phone-me" disabled="disabled" /> Please phone me (not available at present)<br> -<input type="checkbox" name="subscribe" value="newsletter_subscribe" /> Please subscribe me to the Newsletter -<br /><br /> - -<br /><br /> - -Click this button to see Javascript in action: -<input type="image" name="imageButton" value="imagesubmitted" src="goto.gif" title="Click to run javascript" onClick=" -var npass = this.getField(\'password\').value; -app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\'); -var nButton = app.alert({ -cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\', -cTitle: \'A message from A. C. Robat\', -nIcon: 2, nType: 2 -}); -if ( nButton == 4 ) { -this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\'; -} -" /> - -<br /><br /> - -<input type="submit" name="disabled_submit" value="Disabled" disabled="disabled" title="This Submit button is disabled" /> - -<input type="reset" name="resetfield" value="Reset" /> - -<input type="submit" name="submit" value="Submit" title="Click here to submit" /> - -<input type="submit" name="submit_in_Turkish" value="Submit (Türkçe)" title="Click here to submit in Türkçe" /> - -<input type="button" name="javascriptButton" value="Javascript Button" onClick=" -var npass = this.getField(\'password\').value; -app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\'); -var nButton = app.alert({ -cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\', -cTitle: \'A message from A. C. Robat\', -nIcon: 2, nType: 2 -}); -if ( nButton == 4 ) { -this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\'; -} -" /> -<br /><br /> - - -</form> -'; - - -//============================================================== -if ($_REQUEST['html']) { echo $html; exit; } -if ($_REQUEST['source']) { - $file = __FILE__; - header("Content-Type: text/plain"); - header("Content-Length: ". filesize($file)); - header("Content-Disposition: attachment; filename='".$file."'"); - readfile($file); - exit; -} - -//============================================================== -$mpdf->useActiveForms = true; - -/* -// Try playing around with these (these are also in config.php) -$mpdf->formUseZapD = false; -$mpdf->formSubmitNoValueFields = true; - -$mpdf->formExportType = 'xfdf'; // 'html' or 'xfdf' -$mpdf->formSelectDefaultOption = true; // for Select drop down box; if no option is explicitly maked as selected, - // this determines whether to select 1st option (as per browser) - // - affects whether "required" attribute is relevant -$mpdf->form_border_color = '0.0 0.820 0.0'; -$mpdf->form_background_color = '0.941 0.941 0.941'; -$mpdf->form_border_width = '1'; -$mpdf->form_border_style = 'S'; - -$mpdf->form_radio_color = '0.0 0.820 0.0'; -$mpdf->form_radio_background_color = '0.941 0.5 0.5'; - -$mpdf->form_button_border_color = '0.0 0.820 0.0'; -$mpdf->form_button_background_color = '0.941 0.941 0.941'; -$mpdf->form_button_border_width = '1'; -$mpdf->form_button_border_style = 'S'; -*/ - -$mpdf->WriteHTML($html); - -//============================================================== -// JAVASCRIPT FOR WHOLE DOCUMENT -$mpdf->SetJS(' -var dialogTitle = "Enter details"; -var defaultAnswer = ""; -var reply = app.response("This is javascript set to run when the document opens. Enter value for first field", dialogTitle, defaultAnswer); -if (reply != null) { -this.getField("inputfield").value = reply; -} -'); -//============================================================== -// OUTPUT -$mpdf->Output(); exit; - - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php deleted file mode 100644 index c143d21fa3d17849fe84b2fc942618543db2909d..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example57_new_mPDF_v5-3_active_forms_b.php +++ /dev/null @@ -1,233 +0,0 @@ -<?php - - -include("../mpdf.php"); - -$mpdf=new mPDF(''); - -//============================================================== - -$html = ' -<style> -textarea { -} -input { -} -select { - font-family: arialunicodems -} -</style> -<body> -<h2>Active Forms</h2> - -<form action="http://127.0.0.1/MPDF1.com/common/mpdf/examples/formsubmit.php" method="post"> -<b>Input Text</b> -<input type="text" size="90" name="inputfield" value="" title="The title attribute works like a tool-tip" /> -<br /><br /> - -<b>Readonly</b> -<input type="text" size="90" name="readonlyfield" value="Read-only field. The value will be exported on submit" title="The title does not do anything if the field is read-only" readonly="readonly" /> -<br /><br /> - -<b>Disabled</b> -<input type="text" size="90" name="disabledfield" value="Disabled field. The value will not be exported on submit" title="The title does not do anything if the field is disabled." disabled="disabled" /> -<br /><br /> - -<b>Required</b> -<input type="text" size="90" name="requiredfield" value="" title="This field must be entered before you can submit." required="required" /> -<br /><br /> - -<b>Hidden</b> -<input type="hidden" name="hiddenfield" value="value_of_hidden_field"> -<br /><br /> - -<b>Input Password</b> -<input type="password" size="40" name="password" value="mysecretpassword" title="This field is set to act as a password field." > -<br /><br /> - -<b>Calculations</b> -<input type="text" size="20" name="maths1" value="0" onChange="var a = this.getField(\'maths1\').value; -var b = this.getField(\'maths2\').value; -this.getField(\'maths3\').value = a + b; -" /> + -<input type="text" size="20" name="maths2" value="0" onChange="var a = this.getField(\'maths1\').value; -var b = this.getField(\'maths2\').value; -this.getField(\'maths3\').value = a + b; -" /> = -<input type="text" size="20" name="maths3" value="" readonly="readonly"/> -<br /><br /> - - -<b>Textarea</b> -<textarea name="textareafield" spellcheck="true" rows="5" cols="80" wrap="virtual" title="Textarea tooltip">Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. Quisque viverra. Etiam id libero at magna pellentesque aliquet. Nulla sit amet ipsum id enim tempus dictum. </textarea> -<br /><br /> - - -<b>First language</b> -<select name="first_language" editable="editable"> -<option value="" >- Please select or type in -</option> -<option value="Arabic" >العربية</option> -<option value="Bulgarian" >български език</option> -<option value="Chinese" >汉语</option> -<option value="Czech" >česky</option> -<option value="English" >English</option> -<option value="French" >Français</option> -<option value="Greek" >Ελληνικά</option> -<option value="Japanese" >日本語</option> -<option value="Latvian" >Latviešu valoda</option> -<option value="Russian" >Русско</option> -<option value="Spanish" >Español</option> -<option value="Turkish" >Türkçe</option> -</select> - - -You have selected: <input type="text" size="20" name="first_language_display" value="" readonly="readonly" onCalculate=" -var choice = this.getField(\'first_language\').value; -this.getField(\'first_language_display\').value = choice; -"/> - -<br /><br /> - - -<div> -<b>Spoken language(s)</b><br /> -<select size="6" multiple="multiple" name="spoken_languages"> -<option value="Arabic" >العربية</option> -<option value="Bulgarian" >български език</option> -<option value="Chinese" >汉语</option> -<option value="Czech" >česky</option> -<option value="English" selected="selected">English</option> -<option value="French" >Français</option> -<option value="Greek" >Ελληνικά</option> -<option value="Japanese" >日本語</option> -<option value="Latvian" >Latviešu valoda</option> -<option value="Russian" >Русско</option> -<option value="Spanish" >Español</option> -<option value="Turkish" >Türkçe</option> -</select> -</div> -<br /><br /> - - - -<b>How many languages do you speak?</b> -<input type="radio" name="num_languages" value="1" checked="checked" > One -<input type="radio" name="num_languages" value="2" > Two -<input type="radio" name="num_languages" value="3" > Three -<input type="radio" name="num_languages" value="4" > Four -<input type="radio" name="num_languages" value="5" > Five + - -<br /><br /> - - -<input type="checkbox" name="email" value="email_subscrbe" checked="checked" /> Please send me regular information by e-mail<br> -<input type="checkbox" name="phone" value="phone-me" disabled="disabled" /> Please phone me (not available at present)<br> -<input type="checkbox" name="subscribe" value="newsletter_subscribe" /> Please subscribe me to the Newsletter -<br /><br /> - -<br /><br /> - -Click this button to see Javascript in action: -<input type="image" name="imageButton" value="imagesubmitted" src="goto.gif" title="Click to run javascript" onClick=" -var npass = this.getField(\'password\').value; -app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\'); -var nButton = app.alert({ -cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\', -cTitle: \'A message from A. C. Robat\', -nIcon: 2, nType: 2 -}); -if ( nButton == 4 ) { -this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\'; -} -" /> - -<br /><br /> - -<input type="submit" name="disabled_submit" value="Disabled" disabled="disabled" title="This Submit button is disabled" /> - -<input type="reset" name="resetfield" value="Reset" /> - -<input type="submit" name="submit" value="Submit" title="Click here to submit" /> - -<input type="submit" name="submit_in_Turkish" value="Submit (Türkçe)" title="Click here to submit in Türkçe" /> - -<input type="button" name="javascriptButton" value="Javascript Button" onClick=" -var npass = this.getField(\'password\').value; -app.alert(\'Value of password field is: \\\'\' + npass + \'\\\'\'); -var nButton = app.alert({ -cMsg: \'Do you want to change the input text field to: T\u00f6rkylempij\u00e4?\', -cTitle: \'A message from A. C. Robat\', -nIcon: 2, nType: 2 -}); -if ( nButton == 4 ) { -this.getField(\'inputfield\').value = \'T\u00f6rkylempij\u00e4\'; -} -" /> -<br /><br /> - - -</form> -'; - - -//============================================================== -if ($_REQUEST['html']) { echo $html; exit; } -if ($_REQUEST['source']) { - $file = __FILE__; - header("Content-Type: text/plain"); - header("Content-Length: ". filesize($file)); - header("Content-Disposition: attachment; filename='".$file."'"); - readfile($file); - exit; -} - -//============================================================== -$mpdf->useActiveForms = true; - -/* -// Try playing around with these (these are also in config.php) -$mpdf->formUseZapD = false; -$mpdf->formSubmitNoValueFields = true; - -$mpdf->formExportType = 'xfdf'; // 'html' or 'xfdf' -$mpdf->formSelectDefaultOption = true; // for Select drop down box; if no option is explicitly maked as selected, - // this determines whether to select 1st option (as per browser) - // - affects whether "required" attribute is relevant -$mpdf->form_border_color = '0.0 0.820 0.0'; -$mpdf->form_background_color = '0.941 0.941 0.941'; -$mpdf->form_border_width = '1'; -$mpdf->form_border_style = 'S'; - -$mpdf->form_radio_color = '0.0 0.820 0.0'; -$mpdf->form_radio_background_color = '0.941 0.5 0.5'; - -$mpdf->form_button_border_color = '0.0 0.820 0.0'; -$mpdf->form_button_background_color = '0.941 0.941 0.941'; -$mpdf->form_button_border_width = '1'; -$mpdf->form_button_border_style = 'S'; -*/ - -$mpdf->WriteHTML($html); - -//============================================================== -// JAVASCRIPT FOR WHOLE DOCUMENT -$mpdf->SetJS(' -var dialogTitle = "Enter details"; -var defaultAnswer = ""; -var reply = app.response("This is javascript set to run when the document opens. Enter value for first field", dialogTitle, defaultAnswer); -if (reply != null) { -this.getField("inputfield").value = reply; -} -'); -//============================================================== -// OUTPUT -$mpdf->Output(); exit; - - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example58_new_mPDF_v5-4_features.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/example58_new_mPDF_v5-4_features.php deleted file mode 100644 index a98f79595ebe739657d9f1781f4d6c9e0a55cb76..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/example58_new_mPDF_v5-4_features.php +++ /dev/null @@ -1,547 +0,0 @@ -<?php - -ini_set("memory_limit","64M"); - -include("../mpdf.php"); - -$mpdf=new mPDF(''); - - -//============================================================== - -$html = ' -<style> -.gradient { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - box-shadow: 0.3em 0.3em #888888; -} -.rounded { - border:0.1mm solid #220044; - background-color: #f0f2ff; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - border-radius: 2mm; - background-clip: border-box; -} -h4 { - font-weight: bold; - margin-top: 1em; - margin-bottom: 0.3em; - margin-top: 0; -} -div.text { - padding:0.8em; - margin-bottom: 0.7em; -} -p { margin: 0.25em 0; } -.code { - font-family: monospace; - font-size: 9pt; - background-color: #d5d5d5; - margin: 1em 1cm; - padding: 0 0.3cm; - border:0.2mm solid #000088; - box-shadow: 0.3em 0.3em #888888; -} -table { - overflow: visible; - empty-cells: hide; - border:1px solid #000000; - font-family: sans-serif; - font-size: 10pt; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; -} -td, th { - border:1px solid #000000; - text-align: left; - font-weight: normal; -} -td.markedcell { - text-decoration: line-through; - color: #CC0000; -} -td.underlinedcell { - text-decoration: underline; - color: #CC0000; -} -td.rotatedcell { - text-decoration: line-through; - color: #CC0000; - text-rotate: 45; -} -td.cost { text-align: right; } -caption.tablecaption { - font-family: sans-serif; - font-weight: bold; - border: none; - caption-side: top; - margin-bottom: 0; - text-align: center; -} -u.doubleu { - text-decoration: none; - border-bottom: 3px double #000088; -} -a.reddashed { - text-decoration: none; - border: 1px dashed #880000; -} -.shadowtitle { - height: 8mm; - background-color: #EEDDFF; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - padding: 0.8em; - padding-left: 3em; - font-family:sans; - font-size: 26pt; - font-weight: bold; - border: 0.2mm solid white; - border-radius: 0.2em; - box-shadow: 0 0 2em 0.5em rgba(0,0,255,0.9); - color: #AAAACC; - text-shadow: 0.03em 0.03em #666, 0.05em 0.05em rgba(127,127,127,0.5), -0.015em -0.015em white; -} -h3 { - margin: 3em 0 2em -15mm; - background-color: #EEDDFF; - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - padding: 0.5em; - padding-left: 3em; - width: 50%; - font-family:sans; - font-size: 16pt; - font-weight: bold; - border-left: none; - border-radius: 0 2em 2em 0; - box-shadow: 0 0 2em 0.5em rgba(255,0,0,1); - text-shadow: 0.05em 0.04em rgba(127,127,127,0.5); -} -.css { - font-family: arial; - font-style: italic; - color: #000088; -} -table.zebra tbody tr:nth-child(2n+1) td { background-color: rgba(255,255,127,0.6); } -table.zebra tbody tr:nth-child(2n+1) th { background-color: rgba(255,255,127,0.6); } -table.zebra thead tr { background-color: #FFBBFF; } -table.zebra tfoot tr { background-color: #BBFFFF; } - - -</style> -<body> - - -<div class="shadowtitle">New Features in mPDF v5.4</div> - - -<h3>Bookmark styles<bookmark content="Bookmark styles" level="0" /></h3> -<div> -<p>Bookmarks can be styled by adding code as below to your script. You can define a colour (array of RGB) and/or a font-style (B, I, or BI) for each level (starting at 0). Results may depend on the PDF Reader you are using.</p> -<p class="code"> -$this->bookmarkStyles = array(<br /> - 0 => array(\'color\'=> array(0,64,128), \'style\'=>\'B\'),<br /> - 1 => array(\'color\'=> array(128,0,0), \'style\'=>\'\'),<br /> - 2 => array(\'color\'=> array(0,128,0), \'style\'=>\'I\'),<br /> -); -</p> -</div> - -<h3>Embedded SVG code<bookmark content="Embedded SVG code" level="0" /></h3> -<p>SVG Images can be embedded in your HTML code. This is formally part of the XHTML specification and is supported by IE9+ and most other browsers.</p> -<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 400 200" width="400" height="200"> - <circle cx="130" cy="100" r="80" stroke="black" stroke-width="1" fill="red" /> - <circle cx="200" cy="100" r="80" stroke="black" stroke-width="1" fill="blue" /> -</svg> -<p class="code"> -<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 200 200" width="200" height="200"> <br /> - <circle cx="100" cy="50" r="40" stroke="black" stroke-width="1" fill="red" /><br /> - <circle cx="130" cy="50" r="40" stroke="black" stroke-width="1" fill="blue" /><br /> -</svg> -</p> - - -<h3>Improved CSS support<bookmark content="Improved CSS support" level="0" /></h3> -<div class="gradient text"> -<p><span class="css">border-radius</span> is now supported on fixed/absolute-positioned block elements.</p> -<p><span class="css">visibility</span> can be set on any block-style element e.g. DIV,P or images IMG as: visible|hidden|printonly|screenonly</p> -<p><span class="css">background-color</span> now supports rgba() and cmyka() alpha transparency formats in tables.</p> -<p>Color, underline and strike-through are now supported in table cells, including with rotated text (see example below of spread table)</p> -<p><span class="css">page-break-after: left|right|always</span> is supported on all block-style elements and tables</p> -<p><span class="css">text-transform: capitalize|uppercase|lowercase</span> is supported in table cells</p> -</div> - - -<div class="gradient text"> -<h4>Zebra stripes in Tables<bookmark content="Zebra stripes" level="1" /></h4> -<div> -<p><span class="css">:nth-child()</span> selector can be used in tables (on TR, TD or TH) to stripe rows or columns. Both the <i>a</i>n+<i>b</i> and odd/even forms are supported e.g.</p> - -<p class="code"> -tr:nth-child(2n+1) { background-color: rgba(255,255,127,0.6); } <i>or</i><br /> -tr:nth-child(odd) { background-color: rgba(255,255,127,0.6); } -</p> - -<table class="zebra" align="center"> -<tbody> -<tr> -<th>Row 1</th> -<td>This is data</td> -<td class="cost">167.00</td> -</tr> -<tr> -<th>Row 2</th> -<td> -<p>This is data p</p> -</td> -<td class="cost"> -<p>444.53</p> -</td> -</tr> -<tr> -<th> -<p>Row 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td class="cost">14.00</td> -</tr> -<tr> -<td> -<p>Row 4</p> -</td> -<td>This is data</td> -<td class="cost"> -<p>0.88</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td class="cost">144.00</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td class="cost">8089.00</td> -</tr> -</tbody></table> - -<p><b>Note:</b> mPDF does NOT correctly apply specificity to all CSS. The following stylesheet:</p> -<p class="code"> -table.zebra tbody tr:nth-child(2n+1) td { background-color: yellow; }<br /> -table.zebra tbody td:nth-child(odd) { background-color: blue; } -</p> -<p>should make every odd row yellow, and every odd column blue, but with the row/yellow overriding the column/blue. -In mPDF the td:nth-child(odd) trumps the plain td, so the column colour wins out. You can force the effect you want by using:</p> -<p class="code"> -table.zebra tbody tr:nth-child(2n+1) td:nth-child(1n+0) { background-color: yellow; } -</p> -<p>The :nth-child(1n+0) selector just selects every td cell.</p> - -</div> -</div> - - -<div class="gradient text"> -<p><span class="css">border</span> can now be defined on in-line elements eg SPAN</p> -<ul><li style="font-family: arial;">Cum sociis natoque <u class="doubleu">penatibus</u> et <a class="reddashed" href="#">magnis dis parturient</a> montes</li></ul> -<p><b>Note:</b> Remember that in mPDF, inside table cells, properties set on block elements are set when possible as in-line properties - so a P element inside a table with border set, will appear with a border around the text line as though it had been set on SPAN </p> -</div> - - - - -<div class="gradient text"> -<h4>Shadows<bookmark content="Shadows" level="1" /></h4> -<p><span class="css">box-shadow</span> can be defined on any block-level element (P, DIV etc). It follows the CSS3 recommendation.</p> -<p><span class="css">text-shadow</span> can be defined on any element. It follows the CSS3 recommendation, but <i>blur</i> is not supported.</p> -<p class="code"> -<span style="text-shadow: 0.03em 0.03em #666, -0.015em -0.015em white;"><br /> -<div style="box-shadow: 0.3em 0.3em #888888;"> -</p> -</div> - - -<h3>Other Enhancements<bookmark content="Other Enhancements" level="0" /></h3> - -<h4>Column Totals (Tables)<bookmark content="Column totals" level="1" /></h4> -<p>{colsum} placed in the footer of a table will automatically display the sum of that column. If the table breaks across more than one page, the sum of the values on that page will be displayed. A number following the colsum e.g. {colsum2} will force that number of decimal places to be displayed.</p> - -<table class="zebra" align="center"> -<caption class="tablecaption" align="bottom">Table caption goes here</caption> -<thead> -<tr> -<th>Header Row</th> -<td>Header Row</td> -<td>Header Row</td> -</tr> -</thead> -<tfoot> -<tr> -<th></th> -<td>Column total: (using colsum2 in {})</td> -<td class="cost"><b>{colsum2}</b></td> -</tr> -</tfoot> -<tbody> -<tr> -<th>Row 1</th> -<td>This is data</td> -<td class="cost">167.00</td> -</tr> -<tr> -<th>Row 2</th> -<td> -<p>This is data p</p> -</td> -<td class="cost"> -<p>444.53</p> -</td> -</tr> -<tr> -<th> -<p>Row 3</p> -</th> -<td> -<p>This is long data</p> -</td> -<td class="cost">14.00</td> -</tr> -<tr> -<td> -<p>Row 4</p> -</td> -<td>This is data</td> -<td class="cost"> -<p>0.88</p> -</td> -</tr> -<tr> -<td>Row 5</td> -<td>Also data</td> -<td class="cost">144.00</td> -</tr> -<tr> -<td>Row 6</td> -<td>Also data</td> -<td class="cost">8089.00</td> -</tr> -<tr> -<td>Row 7</td> -<td>Also data</td> -<td class="cost">3.00</td> -</tr> -<tr> -<td>Row 8</td> -<td>Also data</td> -<td class="cost">23.00</td> -</tr> -</tbody></table> -<br /> - -<h4>Table <span style="font-variant: small-caps">caption</span><bookmark content="Table caption" level="1" /></h4> -<p>The caption element for tables is partially supported (see example above).</p> -<p class="code"> -<caption align="top|bottom" style="caption-side: top|bottom"> -</p> -<ul> -<li>The caption must come immediately after <table>.</li> -<li>The CSS <span class="css">caption-side</span> or HTML <span class="css">align</span> attribute of top|bottom supported</li> -<li>Left or right placement are not supported.</li> -<li>The caption is handled as a separate block element brought outside the table, so: -<ul> - <li>CSS will not cascade correctly from the table</li> - <li>the width of the caption block is that of page or of the block element containing the table</li> - <li>text alignment will be to the page-width not the table width</li> - <li>if table page-break-after: always, the caption will follow the pagebreak</li> -</ul></li> -</ul> - - -<h4>Core fonts in non-core font document<bookmark content="Core fonts" level="1" /></h4> - -<p>Core fonts, which do not need to be embedded in a PDF, can now be included in a document which uses non-core fonts. The pseudo font-family names: <span style="font-family: chelvetica">chelvetica</span>, <span style="font-family: ctimes">ctimes</span> and <span style="font-family: ccourier">ccourier</span> should be used.</p> -<p class="code"> -<div style="font-family: chelvetica"> -</p> -<p>NB You could force mPDF to always use core fonts when Arial/Helvetica/Courier are specified, by editing $this->fonttrans in config_fonts.php:</p> -<p class="code"> -$this->fonttrans = array(<br /> - \'arial\' => \'chelvetica\',<br /> - \'helvetica\' => \'chelvetica\',<br /> - \'timesnewroman\' => \'ctimes\',<br /> - \'times\' => \'ctimes\',<br /> - \'couriernew\' => \'ccourier\',<br /> - \'courier\' => \'ccourier\',<br /> -... -</p> -<br /> - -<h4>Javascript in Forms<bookmark content="Javascript in Forms" level="1" /></h4> - -<p>Javascript used in (active) forms has been altered to reflect the Adobe Acrobat specification for Javascript in PDF documents.</p> -<p>textarea and input (text-types) now accept javascript as: onKeystroke, onValidate, onCalculate and onFormat. onChange is depracated but is not ignored; it works as though for onCalculate. (PS Select still accepts onChange)</p> - - -<br /> - - - -<h4>Overlapping Rows in Tables<bookmark content="Overlapping Table Rows" level="1" /></h4> -<p> Support for overlapping rowspans in tables has been improved (although probably not foolproof!)</p> -<table style="border-collapse: separate; border-spacing: 3.5mm;"> -<tr> -<td style="width: 30mm; height: 30mm; background-color: rgb(213,226,253)"> </td> -<td style="width: 30mm; height: 30mm; background-color: rgb(75,155,215)"> </td> -<td rowspan="2" style="width: 30mm; height: 63.5mm; background-color: rgb(183,225,253)"> </td> -</tr> -<tr> -<td colspan="2" rowspan="2" style="width: 63.5mm; height: 63.5mm; background-color: rgb(183,225,253)"> </td> -</tr> -<tr> -<td style="width: 30mm; height: 30mm; background-color: rgb(75,155,215)"> </td> -</tr> -</table> - -<br /> - - - -<h3>Circular Text<bookmark content="Circular Text" level="0" /></h3> -<p>Circular Text can be included in a PDF document as a custom HTML tag (or a function)</p> -<ul> -<li>top-text and/or bottom-text can be specified</li> -<li>Radius (r) and font-size (using CSS) are user-defined</li> -<li>Width and height are calculated from radius and font-size</li> -<li>Other CSS styles supported on Circular Text: border, margin, padding, color, background-color, font-family, font-size, font-weight, font-style, display, visibility, and opacity</li> -<li>space-width should be specified as an integer defining the letter-spacing as a percentage of normal (default 120)</li> -<li>char-width should be specified as an integer defining the width of each character as a percentage of normal (default 100)</li> -<li>Circular Text is displayed as though an in-line element</li> -</ul> -<p>NB If $mpdf->useKerning is true then automatic kerning will be used on Circular Text.</p> - -<p class="code"> -<textcircle r="30mm" top-text="Circular Text Circular Text" style="color: blue; font-size: 34pt; font-style: italic" /><br /><br /> -<textcircle r="30mm" space-width="120" char-width="150" top-text="&bull; Circular Text &bull;" bottom-text="Circular Text" style="background-color: #FFAAAA; border:1px solid red; padding: 0.3em; margin: 0.3em; color: #000000; font-size: 21pt; font-weight:bold; font-family: Arial" /> -</p> - -<textcircle r="30mm" top-text="Circular Text Circular Text" style="color: blue; font-size: 34pt; font-style: italic" /> - -<textcircle r="30mm" space-width="120" char-width="150" top-text="• Circular Text •" bottom-text="Circular Text" style="background-color: #FFAAAA; border:1px solid red; padding: 0.3em; margin: 0.3em; color: #000000; font-size: 21pt; font-weight:bold; font-family: Arial" /> - - - - - -<h3 style="page-break-before: left;">Spread tables<bookmark content="Spread Tables" level="0" /></h3> -<div class="gradient text"> -Setting the CSS property "overflow: visible" on a table now has the effect of cancelling resizing, and allowing tables to split columns across multiple pages. -The maximum width for a column (or group of columns set by colspan) is the page width. It is recommended to specify absolute values of width on each column (not percentages). -</div> -<br /> -<input type="button" name="javascriptButton" value="Show 2 pages" onClick="TwoPages()" /> -<input type="button" name="javascriptButton2" value="Show 1 page" onClick="OnePage()" /> - - -<br /><br /> - -<table cellPadding="9" style="font-size: 16pt;"> -<caption class="tablecaption">Periodic Table (table caption)</caption> -<thead> -<tr><th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th><th>11</th><th>12</th><th>13</th><th>14</th><th>15</th><th>16</th><th>17</th><th>18</th></tr></thead> -<tbody> -<tr> -<td>H </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> -<td></td><td></td><td></td><td></td><td>He </td> -</tr> -<tr> -<td>Li </td><td>Be </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> -<td>B </td><td>C </td><td>N </td><td>O </td><td>F </td><td>Ne </td> -</tr> -<tr> -<td>Na </td><td>Mg </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> -<td>Al </td><td>Si </td><td>P </td><td>S </td><td>Cl </td><td>Ar </td> -</tr> -<tr> -<td>K </td><td>Ca </td><td>Sc </td><td>Ti </td><td>V </td><td class="markedcell">Cr </td><td>Mn </td><td>Fe </td><td>Co </td><td>Ni </td> -<td>Cu </td><td>Zn </td><td>Ga </td><td>Ge </td><td>As </td><td>Se </td><td>Br </td><td>Kr </td> -</tr> -<tr> -<td>Rb </td><td>Sr </td><td>Y </td><td>Zr </td><td>Nb </td><td>Mo </td><td>Tc </td><td class="underlinedcell">Ru </td><td>Rh </td> -<td>Pd </td><td>Ag </td><td>Cd </td><td>In </td><td>Sn </td><td>Sb </td><td>Te </td><td>I </td><td>Xe </td> -</tr> -<tr> -<td>Cs </td><td>Ba </td><td class="rotatedcell">Lu </td><td>Hf </td><td>Ta </td><td>W </td><td>Re </td><td>Os </td><td>Ir </td><td>Pt </td> -<td>Au </td><td>Hg </td><td>Tl </td><td>Pb </td><td>Bi </td><td>Po </td><td>At </td><td>Rn </td> -</tr> -<tr> -<td>Fr </td><td>Ra </td><td> </td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> -<td></td><td></td><td></td><td></td><td></td> -</tr> -</tbody></table> - -<br /><br /> - -<div class="gradient text"> -<h4>Limitations of Spread tables<bookmark content="Limitations" level="1" /></h4> -Spread tables cannot be used with: keep-headings-with-table ($mpdf->use_kwt), table rotate, table page-break-inside:avoid, columns, -CJK (chinese-japanese-korean) or RTL (right-to-left) languages. -They will also cause problems with $mpdf->forcePortraitHeaders or $mpdf->forcePortraitMargins.<br /> -Warning: If a table row is too tall to fit on a page, mPDF will crash with an error message.<br /> -If the width settings within the table cause conflicts, it will override some of these settings. -</div> -<br /> - - -'; - -//============================================================== -if ($_REQUEST['html']) { echo $html; exit; } -if ($_REQUEST['source']) { - $file = __FILE__; - header("Content-Type: text/plain"); - header("Content-Length: ". filesize($file)); - header("Content-Disposition: attachment; filename='".$file."'"); - readfile($file); - exit; -} - -//============================================================== -$mpdf->useActiveForms = true; - -$mpdf->bookmarkStyles = array( - 0 => array('color'=> array(0,64,128), 'style'=>'B'), - 1 => array('color'=> array(128,0,0), 'style'=>''), - 2 => array('color'=> array(0,128,0), 'style'=>'I'), -); - -$mpdf->useKerning=true; // set this to improve appearance of Circular text - // must be set before the font is first loaded - -$mpdf->WriteHTML($html); - -// JAVASCRIPT FOR WHOLE DOCUMENT -$mpdf->SetJS(' -function TwoPages() { - this.layout="TwoColumnRight"; - this.zoomType = zoomtype.fitW; -} -function OnePage() { - this.layout="SinglePage"; - this.zoom = 100; -} -'); - -// OUTPUT -$mpdf->Output(); exit; - - -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/firefox-48.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/firefox-48.png deleted file mode 100644 index b982cf97903836a406b640bc76ca4de112f1d788..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/firefox-48.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/flowers-pattern.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/flowers-pattern.jpg deleted file mode 100644 index 45aaeeb6f705a0d0aed0773148be467b88dd3ca0..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/flowers-pattern.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/formsubmit.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/formsubmit.php deleted file mode 100644 index e6d8f291777e1c5935fac7e471509026e773d595..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/formsubmit.php +++ /dev/null @@ -1,94 +0,0 @@ -<?php - -echo '<'.'!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> -</head> -<body> -<h2>Submitted data from PDF Form</h2> -<p style="font-size:0.9em;">(See formsubmit.php in the Examples folder for details)</p> -'; - - -if (count($_POST)) { - // To display HTML output from PDF form - echo '<h4>HTML format data sent as POST</h4>'; - foreach($_POST AS $name=>$val) { - $t = mb_convert_encoding(PDFDocEncodingToWin1252($val), 'UTF-8', 'Windows-1252' ); // If from core fonts doc - echo '<p>PDFDocEnc: '.$name.' => '.$t.'</p>'; - } -} -else if (count($_GET)) { - // To display HTML output from PDF form - echo '<h4>HTML format data sent as GET</h4>'; - foreach($_GET AS $name=>$val) { - $t = mb_convert_encoding(PDFDocEncodingToWin1252($val), 'UTF-8', 'Windows-1252' ); // If from core fonts doc - echo '<p>PDFDocEnc: '.$name.' => '.$t.'</p>'; - } -} - -else { - $postdata = file_get_contents("php://input"); - - if ($postdata) { - echo '<h4>XFDF format data detected</h4>'; - // To parse XFDF - if (preg_match_all('/<field name="([^>]*)"\s*>\s*(<value\s*>(.*?)<\/value\s*>)\s*<\/field\s*>/s', $postdata, $m)) { - for($i=0; $i<count($m[0]); $i++) { - // if multiple values in response e.g. from multiple selected options - preg_match_all('/<value\s*>(.*?)<\/value\s*>/s', $m[2][$i], $v); - if (count($v[0])>1) { - $values = array(); - foreach($v[1] AS $val) { $values[] = $val; } - //foreach($v[1] AS $val) { $values[] = htmlspecialchars_decode($val); } - echo '<p>Field: '.$m[1][$i].' => [array of values] ('.implode(', ',$values).')</p>'; - } - else { - //echo '<p>Field: '.$m[1][$i].' => '.htmlspecialchars_decode($m[3][$i]).'</p>'; - echo '<p>Field: '.$m[1][$i].' => '.$m[3][$i].'</p>'; - } - } - } - if (preg_match_all('/<field name="([^>]*)"\s*>\s*<value\s*\/\s*>\s*<\/field\s*>/s', $postdata, $m)) { - for($i=0; $i<count($m[0]); $i++) { - echo '<p>Field: '.$m[1][$i].' => [blank]</p>'; - } - } - if (preg_match_all('/<field name="([^>]*)"\s*\/\s*>/s', $postdata, $m)) { - for($i=0; $i<count($m[0]); $i++) { - echo '<p>Field: '.$m[1][$i].' => [no value]</p>'; - } - } - - - // To display whole XFDF - //$postdata = preg_replace("/[\n\r]/", "", $postdata); - //$postdata = preg_replace('/>\s*</', ">\n<", $postdata); - //echo nl2br(htmlspecialchars($postdata)); - } - else { echo "No form data detected"; } -} - - - -echo '</body></html>'; - -exit; - -function PDFDocEncodingToWin1252($txt) { - $Win1252ToPDFDocEncoding = array( - chr(0200) => chr(0240), chr(0214) => chr(0226), chr(0212) => chr(0227), chr(0237) => chr(0230), - chr(0225) => chr(0200), chr(0210) => chr(0032), chr(0206) => chr(0201), chr(0207) => chr(0202), - chr(0205) => chr(0203), chr(0227) => chr(0204), chr(0226) => chr(0205), chr(0203) => chr(0206), - chr(0213) => chr(0210), chr(0233) => chr(0211), chr(0211) => chr(0213), chr(0204) => chr(0214), - chr(0223) => chr(0215), chr(0224) => chr(0216), chr(0221) => chr(0217), chr(0222) => chr(0220), - chr(0202) => chr(0221), chr(0232) => chr(0235), chr(0230) => chr(0037), chr(0231) => chr(0222), - chr(0216) => chr(0231) - ); - return strtr($txt, array_flip($Win1252ToPDFDocEncoding) ); -} - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/goto.gif b/~dev_rating/modules/mpdf/vendor/mpdf/examples/goto.gif deleted file mode 100644 index e7de2b10654bd86af090b4794f36befd473930cc..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/goto.gif and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img1.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/img1.png deleted file mode 100644 index fe3f4ded8b2ac7e76734ffb9bf72524a0ebfd511..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img1.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img2.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/img2.png deleted file mode 100644 index 2d142f46662ee4f5e5b05bd0f94de9d98cb0cba1..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img2.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img3.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/img3.png deleted file mode 100644 index a7a94872b3d55e6845d00b1c97f44c1b6be37ff8..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img3.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img4.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/img4.png deleted file mode 100644 index e9c3f448bf8bb890e47f648b5b6255fb2f723e01..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img4.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img5.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/img5.png deleted file mode 100644 index 1e4c5ec54291e1d57b196bba43cf7a0123ccecc6..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/img5.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/index.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/index.php deleted file mode 100644 index 869bab8cdf1b2f9b007e157afd177f6f611050bf..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/index.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -$ff = scandir('./'); - -sort($ff); -$files = array(); -foreach($ff AS $f) { - if (preg_match('/example[0]{0,1}(\d+)_(.*?)\.php/',$f,$m)) { - $num = intval($m[1]); - $files[$num] = array(ucfirst(preg_replace('/_/',' ',$m[2])), $m[0]); - } -} -echo '<html><body><h3>mPDF Example Files</h3>'; - -foreach($files AS $n=>$f) { - echo '<p>'.$n.') '.$f[0].' <a href="'.$f[1].'">PDF</a> <small><a href="show_code.php?filename='.$f[1].'">PHP</a></small></p>'; -} - -echo '</body></html>'; -exit; - - -// For PHP4 compatability -if (!function_exists('scandir')) { - function scandir($dir = './', $sort = 0) { - $dir_open = @ opendir($dir); - if (! $dir_open) - return false; - while (($dir_content = readdir($dir_open)) !== false) - $files[] = $dir_content; - if ($sort == 1) - rsort($files, SORT_STRING); - else - sort($files, SORT_STRING); - return $files; - } -} - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/klematis.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/klematis.jpg deleted file mode 100644 index b87e920c171d2cdddc91492f10a910b07c534ed2..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/klematis.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/loading.gif b/~dev_rating/modules/mpdf/vendor/mpdf/examples/loading.gif deleted file mode 100644 index e846e1d6c58796558015ffee1fdec546bc207ee8..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/loading.gif and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstyleA4.css b/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstyleA4.css deleted file mode 100644 index 460c75b7cc511f34b7ad7b41e56739faa9c776fe..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstyleA4.css +++ /dev/null @@ -1,48 +0,0 @@ - body { font-family: DejaVuSansCondensed, sans-serif; font-size: 11pt; } - p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; } - - hr { width: 70%; height: 1px; - text-align: center; color: #999999; - margin-top: 8pt; margin-bottom: 8pt; } - - a { color: #000066; font-style: normal; text-decoration: underline; - font-weight: normal; } - - ul { text-indent: 5mm; margin-bottom: 9pt; } - ol { text-indent: 5mm; margin-bottom: 9pt; } - - pre { font-family: DejaVuSansMono, monospaced; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; } - - h1 { font-weight: normal; font-size: 26pt; color: #000066; - font-family: DejaVuSansCondensed, sans-serif; margin-top: 18pt; margin-bottom: 6pt; - border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000; - text-align: ; page-break-after:avoid; } - h2 { font-weight: bold; font-size: 12pt; color: #000066; - font-family: DejaVuSansCondensed, sans-serif; margin-top: 6pt; margin-bottom: 6pt; - border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000; - text-align: ; text-transform: uppercase; page-break-after:avoid; } - h3 { font-weight: normal; font-size: 26pt; color: #000000; - font-family: DejaVuSansCondensed, sans-serif; margin-top: 0pt; margin-bottom: 6pt; - border-top: 0; border-bottom: 0; - text-align: ; page-break-after:avoid; } - h4 { font-weight: ; font-size: 13pt; color: #9f2b1e; - font-family: DejaVuSansCondensed, sans-serif; margin-top: 10pt; margin-bottom: 7pt; - font-variant: small-caps; - text-align: ; margin-collapse:collapse; page-break-after:avoid; } - h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044; - font-family: DejaVuSansCondensed, sans-serif; margin-top: 8pt; margin-bottom: 4pt; - text-align: ; page-break-after:avoid; } - h6 { font-weight: bold; font-size: 9.5pt; color: #333333; - font-family: DejaVuSansCondensed, sans-serif; margin-top: 6pt; margin-bottom: ; - text-align: ; page-break-after:avoid; } - - - .breadcrumb { - text-align: right; font-size: 8pt; font-family: DejaVuSerifCondensed, serif; color: #666666; - font-weight: bold; font-style: normal; margin-bottom: 6pt; } - - .infobox { margin-top:10pt; background-color:#DDDDBB; text-align:center; border:1px solid #880000; } - - .big { font-size: 1.5em; } - .red { color: #880000; } - .slanted { font-style: italic; } \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstylePaged.css b/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstylePaged.css deleted file mode 100644 index 4c5ff6cf54695b75dcaac7e0bb80dfdaf304073f..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstylePaged.css +++ /dev/null @@ -1,123 +0,0 @@ - @page { - size: 15cm 17cm; /* width height <length>{1,2} | auto | portrait | landscape NB 'em' and 'ex' % are not allowed */ - margin: 10%; /* % of page-box width for LR, height for TB */ - margin-header: 5mm; - margin-footer: 5mm; - margin-left: 4cm; - margin-right: 2cm; - odd-header-name: myHeader2Odd; - even-header-name: html_myHTMLHeaderEven; - odd-footer-name: html_myHTMLFooterOdd; - even-footer-name: myFooter2Even; - marks: crop; /* crop | cross | none */ - } - - @page :first { - margin-top: 5cm; /* Top margin on first page 10cm */ - } - - @page standard { - size: auto; /* auto is the default mPDF value */ - margin: 10%; /* % of page-box width for LR, height for TB */ - marks: none; /* crop | cross | none */ - } - - @page standard :first { - margin-top: 7cm; /* Top margin on first page 10cm */ - } - - @page bigsquare { - size: 15cm 20cm; - margin-left: 4cm; - marks: crop cross; /* crop | cross | none */ - background: transparent url('bg.jpg') repeat scroll 5mm 5mm; /* position inset by bleedMargin */ - } - - @page bigsquare :right { - header: html_myHTMLHeaderOdd; - footer: html_myHTMLFooterOdd; - } - - @page bigsquare :left { /* left is what mPDF calls EVEN page - right=ODD */ - header: html_myHTMLHeaderEven; - footer: html_myHTMLFooterEven; - } - - @page smallsquare { - size: 25cm 15cm; - margin-left: 4cm; - marks: crop; /* crop | cross | none */ - background-gradient: linear #c7cdde #f0f2ff 0 1 0 0.5; - } - - @page rotated { - size: landscape; - marks: none; /* crop | cross | none */ - background-color: #fff0f2; - margin-left: 3cm; - margin-right: 3cm; - } - @page rotated :first { - margin-top: 7cm; /* Top margin on first page 10cm */ - } - - h1.heading1 { color: #1188FF; - } - - h1.heading2 { color: #88FF11; - page-break-before: always; - page: standard; - } - h1.heading3 { color: #FF1188; - page-break-before: right; - } - h1.heading4 { color: #FF8811; - page-break-before: left; - page: bigsquare; - } - h1.heading5 { color: #11FF88; - page: smallsquare; - } - h1.heading6 { color: #8811FF; - page: rotated; - } - - br.paging { page-break-after: always; } - - body { font-family: DejaVuSansCondensed; font-size: 11pt; } - p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; } - - hr { width: 70%; height: 1px; - text-align: center; color: #999999; - margin-top: 8pt; margin-bottom: 8pt; } - - a { color: #000066; font-style: normal; text-decoration: underline; - font-weight: normal; } - - ul { text-indent: 5mm; margin-bottom: 9pt; } - ol { text-indent: 5mm; margin-bottom: 9pt; } - - pre { font-family: DejaVuSansMono; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; } - - h1 { font-weight: normal; font-size: 26pt; color: #000066; - font-family: DejaVuSansCondensed; margin-top: 18pt; margin-bottom: 6pt; - border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000; - text-align: ; page-break-after:avoid; } - h2 { font-weight: bold; font-size: 12pt; color: #000066; - font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: 6pt; - border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000; - text-align: ; text-transform: uppercase; page-break-after:avoid; } - h3 { font-weight: normal; font-size: 26pt; color: #000000; - font-family: DejaVuSansCondensed; margin-top: 0pt; margin-bottom: 6pt; - border-top: 0; border-bottom: 0; - text-align: ; page-break-after:avoid; } - h4 { font-weight: ; font-size: 13pt; color: #9f2b1e; - font-family: DejaVuSansCondensed; margin-top: 10pt; margin-bottom: 7pt; - text-align: ; margin-collapse:collapse; page-break-after:avoid; } - h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044; - font-family: DejaVuSansCondensed; margin-top: 8pt; margin-bottom: 4pt; - text-align: ; page-break-after:avoid; } - h6 { font-weight: bold; font-size: 9.5pt; color: #333333; - font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: ; - text-align: ; page-break-after:avoid; } - diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstyletables.css b/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstyletables.css deleted file mode 100644 index b36d69824d17406015e6489563ef6bb94705eb3c..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/mpdfstyletables.css +++ /dev/null @@ -1,124 +0,0 @@ - - body { font-family: DejaVuSansCondensed; font-size: 11pt; } - p { text-align: justify; margin-bottom: 4pt; margin-top:0pt; } - - table {font-family: DejaVuSansCondensed; font-size: 9pt; line-height: 1.2; - margin-top: 2pt; margin-bottom: 5pt; - border-collapse: collapse; } - - thead { font-weight: bold; vertical-align: bottom; } - tfoot { font-weight: bold; vertical-align: top; } - thead td { font-weight: bold; } - tfoot td { font-weight: bold; } - - thead td, thead th, tfoot td, tfoot th { font-variant: small-caps; } - - .headerrow td, .headerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - .footerrow td, .footerrow th { background-gradient: linear #b7cebd #f5f8f5 0 1 0 0.2; } - - th { font-weight: bold; - vertical-align: top; - text-align:left; - padding-left: 2mm; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - td { padding-left: 2mm; - vertical-align: top; - text-align:left; - padding-right: 2mm; - padding-top: 0.5mm; - padding-bottom: 0.5mm; - } - - th p { text-align: left; margin:0pt; } - td p { text-align: left; margin:0pt; } - - table.widecells td { - padding-left: 5mm; - padding-right: 5mm; - } - table.tallcells td { - padding-top: 3mm; - padding-bottom: 3mm; - } - - hr { width: 70%; height: 1px; - text-align: center; color: #999999; - margin-top: 8pt; margin-bottom: 8pt; } - - a { color: #000066; font-style: normal; text-decoration: underline; - font-weight: normal; } - - ul { text-indent: 5mm; margin-bottom: 9pt; } - ol { text-indent: 5mm; margin-bottom: 9pt; } - - pre { font-family: DejaVuSansMono; font-size: 9pt; margin-top: 5pt; margin-bottom: 5pt; } - - h1 { font-weight: normal; font-size: 26pt; color: #000066; - font-family: DejaVuSansCondensed; margin-top: 18pt; margin-bottom: 6pt; - border-top: 0.075cm solid #000000; border-bottom: 0.075cm solid #000000; - text-align: ; page-break-after:avoid; } - h2 { font-weight: bold; font-size: 12pt; color: #000066; - font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: 6pt; - border-top: 0.07cm solid #000000; border-bottom: 0.07cm solid #000000; - text-align: ; text-transform:uppercase; page-break-after:avoid; } - h3 { font-weight: normal; font-size: 26pt; color: #000000; - font-family: DejaVuSansCondensed; margin-top: 0pt; margin-bottom: 6pt; - border-top: 0; border-bottom: 0; - text-align: ; page-break-after:avoid; } - h4 { font-weight: ; font-size: 13pt; color: #9f2b1e; - font-family: DejaVuSansCondensed; margin-top: 10pt; margin-bottom: 7pt; - font-variant: small-caps; - text-align: ; margin-collapse:collapse; page-break-after:avoid; } - h5 { font-weight: bold; font-style:italic; ; font-size: 11pt; color: #000044; - font-family: DejaVuSansCondensed; margin-top: 8pt; margin-bottom: 4pt; - text-align: ; page-break-after:avoid; } - h6 { font-weight: bold; font-size: 9.5pt; color: #333333; - font-family: DejaVuSansCondensed; margin-top: 6pt; margin-bottom: ; - text-align: ; page-break-after:avoid; } - - .breadcrumb { - text-align: right; font-size: 8pt; font-family: DejaVuSerifCondensed; color: #666666; - font-weight: bold; font-style: normal; margin-bottom: 6pt; } - - .evenrow td, .evenrow th { background-color: #f5f8f5; } - .oddrow td, .oddrow th { background-color: #e3ece4; } - - .bpmTopic { background-color: #e3ece4; } - .bpmTopicC { background-color: #e3ece4; } - .bpmNoLines { background-color: #e3ece4; } - .bpmNoLinesC { background-color: #e3ece4; } - .bpmClear { } - .bpmClearC { text-align: center; } - .bpmTopnTail { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailC { background-color: #e3ece4; topntail: 0.02cm solid #495b4a;} - .bpmTopnTailClear { topntail: 0.02cm solid #495b4a; } - .bpmTopnTailClearC { topntail: 0.02cm solid #495b4a; } - - .bpmTopicC td, .bpmTopicC td p { text-align: center; } - .bpmNoLinesC td, .bpmNoLinesC td p { text-align: center; } - .bpmClearC td, .bpmClearC td p { text-align: center; } - .bpmTopnTailC td, .bpmTopnTailC td p { text-align: center; } - .bpmTopnTailClearC td, .bpmTopnTailClearC td p { text-align: center; } - - .pmhMiddleCenter { text-align:center; vertical-align:middle; } - .pmhMiddleRight { text-align:right; vertical-align:middle; } - .pmhBottomCenter { text-align:center; vertical-align:bottom; } - .pmhBottomRight { text-align:right; vertical-align:bottom; } - .pmhTopCenter { text-align:center; vertical-align:top; } - .pmhTopRight { text-align:right; vertical-align:top; } - .pmhTopLeft { text-align:left; vertical-align:top; } - .pmhBottomLeft { text-align:left; vertical-align:bottom; } - .pmhMiddleLeft { text-align:left; vertical-align:middle; } - - .infobox { margin-top:10pt; background-color:#DDDDBB; text-align:center; border:1px solid #880000; } - - .bpmTopic td, .bpmTopic th { border-top: 1px solid #FFFFFF; } - .bpmTopicC td, .bpmTopicC th { border-top: 1px solid #FFFFFF; } - .bpmTopnTail td, .bpmTopnTail th { border-top: 1px solid #FFFFFF; } - .bpmTopnTailC td, .bpmTopnTailC th { border-top: 1px solid #FFFFFF; } - - diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/quran282.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/quran282.jpg deleted file mode 100644 index c888872dc7b4d114f85e79b4ac121b5d84060d4f..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/quran282.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_basic.pdf b/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_basic.pdf deleted file mode 100644 index 86c4d740912d2baf248b6329672835774133b177..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_basic.pdf and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_logoheader2.pdf b/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_logoheader2.pdf deleted file mode 100644 index 946883d3f1bdc1610dedd2bc1eb684f514771128..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_logoheader2.pdf and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_orientation2.pdf b/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_orientation2.pdf deleted file mode 100644 index 84944d9b248020203d56e2173bdbd75c300d3903..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_orientation2.pdf and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_orientation3.pdf b/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_orientation3.pdf deleted file mode 100644 index c23ca314e2ec50320b117a500ecab0058d5d9d0d..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sample_orientation3.pdf and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/show_code.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/show_code.php deleted file mode 100644 index 32bc762510c0112511c513e0f38cc804638701c6..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/show_code.php +++ /dev/null @@ -1,48 +0,0 @@ -<?php - -if ($_REQUEST['filename']) { $filename = $_REQUEST['filename']; } -else { die("No file specified"); } - -include("../mpdf.php"); - -$mpdf=new mPDF('utf-8-s'); -$mpdf->debug=true; -$mpdf->tabSpaces = 6; - -$mpdf->allow_charset_conversion=true; -$mpdf->charset_in='windows-1252'; - -//============================================================== -preg_match('/example[0]{0,1}(\d+)_(.*?)\.php/',$filename,$m); -$num = intval($m[1]); -$title = ucfirst(preg_replace('/_/',' ',$m[2])); - -if (!$num || !$title) { die("Invalid file"); } -if (preg_match('/\//', $filename) || !preg_match('/\.php$/',$filename)) { die("Hacking attempt"); } - -$html = ' -<h1>mPDF</h1> -<h2>Example '.$num.'. '.$title.'</h2> -<div style="border:1px solid #555555; background-color: #DDDDDD; padding: 1em; font-size:8pt; font-family: lucidaconsole, mono;"> -'; -$lines = file($filename); - -$html .= '<pre>'; -foreach($lines AS $line) { - $html .= htmlspecialchars($line); -} -$html .= '</pre>'; -$html .= '</div>'; - -$mpdf->WriteHTML($html,2); // The 2 is important to prevent <style etc. being parsed - -$mpdf->Output(); -exit; -//============================================================== -//============================================================== -//============================================================== -//============================================================== -//============================================================== - - -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sunset.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/sunset.jpg deleted file mode 100644 index ddd5118724167cb61f98469b2c60cd5fd44317e0..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sunset.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sunsetv.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/sunsetv.jpg deleted file mode 100644 index b0f0e9fcf9a735a6bb53c33ceb0820b264dc927a..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/sunsetv.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/test.pdf b/~dev_rating/modules/mpdf/vendor/mpdf/examples/test.pdf deleted file mode 100644 index 5b89040e8139f3a28a7518027f6987e9dba2d3c3..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/test.pdf and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger deleted file mode 100644 index 0bbdd8515779b7218eda3e2101678559e01c2476..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.bmp b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.bmp deleted file mode 100644 index 5936520a44cd2545c1cacf8f5c0dc0cfe5d5480b..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.bmp and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.gif b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.gif deleted file mode 100644 index 12081da327f2579efd5fb10a954e57a70b849095..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.gif and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.jpg deleted file mode 100644 index a88e6b3a5cd2f2066cff0a09e71f22f3bff6e914..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.php b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.php deleted file mode 100644 index 9fb2aa4d08ffebe79cd447fc5045b87cef3379de..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -if ($_GET['t']=='png') { $filename = 'tiger.png'; $mime = 'png'; } -else if ($_GET['t']=='gif') { $filename = 'tiger.gif'; $mime = 'gif'; } -else if ($_GET['t']=='jpg') { $filename = 'tiger.jpg'; $mime = 'jpeg'; } -else if ($_GET['t']=='jpeg') { $filename = 'tiger.jpg'; $mime = 'jpeg'; } -else if ($_GET['t']=='wmf') { $filename = 'tiger2.wmf'; $mime = 'wmf'; } -else if ($_GET['t']=='svg') { $filename = 'tiger.svg'; $mime = 'svg'; } -else { exit; } - - -$fp = fopen($filename, 'rb'); -header("Content-Type: image/".$mime); -header("Content-Length: " . filesize($filename)); -fpassthru($fp); -fclose($fp); -exit; -?> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.png deleted file mode 100644 index 0bbdd8515779b7218eda3e2101678559e01c2476..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.svg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.svg deleted file mode 100644 index 285f41b6d77765a74d9aee86095b5fed189e0c20..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.svg +++ /dev/null @@ -1,726 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 40 580 530"> - <g transform="translate(200, 200)" style="fill-opacity: 1; fill: none;"> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-122.304 84.285C-122.304 84.285 -122.203 86.179 -123.027 86.16C-123.851 86.141 -140.305 38.066 -160.833 40.309C-160.833 40.309 -143.05 32.956 -122.304 84.285z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-118.774 81.262C-118.774 81.262 -119.323 83.078 -120.092 82.779C-120.86 82.481 -119.977 31.675 -140.043 26.801C-140.043 26.801 -120.82 25.937 -118.774 81.262z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-91.284 123.59C-91.284 123.59 -89.648 124.55 -90.118 125.227C-90.589 125.904 -139.763 113.102 -149.218 131.459C-149.218 131.459 -145.539 112.572 -91.284 123.59z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-94.093 133.801C-94.093 133.801 -92.237 134.197 -92.471 134.988C-92.704 135.779 -143.407 139.121 -146.597 159.522C-146.597 159.522 -149.055 140.437 -94.093 133.801z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-98.304 128.276C-98.304 128.276 -96.526 128.939 -96.872 129.687C-97.218 130.435 -147.866 126.346 -153.998 146.064C-153.998 146.064 -153.646 126.825 -98.304 128.276z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-109.009 110.072C-109.009 110.072 -107.701 111.446 -108.34 111.967C-108.979 112.488 -152.722 86.634 -166.869 101.676C-166.869 101.676 -158.128 84.533 -109.009 110.072z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-116.554 114.263C-116.554 114.263 -115.098 115.48 -115.674 116.071C-116.25 116.661 -162.638 95.922 -174.992 112.469C-174.992 112.469 -168.247 94.447 -116.554 114.263z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-119.154 118.335C-119.154 118.335 -117.546 119.343 -118.036 120.006C-118.526 120.669 -167.308 106.446 -177.291 124.522C-177.291 124.522 -173.066 105.749 -119.154 118.335z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-108.42 118.949C-108.42 118.949 -107.298 120.48 -107.999 120.915C-108.7 121.35 -148.769 90.102 -164.727 103.207C-164.727 103.207 -153.862 87.326 -108.42 118.949z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-128.2 90C-128.2 90 -127.6 91.8 -128.4 92C-129.2 92.2 -157.8 50.2 -177.001 57.8C-177.001 57.8 -161.8 46 -128.2 90z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-127.505 96.979C-127.505 96.979 -126.53 98.608 -127.269 98.975C-128.007 99.343 -164.992 64.499 -182.101 76.061C-182.101 76.061 -169.804 61.261 -127.505 96.979z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.172;"> - <path d="M-127.62 101.349C-127.62 101.349 -126.498 102.88 -127.199 103.315C-127.9 103.749 -167.969 72.502 -183.927 85.607C-183.927 85.607 -173.062 69.726 -127.62 101.349z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0);"> - <path d="M-129.83 103.065C-129.327 109.113 -128.339 115.682 -126.6 118.801C-126.6 118.801 -130.2 131.201 -121.4 144.401C-121.4 144.401 -121.8 151.601 -120.2 154.801C-120.2 154.801 -116.2 163.201 -111.4 164.001C-107.516 164.648 -98.793 167.717 -88.932 169.121C-88.932 169.121 -71.8 183.201 -75 196.001C-75 196.001 -75.4 212.401 -79 214.001C-79 214.001 -67.4 202.801 -77 219.601L-81.4 238.401C-81.4 238.401 -55.8 216.801 -71.4 235.201L-81.4 261.201C-81.4 261.201 -61.8 242.801 -69 251.201L-72.2 260.001C-72.2 260.001 -29 232.801 -59.8 262.401C-59.8 262.401 -51.8 258.801 -47.4 261.601C-47.4 261.601 -40.6 260.401 -41.4 262.001C-41.4 262.001 -62.2 272.401 -65.8 290.801C-65.8 290.801 -57.4 280.801 -60.6 291.601L-60.2 303.201C-60.2 303.201 -56.2 281.601 -56.6 319.201C-56.6 319.201 -37.4 301.201 -49 322.001L-49 338.801C-49 338.801 -33.8 322.401 -40.2 335.201C-40.2 335.201 -30.2 326.401 -34.2 341.601C-34.2 341.601 -35 352.001 -30.6 340.801C-30.6 340.801 -14.6 310.201 -20.6 336.401C-20.6 336.401 -21.4 355.601 -16.6 340.801C-16.6 340.801 -16.2 351.201 -7 358.401C-7 358.401 -8.2 307.601 4.6 343.601L8.6 360.001C8.6 360.001 11.4 350.801 11 345.601C11 345.601 25.8 329.201 19 353.601C19 353.601 34.2 330.801 31 344.001C31 344.001 23.4 360.001 25 364.801C25 364.801 41.8 330.001 43 328.401C43 328.401 41 370.802 51.8 334.801C51.8 334.801 57.4 346.801 54.6 351.201C54.6 351.201 62.6 343.201 61.8 340.001C61.8 340.001 66.4 331.801 69.2 345.401C69.2 345.401 71 354.801 72.6 351.601C72.6 351.601 76.6 375.602 77.8 352.801C77.8 352.801 79.4 339.201 72.2 327.601C72.2 327.601 73 324.401 70.2 320.401C70.2 320.401 83.8 342.001 76.6 313.201C76.6 313.201 87.801 321.201 89.001 321.201C89.001 321.201 75.4 298.001 84.2 302.801C84.2 302.801 79 292.401 97.001 304.401C97.001 304.401 81 288.401 98.601 298.001C98.601 298.001 106.601 304.401 99.001 294.401C99.001 294.401 84.6 278.401 106.601 296.401C106.601 296.401 118.201 312.801 119.001 315.601C119.001 315.601 109.001 286.401 104.601 283.601C104.601 283.601 113.001 247.201 154.201 262.801C154.201 262.801 161.001 280.001 165.401 261.601C165.401 261.601 178.201 255.201 189.401 282.801C189.401 282.801 193.401 269.201 192.601 266.401C192.601 266.401 199.401 267.601 198.601 266.401C198.601 266.401 211.801 270.801 213.001 270.001C213.001 270.001 219.801 276.801 220.201 273.201C220.201 273.201 229.401 276.001 227.401 272.401C227.401 272.401 236.201 288.001 236.601 291.601L239.001 277.601L241.001 280.401C241.001 280.401 242.601 272.801 241.801 271.601C241.001 270.401 261.801 278.401 266.601 299.201L268.601 307.601C268.601 307.601 274.601 292.801 273.001 288.801C273.001 288.801 278.201 289.601 278.601 294.001C278.601 294.001 282.601 270.801 277.801 264.801C277.801 264.801 282.201 264.001 283.401 267.601L283.401 260.401C283.401 260.401 290.601 261.201 290.601 258.801C290.601 258.801 295.001 254.801 297.001 259.601C297.001 259.601 284.601 224.401 303.001 243.601C303.001 243.601 310.201 254.401 306.601 235.601C303.001 216.801 299.001 215.201 303.801 214.801C303.801 214.801 304.601 211.201 302.601 209.601C300.601 208.001 303.801 209.601 303.801 209.601C303.801 209.601 308.601 213.601 303.401 191.601C303.401 191.601 309.801 193.201 297.801 164.001C297.801 164.001 300.601 161.601 296.601 153.201C296.601 153.201 304.601 157.601 307.401 156.001C307.401 156.001 307.001 154.401 303.801 150.401C303.801 150.401 282.201 95.6 302.601 117.601C302.601 117.601 314.451 131.151 308.051 108.351C308.051 108.351 298.94 84.341 299.717 80.045L-129.83 103.065z"/> - </g> - <g style="fill: rgb(204, 114, 38); stroke: rgb(0, 0, 0);"> - <path d="M299.717 80.245C300.345 80.426 302.551 81.55 303.801 83.2C303.801 83.2 310.601 94 305.401 75.6C305.401 75.6 296.201 46.8 305.001 58C305.001 58 311.001 65.2 307.801 51.6C303.936 35.173 301.401 28.8 301.401 28.8C301.401 28.8 313.001 33.6 286.201 -6L295.001 -2.4C295.001 -2.4 275.401 -42 253.801 -47.2L245.801 -53.2C245.801 -53.2 284.201 -91.2 271.401 -128C271.401 -128 264.601 -133.2 255.001 -124C255.001 -124 248.601 -119.2 242.601 -120.8C242.601 -120.8 211.801 -119.6 209.801 -119.6C207.801 -119.6 173.001 -156.8 107.401 -139.2C107.401 -139.2 102.201 -137.2 97.801 -138.4C97.801 -138.4 79.4 -154.4 30.6 -131.6C30.6 -131.6 20.6 -129.6 19 -129.6C17.4 -129.6 14.6 -129.6 6.6 -123.2C-1.4 -116.8 -1.8 -116 -3.8 -114.4C-3.8 -114.4 -20.2 -103.2 -25 -102.4C-25 -102.4 -36.6 -96 -41 -86L-44.6 -84.8C-44.6 -84.8 -46.2 -77.6 -46.6 -76.4C-46.6 -76.4 -51.4 -72.8 -52.2 -67.2C-52.2 -67.2 -61 -61.2 -60.6 -56.8C-60.6 -56.8 -62.2 -51.6 -63 -46.8C-63 -46.8 -70.2 -42 -69.4 -39.2C-69.4 -39.2 -77 -25.2 -75.8 -18.4C-75.8 -18.4 -82.2 -18.8 -85 -16.4C-85 -16.4 -85.8 -11.6 -87.4 -11.2C-87.4 -11.2 -90.2 -10 -87.8 -6C-87.8 -6 -89.4 -3.2 -89.8 -1.6C-89.8 -1.6 -89 1.2 -93.4 6.8C-93.4 6.8 -99.8 25.6 -97.8 30.8C-97.8 30.8 -97.4 35.6 -100.2 37.2C-100.2 37.2 -103.8 36.8 -95.4 48.8C-95.4 48.8 -94.6 50 -97.8 52.4C-97.8 52.4 -115 56 -117.4 72.4C-117.4 72.4 -131 87.2 -131 92.4C-131 94.705 -130.729 97.852 -130.03 102.465C-130.03 102.465 -130.6 110.801 -103 111.601C-75.4 112.401 299.717 80.245 299.717 80.245z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M-115.6 102.6C-140.6 63.2 -126.2 119.601 -126.2 119.601C-117.4 154.001 12.2 116.401 12.2 116.401C12.2 116.401 181.001 86 192.201 82C203.401 78 298.601 84.4 298.601 84.4L293.001 67.6C228.201 21.2 209.001 44.4 195.401 40.4C181.801 36.4 184.201 46 181.001 46.8C177.801 47.6 138.601 22.8 132.201 23.6C125.801 24.4 100.459 0.649 115.401 32.4C131.401 66.4 57 71.6 40.2 60.4C23.4 49.2 47.4 78.8 47.4 78.8C65.8 98.8 31.4 82 31.4 82C-3 69.2 -27 94.8 -30.2 95.6C-33.4 96.4 -38.2 99.6 -39 93.2C-39.8 86.8 -47.31 70.099 -79 96.4C-99 113.001 -112.8 91 -112.8 91L-115.6 102.6z"/> - </g> - <g style="fill: rgb(232, 127, 58);"> - <path d="M133.51 25.346C127.11 26.146 101.743 2.407 116.71 34.146C133.31 69.346 58.31 73.346 41.51 62.146C24.709 50.946 48.71 80.546 48.71 80.546C67.11 100.546 32.709 83.746 32.709 83.746C-1.691 70.946 -25.691 96.546 -28.891 97.346C-32.091 98.146 -36.891 101.346 -37.691 94.946C-38.491 88.546 -45.87 72.012 -77.691 98.146C-98.927 115.492 -112.418 94.037 -112.418 94.037L-115.618 104.146C-140.618 64.346 -125.546 122.655 -125.546 122.655C-116.745 157.056 13.509 118.146 13.509 118.146C13.509 118.146 182.31 87.746 193.51 83.746C204.71 79.746 299.038 86.073 299.038 86.073L293.51 68.764C228.71 22.364 210.31 46.146 196.71 42.146C183.11 38.146 185.51 47.746 182.31 48.546C179.11 49.346 139.91 24.546 133.51 25.346z"/> - </g> - <g style="fill: rgb(234, 140, 77);"> - <path d="M134.819 27.091C128.419 27.891 103.685 3.862 118.019 35.891C134.219 72.092 59.619 75.092 42.819 63.892C26.019 52.692 50.019 82.292 50.019 82.292C68.419 102.292 34.019 85.492 34.019 85.492C-0.381 72.692 -24.382 98.292 -27.582 99.092C-30.782 99.892 -35.582 103.092 -36.382 96.692C-37.182 90.292 -44.43 73.925 -76.382 99.892C-98.855 117.983 -112.036 97.074 -112.036 97.074L-115.636 105.692C-139.436 66.692 -124.891 125.71 -124.891 125.71C-116.091 160.11 14.819 119.892 14.819 119.892C14.819 119.892 183.619 89.492 194.819 85.492C206.019 81.492 299.474 87.746 299.474 87.746L294.02 69.928C229.219 23.528 211.619 47.891 198.019 43.891C184.419 39.891 186.819 49.491 183.619 50.292C180.419 51.092 141.219 26.291 134.819 27.091z"/> - </g> - <g style="fill: rgb(236, 153, 97);"> - <path d="M136.128 28.837C129.728 29.637 104.999 5.605 119.328 37.637C136.128 75.193 60.394 76.482 44.128 65.637C27.328 54.437 51.328 84.037 51.328 84.037C69.728 104.037 35.328 87.237 35.328 87.237C0.928 74.437 -23.072 100.037 -26.272 100.837C-29.472 101.637 -34.272 104.837 -35.072 98.437C-35.872 92.037 -42.989 75.839 -75.073 101.637C-98.782 120.474 -111.655 100.11 -111.655 100.11L-115.655 107.237C-137.455 70.437 -124.236 128.765 -124.236 128.765C-115.436 163.165 16.128 121.637 16.128 121.637C16.128 121.637 184.928 91.237 196.129 87.237C207.329 83.237 299.911 89.419 299.911 89.419L294.529 71.092C229.729 24.691 212.929 49.637 199.329 45.637C185.728 41.637 188.128 51.237 184.928 52.037C181.728 52.837 142.528 28.037 136.128 28.837z"/> - </g> - <g style="fill: rgb(238, 165, 117);"> - <path d="M137.438 30.583C131.037 31.383 106.814 7.129 120.637 39.383C137.438 78.583 62.237 78.583 45.437 67.383C28.637 56.183 52.637 85.783 52.637 85.783C71.037 105.783 36.637 88.983 36.637 88.983C2.237 76.183 -21.763 101.783 -24.963 102.583C-28.163 103.383 -32.963 106.583 -33.763 100.183C-34.563 93.783 -41.548 77.752 -73.763 103.383C-98.709 122.965 -111.273 103.146 -111.273 103.146L-115.673 108.783C-135.473 73.982 -123.582 131.819 -123.582 131.819C-114.782 166.22 17.437 123.383 17.437 123.383C17.437 123.383 186.238 92.983 197.438 88.983C208.638 84.983 300.347 91.092 300.347 91.092L295.038 72.255C230.238 25.855 214.238 51.383 200.638 47.383C187.038 43.383 189.438 52.983 186.238 53.783C183.038 54.583 143.838 29.783 137.438 30.583z"/> - </g> - <g style="fill: rgb(241, 178, 136);"> - <path d="M138.747 32.328C132.347 33.128 106.383 9.677 121.947 41.128C141.147 79.928 63.546 80.328 46.746 69.128C29.946 57.928 53.946 87.528 53.946 87.528C72.346 107.528 37.946 90.728 37.946 90.728C3.546 77.928 -20.454 103.528 -23.654 104.328C-26.854 105.128 -31.654 108.328 -32.454 101.928C-33.254 95.528 -40.108 79.665 -72.454 105.128C-98.636 125.456 -110.891 106.183 -110.891 106.183L-115.691 110.328C-133.691 77.128 -122.927 134.874 -122.927 134.874C-114.127 169.274 18.746 125.128 18.746 125.128C18.746 125.128 187.547 94.728 198.747 90.728C209.947 86.728 300.783 92.764 300.783 92.764L295.547 73.419C230.747 27.019 215.547 53.128 201.947 49.128C188.347 45.128 190.747 54.728 187.547 55.528C184.347 56.328 145.147 31.528 138.747 32.328z"/> - </g> - <g style="fill: rgb(243, 191, 156);"> - <path d="M140.056 34.073C133.655 34.873 107.313 11.613 123.255 42.873C143.656 82.874 64.855 82.074 48.055 70.874C31.255 59.674 55.255 89.274 55.255 89.274C73.655 109.274 39.255 92.474 39.255 92.474C4.855 79.674 -19.145 105.274 -22.345 106.074C-25.545 106.874 -30.345 110.074 -31.145 103.674C-31.945 97.274 -38.668 81.578 -71.145 106.874C-98.564 127.947 -110.509 109.219 -110.509 109.219L-115.709 111.874C-131.709 81.674 -122.273 137.929 -122.273 137.929C-113.473 172.329 20.055 126.874 20.055 126.874C20.055 126.874 188.856 96.474 200.056 92.474C211.256 88.474 301.22 94.437 301.22 94.437L296.056 74.583C231.256 28.183 216.856 54.874 203.256 50.874C189.656 46.873 192.056 56.474 188.856 57.274C185.656 58.074 146.456 33.273 140.056 34.073z"/> - </g> - <g style="fill: rgb(245, 204, 176);"> - <path d="M141.365 35.819C134.965 36.619 107.523 13.944 124.565 44.619C146.565 84.219 66.164 83.819 49.364 72.619C32.564 61.419 56.564 91.019 56.564 91.019C74.964 111.019 40.564 94.219 40.564 94.219C6.164 81.419 -17.836 107.019 -21.036 107.819C-24.236 108.619 -29.036 111.819 -29.836 105.419C-30.636 99.019 -37.227 83.492 -69.836 108.619C-98.491 130.438 -110.127 112.256 -110.127 112.256L-115.727 113.419C-130.128 85.019 -121.618 140.983 -121.618 140.983C-112.818 175.384 21.364 128.619 21.364 128.619C21.364 128.619 190.165 98.219 201.365 94.219C212.565 90.219 301.656 96.11 301.656 96.11L296.565 75.746C231.765 29.346 218.165 56.619 204.565 52.619C190.965 48.619 193.365 58.219 190.165 59.019C186.965 59.819 147.765 35.019 141.365 35.819z"/> - </g> - <g style="fill: rgb(248, 216, 196);"> - <path d="M142.674 37.565C136.274 38.365 108.832 15.689 125.874 46.365C147.874 85.965 67.474 85.565 50.674 74.365C33.874 63.165 57.874 92.765 57.874 92.765C76.274 112.765 41.874 95.965 41.874 95.965C7.473 83.165 -16.527 108.765 -19.727 109.565C-22.927 110.365 -27.727 113.565 -28.527 107.165C-29.327 100.765 -35.786 85.405 -68.527 110.365C-98.418 132.929 -109.745 115.293 -109.745 115.293L-115.745 114.965C-129.346 88.564 -120.963 144.038 -120.963 144.038C-112.163 178.438 22.673 130.365 22.673 130.365C22.673 130.365 191.474 99.965 202.674 95.965C213.874 91.965 302.093 97.783 302.093 97.783L297.075 76.91C232.274 30.51 219.474 58.365 205.874 54.365C192.274 50.365 194.674 59.965 191.474 60.765C188.274 61.565 149.074 36.765 142.674 37.565z"/> - </g> - <g style="fill: rgb(250, 229, 215);"> - <path d="M143.983 39.31C137.583 40.11 110.529 17.223 127.183 48.11C149.183 88.91 68.783 87.31 51.983 76.11C35.183 64.91 59.183 94.51 59.183 94.51C77.583 114.51 43.183 97.71 43.183 97.71C8.783 84.91 -15.217 110.51 -18.417 111.31C-21.618 112.11 -26.418 115.31 -27.218 108.91C-28.018 102.51 -34.346 87.318 -67.218 112.11C-98.345 135.42 -109.363 118.329 -109.363 118.329L-115.764 116.51C-128.764 92.51 -120.309 147.093 -120.309 147.093C-111.509 181.493 23.983 132.11 23.983 132.11C23.983 132.11 192.783 101.71 203.983 97.71C215.183 93.71 302.529 99.456 302.529 99.456L297.583 78.074C232.783 31.673 220.783 60.11 207.183 56.11C193.583 52.11 195.983 61.71 192.783 62.51C189.583 63.31 150.383 38.51 143.983 39.31z"/> - </g> - <g style="fill: rgb(252, 242, 235);"> - <path d="M145.292 41.055C138.892 41.855 112.917 18.411 128.492 49.855C149.692 92.656 70.092 89.056 53.292 77.856C36.492 66.656 60.492 96.256 60.492 96.256C78.892 116.256 44.492 99.456 44.492 99.456C10.092 86.656 -13.908 112.256 -17.108 113.056C-20.308 113.856 -25.108 117.056 -25.908 110.656C-26.708 104.256 -32.905 89.232 -65.908 113.856C-98.273 137.911 -108.982 121.365 -108.982 121.365L-115.782 118.056C-128.582 94.856 -119.654 150.147 -119.654 150.147C-110.854 184.547 25.292 133.856 25.292 133.856C25.292 133.856 194.093 103.456 205.293 99.456C216.493 95.456 302.965 101.128 302.965 101.128L298.093 79.237C233.292 32.837 222.093 61.856 208.493 57.856C194.893 53.855 197.293 63.456 194.093 64.256C190.892 65.056 151.692 40.255 145.292 41.055z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M-115.8 119.601C-128.6 97.6 -119 153.201 -119 153.201C-110.2 187.601 26.6 135.601 26.6 135.601C26.6 135.601 195.401 105.2 206.601 101.2C217.801 97.2 303.401 102.8 303.401 102.8L298.601 80.4C233.801 34 223.401 63.6 209.801 59.6C196.201 55.6 198.601 65.2 195.401 66C192.201 66.8 153.001 42 146.601 42.8C140.201 43.6 114.981 19.793 129.801 51.6C152.028 99.307 69.041 89.227 54.6 79.6C37.8 68.4 61.8 98 61.8 98C80.2 118.001 45.8 101.2 45.8 101.2C11.4 88.4 -12.6 114.001 -15.8 114.801C-19 115.601 -23.8 118.801 -24.6 112.401C-25.4 106 -31.465 91.144 -64.6 115.601C-98.2 140.401 -108.6 124.401 -108.6 124.401L-115.8 119.601z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-74.2 149.601C-74.2 149.601 -81.4 161.201 -60.6 174.401C-60.6 174.401 -59.2 175.801 -77.2 171.601C-77.2 171.601 -83.4 169.601 -85 159.201C-85 159.201 -89.8 154.801 -94.6 149.201C-99.4 143.601 -74.2 149.601 -74.2 149.601z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M65.8 102C65.8 102 83.498 128.821 82.9 133.601C81.6 144.001 81.4 153.601 84.6 157.601C87.801 161.601 96.601 194.801 96.601 194.801C96.601 194.801 96.201 196.001 108.601 158.001C108.601 158.001 120.201 142.001 100.201 123.601C100.201 123.601 65 94.8 65.8 102z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-54.2 176.401C-54.2 176.401 -43 183.601 -57.4 214.801L-51 212.401C-51 212.401 -51.8 223.601 -55 226.001L-47.8 222.801C-47.8 222.801 -43 230.801 -47 235.601C-47 235.601 -30.2 243.601 -31 250.001C-31 250.001 -24.6 242.001 -28.6 235.601C-32.6 229.201 -39.8 233.201 -39 214.801L-47.8 218.001C-47.8 218.001 -42.2 209.201 -42.2 202.801L-50.2 205.201C-50.2 205.201 -34.731 178.623 -45.4 177.201C-51.4 176.401 -54.2 176.401 -54.2 176.401z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-21.8 193.201C-21.8 193.201 -19 188.801 -21.8 189.601C-24.6 190.401 -55.8 205.201 -61.8 214.801C-61.8 214.801 -27.4 190.401 -21.8 193.201z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-11.4 201.201C-11.4 201.201 -8.6 196.801 -11.4 197.601C-14.2 198.401 -45.4 213.201 -51.4 222.801C-51.4 222.801 -17 198.401 -11.4 201.201z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M1.8 186.001C1.8 186.001 4.6 181.601 1.8 182.401C-1 183.201 -32.2 198.001 -38.2 207.601C-38.2 207.601 -3.8 183.201 1.8 186.001z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-21.4 229.601C-21.4 229.601 -21.4 223.601 -24.2 224.401C-27 225.201 -63 242.801 -69 252.401C-69 252.401 -27 226.801 -21.4 229.601z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-20.2 218.801C-20.2 218.801 -19 214.001 -21.8 214.801C-23.8 214.801 -50.2 226.401 -56.2 236.001C-56.2 236.001 -26.6 214.401 -20.2 218.801z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-34.6 266.401L-44.6 274.001C-44.6 274.001 -34.2 266.401 -30.6 267.601C-30.6 267.601 -37.4 278.801 -38.2 284.001C-38.2 284.001 -27.8 271.201 -22.2 271.601C-22.2 271.601 -14.6 272.001 -14.6 282.801C-14.6 282.801 -9 272.401 -5.8 272.801C-5.8 272.801 -4.6 279.201 -5.8 286.001C-5.8 286.001 -1.8 278.401 2.2 280.001C2.2 280.001 8.6 278.001 7.8 289.601C7.8 289.601 7.8 300.001 7 302.801C7 302.801 12.6 276.401 15 276.001C15 276.001 23 274.801 27.8 283.601C27.8 283.601 23.8 276.001 28.6 278.001C28.6 278.001 39.4 279.601 42.6 286.401C42.6 286.401 35.8 274.401 41.4 277.601C41.4 277.601 48.2 277.601 49.4 284.001C49.4 284.001 57.8 305.201 59.8 306.801C59.8 306.801 52.2 285.201 53.8 285.201C53.8 285.201 51.8 273.201 57 288.001C57 288.001 53.8 274.001 59.4 274.801C65 275.601 69.4 285.601 77.8 283.201C77.8 283.201 87.401 288.801 89.401 219.601L-34.6 266.401z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-29.8 173.601C-29.8 173.601 -15 167.601 25 173.601C25 173.601 32.2 174.001 39 165.201C45.8 156.401 72.6 149.201 79 151.201L88.601 157.601L89.401 158.801C89.401 158.801 101.801 169.201 102.201 176.801C102.601 184.401 87.801 232.401 78.2 248.401C68.6 264.401 59 276.801 39.8 274.401C39.8 274.401 19 270.401 -6.6 274.401C-6.6 274.401 -35.8 272.801 -38.6 264.801C-41.4 256.801 -27.4 241.601 -27.4 241.601C-27.4 241.601 -23 233.201 -24.2 218.801C-25.4 204.401 -25 176.401 -29.8 173.601z"/> - </g> - <g style="fill: rgb(229, 102, 140);"> - <path d="M-7.8 175.601C0.6 194.001 -29 259.201 -29 259.201C-31 260.801 -16.34 266.846 -6.2 264.401C4.746 261.763 45 266.001 45 266.001C68.6 250.401 81.4 206.001 81.4 206.001C81.4 206.001 91.801 182.001 74.2 178.801C56.6 175.601 -7.8 175.601 -7.8 175.601z"/> - </g> - <g style="fill: rgb(178, 50, 89);"> - <path d="M-9.831 206.497C-6.505 193.707 -4.921 181.906 -7.8 175.601C-7.8 175.601 54.6 182.001 65.8 161.201C70.041 153.326 84.801 184.001 84.4 193.601C84.4 193.601 21.4 208.001 6.6 196.801L-9.831 206.497z"/> - </g> - <g style="fill: rgb(165, 38, 76);"> - <path d="M-5.4 222.801C-5.4 222.801 -3.4 230.001 -5.8 234.001C-5.8 234.001 -7.4 234.801 -8.6 235.201C-8.6 235.201 -7.4 238.801 -1.4 240.401C-1.4 240.401 0.6 244.801 3 245.201C5.4 245.601 10.2 251.201 14.2 250.001C18.2 248.801 29.4 244.801 29.4 244.801C29.4 244.801 35 241.601 43.8 245.201C43.8 245.201 46.175 244.399 46.6 240.401C47.1 235.701 50.2 232.001 52.2 230.001C54.2 228.001 63.8 215.201 62.6 214.801C61.4 214.401 -5.4 222.801 -5.4 222.801z"/> - </g> - <g style="fill: rgb(255, 114, 127); stroke: rgb(0, 0, 0);"> - <path d="M-9.8 174.401C-9.8 174.401 -12.6 196.801 -9.4 205.201C-6.2 213.601 -7 215.601 -7.8 219.601C-8.6 223.601 -4.2 233.601 1.4 239.601L13.4 241.201C13.4 241.201 28.6 237.601 37.8 240.401C37.8 240.401 46.794 241.744 50.2 226.801C50.2 226.801 55 220.401 62.2 217.601C69.4 214.801 76.6 173.201 72.6 165.201C68.6 157.201 54.2 152.801 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-8.2 249.201C-8.2 249.201 -9 247.201 -13.4 246.801C-13.4 246.801 -35.8 243.201 -44.2 230.801C-44.2 230.801 -51 225.201 -46.6 236.801C-46.6 236.801 -36.2 257.201 -29.4 260.001C-29.4 260.001 -13 264.001 -8.2 249.201z"/> - </g> - <g style="fill: rgb(204, 63, 76);"> - <path d="M71.742 185.229C72.401 177.323 74.354 168.709 72.6 165.201C66.154 152.307 49.181 157.695 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401C-9.8 174.401 -11.545 188.364 -10.705 198.376C-10.705 198.376 26.6 186.801 27.4 192.401C27.4 192.401 29 189.201 38.2 189.201C47.4 189.201 70.142 188.029 71.742 185.229z"/> - </g> - <g style="stroke: rgb(165, 25, 38); stroke-width: 2;"> - <path d="M28.6 175.201C28.6 175.201 33.4 180.001 29.8 189.601C29.8 189.601 15.4 205.601 17.4 219.601"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-19.4 260.001C-19.4 260.001 -23.8 247.201 -15 254.001C-15 254.001 -10.2 256.001 -11.4 257.601C-12.6 259.201 -18.2 263.201 -19.4 260.001z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-14.36 261.201C-14.36 261.201 -17.88 250.961 -10.84 256.401C-10.84 256.401 -6.419 258.849 -7.96 259.281C-12.52 260.561 -7.96 263.121 -14.36 261.201z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-9.56 261.201C-9.56 261.201 -13.08 250.961 -6.04 256.401C-6.04 256.401 -1.665 258.711 -3.16 259.281C-6.52 260.561 -3.16 263.121 -9.56 261.201z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-2.96 261.401C-2.96 261.401 -6.48 251.161 0.56 256.601C0.56 256.601 4.943 258.933 3.441 259.481C0.48 260.561 3.441 263.321 -2.96 261.401z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M3.52 261.321C3.52 261.321 0 251.081 7.041 256.521C7.041 256.521 10.881 258.121 9.921 259.401C8.961 260.681 9.921 263.241 3.52 261.321z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M10.2 262.001C10.2 262.001 5.4 249.601 14.6 256.001C14.6 256.001 19.4 258.001 18.2 259.601C17 261.201 18.2 264.401 10.2 262.001z"/> - </g> - <g style="stroke: rgb(165, 38, 76); stroke-width: 2;"> - <path d="M-18.2 244.801C-18.2 244.801 -5 242.001 1 245.201C1 245.201 7 246.401 8.2 246.001C9.4 245.601 12.6 245.201 12.6 245.201"/> - </g> - <g style="stroke: rgb(165, 38, 76); stroke-width: 2;"> - <path d="M15.8 253.601C15.8 253.601 27.8 240.001 39.8 244.401C46.816 246.974 45.8 243.601 46.6 240.801C47.4 238.001 47.6 233.801 52.6 230.801"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M33 237.601C33 237.601 29 226.801 26.2 239.601C23.4 252.401 20.2 256.001 18.6 258.801C18.6 258.801 18.6 264.001 27 263.601C27 263.601 37.8 263.201 38.2 260.401C38.6 257.601 37 246.001 33 237.601z"/> - </g> - <g style="stroke: rgb(165, 38, 76); stroke-width: 2;"> - <path d="M47 244.801C47 244.801 50.6 242.401 53 243.601"/> - </g> - <g style="stroke: rgb(165, 38, 76); stroke-width: 2;"> - <path d="M53.5 228.401C53.5 228.401 56.4 223.501 61.2 222.701"/> - </g> - <g style="fill: rgb(178, 178, 178);"> - <path d="M-25.8 265.201C-25.8 265.201 -7.8 268.401 -3.4 266.801C-3.4 266.801 5.4 266.801 -3 268.801C-3 268.801 -15.8 268.801 -23.8 267.601C-23.8 267.601 -35.4 262.001 -25.8 265.201z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-11.8 172.001C-11.8 172.001 5.8 172.001 7.8 172.801C7.8 172.801 15 203.601 11.4 211.201C11.4 211.201 10.2 214.001 7.4 208.401C7.4 208.401 -11 175.601 -14.2 173.601C-17.4 171.601 -13 172.001 -11.8 172.001z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-88.9 169.301C-88.9 169.301 -80 171.001 -67.4 173.601C-67.4 173.601 -62.6 196.001 -59.4 200.801C-56.2 205.601 -59.8 205.601 -63.4 202.801C-67 200.001 -81.8 186.001 -83.8 181.601C-85.8 177.201 -88.9 169.301 -88.9 169.301z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-67.039 173.818C-67.039 173.818 -61.239 175.366 -60.23 177.581C-59.222 179.795 -61.432 183.092 -61.432 183.092C-61.432 183.092 -62.432 186.397 -63.634 184.235C-64.836 182.072 -67.708 174.412 -67.039 173.818z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-67 173.601C-67 173.601 -63.4 178.801 -59.8 178.801C-56.2 178.801 -55.818 178.388 -53 179.001C-48.4 180.001 -48.8 178.001 -42.2 179.201C-39.56 179.681 -37 178.801 -34.2 180.001C-31.4 181.201 -28.2 180.401 -27 178.401C-25.8 176.401 -21 172.201 -21 172.201C-21 172.201 -33.8 174.001 -36.6 174.801C-36.6 174.801 -59 176.001 -67 173.601z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-22.4 173.801C-22.4 173.801 -28.85 177.301 -29.25 179.701C-29.65 182.101 -24 185.801 -24 185.801C-24 185.801 -21.25 190.401 -20.65 188.001C-20.05 185.601 -21.6 174.201 -22.4 173.801z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-59.885 179.265C-59.885 179.265 -52.878 190.453 -52.661 179.242C-52.661 179.242 -52.104 177.984 -53.864 177.962C-59.939 177.886 -58.418 173.784 -59.885 179.265z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-52.707 179.514C-52.707 179.514 -44.786 190.701 -45.422 179.421C-45.422 179.421 -45.415 179.089 -47.168 178.936C-51.915 178.522 -51.57 174.004 -52.707 179.514z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-45.494 179.522C-45.494 179.522 -37.534 190.15 -38.203 180.484C-38.203 180.484 -38.084 179.251 -39.738 178.95C-43.63 178.244 -43.841 174.995 -45.494 179.522z"/> - </g> - <g style="fill: rgb(255, 255, 204); stroke: rgb(0, 0, 0); stroke-width: 0.5;"> - <path d="M-38.618 179.602C-38.618 179.602 -30.718 191.163 -30.37 181.382C-30.37 181.382 -28.726 180.004 -30.472 179.782C-36.29 179.042 -35.492 174.588 -38.618 179.602z"/> - </g> - <g style="fill: rgb(229, 229, 178);"> - <path d="M-74.792 183.132L-82.45 181.601C-85.05 176.601 -87.15 170.451 -87.15 170.451C-87.15 170.451 -80.8 171.451 -68.3 174.251C-68.3 174.251 -67.424 177.569 -65.952 183.364L-74.792 183.132z"/> - </g> - <g style="fill: rgb(229, 229, 178);"> - <path d="M-9.724 178.47C-11.39 175.964 -12.707 174.206 -13.357 173.8C-16.37 171.917 -12.227 172.294 -11.098 172.294C-11.098 172.294 5.473 172.294 7.356 173.047C7.356 173.047 7.88 175.289 8.564 178.68C8.564 178.68 -1.524 176.67 -9.724 178.47z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M43.88 40.321C71.601 44.281 97.121 8.641 98.881 -1.04C100.641 -10.72 90.521 -22.6 90.521 -22.6C91.841 -25.68 87.001 -39.76 81.721 -49C76.441 -58.24 60.54 -57.266 43 -58.24C27.16 -59.12 8.68 -35.8 7.36 -34.04C6.04 -32.28 12.2 6.001 13.52 11.721C14.84 17.441 12.2 43.841 12.2 43.841C46.44 34.741 16.16 36.361 43.88 40.321z"/> - </g> - <g style="fill: rgb(234, 142, 81);"> - <path d="M8.088 -33.392C6.792 -31.664 12.84 5.921 14.136 11.537C15.432 17.153 12.84 43.073 12.84 43.073C45.512 34.193 16.728 35.729 43.944 39.617C71.161 43.505 96.217 8.513 97.945 -0.992C99.673 -10.496 89.737 -22.16 89.737 -22.16C91.033 -25.184 86.281 -39.008 81.097 -48.08C75.913 -57.152 60.302 -56.195 43.08 -57.152C27.528 -58.016 9.384 -35.12 8.088 -33.392z"/> - </g> - <g style="fill: rgb(239, 170, 124);"> - <path d="M8.816 -32.744C7.544 -31.048 13.48 5.841 14.752 11.353C16.024 16.865 13.48 42.305 13.48 42.305C44.884 33.145 17.296 35.097 44.008 38.913C70.721 42.729 95.313 8.385 97.009 -0.944C98.705 -10.272 88.953 -21.72 88.953 -21.72C90.225 -24.688 85.561 -38.256 80.473 -47.16C75.385 -56.064 60.063 -55.125 43.16 -56.064C27.896 -56.912 10.088 -34.44 8.816 -32.744z"/> - </g> - <g style="fill: rgb(244, 198, 168);"> - <path d="M9.544 -32.096C8.296 -30.432 14.12 5.761 15.368 11.169C16.616 16.577 14.12 41.537 14.12 41.537C43.556 32.497 17.864 34.465 44.072 38.209C70.281 41.953 94.409 8.257 96.073 -0.895C97.737 -10.048 88.169 -21.28 88.169 -21.28C89.417 -24.192 84.841 -37.504 79.849 -46.24C74.857 -54.976 59.824 -54.055 43.24 -54.976C28.264 -55.808 10.792 -33.76 9.544 -32.096z"/> - </g> - <g style="fill: rgb(249, 226, 211);"> - <path d="M10.272 -31.448C9.048 -29.816 14.76 5.681 15.984 10.985C17.208 16.289 14.76 40.769 14.76 40.769C42.628 31.849 18.432 33.833 44.136 37.505C69.841 41.177 93.505 8.129 95.137 -0.848C96.769 -9.824 87.385 -20.84 87.385 -20.84C88.609 -23.696 84.121 -36.752 79.225 -45.32C74.329 -53.888 59.585 -52.985 43.32 -53.888C28.632 -54.704 11.496 -33.08 10.272 -31.448z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M44.2 36.8C69.4 40.4 92.601 8 94.201 -0.8C95.801 -9.6 86.601 -20.4 86.601 -20.4C87.801 -23.2 83.4 -36 78.6 -44.4C73.8 -52.8 59.346 -51.914 43.4 -52.8C29 -53.6 12.2 -32.4 11 -30.8C9.8 -29.2 15.4 5.6 16.6 10.8C17.8 16 15.4 40 15.4 40C40.9 31.4 19 33.2 44.2 36.8z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M90.601 2.8C90.601 2.8 62.8 10.4 51.2 8.8C51.2 8.8 35.4 2.2 26.6 24C26.6 24 23 31.2 21 33.2C19 35.2 90.601 2.8 90.601 2.8z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M94.401 0.6C94.401 0.6 65.4 12.8 55.4 12.4C55.4 12.4 39 7.8 30.6 22.4C30.6 22.4 22.2 31.6 19 33.2C19 33.2 18.6 34.8 25 30.8L35.4 36C35.4 36 50.2 45.6 59.8 29.6C59.8 29.6 63.8 18.4 63.8 16.4C63.8 14.4 85 8.8 86.601 8.4C88.201 8 94.801 3.8 94.401 0.6z"/> - </g> - <g style="fill: rgb(153, 204, 50);"> - <path d="M47 36.514C40.128 36.514 31.755 32.649 31.755 26.4C31.755 20.152 40.128 13.887 47 13.887C53.874 13.887 59.446 18.952 59.446 25.2C59.446 31.449 53.874 36.514 47 36.514z"/> - </g> - <g style="fill: rgb(101, 153, 0);"> - <path d="M43.377 19.83C38.531 20.552 33.442 22.055 33.514 21.839C35.054 17.22 41.415 13.887 47 13.887C51.296 13.887 55.084 15.865 57.32 18.875C57.32 18.875 52.004 18.545 43.377 19.83z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M55.4 19.6C55.4 19.6 51 16.4 51 18.6C51 18.6 54.6 23 55.4 19.6z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M45.4 27.726C42.901 27.726 40.875 25.7 40.875 23.2C40.875 20.701 42.901 18.675 45.4 18.675C47.9 18.675 49.926 20.701 49.926 23.2C49.926 25.7 47.9 27.726 45.4 27.726z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M-58.6 14.4C-58.6 14.4 -61.8 -6.8 -59.4 -11.2C-59.4 -11.2 -48.6 -21.2 -49 -24.8C-49 -24.8 -49.4 -42.8 -50.6 -43.6C-51.8 -44.4 -59.4 -50.4 -65.4 -44C-65.4 -44 -75.8 -26 -75 -19.6L-75 -17.6C-75 -17.6 -82.6 -18 -84.2 -16C-84.2 -16 -85.4 -10.8 -86.6 -10.4C-86.6 -10.4 -89.4 -8 -87.4 -5.2C-87.4 -5.2 -89.4 -2.8 -89 1.2L-81.4 5.2C-81.4 5.2 -79.4 19.6 -68.6 24.8C-63.764 27.129 -60.6 20.4 -58.6 14.4z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M-59.6 12.56C-59.6 12.56 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.48 -40.36 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.96 -59.6 12.56z"/> - </g> - <g style="fill: rgb(235, 149, 92);"> - <path d="M-51.05 -42.61C-52.14 -43.47 -59.63 -49.24 -65.48 -43C-65.48 -43 -75.62 -25.45 -74.84 -19.21L-74.84 -17.26C-74.84 -17.26 -82.25 -17.65 -83.81 -15.7C-83.81 -15.7 -84.98 -10.63 -86.15 -10.24C-86.15 -10.24 -88.88 -7.9 -86.93 -5.17C-86.93 -5.17 -88.88 -2.83 -88.49 1.07L-81.08 4.97C-81.08 4.97 -79.13 19.01 -68.6 24.08C-63.886 26.35 -60.8 19.79 -58.85 13.94C-58.85 13.94 -61.97 -6.73 -59.63 -11.02C-59.63 -11.02 -49.1 -20.77 -49.49 -24.28C-49.49 -24.28 -49.88 -41.83 -51.05 -42.61z"/> - </g> - <g style="fill: rgb(242, 184, 146);"> - <path d="M-51.5 -41.62C-52.48 -42.54 -59.86 -48.08 -65.56 -42C-65.56 -42 -75.44 -24.9 -74.68 -18.82L-74.68 -16.92C-74.68 -16.92 -81.9 -17.3 -83.42 -15.4C-83.42 -15.4 -84.56 -10.46 -85.7 -10.08C-85.7 -10.08 -88.36 -7.8 -86.46 -5.14C-86.46 -5.14 -88.36 -2.86 -87.98 0.94L-80.76 4.74C-80.76 4.74 -78.86 18.42 -68.6 23.36C-64.006 25.572 -61 19.18 -59.1 13.48C-59.1 13.48 -62.14 -6.66 -59.86 -10.84C-59.86 -10.84 -49.6 -20.34 -49.98 -23.76C-49.98 -23.76 -50.36 -40.86 -51.5 -41.62z"/> - </g> - <g style="fill: rgb(248, 220, 200);"> - <path d="M-51.95 -40.63C-52.82 -41.61 -60.09 -46.92 -65.64 -41C-65.64 -41 -75.26 -24.35 -74.52 -18.43L-74.52 -16.58C-74.52 -16.58 -81.55 -16.95 -83.03 -15.1C-83.03 -15.1 -84.14 -10.29 -85.25 -9.92C-85.25 -9.92 -87.84 -7.7 -85.99 -5.11C-85.99 -5.11 -87.84 -2.89 -87.47 0.81L-80.44 4.51C-80.44 4.51 -78.59 17.83 -68.6 22.64C-64.127 24.794 -61.2 18.57 -59.35 13.02C-59.35 13.02 -62.31 -6.59 -60.09 -10.66C-60.09 -10.66 -50.1 -19.91 -50.47 -23.24C-50.47 -23.24 -50.84 -39.89 -51.95 -40.63z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M-59.6 12.46C-59.6 12.46 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.16 -40.68 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.86 -59.6 12.46z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-62.7 6.2C-62.7 6.2 -84.3 -4 -85.2 -4.8C-85.2 -4.8 -76.1 3.4 -75.3 3.4C-74.5 3.4 -62.7 6.2 -62.7 6.2z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-79.8 0C-79.8 0 -61.4 3.6 -61.4 8C-61.4 10.912 -61.643 24.331 -67 22.8C-75.4 20.4 -71.8 6 -79.8 0z"/> - </g> - <g style="fill: rgb(153, 204, 50);"> - <path d="M-71.4 3.8C-71.4 3.8 -62.422 5.274 -61.4 8C-60.8 9.6 -60.137 17.908 -65.6 19C-70.152 19.911 -72.382 9.69 -71.4 3.8z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M14.595 46.349C14.098 44.607 15.409 44.738 17.2 44.2C19.2 43.6 31.4 39.8 32.2 37.2C33 34.6 46.2 39 46.2 39C48 39.8 52.4 42.4 52.4 42.4C57.2 43.6 63.8 44 63.8 44C66.2 45 69.6 47.8 69.6 47.8C84.2 58 96.601 50.8 96.601 50.8C116.601 44.2 110.601 27 110.601 27C107.601 18 110.801 14.6 110.801 14.6C111.001 10.8 118.201 17.2 118.201 17.2C120.801 21.4 121.601 26.4 121.601 26.4C129.601 37.6 126.201 19.8 126.201 19.8C126.401 18.8 123.601 15.2 123.601 14C123.601 12.8 121.801 9.4 121.801 9.4C118.801 6 121.201 -1 121.201 -1C123.001 -14.8 120.801 -13 120.801 -13C119.601 -14.8 110.401 -4.8 110.401 -4.8C108.201 -1.4 102.201 0.2 102.201 0.2C99.401 2 96.001 0.6 96.001 0.6C93.401 0.2 87.801 7.2 87.801 7.2C90.601 7 93.001 11.4 95.401 11.6C97.801 11.8 99.601 9.2 101.201 8.6C102.801 8 105.601 13.8 105.601 13.8C106.001 16.4 100.401 21.2 100.401 21.2C100.001 25.8 98.401 24.2 98.401 24.2C95.401 23.6 94.201 27.4 93.201 32C92.201 36.6 88.001 37 88.001 37C86.401 44.4 85.2 41.4 85.2 41.4C85 35.8 79 41.6 79 41.6C77.8 43.6 73.2 41.4 73.2 41.4C66.4 39.4 68.8 37.4 68.8 37.4C70.6 35.2 81.8 37.4 81.8 37.4C84 35.8 76 31.8 76 31.8C75.4 30 76.4 25.6 76.4 25.6C77.6 22.4 84.4 16.8 84.4 16.8C93.801 15.6 91.001 14 91.001 14C84.801 8.8 79 16.4 79 16.4C76.8 22.6 59.4 37.6 59.4 37.6C54.6 41 57.2 34.2 53.2 37.6C49.2 41 28.6 32 28.6 32C17.038 30.807 14.306 46.549 10.777 43.429C10.777 43.429 16.195 51.949 14.595 46.349z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M209.401 -120C209.401 -120 183.801 -112 181.001 -93.2C181.001 -93.2 178.601 -70.4 199.001 -52.8C199.001 -52.8 199.401 -46.4 201.401 -43.2C201.401 -43.2 199.801 -38.4 218.601 -46L245.801 -54.4C245.801 -54.4 252.201 -56.8 257.401 -65.6C262.601 -74.4 277.801 -93.2 274.201 -118.4C274.201 -118.4 275.401 -129.6 269.401 -130C269.401 -130 261.001 -131.6 253.801 -124C253.801 -124 247.001 -120.8 244.601 -121.2L209.401 -120z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M264.022 -120.99C264.022 -120.99 266.122 -129.92 261.282 -125.08C261.282 -125.08 254.242 -119.36 246.761 -119.36C246.761 -119.36 232.241 -117.16 227.841 -103.96C227.841 -103.96 223.881 -77.12 231.801 -71.4C231.801 -71.4 236.641 -63.92 243.681 -70.52C250.722 -77.12 266.222 -107.35 264.022 -120.99z"/> - </g> - <g style="fill: rgb(50, 50, 50);"> - <path d="M263.648 -120.632C263.648 -120.632 265.738 -129.376 260.986 -124.624C260.986 -124.624 254.074 -119.008 246.729 -119.008C246.729 -119.008 232.473 -116.848 228.153 -103.888C228.153 -103.888 224.265 -77.536 232.041 -71.92C232.041 -71.92 236.793 -64.576 243.705 -71.056C250.618 -77.536 265.808 -107.24 263.648 -120.632z"/> - </g> - <g style="fill: rgb(102, 102, 102);"> - <path d="M263.274 -120.274C263.274 -120.274 265.354 -128.832 260.69 -124.168C260.69 -124.168 253.906 -118.656 246.697 -118.656C246.697 -118.656 232.705 -116.536 228.465 -103.816C228.465 -103.816 224.649 -77.952 232.281 -72.44C232.281 -72.44 236.945 -65.232 243.729 -71.592C250.514 -77.952 265.394 -107.13 263.274 -120.274z"/> - </g> - <g style="fill: rgb(153, 153, 153);"> - <path d="M262.9 -119.916C262.9 -119.916 264.97 -128.288 260.394 -123.712C260.394 -123.712 253.738 -118.304 246.665 -118.304C246.665 -118.304 232.937 -116.224 228.777 -103.744C228.777 -103.744 225.033 -78.368 232.521 -72.96C232.521 -72.96 237.097 -65.888 243.753 -72.128C250.41 -78.368 264.98 -107.02 262.9 -119.916z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M262.526 -119.558C262.526 -119.558 264.586 -127.744 260.098 -123.256C260.098 -123.256 253.569 -117.952 246.633 -117.952C246.633 -117.952 233.169 -115.912 229.089 -103.672C229.089 -103.672 225.417 -78.784 232.761 -73.48C232.761 -73.48 237.249 -66.544 243.777 -72.664C250.305 -78.784 264.566 -106.91 262.526 -119.558z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M262.151 -119.2C262.151 -119.2 264.201 -127.2 259.801 -122.8C259.801 -122.8 253.401 -117.6 246.601 -117.6C246.601 -117.6 233.401 -115.6 229.401 -103.6C229.401 -103.6 225.801 -79.2 233.001 -74C233.001 -74 237.401 -67.2 243.801 -73.2C250.201 -79.2 264.151 -106.8 262.151 -119.2z"/> - </g> - <g style="fill: rgb(153, 38, 0);"> - <path d="M50.6 84C50.6 84 30.2 64.8 22.2 64C22.2 64 -12.2 60 -27 78C-27 78 -9.4 57.6 18.2 63.2C18.2 63.2 -3.4 58.8 -15.8 62C-15.8 62 -32.6 62 -42.2 76L-45 80.8C-45 80.8 -41 66 -22.6 60C-22.6 60 0.2 55.2 11 60C11 60 -10.6 53.2 -20.6 55.2C-20.6 55.2 -51 52.8 -63.8 79.2C-63.8 79.2 -59.8 64.8 -45 57.6C-45 57.6 -31.4 48.8 -11 51.6C-11 51.6 3.4 54.8 8.6 57.2C13.8 59.6 12.6 56.8 4.2 52C4.2 52 -1.4 42 -15.4 42.4C-15.4 42.4 -58.2 46 -68.6 58C-68.6 58 -55 46.8 -44.6 44C-44.6 44 -22.2 36 -13.8 36.8C-13.8 36.8 11 37.8 18.6 33.8C18.6 33.8 7.4 38.8 10.6 42C13.8 45.2 20.6 52.8 20.6 54C20.6 55.2 44.8 77.3 48.4 81.7L50.6 84z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M189 278C189 278 173.5 241.5 161 232C161 232 187 248 190.5 266C190.5 266 190.5 276 189 278z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M236 285.5C236 285.5 209.5 230.5 191 206.5C191 206.5 234.5 244 239.5 270.5L240 276L237 273.5C237 273.5 236.5 282.5 236 285.5z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M292.5 237C292.5 237 230 177.5 228.5 175C228.5 175 289 241 292 248.5C292 248.5 290 239.5 292.5 237z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M104 280.5C104 280.5 123.5 228.5 142.5 251C142.5 251 157.5 261 157 264C157 264 153 257.5 135 258C135 258 116 255 104 280.5z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M294.5 153C294.5 153 249.5 124.5 242 123C230.193 120.639 291.5 152 296.5 162.5C296.5 162.5 298.5 160 294.5 153z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M143.801 259.601C143.801 259.601 164.201 257.601 171.001 250.801L175.401 254.401L193.001 216.001L196.601 221.201C196.601 221.201 211.001 206.401 210.201 198.401C209.401 190.401 223.001 204.401 223.001 204.401C223.001 204.401 222.201 192.801 229.401 199.601C229.401 199.601 227.001 184.001 235.401 192.001C235.401 192.001 224.864 161.844 247.401 187.601C253.001 194.001 248.601 187.201 248.601 187.201C248.601 187.201 222.601 139.201 244.201 153.601C244.201 153.601 246.201 130.801 245.001 126.401C243.801 122.001 241.801 99.6 237.001 94.4C232.201 89.2 237.401 87.6 243.001 92.8C243.001 92.8 231.801 68.8 245.001 80.8C245.001 80.8 241.401 65.6 237.001 62.8C237.001 62.8 231.401 45.6 246.601 56.4C246.601 56.4 242.201 44 239.001 40.8C239.001 40.8 227.401 13.2 234.601 18L239.001 21.6C239.001 21.6 232.201 7.6 238.601 12C245.001 16.4 245.001 16 245.001 16C245.001 16 223.801 -17.2 244.201 0.4C244.201 0.4 236.042 -13.518 232.601 -20.4C232.601 -20.4 213.801 -40.8 228.201 -34.4L233.001 -32.8C233.001 -32.8 224.201 -42.8 216.201 -44.4C208.201 -46 218.601 -52.4 225.001 -50.4C231.401 -48.4 247.001 -40.8 247.001 -40.8C247.001 -40.8 259.801 -22 263.801 -21.6C263.801 -21.6 243.801 -29.2 249.801 -21.2C249.801 -21.2 264.201 -7.2 257.001 -7.6C257.001 -7.6 251.001 -0.4 255.801 8.4C255.801 8.4 237.342 -9.991 252.201 15.6L259.001 32C259.001 32 234.601 7.2 245.801 29.2C245.801 29.2 263.001 52.8 265.001 53.2C267.001 53.6 271.401 62.4 271.401 62.4L267.001 60.4L272.201 69.2C272.201 69.2 261.001 57.2 267.001 70.4L272.601 84.8C272.601 84.8 252.201 62.8 265.801 92.4C265.801 92.4 249.401 87.2 258.201 104.4C258.201 104.4 256.601 120.401 257.001 125.601C257.401 130.801 258.601 159.201 254.201 167.201C249.801 175.201 260.201 194.401 262.201 198.401C264.201 202.401 267.801 213.201 259.001 204.001C250.201 194.801 254.601 200.401 256.601 209.201C258.601 218.001 264.601 233.601 263.801 239.201C263.801 239.201 262.601 240.401 259.401 236.801C259.401 236.801 244.601 214.001 246.201 228.401C246.201 228.401 245.001 236.401 241.801 245.201C241.801 245.201 238.601 256.001 238.601 247.201C238.601 247.201 235.401 230.401 232.601 238.001C229.801 245.601 226.201 251.601 223.401 254.001C220.601 256.401 215.401 233.601 214.201 244.001C214.201 244.001 202.201 231.601 197.401 248.001L185.801 264.401C185.801 264.401 185.401 252.001 184.201 258.001C184.201 258.001 154.201 264.001 143.801 259.601z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M109.401 -97.2C109.401 -97.2 97.801 -105.2 93.801 -104.8C89.801 -104.4 121.401 -113.6 162.601 -86C162.601 -86 167.401 -83.2 171.001 -83.6C171.001 -83.6 174.201 -81.2 171.401 -77.6C171.401 -77.6 162.601 -68 173.801 -56.8C173.801 -56.8 192.201 -50 186.601 -58.8C186.601 -58.8 197.401 -54.8 199.801 -50.8C202.201 -46.8 201.001 -50.8 201.001 -50.8C201.001 -50.8 194.601 -58 188.601 -63.2C188.601 -63.2 183.401 -65.2 180.601 -73.6C177.801 -82 175.401 -92 179.801 -95.2C179.801 -95.2 175.801 -90.8 176.601 -94.8C177.401 -98.8 181.001 -102.4 182.601 -102.8C184.201 -103.2 200.601 -119 207.401 -119.4C207.401 -119.4 198.201 -118 195.201 -119C192.201 -120 165.601 -131.4 159.601 -132.6C159.601 -132.6 142.801 -139.2 154.801 -137.2C154.801 -137.2 190.601 -133.4 208.801 -120.2C208.801 -120.2 201.601 -128.6 183.201 -135.6C183.201 -135.6 161.001 -148.2 125.801 -143.2C125.801 -143.2 108.001 -140 100.201 -138.2C100.201 -138.2 97.601 -138.8 97.001 -139.2C96.401 -139.6 84.6 -148.6 57 -141.6C57 -141.6 40 -137 31.4 -132.2C31.4 -132.2 16.2 -131 12.6 -127.8C12.6 -127.8 -6 -113.2 -8 -112.4C-10 -111.6 -21.4 -104 -22.2 -103.6C-22.2 -103.6 2.4 -110.2 4.8 -112.6C7.2 -115 24.6 -117.6 27 -116.2C29.4 -114.8 37.8 -115.4 28.2 -114.8C28.2 -114.8 103.801 -100 104.601 -98C105.401 -96 109.401 -97.2 109.401 -97.2z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M180.801 -106.4C180.801 -106.4 170.601 -113.8 168.601 -113.8C166.601 -113.8 154.201 -124 150.001 -123.6C145.801 -123.2 133.601 -133.2 106.201 -125C106.201 -125 105.601 -127 109.201 -127.8C109.201 -127.8 115.601 -130 116.001 -130.6C116.001 -130.6 136.201 -134.8 143.401 -131.2C143.401 -131.2 152.601 -128.6 158.801 -122.4C158.801 -122.4 170.001 -119.2 173.201 -120.2C173.201 -120.2 182.001 -118 182.401 -116.2C182.401 -116.2 188.201 -113.2 186.401 -110.6C186.401 -110.6 186.801 -109 180.801 -106.4z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M168.33 -108.509C169.137 -107.877 170.156 -107.779 170.761 -106.97C170.995 -106.656 170.706 -106.33 170.391 -106.233C169.348 -105.916 168.292 -106.486 167.15 -105.898C166.748 -105.691 166.106 -105.873 165.553 -106.022C163.921 -106.463 162.092 -106.488 160.401 -105.8C158.416 -106.929 156.056 -106.345 153.975 -107.346C153.917 -107.373 153.695 -107.027 153.621 -107.054C150.575 -108.199 146.832 -107.916 144.401 -110.2C141.973 -110.612 139.616 -111.074 137.188 -111.754C135.37 -112.263 133.961 -113.252 132.341 -114.084C130.964 -114.792 129.507 -115.314 127.973 -115.686C126.11 -116.138 124.279 -116.026 122.386 -116.546C122.293 -116.571 122.101 -116.227 122.019 -116.254C121.695 -116.362 121.405 -116.945 121.234 -116.892C119.553 -116.37 118.065 -117.342 116.401 -117C115.223 -118.224 113.495 -117.979 111.949 -118.421C108.985 -119.269 105.831 -117.999 102.801 -119C106.914 -120.842 111.601 -119.61 115.663 -121.679C117.991 -122.865 120.653 -121.763 123.223 -122.523C123.71 -122.667 124.401 -122.869 124.801 -122.2C124.935 -122.335 125.117 -122.574 125.175 -122.546C127.625 -121.389 129.94 -120.115 132.422 -119.049C132.763 -118.903 133.295 -119.135 133.547 -118.933C135.067 -117.717 137.01 -117.82 138.401 -116.6C140.099 -117.102 141.892 -116.722 143.621 -117.346C143.698 -117.373 143.932 -117.032 143.965 -117.054C145.095 -117.802 146.25 -117.531 147.142 -117.227C147.48 -117.112 148.143 -116.865 148.448 -116.791C149.574 -116.515 150.43 -116.035 151.609 -115.852C151.723 -115.834 151.908 -116.174 151.98 -116.146C153.103 -115.708 154.145 -115.764 154.801 -114.6C154.936 -114.735 155.101 -114.973 155.183 -114.946C156.21 -114.608 156.859 -113.853 157.96 -113.612C158.445 -113.506 159.057 -112.88 159.633 -112.704C162.025 -111.973 163.868 -110.444 166.062 -109.549C166.821 -109.239 167.697 -109.005 168.33 -108.509z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M91.696 -122.739C89.178 -124.464 86.81 -125.57 84.368 -127.356C84.187 -127.489 83.827 -127.319 83.625 -127.441C82.618 -128.05 81.73 -128.631 80.748 -129.327C80.209 -129.709 79.388 -129.698 78.88 -129.956C76.336 -131.248 73.707 -131.806 71.2 -133C71.882 -133.638 73.004 -133.394 73.6 -134.2C73.795 -133.92 74.033 -133.636 74.386 -133.827C76.064 -134.731 77.914 -134.884 79.59 -134.794C81.294 -134.702 83.014 -134.397 84.789 -134.125C85.096 -134.078 85.295 -133.555 85.618 -133.458C87.846 -132.795 90.235 -133.32 92.354 -132.482C93.945 -131.853 95.515 -131.03 96.754 -129.755C97.006 -129.495 96.681 -129.194 96.401 -129C96.789 -129.109 97.062 -128.903 97.173 -128.59C97.257 -128.351 97.257 -128.049 97.173 -127.81C97.061 -127.498 96.782 -127.397 96.408 -127.346C95.001 -127.156 96.773 -128.536 96.073 -128.088C94.8 -127.274 95.546 -125.868 94.801 -124.6C94.521 -124.794 94.291 -125.012 94.401 -125.4C94.635 -124.878 94.033 -124.588 93.865 -124.272C93.48 -123.547 92.581 -122.132 91.696 -122.739z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M59.198 -115.391C56.044 -116.185 52.994 -116.07 49.978 -117.346C49.911 -117.374 49.688 -117.027 49.624 -117.054C48.258 -117.648 47.34 -118.614 46.264 -119.66C45.351 -120.548 43.693 -120.161 42.419 -120.648C42.095 -120.772 41.892 -121.284 41.591 -121.323C40.372 -121.48 39.445 -122.429 38.4 -123C40.736 -123.795 43.147 -123.764 45.609 -124.148C45.722 -124.166 45.867 -123.845 46 -123.845C46.136 -123.845 46.266 -124.066 46.4 -124.2C46.595 -123.92 46.897 -123.594 47.154 -123.848C47.702 -124.388 48.258 -124.198 48.798 -124.158C48.942 -124.148 49.067 -123.845 49.2 -123.845C49.336 -123.845 49.467 -124.156 49.6 -124.156C49.736 -124.155 49.867 -123.845 50 -123.845C50.136 -123.845 50.266 -124.066 50.4 -124.2C51.092 -123.418 51.977 -123.972 52.799 -123.793C53.837 -123.566 54.104 -122.418 55.178 -122.12C59.893 -120.816 64.03 -118.671 68.393 -116.584C68.7 -116.437 68.91 -116.189 68.8 -115.8C69.067 -115.8 69.38 -115.888 69.57 -115.756C70.628 -115.024 71.669 -114.476 72.366 -113.378C72.582 -113.039 72.253 -112.632 72.02 -112.684C67.591 -113.679 63.585 -114.287 59.198 -115.391z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M45.338 -71.179C43.746 -72.398 43.162 -74.429 42.034 -76.221C41.82 -76.561 42.094 -76.875 42.411 -76.964C42.971 -77.123 43.514 -76.645 43.923 -76.443C45.668 -75.581 47.203 -74.339 49.2 -74.2C51.19 -71.966 55.45 -71.581 55.457 -68.2C55.458 -67.341 54.03 -68.259 53.6 -67.4C51.149 -68.403 48.76 -68.3 46.38 -69.767C45.763 -70.148 46.093 -70.601 45.338 -71.179z"/> - </g> - <g style="fill: rgb(204, 114, 38);"> - <path d="M17.8 -123.756C17.935 -123.755 24.966 -123.522 24.949 -123.408C24.904 -123.099 17.174 -122.05 16.81 -122.22C16.646 -122.296 9.134 -119.866 9 -120C9.268 -120.135 17.534 -123.756 17.8 -123.756z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M33.2 -114C33.2 -114 18.4 -112.2 14 -111C9.6 -109.8 -9 -102.2 -12 -100.2C-12 -100.2 -25.4 -94.8 -42.4 -74.8C-42.4 -74.8 -34.8 -78.2 -32.6 -81C-32.6 -81 -19 -93.6 -19.2 -91C-19.2 -91 -7 -99.6 -7.6 -97.4C-7.6 -97.4 16.8 -108.6 14.8 -105.4C14.8 -105.4 36.4 -110 35.4 -108C35.4 -108 54.2 -103.6 51.4 -103.4C51.4 -103.4 45.6 -102.2 52 -98.6C52 -98.6 48.6 -94.2 43.2 -98.2C37.8 -102.2 40.8 -100 35.8 -99C35.8 -99 33.2 -98.2 28.6 -102.2C28.6 -102.2 23 -106.8 14.2 -103.2C14.2 -103.2 -16.4 -90.6 -18.4 -90C-18.4 -90 -22 -87.2 -24.4 -83.6C-24.4 -83.6 -30.2 -79.2 -33.2 -77.8C-33.2 -77.8 -46 -66.2 -47.2 -64.8C-47.2 -64.8 -50.6 -59.6 -51.4 -59.2C-51.4 -59.2 -45 -63 -43 -65C-43 -65 -29 -75 -23.6 -75.8C-23.6 -75.8 -19.2 -78.8 -18.4 -80.2C-18.4 -80.2 -4 -89.4 0.2 -89.4C0.2 -89.4 9.4 -84.2 11.8 -91.2C11.8 -91.2 17.6 -93 23.2 -91.8C23.2 -91.8 26.4 -94.4 25.6 -96.6C25.6 -96.6 27.2 -98.4 28.2 -94.6C28.2 -94.6 31.6 -91 36.4 -93C36.4 -93 40.4 -93.2 38.4 -90.8C38.4 -90.8 34 -87 22.2 -86.8C22.2 -86.8 9.8 -86.2 -6.6 -78.6C-6.6 -78.6 -36.4 -68.2 -45.6 -57.8C-45.6 -57.8 -52 -49 -57.4 -47.8C-57.4 -47.8 -63.2 -47 -69.2 -39.6C-69.2 -39.6 -59.4 -45.4 -50.4 -45.4C-50.4 -45.4 -46.4 -47.8 -50.2 -44.2C-50.2 -44.2 -53.8 -36.6 -52.2 -31.2C-52.2 -31.2 -52.8 -26 -53.6 -24.4C-53.6 -24.4 -61.4 -11.6 -61.4 -9.2C-61.4 -6.8 -60.2 3 -59.8 3.6C-59.4 4.2 -60.8 2 -57 4.4C-53.2 6.8 -50.4 8.4 -49.6 11.2C-48.8 14 -51.6 5.8 -51.8 4C-52 2.2 -56.2 -5 -55.4 -7.4C-55.4 -7.4 -54.4 -6.4 -53.6 -5C-53.6 -5 -54.2 -5.6 -53.6 -9.2C-53.6 -9.2 -52.8 -14.4 -51.4 -17.6C-50 -20.8 -48 -24.6 -47.6 -25.4C-47.2 -26.2 -47.2 -32 -45.8 -29.4L-42.4 -26.8C-42.4 -26.8 -45.2 -29.4 -43 -31.6C-43 -31.6 -44 -37.2 -42.2 -39.8C-42.2 -39.8 -35.2 -48.2 -33.6 -49.2C-32 -50.2 -33.4 -49.8 -33.4 -49.8C-33.4 -49.8 -27.4 -54 -33.2 -52.4C-33.2 -52.4 -37.2 -50.8 -40.2 -50.8C-40.2 -50.8 -47.8 -48.8 -43.8 -53C-39.8 -57.2 -29.8 -62.6 -26 -62.4L-25.2 -60.8L-14 -63.2L-15.2 -62.4C-15.2 -62.4 -15.4 -62.6 -11.2 -63C-7 -63.4 -1.2 -62 0.2 -63.8C1.6 -65.6 5 -66.6 4.6 -65.2C4.2 -63.8 4 -61.8 4 -61.8C4 -61.8 9 -67.6 8.4 -65.4C7.8 -63.2 -0.4 -58 -1.8 -51.8L8.6 -60L12.2 -63C12.2 -63 15.8 -60.8 16 -62.4C16.2 -64 20.8 -69.8 22 -69.6C23.2 -69.4 25.2 -72.2 25 -69.6C24.8 -67 32.4 -61.6 32.4 -61.6C32.4 -61.6 35.6 -63.4 37 -62C38.4 -60.6 42.6 -81.8 42.6 -81.8L67.6 -92.4L111.201 -95.8L94.201 -102.6L33.2 -114z"/> - </g> - <g style="stroke: rgb(76, 0, 0); stroke-width: 2;"> - <path d="M51.4 85C51.4 85 36.4 68.2 28 65.6C28 65.6 14.6 58.8 -10 66.6"/> - </g> - <g style="stroke: rgb(76, 0, 0); stroke-width: 2;"> - <path d="M24.8 64.2C24.8 64.2 -0.4 56.2 -15.8 60.4C-15.8 60.4 -34.2 62.4 -42.6 76.2"/> - </g> - <g style="stroke: rgb(76, 0, 0); stroke-width: 2;"> - <path d="M21.2 63C21.2 63 4.2 55.8 -10.6 53.6C-10.6 53.6 -27.2 51 -43.8 58.2C-43.8 58.2 -56 64.2 -61.4 74.4"/> - </g> - <g style="stroke: rgb(76, 0, 0); stroke-width: 2;"> - <path d="M22.2 63.4C22.2 63.4 6.8 52.4 5.8 51C5.8 51 -1.2 40 -14.2 39.6C-14.2 39.6 -35.6 40.4 -52.8 48.4"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M20.895 54.407C22.437 55.87 49.4 84.8 49.4 84.8C84.6 121.401 56.6 87.2 56.6 87.2C49 82.4 39.8 63.6 39.8 63.6C38.6 60.8 53.8 70.8 53.8 70.8C57.8 71.6 71.4 90.8 71.4 90.8C64.6 88.4 69.4 95.6 69.4 95.6C72.2 97.6 92.601 113.201 92.601 113.201C96.201 117.201 100.201 118.801 100.201 118.801C114.201 113.601 107.801 126.801 107.801 126.801C110.201 133.601 115.801 122.001 115.801 122.001C127.001 105.2 110.601 107.601 110.601 107.601C80.6 110.401 73.8 94.4 73.8 94.4C71.4 92 80.2 94.4 80.2 94.4C88.601 96.4 73 82 73 82C75.4 82 84.6 88.8 84.6 88.8C95.001 98 97.001 96 97.001 96C115.001 87.2 125.401 94.8 125.401 94.8C127.401 96.4 121.801 103.2 123.401 108.401C125.001 113.601 129.801 126.001 129.801 126.001C127.401 127.601 127.801 138.401 127.801 138.401C144.601 161.601 135.001 159.601 135.001 159.601C119.401 159.201 134.201 166.801 134.201 166.801C137.401 168.801 146.201 176.001 146.201 176.001C143.401 174.801 141.801 180.001 141.801 180.001C146.601 184.001 143.801 188.801 143.801 188.801C137.801 190.001 136.601 194.001 136.601 194.001C143.401 202.001 133.401 202.401 133.401 202.401C137.001 206.801 132.201 218.801 132.201 218.801C127.401 218.801 121.001 224.401 121.001 224.401C123.401 229.201 113.001 234.801 113.001 234.801C104.601 236.401 107.401 243.201 107.401 243.201C99.401 249.201 97.001 265.201 97.001 265.201C96.201 275.601 93.801 278.801 99.001 276.801C104.201 274.801 103.401 262.401 103.401 262.401C98.601 246.801 141.401 230.801 141.401 230.801C145.401 229.201 146.201 224.001 146.201 224.001C148.201 224.401 157.001 232.001 157.001 232.001C164.601 243.201 165.001 234.001 165.001 234.001C166.201 230.401 164.601 224.401 164.601 224.401C170.601 202.801 156.601 196.401 156.601 196.401C146.601 162.801 160.601 171.201 160.601 171.201C163.401 176.801 174.201 182.001 174.201 182.001L177.801 179.601C176.201 174.801 184.601 168.801 184.601 168.801C187.401 175.201 193.401 167.201 193.401 167.201C197.001 142.801 209.401 157.201 209.401 157.201C213.401 158.401 214.601 151.601 214.601 151.601C218.201 141.201 214.601 127.601 214.601 127.601C218.201 127.201 227.801 133.201 227.801 133.201C230.601 129.601 221.401 112.801 225.401 115.201C229.401 117.601 233.801 119.201 233.801 119.201C234.601 117.201 224.601 104.801 224.601 104.801C220.201 102 215.001 81.6 215.001 81.6C222.201 85.2 212.201 70 212.201 70C212.201 66.8 218.201 55.6 218.201 55.6C217.401 48.8 218.201 49.2 218.201 49.2C221.001 50.4 229.001 52 222.201 45.6C215.401 39.2 223.001 34.4 223.001 34.4C227.401 31.6 213.801 32 213.801 32C208.601 27.6 209.001 23.6 209.001 23.6C217.001 25.6 202.601 11.2 200.201 7.6C197.801 4 207.401 -1.2 207.401 -1.2C220.601 -4.8 209.001 -8 209.001 -8C189.401 -7.6 200.201 -18.4 200.201 -18.4C206.201 -18 204.601 -20.4 204.601 -20.4C199.401 -21.6 189.801 -28 189.801 -28C185.801 -31.6 189.401 -30.8 189.401 -30.8C206.201 -29.6 177.401 -40.8 177.401 -40.8C185.401 -40.8 167.401 -51.2 167.401 -51.2C165.401 -52.8 162.201 -60.4 162.201 -60.4C156.201 -65.6 151.401 -72.4 151.401 -72.4C151.001 -76.8 146.201 -81.6 146.201 -81.6C134.601 -95.2 129.001 -94.8 129.001 -94.8C114.201 -98.4 109.001 -97.6 109.001 -97.6L56.2 -93.2C29.8 -80.4 37.6 -59.4 37.6 -59.4C44 -51 53.2 -54.8 53.2 -54.8C57.8 -61 69.4 -58.8 69.4 -58.8C89.801 -55.6 87.201 -59.2 87.201 -59.2C84.801 -63.8 68.6 -70 68.4 -70.6C68.2 -71.2 59.4 -74.6 59.4 -74.6C56.4 -75.8 52 -85 52 -85C48.8 -88.4 64.6 -82.6 64.6 -82.6C63.4 -81.6 70.8 -77.6 70.8 -77.6C88.201 -78.6 98.801 -67.8 98.801 -67.8C109.601 -51.2 109.801 -59.4 109.801 -59.4C112.601 -68.8 100.801 -90 100.801 -90C101.201 -92 109.401 -85.4 109.401 -85.4C110.801 -87.4 111.601 -81.6 111.601 -81.6C111.801 -79.2 115.601 -71.2 115.601 -71.2C118.401 -58.2 122.001 -65.6 122.001 -65.6L126.601 -56.2C128.001 -53.6 122.001 -46 122.001 -46C121.801 -43.2 122.601 -43.4 117.001 -35.8C111.401 -28.2 114.801 -23.8 114.801 -23.8C113.401 -17.2 122.201 -17.6 122.201 -17.6C124.801 -15.4 128.201 -15.4 128.201 -15.4C130.001 -13.4 132.401 -14 132.401 -14C134.001 -17.8 140.201 -15.8 140.201 -15.8C141.601 -18.2 149.801 -18.6 149.801 -18.6C150.801 -21.2 151.201 -22.8 154.601 -23.4C158.001 -24 133.401 -67 133.401 -67C139.801 -67.8 131.601 -80.2 131.601 -80.2C129.401 -86.8 140.801 -72.2 143.001 -70.8C145.201 -69.4 146.201 -67.2 144.601 -67.4C143.001 -67.6 141.201 -65.4 142.601 -65.2C144.001 -65 157.001 -50 160.401 -39.8C163.801 -29.6 169.801 -25.6 176.001 -19.6C182.201 -13.6 181.401 10.6 181.401 10.6C181.001 19.4 187.001 30 187.001 30C189.001 33.8 184.801 52 184.801 52C182.801 54.2 184.201 55 184.201 55C185.201 56.2 192.001 69.4 192.001 69.4C190.201 69.2 193.801 72.8 193.801 72.8C199.001 78.8 192.601 75.8 192.601 75.8C186.601 74.2 193.601 84 193.601 84C194.801 85.8 185.801 81.2 185.801 81.2C176.601 80.6 188.201 87.8 188.201 87.8C196.801 95 185.401 90.6 185.401 90.6C180.801 88.8 184.001 95.6 184.001 95.6C187.201 97.2 204.401 104.2 204.401 104.2C204.801 108.001 201.801 113.001 201.801 113.001C202.201 117.001 200.001 120.401 200.001 120.401C198.801 128.601 198.201 129.401 198.201 129.401C194.001 129.601 186.601 143.401 186.601 143.401C184.801 146.001 174.601 158.001 174.601 158.001C172.601 165.001 154.601 157.801 154.601 157.801C148.001 161.201 150.001 157.801 150.001 157.801C149.601 155.601 154.401 149.601 154.401 149.601C161.401 147.001 158.801 136.201 158.801 136.201C162.801 134.801 151.601 132.001 151.801 130.801C152.001 129.601 157.801 128.201 157.801 128.201C165.801 126.201 161.401 123.801 161.401 123.801C160.801 119.801 163.801 114.201 163.801 114.201C175.401 113.401 163.801 97.2 163.801 97.2C153.001 89.6 152.001 83.8 152.001 83.8C164.601 75.6 156.401 63.2 156.601 59.6C156.801 56 158.001 34.4 158.001 34.4C156.001 28.2 153.001 14.6 153.001 14.6C155.201 9.4 162.601 -3.2 162.601 -3.2C165.401 -7.4 174.201 -12.2 172.001 -15.2C169.801 -18.2 162.001 -16.4 162.001 -16.4C154.201 -17.8 154.801 -12.6 154.801 -12.6C153.201 -11.6 152.401 -6.6 152.401 -6.6C151.68 1.333 142.801 7.6 142.801 7.6C131.601 13.8 140.801 17.8 140.801 17.8C146.801 24.4 137.001 24.6 137.001 24.6C126.001 22.8 134.201 33 134.201 33C145.001 45.8 142.001 48.6 142.001 48.6C131.801 49.6 144.401 58.8 144.401 58.8C144.401 58.8 143.601 56.8 143.801 58.6C144.001 60.4 147.001 64.6 147.801 66.6C148.601 68.6 144.601 68.8 144.601 68.8C145.201 78.4 129.801 74.2 129.801 74.2C129.801 74.2 129.801 74.2 128.201 74.4C126.601 74.6 115.401 73.8 109.601 71.6C103.801 69.4 97.001 69.4 97.001 69.4C97.001 69.4 93.001 71.2 85.4 71C77.8 70.8 69.8 73.6 69.8 73.6C65.4 73.2 74 68.8 74.2 69C74.4 69.2 80 63.6 72 64.2C50.203 65.835 39.4 55.6 39.4 55.6C37.4 54.2 34.8 51.4 34.8 51.4C24.8 49.4 36.2 63.8 36.2 63.8C37.4 65.2 36 66.2 36 66.2C35.2 64.6 27.4 59.2 27.4 59.2C24.589 58.227 23.226 56.893 20.895 54.407z"/> - </g> - <g style="fill: rgb(76, 0, 0);"> - <path d="M-3 42.8C-3 42.8 8.6 48.4 11.2 51.2C13.8 54 27.8 65.4 27.8 65.4C27.8 65.4 22.4 63.4 19.8 61.6C17.2 59.8 6.4 51.6 6.4 51.6C6.4 51.6 2.6 45.6 -3 42.8z"/> - </g> - <g style="fill: rgb(153, 204, 50);"> - <path d="M-61.009 11.603C-60.672 11.455 -61.196 8.743 -61.4 8.2C-62.422 5.474 -71.4 4 -71.4 4C-71.627 5.365 -71.682 6.961 -71.576 8.599C-71.576 8.599 -66.708 14.118 -61.009 11.603z"/> - </g> - <g style="fill: rgb(101, 153, 0);"> - <path d="M-61.009 11.403C-61.458 11.561 -61.024 8.669 -61.2 8.2C-62.222 5.474 -71.4 3.9 -71.4 3.9C-71.627 5.265 -71.682 6.861 -71.576 8.499C-71.576 8.499 -67.308 13.618 -61.009 11.403z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-65.4 11.546C-66.025 11.546 -66.531 10.406 -66.531 9C-66.531 7.595 -66.025 6.455 -65.4 6.455C-64.775 6.455 -64.268 7.595 -64.268 9C-64.268 10.406 -64.775 11.546 -65.4 11.546z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-65.4 9z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z"/> - </g> - <g style="fill: rgb(229, 153, 153);"> - <path d="M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z"/> - </g> - <g style="fill: rgb(178, 101, 101);"> - <path d="M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z"/> - </g> - <g style="fill: rgb(153, 38, 0);"> - <path d="M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6 71 -99.6 65.6C-96.6 60.2 -96.4 56.2 -92.4 54.6C-88.4 53 -82.4 44.4 -79.6 43.4C-76.8 42.4 -77 43.2 -77 43.2C-77 43.2 -70.2 28.4 -56.6 32.4C-56.6 32.4 -72.8 29.6 -57 20.2C-57 20.2 -61.8 21.3 -58.5 14.3C-56.299 9.632 -56.8 16.4 -67.8 28.2C-67.8 28.2 -72.8 36.8 -78 39.8C-83.2 42.8 -95.2 49.8 -96.4 53.6C-97.6 57.4 -100.8 63.2 -102.8 64.8C-104.8 66.4 -107.6 70.6 -108 74C-108 74 -109.2 78 -110.6 79.2C-112 80.4 -112.2 83.6 -112.2 85.6C-112.2 87.6 -114.2 90.4 -114 92.8C-114 92.8 -113.2 111.801 -113.6 113.801L-111.6 110.001z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M-120.2 114.601C-120.2 114.601 -122.2 113.201 -126.6 119.201C-126.6 119.201 -119.3 152.201 -119.3 153.601C-119.3 153.601 -118.2 151.501 -119.5 144.301C-120.8 137.101 -121.7 124.401 -121.7 124.401L-120.2 114.601z"/> - </g> - <g style="fill: rgb(153, 38, 0);"> - <path d="M-98.6 54C-98.6 54 -116.2 57.2 -115.8 86.4L-116.6 111.201C-116.6 111.201 -117.8 85.6 -119 84C-120.2 82.4 -116.2 71.2 -119.4 77.2C-119.4 77.2 -133.4 91.2 -125.4 112.401C-125.4 112.401 -123.9 115.701 -126.9 111.101C-126.9 111.101 -131.5 98.5 -130.4 92.1C-130.4 92.1 -130.2 89.9 -128.3 87.1C-128.3 87.1 -119.7 75.4 -117 73.1C-117 73.1 -115.2 58.7 -99.8 53.5C-99.8 53.5 -94.1 51.2 -98.6 54z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M40.8 -12.2C41.46 -12.554 41.451 -13.524 42.031 -13.697C43.18 -14.041 43.344 -15.108 43.862 -15.892C44.735 -17.211 44.928 -18.744 45.51 -20.235C45.782 -20.935 45.809 -21.89 45.496 -22.55C44.322 -25.031 43.62 -27.48 42.178 -29.906C41.91 -30.356 41.648 -31.15 41.447 -31.748C40.984 -33.132 39.727 -34.123 38.867 -35.443C38.579 -35.884 39.104 -36.809 38.388 -36.893C37.491 -36.998 36.042 -37.578 35.809 -36.552C35.221 -33.965 36.232 -31.442 37.2 -29C36.418 -28.308 36.752 -27.387 36.904 -26.62C37.614 -23.014 36.416 -19.662 35.655 -16.188C35.632 -16.084 35.974 -15.886 35.946 -15.824C34.724 -13.138 33.272 -10.693 31.453 -8.312C30.695 -7.32 29.823 -6.404 29.326 -5.341C28.958 -4.554 28.55 -3.588 28.8 -2.6C25.365 0.18 23.115 4.025 20.504 7.871C20.042 8.551 20.333 9.76 20.884 10.029C21.697 10.427 22.653 9.403 23.123 8.557C23.512 7.859 23.865 7.209 24.356 6.566C24.489 6.391 24.31 5.972 24.445 5.851C27.078 3.504 28.747 0.568 31.2 -1.8C33.15 -2.129 34.687 -3.127 36.435 -4.14C36.743 -4.319 37.267 -4.07 37.557 -4.265C39.31 -5.442 39.308 -7.478 39.414 -9.388C39.464 -10.272 39.66 -11.589 40.8 -12.2z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M31.959 -16.666C32.083 -16.743 31.928 -17.166 32.037 -17.382C32.199 -17.706 32.602 -17.894 32.764 -18.218C32.873 -18.434 32.71 -18.814 32.846 -18.956C35.179 -21.403 35.436 -24.427 34.4 -27.4C35.424 -28.02 35.485 -29.282 35.06 -30.129C34.207 -31.829 34.014 -33.755 33.039 -35.298C32.237 -36.567 30.659 -37.811 29.288 -36.508C28.867 -36.108 28.546 -35.321 28.824 -34.609C28.888 -34.446 29.173 -34.3 29.146 -34.218C29.039 -33.894 28.493 -33.67 28.487 -33.398C28.457 -31.902 27.503 -30.391 28.133 -29.062C28.905 -27.433 29.724 -25.576 30.4 -23.8C29.166 -21.684 30.199 -19.235 28.446 -17.358C28.31 -17.212 28.319 -16.826 28.441 -16.624C28.733 -16.138 29.139 -15.732 29.625 -15.44C29.827 -15.319 30.175 -15.317 30.375 -15.441C30.953 -15.803 31.351 -16.29 31.959 -16.666z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M94.771 -26.977C96.16 -25.185 96.45 -22.39 94.401 -21C94.951 -17.691 98.302 -19.67 100.401 -20.2C100.292 -20.588 100.519 -20.932 100.802 -20.937C101.859 -20.952 102.539 -21.984 103.601 -21.8C104.035 -23.357 105.673 -24.059 106.317 -25.439C108.043 -29.134 107.452 -33.407 104.868 -36.653C104.666 -36.907 104.883 -37.424 104.759 -37.786C104.003 -39.997 101.935 -40.312 100.001 -41C98.824 -44.875 98.163 -48.906 96.401 -52.6C94.787 -52.85 94.089 -54.589 92.752 -55.309C91.419 -56.028 90.851 -54.449 90.892 -53.403C90.899 -53.198 91.351 -52.974 91.181 -52.609C91.105 -52.445 90.845 -52.334 90.845 -52.2C90.846 -52.065 91.067 -51.934 91.201 -51.8C90.283 -50.98 88.86 -50.503 88.565 -49.358C87.611 -45.648 90.184 -42.523 91.852 -39.322C92.443 -38.187 91.707 -36.916 90.947 -35.708C90.509 -35.013 90.617 -33.886 90.893 -33.03C91.645 -30.699 93.236 -28.96 94.771 -26.977z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M57.611 -8.591C56.124 -6.74 52.712 -4.171 55.629 -2.243C55.823 -2.114 56.193 -2.11 56.366 -2.244C58.387 -3.809 60.39 -4.712 62.826 -5.294C62.95 -5.323 63.224 -4.856 63.593 -5.017C65.206 -5.72 67.216 -5.662 68.4 -7C72.167 -6.776 75.732 -7.892 79.123 -9.2C80.284 -9.648 81.554 -10.207 82.755 -10.709C84.131 -11.285 85.335 -12.213 86.447 -13.354C86.58 -13.49 86.934 -13.4 87.201 -13.4C87.161 -14.263 88.123 -14.39 88.37 -15.012C88.462 -15.244 88.312 -15.64 88.445 -15.742C90.583 -17.372 91.503 -19.39 90.334 -21.767C90.049 -22.345 89.8 -22.963 89.234 -23.439C88.149 -24.35 87.047 -23.496 86 -23.8C85.841 -23.172 85.112 -23.344 84.726 -23.146C83.867 -22.707 82.534 -23.292 81.675 -22.854C80.313 -22.159 79.072 -21.99 77.65 -21.613C77.338 -21.531 76.56 -21.627 76.4 -21C76.266 -21.134 76.118 -21.368 76.012 -21.346C74.104 -20.95 72.844 -20.736 71.543 -19.044C71.44 -18.911 70.998 -19.09 70.839 -18.955C69.882 -18.147 69.477 -16.913 68.376 -16.241C68.175 -16.118 67.823 -16.286 67.629 -16.157C66.983 -15.726 66.616 -15.085 65.974 -14.638C65.645 -14.409 65.245 -14.734 65.277 -14.99C65.522 -16.937 66.175 -18.724 65.6 -20.6C67.677 -23.12 70.194 -25.069 72 -27.8C72.015 -29.966 72.707 -32.112 72.594 -34.189C72.584 -34.382 72.296 -35.115 72.17 -35.462C71.858 -36.316 72.764 -37.382 71.92 -38.106C70.516 -39.309 69.224 -38.433 68.4 -37C66.562 -36.61 64.496 -35.917 62.918 -37.151C61.911 -37.938 61.333 -38.844 60.534 -39.9C59.549 -41.202 59.884 -42.638 59.954 -44.202C59.96 -44.33 59.645 -44.466 59.645 -44.6C59.646 -44.735 59.866 -44.866 60 -45C59.294 -45.626 59.019 -46.684 58 -47C58.305 -48.092 57.629 -48.976 56.758 -49.278C54.763 -49.969 53.086 -48.057 51.194 -47.984C50.68 -47.965 50.213 -49.003 49.564 -49.328C49.132 -49.544 48.428 -49.577 48.066 -49.311C47.378 -48.807 46.789 -48.693 46.031 -48.488C44.414 -48.052 43.136 -46.958 41.656 -46.103C40.171 -45.246 39.216 -43.809 38.136 -42.489C37.195 -41.337 37.059 -38.923 38.479 -38.423C40.322 -37.773 41.626 -40.476 43.592 -40.15C43.904 -40.099 44.11 -39.788 44 -39.4C44.389 -39.291 44.607 -39.52 44.8 -39.8C45.658 -38.781 46.822 -38.444 47.76 -37.571C48.73 -36.667 50.476 -37.085 51.491 -36.088C53.02 -34.586 52.461 -31.905 54.4 -30.6C53.814 -29.287 53.207 -28.01 52.872 -26.583C52.59 -25.377 53.584 -24.18 54.795 -24.271C56.053 -24.365 56.315 -25.124 56.8 -26.2C57.067 -25.933 57.536 -25.636 57.495 -25.42C57.038 -23.033 56.011 -21.04 55.553 -18.609C55.494 -18.292 55.189 -18.09 54.8 -18.2C54.332 -14.051 50.28 -11.657 47.735 -8.492C47.332 -7.99 47.328 -6.741 47.737 -6.338C49.14 -4.951 51.1 -6.497 52.8 -7C53.013 -8.206 53.872 -9.148 55.204 -9.092C55.46 -9.082 55.695 -9.624 56.019 -9.754C56.367 -9.892 56.869 -9.668 57.155 -9.866C58.884 -11.061 60.292 -12.167 62.03 -13.356C62.222 -13.487 62.566 -13.328 62.782 -13.436C63.107 -13.598 63.294 -13.985 63.617 -14.17C63.965 -14.37 64.207 -14.08 64.4 -13.8C63.754 -13.451 63.75 -12.494 63.168 -12.292C62.393 -12.024 61.832 -11.511 61.158 -11.064C60.866 -10.871 60.207 -11.119 60.103 -10.94C59.505 -9.912 58.321 -9.474 57.611 -8.591z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M2.2 -58C2.2 -58 -7.038 -60.872 -18.2 -35.2C-18.2 -35.2 -20.6 -30 -23 -28C-25.4 -26 -36.6 -22.4 -38.6 -18.4L-49 -2.4C-49 -2.4 -34.2 -18.4 -31 -20.8C-31 -20.8 -23 -29.2 -26.2 -22.4C-26.2 -22.4 -40.2 -11.6 -39 -2.4C-39 -2.4 -44.6 12 -45.4 14C-45.4 14 -29.4 -18 -27 -19.2C-24.6 -20.4 -23.4 -20.4 -24.6 -16.8C-25.8 -13.2 -26.2 3.2 -29 5.2C-29 5.2 -21 -15.2 -21.8 -18.4C-21.8 -18.4 -18.6 -22 -16.2 -16.8L-17.4 -0.8L-13 11.2C-13 11.2 -15.4 0 -13.8 -15.6C-13.8 -15.6 -15.8 -26 -11.8 -20.4C-7.8 -14.8 1.8 -8.8 1.8 -4C1.8 -4 -3.4 -21.6 -12.6 -26.4L-16.6 -20.4L-17.8 -22.4C-17.8 -22.4 -21.4 -23.2 -17 -30C-12.6 -36.8 -13 -37.6 -13 -37.6C-13 -37.6 -6.6 -30.4 -5 -30.4C-5 -30.4 8.2 -38 9.4 -13.6C9.4 -13.6 16.2 -28 7 -34.8C7 -34.8 -7.8 -36.8 -6.6 -42L0.6 -54.4C4.2 -59.6 2.6 -56.8 2.6 -56.8z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-17.8 -41.6C-17.8 -41.6 -30.6 -41.6 -33.8 -36.4L-41 -26.8C-41 -26.8 -23.8 -36.8 -19.8 -38C-15.8 -39.2 -17.8 -41.6 -17.8 -41.6z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-57.8 -35.2C-57.8 -35.2 -59.8 -34 -60.2 -31.2C-60.6 -28.4 -63 -28 -62.2 -25.2C-61.4 -22.4 -59.4 -20 -59.4 -24C-59.4 -28 -57.8 -30 -57 -31.2C-56.2 -32.4 -54.6 -36.8 -57.8 -35.2z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-66.6 26C-66.6 26 -75 22 -78.2 18.4C-81.4 14.8 -80.948 19.966 -85.8 19.6C-91.647 19.159 -90.6 3.2 -90.6 3.2L-94.6 10.8C-94.6 10.8 -95.8 25.2 -87.8 22.8C-83.893 21.628 -82.6 23.2 -84.2 24C-85.8 24.8 -78.6 25.2 -81.4 26.8C-84.2 28.4 -69.8 23.2 -72.2 33.6L-66.6 26z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-79.2 40.4C-79.2 40.4 -94.6 44.8 -98.2 35.2C-98.2 35.2 -103 37.6 -100.8 40.6C-98.6 43.6 -97.4 44 -97.4 44C-97.4 44 -92 45.2 -92.6 46C-93.2 46.8 -95.6 50.2 -95.6 50.2C-95.6 50.2 -85.4 44.2 -79.2 40.4z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M149.201 118.601C148.774 120.735 147.103 121.536 145.201 122.201C143.284 121.243 140.686 118.137 138.801 120.201C138.327 119.721 137.548 119.661 137.204 118.999C136.739 118.101 137.011 117.055 136.669 116.257C136.124 114.985 135.415 113.619 135.601 112.201C137.407 111.489 138.002 109.583 137.528 107.82C137.459 107.563 137.03 107.366 137.23 107.017C137.416 106.694 137.734 106.467 138.001 106.2C137.866 106.335 137.721 106.568 137.61 106.548C137 106.442 137.124 105.805 137.254 105.418C137.839 103.672 139.853 103.408 141.201 104.6C141.457 104.035 141.966 104.229 142.401 104.2C142.351 103.621 142.759 103.094 142.957 102.674C143.475 101.576 145.104 102.682 145.901 102.07C146.977 101.245 148.04 100.546 149.118 101.149C150.927 102.162 152.636 103.374 153.835 105.115C154.41 105.949 154.65 107.23 154.592 108.188C154.554 108.835 153.173 108.483 152.83 109.412C152.185 111.16 154.016 111.679 154.772 113.017C154.97 113.366 154.706 113.67 154.391 113.768C153.98 113.896 153.196 113.707 153.334 114.16C154.306 117.353 151.55 118.031 149.201 118.601z"/> - </g> - <g style="fill: rgb(255, 255, 255);"> - <path d="M139.6 138.201C139.593 136.463 137.992 134.707 139.201 133.001C139.336 133.135 139.467 133.356 139.601 133.356C139.736 133.356 139.867 133.135 140.001 133.001C141.496 135.217 145.148 136.145 145.006 138.991C144.984 139.438 143.897 140.356 144.801 141.001C142.988 142.349 142.933 144.719 142.001 146.601C140.763 146.315 139.551 145.952 138.401 145.401C138.753 143.915 138.636 142.231 139.456 140.911C139.89 140.213 139.603 139.134 139.6 138.201z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-26.6 129.201C-26.6 129.201 -43.458 139.337 -29.4 124.001C-20.6 114.401 -10.6 108.801 -10.6 108.801C-10.6 108.801 -0.2 104.4 3.4 103.2C7 102 22.2 96.8 25.4 96.4C28.6 96 38.2 92 45 96C51.8 100 59.8 104.4 59.8 104.4C59.8 104.4 43.4 96 39.8 98.4C36.2 100.8 29 100.4 23 103.6C23 103.6 8.2 108.001 5 110.001C1.8 112.001 -8.6 123.601 -10.2 122.801C-11.8 122.001 -9.8 121.601 -8.6 118.801C-7.4 116.001 -9.4 114.401 -17.4 120.801C-25.4 127.201 -26.6 129.201 -26.6 129.201z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-19.195 123.234C-19.195 123.234 -17.785 110.194 -9.307 111.859C-9.307 111.859 -1.081 107.689 1.641 105.721C1.641 105.721 9.78 104.019 11.09 103.402C29.569 94.702 44.288 99.221 44.835 98.101C45.381 96.982 65.006 104.099 68.615 108.185C69.006 108.628 58.384 102.588 48.686 100.697C40.413 99.083 18.811 100.944 7.905 106.48C4.932 107.989 -4.013 113.773 -6.544 113.662C-9.075 113.55 -19.195 123.234 -19.195 123.234z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-23 148.801C-23 148.801 -38.2 146.401 -21.4 144.801C-21.4 144.801 -3.4 142.801 0.6 137.601C0.6 137.601 14.2 128.401 17 128.001C19.8 127.601 49.8 120.401 50.2 118.001C50.6 115.601 56.2 115.601 57.8 116.401C59.4 117.201 58.6 118.401 55.8 119.201C53 120.001 21.8 136.401 15.4 137.601C9 138.801 -2.6 146.401 -7.4 147.601C-12.2 148.801 -23 148.801 -23 148.801z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-3.48 141.403C-3.48 141.403 -12.062 140.574 -3.461 139.755C-3.461 139.755 5.355 136.331 7.403 133.668C7.403 133.668 14.367 128.957 15.8 128.753C17.234 128.548 31.194 124.861 31.399 123.633C31.604 122.404 65.67 109.823 70.09 113.013C73.001 115.114 63.1 113.437 53.466 117.847C52.111 118.467 18.258 133.054 14.981 133.668C11.704 134.283 5.765 138.174 3.307 138.788C0.85 139.403 -3.48 141.403 -3.48 141.403z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-11.4 143.601C-11.4 143.601 -6.2 143.201 -7.4 144.801C-8.6 146.401 -11 145.601 -11 145.601L-11.4 143.601z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-18.6 145.201C-18.6 145.201 -13.4 144.801 -14.6 146.401C-15.8 148.001 -18.2 147.201 -18.2 147.201L-18.6 145.201z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-29 146.801C-29 146.801 -23.8 146.401 -25 148.001C-26.2 149.601 -28.6 148.801 -28.6 148.801L-29 146.801z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-36.6 147.601C-36.6 147.601 -31.4 147.201 -32.6 148.801C-33.8 150.401 -36.2 149.601 -36.2 149.601L-36.6 147.601z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M1.8 108.001C1.8 108.001 6.2 108.001 5 109.601C3.8 111.201 0.6 110.801 0.6 110.801L1.8 108.001z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-8.2 113.601C-8.2 113.601 -1.694 111.46 -4.2 114.801C-5.4 116.401 -7.8 115.601 -7.8 115.601L-8.2 113.601z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-19.4 118.401C-19.4 118.401 -14.2 118.001 -15.4 119.601C-16.6 121.201 -19 120.401 -19 120.401L-19.4 118.401z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-27 124.401C-27 124.401 -21.8 124.001 -23 125.601C-24.2 127.201 -26.6 126.401 -26.6 126.401L-27 124.401z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-33.8 129.201C-33.8 129.201 -28.6 128.801 -29.8 130.401C-31 132.001 -33.4 131.201 -33.4 131.201L-33.8 129.201z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M5.282 135.598C5.282 135.598 12.203 135.066 10.606 137.195C9.009 139.325 5.814 138.26 5.814 138.26L5.282 135.598z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M15.682 130.798C15.682 130.798 22.603 130.266 21.006 132.395C19.409 134.525 16.214 133.46 16.214 133.46L15.682 130.798z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M26.482 126.398C26.482 126.398 33.403 125.866 31.806 127.995C30.209 130.125 27.014 129.06 27.014 129.06L26.482 126.398z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M36.882 121.598C36.882 121.598 43.803 121.066 42.206 123.195C40.609 125.325 37.414 124.26 37.414 124.26L36.882 121.598z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M9.282 103.598C9.282 103.598 16.203 103.066 14.606 105.195C13.009 107.325 9.014 107.06 9.014 107.06L9.282 103.598z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M19.282 100.398C19.282 100.398 26.203 99.866 24.606 101.995C23.009 104.125 18.614 103.86 18.614 103.86L19.282 100.398z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-3.4 140.401C-3.4 140.401 1.8 140.001 0.6 141.601C-0.6 143.201 -3 142.401 -3 142.401L-3.4 140.401z"/> - </g> - <g style="fill: rgb(153, 38, 0);"> - <path d="M-76.6 41.2C-76.6 41.2 -81 50 -81.4 53.2C-81.4 53.2 -80.6 44.4 -79.4 42.4C-78.2 40.4 -76.6 41.2 -76.6 41.2z"/> - </g> - <g style="fill: rgb(153, 38, 0);"> - <path d="M-95 55.2C-95 55.2 -98.2 69.6 -97.8 72.4C-97.8 72.4 -99 60.8 -98.6 59.6C-98.2 58.4 -95 55.2 -95 55.2z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-74.2 -19.4L-74.4 -16.2L-76.6 -16C-76.6 -16 -62.4 -3.4 -61.8 4.2C-61.8 4.2 -61 -4 -74.2 -19.4z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-70.216 -18.135C-70.647 -18.551 -70.428 -19.296 -70.836 -19.556C-71.645 -20.072 -69.538 -20.129 -69.766 -20.845C-70.149 -22.051 -69.962 -22.072 -70.084 -23.348C-70.141 -23.946 -69.553 -25.486 -69.168 -25.926C-67.722 -27.578 -69.046 -30.51 -67.406 -32.061C-67.102 -32.35 -66.726 -32.902 -66.441 -33.32C-65.782 -34.283 -64.598 -34.771 -63.648 -35.599C-63.33 -35.875 -63.531 -36.702 -62.962 -36.61C-62.248 -36.495 -61.007 -36.625 -61.052 -35.784C-61.165 -33.664 -62.494 -31.944 -63.774 -30.276C-63.323 -29.572 -63.781 -28.937 -64.065 -28.38C-65.4 -25.76 -65.211 -22.919 -65.385 -20.079C-65.39 -19.994 -65.697 -19.916 -65.689 -19.863C-65.336 -17.528 -64.752 -15.329 -63.873 -13.1C-63.507 -12.17 -63.036 -11.275 -62.886 -10.348C-62.775 -9.662 -62.672 -8.829 -63.08 -8.124C-61.045 -5.234 -62.354 -2.583 -61.185 0.948C-60.978 1.573 -59.286 3.487 -59.749 3.326C-62.262 2.455 -62.374 2.057 -62.551 1.304C-62.697 0.681 -63.027 -0.696 -63.264 -1.298C-63.328 -1.462 -63.499 -3.346 -63.577 -3.468C-65.09 -5.85 -63.732 -5.674 -65.102 -8.032C-66.53 -8.712 -67.496 -9.816 -68.619 -10.978C-68.817 -11.182 -67.674 -11.906 -67.855 -12.119C-68.947 -13.408 -70.1 -14.175 -69.764 -15.668C-69.609 -16.358 -69.472 -17.415 -70.216 -18.135z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-73.8 -16.4C-73.8 -16.4 -73.4 -9.6 -71 -8C-68.6 -6.4 -69.8 -7.2 -73 -8.4C-76.2 -9.6 -75 -10.4 -75 -10.4C-75 -10.4 -77.8 -10 -75.4 -8C-73 -6 -69.4 -3.6 -71 -3.6C-72.6 -3.6 -80.2 -7.6 -80.2 -10.4C-80.2 -13.2 -81.2 -17.3 -81.2 -17.3C-81.2 -17.3 -80.1 -18.1 -75.3 -18C-75.3 -18 -73.9 -17.3 -73.8 -16.4z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-74.6 2.2C-74.6 2.2 -83.12 -0.591 -101.6 2.8C-101.6 2.8 -92.569 0.722 -73.8 3C-63.5 4.25 -74.6 2.2 -74.6 2.2z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-72.502 2.129C-72.502 2.129 -80.748 -1.389 -99.453 0.392C-99.453 0.392 -90.275 -0.897 -71.774 2.995C-61.62 5.131 -72.502 2.129 -72.502 2.129z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-70.714 2.222C-70.714 2.222 -78.676 -1.899 -97.461 -1.514C-97.461 -1.514 -88.213 -2.118 -70.052 3.14C-60.086 6.025 -70.714 2.222 -70.714 2.222z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-69.444 2.445C-69.444 2.445 -76.268 -1.862 -93.142 -2.96C-93.142 -2.96 -84.803 -2.79 -68.922 3.319C-60.206 6.672 -69.444 2.445 -69.444 2.445z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M45.84 12.961C45.84 12.961 44.91 13.605 45.124 12.424C45.339 11.243 73.547 -1.927 77.161 -1.677C77.161 -1.677 46.913 11.529 45.84 12.961z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M42.446 13.6C42.446 13.6 41.57 14.315 41.691 13.121C41.812 11.927 68.899 -3.418 72.521 -3.452C72.521 -3.452 43.404 12.089 42.446 13.6z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M39.16 14.975C39.16 14.975 38.332 15.747 38.374 14.547C38.416 13.348 58.233 -2.149 68.045 -4.023C68.045 -4.023 50.015 4.104 39.16 14.975z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M36.284 16.838C36.284 16.838 35.539 17.532 35.577 16.453C35.615 15.373 53.449 1.426 62.28 -0.26C62.28 -0.26 46.054 7.054 36.284 16.838z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M4.6 164.801C4.6 164.801 -10.6 162.401 6.2 160.801C6.2 160.801 24.2 158.801 28.2 153.601C28.2 153.601 41.8 144.401 44.6 144.001C47.4 143.601 63.8 140.001 64.2 137.601C64.6 135.201 70.6 132.801 72.2 133.601C73.8 134.401 73.8 143.601 71 144.401C68.2 145.201 49.4 152.401 43 153.601C36.6 154.801 25 162.401 20.2 163.601C15.4 164.801 4.6 164.801 4.6 164.801z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M77.6 127.401C77.6 127.401 74.6 129.001 73.4 131.601C73.4 131.601 67 142.201 52.8 145.401C52.8 145.401 29.8 154.401 22 156.401C22 156.401 8.6 161.401 1.2 160.601C1.2 160.601 -5.8 160.801 0.4 162.401C0.4 162.401 20.6 160.401 24 158.601C24 158.601 39.6 153.401 42.6 150.801C45.6 148.201 63.8 143.201 66 141.201C68.2 139.201 78 130.801 77.6 127.401z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M18.882 158.911C18.882 158.911 24.111 158.685 22.958 160.234C21.805 161.784 19.357 160.91 19.357 160.91L18.882 158.911z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M11.68 160.263C11.68 160.263 16.908 160.037 15.756 161.586C14.603 163.136 12.155 162.263 12.155 162.263L11.68 160.263z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M1.251 161.511C1.251 161.511 6.48 161.284 5.327 162.834C4.174 164.383 1.726 163.51 1.726 163.51L1.251 161.511z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-6.383 162.055C-6.383 162.055 -1.154 161.829 -2.307 163.378C-3.46 164.928 -5.908 164.054 -5.908 164.054L-6.383 162.055z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M35.415 151.513C35.415 151.513 42.375 151.212 40.84 153.274C39.306 155.336 36.047 154.174 36.047 154.174L35.415 151.513z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M45.73 147.088C45.73 147.088 51.689 143.787 51.155 148.849C50.885 151.405 46.362 149.749 46.362 149.749L45.73 147.088z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M54.862 144.274C54.862 144.274 62.021 140.573 60.287 146.035C59.509 148.485 55.493 146.935 55.493 146.935L54.862 144.274z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M64.376 139.449C64.376 139.449 68.735 134.548 69.801 141.21C70.207 143.748 65.008 142.11 65.008 142.11L64.376 139.449z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M26.834 155.997C26.834 155.997 32.062 155.77 30.91 157.32C29.757 158.869 27.308 157.996 27.308 157.996L26.834 155.997z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M62.434 34.603C62.434 34.603 61.708 35.268 61.707 34.197C61.707 33.127 79.191 19.863 88.034 18.479C88.034 18.479 71.935 25.208 62.434 34.603z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M65.4 98.4C65.4 98.4 87.401 120.801 96.601 124.401C96.601 124.401 105.801 135.601 101.801 161.601C101.801 161.601 98.601 169.201 95.401 148.401C95.401 148.401 98.601 123.201 87.401 139.201C87.401 139.201 79 129.301 85.4 129.601C85.4 129.601 88.601 131.601 89.001 130.001C89.401 128.401 81.4 114.801 64.2 100.4C47 86 65.4 98.4 65.4 98.4z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M7 137.201C7 137.201 6.8 135.401 8.6 136.201C10.4 137.001 104.601 143.201 136.201 167.201C136.201 167.201 91.001 144.001 7 137.201z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M17.4 132.801C17.4 132.801 17.2 131.001 19 131.801C20.8 132.601 157.401 131.601 181.001 164.001C181.001 164.001 159.001 138.801 17.4 132.801z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M29 128.801C29 128.801 28.8 127.001 30.6 127.801C32.4 128.601 205.801 115.601 229.401 148.001C229.401 148.001 219.801 122.401 29 128.801z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M39 124.001C39 124.001 38.8 122.201 40.6 123.001C42.4 123.801 164.601 85.2 188.201 117.601C188.201 117.601 174.801 93 39 124.001z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-19 146.801C-19 146.801 -19.2 145.001 -17.4 145.801C-15.6 146.601 2.2 148.801 4.2 187.601C4.2 187.601 -3 145.601 -19 146.801z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-27.8 148.401C-27.8 148.401 -28 146.601 -26.2 147.401C-24.4 148.201 -10.2 143.601 -13 182.401C-13 182.401 -11.8 147.201 -27.8 148.401z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-35.8 148.801C-35.8 148.801 -36 147.001 -34.2 147.801C-32.4 148.601 -17 149.201 -29.4 171.601C-29.4 171.601 -19.8 147.601 -35.8 148.801z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M11.526 104.465C11.526 104.465 11.082 106.464 12.631 105.247C28.699 92.622 61.141 33.72 116.826 28.086C116.826 28.086 78.518 15.976 11.526 104.465z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M22.726 102.665C22.726 102.665 21.363 101.472 23.231 100.847C25.099 100.222 137.541 27.72 176.826 35.686C176.826 35.686 149.719 28.176 22.726 102.665z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M1.885 108.767C1.885 108.767 1.376 110.366 3.087 109.39C12.062 104.27 15.677 47.059 59.254 45.804C59.254 45.804 26.843 31.09 1.885 108.767z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-18.038 119.793C-18.038 119.793 -19.115 121.079 -17.162 120.825C-6.916 119.493 14.489 78.222 58.928 83.301C58.928 83.301 26.962 68.955 -18.038 119.793z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-6.8 113.667C-6.8 113.667 -7.611 115.136 -5.742 114.511C4.057 111.237 17.141 66.625 61.729 63.078C61.729 63.078 27.603 55.135 -6.8 113.667z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-25.078 124.912C-25.078 124.912 -25.951 125.954 -24.369 125.748C-16.07 124.669 1.268 91.24 37.264 95.354C37.264 95.354 11.371 83.734 -25.078 124.912z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-32.677 130.821C-32.677 130.821 -33.682 131.866 -32.091 131.748C-27.923 131.439 2.715 98.36 21.183 113.862C21.183 113.862 9.168 95.139 -32.677 130.821z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M36.855 98.898C36.855 98.898 35.654 97.543 37.586 97.158C39.518 96.774 160.221 39.061 198.184 51.927C198.184 51.927 172.243 41.053 36.855 98.898z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M3.4 163.201C3.4 163.201 3.2 161.401 5 162.201C6.8 163.001 22.2 163.601 9.8 186.001C9.8 186.001 19.4 162.001 3.4 163.201z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M13.8 161.601C13.8 161.601 13.6 159.801 15.4 160.601C17.2 161.401 35 163.601 37 202.401C37 202.401 29.8 160.401 13.8 161.601z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M20.6 160.001C20.6 160.001 20.4 158.201 22.2 159.001C24 159.801 48.6 163.201 72.2 195.601C72.2 195.601 36.6 158.801 20.6 160.001z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M28.225 157.972C28.225 157.972 27.788 156.214 29.678 156.768C31.568 157.322 52.002 155.423 90.099 189.599C90.099 189.599 43.924 154.656 28.225 157.972z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M38.625 153.572C38.625 153.572 38.188 151.814 40.078 152.368C41.968 152.922 76.802 157.423 128.499 192.399C128.499 192.399 54.324 150.256 38.625 153.572z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-1.8 142.001C-1.8 142.001 -2 140.201 -0.2 141.001C1.6 141.801 55 144.401 85.4 171.201C85.4 171.201 50.499 146.426 -1.8 142.001z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M-11.8 146.001C-11.8 146.001 -12 144.201 -10.2 145.001C-8.4 145.801 16.2 149.201 39.8 181.601C39.8 181.601 4.2 144.801 -11.8 146.001z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M49.503 148.962C49.503 148.962 48.938 147.241 50.864 147.655C52.79 148.068 87.86 150.004 141.981 181.098C141.981 181.098 64.317 146.704 49.503 148.962z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M57.903 146.562C57.903 146.562 57.338 144.841 59.264 145.255C61.19 145.668 96.26 147.604 150.381 178.698C150.381 178.698 73.317 143.904 57.903 146.562z"/> - </g> - <g style="fill: rgb(255, 255, 255); stroke: rgb(0, 0, 0); stroke-width: 0.1;"> - <path d="M67.503 141.562C67.503 141.562 66.938 139.841 68.864 140.255C70.79 140.668 113.86 145.004 203.582 179.298C203.582 179.298 82.917 138.904 67.503 141.562z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-43.8 148.401C-43.8 148.401 -38.6 148.001 -39.8 149.601C-41 151.201 -43.4 150.401 -43.4 150.401L-43.8 148.401z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-13 162.401C-13 162.401 -7.8 162.001 -9 163.601C-10.2 165.201 -12.6 164.401 -12.6 164.401L-13 162.401z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-21.8 162.001C-21.8 162.001 -16.6 161.601 -17.8 163.201C-19 164.801 -21.4 164.001 -21.4 164.001L-21.8 162.001z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-117.169 150.182C-117.169 150.182 -112.124 151.505 -113.782 152.624C-115.439 153.744 -117.446 152.202 -117.446 152.202L-117.169 150.182z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-115.169 140.582C-115.169 140.582 -110.124 141.905 -111.782 143.024C-113.439 144.144 -115.446 142.602 -115.446 142.602L-115.169 140.582z"/> - </g> - <g style="fill: rgb(0, 0, 0);"> - <path d="M-122.369 136.182C-122.369 136.182 -117.324 137.505 -118.982 138.624C-120.639 139.744 -122.646 138.202 -122.646 138.202L-122.369 136.182z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-42.6 211.201C-42.6 211.201 -44.2 211.201 -48.2 213.201C-50.2 213.201 -61.4 216.801 -67 226.801C-67 226.801 -54.6 217.201 -42.6 211.201z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M45.116 303.847C45.257 304.105 45.312 304.525 45.604 304.542C46.262 304.582 47.495 304.883 47.37 304.247C46.522 299.941 45.648 295.004 41.515 293.197C40.876 292.918 39.434 293.331 39.36 294.215C39.233 295.739 39.116 297.088 39.425 298.554C39.725 299.975 41.883 299.985 42.8 298.601C43.736 300.273 44.168 302.116 45.116 303.847z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M34.038 308.581C34.786 309.994 34.659 311.853 36.074 312.416C36.814 312.71 38.664 311.735 38.246 310.661C37.444 308.6 37.056 306.361 35.667 304.55C35.467 304.288 35.707 303.755 35.547 303.427C34.953 302.207 33.808 301.472 32.4 301.801C31.285 304.004 32.433 306.133 33.955 307.842C34.091 307.994 33.925 308.37 34.038 308.581z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-5.564 303.391C-5.672 303.014 -5.71 302.551 -5.545 302.23C-5.014 301.197 -4.221 300.075 -4.558 299.053C-4.906 297.997 -6.022 298.179 -6.672 298.748C-7.807 299.742 -7.856 301.568 -8.547 302.927C-8.743 303.313 -8.692 303.886 -9.133 304.277C-9.607 304.698 -10.047 306.222 -9.951 306.793C-9.898 307.106 -10.081 317.014 -9.859 316.751C-9.24 316.018 -6.19 306.284 -6.121 305.392C-6.064 304.661 -5.332 304.196 -5.564 303.391z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-31.202 296.599C-28.568 294.1 -25.778 291.139 -26.22 287.427C-26.336 286.451 -28.111 286.978 -28.298 287.824C-29.1 291.449 -31.139 294.11 -33.707 296.502C-35.903 298.549 -37.765 304.893 -38 305.401C-34.303 300.145 -32.046 297.399 -31.202 296.599z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-44.776 290.635C-44.253 290.265 -44.555 289.774 -44.338 289.442C-43.385 287.984 -42.084 286.738 -42.066 285C-42.063 284.723 -42.441 284.414 -42.776 284.638C-43.053 284.822 -43.395 284.952 -43.503 285.082C-45.533 287.531 -46.933 290.202 -48.376 293.014C-48.559 293.371 -49.703 297.862 -49.39 297.973C-49.151 298.058 -47.431 293.877 -47.221 293.763C-45.958 293.077 -45.946 291.462 -44.776 290.635z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-28.043 310.179C-27.599 309.31 -26.023 308.108 -26.136 307.219C-26.254 306.291 -25.786 304.848 -26.698 305.536C-27.955 306.484 -31.404 307.833 -31.674 313.641C-31.7 314.212 -28.726 311.519 -28.043 310.179z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-13.6 293.001C-13.2 292.333 -12.492 292.806 -12.033 292.543C-11.385 292.171 -10.774 291.613 -10.482 290.964C-9.512 288.815 -7.743 286.995 -7.6 284.601C-9.091 283.196 -9.77 285.236 -10.4 286.201C-11.723 284.554 -12.722 286.428 -14.022 286.947C-14.092 286.975 -14.305 286.628 -14.38 286.655C-15.557 287.095 -16.237 288.176 -17.235 288.957C-17.406 289.091 -17.811 288.911 -17.958 289.047C-18.61 289.65 -19.583 289.975 -19.863 290.657C-20.973 293.364 -24.113 295.459 -26 303.001C-25.619 303.91 -21.488 296.359 -21.001 295.661C-20.165 294.465 -20.047 297.322 -18.771 296.656C-18.72 296.629 -18.534 296.867 -18.4 297.001C-18.206 296.721 -17.988 296.492 -17.6 296.601C-17.6 296.201 -17.734 295.645 -17.533 295.486C-16.296 294.509 -16.38 293.441 -15.6 292.201C-15.142 292.99 -14.081 292.271 -13.6 293.001z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M46.2 347.401C46.2 347.401 53.6 327.001 49.2 315.801C49.2 315.801 60.6 337.401 56 348.601C56 348.601 55.6 338.201 51.6 333.201C51.6 333.201 47.6 346.001 46.2 347.401z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M31.4 344.801C31.4 344.801 36.8 336.001 28.8 317.601C28.8 317.601 28 338.001 21.2 349.001C21.2 349.001 35.4 328.801 31.4 344.801z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M21.4 342.801C21.4 342.801 21.2 322.801 21.6 319.801C21.6 319.801 17.8 336.401 7.6 346.001C7.6 346.001 22 334.001 21.4 342.801z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M11.8 310.801C11.8 310.801 17.8 324.401 7.8 342.801C7.8 342.801 14.2 330.601 9.4 323.601C9.4 323.601 12 320.201 11.8 310.801z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-7.4 342.401C-7.4 342.401 -8.4 326.801 -6.6 324.601C-6.6 324.601 -6.4 318.201 -6.8 317.201C-6.8 317.201 -2.8 311.001 -2.6 318.401C-2.6 318.401 -1.2 326.201 1.6 330.801C1.6 330.801 5.2 336.201 5 342.601C5 342.601 -5 312.401 -7.4 342.401z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-11 314.801C-11 314.801 -17.6 325.601 -19.4 344.601C-19.4 344.601 -20.8 338.401 -17 324.001C-17 324.001 -12.8 308.601 -11 314.801z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-32.8 334.601C-32.8 334.601 -27.8 329.201 -26.4 324.201C-26.4 324.201 -22.8 308.401 -29.2 317.001C-29.2 317.001 -29 325.001 -37.2 332.401C-37.2 332.401 -32.4 330.001 -32.8 334.601z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-38.6 329.601C-38.6 329.601 -35.2 312.201 -34.4 311.401C-34.4 311.401 -32.6 308.001 -35.4 311.201C-35.4 311.201 -44.2 330.401 -48.2 337.001C-48.2 337.001 -40.2 327.801 -38.6 329.601z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-44.4 313.001C-44.4 313.001 -32.8 290.601 -54.6 316.401C-54.6 316.401 -43.6 306.601 -44.4 313.001z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M-59.8 298.401C-59.8 298.401 -55 279.601 -52.4 279.801C-52.4 279.801 -44.2 270.801 -50.8 281.401C-50.8 281.401 -56.8 291.001 -56.2 300.801C-56.2 300.801 -56.8 291.201 -59.8 298.401z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M270.5 287C270.5 287 258.5 277 256 273.5C256 273.5 269.5 292 269.5 299C269.5 299 272 291.5 270.5 287z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M276 265C276 265 255 250 251.5 242.5C251.5 242.5 278 272 278 276.5C278 276.5 278.5 267.5 276 265z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M293 111C293 111 281 103 279.5 105C279.5 105 290 111.5 292.5 120C292.5 120 291 111 293 111z"/> - </g> - <g style="fill: rgb(204, 204, 204);"> - <path d="M301.5 191.5L284 179.5C284 179.5 303 196.5 303.5 200.5L301.5 191.5z"/> - </g> - <g style="stroke: rgb(0, 0, 0);"> - <path d="M-89.25 169L-67.25 173.75"/> - </g> - <g style="stroke: rgb(0, 0, 0);"> - <path d="M-39 331C-39 331 -39.5 327.5 -48.5 338"/> - </g> - <g style="stroke: rgb(0, 0, 0);"> - <path d="M-33.5 336C-33.5 336 -31.5 329.5 -38 334"/> - </g> - <g style="stroke: rgb(0, 0, 0);"> - <path d="M20.5 344.5C20.5 344.5 22 333.5 10.5 346.5"/> - </g> -</g> -</svg> \ No newline at end of file diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.wmf b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.wmf deleted file mode 100644 index 34c0b52dbc1be83b8baa3c57a6d47896d51b73b3..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger.wmf and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger2.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger2.png deleted file mode 100644 index af427426212423f9502ca0a500898fd488321b00..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger2.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger2.wmf b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger2.wmf deleted file mode 100644 index c60c75acbfd1eb34d0f08f6638bc8b865d00eb46..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger2.wmf and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger24trns.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger24trns.png deleted file mode 100644 index e3b3e0c54640e2648c8aa34921d52f6ee4e55d08..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger24trns.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px300dpi.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px300dpi.jpg deleted file mode 100644 index 142415d5792ef3e15028af277fbc77247a6f3c27..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px300dpi.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px300dpi.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px300dpi.png deleted file mode 100644 index 62f74059061422efe2d5908d90cc3e2fcbf5689c..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px300dpi.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px72dpi.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px72dpi.jpg deleted file mode 100644 index 168ca38ed847475fabeaf097ec785bb588b74ed9..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px72dpi.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px96dpi.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px96dpi.jpg deleted file mode 100644 index 82531f3484916cf80cecf4b95343dcca5287fa4d..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px96dpi.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px96dpi.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px96dpi.png deleted file mode 100644 index 67174a76cf81ef163cfe7b5908ade64c39ae3107..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger300px96dpi.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger8trns.gif b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger8trns.gif deleted file mode 100644 index d46053b22f4a2c28ec083e8d2bb501874f5638c3..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger8trns.gif and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger8trns.png b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger8trns.png deleted file mode 100644 index a34ddca1493743cc3811fe30563c36149a330b2f..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tiger8trns.png and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tigercmyk.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tigercmyk.jpg deleted file mode 100644 index ee8e70234833be777223c6408ef6a541cceb4748..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tigercmyk.jpg and /dev/null differ diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tux.svg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/tux.svg deleted file mode 100644 index de8c86968860773407d2e52ed5805447b9400c61..0000000000000000000000000000000000000000 --- a/~dev_rating/modules/mpdf/vendor/mpdf/examples/tux.svg +++ /dev/null @@ -1,1487 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="500pt" - height="600pt" - id="svg5620" - sodipodi:version="0.32" - inkscape:version="0.46" - sodipodi:docname="mh_inksc_100511_NewTux.svg" - inkscape:output_extension="org.inkscape.output.svg.inkscape" - inkscape:export-filename="/media/disk/※T h i n g S/UB SOFTWARE/Openclipart/mh_inksc_100511_NewTux.png" - inkscape:export-xdpi="150.03999" - inkscape:export-ydpi="150.03999"> - <metadata - id="metadata5712"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - inkscape:window-height="728" - inkscape:window-width="1280" - inkscape:pageshadow="2" - inkscape:pageopacity="0.0" - guidetolerance="10.0" - gridtolerance="10.0" - objecttolerance="10.0" - borderopacity="1.0" - bordercolor="#666666" - pagecolor="#ffffff" - id="base" - showgrid="false" - inkscape:zoom="0.65866667" - inkscape:cx="837.03841" - inkscape:cy="362.33556" - inkscape:window-x="0" - inkscape:window-y="24" - inkscape:current-layer="svg5620" - showguides="true" - inkscape:guide-bbox="true" /> - <defs - id="defs5622"> - <linearGradient - id="linearGradient6810"> - <stop - id="stop6812" - offset="0" - style="stop-color:#ffffff;stop-opacity:0.04385965;" /> - <stop - style="stop-color:#ffffff;stop-opacity:0.35964912;" - offset="0.46429399" - id="stop6816" /> - <stop - id="stop6814" - offset="1" - style="stop-color:#ffffff;stop-opacity:0;" /> - </linearGradient> - <inkscape:perspective - sodipodi:type="inkscape:persp3d" - inkscape:vp_x="0 : 375 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_z="625 : 375 : 1" - inkscape:persp3d-origin="312.5 : 250 : 1" - id="perspective5714" /> - <linearGradient - id="linearGradient172"> - <stop - style="stop-color:#3f2600;stop-opacity:0.6;" - offset="0" - id="stop173" /> - <stop - style="stop-color:#3f2600;stop-opacity:0;" - offset="1" - id="stop174" /> - </linearGradient> - <linearGradient - id="linearGradient167"> - <stop - style="stop-color:#ffffff;stop-opacity:0.65;" - offset="0" - id="stop168" /> - <stop - style="stop-color:#ffffff;stop-opacity:0;" - offset="1" - id="stop169" /> - </linearGradient> - <linearGradient - id="linearGradient162"> - <stop - style="stop-color:#ffa63f;stop-opacity:1;" - offset="0" - id="stop163" /> - <stop - style="stop-color:#ffff00;stop-opacity:1;" - offset="1" - id="stop164" /> - </linearGradient> - <linearGradient - id="linearGradient153"> - <stop - style="stop-color:#ffeed7;stop-opacity:1;" - offset="0" - id="stop154" /> - <stop - style="stop-color:#bdbfc2;stop-opacity:1;" - offset="1" - id="stop155" /> - </linearGradient> - <linearGradient - id="linearGradient138"> - <stop - style="stop-color:#ffffff;stop-opacity:0.8;" - offset="0" - id="stop139" /> - <stop - style="stop-color:#ffffff;stop-opacity:0;" - offset="1" - id="stop140" /> - </linearGradient> - <linearGradient - xlink:href="#linearGradient138" - id="linearGradient141" - x1="0.47424799" - y1="0.020191999" - x2="0.417539" - y2="0.90125799" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient142" - x1="0.55880702" - y1="0.031192999" - x2="0.553922" - y2="0.94531101" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient143" - x1="0.46557701" - y1="0.028819799" - x2="0.41365999" - y2="0.93366498" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient144" - x1="0.70346397" - y1="0.059404202" - x2="0.64553201" - y2="0.94063401" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient145" - x1="0.46741399" - y1="-0.036155298" - x2="0.86741799" - y2="0.75857902" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient146" - x1="0.57152498" - y1="0.023441499" - x2="0.57143003" - y2="0.71875" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient147" - x1="0.5" - y1="0.0234362" - x2="0.5" - y2="0.8125" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient148" - x1="0.50799799" - y1="0.37435901" - x2="0.51599997" - y2="0.92820501" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient138" - id="linearGradient149" - x1="0.5" - y1="0.131707" - x2="0.50400001" - y2="0.94634098" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient150" - x1="-0.30509499" - y1="0.099496603" - x2="0.156323" - y2="0.94191301" - gradientUnits="objectBoundingBox" - gradientTransform="matrix(-0.928523,0.283938,0.435332,0.943857,-1.91327e-7,5.49908e-8)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient151" - x1="0.433979" - y1="0.022184599" - x2="0.487055" - y2="1.02569" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient152" - x1="0.5" - y1="0.89842999" - x2="0.5" - y2="0.40625" - gradientUnits="objectBoundingBox" - spreadMethod="reflect" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient156" - x1="0.43568701" - y1="0.98882002" - x2="0.453989" - y2="0.23093501" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient157" - x1="0.49180499" - y1="1.15284" - x2="0.49482101" - y2="0.41252401" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient158" - x1="0.51730198" - y1="0.85418499" - x2="0.49843901" - y2="0.136172" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient159" - x1="0.46201" - y1="0.87917101" - x2="0.49215299" - y2="0.096282303" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient162" - id="linearGradient161" - x1="0.50086302" - y1="0.34872901" - x2="0.41209599" - y2="0.98558098" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient162" - id="linearGradient165" - x1="0.60399801" - y1="0.51020199" - x2="0.46399999" - y2="0.98367399" - gradientUnits="objectBoundingBox" /> - <linearGradient - xlink:href="#linearGradient162" - id="linearGradient166" - x1="0.50000501" - y1="0.191616" - x2="0.50800002" - y2="0.97005898" - gradientUnits="objectBoundingBox" /> - <radialGradient - xlink:href="#linearGradient172" - id="radialGradient171" - cx="0.5" - cy="0.5" - fx="0.5" - fy="0.5" - r="0.5" - gradientUnits="objectBoundingBox" /> - <radialGradient - xlink:href="#linearGradient172" - id="radialGradient176" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient178" - x1="0.94027299" - y1="1.2934099" - x2="0.19452" - y2="-0.675295" - gradientUnits="objectBoundingBox" /> - <radialGradient - xlink:href="#linearGradient172" - id="radialGradient1399" - gradientTransform="scale(1.045233,0.956725)" - cx="446.77762" - cy="1219.4125" - fx="446.77762" - fy="1219.4125" - r="195.07191" - gradientUnits="userSpaceOnUse" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient1401" - gradientUnits="userSpaceOnUse" - x1="400.57785" - y1="369.53015" - x2="400.84448" - y2="304.07886" - gradientTransform="scale(0.575262,1.738339)" /> - <linearGradient - xlink:href="#linearGradient138" - id="linearGradient1403" - gradientUnits="userSpaceOnUse" - x1="303.01761" - y1="237.93179" - x2="297.0856" - y2="330.09561" - gradientTransform="scale(1.116071,0.896001)" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient1405" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.816497,1.224744)" - x1="378.93771" - y1="278.60202" - x2="380.27319" - y2="243.91606" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient1407" - gradientUnits="userSpaceOnUse" - x1="381.38742" - y1="277.495" - x2="380.5517" - y2="245.68338" - gradientTransform="scale(0.816497,1.224744)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1409" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.816497,1.224744)" - x1="379.09573" - y1="240.92712" - x2="376.79556" - y2="281.01636" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1411" - gradientUnits="userSpaceOnUse" - x1="389.63535" - y1="242.28218" - x2="387.06866" - y2="281.32513" - gradientTransform="scale(0.816497,1.224744)" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient1413" - gradientUnits="userSpaceOnUse" - spreadMethod="reflect" - x1="437.57941" - y1="528.87177" - x2="437.57941" - y2="394.10361" - gradientTransform="scale(0.812855,1.230232)" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient1415" - gradientUnits="userSpaceOnUse" - x1="375.17325" - y1="419.78485" - x2="377.48541" - y2="324.03815" - gradientTransform="scale(0.649784,1.538974)" /> - <linearGradient - xlink:href="#linearGradient138" - id="linearGradient1417" - gradientUnits="userSpaceOnUse" - x1="320.75104" - y1="498.17776" - x2="321.32224" - y2="614.50439" - gradientTransform="scale(1.074798,0.930408)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1419" - gradientUnits="userSpaceOnUse" - x1="322.48257" - y1="435.26761" - x2="323.2514" - y2="488.48251" - gradientTransform="scale(1.077001,0.928504)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1421" - gradientUnits="userSpaceOnUse" - x1="411.2215" - y1="242.94365" - x2="411.2215" - y2="331.44858" - gradientTransform="scale(0.571707,1.749147)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1423" - gradientUnits="userSpaceOnUse" - x1="867.34546" - y1="234.73897" - x2="867.33453" - y2="314.83911" - gradientTransform="scale(0.572667,1.746214)" /> - <linearGradient - xlink:href="#linearGradient162" - id="linearGradient1425" - gradientUnits="userSpaceOnUse" - x1="236.25362" - y1="657.11133" - x2="212.5099" - y2="737.41229" - gradientTransform="scale(1.011514,0.988617)" /> - <linearGradient - xlink:href="#linearGradient153" - id="linearGradient1427" - gradientUnits="userSpaceOnUse" - x1="381.56607" - y1="655.73102" - x2="279.64313" - y2="386.66583" - gradientTransform="scale(1.065499,0.938527)" /> - <linearGradient - xlink:href="#linearGradient162" - id="linearGradient1429" - gradientUnits="userSpaceOnUse" - x1="218.11714" - y1="630.30475" - x2="203.12654" - y2="737.8537" - gradientTransform="scale(1.009851,0.990245)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1431" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.007724,0.992335)" - x1="117.88966" - y1="587.23602" - x2="182.24524" - y2="704.73077" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1433" - gradientUnits="userSpaceOnUse" - x1="223.10072" - y1="570.41809" - x2="230.53499" - y2="710.97723" - gradientTransform="scale(0.999504,1.000496)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1435" - gradientUnits="userSpaceOnUse" - x1="316.93988" - y1="474.01779" - x2="371.60889" - y2="582.63507" - gradientTransform="scale(1.065499,0.938527)" /> - <linearGradient - xlink:href="#linearGradient162" - id="linearGradient1437" - gradientUnits="userSpaceOnUse" - x1="284.68652" - y1="410.46326" - x2="285.45923" - y2="485.69934" - gradientTransform="scale(1.218684,0.820557)" /> - <linearGradient - xlink:href="#linearGradient167" - id="linearGradient1439" - gradientUnits="userSpaceOnUse" - x1="288.82358" - y1="398.85422" - x2="288.37628" - y2="482.55939" - gradientTransform="scale(1.221941,0.81837)" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient172" - id="radialGradient5844" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.045233,0.956725)" - cx="446.77762" - cy="1219.4125" - fx="446.77762" - fy="1219.4125" - r="195.07191" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5846" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.575262,1.738339)" - x1="400.57785" - y1="369.53015" - x2="400.84448" - y2="304.07886" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient5848" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.116071,0.896001)" - x1="303.01761" - y1="237.93179" - x2="297.0856" - y2="330.09561" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5850" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.816497,1.224744)" - x1="378.93771" - y1="278.60202" - x2="380.27319" - y2="243.91606" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5852" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.816497,1.224744)" - x1="381.38742" - y1="277.495" - x2="380.5517" - y2="245.68338" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5854" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.816497,1.224744)" - x1="379.09573" - y1="240.92712" - x2="376.79556" - y2="281.01636" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5856" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.816497,1.224744)" - x1="389.63535" - y1="242.28218" - x2="387.06866" - y2="281.32513" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5858" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.812855,1.230232)" - spreadMethod="reflect" - x1="437.57941" - y1="528.87177" - x2="437.57941" - y2="394.10361" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5860" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.649784,1.538974)" - x1="375.17325" - y1="419.78485" - x2="377.48541" - y2="324.03815" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient5862" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.074798,0.930408)" - x1="320.75104" - y1="498.17776" - x2="321.32224" - y2="614.50439" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5864" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.077001,0.928504)" - x1="322.48257" - y1="435.26761" - x2="323.2514" - y2="488.48251" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5866" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.571707,1.749147)" - x1="411.2215" - y1="242.94365" - x2="411.2215" - y2="331.44858" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5868" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.572667,1.746214)" - x1="867.34546" - y1="234.73897" - x2="867.33453" - y2="314.83911" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient5870" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.011514,0.988617)" - x1="236.25362" - y1="657.11133" - x2="212.5099" - y2="737.41229" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5872" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.065499,0.938527)" - x1="381.56607" - y1="655.73102" - x2="279.64313" - y2="386.66583" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient5874" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.009851,0.990245)" - x1="218.11714" - y1="630.30475" - x2="203.12654" - y2="737.8537" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5876" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.007724,0.992335)" - x1="117.88966" - y1="587.23602" - x2="182.24524" - y2="704.73077" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5878" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(0.999504,1.000496)" - x1="223.10072" - y1="570.41809" - x2="230.53499" - y2="710.97723" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5880" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.065499,0.938527)" - x1="316.93988" - y1="474.01779" - x2="371.60889" - y2="582.63507" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient5882" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.218684,0.820557)" - x1="284.68652" - y1="410.46326" - x2="285.45923" - y2="485.69934" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5884" - gradientUnits="userSpaceOnUse" - gradientTransform="scale(1.221941,0.81837)" - x1="288.82358" - y1="398.85422" - x2="288.37628" - y2="482.55939" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5936" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(6.8689234e-2,-0.4008691,0.3415516,4.336381e-2,-313.66484,483.36861)" - x1="316.93988" - y1="474.01779" - x2="371.60889" - y2="582.63507" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5949" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.6373879,0.286176,-0.2248927,0.5792711,-190.14391,-154.55792)" - x1="381.56607" - y1="655.73102" - x2="279.64313" - y2="386.66583" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5992" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.9649387,-1.2915552e-2,-3.6719978e-2,2.5569228,169.00168,-594.11178)" - x1="400.57785" - y1="369.53015" - x2="400.84448" - y2="304.07886" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient6820" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.1593287,2.2594958e-2,6.8898041e-2,-0.4858355,313.34561,293.76431)" - x1="867.34546" - y1="234.73897" - x2="867.33453" - y2="314.83911" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient6824" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.184254,-0.3061768,0.2434767,-0.1724949,439.82488,377.41134)" - x1="294.40485" - y1="481.32233" - x2="371.60889" - y2="582.63507" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2514" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(7.6104436e-3,-0.1875898,0.5720113,2.3206217e-2,1167.6399,-164.81318)" - x1="892.69696" - y1="258.28925" - x2="564.89618" - y2="281.90463" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2517" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.2316272,0.2342907,0.7144146,-0.7062927,960.97808,-166.19015)" - x1="867.34546" - y1="234.73897" - x2="867.33453" - y2="314.83911" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2520" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.7672384,0,0,0.4874752,936.37068,-466.38275)" - x1="288.82358" - y1="398.85422" - x2="288.37628" - y2="482.55939" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient2524" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.523355,0,0,1.0256962,729.45868,-685.70504)" - x1="284.68652" - y1="410.46326" - x2="285.45923" - y2="485.69934" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2527" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0038119,-5.2260066e-2,-1.740863e-2,1.0462687,788.19568,-546.66535)" - x1="223.10072" - y1="570.41809" - x2="230.53499" - y2="710.97723" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2530" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.9523959,0.3464001,0.4208255,0.9487298,1258.3327,-582.54204)" - x1="117.88966" - y1="587.23602" - x2="182.24524" - y2="704.73077" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient2533" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-1.1800109,0.4273134,0.4706466,1.1534176,1272.3477,-732.02104)" - x1="218.11714" - y1="630.30475" - x2="203.12654" - y2="737.8537" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient2536" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.2643925,0,0,1.2357712,729.45868,-685.70504)" - x1="236.25362" - y1="657.11133" - x2="212.5099" - y2="737.41229" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6810" - id="linearGradient2539" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.599201,7.9485483e-2,-0.2318863,1.9097465,860.80461,-630.61189)" - x1="855.06372" - y1="238.8383" - x2="871.15576" - y2="315.45914" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2545" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.2781848,0,0,0.990788,754.62768,-618.27804)" - x1="322.48257" - y1="435.26761" - x2="323.2514" - y2="488.48251" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient2548" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.3994837,0,0,1.1399824,714.04668,-671.75704)" - x1="320.75104" - y1="498.17776" - x2="321.32224" - y2="614.50439" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient2555" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0160687,0,0,1.53779,729.45868,-686.43004)" - spreadMethod="reflect" - x1="437.57941" - y1="528.87177" - x2="437.57941" - y2="394.10361" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2558" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.2914159,-3.3330306e-2,5.0610341e-2,0.4881144,1003.9662,-404.72726)" - x1="389.63535" - y1="242.28218" - x2="387.06866" - y2="281.32513" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient2561" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.3921823,-2.9764582e-2,-5.7310058e-2,0.5824956,1376.4784,-428.91032)" - x1="379.09573" - y1="240.92712" - x2="376.79556" - y2="281.01636" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient2566" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-1.4785291,4.0425338e-2,3.8864067e-2,1.9024316,1751.4647,-802.97704)" - x1="381.38742" - y1="277.495" - x2="380.5517" - y2="245.68338" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient2569" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0650795,-6.1672141e-2,9.4458503e-2,1.6443046,688.76168,-695.81704)" - x1="378.93771" - y1="278.60202" - x2="380.27319" - y2="243.91606" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient2572" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.4132361,-7.9650304e-2,-4.1197678e-2,1.0713842,746.14768,-643.96104)" - x1="303.01761" - y1="237.93179" - x2="297.0856" - y2="330.09561" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient172" - id="radialGradient2577" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.4818268,0,0,0.3967969,505.21028,-296.00604)" - cx="446.77762" - cy="1219.4125" - fx="446.77762" - fy="1219.4125" - r="195.07191" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3353" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-7.6104436e-3,-0.1875898,-0.5720113,2.3206217e-2,1186.0942,-162.08752)" - x1="892.69696" - y1="258.28925" - x2="564.89618" - y2="281.90463" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient172" - id="radialGradient3411" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.4818268,0,0,0.3967969,-359.87341,176.94177)" - cx="446.77762" - cy="1219.4125" - fx="446.77762" - fy="1219.4125" - r="195.07191" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient3413" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.4132361,-7.9650304e-2,-4.1197678e-2,1.0713842,-118.936,-171.0132)" - x1="303.01761" - y1="237.93179" - x2="297.0856" - y2="330.09561" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient3415" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0650795,-6.1672141e-2,9.4458503e-2,1.6443046,-176.32201,-222.8692)" - x1="378.93771" - y1="278.60202" - x2="380.27319" - y2="243.91606" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient3417" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-1.4785291,4.0425338e-2,3.8864067e-2,1.9024316,886.38099,-330.0292)" - x1="381.38742" - y1="277.495" - x2="380.5517" - y2="245.68338" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3419" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.3921823,-2.9764582e-2,-5.7310058e-2,0.5824956,511.39472,44.037525)" - x1="379.09573" - y1="240.92712" - x2="376.79556" - y2="281.01636" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3421" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.2914159,-3.3330306e-2,5.0610341e-2,0.4881144,138.88252,68.220525)" - x1="389.63535" - y1="242.28218" - x2="387.06866" - y2="281.32513" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient3423" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0160687,0,0,1.53779,-135.62501,-213.4822)" - spreadMethod="reflect" - x1="437.57941" - y1="528.87177" - x2="437.57941" - y2="394.10361" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient3425" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.9027839,-7.2174108e-2,0.1573001,2.0039596,-212.66601,-211.1902)" - x1="375.17325" - y1="419.78485" - x2="377.48541" - y2="324.03815" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient3427" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.3994837,0,0,1.1399824,-151.03701,-198.8092)" - x1="320.75104" - y1="498.17776" - x2="321.32224" - y2="614.50439" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3429" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.2781848,0,0,0.990788,-110.456,-145.33018)" - x1="322.48257" - y1="435.26761" - x2="323.2514" - y2="488.48251" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3431" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.7146338,0,0,2.1864338,-135.62501,-212.7572)" - x1="411.2215" - y1="242.94365" - x2="411.2215" - y2="331.44858" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6810" - id="linearGradient3433" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.599201,7.9485483e-2,-0.2318863,1.9097465,10.90312,-180.4374)" - x1="855.06372" - y1="238.8383" - x2="871.15576" - y2="315.45914" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient3435" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.2643925,0,0,1.2357712,-135.62501,-212.7572)" - x1="236.25362" - y1="657.11133" - x2="212.5099" - y2="737.41229" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient3437" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-1.1800109,0.4273134,0.4706466,1.1534176,407.26399,-259.0732)" - x1="218.11714" - y1="630.30475" - x2="203.12654" - y2="737.8537" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3439" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.9523959,0.3464001,0.4208255,0.9487298,393.24899,-109.59418)" - x1="117.88966" - y1="587.23602" - x2="182.24524" - y2="704.73077" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3441" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0038119,-5.2260066e-2,-1.740863e-2,1.0462687,-76.888003,-73.717475)" - x1="223.10072" - y1="570.41809" - x2="230.53499" - y2="710.97723" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient3443" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.523355,0,0,1.0256962,-135.62501,-212.7572)" - x1="284.68652" - y1="410.46326" - x2="285.45923" - y2="485.69934" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3445" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.7672384,0,0,0.4874752,71.286992,6.5651249)" - x1="288.82358" - y1="398.85422" - x2="288.37628" - y2="482.55939" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3447" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.2316272,0.2342907,0.7144146,-0.7062927,95.894394,306.75766)" - x1="867.34546" - y1="234.73897" - x2="867.33453" - y2="314.83911" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3449" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(7.6104436e-3,-0.1875898,0.5720113,2.3206217e-2,302.55621,308.13463)" - x1="892.69696" - y1="258.28925" - x2="564.89618" - y2="281.90463" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient3455" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.1449278,0.2958704,-0.9021871,-0.4419231,1401.2488,-283.33537)" - x1="867.34546" - y1="234.73897" - x2="867.33453" - y2="314.83911" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6810" - id="linearGradient3459" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.6037841,2.836597e-2,6.9037787e-2,1.9225339,1538.2922,-593.33926)" - x1="855.06372" - y1="238.8383" - x2="871.15576" - y2="315.45914" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5957" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(7.6104436e-3,-0.1875898,0.5720113,2.3206217e-2,313.36793,291.43423)" - x1="892.69696" - y1="258.28925" - x2="564.89618" - y2="281.90463" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5960" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.2316272,0.2342907,0.7144146,-0.7062927,95.894394,306.75766)" - x1="867.34546" - y1="234.73897" - x2="867.33453" - y2="314.83911" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5963" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.7672384,0,0,0.4874752,71.286992,6.5651249)" - x1="288.82358" - y1="398.85422" - x2="288.37628" - y2="482.55939" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient5967" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.523355,0,0,1.0256962,-135.62501,-212.7572)" - x1="284.68652" - y1="410.46326" - x2="285.45923" - y2="485.69934" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5970" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0038119,-5.2260066e-2,-1.740863e-2,1.0462687,-76.888003,-73.717475)" - x1="223.10072" - y1="570.41809" - x2="230.53499" - y2="710.97723" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5973" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.9523959,0.3464001,0.4208255,0.9487298,393.24899,-109.59418)" - x1="117.88966" - y1="587.23602" - x2="182.24524" - y2="704.73077" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient5976" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-1.1800109,0.4273134,0.4706466,1.1534176,407.26399,-259.0732)" - x1="218.11714" - y1="630.30475" - x2="203.12654" - y2="737.8537" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient162" - id="linearGradient5979" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.2643925,0,0,1.2357712,-135.62501,-212.7572)" - x1="236.25362" - y1="657.11133" - x2="212.5099" - y2="737.41229" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6810" - id="linearGradient5982" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.599201,7.9485483e-2,-0.2318863,1.9097465,10.90312,-180.4374)" - x1="855.06372" - y1="238.8383" - x2="871.15576" - y2="315.45914" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5985" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.7146338,0,0,2.1864338,-135.62501,-212.7572)" - x1="411.2215" - y1="242.94365" - x2="411.2215" - y2="331.44858" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient5988" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.2781848,0,0,0.990788,-110.456,-145.33018)" - x1="322.48257" - y1="435.26761" - x2="323.2514" - y2="488.48251" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient5991" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.3994837,0,0,1.1399824,-151.03701,-198.8092)" - x1="320.75104" - y1="498.17776" - x2="321.32224" - y2="614.50439" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5995" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.9027839,-7.2174108e-2,0.1573001,2.0039596,-212.66601,-211.1902)" - x1="375.17325" - y1="419.78485" - x2="377.48541" - y2="324.03815" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient5998" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0160687,0,0,1.53779,-135.62501,-213.4822)" - spreadMethod="reflect" - x1="437.57941" - y1="528.87177" - x2="437.57941" - y2="394.10361" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient6001" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.2914159,-3.3330306e-2,5.0610341e-2,0.4881144,138.88252,68.220525)" - x1="389.63535" - y1="242.28218" - x2="387.06866" - y2="281.32513" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient167" - id="linearGradient6004" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-0.3921823,-2.9764582e-2,-5.7310058e-2,0.5824956,511.39472,44.037525)" - x1="379.09573" - y1="240.92712" - x2="376.79556" - y2="281.01636" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient6009" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-1.4785291,4.0425338e-2,3.8864067e-2,1.9024316,886.38099,-330.0292)" - x1="381.38742" - y1="277.495" - x2="380.5517" - y2="245.68338" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient153" - id="linearGradient6012" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.0650795,-6.1672141e-2,9.4458503e-2,1.6443046,-176.32201,-222.8692)" - x1="378.93771" - y1="278.60202" - x2="380.27319" - y2="243.91606" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient138" - id="linearGradient6015" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.4132361,-7.9650304e-2,-4.1197678e-2,1.0713842,-118.936,-171.0132)" - x1="303.01761" - y1="237.93179" - x2="297.0856" - y2="330.09561" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient172" - id="radialGradient6020" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.4818268,0,0,0.3967969,-359.87341,176.94177)" - cx="446.77762" - cy="1219.4125" - fx="446.77762" - fy="1219.4125" - r="195.07191" /> - </defs> - <g - id="g6022"> - <path - d="M 591.23603,660.80083 C 591.23603,703.54984 461.81827,738.20477 302.17337,738.20477 C 142.52846,738.20477 13.110708,703.54984 13.110708,660.80083 C 13.110708,618.05182 142.52846,583.39691 302.17337,583.39691 C 461.81827,583.39691 591.23603,618.05182 591.23603,660.80083 z" - id="path3355" - style="fill:url(#radialGradient6020);stroke:none;stroke-width:1pt;stroke-linecap:butt;stroke-linejoin:miter" /> - <path - sodipodi:nodetypes="ccccccccc" - id="path3357" - d="M 143.90874,577.54277 C 115.92374,537.26402 110.46624,406.31277 175.76749,325.75527 C 208.12499,287.10777 216.37999,260.17402 218.93124,224.01402 C 220.66749,182.79027 189.77499,59.711525 306.28499,50.334025 C 424.29249,40.919025 417.95499,157.40902 417.27624,219.05277 C 416.71249,271.10277 419.0565,276.31252 445.584,316.88002 C 494.68275,391.41752 526.96749,544.04652 472.77249,613.51152 C 404.12624,700.47152 345.33124,662.75902 306.28499,665.92402 C 233.16874,669.92652 230.75124,708.91277 143.90874,577.54277 z" - style="fill:#000000;stroke:none;stroke-width:1.25" /> - <path - sodipodi:nodetypes="cssccc" - id="path3359" - d="M 437.66398,210.61794 C 450.11848,228.11403 483.19457,249.41586 502.10694,275.91451 C 521.01932,302.41316 477.73746,333.2079 443.1675,314.23928 C 417.44041,300.12277 444.25181,384.39183 467.34598,377.01641 C 614.65479,312.95238 492.4139,250.78608 485.61266,191.90909 C 540.40451,67.355773 400.47822,152.79209 437.66398,210.61794 z" - style="fill:#000000;stroke:#000000;stroke-width:1.5625006" /> - <path - d="M 375.15201,109.16012 C 373.96198,140.10802 339.90409,167.06128 299.08159,169.36204 C 258.25909,171.66281 226.13061,148.43982 227.32064,117.49192 C 228.51067,86.544125 262.56856,59.590825 303.39106,57.290125 C 344.21356,54.989325 376.34204,78.212325 375.15201,109.16012 z" - id="path3361" - style="fill:url(#linearGradient6015);stroke:none;stroke-width:1.26498997" /> - <path - d="M 277.39315,182.77455 C 278.54881,202.89182 268.92216,219.81175 255.89144,220.56628 C 242.86071,221.3208 231.36038,205.62421 230.20473,185.50694 C 229.04907,165.38967 238.67572,148.46972 251.70644,147.71522 C 264.73717,146.96072 276.2375,162.65728 277.39315,182.77455 z" - id="path3363" - style="fill:url(#linearGradient6012);stroke:none;stroke-width:1.17873001" /> - <path - d="M 301.04358,184.3151 C 301.51907,207.59043 316.56861,226.05786 334.65769,225.56328 C 352.74677,225.06869 367.02541,205.79938 366.54992,182.52405 C 366.07444,159.24872 351.02489,140.78132 332.93581,141.27592 C 314.84674,141.77042 300.5681,161.03977 301.04358,184.3151 z" - id="path3365" - style="fill:url(#linearGradient6009);stroke:none;stroke-width:0.93138498" /> - <path - d="M 331.21231,191.85453 C 330.93912,204.63094 337.38392,215.00253 345.60719,215.02013 C 353.83046,215.03772 360.7182,204.69466 360.99139,191.91824 C 361.26458,179.14182 354.81978,168.77023 346.59651,168.75264 C 338.37324,168.73505 331.4855,179.07811 331.21231,191.85453 z" - id="path3367" - style="fill:#000000;stroke:none;stroke-width:1.86495996" /> - <path - d="M 273.01381,188.19365 C 274.04499,198.77003 270.0676,207.92934 264.13008,208.65153 C 258.19256,209.37373 252.54331,201.38533 251.51214,190.80895 C 250.48097,180.23257 254.45835,171.07326 260.39587,170.35107 C 266.33339,169.62887 271.98264,177.61727 273.01381,188.19365 z" - id="path3369" - style="fill:#000000;stroke:none;stroke-width:2.39814997" /> - <path - d="M 338.4302,184.54815 C 337.72904,191.6747 341.05031,197.74711 345.84847,198.11127 C 350.64663,198.47542 355.10471,192.99342 355.80587,185.86687 C 356.50703,178.74032 353.18576,172.6679 348.3876,172.30374 C 343.58944,171.93959 339.13136,177.42159 338.4302,184.54815 z" - id="path3371" - style="fill:url(#linearGradient6004);stroke:none;stroke-width:3.1916101" /> - <path - d="M 269.50703,182.58574 C 270.12623,188.55758 267.73791,193.72929 264.17258,194.13707 C 260.60725,194.54485 257.21502,190.03429 256.59583,184.06244 C 255.97663,178.0906 258.36495,172.91889 261.93028,172.51111 C 265.49561,172.10333 268.88784,176.6139 269.50703,182.58574 z" - id="path3373" - style="fill:url(#linearGradient6001);stroke:none;stroke-width:4.12025976" /> - <path - id="path3375" - d="M 187.75249,405.79902 C 203.79749,369.42027 237.89499,305.51652 238.62124,256.10152 C 238.62124,216.79902 356.34499,207.41277 365.79249,246.65402 C 375.23999,285.89527 399.21874,344.75777 414.47999,373.09902 C 429.73999,401.43902 474.24124,491.46777 426.83499,570.03152 C 384.13874,639.58652 254.67874,694.61402 185.57249,560.58527 C 162.31874,514.07652 166.46624,456.44152 187.75249,405.79902 z" - style="fill:url(#linearGradient5998);stroke:none;stroke-width:1.25" /> - <path - id="path3377" - d="M 173.24559,378.8028 C 159.53586,404.75152 131.00745,472.99595 200.53857,510.33418 C 275.38701,549.97538 275.02711,631.56055 185.18731,592.7418 C 103.05444,557.65452 139.36496,415.87304 162.33593,381.94969 C 177.39745,358.18988 199.98644,329.10722 173.24559,378.8028 z" - style="fill:url(#linearGradient5995);stroke:none;stroke-width:1.15804005" /> - <path - id="path3379" - d="M 185.01624,349.39277 C 163.18499,385.02777 110.79499,469.15902 180.90624,512.79652 C 275.36749,570.74027 248.62249,628.68527 162.40749,576.51402 C 41.021247,503.68402 147.62624,356.99402 196.32124,301.09152 C 251.87624,238.34152 207.01374,312.45027 185.01624,349.39277 z" - style="fill:#000000;stroke:#000000;stroke-width:1.5625" /> - <path - id="path3381" - d="M 397.76919,419.60753 C 397.76919,459.32033 359.65441,510.90826 294.21657,510.44511 C 226.73185,511.0026 197.92832,459.32033 197.92832,419.60753 C 197.92832,379.89472 242.69287,347.66452 297.8494,347.66452 C 353.00463,347.66452 397.76919,379.89472 397.76919,419.60753 z" - style="font-size:12px;fill:url(#linearGradient5991);stroke:none;stroke-width:1.23705006;stroke-dasharray:none" /> - <path - id="path3383" - d="M 362.15979,294.61832 C 361.43347,335.77773 334.64977,345.48709 300.75476,345.48709 C 266.85857,345.48709 242.25502,339.41113 239.34854,294.61832 C 239.34854,266.53917 266.85857,250.28968 300.75476,250.28968 C 334.64977,250.28968 362.15979,266.53917 362.15979,294.61832 z" - style="font-size:12px;fill:url(#linearGradient5988);stroke:none;stroke-width:1.38846004;stroke-dasharray:none" /> - <path - id="path3385" - d="M 157.23124,357.83652 C 179.37624,324.09152 225.99999,272.38152 165.95249,365.10277 C 117.26374,441.40652 147.94874,490.44402 163.77249,503.90152 C 209.43124,544.60402 207.47999,571.83777 171.76624,550.40902 C 94.734994,504.62652 110.72249,427.59902 157.23124,357.83652 z" - style="fill:url(#linearGradient5985);stroke:none;stroke-width:1.25" /> - <path - id="path3387" - d="M 462.21568,398.96909 C 450.39659,362.17304 409.96999,267.68577 467.11982,378.94676 C 519.1881,479.53006 466.98563,537.85433 458.30537,543.16377 C 449.62629,548.47226 421.31707,557.63765 431.92723,536.4342 C 442.53632,515.23062 487.08834,478.21682 462.21568,398.96909 z" - style="fill:url(#linearGradient5982);fill-opacity:1;stroke:none;stroke-width:1.25" /> - <path - id="path3389" - d="M 140.51874,683.39402 C 89.966244,656.62402 16.453747,688.54902 43.141247,615.81152 C 48.486247,599.26402 35.172497,574.55152 43.867497,558.40402 C 54.041247,538.78152 75.842494,543.14277 88.923744,530.06152 C 101.82124,516.44777 109.99749,493.00027 133.97874,496.63402 C 157.95874,500.26777 173.90999,529.71027 190.65874,565.67027 C 203.01249,591.46777 246.83499,627.75027 243.97124,656.61777 C 240.60124,700.99277 190.18749,709.35527 140.51874,683.39402 z" - style="fill:url(#linearGradient5979);stroke:#e68c3f;stroke-width:7.8125" /> - <path - id="path3391" - d="M 491.31808,670.91489 C 528.39675,625.95042 610.70818,635.17384 555.19701,573.52225 C 543.452,560.30492 546.95774,531.65049 532.68995,519.54726 C 515.71854,504.70652 496.99731,516.87766 479.79512,509.11645 C 462.56223,500.79684 444.55058,484.62292 423.51456,496.12697 C 402.4797,507.6306 400.21642,537.55836 398.23263,576.73647 C 396.49323,604.95714 370.77728,652.14775 384.4305,678.07775 C 404.45332,718.28664 455.96509,712.96302 491.31808,670.91489 z" - style="fill:url(#linearGradient5976);stroke:#e68c3f;stroke-width:7.81249762" /> - <path - id="path3393" - d="M 475.19239,610.80964 C 532.58685,526.08884 489.81056,526.70588 475.48217,520.29802 C 461.11206,513.43236 445.8707,500.12629 428.97182,509.5003 C 412.07389,518.87396 411.10688,543.40025 410.64335,575.50997 C 410.05505,598.63832 390.69247,637.08007 402.33826,658.54446 C 416.30733,683.56395 450.20934,647.22527 475.19239,610.80964 z" - style="fill:url(#linearGradient5973);stroke:none;stroke-width:1.52532005" /> - <path - id="path3395" - d="M 128.7701,623.00924 C 42.866706,567.39983 83.051524,548.52024 96.092064,539.78558 C 111.73042,528.58358 111.85185,506.75151 131.06896,508.78839 C 150.28506,510.82534 161.47212,534.4833 174.42831,563.86686 C 183.9948,584.9323 216.82272,612.77142 214.47562,637.07862 C 211.37663,665.56569 165.98235,646.7897 128.7701,623.00924 z" - style="fill:url(#linearGradient5970);stroke:none;stroke-width:1.52532005" /> - <path - id="path3397" - d="M 251.81749,210.65402 C 260.75124,202.19152 282.83124,176.82152 324.26874,203.46027 C 331.97124,208.47277 338.22124,208.93152 353.04499,215.27902 C 382.70249,227.46527 368.52249,256.85277 337.11499,266.66402 C 323.66749,271.02527 311.44499,287.35902 286.95374,285.96277 C 266.03624,284.74152 260.55499,271.12027 247.70624,263.58027 C 224.86999,250.69152 221.49999,233.26277 233.83124,224.01402 C 246.16374,214.76527 250.98749,211.44027 251.81749,210.65402 z" - style="fill:url(#linearGradient5967);stroke:#e68c3f;stroke-width:4.6875" /> - <path - id="path3399" - d="M 353.43874,234.29902 C 341.08499,235.02527 314.19749,261.91277 285.85624,261.91277 C 257.51499,261.91277 240.80124,235.75152 236.44124,235.75152" - style="fill:none;stroke:#e68c3f;stroke-width:3.125" /> - <path - id="path3401" - d="M 265.90246,208.33442 C 270.38995,204.30176 284.54499,193.23548 303.31687,204.56504 C 307.27192,206.80832 311.35631,209.24996 317.43047,212.58509 C 329.462,219.58298 323.50274,229.6676 309.08839,236.04837 C 302.54708,238.72589 291.76316,244.6349 283.55168,244.22151 C 274.42662,243.38281 268.52325,237.43151 262.47546,233.55551 C 251.38073,226.22703 252.05445,220.30969 257.20813,215.38293 C 261.10416,212.00015 265.48554,208.70909 265.90246,208.33442 z" - style="fill:url(#linearGradient5963);stroke:none" /> - <path - sodipodi:nodetypes="ccscc" - id="path3403" - d="M 485.62558,318.40009 C 470.31375,326.6082 417.68681,322.14515 480.02902,326.05185 C 529.45102,323.13335 535.62952,273.72084 534.95116,268.27709 C 534.2728,262.83418 518.48464,252.49699 513.21723,263.8189 C 507.9494,275.14041 526.70967,304.0309 485.62558,318.40009 z" - style="fill:url(#linearGradient5960);stroke:none;stroke-width:1.25" /> - <path - sodipodi:nodetypes="ccscc" - id="path3405" - d="M 473.26296,135.03602 C 463.66338,137.45706 448.44209,148.26182 466.22252,134.32762 C 494.98909,121.13922 505.82847,135.59547 486.85683,175.63681 C 482.71091,184.38715 460.74905,201.85561 454.18436,199.10941 C 500.29783,163.55611 496.08175,126.83432 473.26296,135.03602 z" - style="fill:url(#linearGradient5957);stroke:none;stroke-width:1.25" /> - </g> -</svg> diff --git a/~dev_rating/modules/mpdf/vendor/mpdf/examples/windmill.jpg b/~dev_rating/modules/mpdf/vendor/mpdf/examples/windmill.jpg deleted file mode 100644 index 378a91cd628c80356291056c6b4258df6d8cacd1..0000000000000000000000000000000000000000 Binary files a/~dev_rating/modules/mpdf/vendor/mpdf/examples/windmill.jpg and /dev/null differ diff --git a/~dev_rating/system/classes/Arr.php b/~dev_rating/system/classes/Arr.php new file mode 100644 index 0000000000000000000000000000000000000000..320612925a8a44d54112bf3f68a223ac954270c8 --- /dev/null +++ b/~dev_rating/system/classes/Arr.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Arr extends Kohana_Arr {} diff --git a/~dev_rating/system/classes/Config.php b/~dev_rating/system/classes/Config.php new file mode 100644 index 0000000000000000000000000000000000000000..39585d561adb5ab0749260452717b19980c2fb75 --- /dev/null +++ b/~dev_rating/system/classes/Config.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Config extends Kohana_Config {} diff --git a/~dev_rating/system/classes/Config/File.php b/~dev_rating/system/classes/Config/File.php new file mode 100644 index 0000000000000000000000000000000000000000..acd4d857a5d76f5429b06b1f4be22c16525c2907 --- /dev/null +++ b/~dev_rating/system/classes/Config/File.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Config_File extends Kohana_Config_File {} diff --git a/~dev_rating/system/classes/Config/Group.php b/~dev_rating/system/classes/Config/Group.php new file mode 100644 index 0000000000000000000000000000000000000000..cff4ce876f345fdafcdc1f3471615cca77056832 --- /dev/null +++ b/~dev_rating/system/classes/Config/Group.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Config_Group extends Kohana_Config_Group {} diff --git a/~dev_rating/system/classes/Controller.php b/~dev_rating/system/classes/Controller.php new file mode 100644 index 0000000000000000000000000000000000000000..6fb147dbf67801a66fb84892f32dbaddf7178d57 --- /dev/null +++ b/~dev_rating/system/classes/Controller.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Controller extends Kohana_Controller {} diff --git a/~dev_rating/system/classes/Controller/Template.php b/~dev_rating/system/classes/Controller/Template.php new file mode 100644 index 0000000000000000000000000000000000000000..b4af7540875211dae48e598720c1f192815adcc9 --- /dev/null +++ b/~dev_rating/system/classes/Controller/Template.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Controller_Template extends Kohana_Controller_Template {} diff --git a/~dev_rating/system/classes/Cookie.php b/~dev_rating/system/classes/Cookie.php new file mode 100644 index 0000000000000000000000000000000000000000..35c9d12baad53d0e981d9cadc4cc89248fa560c0 --- /dev/null +++ b/~dev_rating/system/classes/Cookie.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Cookie extends Kohana_Cookie {} diff --git a/~dev_rating/system/classes/Date.php b/~dev_rating/system/classes/Date.php new file mode 100644 index 0000000000000000000000000000000000000000..0007c3ee082009b8daf6f47192eab08f249fd8d9 --- /dev/null +++ b/~dev_rating/system/classes/Date.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Date extends Kohana_Date {} diff --git a/~dev_rating/system/classes/Debug.php b/~dev_rating/system/classes/Debug.php new file mode 100644 index 0000000000000000000000000000000000000000..9add194390287092b234f42d2ebc683812f961c3 --- /dev/null +++ b/~dev_rating/system/classes/Debug.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Debug extends Kohana_Debug {} diff --git a/~dev_rating/system/classes/Encrypt.php b/~dev_rating/system/classes/Encrypt.php new file mode 100644 index 0000000000000000000000000000000000000000..e82f27dd12d339c480edfc716ed4850857e4d393 --- /dev/null +++ b/~dev_rating/system/classes/Encrypt.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Encrypt extends Kohana_Encrypt {} diff --git a/~dev_rating/system/classes/Feed.php b/~dev_rating/system/classes/Feed.php new file mode 100644 index 0000000000000000000000000000000000000000..277121b9f43bdfdf326d6b3d244c1e2951e26dcb --- /dev/null +++ b/~dev_rating/system/classes/Feed.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Feed extends Kohana_Feed {} diff --git a/~dev_rating/system/classes/File.php b/~dev_rating/system/classes/File.php new file mode 100644 index 0000000000000000000000000000000000000000..0fddd534ff60dc0832d54481864a319152b7c68d --- /dev/null +++ b/~dev_rating/system/classes/File.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class File extends Kohana_File {} diff --git a/~dev_rating/system/classes/Form.php b/~dev_rating/system/classes/Form.php new file mode 100644 index 0000000000000000000000000000000000000000..5879e30d4f5d18d4cfddac9585377e092d268456 --- /dev/null +++ b/~dev_rating/system/classes/Form.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Form extends Kohana_Form {} diff --git a/~dev_rating/system/classes/Fragment.php b/~dev_rating/system/classes/Fragment.php new file mode 100644 index 0000000000000000000000000000000000000000..e7dec2b7ebfd03bc8de8c481394eae7c8cf241d0 --- /dev/null +++ b/~dev_rating/system/classes/Fragment.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Fragment extends Kohana_Fragment {} diff --git a/~dev_rating/system/classes/HTML.php b/~dev_rating/system/classes/HTML.php new file mode 100644 index 0000000000000000000000000000000000000000..766ae9b2c13ccfd9ce0b272352b7579e6c882526 --- /dev/null +++ b/~dev_rating/system/classes/HTML.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTML extends Kohana_HTML {} diff --git a/~dev_rating/system/classes/HTTP.php b/~dev_rating/system/classes/HTTP.php new file mode 100644 index 0000000000000000000000000000000000000000..acfde73898ac863233bdc029e77195a056c9e476 --- /dev/null +++ b/~dev_rating/system/classes/HTTP.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class HTTP extends Kohana_HTTP {} diff --git a/~dev_rating/system/classes/HTTP/Exception.php b/~dev_rating/system/classes/HTTP/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..814e3b66186c716e15ec50381ae068d8c2b73fc1 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception extends Kohana_HTTP_Exception {} diff --git a/~dev_rating/system/classes/HTTP/Exception/300.php b/~dev_rating/system/classes/HTTP/Exception/300.php new file mode 100644 index 0000000000000000000000000000000000000000..961a10092900eb8bbe9fd9e5ba0e4af61b59b590 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/300.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_300 extends Kohana_HTTP_Exception_300 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/301.php b/~dev_rating/system/classes/HTTP/Exception/301.php new file mode 100644 index 0000000000000000000000000000000000000000..533b8a96da8919973908ab24120c650c5fffbebd --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/301.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_301 extends Kohana_HTTP_Exception_301 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/302.php b/~dev_rating/system/classes/HTTP/Exception/302.php new file mode 100644 index 0000000000000000000000000000000000000000..d5c9eb41ebb1f03ebe3e21ec20b566fed66aba2a --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/302.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_302 extends Kohana_HTTP_Exception_302 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/303.php b/~dev_rating/system/classes/HTTP/Exception/303.php new file mode 100644 index 0000000000000000000000000000000000000000..83a517f433eff9d9a18b0656d1c63c131415e78f --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/303.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_303 extends Kohana_HTTP_Exception_303 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/304.php b/~dev_rating/system/classes/HTTP/Exception/304.php new file mode 100644 index 0000000000000000000000000000000000000000..14f016400830bc479933d4e374e2d82a095d1a5a --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/304.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_304 extends Kohana_HTTP_Exception_304 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/305.php b/~dev_rating/system/classes/HTTP/Exception/305.php new file mode 100644 index 0000000000000000000000000000000000000000..976d418838c5a07ed6c9a48b3b172891fc72156c --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/305.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_305 extends Kohana_HTTP_Exception_305 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/307.php b/~dev_rating/system/classes/HTTP/Exception/307.php new file mode 100644 index 0000000000000000000000000000000000000000..6623b4654c3a8e24fa30a2de325d69371168c5b4 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/307.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_307 extends Kohana_HTTP_Exception_307 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/400.php b/~dev_rating/system/classes/HTTP/Exception/400.php new file mode 100644 index 0000000000000000000000000000000000000000..5d024f20a9a3cfe41e979ac33d3a114f2655c2a1 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/400.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_400 extends Kohana_HTTP_Exception_400 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/401.php b/~dev_rating/system/classes/HTTP/Exception/401.php new file mode 100644 index 0000000000000000000000000000000000000000..883d5c4c168f8bc59056f879157ecf993eb444dd --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/401.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_401 extends Kohana_HTTP_Exception_401 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/402.php b/~dev_rating/system/classes/HTTP/Exception/402.php new file mode 100644 index 0000000000000000000000000000000000000000..f3d1420bd52631d4be586bdf232373e494a31f1a --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/402.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_402 extends Kohana_HTTP_Exception_402 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/403.php b/~dev_rating/system/classes/HTTP/Exception/403.php new file mode 100644 index 0000000000000000000000000000000000000000..cabf342e08b1d536226be9890324f559e8ff5d02 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/403.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_403 extends Kohana_HTTP_Exception_403 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/404.php b/~dev_rating/system/classes/HTTP/Exception/404.php new file mode 100644 index 0000000000000000000000000000000000000000..e782db0a3247c93848c1d6a7b4277dbb7eda3969 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/404.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/405.php b/~dev_rating/system/classes/HTTP/Exception/405.php new file mode 100644 index 0000000000000000000000000000000000000000..b9826b459691089e64339752e57613095a20268c --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/405.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_405 extends Kohana_HTTP_Exception_405 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/406.php b/~dev_rating/system/classes/HTTP/Exception/406.php new file mode 100644 index 0000000000000000000000000000000000000000..3eee7472c1af53e00c98fba19ad738f8b2e4e5fe --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/406.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_406 extends Kohana_HTTP_Exception_406 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/407.php b/~dev_rating/system/classes/HTTP/Exception/407.php new file mode 100644 index 0000000000000000000000000000000000000000..7787283e5c3a55919597e3b8a288ae119f8bb7b4 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/407.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_407 extends Kohana_HTTP_Exception_407 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/408.php b/~dev_rating/system/classes/HTTP/Exception/408.php new file mode 100644 index 0000000000000000000000000000000000000000..67ceb52ca6d0ba905fa843f558b8dbf13e419e77 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/408.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_408 extends Kohana_HTTP_Exception_408 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/409.php b/~dev_rating/system/classes/HTTP/Exception/409.php new file mode 100644 index 0000000000000000000000000000000000000000..26de05b4a152b9a98f7c1ca4820dddfaa6e5a293 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/409.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_409 extends Kohana_HTTP_Exception_409 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/410.php b/~dev_rating/system/classes/HTTP/Exception/410.php new file mode 100644 index 0000000000000000000000000000000000000000..ac21064a3a96aa879e3f4d226c51cdd596ded24a --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/410.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_410 extends Kohana_HTTP_Exception_410 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/411.php b/~dev_rating/system/classes/HTTP/Exception/411.php new file mode 100644 index 0000000000000000000000000000000000000000..08e915e0d0c12254b9e796453bf16f1b50881879 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/411.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_411 extends Kohana_HTTP_Exception_411 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/412.php b/~dev_rating/system/classes/HTTP/Exception/412.php new file mode 100644 index 0000000000000000000000000000000000000000..7cee1ffe56678dfb585b884c7feb654df2c1ba37 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/412.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_412 extends Kohana_HTTP_Exception_412 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/413.php b/~dev_rating/system/classes/HTTP/Exception/413.php new file mode 100644 index 0000000000000000000000000000000000000000..10ebad85a4536a45a7a88a99386d159d3723ea9e --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/413.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_413 extends Kohana_HTTP_Exception_413 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/414.php b/~dev_rating/system/classes/HTTP/Exception/414.php new file mode 100644 index 0000000000000000000000000000000000000000..a6b14ce74fda8d136766533cb1d6779a4d85a566 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/414.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_414 extends Kohana_HTTP_Exception_414 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/415.php b/~dev_rating/system/classes/HTTP/Exception/415.php new file mode 100644 index 0000000000000000000000000000000000000000..86f3cdfbc54e0f1068837ff31f1d6f7b945cc77b --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/415.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_415 extends Kohana_HTTP_Exception_415 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/416.php b/~dev_rating/system/classes/HTTP/Exception/416.php new file mode 100644 index 0000000000000000000000000000000000000000..ddf2c6cf6b713b415053497e97e495bbe29342b2 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/416.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_416 extends Kohana_HTTP_Exception_416 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/417.php b/~dev_rating/system/classes/HTTP/Exception/417.php new file mode 100644 index 0000000000000000000000000000000000000000..e4e4f2c71611d12d7ffbf987245a4f6562f0998e --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/417.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_417 extends Kohana_HTTP_Exception_417 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/500.php b/~dev_rating/system/classes/HTTP/Exception/500.php new file mode 100644 index 0000000000000000000000000000000000000000..5c4d26de59d8c834f31ebe61fa3ed389500ff673 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/500.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_500 extends Kohana_HTTP_Exception_500 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/501.php b/~dev_rating/system/classes/HTTP/Exception/501.php new file mode 100644 index 0000000000000000000000000000000000000000..e0efd35ea7777207d8c7476f7e0d32a5aaef944f --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/501.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_501 extends Kohana_HTTP_Exception_501 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/502.php b/~dev_rating/system/classes/HTTP/Exception/502.php new file mode 100644 index 0000000000000000000000000000000000000000..ce3d83d05e5c11d65cf223ea32266c34964e70b3 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/502.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_502 extends Kohana_HTTP_Exception_502 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/503.php b/~dev_rating/system/classes/HTTP/Exception/503.php new file mode 100644 index 0000000000000000000000000000000000000000..ea7f947f5957c883018cf9c4ca043e4bb1c11436 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/503.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_503 extends Kohana_HTTP_Exception_503 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/504.php b/~dev_rating/system/classes/HTTP/Exception/504.php new file mode 100644 index 0000000000000000000000000000000000000000..ccad03b00fd08f750fbfc3238eaccaae29e8c641 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/504.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_504 extends Kohana_HTTP_Exception_504 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/505.php b/~dev_rating/system/classes/HTTP/Exception/505.php new file mode 100644 index 0000000000000000000000000000000000000000..c223e03d6499c55b394b9e4e1765af345196ff59 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/505.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Exception_505 extends Kohana_HTTP_Exception_505 {} diff --git a/~dev_rating/system/classes/HTTP/Exception/Expected.php b/~dev_rating/system/classes/HTTP/Exception/Expected.php new file mode 100644 index 0000000000000000000000000000000000000000..34de4c4757cae32d2cce072b39c9287efffe1cd6 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/Expected.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class HTTP_Exception_Expected extends Kohana_HTTP_Exception_Expected {} diff --git a/~dev_rating/system/classes/HTTP/Exception/Redirect.php b/~dev_rating/system/classes/HTTP/Exception/Redirect.php new file mode 100644 index 0000000000000000000000000000000000000000..b1716b3e81810f8f51e7ede3a70193ab0753d00e --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Exception/Redirect.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class HTTP_Exception_Redirect extends Kohana_HTTP_Exception_Redirect {} diff --git a/~dev_rating/system/classes/HTTP/Header.php b/~dev_rating/system/classes/HTTP/Header.php new file mode 100644 index 0000000000000000000000000000000000000000..6bd10e322f750dfd8b5febf5499007b5ef2ce6ff --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Header.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class HTTP_Header extends Kohana_HTTP_Header {} diff --git a/~dev_rating/system/classes/HTTP/Message.php b/~dev_rating/system/classes/HTTP/Message.php new file mode 100644 index 0000000000000000000000000000000000000000..214f4a6df28a4a0cc8224588b725cacb7a32d632 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Message.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +interface HTTP_Message extends Kohana_HTTP_Message {} diff --git a/~dev_rating/system/classes/HTTP/Request.php b/~dev_rating/system/classes/HTTP/Request.php new file mode 100644 index 0000000000000000000000000000000000000000..d367901ab65e93b818c624a08a7ff4924b6fb18f --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Request.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +interface HTTP_Request extends Kohana_HTTP_Request {} diff --git a/~dev_rating/system/classes/HTTP/Response.php b/~dev_rating/system/classes/HTTP/Response.php new file mode 100644 index 0000000000000000000000000000000000000000..386901014672519b332567b44d7c2854099a3b22 --- /dev/null +++ b/~dev_rating/system/classes/HTTP/Response.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +interface HTTP_Response extends Kohana_HTTP_Response {} diff --git a/~dev_rating/system/classes/I18n.php b/~dev_rating/system/classes/I18n.php new file mode 100644 index 0000000000000000000000000000000000000000..327ba3a7087e2fea66cb8fd912f50efb29b60d36 --- /dev/null +++ b/~dev_rating/system/classes/I18n.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class I18n extends Kohana_I18n {} diff --git a/~dev_rating/system/classes/Inflector.php b/~dev_rating/system/classes/Inflector.php new file mode 100644 index 0000000000000000000000000000000000000000..80c83098a3eb4f232925fe0d02ed45d4909d2ef9 --- /dev/null +++ b/~dev_rating/system/classes/Inflector.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Inflector extends Kohana_Inflector {} diff --git a/~dev_rating/system/classes/Kohana.php b/~dev_rating/system/classes/Kohana.php new file mode 100644 index 0000000000000000000000000000000000000000..0775be6373ea2bb7475e36ff6b7afbc46d500aa9 --- /dev/null +++ b/~dev_rating/system/classes/Kohana.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana extends Kohana_Core {} diff --git a/~dev_rating/system/classes/Kohana/Arr.php b/~dev_rating/system/classes/Kohana/Arr.php new file mode 100644 index 0000000000000000000000000000000000000000..766369a814a36e40d8e9f8677802287183057dd0 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Arr.php @@ -0,0 +1,625 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Array helper. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Arr { + + /** + * @var string default delimiter for path() + */ + public static $delimiter = '.'; + + /** + * Tests if an array is associative or not. + * + * // Returns TRUE + * Arr::is_assoc(array('username' => 'john.doe')); + * + * // Returns FALSE + * Arr::is_assoc('foo', 'bar'); + * + * @param array $array array to check + * @return boolean + */ + public static function is_assoc(array $array) + { + // Keys of the array + $keys = array_keys($array); + + // If the array keys of the keys match the keys, then the array must + // not be associative (e.g. the keys array looked like {0:0, 1:1...}). + return array_keys($keys) !== $keys; + } + + /** + * Test if a value is an array with an additional check for array-like objects. + * + * // Returns TRUE + * Arr::is_array(array()); + * Arr::is_array(new ArrayObject); + * + * // Returns FALSE + * Arr::is_array(FALSE); + * Arr::is_array('not an array!'); + * Arr::is_array(Database::instance()); + * + * @param mixed $value value to check + * @return boolean + */ + public static function is_array($value) + { + if (is_array($value)) + { + // Definitely an array + return TRUE; + } + else + { + // Possibly a Traversable object, functionally the same as an array + return (is_object($value) AND $value instanceof Traversable); + } + } + + /** + * Gets a value from an array using a dot separated path. + * + * // Get the value of $array['foo']['bar'] + * $value = Arr::path($array, 'foo.bar'); + * + * Using a wildcard "*" will search intermediate arrays and return an array. + * + * // Get the values of "color" in theme + * $colors = Arr::path($array, 'theme.*.color'); + * + * // Using an array of keys + * $colors = Arr::path($array, array('theme', '*', 'color')); + * + * @param array $array array to search + * @param mixed $path key path string (delimiter separated) or array of keys + * @param mixed $default default value if the path is not set + * @param string $delimiter key path delimiter + * @return mixed + */ + public static function path($array, $path, $default = NULL, $delimiter = NULL) + { + if ( ! Arr::is_array($array)) + { + // This is not an array! + return $default; + } + + if (is_array($path)) + { + // The path has already been separated into keys + $keys = $path; + } + else + { + if (array_key_exists($path, $array)) + { + // No need to do extra processing + return $array[$path]; + } + + if ($delimiter === NULL) + { + // Use the default delimiter + $delimiter = Arr::$delimiter; + } + + // Remove starting delimiters and spaces + $path = ltrim($path, "{$delimiter} "); + + // Remove ending delimiters, spaces, and wildcards + $path = rtrim($path, "{$delimiter} *"); + + // Split the keys by delimiter + $keys = explode($delimiter, $path); + } + + do + { + $key = array_shift($keys); + + if (ctype_digit($key)) + { + // Make the key an integer + $key = (int) $key; + } + + if (isset($array[$key])) + { + if ($keys) + { + if (Arr::is_array($array[$key])) + { + // Dig down into the next part of the path + $array = $array[$key]; + } + else + { + // Unable to dig deeper + break; + } + } + else + { + // Found the path requested + return $array[$key]; + } + } + elseif ($key === '*') + { + // Handle wildcards + + $values = array(); + foreach ($array as $arr) + { + if ($value = Arr::path($arr, implode('.', $keys))) + { + $values[] = $value; + } + } + + if ($values) + { + // Found the values requested + return $values; + } + else + { + // Unable to dig deeper + break; + } + } + else + { + // Unable to dig deeper + break; + } + } + while ($keys); + + // Unable to find the value requested + return $default; + } + + /** + * Set a value on an array by path. + * + * @see Arr::path() + * @param array $array Array to update + * @param string $path Path + * @param mixed $value Value to set + * @param string $delimiter Path delimiter + */ + public static function set_path( & $array, $path, $value, $delimiter = NULL) + { + if ( ! $delimiter) + { + // Use the default delimiter + $delimiter = Arr::$delimiter; + } + + // The path has already been separated into keys + $keys = $path; + if ( ! is_array($path)) + { + // Split the keys by delimiter + $keys = explode($delimiter, $path); + } + + // Set current $array to inner-most array path + while (count($keys) > 1) + { + $key = array_shift($keys); + + if (ctype_digit($key)) + { + // Make the key an integer + $key = (int) $key; + } + + if ( ! isset($array[$key])) + { + $array[$key] = array(); + } + + $array = & $array[$key]; + } + + // Set key on inner-most array + $array[array_shift($keys)] = $value; + } + + /** + * Fill an array with a range of numbers. + * + * // Fill an array with values 5, 10, 15, 20 + * $values = Arr::range(5, 20); + * + * @param integer $step stepping + * @param integer $max ending number + * @return array + */ + public static function range($step = 10, $max = 100) + { + if ($step < 1) + return array(); + + $array = array(); + for ($i = $step; $i <= $max; $i += $step) + { + $array[$i] = $i; + } + + return $array; + } + + /** + * Retrieve a single key from an array. If the key does not exist in the + * array, the default value will be returned instead. + * + * // Get the value "username" from $_POST, if it exists + * $username = Arr::get($_POST, 'username'); + * + * // Get the value "sorting" from $_GET, if it exists + * $sorting = Arr::get($_GET, 'sorting'); + * + * @param array $array array to extract from + * @param string $key key name + * @param mixed $default default value + * @return mixed + */ + public static function get($array, $key, $default = NULL) + { + return isset($array[$key]) ? $array[$key] : $default; + } + + /** + * Retrieves multiple paths from an array. If the path does not exist in the + * array, the default value will be added instead. + * + * // Get the values "username", "password" from $_POST + * $auth = Arr::extract($_POST, array('username', 'password')); + * + * // Get the value "level1.level2a" from $data + * $data = array('level1' => array('level2a' => 'value 1', 'level2b' => 'value 2')); + * Arr::extract($data, array('level1.level2a', 'password')); + * + * @param array $array array to extract paths from + * @param array $paths list of path + * @param mixed $default default value + * @return array + */ + public static function extract($array, array $paths, $default = NULL) + { + $found = array(); + foreach ($paths as $path) + { + Arr::set_path($found, $path, Arr::path($array, $path, $default)); + } + + return $found; + } + + /** + * Retrieves muliple single-key values from a list of arrays. + * + * // Get all of the "id" values from a result + * $ids = Arr::pluck($result, 'id'); + * + * [!!] A list of arrays is an array that contains arrays, eg: array(array $a, array $b, array $c, ...) + * + * @param array $array list of arrays to check + * @param string $key key to pluck + * @return array + */ + public static function pluck($array, $key) + { + $values = array(); + + foreach ($array as $row) + { + if (isset($row[$key])) + { + // Found a value in this row + $values[] = $row[$key]; + } + } + + return $values; + } + + /** + * Adds a value to the beginning of an associative array. + * + * // Add an empty value to the start of a select list + * Arr::unshift($array, 'none', 'Select a value'); + * + * @param array $array array to modify + * @param string $key array key name + * @param mixed $val array value + * @return array + */ + public static function unshift( array & $array, $key, $val) + { + $array = array_reverse($array, TRUE); + $array[$key] = $val; + $array = array_reverse($array, TRUE); + + return $array; + } + + /** + * Recursive version of [array_map](http://php.net/array_map), applies one or more + * callbacks to all elements in an array, including sub-arrays. + * + * // Apply "strip_tags" to every element in the array + * $array = Arr::map('strip_tags', $array); + * + * // Apply $this->filter to every element in the array + * $array = Arr::map(array(array($this,'filter')), $array); + * + * // Apply strip_tags and $this->filter to every element + * $array = Arr::map(array('strip_tags',array($this,'filter')), $array); + * + * [!!] Because you can pass an array of callbacks, if you wish to use an array-form callback + * you must nest it in an additional array as above. Calling Arr::map(array($this,'filter'), $array) + * will cause an error. + * [!!] Unlike `array_map`, this method requires a callback and will only map + * a single array. + * + * @param mixed $callbacks array of callbacks to apply to every element in the array + * @param array $array array to map + * @param array $keys array of keys to apply to + * @return array + */ + public static function map($callbacks, $array, $keys = NULL) + { + foreach ($array as $key => $val) + { + if (is_array($val)) + { + $array[$key] = Arr::map($callbacks, $array[$key]); + } + elseif ( ! is_array($keys) OR in_array($key, $keys)) + { + if (is_array($callbacks)) + { + foreach ($callbacks as $cb) + { + $array[$key] = call_user_func($cb, $array[$key]); + } + } + else + { + $array[$key] = call_user_func($callbacks, $array[$key]); + } + } + } + + return $array; + } + + /** + * Recursively merge two or more arrays. Values in an associative array + * overwrite previous values with the same key. Values in an indexed array + * are appended, but only when they do not already exist in the result. + * + * Note that this does not work the same as [array_merge_recursive](http://php.net/array_merge_recursive)! + * + * $john = array('name' => 'john', 'children' => array('fred', 'paul', 'sally', 'jane')); + * $mary = array('name' => 'mary', 'children' => array('jane')); + * + * // John and Mary are married, merge them together + * $john = Arr::merge($john, $mary); + * + * // The output of $john will now be: + * array('name' => 'mary', 'children' => array('fred', 'paul', 'sally', 'jane')) + * + * @param array $array1 initial array + * @param array $array2,... array to merge + * @return array + */ + public static function merge($array1, $array2) + { + if (Arr::is_assoc($array2)) + { + foreach ($array2 as $key => $value) + { + if (is_array($value) + AND isset($array1[$key]) + AND is_array($array1[$key]) + ) + { + $array1[$key] = Arr::merge($array1[$key], $value); + } + else + { + $array1[$key] = $value; + } + } + } + else + { + foreach ($array2 as $value) + { + if ( ! in_array($value, $array1, TRUE)) + { + $array1[] = $value; + } + } + } + + if (func_num_args() > 2) + { + foreach (array_slice(func_get_args(), 2) as $array2) + { + if (Arr::is_assoc($array2)) + { + foreach ($array2 as $key => $value) + { + if (is_array($value) + AND isset($array1[$key]) + AND is_array($array1[$key]) + ) + { + $array1[$key] = Arr::merge($array1[$key], $value); + } + else + { + $array1[$key] = $value; + } + } + } + else + { + foreach ($array2 as $value) + { + if ( ! in_array($value, $array1, TRUE)) + { + $array1[] = $value; + } + } + } + } + } + + return $array1; + } + + /** + * Overwrites an array with values from input arrays. + * Keys that do not exist in the first array will not be added! + * + * $a1 = array('name' => 'john', 'mood' => 'happy', 'food' => 'bacon'); + * $a2 = array('name' => 'jack', 'food' => 'tacos', 'drink' => 'beer'); + * + * // Overwrite the values of $a1 with $a2 + * $array = Arr::overwrite($a1, $a2); + * + * // The output of $array will now be: + * array('name' => 'jack', 'mood' => 'happy', 'food' => 'tacos') + * + * @param array $array1 master array + * @param array $array2 input arrays that will overwrite existing values + * @return array + */ + public static function overwrite($array1, $array2) + { + foreach (array_intersect_key($array2, $array1) as $key => $value) + { + $array1[$key] = $value; + } + + if (func_num_args() > 2) + { + foreach (array_slice(func_get_args(), 2) as $array2) + { + foreach (array_intersect_key($array2, $array1) as $key => $value) + { + $array1[$key] = $value; + } + } + } + + return $array1; + } + + /** + * Creates a callable function and parameter list from a string representation. + * Note that this function does not validate the callback string. + * + * // Get the callback function and parameters + * list($func, $params) = Arr::callback('Foo::bar(apple,orange)'); + * + * // Get the result of the callback + * $result = call_user_func_array($func, $params); + * + * @param string $str callback string + * @return array function, params + */ + public static function callback($str) + { + // Overloaded as parts are found + $command = $params = NULL; + + // command[param,param] + if (preg_match('/^([^\(]*+)\((.*)\)$/', $str, $match)) + { + // command + $command = $match[1]; + + if ($match[2] !== '') + { + // param,param + $params = preg_split('/(?<!\\\\),/', $match[2]); + $params = str_replace('\,', ',', $params); + } + } + else + { + // command + $command = $str; + } + + if (strpos($command, '::') !== FALSE) + { + // Create a static method callable command + $command = explode('::', $command, 2); + } + + return array($command, $params); + } + + /** + * Convert a multi-dimensional array into a single-dimensional array. + * + * $array = array('set' => array('one' => 'something'), 'two' => 'other'); + * + * // Flatten the array + * $array = Arr::flatten($array); + * + * // The array will now be + * array('one' => 'something', 'two' => 'other'); + * + * [!!] The keys of array values will be discarded. + * + * @param array $array array to flatten + * @return array + * @since 3.0.6 + */ + public static function flatten($array) + { + $is_assoc = Arr::is_assoc($array); + + $flat = array(); + foreach ($array as $key => $value) + { + if (is_array($value)) + { + $flat = array_merge($flat, Arr::flatten($value)); + } + else + { + if ($is_assoc) + { + $flat[$key] = $value; + } + else + { + $flat[] = $value; + } + } + } + return $flat; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Config.php b/~dev_rating/system/classes/Kohana/Config.php new file mode 100644 index 0000000000000000000000000000000000000000..fda72bbbf23e7d24c4e1d34359fc57d78d73c048 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Config.php @@ -0,0 +1,192 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Wrapper for configuration arrays. Multiple configuration readers can be + * attached to allow loading configuration from files, database, etc. + * + * Configuration directives cascade across config sources in the same way that + * files cascade across the filesystem. + * + * Directives from sources high in the sources list will override ones from those + * below them. + * + * @package Kohana + * @category Configuration + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Config { + + // Configuration readers + protected $_sources = array(); + + // Array of config groups + protected $_groups = array(); + + /** + * Attach a configuration reader. By default, the reader will be added as + * the first used reader. However, if the reader should be used only when + * all other readers fail, use `FALSE` for the second parameter. + * + * $config->attach($reader); // Try first + * $config->attach($reader, FALSE); // Try last + * + * @param Kohana_Config_Source $source instance + * @param boolean $first add the reader as the first used object + * @return $this + */ + public function attach(Kohana_Config_Source $source, $first = TRUE) + { + if ($first === TRUE) + { + // Place the log reader at the top of the stack + array_unshift($this->_sources, $source); + } + else + { + // Place the reader at the bottom of the stack + $this->_sources[] = $source; + } + + // Clear any cached _groups + $this->_groups = array(); + + return $this; + } + + /** + * Detach a configuration reader. + * + * $config->detach($reader); + * + * @param Kohana_Config_Source $source instance + * @return $this + */ + public function detach(Kohana_Config_Source $source) + { + if (($key = array_search($source, $this->_sources)) !== FALSE) + { + // Remove the writer + unset($this->_sources[$key]); + } + + return $this; + } + + /** + * Load a configuration group. Searches all the config sources, merging all the + * directives found into a single config group. Any changes made to the config + * in this group will be mirrored across all writable sources. + * + * $array = $config->load($name); + * + * See [Kohana_Config_Group] for more info + * + * @param string $group configuration group name + * @return Kohana_Config_Group + * @throws Kohana_Exception + */ + public function load($group) + { + if ( ! count($this->_sources)) + { + throw new Kohana_Exception('No configuration sources attached'); + } + + if (empty($group)) + { + throw new Kohana_Exception("Need to specify a config group"); + } + + if ( ! is_string($group)) + { + throw new Kohana_Exception("Config group must be a string"); + } + + if (strpos($group, '.') !== FALSE) + { + // Split the config group and path + list($group, $path) = explode('.', $group, 2); + } + + if (isset($this->_groups[$group])) + { + if (isset($path)) + { + return Arr::path($this->_groups[$group], $path, NULL, '.'); + } + return $this->_groups[$group]; + } + + $config = array(); + + // We search from the "lowest" source and work our way up + $sources = array_reverse($this->_sources); + + foreach ($sources as $source) + { + if ($source instanceof Kohana_Config_Reader) + { + if ($source_config = $source->load($group)) + { + $config = Arr::merge($config, $source_config); + } + } + } + + $this->_groups[$group] = new Config_Group($this, $group, $config); + + if (isset($path)) + { + return Arr::path($config, $path, NULL, '.'); + } + + return $this->_groups[$group]; + } + + /** + * Copy one configuration group to all of the other writers. + * + * $config->copy($name); + * + * @param string $group configuration group name + * @return $this + */ + public function copy($group) + { + // Load the configuration group + $config = $this->load($group); + + foreach ($config->as_array() as $key => $value) + { + $this->_write_config($group, $key, $value); + } + + return $this; + } + + /** + * Callback used by the config group to store changes made to configuration + * + * @param string $group Group name + * @param string $key Variable name + * @param mixed $value The new value + * @return Kohana_Config Chainable instance + */ + public function _write_config($group, $key, $value) + { + foreach ($this->_sources as $source) + { + if ( ! ($source instanceof Kohana_Config_Writer)) + { + continue; + } + + // Copy each value in the config + $source->write($group, $key, $value); + } + + return $this; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Config/File.php b/~dev_rating/system/classes/Kohana/Config/File.php new file mode 100644 index 0000000000000000000000000000000000000000..4b4c3d7f1d8481de096aeab9b65fd67581b0c9c0 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Config/File.php @@ -0,0 +1,15 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * File-based configuration reader. Multiple configuration directories can be + * used by attaching multiple instances of this class to [Config]. + * + * @package Kohana + * @category Configuration + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Config_File extends Kohana_Config_File_Reader +{ + // @see Kohana_Config_File_Reader +} diff --git a/~dev_rating/system/classes/Kohana/Config/File/Reader.php b/~dev_rating/system/classes/Kohana/Config/File/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..5e237b14f97eb5159865c94bf90807db75ac58a9 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Config/File/Reader.php @@ -0,0 +1,56 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * File-based configuration reader. Multiple configuration directories can be + * used by attaching multiple instances of this class to [Kohana_Config]. + * + * @package Kohana + * @category Configuration + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Config_File_Reader implements Kohana_Config_Reader { + + /** + * The directory where config files are located + * @var string + */ + protected $_directory = ''; + + /** + * Creates a new file reader using the given directory as a config source + * + * @param string $directory Configuration directory to search + */ + public function __construct($directory = 'config') + { + // Set the configuration directory name + $this->_directory = trim($directory, '/'); + } + + /** + * Load and merge all of the configuration files in this group. + * + * $config->load($name); + * + * @param string $group configuration group name + * @return $this current object + * @uses Kohana::load + */ + public function load($group) + { + $config = array(); + + if ($files = Kohana::find_file($this->_directory, $group, NULL, TRUE)) + { + foreach ($files as $file) + { + // Merge each file to the configuration array + $config = Arr::merge($config, Kohana::load($file)); + } + } + + return $config; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Config/Group.php b/~dev_rating/system/classes/Kohana/Config/Group.php new file mode 100644 index 0000000000000000000000000000000000000000..3e35fdf5577bd88f479d7a5c158331769309b3f3 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Config/Group.php @@ -0,0 +1,131 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +/** + * The group wrapper acts as an interface to all the config directives + * gathered from across the system. + * + * This is the object returned from Kohana_Config::load + * + * Any modifications to configuration items should be done through an instance of this object + * + * @package Kohana + * @category Configuration + * @author Kohana Team + * @copyright (c) 2012-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Config_Group extends ArrayObject { + + /** + * Reference the config object that created this group + * Used when updating config + * @var Kohana_Config + */ + protected $_parent_instance = NULL; + + /** + * The group this config is for + * Used when updating config items + * @var string + */ + protected $_group_name = ''; + + /** + * Constructs the group object. Kohana_Config passes the config group + * and its config items to the object here. + * + * @param Kohana_Config $instance "Owning" instance of Kohana_Config + * @param string $group The group name + * @param array $config Group's config + */ + public function __construct(Kohana_Config $instance, $group, array $config = array()) + { + $this->_parent_instance = $instance; + $this->_group_name = $group; + + parent::__construct($config, ArrayObject::ARRAY_AS_PROPS); + } + + /** + * Return the current group in serialized form. + * + * echo $config; + * + * @return string + */ + public function __toString() + { + return serialize($this->getArrayCopy()); + } + + /** + * Alias for getArrayCopy() + * + * @return array Array copy of the group's config + */ + public function as_array() + { + return $this->getArrayCopy(); + } + + /** + * Returns the config group's name + * + * @return string The group name + */ + public function group_name() + { + return $this->_group_name; + } + + /** + * Get a variable from the configuration or return the default value. + * + * $value = $config->get($key); + * + * @param string $key array key + * @param mixed $default default value + * @return mixed + */ + public function get($key, $default = NULL) + { + return $this->offsetExists($key) ? $this->offsetGet($key) : $default; + } + + /** + * Sets a value in the configuration array. + * + * $config->set($key, $new_value); + * + * @param string $key array key + * @param mixed $value array value + * @return $this + */ + public function set($key, $value) + { + $this->offsetSet($key, $value); + + return $this; + } + + /** + * Overrides ArrayObject::offsetSet() + * This method is called when config is changed via + * + * $config->var = 'asd'; + * + * // OR + * + * $config['var'] = 'asd'; + * + * @param string $key The key of the config item we're changing + * @param mixed $value The new array value + */ + public function offsetSet($key, $value) + { + $this->_parent_instance->_write_config($this->_group_name, $key, $value); + + return parent::offsetSet($key, $value); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Config/Reader.php b/~dev_rating/system/classes/Kohana/Config/Reader.php new file mode 100644 index 0000000000000000000000000000000000000000..3434cc767e820f688359147284c59c4d649d5b37 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Config/Reader.php @@ -0,0 +1,25 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +/** + * Interface for config readers + * + * @package Kohana + * @category Configuration + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +interface Kohana_Config_Reader extends Kohana_Config_Source +{ + + /** + * Tries to load the specified configuration group + * + * Returns FALSE if group does not exist or an array if it does + * + * @param string $group Configuration group + * @return boolean|array + */ + public function load($group); + +} diff --git a/~dev_rating/system/classes/Kohana/Config/Source.php b/~dev_rating/system/classes/Kohana/Config/Source.php new file mode 100644 index 0000000000000000000000000000000000000000..38898608541ff47b166923452d023cfdd7b6e852 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Config/Source.php @@ -0,0 +1,14 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Base Config source Interface + * + * Used to identify either config readers or writers when calling [Kohana_Config::attach()] + * + * @package Kohana + * @category Configuration + * @author Kohana Team + * @copyright (c) 2012-2014 Kohana Team + * @license http://kohanaframework.org/license + */ + +interface Kohana_Config_Source {} diff --git a/~dev_rating/system/classes/Kohana/Config/Writer.php b/~dev_rating/system/classes/Kohana/Config/Writer.php new file mode 100644 index 0000000000000000000000000000000000000000..856ebde8dc99d430e5b6970d8193b640f8463a63 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Config/Writer.php @@ -0,0 +1,28 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +/** + * Interface for config writers + * + * Specifies the methods that a config writer must implement + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +interface Kohana_Config_Writer extends Kohana_Config_Source +{ + /** + * Writes the passed config for $group + * + * Returns chainable instance on success or throws + * Kohana_Config_Exception on failure + * + * @param string $group The config group + * @param string $key The config key to write to + * @param array $config The configuration to write + * @return boolean + */ + public function write($group, $key, $config); + +} diff --git a/~dev_rating/system/classes/Kohana/Controller.php b/~dev_rating/system/classes/Kohana/Controller.php new file mode 100644 index 0000000000000000000000000000000000000000..c7433607942057e838e4158d32e473146b22a72d --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Controller.php @@ -0,0 +1,145 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Abstract controller class. Controllers should only be created using a [Request]. + * + * Controllers methods will be automatically called in the following order by + * the request: + * + * $controller = new Controller_Foo($request); + * $controller->before(); + * $controller->action_bar(); + * $controller->after(); + * + * The controller action should add the output it creates to + * `$this->response->body($output)`, typically in the form of a [View], during the + * "action" part of execution. + * + * @package Kohana + * @category Controller + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_Controller { + + /** + * @var Request Request that created the controller + */ + public $request; + + /** + * @var Response The response that will be returned from controller + */ + public $response; + + /** + * Creates a new controller instance. Each controller must be constructed + * with the request object that created it. + * + * @param Request $request Request that created the controller + * @param Response $response The request's response + * @return void + */ + public function __construct(Request $request, Response $response) + { + // Assign the request to the controller + $this->request = $request; + + // Assign a response to the controller + $this->response = $response; + } + + /** + * Executes the given action and calls the [Controller::before] and [Controller::after] methods. + * + * Can also be used to catch exceptions from actions in a single place. + * + * 1. Before the controller action is called, the [Controller::before] method + * will be called. + * 2. Next the controller action will be called. + * 3. After the controller action is called, the [Controller::after] method + * will be called. + * + * @throws HTTP_Exception_404 + * @return Response + */ + public function execute() + { + // Execute the "before action" method + $this->before(); + + // Determine the action to use + $action = 'action_'.$this->request->action(); + + // If the action doesn't exist, it's a 404 + if ( ! method_exists($this, $action)) + { + throw HTTP_Exception::factory(404, + 'The requested URL :uri was not found on this server.', + array(':uri' => $this->request->uri()) + )->request($this->request); + } + + // Execute the action itself + $this->{$action}(); + + // Execute the "after action" method + $this->after(); + + // Return the response + return $this->response; + } + + /** + * Automatically executed before the controller action. Can be used to set + * class properties, do authorization checks, and execute other custom code. + * + * @return void + */ + public function before() + { + // Nothing by default + } + + /** + * Automatically executed after the controller action. Can be used to apply + * transformation to the response, add extra output, and execute + * other custom code. + * + * @return void + */ + public function after() + { + // Nothing by default + } + + /** + * Issues a HTTP redirect. + * + * Proxies to the [HTTP::redirect] method. + * + * @param string $uri URI to redirect to + * @param int $code HTTP Status code to use for the redirect + * @throws HTTP_Exception + */ + public static function redirect($uri = '', $code = 302) + { + return HTTP::redirect( (string) $uri, $code); + } + + /** + * Checks the browser cache to see the response needs to be returned, + * execution will halt and a 304 Not Modified will be sent if the + * browser cache is up to date. + * + * $this->check_cache(sha1($content)); + * + * @param string $etag Resource Etag + * @return Response + */ + protected function check_cache($etag = NULL) + { + return HTTP::check_cache($this->request, $this->response, $etag); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Controller/Template.php b/~dev_rating/system/classes/Kohana/Controller/Template.php new file mode 100644 index 0000000000000000000000000000000000000000..39045dad54eefcc8d634e4d6a88683f0a3715757 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Controller/Template.php @@ -0,0 +1,50 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Abstract controller class for automatic templating. + * + * @package Kohana + * @category Controller + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_Controller_Template extends Controller { + + /** + * @var View page template + */ + public $template = 'template'; + + /** + * @var boolean auto render template + **/ + public $auto_render = TRUE; + + /** + * Loads the template [View] object. + */ + public function before() + { + parent::before(); + + if ($this->auto_render === TRUE) + { + // Load the template + $this->template = View::factory($this->template); + } + } + + /** + * Assigns the template [View] as the request response. + */ + public function after() + { + if ($this->auto_render === TRUE) + { + $this->response->body($this->template->render()); + } + + parent::after(); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Cookie.php b/~dev_rating/system/classes/Kohana/Cookie.php new file mode 100644 index 0000000000000000000000000000000000000000..dafb7f5a43817e0b3fe13432cf02ea023f299134 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Cookie.php @@ -0,0 +1,160 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Cookie helper. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Cookie { + + /** + * @var string Magic salt to add to the cookie + */ + public static $salt = NULL; + + /** + * @var integer Number of seconds before the cookie expires + */ + public static $expiration = 0; + + /** + * @var string Restrict the path that the cookie is available to + */ + public static $path = '/'; + + /** + * @var string Restrict the domain that the cookie is available to + */ + public static $domain = NULL; + + /** + * @var boolean Only transmit cookies over secure connections + */ + public static $secure = FALSE; + + /** + * @var boolean Only transmit cookies over HTTP, disabling Javascript access + */ + public static $httponly = FALSE; + + /** + * Gets the value of a signed cookie. Cookies without signatures will not + * be returned. If the cookie signature is present, but invalid, the cookie + * will be deleted. + * + * // Get the "theme" cookie, or use "blue" if the cookie does not exist + * $theme = Cookie::get('theme', 'blue'); + * + * @param string $key cookie name + * @param mixed $default default value to return + * @return string + */ + public static function get($key, $default = NULL) + { + if ( ! isset($_COOKIE[$key])) + { + // The cookie does not exist + return $default; + } + + // Get the cookie value + $cookie = $_COOKIE[$key]; + + // Find the position of the split between salt and contents + $split = strlen(Cookie::salt($key, NULL)); + + if (isset($cookie[$split]) AND $cookie[$split] === '~') + { + // Separate the salt and the value + list ($hash, $value) = explode('~', $cookie, 2); + + if (Cookie::salt($key, $value) === $hash) + { + // Cookie signature is valid + return $value; + } + + // The cookie signature is invalid, delete it + Cookie::delete($key); + } + + return $default; + } + + /** + * Sets a signed cookie. Note that all cookie values must be strings and no + * automatic serialization will be performed! + * + * // Set the "theme" cookie + * Cookie::set('theme', 'red'); + * + * @param string $name name of cookie + * @param string $value value of cookie + * @param integer $expiration lifetime in seconds + * @return boolean + * @uses Cookie::salt + */ + public static function set($name, $value, $expiration = NULL) + { + if ($expiration === NULL) + { + // Use the default expiration + $expiration = Cookie::$expiration; + } + + if ($expiration !== 0) + { + // The expiration is expected to be a UNIX timestamp + $expiration += time(); + } + + // Add the salt to the cookie value + $value = Cookie::salt($name, $value).'~'.$value; + + return setcookie($name, $value, $expiration, Cookie::$path, Cookie::$domain, Cookie::$secure, Cookie::$httponly); + } + + /** + * Deletes a cookie by making the value NULL and expiring it. + * + * Cookie::delete('theme'); + * + * @param string $name cookie name + * @return boolean + */ + public static function delete($name) + { + // Remove the cookie + unset($_COOKIE[$name]); + + // Nullify the cookie and make it expire + return setcookie($name, NULL, -86400, Cookie::$path, Cookie::$domain, Cookie::$secure, Cookie::$httponly); + } + + /** + * Generates a salt string for a cookie based on the name and value. + * + * $salt = Cookie::salt('theme', 'red'); + * + * @param string $name name of cookie + * @param string $value value of cookie + * @return string + */ + public static function salt($name, $value) + { + // Require a valid salt + if ( ! Cookie::$salt) + { + throw new Kohana_Exception('A valid cookie salt is required. Please set Cookie::$salt in your bootstrap.php. For more information check the documentation'); + } + + // Determine the user agent + $agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : 'unknown'; + + return sha1($agent.$name.$value.Cookie::$salt); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Core.php b/~dev_rating/system/classes/Kohana/Core.php new file mode 100644 index 0000000000000000000000000000000000000000..081d4bb050380ddd3ffa8b358cd5d3d4964a62b6 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Core.php @@ -0,0 +1,1048 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Contains the most low-level helpers methods in Kohana: + * + * - Environment initialization + * - Locating files within the cascading filesystem + * - Auto-loading and transparent extension of classes + * - Variable and path debugging + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Core { + + // Release version and codename + const VERSION = '3.3.1'; + const CODENAME = 'peregrinus'; + + // Common environment type constants for consistency and convenience + const PRODUCTION = 10; + const STAGING = 20; + const TESTING = 30; + const DEVELOPMENT = 40; + + // Security check that is added to all generated PHP files + const FILE_SECURITY = '<?php defined(\'SYSPATH\') OR die(\'No direct script access.\');'; + + // Format of cache files: header, cache name, and data + const FILE_CACHE = ":header \n\n// :name\n\n:data\n"; + + /** + * @var string Current environment name + */ + public static $environment = Kohana::DEVELOPMENT; + + /** + * @var boolean True if Kohana is running on windows + */ + public static $is_windows = FALSE; + + /** + * @var boolean True if [magic quotes](http://php.net/manual/en/security.magicquotes.php) is enabled. + */ + public static $magic_quotes = FALSE; + + /** + * @var boolean TRUE if PHP safe mode is on + */ + public static $safe_mode = FALSE; + + /** + * @var string + */ + public static $content_type = 'text/html'; + + /** + * @var string character set of input and output + */ + public static $charset = 'utf-8'; + + /** + * @var string the name of the server Kohana is hosted upon + */ + public static $server_name = ''; + + /** + * @var array list of valid host names for this instance + */ + public static $hostnames = array(); + + /** + * @var string base URL to the application + */ + public static $base_url = '/'; + + /** + * @var string Application index file, added to links generated by Kohana. Set by [Kohana::init] + */ + public static $index_file = 'index.php'; + + /** + * @var string Cache directory, used by [Kohana::cache]. Set by [Kohana::init] + */ + public static $cache_dir; + + /** + * @var integer Default lifetime for caching, in seconds, used by [Kohana::cache]. Set by [Kohana::init] + */ + public static $cache_life = 60; + + /** + * @var boolean Whether to use internal caching for [Kohana::find_file], does not apply to [Kohana::cache]. Set by [Kohana::init] + */ + public static $caching = FALSE; + + /** + * @var boolean Whether to enable [profiling](kohana/profiling). Set by [Kohana::init] + */ + public static $profiling = TRUE; + + /** + * @var boolean Enable Kohana catching and displaying PHP errors and exceptions. Set by [Kohana::init] + */ + public static $errors = TRUE; + + /** + * @var array Types of errors to display at shutdown + */ + public static $shutdown_errors = array(E_PARSE, E_ERROR, E_USER_ERROR); + + /** + * @var boolean set the X-Powered-By header + */ + public static $expose = FALSE; + + /** + * @var Log logging object + */ + public static $log; + + /** + * @var Config config object + */ + public static $config; + + /** + * @var boolean Has [Kohana::init] been called? + */ + protected static $_init = FALSE; + + /** + * @var array Currently active modules + */ + protected static $_modules = array(); + + /** + * @var array Include paths that are used to find files + */ + protected static $_paths = array(APPPATH, SYSPATH); + + /** + * @var array File path cache, used when caching is true in [Kohana::init] + */ + protected static $_files = array(); + + /** + * @var boolean Has the file path cache changed during this execution? Used internally when when caching is true in [Kohana::init] + */ + protected static $_files_changed = FALSE; + + /** + * Initializes the environment: + * + * - Disables register_globals and magic_quotes_gpc + * - Determines the current environment + * - Set global settings + * - Sanitizes GET, POST, and COOKIE variables + * - Converts GET, POST, and COOKIE variables to the global character set + * + * The following settings can be set: + * + * Type | Setting | Description | Default Value + * ----------|------------|------------------------------------------------|--------------- + * `string` | base_url | The base URL for your application. This should be the *relative* path from your DOCROOT to your `index.php` file, in other words, if Kohana is in a subfolder, set this to the subfolder name, otherwise leave it as the default. **The leading slash is required**, trailing slash is optional. | `"/"` + * `string` | index_file | The name of the [front controller](http://en.wikipedia.org/wiki/Front_Controller_pattern). This is used by Kohana to generate relative urls like [HTML::anchor()] and [URL::base()]. This is usually `index.php`. To [remove index.php from your urls](tutorials/clean-urls), set this to `FALSE`. | `"index.php"` + * `string` | charset | Character set used for all input and output | `"utf-8"` + * `string` | cache_dir | Kohana's cache directory. Used by [Kohana::cache] for simple internal caching, like [Fragments](kohana/fragments) and **\[caching database queries](this should link somewhere)**. This has nothing to do with the [Cache module](cache). | `APPPATH."cache"` + * `integer` | cache_life | Lifetime, in seconds, of items cached by [Kohana::cache] | `60` + * `boolean` | errors | Should Kohana catch PHP errors and uncaught Exceptions and show the `error_view`. See [Error Handling](kohana/errors) for more info. <br /> <br /> Recommended setting: `TRUE` while developing, `FALSE` on production servers. | `TRUE` + * `boolean` | profile | Whether to enable the [Profiler](kohana/profiling). <br /> <br />Recommended setting: `TRUE` while developing, `FALSE` on production servers. | `TRUE` + * `boolean` | caching | Cache file locations to speed up [Kohana::find_file]. This has nothing to do with [Kohana::cache], [Fragments](kohana/fragments) or the [Cache module](cache). <br /> <br /> Recommended setting: `FALSE` while developing, `TRUE` on production servers. | `FALSE` + * `boolean` | expose | Set the X-Powered-By header + * + * @throws Kohana_Exception + * @param array $settings Array of settings. See above. + * @return void + * @uses Kohana::globals + * @uses Kohana::sanitize + * @uses Kohana::cache + * @uses Profiler + */ + public static function init(array $settings = NULL) + { + if (Kohana::$_init) + { + // Do not allow execution twice + return; + } + + // Kohana is now initialized + Kohana::$_init = TRUE; + + if (isset($settings['profile'])) + { + // Enable profiling + Kohana::$profiling = (bool) $settings['profile']; + } + + // Start an output buffer + ob_start(); + + if (isset($settings['errors'])) + { + // Enable error handling + Kohana::$errors = (bool) $settings['errors']; + } + + if (Kohana::$errors === TRUE) + { + // Enable Kohana exception handling, adds stack traces and error source. + set_exception_handler(array('Kohana_Exception', 'handler')); + + // Enable Kohana error handling, converts all PHP errors to exceptions. + set_error_handler(array('Kohana', 'error_handler')); + } + + /** + * Enable xdebug parameter collection in development mode to improve fatal stack traces. + */ + if (Kohana::$environment == Kohana::DEVELOPMENT AND extension_loaded('xdebug')) + { + ini_set('xdebug.collect_params', 3); + } + + // Enable the Kohana shutdown handler, which catches E_FATAL errors. + register_shutdown_function(array('Kohana', 'shutdown_handler')); + + if (ini_get('register_globals')) + { + // Reverse the effects of register_globals + Kohana::globals(); + } + + if (isset($settings['expose'])) + { + Kohana::$expose = (bool) $settings['expose']; + } + + // Determine if we are running in a Windows environment + Kohana::$is_windows = (DIRECTORY_SEPARATOR === '\\'); + + // Determine if we are running in safe mode + Kohana::$safe_mode = (bool) ini_get('safe_mode'); + + if (isset($settings['cache_dir'])) + { + if ( ! is_dir($settings['cache_dir'])) + { + try + { + // Create the cache directory + mkdir($settings['cache_dir'], 0755, TRUE); + + // Set permissions (must be manually set to fix umask issues) + chmod($settings['cache_dir'], 0755); + } + catch (Exception $e) + { + throw new Kohana_Exception('Could not create cache directory :dir', + array(':dir' => Debug::path($settings['cache_dir']))); + } + } + + // Set the cache directory path + Kohana::$cache_dir = realpath($settings['cache_dir']); + } + else + { + // Use the default cache directory + Kohana::$cache_dir = APPPATH.'cache'; + } + + if ( ! is_writable(Kohana::$cache_dir)) + { + throw new Kohana_Exception('Directory :dir must be writable', + array(':dir' => Debug::path(Kohana::$cache_dir))); + } + + if (isset($settings['cache_life'])) + { + // Set the default cache lifetime + Kohana::$cache_life = (int) $settings['cache_life']; + } + + if (isset($settings['caching'])) + { + // Enable or disable internal caching + Kohana::$caching = (bool) $settings['caching']; + } + + if (Kohana::$caching === TRUE) + { + // Load the file path cache + Kohana::$_files = Kohana::cache('Kohana::find_file()'); + } + + if (isset($settings['charset'])) + { + // Set the system character set + Kohana::$charset = strtolower($settings['charset']); + } + + if (function_exists('mb_internal_encoding')) + { + // Set the MB extension encoding to the same character set + mb_internal_encoding(Kohana::$charset); + } + + if (isset($settings['base_url'])) + { + // Set the base URL + Kohana::$base_url = rtrim($settings['base_url'], '/').'/'; + } + + if (isset($settings['index_file'])) + { + // Set the index file + Kohana::$index_file = trim($settings['index_file'], '/'); + } + + // Determine if the extremely evil magic quotes are enabled + Kohana::$magic_quotes = (version_compare(PHP_VERSION, '5.4') < 0 AND get_magic_quotes_gpc()); + + // Sanitize all request variables + $_GET = Kohana::sanitize($_GET); + $_POST = Kohana::sanitize($_POST); + $_COOKIE = Kohana::sanitize($_COOKIE); + + // Load the logger if one doesn't already exist + if ( ! Kohana::$log instanceof Log) + { + Kohana::$log = Log::instance(); + } + + // Load the config if one doesn't already exist + if ( ! Kohana::$config instanceof Config) + { + Kohana::$config = new Config; + } + } + + /** + * Cleans up the environment: + * + * - Restore the previous error and exception handlers + * - Destroy the Kohana::$log and Kohana::$config objects + * + * @return void + */ + public static function deinit() + { + if (Kohana::$_init) + { + // Removed the autoloader + spl_autoload_unregister(array('Kohana', 'auto_load')); + + if (Kohana::$errors) + { + // Go back to the previous error handler + restore_error_handler(); + + // Go back to the previous exception handler + restore_exception_handler(); + } + + // Destroy objects created by init + Kohana::$log = Kohana::$config = NULL; + + // Reset internal storage + Kohana::$_modules = Kohana::$_files = array(); + Kohana::$_paths = array(APPPATH, SYSPATH); + + // Reset file cache status + Kohana::$_files_changed = FALSE; + + // Kohana is no longer initialized + Kohana::$_init = FALSE; + } + } + + /** + * Reverts the effects of the `register_globals` PHP setting by unsetting + * all global variables except for the default super globals (GPCS, etc), + * which is a [potential security hole.][ref-wikibooks] + * + * This is called automatically by [Kohana::init] if `register_globals` is + * on. + * + * + * [ref-wikibooks]: http://en.wikibooks.org/wiki/PHP_Programming/Register_Globals + * + * @return void + */ + public static function globals() + { + if (isset($_REQUEST['GLOBALS']) OR isset($_FILES['GLOBALS'])) + { + // Prevent malicious GLOBALS overload attack + echo "Global variable overload attack detected! Request aborted.\n"; + + // Exit with an error status + exit(1); + } + + // Get the variable names of all globals + $global_variables = array_keys($GLOBALS); + + // Remove the standard global variables from the list + $global_variables = array_diff($global_variables, array( + '_COOKIE', + '_ENV', + '_GET', + '_FILES', + '_POST', + '_REQUEST', + '_SERVER', + '_SESSION', + 'GLOBALS', + )); + + foreach ($global_variables as $name) + { + // Unset the global variable, effectively disabling register_globals + unset($GLOBALS[$name]); + } + } + + /** + * Recursively sanitizes an input variable: + * + * - Strips slashes if magic quotes are enabled + * - Normalizes all newlines to LF + * + * @param mixed $value any variable + * @return mixed sanitized variable + */ + public static function sanitize($value) + { + if (is_array($value) OR is_object($value)) + { + foreach ($value as $key => $val) + { + // Recursively clean each value + $value[$key] = Kohana::sanitize($val); + } + } + elseif (is_string($value)) + { + if (Kohana::$magic_quotes === TRUE) + { + // Remove slashes added by magic quotes + $value = stripslashes($value); + } + + if (strpos($value, "\r") !== FALSE) + { + // Standardize newlines + $value = str_replace(array("\r\n", "\r"), "\n", $value); + } + } + + return $value; + } + + /** + * Provides auto-loading support of classes that follow Kohana's [class + * naming conventions](kohana/conventions#class-names-and-file-location). + * See [Loading Classes](kohana/autoloading) for more information. + * + * // Loads classes/My/Class/Name.php + * Kohana::auto_load('My_Class_Name'); + * + * or with a custom directory: + * + * // Loads vendor/My/Class/Name.php + * Kohana::auto_load('My_Class_Name', 'vendor'); + * + * You should never have to call this function, as simply calling a class + * will cause it to be called. + * + * This function must be enabled as an autoloader in the bootstrap: + * + * spl_autoload_register(array('Kohana', 'auto_load')); + * + * @param string $class Class name + * @param string $directory Directory to load from + * @return boolean + */ + public static function auto_load($class, $directory = 'classes') + { + // Transform the class name according to PSR-0 + $class = ltrim($class, '\\'); + $file = ''; + $namespace = ''; + + if ($last_namespace_position = strripos($class, '\\')) + { + $namespace = substr($class, 0, $last_namespace_position); + $class = substr($class, $last_namespace_position + 1); + $file = str_replace('\\', DIRECTORY_SEPARATOR, $namespace).DIRECTORY_SEPARATOR; + } + + $file .= str_replace('_', DIRECTORY_SEPARATOR, $class); + + if ($path = Kohana::find_file($directory, $file)) + { + // Load the class file + require $path; + + // Class has been found + return TRUE; + } + + // Class is not in the filesystem + return FALSE; + } + + /** + * Provides auto-loading support of classes that follow Kohana's old class + * naming conventions. + * + * This is included for compatibility purposes with older modules. + * + * @param string $class Class name + * @param string $directory Directory to load from + * @return boolean + */ + public static function auto_load_lowercase($class, $directory = 'classes') + { + // Transform the class name into a path + $file = str_replace('_', DIRECTORY_SEPARATOR, strtolower($class)); + + if ($path = Kohana::find_file($directory, $file)) + { + // Load the class file + require $path; + + // Class has been found + return TRUE; + } + + // Class is not in the filesystem + return FALSE; + } + + /** + * Changes the currently enabled modules. Module paths may be relative + * or absolute, but must point to a directory: + * + * Kohana::modules(array('modules/foo', MODPATH.'bar')); + * + * @param array $modules list of module paths + * @return array enabled modules + */ + public static function modules(array $modules = NULL) + { + if ($modules === NULL) + { + // Not changing modules, just return the current set + return Kohana::$_modules; + } + + // Start a new list of include paths, APPPATH first + $paths = array(APPPATH); + + foreach ($modules as $name => $path) + { + if (is_dir($path)) + { + // Add the module to include paths + $paths[] = $modules[$name] = realpath($path).DIRECTORY_SEPARATOR; + } + else + { + // This module is invalid, remove it + throw new Kohana_Exception('Attempted to load an invalid or missing module \':module\' at \':path\'', array( + ':module' => $name, + ':path' => Debug::path($path), + )); + } + } + + // Finish the include paths by adding SYSPATH + $paths[] = SYSPATH; + + // Set the new include paths + Kohana::$_paths = $paths; + + // Set the current module list + Kohana::$_modules = $modules; + + foreach (Kohana::$_modules as $path) + { + $init = $path.'init'.EXT; + + if (is_file($init)) + { + // Include the module initialization file once + require_once $init; + } + } + + return Kohana::$_modules; + } + + /** + * Returns the the currently active include paths, including the + * application, system, and each module's path. + * + * @return array + */ + public static function include_paths() + { + return Kohana::$_paths; + } + + /** + * Searches for a file in the [Cascading Filesystem](kohana/files), and + * returns the path to the file that has the highest precedence, so that it + * can be included. + * + * When searching the "config", "messages", or "i18n" directories, or when + * the `$array` flag is set to true, an array of all the files that match + * that path in the [Cascading Filesystem](kohana/files) will be returned. + * These files will return arrays which must be merged together. + * + * If no extension is given, the default extension (`EXT` set in + * `index.php`) will be used. + * + * // Returns an absolute path to views/template.php + * Kohana::find_file('views', 'template'); + * + * // Returns an absolute path to media/css/style.css + * Kohana::find_file('media', 'css/style', 'css'); + * + * // Returns an array of all the "mimes" configuration files + * Kohana::find_file('config', 'mimes'); + * + * @param string $dir directory name (views, i18n, classes, extensions, etc.) + * @param string $file filename with subdirectory + * @param string $ext extension to search for + * @param boolean $array return an array of files? + * @return array a list of files when $array is TRUE + * @return string single file path + */ + public static function find_file($dir, $file, $ext = NULL, $array = FALSE) + { + if ($ext === NULL) + { + // Use the default extension + $ext = EXT; + } + elseif ($ext) + { + // Prefix the extension with a period + $ext = ".{$ext}"; + } + else + { + // Use no extension + $ext = ''; + } + + // Create a partial path of the filename + $path = $dir.DIRECTORY_SEPARATOR.$file.$ext; + + if (Kohana::$caching === TRUE AND isset(Kohana::$_files[$path.($array ? '_array' : '_path')])) + { + // This path has been cached + return Kohana::$_files[$path.($array ? '_array' : '_path')]; + } + + if (Kohana::$profiling === TRUE AND class_exists('Profiler', FALSE)) + { + // Start a new benchmark + $benchmark = Profiler::start('Kohana', __FUNCTION__); + } + + if ($array OR $dir === 'config' OR $dir === 'i18n' OR $dir === 'messages') + { + // Include paths must be searched in reverse + $paths = array_reverse(Kohana::$_paths); + + // Array of files that have been found + $found = array(); + + foreach ($paths as $dir) + { + if (is_file($dir.$path)) + { + // This path has a file, add it to the list + $found[] = $dir.$path; + } + } + } + else + { + // The file has not been found yet + $found = FALSE; + + foreach (Kohana::$_paths as $dir) + { + if (is_file($dir.$path)) + { + // A path has been found + $found = $dir.$path; + + // Stop searching + break; + } + } + } + + if (Kohana::$caching === TRUE) + { + // Add the path to the cache + Kohana::$_files[$path.($array ? '_array' : '_path')] = $found; + + // Files have been changed + Kohana::$_files_changed = TRUE; + } + + if (isset($benchmark)) + { + // Stop the benchmark + Profiler::stop($benchmark); + } + + return $found; + } + + /** + * Recursively finds all of the files in the specified directory at any + * location in the [Cascading Filesystem](kohana/files), and returns an + * array of all the files found, sorted alphabetically. + * + * // Find all view files. + * $views = Kohana::list_files('views'); + * + * @param string $directory directory name + * @param array $paths list of paths to search + * @return array + */ + public static function list_files($directory = NULL, array $paths = NULL) + { + if ($directory !== NULL) + { + // Add the directory separator + $directory .= DIRECTORY_SEPARATOR; + } + + if ($paths === NULL) + { + // Use the default paths + $paths = Kohana::$_paths; + } + + // Create an array for the files + $found = array(); + + foreach ($paths as $path) + { + if (is_dir($path.$directory)) + { + // Create a new directory iterator + $dir = new DirectoryIterator($path.$directory); + + foreach ($dir as $file) + { + // Get the file name + $filename = $file->getFilename(); + + if ($filename[0] === '.' OR $filename[strlen($filename)-1] === '~') + { + // Skip all hidden files and UNIX backup files + continue; + } + + // Relative filename is the array key + $key = $directory.$filename; + + if ($file->isDir()) + { + if ($sub_dir = Kohana::list_files($key, $paths)) + { + if (isset($found[$key])) + { + // Append the sub-directory list + $found[$key] += $sub_dir; + } + else + { + // Create a new sub-directory list + $found[$key] = $sub_dir; + } + } + } + else + { + if ( ! isset($found[$key])) + { + // Add new files to the list + $found[$key] = realpath($file->getPathName()); + } + } + } + } + } + + // Sort the results alphabetically + ksort($found); + + return $found; + } + + /** + * Loads a file within a totally empty scope and returns the output: + * + * $foo = Kohana::load('foo.php'); + * + * @param string $file + * @return mixed + */ + public static function load($file) + { + return include $file; + } + + /** + * Provides simple file-based caching for strings and arrays: + * + * // Set the "foo" cache + * Kohana::cache('foo', 'hello, world'); + * + * // Get the "foo" cache + * $foo = Kohana::cache('foo'); + * + * All caches are stored as PHP code, generated with [var_export][ref-var]. + * Caching objects may not work as expected. Storing references or an + * object or array that has recursion will cause an E_FATAL. + * + * The cache directory and default cache lifetime is set by [Kohana::init] + * + * [ref-var]: http://php.net/var_export + * + * @throws Kohana_Exception + * @param string $name name of the cache + * @param mixed $data data to cache + * @param integer $lifetime number of seconds the cache is valid for + * @return mixed for getting + * @return boolean for setting + */ + public static function cache($name, $data = NULL, $lifetime = NULL) + { + // Cache file is a hash of the name + $file = sha1($name).'.txt'; + + // Cache directories are split by keys to prevent filesystem overload + $dir = Kohana::$cache_dir.DIRECTORY_SEPARATOR.$file[0].$file[1].DIRECTORY_SEPARATOR; + + if ($lifetime === NULL) + { + // Use the default lifetime + $lifetime = Kohana::$cache_life; + } + + if ($data === NULL) + { + if (is_file($dir.$file)) + { + if ((time() - filemtime($dir.$file)) < $lifetime) + { + // Return the cache + try + { + return unserialize(file_get_contents($dir.$file)); + } + catch (Exception $e) + { + // Cache is corrupt, let return happen normally. + } + } + else + { + try + { + // Cache has expired + unlink($dir.$file); + } + catch (Exception $e) + { + // Cache has mostly likely already been deleted, + // let return happen normally. + } + } + } + + // Cache not found + return NULL; + } + + if ( ! is_dir($dir)) + { + // Create the cache directory + mkdir($dir, 0777, TRUE); + + // Set permissions (must be manually set to fix umask issues) + chmod($dir, 0777); + } + + // Force the data to be a string + $data = serialize($data); + + try + { + // Write the cache + return (bool) file_put_contents($dir.$file, $data, LOCK_EX); + } + catch (Exception $e) + { + // Failed to write cache + return FALSE; + } + } + + /** + * Get a message from a file. Messages are arbitrary strings that are stored + * in the `messages/` directory and reference by a key. Translation is not + * performed on the returned values. See [message files](kohana/files/messages) + * for more information. + * + * // Get "username" from messages/text.php + * $username = Kohana::message('text', 'username'); + * + * @param string $file file name + * @param string $path key path to get + * @param mixed $default default value if the path does not exist + * @return string message string for the given path + * @return array complete message list, when no path is specified + * @uses Arr::merge + * @uses Arr::path + */ + public static function message($file, $path = NULL, $default = NULL) + { + static $messages; + + if ( ! isset($messages[$file])) + { + // Create a new message list + $messages[$file] = array(); + + if ($files = Kohana::find_file('messages', $file)) + { + foreach ($files as $f) + { + // Combine all the messages recursively + $messages[$file] = Arr::merge($messages[$file], Kohana::load($f)); + } + } + } + + if ($path === NULL) + { + // Return all of the messages + return $messages[$file]; + } + else + { + // Get a message using the path + return Arr::path($messages[$file], $path, $default); + } + } + + /** + * PHP error handler, converts all errors into ErrorExceptions. This handler + * respects error_reporting settings. + * + * @throws ErrorException + * @return TRUE + */ + public static function error_handler($code, $error, $file = NULL, $line = NULL) + { + if (error_reporting() & $code) + { + // This error is not suppressed by current error reporting settings + // Convert the error into an ErrorException + throw new ErrorException($error, $code, 0, $file, $line); + } + + // Do not execute the PHP error handler + return TRUE; + } + + /** + * Catches errors that are not caught by the error handler, such as E_PARSE. + * + * @uses Kohana_Exception::handler + * @return void + */ + public static function shutdown_handler() + { + if ( ! Kohana::$_init) + { + // Do not execute when not active + return; + } + + try + { + if (Kohana::$caching === TRUE AND Kohana::$_files_changed === TRUE) + { + // Write the file path cache + Kohana::cache('Kohana::find_file()', Kohana::$_files); + } + } + catch (Exception $e) + { + // Pass the exception to the handler + Kohana_Exception::handler($e); + } + + if (Kohana::$errors AND $error = error_get_last() AND in_array($error['type'], Kohana::$shutdown_errors)) + { + // Clean the output buffer + ob_get_level() AND ob_clean(); + + // Fake an exception for nice debugging + Kohana_Exception::handler(new ErrorException($error['message'], $error['type'], 0, $error['file'], $error['line'])); + + // Shutdown now to avoid a "death loop" + exit(1); + } + } + + /** + * Generates a version string based on the variables defined above. + * + * @return string + */ + public static function version() + { + return 'Kohana Framework '.Kohana::VERSION.' ('.Kohana::CODENAME.')'; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Date.php b/~dev_rating/system/classes/Kohana/Date.php new file mode 100644 index 0000000000000000000000000000000000000000..692d658cbb11ddf01fb07db5eb382847ff5eb5f3 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Date.php @@ -0,0 +1,603 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Date helper. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Date { + + // Second amounts for various time increments + const YEAR = 31556926; + const MONTH = 2629744; + const WEEK = 604800; + const DAY = 86400; + const HOUR = 3600; + const MINUTE = 60; + + // Available formats for Date::months() + const MONTHS_LONG = '%B'; + const MONTHS_SHORT = '%b'; + + /** + * Default timestamp format for formatted_time + * @var string + */ + public static $timestamp_format = 'Y-m-d H:i:s'; + + /** + * Timezone for formatted_time + * @link http://uk2.php.net/manual/en/timezones.php + * @var string + */ + public static $timezone; + + /** + * Returns the offset (in seconds) between two time zones. Use this to + * display dates to users in different time zones. + * + * $seconds = Date::offset('America/Chicago', 'GMT'); + * + * [!!] A list of time zones that PHP supports can be found at + * <http://php.net/timezones>. + * + * @param string $remote timezone that to find the offset of + * @param string $local timezone used as the baseline + * @param mixed $now UNIX timestamp or date string + * @return integer + */ + public static function offset($remote, $local = NULL, $now = NULL) + { + if ($local === NULL) + { + // Use the default timezone + $local = date_default_timezone_get(); + } + + if (is_int($now)) + { + // Convert the timestamp into a string + $now = date(DateTime::RFC2822, $now); + } + + // Create timezone objects + $zone_remote = new DateTimeZone($remote); + $zone_local = new DateTimeZone($local); + + // Create date objects from timezones + $time_remote = new DateTime($now, $zone_remote); + $time_local = new DateTime($now, $zone_local); + + // Find the offset + $offset = $zone_remote->getOffset($time_remote) - $zone_local->getOffset($time_local); + + return $offset; + } + + /** + * Number of seconds in a minute, incrementing by a step. Typically used as + * a shortcut for generating a list that can used in a form. + * + * $seconds = Date::seconds(); // 01, 02, 03, ..., 58, 59, 60 + * + * @param integer $step amount to increment each step by, 1 to 30 + * @param integer $start start value + * @param integer $end end value + * @return array A mirrored (foo => foo) array from 1-60. + */ + public static function seconds($step = 1, $start = 0, $end = 60) + { + // Always integer + $step = (int) $step; + + $seconds = array(); + + for ($i = $start; $i < $end; $i += $step) + { + $seconds[$i] = sprintf('%02d', $i); + } + + return $seconds; + } + + /** + * Number of minutes in an hour, incrementing by a step. Typically used as + * a shortcut for generating a list that can be used in a form. + * + * $minutes = Date::minutes(); // 05, 10, 15, ..., 50, 55, 60 + * + * @uses Date::seconds + * @param integer $step amount to increment each step by, 1 to 30 + * @return array A mirrored (foo => foo) array from 1-60. + */ + public static function minutes($step = 5) + { + // Because there are the same number of minutes as seconds in this set, + // we choose to re-use seconds(), rather than creating an entirely new + // function. Shhhh, it's cheating! ;) There are several more of these + // in the following methods. + return Date::seconds($step); + } + + /** + * Number of hours in a day. Typically used as a shortcut for generating a + * list that can be used in a form. + * + * $hours = Date::hours(); // 01, 02, 03, ..., 10, 11, 12 + * + * @param integer $step amount to increment each step by + * @param boolean $long use 24-hour time + * @param integer $start the hour to start at + * @return array A mirrored (foo => foo) array from start-12 or start-23. + */ + public static function hours($step = 1, $long = FALSE, $start = NULL) + { + // Default values + $step = (int) $step; + $long = (bool) $long; + $hours = array(); + + // Set the default start if none was specified. + if ($start === NULL) + { + $start = ($long === FALSE) ? 1 : 0; + } + + $hours = array(); + + // 24-hour time has 24 hours, instead of 12 + $size = ($long === TRUE) ? 23 : 12; + + for ($i = $start; $i <= $size; $i += $step) + { + $hours[$i] = (string) $i; + } + + return $hours; + } + + /** + * Returns AM or PM, based on a given hour (in 24 hour format). + * + * $type = Date::ampm(12); // PM + * $type = Date::ampm(1); // AM + * + * @param integer $hour number of the hour + * @return string + */ + public static function ampm($hour) + { + // Always integer + $hour = (int) $hour; + + return ($hour > 11) ? 'PM' : 'AM'; + } + + /** + * Adjusts a non-24-hour number into a 24-hour number. + * + * $hour = Date::adjust(3, 'pm'); // 15 + * + * @param integer $hour hour to adjust + * @param string $ampm AM or PM + * @return string + */ + public static function adjust($hour, $ampm) + { + $hour = (int) $hour; + $ampm = strtolower($ampm); + + switch ($ampm) + { + case 'am': + if ($hour == 12) + { + $hour = 0; + } + break; + case 'pm': + if ($hour < 12) + { + $hour += 12; + } + break; + } + + return sprintf('%02d', $hour); + } + + /** + * Number of days in a given month and year. Typically used as a shortcut + * for generating a list that can be used in a form. + * + * Date::days(4, 2010); // 1, 2, 3, ..., 28, 29, 30 + * + * @param integer $month number of month + * @param integer $year number of year to check month, defaults to the current year + * @return array A mirrored (foo => foo) array of the days. + */ + public static function days($month, $year = FALSE) + { + static $months; + + if ($year === FALSE) + { + // Use the current year by default + $year = date('Y'); + } + + // Always integers + $month = (int) $month; + $year = (int) $year; + + // We use caching for months, because time functions are used + if (empty($months[$year][$month])) + { + $months[$year][$month] = array(); + + // Use date to find the number of days in the given month + $total = date('t', mktime(1, 0, 0, $month, 1, $year)) + 1; + + for ($i = 1; $i < $total; $i++) + { + $months[$year][$month][$i] = (string) $i; + } + } + + return $months[$year][$month]; + } + + /** + * Number of months in a year. Typically used as a shortcut for generating + * a list that can be used in a form. + * + * By default a mirrored array of $month_number => $month_number is returned + * + * Date::months(); + * // aray(1 => 1, 2 => 2, 3 => 3, ..., 12 => 12) + * + * But you can customise this by passing in either Date::MONTHS_LONG + * + * Date::months(Date::MONTHS_LONG); + * // array(1 => 'January', 2 => 'February', ..., 12 => 'December') + * + * Or Date::MONTHS_SHORT + * + * Date::months(Date::MONTHS_SHORT); + * // array(1 => 'Jan', 2 => 'Feb', ..., 12 => 'Dec') + * + * @uses Date::hours + * @param string $format The format to use for months + * @return array An array of months based on the specified format + */ + public static function months($format = NULL) + { + $months = array(); + + if ($format === Date::MONTHS_LONG OR $format === Date::MONTHS_SHORT) + { + for ($i = 1; $i <= 12; ++$i) + { + $months[$i] = strftime($format, mktime(0, 0, 0, $i, 1)); + } + } + else + { + $months = Date::hours(); + } + + return $months; + } + + /** + * Returns an array of years between a starting and ending year. By default, + * the the current year - 5 and current year + 5 will be used. Typically used + * as a shortcut for generating a list that can be used in a form. + * + * $years = Date::years(2000, 2010); // 2000, 2001, ..., 2009, 2010 + * + * @param integer $start starting year (default is current year - 5) + * @param integer $end ending year (default is current year + 5) + * @return array + */ + public static function years($start = FALSE, $end = FALSE) + { + // Default values + $start = ($start === FALSE) ? (date('Y') - 5) : (int) $start; + $end = ($end === FALSE) ? (date('Y') + 5) : (int) $end; + + $years = array(); + + for ($i = $start; $i <= $end; $i++) + { + $years[$i] = (string) $i; + } + + return $years; + } + + /** + * Returns time difference between two timestamps, in human readable format. + * If the second timestamp is not given, the current time will be used. + * Also consider using [Date::fuzzy_span] when displaying a span. + * + * $span = Date::span(60, 182, 'minutes,seconds'); // array('minutes' => 2, 'seconds' => 2) + * $span = Date::span(60, 182, 'minutes'); // 2 + * + * @param integer $remote timestamp to find the span of + * @param integer $local timestamp to use as the baseline + * @param string $output formatting string + * @return string when only a single output is requested + * @return array associative list of all outputs requested + */ + public static function span($remote, $local = NULL, $output = 'years,months,weeks,days,hours,minutes,seconds') + { + // Normalize output + $output = trim(strtolower( (string) $output)); + + if ( ! $output) + { + // Invalid output + return FALSE; + } + + // Array with the output formats + $output = preg_split('/[^a-z]+/', $output); + + // Convert the list of outputs to an associative array + $output = array_combine($output, array_fill(0, count($output), 0)); + + // Make the output values into keys + extract(array_flip($output), EXTR_SKIP); + + if ($local === NULL) + { + // Calculate the span from the current time + $local = time(); + } + + // Calculate timespan (seconds) + $timespan = abs($remote - $local); + + if (isset($output['years'])) + { + $timespan -= Date::YEAR * ($output['years'] = (int) floor($timespan / Date::YEAR)); + } + + if (isset($output['months'])) + { + $timespan -= Date::MONTH * ($output['months'] = (int) floor($timespan / Date::MONTH)); + } + + if (isset($output['weeks'])) + { + $timespan -= Date::WEEK * ($output['weeks'] = (int) floor($timespan / Date::WEEK)); + } + + if (isset($output['days'])) + { + $timespan -= Date::DAY * ($output['days'] = (int) floor($timespan / Date::DAY)); + } + + if (isset($output['hours'])) + { + $timespan -= Date::HOUR * ($output['hours'] = (int) floor($timespan / Date::HOUR)); + } + + if (isset($output['minutes'])) + { + $timespan -= Date::MINUTE * ($output['minutes'] = (int) floor($timespan / Date::MINUTE)); + } + + // Seconds ago, 1 + if (isset($output['seconds'])) + { + $output['seconds'] = $timespan; + } + + if (count($output) === 1) + { + // Only a single output was requested, return it + return array_pop($output); + } + + // Return array + return $output; + } + + /** + * Returns the difference between a time and now in a "fuzzy" way. + * Displaying a fuzzy time instead of a date is usually faster to read and understand. + * + * $span = Date::fuzzy_span(time() - 10); // "moments ago" + * $span = Date::fuzzy_span(time() + 20); // "in moments" + * + * A second parameter is available to manually set the "local" timestamp, + * however this parameter shouldn't be needed in normal usage and is only + * included for unit tests + * + * @param integer $timestamp "remote" timestamp + * @param integer $local_timestamp "local" timestamp, defaults to time() + * @return string + */ + public static function fuzzy_span($timestamp, $local_timestamp = NULL) + { + $local_timestamp = ($local_timestamp === NULL) ? time() : (int) $local_timestamp; + + // Determine the difference in seconds + $offset = abs($local_timestamp - $timestamp); + + if ($offset <= Date::MINUTE) + { + $span = 'moments'; + } + elseif ($offset < (Date::MINUTE * 20)) + { + $span = 'a few minutes'; + } + elseif ($offset < Date::HOUR) + { + $span = 'less than an hour'; + } + elseif ($offset < (Date::HOUR * 4)) + { + $span = 'a couple of hours'; + } + elseif ($offset < Date::DAY) + { + $span = 'less than a day'; + } + elseif ($offset < (Date::DAY * 2)) + { + $span = 'about a day'; + } + elseif ($offset < (Date::DAY * 4)) + { + $span = 'a couple of days'; + } + elseif ($offset < Date::WEEK) + { + $span = 'less than a week'; + } + elseif ($offset < (Date::WEEK * 2)) + { + $span = 'about a week'; + } + elseif ($offset < Date::MONTH) + { + $span = 'less than a month'; + } + elseif ($offset < (Date::MONTH * 2)) + { + $span = 'about a month'; + } + elseif ($offset < (Date::MONTH * 4)) + { + $span = 'a couple of months'; + } + elseif ($offset < Date::YEAR) + { + $span = 'less than a year'; + } + elseif ($offset < (Date::YEAR * 2)) + { + $span = 'about a year'; + } + elseif ($offset < (Date::YEAR * 4)) + { + $span = 'a couple of years'; + } + elseif ($offset < (Date::YEAR * 8)) + { + $span = 'a few years'; + } + elseif ($offset < (Date::YEAR * 12)) + { + $span = 'about a decade'; + } + elseif ($offset < (Date::YEAR * 24)) + { + $span = 'a couple of decades'; + } + elseif ($offset < (Date::YEAR * 64)) + { + $span = 'several decades'; + } + else + { + $span = 'a long time'; + } + + if ($timestamp <= $local_timestamp) + { + // This is in the past + return $span.' ago'; + } + else + { + // This in the future + return 'in '.$span; + } + } + + /** + * Converts a UNIX timestamp to DOS format. There are very few cases where + * this is needed, but some binary formats use it (eg: zip files.) + * Converting the other direction is done using {@link Date::dos2unix}. + * + * $dos = Date::unix2dos($unix); + * + * @param integer $timestamp UNIX timestamp + * @return integer + */ + public static function unix2dos($timestamp = FALSE) + { + $timestamp = ($timestamp === FALSE) ? getdate() : getdate($timestamp); + + if ($timestamp['year'] < 1980) + { + return (1 << 21 | 1 << 16); + } + + $timestamp['year'] -= 1980; + + // What voodoo is this? I have no idea... Geert can explain it though, + // and that's good enough for me. + return ($timestamp['year'] << 25 | $timestamp['mon'] << 21 | + $timestamp['mday'] << 16 | $timestamp['hours'] << 11 | + $timestamp['minutes'] << 5 | $timestamp['seconds'] >> 1); + } + + /** + * Converts a DOS timestamp to UNIX format.There are very few cases where + * this is needed, but some binary formats use it (eg: zip files.) + * Converting the other direction is done using {@link Date::unix2dos}. + * + * $unix = Date::dos2unix($dos); + * + * @param integer $timestamp DOS timestamp + * @return integer + */ + public static function dos2unix($timestamp = FALSE) + { + $sec = 2 * ($timestamp & 0x1f); + $min = ($timestamp >> 5) & 0x3f; + $hrs = ($timestamp >> 11) & 0x1f; + $day = ($timestamp >> 16) & 0x1f; + $mon = ($timestamp >> 21) & 0x0f; + $year = ($timestamp >> 25) & 0x7f; + + return mktime($hrs, $min, $sec, $mon, $day, $year + 1980); + } + + /** + * Returns a date/time string with the specified timestamp format + * + * $time = Date::formatted_time('5 minutes ago'); + * + * @link http://www.php.net/manual/datetime.construct + * @param string $datetime_str datetime string + * @param string $timestamp_format timestamp format + * @param string $timezone timezone identifier + * @return string + */ + public static function formatted_time($datetime_str = 'now', $timestamp_format = NULL, $timezone = NULL) + { + $timestamp_format = ($timestamp_format == NULL) ? Date::$timestamp_format : $timestamp_format; + $timezone = ($timezone === NULL) ? Date::$timezone : $timezone; + + $tz = new DateTimeZone($timezone ? $timezone : date_default_timezone_get()); + $time = new DateTime($datetime_str, $tz); + + if ($time->getTimeZone()->getName() !== $tz->getName()) + { + $time->setTimeZone($tz); + } + + return $time->format($timestamp_format); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Debug.php b/~dev_rating/system/classes/Kohana/Debug.php new file mode 100644 index 0000000000000000000000000000000000000000..5a82bb6234eaa8caf680433daa289ebbf7962aec --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Debug.php @@ -0,0 +1,465 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Contains debugging and dumping tools. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Debug { + + /** + * Returns an HTML string of debugging information about any number of + * variables, each wrapped in a "pre" tag: + * + * // Displays the type and value of each variable + * echo Debug::vars($foo, $bar, $baz); + * + * @param mixed $var,... variable to debug + * @return string + */ + public static function vars() + { + if (func_num_args() === 0) + return; + + // Get all passed variables + $variables = func_get_args(); + + $output = array(); + foreach ($variables as $var) + { + $output[] = Debug::_dump($var, 1024); + } + + return '<pre class="debug">'.implode("\n", $output).'</pre>'; + } + + /** + * Returns an HTML string of information about a single variable. + * + * Borrows heavily on concepts from the Debug class of [Nette](http://nettephp.com/). + * + * @param mixed $value variable to dump + * @param integer $length maximum length of strings + * @param integer $level_recursion recursion limit + * @return string + */ + public static function dump($value, $length = 128, $level_recursion = 10) + { + return Debug::_dump($value, $length, $level_recursion); + } + + /** + * Helper for Debug::dump(), handles recursion in arrays and objects. + * + * @param mixed $var variable to dump + * @param integer $length maximum length of strings + * @param integer $limit recursion limit + * @param integer $level current recursion level (internal usage only!) + * @return string + */ + protected static function _dump( & $var, $length = 128, $limit = 10, $level = 0) + { + if ($var === NULL) + { + return '<small>NULL</small>'; + } + elseif (is_bool($var)) + { + return '<small>bool</small> '.($var ? 'TRUE' : 'FALSE'); + } + elseif (is_float($var)) + { + return '<small>float</small> '.$var; + } + elseif (is_resource($var)) + { + if (($type = get_resource_type($var)) === 'stream' AND $meta = stream_get_meta_data($var)) + { + $meta = stream_get_meta_data($var); + + if (isset($meta['uri'])) + { + $file = $meta['uri']; + + if (function_exists('stream_is_local')) + { + // Only exists on PHP >= 5.2.4 + if (stream_is_local($file)) + { + $file = Debug::path($file); + } + } + + return '<small>resource</small><span>('.$type.')</span> '.htmlspecialchars($file, ENT_NOQUOTES, Kohana::$charset); + } + } + else + { + return '<small>resource</small><span>('.$type.')</span>'; + } + } + elseif (is_string($var)) + { + // Clean invalid multibyte characters. iconv is only invoked + // if there are non ASCII characters in the string, so this + // isn't too much of a hit. + $var = UTF8::clean($var, Kohana::$charset); + + if (UTF8::strlen($var) > $length) + { + // Encode the truncated string + $str = htmlspecialchars(UTF8::substr($var, 0, $length), ENT_NOQUOTES, Kohana::$charset).' …'; + } + else + { + // Encode the string + $str = htmlspecialchars($var, ENT_NOQUOTES, Kohana::$charset); + } + + return '<small>string</small><span>('.strlen($var).')</span> "'.$str.'"'; + } + elseif (is_array($var)) + { + $output = array(); + + // Indentation for this variable + $space = str_repeat($s = ' ', $level); + + static $marker; + + if ($marker === NULL) + { + // Make a unique marker + $marker = uniqid("\x00"); + } + + if (empty($var)) + { + // Do nothing + } + elseif (isset($var[$marker])) + { + $output[] = "(\n$space$s*RECURSION*\n$space)"; + } + elseif ($level < $limit) + { + $output[] = "<span>("; + + $var[$marker] = TRUE; + foreach ($var as $key => & $val) + { + if ($key === $marker) continue; + if ( ! is_int($key)) + { + $key = '"'.htmlspecialchars($key, ENT_NOQUOTES, Kohana::$charset).'"'; + } + + $output[] = "$space$s$key => ".Debug::_dump($val, $length, $limit, $level + 1); + } + unset($var[$marker]); + + $output[] = "$space)</span>"; + } + else + { + // Depth too great + $output[] = "(\n$space$s...\n$space)"; + } + + return '<small>array</small><span>('.count($var).')</span> '.implode("\n", $output); + } + elseif (is_object($var)) + { + // Copy the object as an array + $array = (array) $var; + + $output = array(); + + // Indentation for this variable + $space = str_repeat($s = ' ', $level); + + $hash = spl_object_hash($var); + + // Objects that are being dumped + static $objects = array(); + + if (empty($var)) + { + // Do nothing + } + elseif (isset($objects[$hash])) + { + $output[] = "{\n$space$s*RECURSION*\n$space}"; + } + elseif ($level < $limit) + { + $output[] = "<code>{"; + + $objects[$hash] = TRUE; + foreach ($array as $key => & $val) + { + if ($key[0] === "\x00") + { + // Determine if the access is protected or protected + $access = '<small>'.(($key[1] === '*') ? 'protected' : 'private').'</small>'; + + // Remove the access level from the variable name + $key = substr($key, strrpos($key, "\x00") + 1); + } + else + { + $access = '<small>public</small>'; + } + + $output[] = "$space$s$access $key => ".Debug::_dump($val, $length, $limit, $level + 1); + } + unset($objects[$hash]); + + $output[] = "$space}</code>"; + } + else + { + // Depth too great + $output[] = "{\n$space$s...\n$space}"; + } + + return '<small>object</small> <span>'.get_class($var).'('.count($array).')</span> '.implode("\n", $output); + } + else + { + return '<small>'.gettype($var).'</small> '.htmlspecialchars(print_r($var, TRUE), ENT_NOQUOTES, Kohana::$charset); + } + } + + /** + * Removes application, system, modpath, or docroot from a filename, + * replacing them with the plain text equivalents. Useful for debugging + * when you want to display a shorter path. + * + * // Displays SYSPATH/classes/kohana.php + * echo Debug::path(Kohana::find_file('classes', 'kohana')); + * + * @param string $file path to debug + * @return string + */ + public static function path($file) + { + if (strpos($file, APPPATH) === 0) + { + $file = 'APPPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(APPPATH)); + } + elseif (strpos($file, SYSPATH) === 0) + { + $file = 'SYSPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(SYSPATH)); + } + elseif (strpos($file, MODPATH) === 0) + { + $file = 'MODPATH'.DIRECTORY_SEPARATOR.substr($file, strlen(MODPATH)); + } + elseif (strpos($file, DOCROOT) === 0) + { + $file = 'DOCROOT'.DIRECTORY_SEPARATOR.substr($file, strlen(DOCROOT)); + } + + return $file; + } + + /** + * Returns an HTML string, highlighting a specific line of a file, with some + * number of lines padded above and below. + * + * // Highlights the current line of the current file + * echo Debug::source(__FILE__, __LINE__); + * + * @param string $file file to open + * @param integer $line_number line number to highlight + * @param integer $padding number of padding lines + * @return string source of file + * @return FALSE file is unreadable + */ + public static function source($file, $line_number, $padding = 5) + { + if ( ! $file OR ! is_readable($file)) + { + // Continuing will cause errors + return FALSE; + } + + // Open the file and set the line position + $file = fopen($file, 'r'); + $line = 0; + + // Set the reading range + $range = array('start' => $line_number - $padding, 'end' => $line_number + $padding); + + // Set the zero-padding amount for line numbers + $format = '% '.strlen($range['end']).'d'; + + $source = ''; + while (($row = fgets($file)) !== FALSE) + { + // Increment the line number + if (++$line > $range['end']) + break; + + if ($line >= $range['start']) + { + // Make the row safe for output + $row = htmlspecialchars($row, ENT_NOQUOTES, Kohana::$charset); + + // Trim whitespace and sanitize the row + $row = '<span class="number">'.sprintf($format, $line).'</span> '.$row; + + if ($line === $line_number) + { + // Apply highlighting to this row + $row = '<span class="line highlight">'.$row.'</span>'; + } + else + { + $row = '<span class="line">'.$row.'</span>'; + } + + // Add to the captured source + $source .= $row; + } + } + + // Close the file + fclose($file); + + return '<pre class="source"><code>'.$source.'</code></pre>'; + } + + /** + * Returns an array of HTML strings that represent each step in the backtrace. + * + * // Displays the entire current backtrace + * echo implode('<br/>', Debug::trace()); + * + * @param array $trace + * @return string + */ + public static function trace(array $trace = NULL) + { + if ($trace === NULL) + { + // Start a new trace + $trace = debug_backtrace(); + } + + // Non-standard function calls + $statements = array('include', 'include_once', 'require', 'require_once'); + + $output = array(); + foreach ($trace as $step) + { + if ( ! isset($step['function'])) + { + // Invalid trace step + continue; + } + + if (isset($step['file']) AND isset($step['line'])) + { + // Include the source of this step + $source = Debug::source($step['file'], $step['line']); + } + + if (isset($step['file'])) + { + $file = $step['file']; + + if (isset($step['line'])) + { + $line = $step['line']; + } + } + + // function() + $function = $step['function']; + + if (in_array($step['function'], $statements)) + { + if (empty($step['args'])) + { + // No arguments + $args = array(); + } + else + { + // Sanitize the file path + $args = array($step['args'][0]); + } + } + elseif (isset($step['args'])) + { + if ( ! function_exists($step['function']) OR strpos($step['function'], '{closure}') !== FALSE) + { + // Introspection on closures or language constructs in a stack trace is impossible + $params = NULL; + } + else + { + if (isset($step['class'])) + { + if (method_exists($step['class'], $step['function'])) + { + $reflection = new ReflectionMethod($step['class'], $step['function']); + } + else + { + $reflection = new ReflectionMethod($step['class'], '__call'); + } + } + else + { + $reflection = new ReflectionFunction($step['function']); + } + + // Get the function parameters + $params = $reflection->getParameters(); + } + + $args = array(); + + foreach ($step['args'] as $i => $arg) + { + if (isset($params[$i])) + { + // Assign the argument by the parameter name + $args[$params[$i]->name] = $arg; + } + else + { + // Assign the argument by number + $args[$i] = $arg; + } + } + } + + if (isset($step['class'])) + { + // Class->method() or Class::method() + $function = $step['class'].$step['type'].$step['function']; + } + + $output[] = array( + 'function' => $function, + 'args' => isset($args) ? $args : NULL, + 'file' => isset($file) ? $file : NULL, + 'line' => isset($line) ? $line : NULL, + 'source' => isset($source) ? $source : NULL, + ); + + unset($function, $args, $file, $line, $source); + } + + return $output; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Encrypt.php b/~dev_rating/system/classes/Kohana/Encrypt.php new file mode 100644 index 0000000000000000000000000000000000000000..6428607691c0ef556d9a41a4bc2d1e3a4c4331a9 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Encrypt.php @@ -0,0 +1,213 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * The Encrypt library provides two-way encryption of text and binary strings + * using the [Mcrypt](http://php.net/mcrypt) extension, which consists of three + * parts: the key, the cipher, and the mode. + * + * The Key + * : A secret passphrase that is used for encoding and decoding + * + * The Cipher + * : A [cipher](http://php.net/mcrypt.ciphers) determines how the encryption + * is mathematically calculated. By default, the "rijndael-128" cipher + * is used. This is commonly known as "AES-128" and is an industry standard. + * + * The Mode + * : The [mode](http://php.net/mcrypt.constants) determines how the encrypted + * data is written in binary form. By default, the "nofb" mode is used, + * which produces short output with high entropy. + * + * @package Kohana + * @category Security + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Encrypt { + + /** + * @var string default instance name + */ + public static $default = 'default'; + + /** + * @var array Encrypt class instances + */ + public static $instances = array(); + + /** + * @var string OS-dependent RAND type to use + */ + protected static $_rand; + + /** + * Returns a singleton instance of Encrypt. An encryption key must be + * provided in your "encrypt" configuration file. + * + * $encrypt = Encrypt::instance(); + * + * @param string $name configuration group name + * @return Encrypt + */ + public static function instance($name = NULL) + { + if ($name === NULL) + { + // Use the default instance name + $name = Encrypt::$default; + } + + if ( ! isset(Encrypt::$instances[$name])) + { + // Load the configuration data + $config = Kohana::$config->load('encrypt')->$name; + + if ( ! isset($config['key'])) + { + // No default encryption key is provided! + throw new Kohana_Exception('No encryption key is defined in the encryption configuration group: :group', + array(':group' => $name)); + } + + if ( ! isset($config['mode'])) + { + // Add the default mode + $config['mode'] = MCRYPT_MODE_NOFB; + } + + if ( ! isset($config['cipher'])) + { + // Add the default cipher + $config['cipher'] = MCRYPT_RIJNDAEL_128; + } + + // Create a new instance + Encrypt::$instances[$name] = new Encrypt($config['key'], $config['mode'], $config['cipher']); + } + + return Encrypt::$instances[$name]; + } + + /** + * Creates a new mcrypt wrapper. + * + * @param string $key encryption key + * @param string $mode mcrypt mode + * @param string $cipher mcrypt cipher + */ + public function __construct($key, $mode, $cipher) + { + // Find the max length of the key, based on cipher and mode + $size = mcrypt_get_key_size($cipher, $mode); + + if (isset($key[$size])) + { + // Shorten the key to the maximum size + $key = substr($key, 0, $size); + } + + // Store the key, mode, and cipher + $this->_key = $key; + $this->_mode = $mode; + $this->_cipher = $cipher; + + // Store the IV size + $this->_iv_size = mcrypt_get_iv_size($this->_cipher, $this->_mode); + } + + /** + * Encrypts a string and returns an encrypted string that can be decoded. + * + * $data = $encrypt->encode($data); + * + * The encrypted binary data is encoded using [base64](http://php.net/base64_encode) + * to convert it to a string. This string can be stored in a database, + * displayed, and passed using most other means without corruption. + * + * @param string $data data to be encrypted + * @return string + */ + public function encode($data) + { + // Set the rand type if it has not already been set + if (Encrypt::$_rand === NULL) + { + if (Kohana::$is_windows) + { + // Windows only supports the system random number generator + Encrypt::$_rand = MCRYPT_RAND; + } + else + { + if (defined('MCRYPT_DEV_URANDOM')) + { + // Use /dev/urandom + Encrypt::$_rand = MCRYPT_DEV_URANDOM; + } + elseif (defined('MCRYPT_DEV_RANDOM')) + { + // Use /dev/random + Encrypt::$_rand = MCRYPT_DEV_RANDOM; + } + else + { + // Use the system random number generator + Encrypt::$_rand = MCRYPT_RAND; + } + } + } + + if (Encrypt::$_rand === MCRYPT_RAND) + { + // The system random number generator must always be seeded each + // time it is used, or it will not produce true random results + mt_srand(); + } + + // Create a random initialization vector of the proper size for the current cipher + $iv = mcrypt_create_iv($this->_iv_size, Encrypt::$_rand); + + // Encrypt the data using the configured options and generated iv + $data = mcrypt_encrypt($this->_cipher, $this->_key, $data, $this->_mode, $iv); + + // Use base64 encoding to convert to a string + return base64_encode($iv.$data); + } + + /** + * Decrypts an encoded string back to its original value. + * + * $data = $encrypt->decode($data); + * + * @param string $data encoded string to be decrypted + * @return FALSE if decryption fails + * @return string + */ + public function decode($data) + { + // Convert the data back to binary + $data = base64_decode($data, TRUE); + + if ( ! $data) + { + // Invalid base64 data + return FALSE; + } + + // Extract the initialization vector from the data + $iv = substr($data, 0, $this->_iv_size); + + if ($this->_iv_size !== strlen($iv)) + { + // The iv is not the expected size + return FALSE; + } + + // Remove the iv from the data + $data = substr($data, $this->_iv_size); + + // Return the decrypted data, trimming the \0 padding bytes from the end of the data + return rtrim(mcrypt_decrypt($this->_cipher, $this->_key, $data, $this->_mode, $iv), "\0"); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Exception.php b/~dev_rating/system/classes/Kohana/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..2ffb42adf0e11dd7c8022bf77b53209157a44ab8 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_Exception extends Kohana_Kohana_Exception {} diff --git a/~dev_rating/system/classes/Kohana/Feed.php b/~dev_rating/system/classes/Kohana/Feed.php new file mode 100644 index 0000000000000000000000000000000000000000..4f3f3971664bb0bf6e53716c06ce0c59db902d8c --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Feed.php @@ -0,0 +1,185 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * RSS and Atom feed helper. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Feed { + + /** + * Parses a remote feed into an array. + * + * @param string $feed remote feed URL + * @param integer $limit item limit to fetch + * @return array + */ + public static function parse($feed, $limit = 0) + { + // Check if SimpleXML is installed + if ( ! function_exists('simplexml_load_file')) + throw new Kohana_Exception('SimpleXML must be installed!'); + + // Make limit an integer + $limit = (int) $limit; + + // Disable error reporting while opening the feed + $error_level = error_reporting(0); + + // Allow loading by filename or raw XML string + if (Valid::url($feed)) + { + // Use native Request client to get remote contents + $response = Request::factory($feed)->execute(); + $feed = $response->body(); + } + elseif (is_file($feed)) + { + // Get file contents + $feed = file_get_contents($feed); + } + + // Load the feed + $feed = simplexml_load_string($feed, 'SimpleXMLElement', LIBXML_NOCDATA); + + // Restore error reporting + error_reporting($error_level); + + // Feed could not be loaded + if ($feed === FALSE) + return array(); + + $namespaces = $feed->getNamespaces(TRUE); + + // Detect the feed type. RSS 1.0/2.0 and Atom 1.0 are supported. + $feed = isset($feed->channel) ? $feed->xpath('//item') : $feed->entry; + + $i = 0; + $items = array(); + + foreach ($feed as $item) + { + if ($limit > 0 AND $i++ === $limit) + break; + $item_fields = (array) $item; + + // get namespaced tags + foreach ($namespaces as $ns) + { + $item_fields += (array) $item->children($ns); + } + $items[] = $item_fields; + } + + return $items; + } + + /** + * Creates a feed from the given parameters. + * + * @param array $info feed information + * @param array $items items to add to the feed + * @param string $encoding define which encoding to use + * @return string + */ + public static function create($info, $items, $encoding = 'UTF-8') + { + $info += array('title' => 'Generated Feed', 'link' => '', 'generator' => 'KohanaPHP'); + + $feed = '<?xml version="1.0" encoding="'.$encoding.'"?><rss version="2.0"><channel></channel></rss>'; + $feed = simplexml_load_string($feed); + + foreach ($info as $name => $value) + { + if ($name === 'image') + { + // Create an image element + $image = $feed->channel->addChild('image'); + + if ( ! isset($value['link'], $value['url'], $value['title'])) + { + throw new Kohana_Exception('Feed images require a link, url, and title'); + } + + if (strpos($value['link'], '://') === FALSE) + { + // Convert URIs to URLs + $value['link'] = URL::site($value['link'], 'http'); + } + + if (strpos($value['url'], '://') === FALSE) + { + // Convert URIs to URLs + $value['url'] = URL::site($value['url'], 'http'); + } + + // Create the image elements + $image->addChild('link', $value['link']); + $image->addChild('url', $value['url']); + $image->addChild('title', $value['title']); + } + else + { + if (($name === 'pubDate' OR $name === 'lastBuildDate') AND (is_int($value) OR ctype_digit($value))) + { + // Convert timestamps to RFC 822 formatted dates + $value = date('r', $value); + } + elseif (($name === 'link' OR $name === 'docs') AND strpos($value, '://') === FALSE) + { + // Convert URIs to URLs + $value = URL::site($value, 'http'); + } + + // Add the info to the channel + $feed->channel->addChild($name, $value); + } + } + + foreach ($items as $item) + { + // Add the item to the channel + $row = $feed->channel->addChild('item'); + + foreach ($item as $name => $value) + { + if ($name === 'pubDate' AND (is_int($value) OR ctype_digit($value))) + { + // Convert timestamps to RFC 822 formatted dates + $value = date('r', $value); + } + elseif (($name === 'link' OR $name === 'guid') AND strpos($value, '://') === FALSE) + { + // Convert URIs to URLs + $value = URL::site($value, 'http'); + } + + // Add the info to the row + $row->addChild($name, $value); + } + } + + if (function_exists('dom_import_simplexml')) + { + // Convert the feed object to a DOM object + $feed = dom_import_simplexml($feed)->ownerDocument; + + // DOM generates more readable XML + $feed->formatOutput = TRUE; + + // Export the document as XML + $feed = $feed->saveXML(); + } + else + { + // Export the document as XML + $feed = $feed->asXML(); + } + + return $feed; + } + +} diff --git a/~dev_rating/system/classes/Kohana/File.php b/~dev_rating/system/classes/Kohana/File.php new file mode 100644 index 0000000000000000000000000000000000000000..65f29a18de7cbd858e28aed6891bbbfca93be3c5 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/File.php @@ -0,0 +1,241 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * File helper class. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_File { + + /** + * Attempt to get the mime type from a file. This method is horribly + * unreliable, due to PHP being horribly unreliable when it comes to + * determining the mime type of a file. + * + * $mime = File::mime($file); + * + * @param string $filename file name or path + * @return string mime type on success + * @return FALSE on failure + */ + public static function mime($filename) + { + // Get the complete path to the file + $filename = realpath($filename); + + // Get the extension from the filename + $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); + + if (preg_match('/^(?:jpe?g|png|[gt]if|bmp|swf)$/', $extension)) + { + // Use getimagesize() to find the mime type on images + $file = getimagesize($filename); + + if (isset($file['mime'])) + return $file['mime']; + } + + if (class_exists('finfo', FALSE)) + { + if ($info = new finfo(defined('FILEINFO_MIME_TYPE') ? FILEINFO_MIME_TYPE : FILEINFO_MIME)) + { + return $info->file($filename); + } + } + + if (ini_get('mime_magic.magicfile') AND function_exists('mime_content_type')) + { + // The mime_content_type function is only useful with a magic file + return mime_content_type($filename); + } + + if ( ! empty($extension)) + { + return File::mime_by_ext($extension); + } + + // Unable to find the mime-type + return FALSE; + } + + /** + * Return the mime type of an extension. + * + * $mime = File::mime_by_ext('png'); // "image/png" + * + * @param string $extension php, pdf, txt, etc + * @return string mime type on success + * @return FALSE on failure + */ + public static function mime_by_ext($extension) + { + // Load all of the mime types + $mimes = Kohana::$config->load('mimes'); + + return isset($mimes[$extension]) ? $mimes[$extension][0] : FALSE; + } + + /** + * Lookup MIME types for a file + * + * @see Kohana_File::mime_by_ext() + * @param string $extension Extension to lookup + * @return array Array of MIMEs associated with the specified extension + */ + public static function mimes_by_ext($extension) + { + // Load all of the mime types + $mimes = Kohana::$config->load('mimes'); + + return isset($mimes[$extension]) ? ( (array) $mimes[$extension]) : array(); + } + + /** + * Lookup file extensions by MIME type + * + * @param string $type File MIME type + * @return array File extensions matching MIME type + */ + public static function exts_by_mime($type) + { + static $types = array(); + + // Fill the static array + if (empty($types)) + { + foreach (Kohana::$config->load('mimes') as $ext => $mimes) + { + foreach ($mimes as $mime) + { + if ($mime == 'application/octet-stream') + { + // octet-stream is a generic binary + continue; + } + + if ( ! isset($types[$mime])) + { + $types[$mime] = array( (string) $ext); + } + elseif ( ! in_array($ext, $types[$mime])) + { + $types[$mime][] = (string) $ext; + } + } + } + } + + return isset($types[$type]) ? $types[$type] : FALSE; + } + + /** + * Lookup a single file extension by MIME type. + * + * @param string $type MIME type to lookup + * @return mixed First file extension matching or false + */ + public static function ext_by_mime($type) + { + return current(File::exts_by_mime($type)); + } + + /** + * Split a file into pieces matching a specific size. Used when you need to + * split large files into smaller pieces for easy transmission. + * + * $count = File::split($file); + * + * @param string $filename file to be split + * @param integer $piece_size size, in MB, for each piece to be + * @return integer The number of pieces that were created + */ + public static function split($filename, $piece_size = 10) + { + // Open the input file + $file = fopen($filename, 'rb'); + + // Change the piece size to bytes + $piece_size = floor($piece_size * 1024 * 1024); + + // Write files in 8k blocks + $block_size = 1024 * 8; + + // Total number of pieces + $pieces = 0; + + while ( ! feof($file)) + { + // Create another piece + $pieces += 1; + + // Create a new file piece + $piece = str_pad($pieces, 3, '0', STR_PAD_LEFT); + $piece = fopen($filename.'.'.$piece, 'wb+'); + + // Number of bytes read + $read = 0; + + do + { + // Transfer the data in blocks + fwrite($piece, fread($file, $block_size)); + + // Another block has been read + $read += $block_size; + } + while ($read < $piece_size); + + // Close the piece + fclose($piece); + } + + // Close the file + fclose($file); + + return $pieces; + } + + /** + * Join a split file into a whole file. Does the reverse of [File::split]. + * + * $count = File::join($file); + * + * @param string $filename split filename, without .000 extension + * @return integer The number of pieces that were joined. + */ + public static function join($filename) + { + // Open the file + $file = fopen($filename, 'wb+'); + + // Read files in 8k blocks + $block_size = 1024 * 8; + + // Total number of pieces + $pieces = 0; + + while (is_file($piece = $filename.'.'.str_pad($pieces + 1, 3, '0', STR_PAD_LEFT))) + { + // Read another piece + $pieces += 1; + + // Open the piece for reading + $piece = fopen($piece, 'rb'); + + while ( ! feof($piece)) + { + // Transfer the data in blocks + fwrite($file, fread($piece, $block_size)); + } + + // Close the piece + fclose($piece); + } + + return $pieces; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Form.php b/~dev_rating/system/classes/Kohana/Form.php new file mode 100644 index 0000000000000000000000000000000000000000..510bd81095abfaa254aa504d935d0080f178a126 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Form.php @@ -0,0 +1,434 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Form helper class. Unless otherwise noted, all generated HTML will be made + * safe using the [HTML::chars] method. This prevents against simple XSS + * attacks that could otherwise be triggered by inserting HTML characters into + * form fields. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Form { + + /** + * Generates an opening HTML form tag. + * + * // Form will submit back to the current page using POST + * echo Form::open(); + * + * // Form will submit to 'search' using GET + * echo Form::open('search', array('method' => 'get')); + * + * // When "file" inputs are present, you must include the "enctype" + * echo Form::open(NULL, array('enctype' => 'multipart/form-data')); + * + * @param mixed $action form action, defaults to the current request URI, or [Request] class to use + * @param array $attributes html attributes + * @return string + * @uses Request::instance + * @uses URL::site + * @uses HTML::attributes + */ + public static function open($action = NULL, array $attributes = NULL) + { + if ($action instanceof Request) + { + // Use the current URI + $action = $action->uri(); + } + + if ( ! $action) + { + // Allow empty form actions (submits back to the current url). + $action = ''; + } + elseif (strpos($action, '://') === FALSE) + { + // Make the URI absolute + $action = URL::site($action); + } + + // Add the form action to the attributes + $attributes['action'] = $action; + + // Only accept the default character set + $attributes['accept-charset'] = Kohana::$charset; + + if ( ! isset($attributes['method'])) + { + // Use POST method + $attributes['method'] = 'post'; + } + + return '<form'.HTML::attributes($attributes).'>'; + } + + /** + * Creates the closing form tag. + * + * echo Form::close(); + * + * @return string + */ + public static function close() + { + return '</form>'; + } + + /** + * Creates a form input. If no type is specified, a "text" type input will + * be returned. + * + * echo Form::input('username', $username); + * + * @param string $name input name + * @param string $value input value + * @param array $attributes html attributes + * @return string + * @uses HTML::attributes + */ + public static function input($name, $value = NULL, array $attributes = NULL) + { + // Set the input name + $attributes['name'] = $name; + + // Set the input value + $attributes['value'] = $value; + + if ( ! isset($attributes['type'])) + { + // Default type is text + $attributes['type'] = 'text'; + } + + return '<input'.HTML::attributes($attributes).' />'; + } + + /** + * Creates a hidden form input. + * + * echo Form::hidden('csrf', $token); + * + * @param string $name input name + * @param string $value input value + * @param array $attributes html attributes + * @return string + * @uses Form::input + */ + public static function hidden($name, $value = NULL, array $attributes = NULL) + { + $attributes['type'] = 'hidden'; + + return Form::input($name, $value, $attributes); + } + + /** + * Creates a password form input. + * + * echo Form::password('password'); + * + * @param string $name input name + * @param string $value input value + * @param array $attributes html attributes + * @return string + * @uses Form::input + */ + public static function password($name, $value = NULL, array $attributes = NULL) + { + $attributes['type'] = 'password'; + + return Form::input($name, $value, $attributes); + } + + /** + * Creates a file upload form input. No input value can be specified. + * + * echo Form::file('image'); + * + * @param string $name input name + * @param array $attributes html attributes + * @return string + * @uses Form::input + */ + public static function file($name, array $attributes = NULL) + { + $attributes['type'] = 'file'; + + return Form::input($name, NULL, $attributes); + } + + /** + * Creates a checkbox form input. + * + * echo Form::checkbox('remember_me', 1, (bool) $remember); + * + * @param string $name input name + * @param string $value input value + * @param boolean $checked checked status + * @param array $attributes html attributes + * @return string + * @uses Form::input + */ + public static function checkbox($name, $value = NULL, $checked = FALSE, array $attributes = NULL) + { + $attributes['type'] = 'checkbox'; + + if ($checked === TRUE) + { + // Make the checkbox active + $attributes[] = 'checked'; + } + + return Form::input($name, $value, $attributes); + } + + /** + * Creates a radio form input. + * + * echo Form::radio('like_cats', 1, $cats); + * echo Form::radio('like_cats', 0, ! $cats); + * + * @param string $name input name + * @param string $value input value + * @param boolean $checked checked status + * @param array $attributes html attributes + * @return string + * @uses Form::input + */ + public static function radio($name, $value = NULL, $checked = FALSE, array $attributes = NULL) + { + $attributes['type'] = 'radio'; + + if ($checked === TRUE) + { + // Make the radio active + $attributes[] = 'checked'; + } + + return Form::input($name, $value, $attributes); + } + + /** + * Creates a textarea form input. + * + * echo Form::textarea('about', $about); + * + * @param string $name textarea name + * @param string $body textarea body + * @param array $attributes html attributes + * @param boolean $double_encode encode existing HTML characters + * @return string + * @uses HTML::attributes + * @uses HTML::chars + */ + public static function textarea($name, $body = '', array $attributes = NULL, $double_encode = TRUE) + { + // Set the input name + $attributes['name'] = $name; + + // Add default rows and cols attributes (required) + $attributes += array('rows' => 10, 'cols' => 50); + + return '<textarea'.HTML::attributes($attributes).'>'.HTML::chars($body, $double_encode).'</textarea>'; + } + + /** + * Creates a select form input. + * + * echo Form::select('country', $countries, $country); + * + * [!!] Support for multiple selected options was added in v3.0.7. + * + * @param string $name input name + * @param array $options available options + * @param mixed $selected selected option string, or an array of selected options + * @param array $attributes html attributes + * @return string + * @uses HTML::attributes + */ + public static function select($name, array $options = NULL, $selected = NULL, array $attributes = NULL) + { + // Set the input name + $attributes['name'] = $name; + + if (is_array($selected)) + { + // This is a multi-select, god save us! + $attributes[] = 'multiple'; + } + + if ( ! is_array($selected)) + { + if ($selected === NULL) + { + // Use an empty array + $selected = array(); + } + else + { + // Convert the selected options to an array + $selected = array( (string) $selected); + } + } + + if (empty($options)) + { + // There are no options + $options = ''; + } + else + { + foreach ($options as $value => $name) + { + if (is_array($name)) + { + // Create a new optgroup + $group = array('label' => $value); + + // Create a new list of options + $_options = array(); + + foreach ($name as $_value => $_name) + { + // Force value to be string + $_value = (string) $_value; + + // Create a new attribute set for this option + $option = array('value' => $_value); + + if (in_array($_value, $selected)) + { + // This option is selected + $option[] = 'selected'; + } + + // Change the option to the HTML string + $_options[] = '<option'.HTML::attributes($option).'>'.HTML::chars($_name, FALSE).'</option>'; + } + + // Compile the options into a string + $_options = "\n".implode("\n", $_options)."\n"; + + $options[$value] = '<optgroup'.HTML::attributes($group).'>'.$_options.'</optgroup>'; + } + else + { + // Force value to be string + $value = (string) $value; + + // Create a new attribute set for this option + $option = array('value' => $value); + + if (in_array($value, $selected)) + { + // This option is selected + $option[] = 'selected'; + } + + // Change the option to the HTML string + $options[$value] = '<option'.HTML::attributes($option).'>'.HTML::chars($name, FALSE).'</option>'; + } + } + + // Compile the options into a single string + $options = "\n".implode("\n", $options)."\n"; + } + + return '<select'.HTML::attributes($attributes).'>'.$options.'</select>'; + } + + /** + * Creates a submit form input. + * + * echo Form::submit(NULL, 'Login'); + * + * @param string $name input name + * @param string $value input value + * @param array $attributes html attributes + * @return string + * @uses Form::input + */ + public static function submit($name, $value, array $attributes = NULL) + { + $attributes['type'] = 'submit'; + + return Form::input($name, $value, $attributes); + } + + /** + * Creates a image form input. + * + * echo Form::image(NULL, NULL, array('src' => 'media/img/login.png')); + * + * @param string $name input name + * @param string $value input value + * @param array $attributes html attributes + * @param boolean $index add index file to URL? + * @return string + * @uses Form::input + */ + public static function image($name, $value, array $attributes = NULL, $index = FALSE) + { + if ( ! empty($attributes['src'])) + { + if (strpos($attributes['src'], '://') === FALSE) + { + // Add the base URL + $attributes['src'] = URL::base($index).$attributes['src']; + } + } + + $attributes['type'] = 'image'; + + return Form::input($name, $value, $attributes); + } + + /** + * Creates a button form input. Note that the body of a button is NOT escaped, + * to allow images and other HTML to be used. + * + * echo Form::button('save', 'Save Profile', array('type' => 'submit')); + * + * @param string $name input name + * @param string $body input value + * @param array $attributes html attributes + * @return string + * @uses HTML::attributes + */ + public static function button($name, $body, array $attributes = NULL) + { + // Set the input name + $attributes['name'] = $name; + + return '<button'.HTML::attributes($attributes).'>'.$body.'</button>'; + } + + /** + * Creates a form label. Label text is not automatically translated. + * + * echo Form::label('username', 'Username'); + * + * @param string $input target input + * @param string $text label text + * @param array $attributes html attributes + * @return string + * @uses HTML::attributes + */ + public static function label($input, $text = NULL, array $attributes = NULL) + { + if ($text === NULL) + { + // Use the input name as the text + $text = ucwords(preg_replace('/[\W_]+/', ' ', $input)); + } + + // Set the label target + $attributes['for'] = $input; + + return '<label'.HTML::attributes($attributes).'>'.$text.'</label>'; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Fragment.php b/~dev_rating/system/classes/Kohana/Fragment.php new file mode 100644 index 0000000000000000000000000000000000000000..e632eccb0cd57c285844c5a7a96d6ad6af112a7e --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Fragment.php @@ -0,0 +1,147 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * View fragment caching. This is primarily used to cache small parts of a view + * that rarely change. For instance, you may want to cache the footer of your + * template because it has very little dynamic content. Or you could cache a + * user profile page and delete the fragment when the user updates. + * + * For obvious reasons, fragment caching should not be applied to any + * content that contains forms. + * + * [!!] Multiple language (I18n) support was added in v3.0.4. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + * @uses Kohana::cache + */ +class Kohana_Fragment { + + /** + * @var integer default number of seconds to cache for + */ + public static $lifetime = 30; + + /** + * @var boolean use multilingual fragment support? + */ + public static $i18n = FALSE; + + /** + * @var array list of buffer => cache key + */ + protected static $_caches = array(); + + /** + * Generate the cache key name for a fragment. + * + * $key = Fragment::_cache_key('footer', TRUE); + * + * @param string $name fragment name + * @param boolean $i18n multilingual fragment support + * @return string + * @uses I18n::lang + * @since 3.0.4 + */ + protected static function _cache_key($name, $i18n = NULL) + { + if ($i18n === NULL) + { + // Use the default setting + $i18n = Fragment::$i18n; + } + + // Language prefix for cache key + $i18n = ($i18n === TRUE) ? I18n::lang() : ''; + + // Note: $i18n and $name need to be delimited to prevent naming collisions + return 'Fragment::cache('.$i18n.'+'.$name.')'; + } + + /** + * Load a fragment from cache and display it. Multiple fragments can + * be nested with different life times. + * + * if ( ! Fragment::load('footer')) { + * // Anything that is echo'ed here will be saved + * Fragment::save(); + * } + * + * @param string $name fragment name + * @param integer $lifetime fragment cache lifetime + * @param boolean $i18n multilingual fragment support + * @return boolean + */ + public static function load($name, $lifetime = NULL, $i18n = NULL) + { + // Set the cache lifetime + $lifetime = ($lifetime === NULL) ? Fragment::$lifetime : (int) $lifetime; + + // Get the cache key name + $cache_key = Fragment::_cache_key($name, $i18n); + + if ($fragment = Kohana::cache($cache_key, NULL, $lifetime)) + { + // Display the cached fragment now + echo $fragment; + + return TRUE; + } + else + { + // Start the output buffer + ob_start(); + + // Store the cache key by the buffer level + Fragment::$_caches[ob_get_level()] = $cache_key; + + return FALSE; + } + } + + /** + * Saves the currently open fragment in the cache. + * + * Fragment::save(); + * + * @return void + */ + public static function save() + { + // Get the buffer level + $level = ob_get_level(); + + if (isset(Fragment::$_caches[$level])) + { + // Get the cache key based on the level + $cache_key = Fragment::$_caches[$level]; + + // Delete the cache key, we don't need it anymore + unset(Fragment::$_caches[$level]); + + // Get the output buffer and display it at the same time + $fragment = ob_get_flush(); + + // Cache the fragment + Kohana::cache($cache_key, $fragment); + } + } + + /** + * Delete a cached fragment. + * + * Fragment::delete($key); + * + * @param string $name fragment name + * @param boolean $i18n multilingual fragment support + * @return void + */ + public static function delete($name, $i18n = NULL) + { + // Invalid the cache + Kohana::cache(Fragment::_cache_key($name, $i18n), NULL, -3600); + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTML.php b/~dev_rating/system/classes/Kohana/HTML.php new file mode 100644 index 0000000000000000000000000000000000000000..a78bc76213e4db1cc7fab8098d193b3f50a68214 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTML.php @@ -0,0 +1,345 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * HTML helper class. Provides generic methods for generating various HTML + * tags and making output HTML safe. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_HTML { + + /** + * @var array preferred order of attributes + */ + public static $attribute_order = array + ( + 'action', + 'method', + 'type', + 'id', + 'name', + 'value', + 'href', + 'src', + 'width', + 'height', + 'cols', + 'rows', + 'size', + 'maxlength', + 'rel', + 'media', + 'accept-charset', + 'accept', + 'tabindex', + 'accesskey', + 'alt', + 'title', + 'class', + 'style', + 'selected', + 'checked', + 'readonly', + 'disabled', + ); + + /** + * @var boolean use strict XHTML mode? + */ + public static $strict = TRUE; + + /** + * @var boolean automatically target external URLs to a new window? + */ + public static $windowed_urls = FALSE; + + /** + * Convert special characters to HTML entities. All untrusted content + * should be passed through this method to prevent XSS injections. + * + * echo HTML::chars($username); + * + * @param string $value string to convert + * @param boolean $double_encode encode existing entities + * @return string + */ + public static function chars($value, $double_encode = TRUE) + { + return htmlspecialchars( (string) $value, ENT_QUOTES, Kohana::$charset, $double_encode); + } + + /** + * Convert all applicable characters to HTML entities. All characters + * that cannot be represented in HTML with the current character set + * will be converted to entities. + * + * echo HTML::entities($username); + * + * @param string $value string to convert + * @param boolean $double_encode encode existing entities + * @return string + */ + public static function entities($value, $double_encode = TRUE) + { + return htmlentities( (string) $value, ENT_QUOTES, Kohana::$charset, $double_encode); + } + + /** + * Create HTML link anchors. Note that the title is not escaped, to allow + * HTML elements within links (images, etc). + * + * echo HTML::anchor('/user/profile', 'My Profile'); + * + * @param string $uri URL or URI string + * @param string $title link text + * @param array $attributes HTML anchor attributes + * @param mixed $protocol protocol to pass to URL::base() + * @param boolean $index include the index page + * @return string + * @uses URL::base + * @uses URL::site + * @uses HTML::attributes + */ + public static function anchor($uri, $title = NULL, array $attributes = NULL, $protocol = NULL, $index = TRUE) + { + if ($title === NULL) + { + // Use the URI as the title + $title = $uri; + } + + if ($uri === '') + { + // Only use the base URL + $uri = URL::base($protocol, $index); + } + else + { + if (strpos($uri, '://') !== FALSE) + { + if (HTML::$windowed_urls === TRUE AND empty($attributes['target'])) + { + // Make the link open in a new window + $attributes['target'] = '_blank'; + } + } + elseif ($uri[0] !== '#') + { + // Make the URI absolute for non-id anchors + $uri = URL::site($uri, $protocol, $index); + } + } + + // Add the sanitized link to the attributes + $attributes['href'] = $uri; + + return '<a'.HTML::attributes($attributes).'>'.$title.'</a>'; + } + + /** + * Creates an HTML anchor to a file. Note that the title is not escaped, + * to allow HTML elements within links (images, etc). + * + * echo HTML::file_anchor('media/doc/user_guide.pdf', 'User Guide'); + * + * @param string $file name of file to link to + * @param string $title link text + * @param array $attributes HTML anchor attributes + * @param mixed $protocol protocol to pass to URL::base() + * @param boolean $index include the index page + * @return string + * @uses URL::base + * @uses HTML::attributes + */ + public static function file_anchor($file, $title = NULL, array $attributes = NULL, $protocol = NULL, $index = FALSE) + { + if ($title === NULL) + { + // Use the file name as the title + $title = basename($file); + } + + // Add the file link to the attributes + $attributes['href'] = URL::site($file, $protocol, $index); + + return '<a'.HTML::attributes($attributes).'>'.$title.'</a>'; + } + + /** + * Creates an email (mailto:) anchor. Note that the title is not escaped, + * to allow HTML elements within links (images, etc). + * + * echo HTML::mailto($address); + * + * @param string $email email address to send to + * @param string $title link text + * @param array $attributes HTML anchor attributes + * @return string + * @uses HTML::attributes + */ + public static function mailto($email, $title = NULL, array $attributes = NULL) + { + if ($title === NULL) + { + // Use the email address as the title + $title = $email; + } + + return '<a href="mailto:'.$email.'"'.HTML::attributes($attributes).'>'.$title.'</a>'; + } + + /** + * Creates a style sheet link element. + * + * echo HTML::style('media/css/screen.css'); + * + * @param string $file file name + * @param array $attributes default attributes + * @param mixed $protocol protocol to pass to URL::base() + * @param boolean $index include the index page + * @return string + * @uses URL::base + * @uses HTML::attributes + */ + public static function style($file, array $attributes = NULL, $protocol = NULL, $index = FALSE) + { + if (strpos($file, '://') === FALSE) + { + // Add the base URL + $file = URL::site($file, $protocol, $index); + } + + // Set the stylesheet link + $attributes['href'] = $file; + + // Set the stylesheet rel + $attributes['rel'] = empty($attributes['rel']) ? 'stylesheet' : $attributes['rel']; + + // Set the stylesheet type + $attributes['type'] = 'text/css'; + + return '<link'.HTML::attributes($attributes).' />'; + } + + /** + * Creates a script link. + * + * echo HTML::script('media/js/jquery.min.js'); + * + * @param string $file file name + * @param array $attributes default attributes + * @param mixed $protocol protocol to pass to URL::base() + * @param boolean $index include the index page + * @return string + * @uses URL::base + * @uses HTML::attributes + */ + public static function script($file, array $attributes = NULL, $protocol = NULL, $index = FALSE) + { + if (strpos($file, '://') === FALSE) + { + // Add the base URL + $file = URL::site($file, $protocol, $index); + } + + // Set the script link + $attributes['src'] = $file; + + // Set the script type + $attributes['type'] = 'text/javascript'; + + return '<script'.HTML::attributes($attributes).'></script>'; + } + + /** + * Creates a image link. + * + * echo HTML::image('media/img/logo.png', array('alt' => 'My Company')); + * + * @param string $file file name + * @param array $attributes default attributes + * @param mixed $protocol protocol to pass to URL::base() + * @param boolean $index include the index page + * @return string + * @uses URL::base + * @uses HTML::attributes + */ + public static function image($file, array $attributes = NULL, $protocol = NULL, $index = FALSE) + { + if (strpos($file, '://') === FALSE) + { + // Add the base URL + $file = URL::site($file, $protocol, $index); + } + + // Add the image link + $attributes['src'] = $file; + + return '<img'.HTML::attributes($attributes).' />'; + } + + /** + * Compiles an array of HTML attributes into an attribute string. + * Attributes will be sorted using HTML::$attribute_order for consistency. + * + * echo '<div'.HTML::attributes($attrs).'>'.$content.'</div>'; + * + * @param array $attributes attribute list + * @return string + */ + public static function attributes(array $attributes = NULL) + { + if (empty($attributes)) + return ''; + + $sorted = array(); + foreach (HTML::$attribute_order as $key) + { + if (isset($attributes[$key])) + { + // Add the attribute to the sorted list + $sorted[$key] = $attributes[$key]; + } + } + + // Combine the sorted attributes + $attributes = $sorted + $attributes; + + $compiled = ''; + foreach ($attributes as $key => $value) + { + if ($value === NULL) + { + // Skip attributes that have NULL values + continue; + } + + if (is_int($key)) + { + // Assume non-associative keys are mirrored attributes + $key = $value; + + if ( ! HTML::$strict) + { + // Just use a key + $value = FALSE; + } + } + + // Add the attribute key + $compiled .= ' '.$key; + + if ($value OR HTML::$strict) + { + // Add the attribute value + $compiled .= '="'.HTML::chars($value).'"'; + } + } + + return $compiled; + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP.php b/~dev_rating/system/classes/Kohana/HTTP.php new file mode 100644 index 0000000000000000000000000000000000000000..eca52c4e6a7c88b586ed989e8a6931de16d7440d --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP.php @@ -0,0 +1,218 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Contains the most low-level helpers methods in Kohana: + * + * - Environment initialization + * - Locating files within the cascading filesystem + * - Auto-loading and transparent extension of classes + * - Variable and path debugging + * + * @package Kohana + * @category HTTP + * @author Kohana Team + * @since 3.1.0 + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_HTTP { + + /** + * @var The default protocol to use if it cannot be detected + */ + public static $protocol = 'HTTP/1.1'; + + /** + * Issues a HTTP redirect. + * + * @param string $uri URI to redirect to + * @param int $code HTTP Status code to use for the redirect + * @throws HTTP_Exception + */ + public static function redirect($uri = '', $code = 302) + { + $e = HTTP_Exception::factory($code); + + if ( ! $e instanceof HTTP_Exception_Redirect) + throw new Kohana_Exception('Invalid redirect code \':code\'', array( + ':code' => $code + )); + + throw $e->location($uri); + } + + /** + * Checks the browser cache to see the response needs to be returned, + * execution will halt and a 304 Not Modified will be sent if the + * browser cache is up to date. + * + * @param Request $request Request + * @param Response $response Response + * @param string $etag Resource ETag + * @throws HTTP_Exception_304 + * @return Response + */ + public static function check_cache(Request $request, Response $response, $etag = NULL) + { + // Generate an etag if necessary + if ($etag == NULL) + { + $etag = $response->generate_etag(); + } + + // Set the ETag header + $response->headers('etag', $etag); + + // Add the Cache-Control header if it is not already set + // This allows etags to be used with max-age, etc + if ($response->headers('cache-control')) + { + $response->headers('cache-control', $response->headers('cache-control').', must-revalidate'); + } + else + { + $response->headers('cache-control', 'must-revalidate'); + } + + // Check if we have a matching etag + if ($request->headers('if-none-match') AND (string) $request->headers('if-none-match') === $etag) + { + // No need to send data again + throw HTTP_Exception::factory(304)->headers('etag', $etag); + } + + return $response; + } + + /** + * Parses a HTTP header string into an associative array + * + * @param string $header_string Header string to parse + * @return HTTP_Header + */ + public static function parse_header_string($header_string) + { + // If the PECL HTTP extension is loaded + if (extension_loaded('http')) + { + // Use the fast method to parse header string + return new HTTP_Header(http_parse_headers($header_string)); + } + + // Otherwise we use the slower PHP parsing + $headers = array(); + + // Match all HTTP headers + if (preg_match_all('/(\w[^\s:]*):[ ]*([^\r\n]*(?:\r\n[ \t][^\r\n]*)*)/', $header_string, $matches)) + { + // Parse each matched header + foreach ($matches[0] as $key => $value) + { + // If the header has not already been set + if ( ! isset($headers[$matches[1][$key]])) + { + // Apply the header directly + $headers[$matches[1][$key]] = $matches[2][$key]; + } + // Otherwise there is an existing entry + else + { + // If the entry is an array + if (is_array($headers[$matches[1][$key]])) + { + // Apply the new entry to the array + $headers[$matches[1][$key]][] = $matches[2][$key]; + } + // Otherwise create a new array with the entries + else + { + $headers[$matches[1][$key]] = array( + $headers[$matches[1][$key]], + $matches[2][$key], + ); + } + } + } + } + + // Return the headers + return new HTTP_Header($headers); + } + + /** + * Parses the the HTTP request headers and returns an array containing + * key value pairs. This method is slow, but provides an accurate + * representation of the HTTP request. + * + * // Get http headers into the request + * $request->headers = HTTP::request_headers(); + * + * @return HTTP_Header + */ + public static function request_headers() + { + // If running on apache server + if (function_exists('apache_request_headers')) + { + // Return the much faster method + return new HTTP_Header(apache_request_headers()); + } + // If the PECL HTTP tools are installed + elseif (extension_loaded('http')) + { + // Return the much faster method + return new HTTP_Header(http_get_request_headers()); + } + + // Setup the output + $headers = array(); + + // Parse the content type + if ( ! empty($_SERVER['CONTENT_TYPE'])) + { + $headers['content-type'] = $_SERVER['CONTENT_TYPE']; + } + + // Parse the content length + if ( ! empty($_SERVER['CONTENT_LENGTH'])) + { + $headers['content-length'] = $_SERVER['CONTENT_LENGTH']; + } + + foreach ($_SERVER as $key => $value) + { + // If there is no HTTP header here, skip + if (strpos($key, 'HTTP_') !== 0) + { + continue; + } + + // This is a dirty hack to ensure HTTP_X_FOO_BAR becomes x-foo-bar + $headers[str_replace(array('HTTP_', '_'), array('', '-'), $key)] = $value; + } + + return new HTTP_Header($headers); + } + + /** + * Processes an array of key value pairs and encodes + * the values to meet RFC 3986 + * + * @param array $params Params + * @return string + */ + public static function www_form_urlencode(array $params = array()) + { + if ( ! $params) + return; + + $encoded = array(); + + foreach ($params as $key => $value) + { + $encoded[] = $key.'='.rawurlencode($value); + } + + return implode('&', $encoded); + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception.php b/~dev_rating/system/classes/Kohana/HTTP/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..65c4f31d9d04cb5cf11e201abc4a41cb99ace853 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception.php @@ -0,0 +1,72 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Kohana_HTTP_Exception extends Kohana_Exception { + + /** + * Creates an HTTP_Exception of the specified type. + * + * @param integer $code the http status code + * @param string $message status message, custom content to display with error + * @param array $variables translation variables + * @return HTTP_Exception + */ + public static function factory($code, $message = NULL, array $variables = NULL, Exception $previous = NULL) + { + $class = 'HTTP_Exception_'.$code; + + return new $class($message, $variables, $previous); + } + + /** + * @var int http status code + */ + protected $_code = 0; + + /** + * @var Request Request instance that triggered this exception. + */ + protected $_request; + + /** + * Creates a new translated exception. + * + * throw new Kohana_Exception('Something went terrible wrong, :user', + * array(':user' => $user)); + * + * @param string $message status message, custom content to display with error + * @param array $variables translation variables + * @return void + */ + public function __construct($message = NULL, array $variables = NULL, Exception $previous = NULL) + { + parent::__construct($message, $variables, $this->_code, $previous); + } + + /** + * Store the Request that triggered this exception. + * + * @param Request $request Request object that triggered this exception. + * @return HTTP_Exception + */ + public function request(Request $request = NULL) + { + if ($request === NULL) + return $this->_request; + + $this->_request = $request; + + return $this; + } + + /** + * Generate a Response for the current Exception + * + * @uses Kohana_Exception::response() + * @return Response + */ + public function get_response() + { + return Kohana_Exception::response($this); + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/300.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/300.php new file mode 100644 index 0000000000000000000000000000000000000000..9eafcf0a93ad3b16fd24c3668e0bab800ad7f17a --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/300.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_300 extends HTTP_Exception_Redirect { + + /** + * @var integer HTTP 300 Multiple Choices + */ + protected $_code = 300; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/301.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/301.php new file mode 100644 index 0000000000000000000000000000000000000000..f176d1c248149a7a2dd174e07bd750e2248087e7 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/301.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_301 extends HTTP_Exception_Redirect { + + /** + * @var integer HTTP 301 Moved Permanently + */ + protected $_code = 301; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/302.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/302.php new file mode 100644 index 0000000000000000000000000000000000000000..d717544e6963cc2fcd7a02efbdea5898ee5b225e --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/302.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_302 extends HTTP_Exception_Redirect { + + /** + * @var integer HTTP 302 Found + */ + protected $_code = 302; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/303.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/303.php new file mode 100644 index 0000000000000000000000000000000000000000..4be7c9ee37a04c48bcc79e80ca2a4ea292606c96 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/303.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_303 extends HTTP_Exception_Redirect { + + /** + * @var integer HTTP 303 See Other + */ + protected $_code = 303; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/304.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/304.php new file mode 100644 index 0000000000000000000000000000000000000000..6d769901aa2c9f42e189f28445a521a6a723573e --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/304.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_304 extends HTTP_Exception_Expected { + + /** + * @var integer HTTP 304 Not Modified + */ + protected $_code = 304; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/305.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/305.php new file mode 100644 index 0000000000000000000000000000000000000000..d010d7c1cd18b2046cab52c6cec56e7237bc40cf --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/305.php @@ -0,0 +1,42 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_305 extends HTTP_Exception_Expected { + + /** + * @var integer HTTP 305 Use Proxy + */ + protected $_code = 305; + + /** + * Specifies the proxy to replay this request via + * + * @param string $location URI of the proxy + */ + public function location($uri = NULL) + { + if ($uri === NULL) + return $this->headers('Location'); + + $this->headers('Location', $uri); + + return $this; + } + + /** + * Validate this exception contains everything needed to continue. + * + * @throws Kohana_Exception + * @return bool + */ + public function check() + { + if ($location = $this->headers('location') === NULL) + throw new Kohana_Exception('A \'location\' must be specified for a redirect'); + + if (strpos($location, '://') === FALSE) + throw new Kohana_Exception('An absolute URI to the proxy server must be specified'); + + return TRUE; + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/307.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/307.php new file mode 100644 index 0000000000000000000000000000000000000000..07afb7a0809f21c4c2d98b67aa780a694d6d64ba --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/307.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_307 extends HTTP_Exception_Redirect { + + /** + * @var integer HTTP 307 Temporary Redirect + */ + protected $_code = 307; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/400.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/400.php new file mode 100644 index 0000000000000000000000000000000000000000..fbbf0254c7649d0b41078664553da24839345bec --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/400.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_400 extends HTTP_Exception { + + /** + * @var integer HTTP 400 Bad Request + */ + protected $_code = 400; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/401.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/401.php new file mode 100644 index 0000000000000000000000000000000000000000..70bcaf18d76b00b8893f9086e4f7f223d70f4478 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/401.php @@ -0,0 +1,39 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_401 extends HTTP_Exception_Expected { + + /** + * @var integer HTTP 401 Unauthorized + */ + protected $_code = 401; + + /** + * Specifies the WWW-Authenticate challenge. + * + * @param string $challenge WWW-Authenticate challenge (eg `Basic realm="Control Panel"`) + */ + public function authenticate($challenge = NULL) + { + if ($challenge === NULL) + return $this->headers('www-authenticate'); + + $this->headers('www-authenticate', $challenge); + + return $this; + } + + /** + * Validate this exception contains everything needed to continue. + * + * @throws Kohana_Exception + * @return bool + */ + public function check() + { + if ($this->headers('www-authenticate') === NULL) + throw new Kohana_Exception('A \'www-authenticate\' header must be specified for a HTTP 401 Unauthorized'); + + return TRUE; + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/402.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/402.php new file mode 100644 index 0000000000000000000000000000000000000000..f7837fe930214726d97fe0f7ea87605ccbce8a1d --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/402.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_402 extends HTTP_Exception { + + /** + * @var integer HTTP 402 Payment Required + */ + protected $_code = 402; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/403.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/403.php new file mode 100644 index 0000000000000000000000000000000000000000..e84527f1ddaef47ec19212c93b9723bcb1dd098f --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/403.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_403 extends HTTP_Exception { + + /** + * @var integer HTTP 403 Forbidden + */ + protected $_code = 403; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/404.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/404.php new file mode 100644 index 0000000000000000000000000000000000000000..9b8b85099d2d68cbd5c60fe48be8caf5e66f7750 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/404.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_404 extends HTTP_Exception { + + /** + * @var integer HTTP 404 Not Found + */ + protected $_code = 404; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/405.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/405.php new file mode 100644 index 0000000000000000000000000000000000000000..edce60763555cf8e88ef27ebb7740588309ae3c4 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/405.php @@ -0,0 +1,41 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_405 extends HTTP_Exception_Expected { + + /** + * @var integer HTTP 405 Method Not Allowed + */ + protected $_code = 405; + + /** + * Specifies the list of allowed HTTP methods + * + * @param array $methods List of allowed methods + */ + public function allowed($methods) + { + if (is_array($methods)) + { + $methods = implode(',', $methods); + } + + $this->headers('allow', $methods); + + return $this; + } + + /** + * Validate this exception contains everything needed to continue. + * + * @throws Kohana_Exception + * @return bool + */ + public function check() + { + if ($location = $this->headers('allow') === NULL) + throw new Kohana_Exception('A list of allowed methods must be specified'); + + return TRUE; + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/406.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/406.php new file mode 100644 index 0000000000000000000000000000000000000000..8d25e9920b1c531d6b0eb74e0757a83a7b27a8ed --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/406.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_406 extends HTTP_Exception { + + /** + * @var integer HTTP 406 Not Acceptable + */ + protected $_code = 406; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/407.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/407.php new file mode 100644 index 0000000000000000000000000000000000000000..a46ca1a7c16bcc5def1a46023d57002cd9ec1231 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/407.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_407 extends HTTP_Exception { + + /** + * @var integer HTTP 407 Proxy Authentication Required + */ + protected $_code = 407; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/408.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/408.php new file mode 100644 index 0000000000000000000000000000000000000000..e7be11b6a74e0b81be535ef3970800f380331866 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/408.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_408 extends HTTP_Exception { + + /** + * @var integer HTTP 408 Request Timeout + */ + protected $_code = 408; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/409.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/409.php new file mode 100644 index 0000000000000000000000000000000000000000..761cba63829d88648712e1d8734d8cf63e3c5793 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/409.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_409 extends HTTP_Exception { + + /** + * @var integer HTTP 409 Conflict + */ + protected $_code = 409; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/410.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/410.php new file mode 100644 index 0000000000000000000000000000000000000000..4d47ee05839e4c5952a298030d54c39f30ed0a66 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/410.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_410 extends HTTP_Exception { + + /** + * @var integer HTTP 410 Gone + */ + protected $_code = 410; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/411.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/411.php new file mode 100644 index 0000000000000000000000000000000000000000..c459ca88c2dc1330af4cf861b9d912ffc7e9ef65 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/411.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_411 extends HTTP_Exception { + + /** + * @var integer HTTP 411 Length Required + */ + protected $_code = 411; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/412.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/412.php new file mode 100644 index 0000000000000000000000000000000000000000..a49db4eed6977f9d010806ca03891b723336f351 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/412.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_412 extends HTTP_Exception { + + /** + * @var integer HTTP 412 Precondition Failed + */ + protected $_code = 412; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/413.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/413.php new file mode 100644 index 0000000000000000000000000000000000000000..ea01cdecade5cda230a62606e6ddb1839e6f2700 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/413.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_413 extends HTTP_Exception { + + /** + * @var integer HTTP 413 Request Entity Too Large + */ + protected $_code = 413; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/414.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/414.php new file mode 100644 index 0000000000000000000000000000000000000000..83c71cb7bfb477bacd351fe068892c486b683f39 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/414.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_414 extends HTTP_Exception { + + /** + * @var integer HTTP 414 Request-URI Too Long + */ + protected $_code = 414; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/415.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/415.php new file mode 100644 index 0000000000000000000000000000000000000000..a771a65270640cc8b0ff2a92bb0f24144345ae3c --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/415.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_415 extends HTTP_Exception { + + /** + * @var integer HTTP 415 Unsupported Media Type + */ + protected $_code = 415; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/416.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/416.php new file mode 100644 index 0000000000000000000000000000000000000000..9d2d44fc58d526fe2e895b28020dbf06e36fc46d --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/416.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_416 extends HTTP_Exception { + + /** + * @var integer HTTP 416 Request Range Not Satisfiable + */ + protected $_code = 416; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/417.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/417.php new file mode 100644 index 0000000000000000000000000000000000000000..6f702e1f89a1f8700a9232aefda869674d9a3a2a --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/417.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_417 extends HTTP_Exception { + + /** + * @var integer HTTP 417 Expectation Failed + */ + protected $_code = 417; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/500.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/500.php new file mode 100644 index 0000000000000000000000000000000000000000..97c825d1173b68147c5ff0bc04526c37da803cb2 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/500.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_500 extends HTTP_Exception { + + /** + * @var integer HTTP 500 Internal Server Error + */ + protected $_code = 500; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/501.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/501.php new file mode 100644 index 0000000000000000000000000000000000000000..93c92bf6b0b066375e8484eeb0aa37eeaebf37dd --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/501.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_501 extends HTTP_Exception { + + /** + * @var integer HTTP 501 Not Implemented + */ + protected $_code = 501; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/502.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/502.php new file mode 100644 index 0000000000000000000000000000000000000000..6e880efc9ef69a9c5179a6ab05617e661907852a --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/502.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_502 extends HTTP_Exception { + + /** + * @var integer HTTP 502 Bad Gateway + */ + protected $_code = 502; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/503.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/503.php new file mode 100644 index 0000000000000000000000000000000000000000..4b0c359d425c8e3741bf7111bb7d483f6763f33e --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/503.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_503 extends HTTP_Exception { + + /** + * @var integer HTTP 503 Service Unavailable + */ + protected $_code = 503; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/504.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/504.php new file mode 100644 index 0000000000000000000000000000000000000000..b71d227ab7ded0b9c70491928d197d242ffb395e --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/504.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_504 extends HTTP_Exception { + + /** + * @var integer HTTP 504 Gateway Timeout + */ + protected $_code = 504; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/505.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/505.php new file mode 100644 index 0000000000000000000000000000000000000000..2b33dbc42fc9ec286c5656b38f3e3f2d28550d6d --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/505.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Kohana_HTTP_Exception_505 extends HTTP_Exception { + + /** + * @var integer HTTP 505 HTTP Version Not Supported + */ + protected $_code = 505; + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/Expected.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/Expected.php new file mode 100644 index 0000000000000000000000000000000000000000..4d08def2fa74bd6c03f2f439ae8ef3049f37df55 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/Expected.php @@ -0,0 +1,82 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * "Expected" HTTP exception class. Used for all [HTTP_Exception]'s where a standard + * Kohana error page should never be shown. + * + * Eg [HTTP_Exception_301], [HTTP_Exception_302] etc + * + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_HTTP_Exception_Expected extends HTTP_Exception { + + /** + * @var Response Response Object + */ + protected $_response; + + /** + * Creates a new translated exception. + * + * throw new Kohana_Exception('Something went terrible wrong, :user', + * array(':user' => $user)); + * + * @param string $message status message, custom content to display with error + * @param array $variables translation variables + * @return void + */ + public function __construct($message = NULL, array $variables = NULL, Exception $previous = NULL) + { + parent::__construct($message, $variables, $previous); + + // Prepare our response object and set the correct status code. + $this->_response = Response::factory() + ->status($this->_code); + } + + /** + * Gets and sets headers to the [Response]. + * + * @see [Response::headers] + * @param mixed $key + * @param string $value + * @return mixed + */ + public function headers($key = NULL, $value = NULL) + { + $result = $this->_response->headers($key, $value); + + if ( ! $result instanceof Response) + return $result; + + return $this; + } + + /** + * Validate this exception contains everything needed to continue. + * + * @throws Kohana_Exception + * @return bool + */ + public function check() + { + return TRUE; + } + + /** + * Generate a Response for the current Exception + * + * @uses Kohana_Exception::response() + * @return Response + */ + public function get_response() + { + $this->check(); + + return $this->_response; + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Exception/Redirect.php b/~dev_rating/system/classes/Kohana/HTTP/Exception/Redirect.php new file mode 100644 index 0000000000000000000000000000000000000000..c3e6c08b86da0d923aeb97ebef2db50c17cb792d --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Exception/Redirect.php @@ -0,0 +1,51 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Redirect HTTP exception class. Used for all [HTTP_Exception]'s where the status + * code indicates a redirect. + * + * Eg [HTTP_Exception_301], [HTTP_Exception_302] and most of the other 30x's + * + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_HTTP_Exception_Redirect extends HTTP_Exception_Expected { + + /** + * Specifies the URI to redirect to. + * + * @param string $location URI of the proxy + */ + public function location($uri = NULL) + { + if ($uri === NULL) + return $this->headers('Location'); + + if (strpos($uri, '://') === FALSE) + { + // Make the URI into a URL + $uri = URL::site($uri, TRUE, ! empty(Kohana::$index_file)); + } + + $this->headers('Location', $uri); + + return $this; + } + + /** + * Validate this exception contains everything needed to continue. + * + * @throws Kohana_Exception + * @return bool + */ + public function check() + { + if ($this->headers('location') === NULL) + throw new Kohana_Exception('A \'location\' must be specified for a redirect'); + + return TRUE; + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Header.php b/~dev_rating/system/classes/Kohana/HTTP/Header.php new file mode 100644 index 0000000000000000000000000000000000000000..0debabf6c068025f832311d75ddd6d00c2e9b81e --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Header.php @@ -0,0 +1,943 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * The Kohana_HTTP_Header class provides an Object-Orientated interface + * to HTTP headers. This can parse header arrays returned from the + * PHP functions `apache_request_headers()` or the `http_parse_headers()` + * function available within the PECL HTTP library. + * + * @package Kohana + * @category HTTP + * @author Kohana Team + * @since 3.1.0 + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_HTTP_Header extends ArrayObject { + + // Default Accept-* quality value if none supplied + const DEFAULT_QUALITY = 1; + + /** + * Parses an Accept(-*) header and detects the quality + * + * @param array $parts accept header parts + * @return array + * @since 3.2.0 + */ + public static function accept_quality(array $parts) + { + $parsed = array(); + + // Resource light iteration + $parts_keys = array_keys($parts); + foreach ($parts_keys as $key) + { + $value = trim(str_replace(array("\r", "\n"), '', $parts[$key])); + + $pattern = '~\b(\;\s*+)?q\s*+=\s*+([.0-9]+)~'; + + // If there is no quality directive, return default + if ( ! preg_match($pattern, $value, $quality)) + { + $parsed[$value] = (float) HTTP_Header::DEFAULT_QUALITY; + } + else + { + $quality = $quality[2]; + + if ($quality[0] === '.') + { + $quality = '0'.$quality; + } + + // Remove the quality value from the string and apply quality + $parsed[trim(preg_replace($pattern, '', $value, 1), '; ')] = (float) $quality; + } + } + + return $parsed; + } + + /** + * Parses the accept header to provide the correct quality values + * for each supplied accept type. + * + * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 + * @param string $accepts accept content header string to parse + * @return array + * @since 3.2.0 + */ + public static function parse_accept_header($accepts = NULL) + { + $accepts = explode(',', (string) $accepts); + + // If there is no accept, lets accept everything + if ($accepts === NULL) + return array('*' => array('*' => (float) HTTP_Header::DEFAULT_QUALITY)); + + // Parse the accept header qualities + $accepts = HTTP_Header::accept_quality($accepts); + + $parsed_accept = array(); + + // This method of iteration uses less resource + $keys = array_keys($accepts); + foreach ($keys as $key) + { + // Extract the parts + $parts = explode('/', $key, 2); + + // Invalid content type- bail + if ( ! isset($parts[1])) + continue; + + // Set the parsed output + $parsed_accept[$parts[0]][$parts[1]] = $accepts[$key]; + } + + return $parsed_accept; + } + + /** + * Parses the `Accept-Charset:` HTTP header and returns an array containing + * the charset and associated quality. + * + * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.2 + * @param string $charset charset string to parse + * @return array + * @since 3.2.0 + */ + public static function parse_charset_header($charset = NULL) + { + if ($charset === NULL) + { + return array('*' => (float) HTTP_Header::DEFAULT_QUALITY); + } + + return HTTP_Header::accept_quality(explode(',', (string) $charset)); + } + + /** + * Parses the `Accept-Encoding:` HTTP header and returns an array containing + * the charsets and associated quality. + * + * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3 + * @param string $encoding charset string to parse + * @return array + * @since 3.2.0 + */ + public static function parse_encoding_header($encoding = NULL) + { + // Accept everything + if ($encoding === NULL) + { + return array('*' => (float) HTTP_Header::DEFAULT_QUALITY); + } + elseif ($encoding === '') + { + return array('identity' => (float) HTTP_Header::DEFAULT_QUALITY); + } + else + { + return HTTP_Header::accept_quality(explode(',', (string) $encoding)); + } + } + + /** + * Parses the `Accept-Language:` HTTP header and returns an array containing + * the languages and associated quality. + * + * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 + * @param string $language charset string to parse + * @return array + * @since 3.2.0 + */ + public static function parse_language_header($language = NULL) + { + if ($language === NULL) + { + return array('*' => array('*' => (float) HTTP_Header::DEFAULT_QUALITY)); + } + + $language = HTTP_Header::accept_quality(explode(',', (string) $language)); + + $parsed_language = array(); + + $keys = array_keys($language); + foreach ($keys as $key) + { + // Extract the parts + $parts = explode('-', $key, 2); + + // Invalid content type- bail + if ( ! isset($parts[1])) + { + $parsed_language[$parts[0]]['*'] = $language[$key]; + } + else + { + // Set the parsed output + $parsed_language[$parts[0]][$parts[1]] = $language[$key]; + } + } + + return $parsed_language; + } + + /** + * Generates a Cache-Control HTTP header based on the supplied array. + * + * // Set the cache control headers you want to use + * $cache_control = array( + * 'max-age' => 3600, + * 'must-revalidate', + * 'public' + * ); + * + * // Create the cache control header, creates : + * // cache-control: max-age=3600, must-revalidate, public + * $response->headers('Cache-Control', HTTP_Header::create_cache_control($cache_control); + * + * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13 + * @param array $cache_control Cache-Control to render to string + * @return string + */ + public static function create_cache_control(array $cache_control) + { + $parts = array(); + + foreach ($cache_control as $key => $value) + { + $parts[] = (is_int($key)) ? $value : ($key.'='.$value); + } + + return implode(', ', $parts); + } + + /** + * Parses the Cache-Control header and returning an array representation of the Cache-Control + * header. + * + * // Create the cache control header + * $response->headers('cache-control', 'max-age=3600, must-revalidate, public'); + * + * // Parse the cache control header + * if ($cache_control = HTTP_Header::parse_cache_control($response->headers('cache-control'))) + * { + * // Cache-Control header was found + * $maxage = $cache_control['max-age']; + * } + * + * @param array $cache_control Array of headers + * @return mixed + */ + public static function parse_cache_control($cache_control) + { + $directives = explode(',', strtolower($cache_control)); + + if ($directives === FALSE) + return FALSE; + + $output = array(); + + foreach ($directives as $directive) + { + if (strpos($directive, '=') !== FALSE) + { + list($key, $value) = explode('=', trim($directive), 2); + + $output[$key] = ctype_digit($value) ? (int) $value : $value; + } + else + { + $output[] = trim($directive); + } + } + + return $output; + } + + /** + * @var array Accept: (content) types + */ + protected $_accept_content; + + /** + * @var array Accept-Charset: parsed header + */ + protected $_accept_charset; + + /** + * @var array Accept-Encoding: parsed header + */ + protected $_accept_encoding; + + /** + * @var array Accept-Language: parsed header + */ + protected $_accept_language; + + /** + * Constructor method for [Kohana_HTTP_Header]. Uses the standard constructor + * of the parent `ArrayObject` class. + * + * $header_object = new HTTP_Header(array('x-powered-by' => 'Kohana 3.1.x', 'expires' => '...')); + * + * @param mixed $input Input array + * @param int $flags Flags + * @param string $iterator_class The iterator class to use + */ + public function __construct(array $input = array(), $flags = 0, $iterator_class = 'ArrayIterator') + { + /** + * @link http://www.w3.org/Protocols/rfc2616/rfc2616.html + * + * HTTP header declarations should be treated as case-insensitive + */ + $input = array_change_key_case( (array) $input, CASE_LOWER); + + parent::__construct($input, $flags, $iterator_class); + } + + /** + * Returns the header object as a string, including + * the terminating new line + * + * // Return the header as a string + * echo (string) $request->headers(); + * + * @return string + */ + public function __toString() + { + $header = ''; + + foreach ($this as $key => $value) + { + // Put the keys back the Case-Convention expected + $key = Text::ucfirst($key); + + if (is_array($value)) + { + $header .= $key.': '.(implode(', ', $value))."\r\n"; + } + else + { + $header .= $key.': '.$value."\r\n"; + } + } + + return $header."\r\n"; + } + + /** + * Overloads `ArrayObject::offsetSet()` to enable handling of header + * with multiple instances of the same directive. If the `$replace` flag + * is `FALSE`, the header will be appended rather than replacing the + * original setting. + * + * @param mixed $index index to set `$newval` to + * @param mixed $newval new value to set + * @param boolean $replace replace existing value + * @return void + * @since 3.2.0 + */ + public function offsetSet($index, $newval, $replace = TRUE) + { + // Ensure the index is lowercase + $index = strtolower($index); + + if ($replace OR ! $this->offsetExists($index)) + { + return parent::offsetSet($index, $newval); + } + + $current_value = $this->offsetGet($index); + + if (is_array($current_value)) + { + $current_value[] = $newval; + } + else + { + $current_value = array($current_value, $newval); + } + + return parent::offsetSet($index, $current_value); + } + + /** + * Overloads the `ArrayObject::offsetExists()` method to ensure keys + * are lowercase. + * + * @param string $index + * @return boolean + * @since 3.2.0 + */ + public function offsetExists($index) + { + return parent::offsetExists(strtolower($index)); + } + + /** + * Overloads the `ArrayObject::offsetUnset()` method to ensure keys + * are lowercase. + * + * @param string $index + * @return void + * @since 3.2.0 + */ + public function offsetUnset($index) + { + return parent::offsetUnset(strtolower($index)); + } + + /** + * Overload the `ArrayObject::offsetGet()` method to ensure that all + * keys passed to it are formatted correctly for this object. + * + * @param string $index index to retrieve + * @return mixed + * @since 3.2.0 + */ + public function offsetGet($index) + { + return parent::offsetGet(strtolower($index)); + } + + /** + * Overloads the `ArrayObject::exchangeArray()` method to ensure that + * all keys are changed to lowercase. + * + * @param mixed $input + * @return array + * @since 3.2.0 + */ + public function exchangeArray($input) + { + /** + * @link http://www.w3.org/Protocols/rfc2616/rfc2616.html + * + * HTTP header declarations should be treated as case-insensitive + */ + $input = array_change_key_case( (array) $input, CASE_LOWER); + + return parent::exchangeArray($input); + } + + /** + * Parses a HTTP Message header line and applies it to this HTTP_Header + * + * $header = $response->headers(); + * $header->parse_header_string(NULL, 'content-type: application/json'); + * + * @param resource $resource the resource (required by Curl API) + * @param string $header_line the line from the header to parse + * @return int + * @since 3.2.0 + */ + public function parse_header_string($resource, $header_line) + { + $headers = array(); + + if (preg_match_all('/(\w[^\s:]*):[ ]*([^\r\n]*(?:\r\n[ \t][^\r\n]*)*)/', $header_line, $matches)) + { + foreach ($matches[0] as $key => $value) + { + $this->offsetSet($matches[1][$key], $matches[2][$key], FALSE); + } + } + + return strlen($header_line); + } + + /** + * Returns the accept quality of a submitted mime type based on the + * request `Accept:` header. If the `$explicit` argument is `TRUE`, + * only precise matches will be returned, excluding all wildcard (`*`) + * directives. + * + * // Accept: application/xml; application/json; q=.5; text/html; q=.2, text/* + * // Accept quality for application/json + * + * // $quality = 0.5 + * $quality = $request->headers()->accepts_at_quality('application/json'); + * + * // $quality_explicit = FALSE + * $quality_explicit = $request->headers()->accepts_at_quality('text/plain', TRUE); + * + * @param string $type + * @param boolean $explicit explicit check, excludes `*` + * @return mixed + * @since 3.2.0 + */ + public function accepts_at_quality($type, $explicit = FALSE) + { + // Parse Accept header if required + if ($this->_accept_content === NULL) + { + if ($this->offsetExists('Accept')) + { + $accept = $this->offsetGet('Accept'); + } + else + { + $accept = '*/*'; + } + + $this->_accept_content = HTTP_Header::parse_accept_header($accept); + } + + // If not a real mime, try and find it in config + if (strpos($type, '/') === FALSE) + { + $mime = Kohana::$config->load('mimes.'.$type); + + if ($mime === NULL) + return FALSE; + + $quality = FALSE; + + foreach ($mime as $_type) + { + $quality_check = $this->accepts_at_quality($_type, $explicit); + $quality = ($quality_check > $quality) ? $quality_check : $quality; + } + + return $quality; + } + + $parts = explode('/', $type, 2); + + if (isset($this->_accept_content[$parts[0]][$parts[1]])) + { + return $this->_accept_content[$parts[0]][$parts[1]]; + } + elseif ($explicit === TRUE) + { + return FALSE; + } + else + { + if (isset($this->_accept_content[$parts[0]]['*'])) + { + return $this->_accept_content[$parts[0]]['*']; + } + elseif (isset($this->_accept_content['*']['*'])) + { + return $this->_accept_content['*']['*']; + } + else + { + return FALSE; + } + } + } + + /** + * Returns the preferred response content type based on the accept header + * quality settings. If items have the same quality value, the first item + * found in the array supplied as `$types` will be returned. + * + * // Get the preferred acceptable content type + * // Accept: text/html, application/json; q=.8, text/* + * $result = $header->preferred_accept(array( + * 'text/html' + * 'text/rtf', + * 'application/json' + * )); // $result = 'application/json' + * + * $result = $header->preferred_accept(array( + * 'text/rtf', + * 'application/xml' + * ), TRUE); // $result = FALSE (none matched explicitly) + * + * + * @param array $types the content types to examine + * @param boolean $explicit only allow explicit references, no wildcards + * @return string name of the preferred content type + * @since 3.2.0 + */ + public function preferred_accept(array $types, $explicit = FALSE) + { + $preferred = FALSE; + $ceiling = 0; + + foreach ($types as $type) + { + $quality = $this->accepts_at_quality($type, $explicit); + + if ($quality > $ceiling) + { + $preferred = $type; + $ceiling = $quality; + } + } + + return $preferred; + } + + /** + * Returns the quality of the supplied `$charset` argument. This method + * will automatically parse the `Accept-Charset` header if present and + * return the associated resolved quality value. + * + * // Accept-Charset: utf-8, utf-16; q=.8, iso-8859-1; q=.5 + * $quality = $header->accepts_charset_at_quality('utf-8'); + * // $quality = (float) 1 + * + * @param string $charset charset to examine + * @return float the quality of the charset + * @since 3.2.0 + */ + public function accepts_charset_at_quality($charset) + { + if ($this->_accept_charset === NULL) + { + if ($this->offsetExists('Accept-Charset')) + { + $charset_header = strtolower($this->offsetGet('Accept-Charset')); + $this->_accept_charset = HTTP_Header::parse_charset_header($charset_header); + } + else + { + $this->_accept_charset = HTTP_Header::parse_charset_header(NULL); + } + } + + $charset = strtolower($charset); + + if (isset($this->_accept_charset[$charset])) + { + return $this->_accept_charset[$charset]; + } + elseif (isset($this->_accept_charset['*'])) + { + return $this->_accept_charset['*']; + } + elseif ($charset === 'iso-8859-1') + { + return (float) 1; + } + + return (float) 0; + } + + /** + * Returns the preferred charset from the supplied array `$charsets` based + * on the `Accept-Charset` header directive. + * + * // Accept-Charset: utf-8, utf-16; q=.8, iso-8859-1; q=.5 + * $charset = $header->preferred_charset(array( + * 'utf-10', 'ascii', 'utf-16', 'utf-8' + * )); // $charset = 'utf-8' + * + * @param array $charsets charsets to test + * @return mixed preferred charset or `FALSE` + * @since 3.2.0 + */ + public function preferred_charset(array $charsets) + { + $preferred = FALSE; + $ceiling = 0; + + foreach ($charsets as $charset) + { + $quality = $this->accepts_charset_at_quality($charset); + + if ($quality > $ceiling) + { + $preferred = $charset; + $ceiling = $quality; + } + } + + return $preferred; + } + + /** + * Returns the quality of the `$encoding` type passed to it. Encoding + * is usually compression such as `gzip`, but could be some other + * message encoding algorithm. This method allows explicit checks to be + * done ignoring wildcards. + * + * // Accept-Encoding: compress, gzip, *; q=.5 + * $encoding = $header->accepts_encoding_at_quality('gzip'); + * // $encoding = (float) 1.0s + * + * @param string $encoding encoding type to interrogate + * @param boolean $explicit explicit check, ignoring wildcards and `identity` + * @return float + * @since 3.2.0 + */ + public function accepts_encoding_at_quality($encoding, $explicit = FALSE) + { + if ($this->_accept_encoding === NULL) + { + if ($this->offsetExists('Accept-Encoding')) + { + $encoding_header = $this->offsetGet('Accept-Encoding'); + } + else + { + $encoding_header = NULL; + } + + $this->_accept_encoding = HTTP_Header::parse_encoding_header($encoding_header); + } + + // Normalize the encoding + $encoding = strtolower($encoding); + + if (isset($this->_accept_encoding[$encoding])) + { + return $this->_accept_encoding[$encoding]; + } + + if ($explicit === FALSE) + { + if (isset($this->_accept_encoding['*'])) + { + return $this->_accept_encoding['*']; + } + elseif ($encoding === 'identity') + { + return (float) HTTP_Header::DEFAULT_QUALITY; + } + } + + return (float) 0; + } + + /** + * Returns the preferred message encoding type based on quality, and can + * optionally ignore wildcard references. If two or more encodings have the + * same quality, the first listed in `$encodings` will be returned. + * + * // Accept-Encoding: compress, gzip, *; q.5 + * $encoding = $header->preferred_encoding(array( + * 'gzip', 'bzip', 'blowfish' + * )); + * // $encoding = 'gzip'; + * + * @param array $encodings encodings to test against + * @param boolean $explicit explicit check, if `TRUE` wildcards are excluded + * @return mixed + * @since 3.2.0 + */ + public function preferred_encoding(array $encodings, $explicit = FALSE) + { + $ceiling = 0; + $preferred = FALSE; + + foreach ($encodings as $encoding) + { + $quality = $this->accepts_encoding_at_quality($encoding, $explicit); + + if ($quality > $ceiling) + { + $ceiling = $quality; + $preferred = $encoding; + } + } + + return $preferred; + } + + /** + * Returns the quality of `$language` supplied, optionally ignoring + * wildcards if `$explicit` is set to a non-`FALSE` value. If the quality + * is not found, `0.0` is returned. + * + * // Accept-Language: en-us, en-gb; q=.7, en; q=.5 + * $lang = $header->accepts_language_at_quality('en-gb'); + * // $lang = (float) 0.7 + * + * $lang2 = $header->accepts_language_at_quality('en-au'); + * // $lang2 = (float) 0.5 + * + * $lang3 = $header->accepts_language_at_quality('en-au', TRUE); + * // $lang3 = (float) 0.0 + * + * @param string $language language to interrogate + * @param boolean $explicit explicit interrogation, `TRUE` ignores wildcards + * @return float + * @since 3.2.0 + */ + public function accepts_language_at_quality($language, $explicit = FALSE) + { + if ($this->_accept_language === NULL) + { + if ($this->offsetExists('Accept-Language')) + { + $language_header = strtolower($this->offsetGet('Accept-Language')); + } + else + { + $language_header = NULL; + } + + $this->_accept_language = HTTP_Header::parse_language_header($language_header); + } + + // Normalize the language + $language_parts = explode('-', strtolower($language), 2); + + if (isset($this->_accept_language[$language_parts[0]])) + { + if (isset($language_parts[1])) + { + if (isset($this->_accept_language[$language_parts[0]][$language_parts[1]])) + { + return $this->_accept_language[$language_parts[0]][$language_parts[1]]; + } + elseif ($explicit === FALSE AND isset($this->_accept_language[$language_parts[0]]['*'])) + { + return $this->_accept_language[$language_parts[0]]['*']; + } + } + elseif (isset($this->_accept_language[$language_parts[0]]['*'])) + { + return $this->_accept_language[$language_parts[0]]['*']; + } + } + + if ($explicit === FALSE AND isset($this->_accept_language['*'])) + { + return $this->_accept_language['*']; + } + + return (float) 0; + } + + /** + * Returns the preferred language from the supplied array `$languages` based + * on the `Accept-Language` header directive. + * + * // Accept-Language: en-us, en-gb; q=.7, en; q=.5 + * $lang = $header->preferred_language(array( + * 'en-gb', 'en-au', 'fr', 'es' + * )); // $lang = 'en-gb' + * + * @param array $languages + * @param boolean $explicit + * @return mixed + * @since 3.2.0 + */ + public function preferred_language(array $languages, $explicit = FALSE) + { + $ceiling = 0; + $preferred = FALSE; + + foreach ($languages as $language) + { + $quality = $this->accepts_language_at_quality($language, $explicit); + + if ($quality > $ceiling) + { + $ceiling = $quality; + $preferred = $language; + } + } + + return $preferred; + } + + /** + * Sends headers to the php processor, or supplied `$callback` argument. + * This method formats the headers correctly for output, re-instating their + * capitalization for transmission. + * + * [!!] if you supply a custom header handler via `$callback`, it is + * recommended that `$response` is returned + * + * @param HTTP_Response $response header to send + * @param boolean $replace replace existing value + * @param callback $callback optional callback to replace PHP header function + * @return mixed + * @since 3.2.0 + */ + public function send_headers(HTTP_Response $response = NULL, $replace = FALSE, $callback = NULL) + { + $protocol = $response->protocol(); + $status = $response->status(); + + // Create the response header + $processed_headers = array($protocol.' '.$status.' '.Response::$messages[$status]); + + // Get the headers array + $headers = $response->headers()->getArrayCopy(); + + foreach ($headers as $header => $value) + { + if (is_array($value)) + { + $value = implode(', ', $value); + } + + $processed_headers[] = Text::ucfirst($header).': '.$value; + } + + if ( ! isset($headers['content-type'])) + { + $processed_headers[] = 'Content-Type: '.Kohana::$content_type.'; charset='.Kohana::$charset; + } + + if (Kohana::$expose AND ! isset($headers['x-powered-by'])) + { + $processed_headers[] = 'X-Powered-By: '.Kohana::version(); + } + + // Get the cookies and apply + if ($cookies = $response->cookie()) + { + $processed_headers['Set-Cookie'] = $cookies; + } + + if (is_callable($callback)) + { + // Use the callback method to set header + return call_user_func($callback, $response, $processed_headers, $replace); + } + else + { + $this->_send_headers_to_php($processed_headers, $replace); + return $response; + } + } + + /** + * Sends the supplied headers to the PHP output buffer. If cookies + * are included in the message they will be handled appropriately. + * + * @param array $headers headers to send to php + * @param boolean $replace replace existing headers + * @return self + * @since 3.2.0 + */ + protected function _send_headers_to_php(array $headers, $replace) + { + // If the headers have been sent, get out + if (headers_sent()) + return $this; + + foreach ($headers as $key => $line) + { + if ($key == 'Set-Cookie' AND is_array($line)) + { + // Send cookies + foreach ($line as $name => $value) + { + Cookie::set($name, $value['value'], $value['expiration']); + } + + continue; + } + + header($line, $replace); + } + + return $this; + } + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Message.php b/~dev_rating/system/classes/Kohana/HTTP/Message.php new file mode 100644 index 0000000000000000000000000000000000000000..c24046ec1b1eb3226ed53fda9937db2e6424ad0f --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Message.php @@ -0,0 +1,57 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * The HTTP Interaction interface providing the core HTTP methods that + * should be implemented by any HTTP request or response class. + * + * @package Kohana + * @category HTTP + * @author Kohana Team + * @since 3.1.0 + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +interface Kohana_HTTP_Message { + + /** + * Gets or sets the HTTP protocol. The standard protocol to use + * is `HTTP/1.1`. + * + * @param string $protocol Protocol to set to the request/response + * @return mixed + */ + public function protocol($protocol = NULL); + + /** + * Gets or sets HTTP headers to the request or response. All headers + * are included immediately after the HTTP protocol definition during + * transmission. This method provides a simple array or key/value + * interface to the headers. + * + * @param mixed $key Key or array of key/value pairs to set + * @param string $value Value to set to the supplied key + * @return mixed + */ + public function headers($key = NULL, $value = NULL); + + /** + * Gets or sets the HTTP body to the request or response. The body is + * included after the header, separated by a single empty new line. + * + * @param string $content Content to set to the object + * @return string + * @return void + */ + public function body($content = NULL); + + /** + * Renders the HTTP_Interaction to a string, producing + * + * - Protocol + * - Headers + * - Body + * + * @return string + */ + public function render(); + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Request.php b/~dev_rating/system/classes/Kohana/HTTP/Request.php new file mode 100644 index 0000000000000000000000000000000000000000..b8992725fdbd8b1deae03f78d60cc65f775e8d53 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Request.php @@ -0,0 +1,64 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * A HTTP Request specific interface that adds the methods required + * by HTTP requests. Over and above [Kohana_HTTP_Interaction], this + * interface provides method, uri, get and post methods. + * + * @package Kohana + * @category HTTP + * @author Kohana Team + * @since 3.1.0 + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +interface Kohana_HTTP_Request extends HTTP_Message { + + // HTTP Methods + const GET = 'GET'; + const POST = 'POST'; + const PUT = 'PUT'; + const DELETE = 'DELETE'; + const HEAD = 'HEAD'; + const OPTIONS = 'OPTIONS'; + const TRACE = 'TRACE'; + const CONNECT = 'CONNECT'; + + /** + * Gets or sets the HTTP method. Usually GET, POST, PUT or DELETE in + * traditional CRUD applications. + * + * @param string $method Method to use for this request + * @return mixed + */ + public function method($method = NULL); + + /** + * Gets the URI of this request, optionally allows setting + * of [Route] specific parameters during the URI generation. + * If no parameters are passed, the request will use the + * default values defined in the Route. + * + * @param array $params Optional parameters to include in uri generation + * @return string + */ + public function uri(); + + /** + * Gets or sets HTTP query string. + * + * @param mixed $key Key or key value pairs to set + * @param string $value Value to set to a key + * @return mixed + */ + public function query($key = NULL, $value = NULL); + + /** + * Gets or sets HTTP POST parameters to the request. + * + * @param mixed $key Key or key value pairs to set + * @param string $value Value to set to a key + * @return mixed + */ + public function post($key = NULL, $value = NULL); + +} diff --git a/~dev_rating/system/classes/Kohana/HTTP/Response.php b/~dev_rating/system/classes/Kohana/HTTP/Response.php new file mode 100644 index 0000000000000000000000000000000000000000..ddce6b4b9f9144669e26916def83c2102eb98731 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/HTTP/Response.php @@ -0,0 +1,31 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * A HTTP Response specific interface that adds the methods required + * by HTTP responses. Over and above [Kohana_HTTP_Interaction], this + * interface provides status. + * + * @package Kohana + * @category HTTP + * @author Kohana Team + * @since 3.1.0 + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +interface Kohana_HTTP_Response extends HTTP_Message { + + /** + * Sets or gets the HTTP status from this response. + * + * // Set the HTTP status to 404 Not Found + * $response = Response::factory() + * ->status(404); + * + * // Get the current status + * $status = $response->status(); + * + * @param integer $code Status to set to this response + * @return mixed + */ + public function status($code = NULL); + +} diff --git a/~dev_rating/system/classes/Kohana/I18n.php b/~dev_rating/system/classes/Kohana/I18n.php new file mode 100644 index 0000000000000000000000000000000000000000..670b9c00e1af56a13f72d22a2754af013d669269 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/I18n.php @@ -0,0 +1,166 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Internationalization (i18n) class. Provides language loading and translation + * methods without dependencies on [gettext](http://php.net/gettext). + * + * Typically this class would never be used directly, but used via the __() + * function, which loads the message and replaces parameters: + * + * // Display a translated message + * echo __('Hello, world'); + * + * // With parameter replacement + * echo __('Hello, :user', array(':user' => $username)); + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_I18n { + + /** + * @var string target language: en-us, es-es, zh-cn, etc + */ + public static $lang = 'en-us'; + + /** + * @var string source language: en-us, es-es, zh-cn, etc + */ + public static $source = 'en-us'; + + /** + * @var array cache of loaded languages + */ + protected static $_cache = array(); + + /** + * Get and set the target language. + * + * // Get the current language + * $lang = I18n::lang(); + * + * // Change the current language to Spanish + * I18n::lang('es-es'); + * + * @param string $lang new language setting + * @return string + * @since 3.0.2 + */ + public static function lang($lang = NULL) + { + if ($lang) + { + // Normalize the language + I18n::$lang = strtolower(str_replace(array(' ', '_'), '-', $lang)); + } + + return I18n::$lang; + } + + /** + * Returns translation of a string. If no translation exists, the original + * string will be returned. No parameters are replaced. + * + * $hello = I18n::get('Hello friends, my name is :name'); + * + * @param string $string text to translate + * @param string $lang target language + * @return string + */ + public static function get($string, $lang = NULL) + { + if ( ! $lang) + { + // Use the global target language + $lang = I18n::$lang; + } + + // Load the translation table for this language + $table = I18n::load($lang); + + // Return the translated string if it exists + return isset($table[$string]) ? $table[$string] : $string; + } + + /** + * Returns the translation table for a given language. + * + * // Get all defined Spanish messages + * $messages = I18n::load('es-es'); + * + * @param string $lang language to load + * @return array + */ + public static function load($lang) + { + if (isset(I18n::$_cache[$lang])) + { + return I18n::$_cache[$lang]; + } + + // New translation table + $table = array(); + + // Split the language: language, region, locale, etc + $parts = explode('-', $lang); + + do + { + // Create a path for this set of parts + $path = implode(DIRECTORY_SEPARATOR, $parts); + + if ($files = Kohana::find_file('i18n', $path, NULL, TRUE)) + { + $t = array(); + foreach ($files as $file) + { + // Merge the language strings into the sub table + $t = array_merge($t, Kohana::load($file)); + } + + // Append the sub table, preventing less specific language + // files from overloading more specific files + $table += $t; + } + + // Remove the last part + array_pop($parts); + } + while ($parts); + + // Cache the translation table locally + return I18n::$_cache[$lang] = $table; + } + +} + +if ( ! function_exists('__')) +{ + /** + * Kohana translation/internationalization function. The PHP function + * [strtr](http://php.net/strtr) is used for replacing parameters. + * + * __('Welcome back, :user', array(':user' => $username)); + * + * [!!] The target language is defined by [I18n::$lang]. + * + * @uses I18n::get + * @param string $string text to translate + * @param array $values values to replace in the translated text + * @param string $lang source language + * @return string + */ + function __($string, array $values = NULL, $lang = 'en-us') + { + if ($lang !== I18n::$lang) + { + // The message and target languages are different + // Get the translation for this message + $string = I18n::get($string); + } + + return empty($values) ? $string : strtr($string, $values); + } +} diff --git a/~dev_rating/system/classes/Kohana/Inflector.php b/~dev_rating/system/classes/Kohana/Inflector.php new file mode 100644 index 0000000000000000000000000000000000000000..c91d33a1f68515365ffc7a5b17e14d19298a7f23 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Inflector.php @@ -0,0 +1,273 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Inflector helper class. Inflection is changing the form of a word based on + * the context it is used in. For example, changing a word into a plural form. + * + * [!!] Inflection is only tested with English, and is will not work with other languages. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Inflector { + + /** + * @var array cached inflections + */ + protected static $cache = array(); + + /** + * @var array uncountable words + */ + protected static $uncountable; + + /** + * @var array irregular words + */ + protected static $irregular; + + /** + * Checks if a word is defined as uncountable. An uncountable word has a + * single form. For instance, one "fish" and many "fish", not "fishes". + * + * Inflector::uncountable('fish'); // TRUE + * Inflector::uncountable('cat'); // FALSE + * + * If you find a word is being pluralized improperly, it has probably not + * been defined as uncountable in `config/inflector.php`. If this is the + * case, please report [an issue](http://dev.kohanaphp.com/projects/kohana3/issues). + * + * @param string $str word to check + * @return boolean + */ + public static function uncountable($str) + { + if (Inflector::$uncountable === NULL) + { + // Cache uncountables + Inflector::$uncountable = Kohana::$config->load('inflector')->uncountable; + + // Make uncountables mirrored + Inflector::$uncountable = array_combine(Inflector::$uncountable, Inflector::$uncountable); + } + + return isset(Inflector::$uncountable[strtolower($str)]); + } + + /** + * Makes a plural word singular. + * + * echo Inflector::singular('cats'); // "cat" + * echo Inflector::singular('fish'); // "fish", uncountable + * + * You can also provide the count to make inflection more intelligent. + * In this case, it will only return the singular value if the count is + * greater than one and not zero. + * + * echo Inflector::singular('cats', 2); // "cats" + * + * [!!] Special inflections are defined in `config/inflector.php`. + * + * @param string $str word to make singular + * @param integer $count count of thing + * @return string + * @uses Inflector::uncountable + */ + public static function singular($str, $count = NULL) + { + // $count should always be a float + $count = ($count === NULL) ? 1.0 : (float) $count; + + // Do nothing when $count is not 1 + if ($count != 1) + return $str; + + // Remove garbage + $str = strtolower(trim($str)); + + // Cache key name + $key = 'singular_'.$str.$count; + + if (isset(Inflector::$cache[$key])) + return Inflector::$cache[$key]; + + if (Inflector::uncountable($str)) + return Inflector::$cache[$key] = $str; + + if (empty(Inflector::$irregular)) + { + // Cache irregular words + Inflector::$irregular = Kohana::$config->load('inflector')->irregular; + } + + if ($irregular = array_search($str, Inflector::$irregular)) + { + $str = $irregular; + } + elseif (preg_match('/us$/', $str)) + { + // http://en.wikipedia.org/wiki/Plural_form_of_words_ending_in_-us + // Already singular, do nothing + } + elseif (preg_match('/[sxz]es$/', $str) OR preg_match('/[^aeioudgkprt]hes$/', $str)) + { + // Remove "es" + $str = substr($str, 0, -2); + } + elseif (preg_match('/[^aeiou]ies$/', $str)) + { + // Replace "ies" with "y" + $str = substr($str, 0, -3).'y'; + } + elseif (substr($str, -1) === 's' AND substr($str, -2) !== 'ss') + { + // Remove singular "s" + $str = substr($str, 0, -1); + } + + return Inflector::$cache[$key] = $str; + } + + /** + * Makes a singular word plural. + * + * echo Inflector::plural('fish'); // "fish", uncountable + * echo Inflector::plural('cat'); // "cats" + * + * You can also provide the count to make inflection more intelligent. + * In this case, it will only return the plural value if the count is + * not one. + * + * echo Inflector::singular('cats', 3); // "cats" + * + * [!!] Special inflections are defined in `config/inflector.php`. + * + * @param string $str word to pluralize + * @param integer $count count of thing + * @return string + * @uses Inflector::uncountable + */ + public static function plural($str, $count = NULL) + { + // $count should always be a float + $count = ($count === NULL) ? 0.0 : (float) $count; + + // Do nothing with singular + if ($count == 1) + return $str; + + // Remove garbage + $str = trim($str); + + // Cache key name + $key = 'plural_'.$str.$count; + + // Check uppercase + $is_uppercase = ctype_upper($str); + + if (isset(Inflector::$cache[$key])) + return Inflector::$cache[$key]; + + if (Inflector::uncountable($str)) + return Inflector::$cache[$key] = $str; + + if (empty(Inflector::$irregular)) + { + // Cache irregular words + Inflector::$irregular = Kohana::$config->load('inflector')->irregular; + } + + if (isset(Inflector::$irregular[$str])) + { + $str = Inflector::$irregular[$str]; + } + elseif (in_array($str, Inflector::$irregular)) + { + // Do nothing + } + elseif (preg_match('/[sxz]$/', $str) OR preg_match('/[^aeioudgkprt]h$/', $str)) + { + $str .= 'es'; + } + elseif (preg_match('/[^aeiou]y$/', $str)) + { + // Change "y" to "ies" + $str = substr_replace($str, 'ies', -1); + } + else + { + $str .= 's'; + } + + // Convert to uppercase if necessary + if ($is_uppercase) + { + $str = strtoupper($str); + } + + // Set the cache and return + return Inflector::$cache[$key] = $str; + } + + /** + * Makes a phrase camel case. Spaces and underscores will be removed. + * + * $str = Inflector::camelize('mother cat'); // "motherCat" + * $str = Inflector::camelize('kittens in bed'); // "kittensInBed" + * + * @param string $str phrase to camelize + * @return string + */ + public static function camelize($str) + { + $str = 'x'.strtolower(trim($str)); + $str = ucwords(preg_replace('/[\s_]+/', ' ', $str)); + + return substr(str_replace(' ', '', $str), 1); + } + + /** + * Converts a camel case phrase into a spaced phrase. + * + * $str = Inflector::decamelize('houseCat'); // "house cat" + * $str = Inflector::decamelize('kingAllyCat'); // "king ally cat" + * + * @param string $str phrase to camelize + * @param string $sep word separator + * @return string + */ + public static function decamelize($str, $sep = ' ') + { + return strtolower(preg_replace('/([a-z])([A-Z])/', '$1'.$sep.'$2', trim($str))); + } + + /** + * Makes a phrase underscored instead of spaced. + * + * $str = Inflector::underscore('five cats'); // "five_cats"; + * + * @param string $str phrase to underscore + * @return string + */ + public static function underscore($str) + { + return preg_replace('/\s+/', '_', trim($str)); + } + + /** + * Makes an underscored or dashed phrase human-readable. + * + * $str = Inflector::humanize('kittens-are-cats'); // "kittens are cats" + * $str = Inflector::humanize('dogs_as_well'); // "dogs as well" + * + * @param string $str phrase to make human-readable + * @return string + */ + public static function humanize($str) + { + return preg_replace('/[_-]+/', ' ', trim($str)); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Kohana/Exception.php b/~dev_rating/system/classes/Kohana/Kohana/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..d54b4643600273061a4710e2954a3f994ff94b03 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Kohana/Exception.php @@ -0,0 +1,276 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Kohana exception class. Translates exceptions using the [I18n] class. + * + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Kohana_Exception extends Exception { + + /** + * @var array PHP error code => human readable name + */ + public static $php_errors = array( + E_ERROR => 'Fatal Error', + E_USER_ERROR => 'User Error', + E_PARSE => 'Parse Error', + E_WARNING => 'Warning', + E_USER_WARNING => 'User Warning', + E_STRICT => 'Strict', + E_NOTICE => 'Notice', + E_RECOVERABLE_ERROR => 'Recoverable Error', + E_DEPRECATED => 'Deprecated', + ); + + /** + * @var string error rendering view + */ + public static $error_view = 'kohana/error'; + + /** + * @var string error view content type + */ + public static $error_view_content_type = 'text/html'; + + /** + * Creates a new translated exception. + * + * throw new Kohana_Exception('Something went terrible wrong, :user', + * array(':user' => $user)); + * + * @param string $message error message + * @param array $variables translation variables + * @param integer|string $code the exception code + * @param Exception $previous Previous exception + * @return void + */ + public function __construct($message = "", array $variables = NULL, $code = 0, Exception $previous = NULL) + { + // Set the message + $message = __($message, $variables); + + // Pass the message and integer code to the parent + parent::__construct($message, (int) $code, $previous); + + // Save the unmodified code + // @link http://bugs.php.net/39615 + $this->code = $code; + } + + /** + * Magic object-to-string method. + * + * echo $exception; + * + * @uses Kohana_Exception::text + * @return string + */ + public function __toString() + { + return Kohana_Exception::text($this); + } + + /** + * Inline exception handler, displays the error message, source of the + * exception, and the stack trace of the error. + * + * @uses Kohana_Exception::response + * @param Exception $e + * @return void + */ + public static function handler(Exception $e) + { + $response = Kohana_Exception::_handler($e); + + // Send the response to the browser + echo $response->send_headers()->body(); + + exit(1); + } + + /** + * Exception handler, logs the exception and generates a Response object + * for display. + * + * @uses Kohana_Exception::response + * @param Exception $e + * @return Response + */ + public static function _handler(Exception $e) + { + try + { + // Log the exception + Kohana_Exception::log($e); + + // Generate the response + $response = Kohana_Exception::response($e); + + return $response; + } + catch (Exception $e) + { + /** + * Things are going *really* badly for us, We now have no choice + * but to bail. Hard. + */ + // Clean the output buffer if one exists + ob_get_level() AND ob_clean(); + + // Set the Status code to 500, and Content-Type to text/plain. + header('Content-Type: text/plain; charset='.Kohana::$charset, TRUE, 500); + + echo Kohana_Exception::text($e); + + exit(1); + } + } + + /** + * Logs an exception. + * + * @uses Kohana_Exception::text + * @param Exception $e + * @param int $level + * @return void + */ + public static function log(Exception $e, $level = Log::EMERGENCY) + { + if (is_object(Kohana::$log)) + { + // Create a text version of the exception + $error = Kohana_Exception::text($e); + + // Add this exception to the log + Kohana::$log->add($level, $error, NULL, array('exception' => $e)); + + // Make sure the logs are written + Kohana::$log->write(); + } + } + + /** + * Get a single line of text representing the exception: + * + * Error [ Code ]: Message ~ File [ Line ] + * + * @param Exception $e + * @return string + */ + public static function text(Exception $e) + { + return sprintf('%s [ %s ]: %s ~ %s [ %d ]', + get_class($e), $e->getCode(), strip_tags($e->getMessage()), Debug::path($e->getFile()), $e->getLine()); + } + + /** + * Get a Response object representing the exception + * + * @uses Kohana_Exception::text + * @param Exception $e + * @return Response + */ + public static function response(Exception $e) + { + try + { + // Get the exception information + $class = get_class($e); + $code = $e->getCode(); + $message = $e->getMessage(); + $file = $e->getFile(); + $line = $e->getLine(); + $trace = $e->getTrace(); + + /** + * HTTP_Exceptions are constructed in the HTTP_Exception::factory() + * method. We need to remove that entry from the trace and overwrite + * the variables from above. + */ + if ($e instanceof HTTP_Exception AND $trace[0]['function'] == 'factory') + { + extract(array_shift($trace)); + } + + + if ($e instanceof ErrorException) + { + /** + * If XDebug is installed, and this is a fatal error, + * use XDebug to generate the stack trace + */ + if (function_exists('xdebug_get_function_stack') AND $code == E_ERROR) + { + $trace = array_slice(array_reverse(xdebug_get_function_stack()), 4); + + foreach ($trace as & $frame) + { + /** + * XDebug pre 2.1.1 doesn't currently set the call type key + * http://bugs.xdebug.org/view.php?id=695 + */ + if ( ! isset($frame['type'])) + { + $frame['type'] = '??'; + } + + // XDebug also has a different name for the parameters array + if (isset($frame['params']) AND ! isset($frame['args'])) + { + $frame['args'] = $frame['params']; + } + } + } + + if (isset(Kohana_Exception::$php_errors[$code])) + { + // Use the human-readable error name + $code = Kohana_Exception::$php_errors[$code]; + } + } + + /** + * The stack trace becomes unmanageable inside PHPUnit. + * + * The error view ends up several GB in size, taking + * serveral minutes to render. + */ + if (defined('PHPUnit_MAIN_METHOD')) + { + $trace = array_slice($trace, 0, 2); + } + + // Instantiate the error view. + $view = View::factory(Kohana_Exception::$error_view, get_defined_vars()); + + // Prepare the response object. + $response = Response::factory(); + + // Set the response status + $response->status(($e instanceof HTTP_Exception) ? $e->getCode() : 500); + + // Set the response headers + $response->headers('Content-Type', Kohana_Exception::$error_view_content_type.'; charset='.Kohana::$charset); + + // Set the response body + $response->body($view->render()); + } + catch (Exception $e) + { + /** + * Things are going badly for us, Lets try to keep things under control by + * generating a simpler response object. + */ + $response = Response::factory(); + $response->status(500); + $response->headers('Content-Type', 'text/plain'); + $response->body(Kohana_Exception::text($e)); + } + + return $response; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Log.php b/~dev_rating/system/classes/Kohana/Log.php new file mode 100644 index 0000000000000000000000000000000000000000..07f0434e13f5fc34c0b59e805cc27ba9fae82068 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Log.php @@ -0,0 +1,228 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Message logging with observer-based log writing. + * + * [!!] This class does not support extensions, only additional writers. + * + * @package Kohana + * @category Logging + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Log { + + // Log message levels - Windows users see PHP Bug #18090 + const EMERGENCY = LOG_EMERG; // 0 + const ALERT = LOG_ALERT; // 1 + const CRITICAL = LOG_CRIT; // 2 + const ERROR = LOG_ERR; // 3 + const WARNING = LOG_WARNING; // 4 + const NOTICE = LOG_NOTICE; // 5 + const INFO = LOG_INFO; // 6 + const DEBUG = LOG_DEBUG; // 7 + + /** + * @var boolean immediately write when logs are added + */ + public static $write_on_add = FALSE; + + /** + * @var Log Singleton instance container + */ + protected static $_instance; + + /** + * Get the singleton instance of this class and enable writing at shutdown. + * + * $log = Log::instance(); + * + * @return Log + */ + public static function instance() + { + if (Log::$_instance === NULL) + { + // Create a new instance + Log::$_instance = new Log; + + // Write the logs at shutdown + register_shutdown_function(array(Log::$_instance, 'write')); + } + + return Log::$_instance; + } + + /** + * @var array list of added messages + */ + protected $_messages = array(); + + /** + * @var array list of log writers + */ + protected $_writers = array(); + + /** + * Attaches a log writer, and optionally limits the levels of messages that + * will be written by the writer. + * + * $log->attach($writer); + * + * @param Log_Writer $writer instance + * @param mixed $levels array of messages levels to write OR max level to write + * @param integer $min_level min level to write IF $levels is not an array + * @return Log + */ + public function attach(Log_Writer $writer, $levels = array(), $min_level = 0) + { + if ( ! is_array($levels)) + { + $levels = range($min_level, $levels); + } + + $this->_writers["{$writer}"] = array + ( + 'object' => $writer, + 'levels' => $levels + ); + + return $this; + } + + /** + * Detaches a log writer. The same writer object must be used. + * + * $log->detach($writer); + * + * @param Log_Writer $writer instance + * @return Log + */ + public function detach(Log_Writer $writer) + { + // Remove the writer + unset($this->_writers["{$writer}"]); + + return $this; + } + + /** + * Adds a message to the log. Replacement values must be passed in to be + * replaced using [strtr](http://php.net/strtr). + * + * $log->add(Log::ERROR, 'Could not locate user: :user', array( + * ':user' => $username, + * )); + * + * @param string $level level of message + * @param string $message message body + * @param array $values values to replace in the message + * @param array $additional additional custom parameters to supply to the log writer + * @return Log + */ + public function add($level, $message, array $values = NULL, array $additional = NULL) + { + if ($values) + { + // Insert the values into the message + $message = strtr($message, $values); + } + + // Grab a copy of the trace + if (isset($additional['exception'])) + { + $trace = $additional['exception']->getTrace(); + } + else + { + // Older php version don't have 'DEBUG_BACKTRACE_IGNORE_ARGS', so manually remove the args from the backtrace + if ( ! defined('DEBUG_BACKTRACE_IGNORE_ARGS')) + { + $trace = array_map(function ($item) { + unset($item['args']); + return $item; + }, array_slice(debug_backtrace(FALSE), 1)); + } + else + { + $trace = array_slice(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), 1); + } + } + + if ($additional == NULL) + { + $additional = array(); + } + + // Create a new message + $this->_messages[] = array + ( + 'time' => time(), + 'level' => $level, + 'body' => $message, + 'trace' => $trace, + 'file' => isset($trace[0]['file']) ? $trace[0]['file'] : NULL, + 'line' => isset($trace[0]['line']) ? $trace[0]['line'] : NULL, + 'class' => isset($trace[0]['class']) ? $trace[0]['class'] : NULL, + 'function' => isset($trace[0]['function']) ? $trace[0]['function'] : NULL, + 'additional' => $additional, + ); + + if (Log::$write_on_add) + { + // Write logs as they are added + $this->write(); + } + + return $this; + } + + /** + * Write and clear all of the messages. + * + * $log->write(); + * + * @return void + */ + public function write() + { + if (empty($this->_messages)) + { + // There is nothing to write, move along + return; + } + + // Import all messages locally + $messages = $this->_messages; + + // Reset the messages array + $this->_messages = array(); + + foreach ($this->_writers as $writer) + { + if (empty($writer['levels'])) + { + // Write all of the messages + $writer['object']->write($messages); + } + else + { + // Filtered messages + $filtered = array(); + + foreach ($messages as $message) + { + if (in_array($message['level'], $writer['levels'])) + { + // Writer accepts this kind of message + $filtered[] = $message; + } + } + + // Write the filtered messages + $writer['object']->write($filtered); + } + } + } + +} diff --git a/~dev_rating/system/classes/Kohana/Log/File.php b/~dev_rating/system/classes/Kohana/Log/File.php new file mode 100644 index 0000000000000000000000000000000000000000..17235c79184b60edbdee1273a33b13ee3c99ffab --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Log/File.php @@ -0,0 +1,94 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * File log writer. Writes out messages and stores them in a YYYY/MM directory. + * + * @package Kohana + * @category Logging + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Log_File extends Log_Writer { + + /** + * @var string Directory to place log files in + */ + protected $_directory; + + /** + * Creates a new file logger. Checks that the directory exists and + * is writable. + * + * $writer = new Log_File($directory); + * + * @param string $directory log directory + * @return void + */ + public function __construct($directory) + { + if ( ! is_dir($directory) OR ! is_writable($directory)) + { + throw new Kohana_Exception('Directory :dir must be writable', + array(':dir' => Debug::path($directory))); + } + + // Determine the directory path + $this->_directory = realpath($directory).DIRECTORY_SEPARATOR; + } + + /** + * Writes each of the messages into the log file. The log file will be + * appended to the `YYYY/MM/DD.log.php` file, where YYYY is the current + * year, MM is the current month, and DD is the current day. + * + * $writer->write($messages); + * + * @param array $messages + * @return void + */ + public function write(array $messages) + { + // Set the yearly directory name + $directory = $this->_directory.date('Y'); + + if ( ! is_dir($directory)) + { + // Create the yearly directory + mkdir($directory, 02777); + + // Set permissions (must be manually set to fix umask issues) + chmod($directory, 02777); + } + + // Add the month to the directory + $directory .= DIRECTORY_SEPARATOR.date('m'); + + if ( ! is_dir($directory)) + { + // Create the monthly directory + mkdir($directory, 02777); + + // Set permissions (must be manually set to fix umask issues) + chmod($directory, 02777); + } + + // Set the name of the log file + $filename = $directory.DIRECTORY_SEPARATOR.date('d').EXT; + + if ( ! file_exists($filename)) + { + // Create the log file + file_put_contents($filename, Kohana::FILE_SECURITY.' ?>'.PHP_EOL); + + // Allow anyone to write to log files + chmod($filename, 0666); + } + + foreach ($messages as $message) + { + // Write each message into the log file + file_put_contents($filename, PHP_EOL.$this->format_message($message), FILE_APPEND); + } + } + +} diff --git a/~dev_rating/system/classes/Kohana/Log/StdErr.php b/~dev_rating/system/classes/Kohana/Log/StdErr.php new file mode 100644 index 0000000000000000000000000000000000000000..53840387ac60eadfcda2820d8e13cdf9809e57e7 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Log/StdErr.php @@ -0,0 +1,29 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * STDERR log writer. Writes out messages to STDERR. + * + * @package Kohana + * @category Logging + * @author Kohana Team + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Log_StdErr extends Log_Writer { + /** + * Writes each of the messages to STDERR. + * + * $writer->write($messages); + * + * @param array $messages + * @return void + */ + public function write(array $messages) + { + foreach ($messages as $message) + { + // Writes out each message + fwrite(STDERR, $this->format_message($message).PHP_EOL); + } + } + +} diff --git a/~dev_rating/system/classes/Kohana/Log/StdOut.php b/~dev_rating/system/classes/Kohana/Log/StdOut.php new file mode 100644 index 0000000000000000000000000000000000000000..608c65389f47ecc99428e46eec923b88f05da76a --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Log/StdOut.php @@ -0,0 +1,30 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * STDOUT log writer. Writes out messages to STDOUT. + * + * @package Kohana + * @category Logging + * @author Kohana Team + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Log_StdOut extends Log_Writer { + + /** + * Writes each of the messages to STDOUT. + * + * $writer->write($messages); + * + * @param array $messages + * @return void + */ + public function write(array $messages) + { + foreach ($messages as $message) + { + // Writes out each message + fwrite(STDOUT, $this->format_message($message).PHP_EOL); + } + } + +} diff --git a/~dev_rating/system/classes/Kohana/Log/Syslog.php b/~dev_rating/system/classes/Kohana/Log/Syslog.php new file mode 100644 index 0000000000000000000000000000000000000000..c747d5849acb46e745596c7eeea6fe3478d131e5 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Log/Syslog.php @@ -0,0 +1,65 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Syslog log writer. + * + * @package Kohana + * @category Logging + * @author Jeremy Bush + * @copyright (c) 2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Log_Syslog extends Log_Writer { + + /** + * @var string The syslog identifier + */ + protected $_ident; + + /** + * Creates a new syslog logger. + * + * @link http://www.php.net/manual/function.openlog + * + * @param string $ident syslog identifier + * @param int $facility facility to log to + * @return void + */ + public function __construct($ident = 'KohanaPHP', $facility = LOG_USER) + { + $this->_ident = $ident; + + // Open the connection to syslog + openlog($this->_ident, LOG_CONS, $facility); + } + + /** + * Writes each of the messages into the syslog. + * + * @param array $messages + * @return void + */ + public function write(array $messages) + { + foreach ($messages as $message) + { + syslog($message['level'], $message['body']); + + if (isset($message['additional']['exception'])) + { + syslog(Log_Writer::$strace_level, $message['additional']['exception']->getTraceAsString()); + } + } + } + + /** + * Closes the syslog connection + * + * @return void + */ + public function __destruct() + { + // Close connection to syslog + closelog(); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Log/Writer.php b/~dev_rating/system/classes/Kohana/Log/Writer.php new file mode 100644 index 0000000000000000000000000000000000000000..c7c967810bd54b0c4f51df755e09eebf6aaf53a0 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Log/Writer.php @@ -0,0 +1,95 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Log writer abstract class. All [Log] writers must extend this class. + * + * @package Kohana + * @category Logging + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_Log_Writer { + + /** + * @var string timestamp format for log entries. + * + * Defaults to Date::$timestamp_format + */ + public static $timestamp; + + /** + * @var string timezone for log entries + * + * Defaults to Date::$timezone, which defaults to date_default_timezone_get() + */ + public static $timezone; + + /** + * Numeric log level to string lookup table. + * @var array + */ + protected $_log_levels = array( + LOG_EMERG => 'EMERGENCY', + LOG_ALERT => 'ALERT', + LOG_CRIT => 'CRITICAL', + LOG_ERR => 'ERROR', + LOG_WARNING => 'WARNING', + LOG_NOTICE => 'NOTICE', + LOG_INFO => 'INFO', + LOG_DEBUG => 'DEBUG', + ); + + /** + * @var int Level to use for stack traces + */ + public static $strace_level = LOG_DEBUG; + + /** + * Write an array of messages. + * + * $writer->write($messages); + * + * @param array $messages + * @return void + */ + abstract public function write(array $messages); + + /** + * Allows the writer to have a unique key when stored. + * + * echo $writer; + * + * @return string + */ + final public function __toString() + { + return spl_object_hash($this); + } + + /** + * Formats a log entry. + * + * @param array $message + * @param string $format + * @return string + */ + public function format_message(array $message, $format = "time --- level: body in file:line") + { + $message['time'] = Date::formatted_time('@'.$message['time'], Log_Writer::$timestamp, Log_Writer::$timezone, TRUE); + $message['level'] = $this->_log_levels[$message['level']]; + + $string = strtr($format, array_filter($message, 'is_scalar')); + + if (isset($message['additional']['exception'])) + { + // Re-use as much as possible, just resetting the body to the trace + $message['body'] = $message['additional']['exception']->getTraceAsString(); + $message['level'] = $this->_log_levels[Log_Writer::$strace_level]; + + $string .= PHP_EOL.strtr($format, array_filter($message, 'is_scalar')); + } + + return $string; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Model.php b/~dev_rating/system/classes/Kohana/Model.php new file mode 100644 index 0000000000000000000000000000000000000000..995dde21fdf724bbe621288b03caaf4a20ea0898 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Model.php @@ -0,0 +1,29 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Model base class. All models should extend this class. + * + * @package Kohana + * @category Models + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_Model { + + /** + * Create a new model instance. + * + * $model = Model::factory($name); + * + * @param string $name model name + * @return Model + */ + public static function factory($name) + { + // Add the model prefix + $class = 'Model_'.$name; + + return new $class; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Num.php b/~dev_rating/system/classes/Kohana/Num.php new file mode 100644 index 0000000000000000000000000000000000000000..329dcf76b7b0072830bcd3c564d57ed3b1884f05 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Num.php @@ -0,0 +1,234 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Number helper class. Provides additional formatting methods that for working + * with numbers. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Num { + + const ROUND_HALF_UP = 1; + const ROUND_HALF_DOWN = 2; + const ROUND_HALF_EVEN = 3; + const ROUND_HALF_ODD = 4; + + /** + * @var array Valid byte units => power of 2 that defines the unit's size + */ + public static $byte_units = array + ( + 'B' => 0, + 'K' => 10, + 'Ki' => 10, + 'KB' => 10, + 'KiB' => 10, + 'M' => 20, + 'Mi' => 20, + 'MB' => 20, + 'MiB' => 20, + 'G' => 30, + 'Gi' => 30, + 'GB' => 30, + 'GiB' => 30, + 'T' => 40, + 'Ti' => 40, + 'TB' => 40, + 'TiB' => 40, + 'P' => 50, + 'Pi' => 50, + 'PB' => 50, + 'PiB' => 50, + 'E' => 60, + 'Ei' => 60, + 'EB' => 60, + 'EiB' => 60, + 'Z' => 70, + 'Zi' => 70, + 'ZB' => 70, + 'ZiB' => 70, + 'Y' => 80, + 'Yi' => 80, + 'YB' => 80, + 'YiB' => 80, + ); + + /** + * Returns the English ordinal suffix (th, st, nd, etc) of a number. + * + * echo 2, Num::ordinal(2); // "2nd" + * echo 10, Num::ordinal(10); // "10th" + * echo 33, Num::ordinal(33); // "33rd" + * + * @param integer $number + * @return string + */ + public static function ordinal($number) + { + if ($number % 100 > 10 AND $number % 100 < 14) + { + return 'th'; + } + + switch ($number % 10) + { + case 1: + return 'st'; + case 2: + return 'nd'; + case 3: + return 'rd'; + default: + return 'th'; + } + } + + /** + * Locale-aware number and monetary formatting. + * + * // In English, "1,200.05" + * // In Spanish, "1200,05" + * // In Portuguese, "1 200,05" + * echo Num::format(1200.05, 2); + * + * // In English, "1,200.05" + * // In Spanish, "1.200,05" + * // In Portuguese, "1.200.05" + * echo Num::format(1200.05, 2, TRUE); + * + * @param float $number number to format + * @param integer $places decimal places + * @param boolean $monetary monetary formatting? + * @return string + * @since 3.0.2 + */ + public static function format($number, $places, $monetary = FALSE) + { + $info = localeconv(); + + if ($monetary) + { + $decimal = $info['mon_decimal_point']; + $thousands = $info['mon_thousands_sep']; + } + else + { + $decimal = $info['decimal_point']; + $thousands = $info['thousands_sep']; + } + + return number_format($number, $places, $decimal, $thousands); + } + + /** + * Round a number to a specified precision, using a specified tie breaking technique + * + * @param float $value Number to round + * @param integer $precision Desired precision + * @param integer $mode Tie breaking mode, accepts the PHP_ROUND_HALF_* constants + * @param boolean $native Set to false to force use of the userland implementation + * @return float Rounded number + */ + public static function round($value, $precision = 0, $mode = self::ROUND_HALF_UP, $native = TRUE) + { + if (version_compare(PHP_VERSION, '5.3', '>=') AND $native) + { + return round($value, $precision, $mode); + } + + if ($mode === self::ROUND_HALF_UP) + { + return round($value, $precision); + } + else + { + $factor = ($precision === 0) ? 1 : pow(10, $precision); + + switch ($mode) + { + case self::ROUND_HALF_DOWN: + case self::ROUND_HALF_EVEN: + case self::ROUND_HALF_ODD: + // Check if we have a rounding tie, otherwise we can just call round() + if (($value * $factor) - floor($value * $factor) === 0.5) + { + if ($mode === self::ROUND_HALF_DOWN) + { + // Round down operation, so we round down unless the value + // is -ve because up is down and down is up down there. ;) + $up = ($value < 0); + } + else + { + // Round up if the integer is odd and the round mode is set to even + // or the integer is even and the round mode is set to odd. + // Any other instance round down. + $up = ( ! ( ! (floor($value * $factor) & 1)) === ($mode === self::ROUND_HALF_EVEN)); + } + + if ($up) + { + $value = ceil($value * $factor); + } + else + { + $value = floor($value * $factor); + } + return $value / $factor; + } + else + { + return round($value, $precision); + } + break; + } + } + } + + /** + * Converts a file size number to a byte value. File sizes are defined in + * the format: SB, where S is the size (1, 8.5, 300, etc.) and B is the + * byte unit (K, MiB, GB, etc.). All valid byte units are defined in + * Num::$byte_units + * + * echo Num::bytes('200K'); // 204800 + * echo Num::bytes('5MiB'); // 5242880 + * echo Num::bytes('1000'); // 1000 + * echo Num::bytes('2.5GB'); // 2684354560 + * + * @param string $bytes file size in SB format + * @return float + */ + public static function bytes($size) + { + // Prepare the size + $size = trim( (string) $size); + + // Construct an OR list of byte units for the regex + $accepted = implode('|', array_keys(Num::$byte_units)); + + // Construct the regex pattern for verifying the size format + $pattern = '/^([0-9]+(?:\.[0-9]+)?)('.$accepted.')?$/Di'; + + // Verify the size format and store the matching parts + if ( ! preg_match($pattern, $size, $matches)) + throw new Kohana_Exception('The byte unit size, ":size", is improperly formatted.', array( + ':size' => $size, + )); + + // Find the float value of the size + $size = (float) $matches[1]; + + // Find the actual unit, assume B if no unit specified + $unit = Arr::get($matches, 2, 'B'); + + // Convert the size into bytes + $bytes = $size * pow(2, Num::$byte_units[$unit]); + + return $bytes; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Profiler.php b/~dev_rating/system/classes/Kohana/Profiler.php new file mode 100644 index 0000000000000000000000000000000000000000..021eaef877b5c118d5f2d60de6bc7357dbc6061b --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Profiler.php @@ -0,0 +1,385 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Provides simple benchmarking and profiling. To display the statistics that + * have been collected, load the `profiler/stats` [View]: + * + * echo View::factory('profiler/stats'); + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Profiler { + + /** + * @var integer maximum number of application stats to keep + */ + public static $rollover = 1000; + + /** + * @var array collected benchmarks + */ + protected static $_marks = array(); + + /** + * Starts a new benchmark and returns a unique token. The returned token + * _must_ be used when stopping the benchmark. + * + * $token = Profiler::start('test', 'profiler'); + * + * @param string $group group name + * @param string $name benchmark name + * @return string + */ + public static function start($group, $name) + { + static $counter = 0; + + // Create a unique token based on the counter + $token = 'kp/'.base_convert($counter++, 10, 32); + + Profiler::$_marks[$token] = array + ( + 'group' => strtolower($group), + 'name' => (string) $name, + + // Start the benchmark + 'start_time' => microtime(TRUE), + 'start_memory' => memory_get_usage(), + + // Set the stop keys without values + 'stop_time' => FALSE, + 'stop_memory' => FALSE, + ); + + return $token; + } + + /** + * Stops a benchmark. + * + * Profiler::stop($token); + * + * @param string $token + * @return void + */ + public static function stop($token) + { + // Stop the benchmark + Profiler::$_marks[$token]['stop_time'] = microtime(TRUE); + Profiler::$_marks[$token]['stop_memory'] = memory_get_usage(); + } + + /** + * Deletes a benchmark. If an error occurs during the benchmark, it is + * recommended to delete the benchmark to prevent statistics from being + * adversely affected. + * + * Profiler::delete($token); + * + * @param string $token + * @return void + */ + public static function delete($token) + { + // Remove the benchmark + unset(Profiler::$_marks[$token]); + } + + /** + * Returns all the benchmark tokens by group and name as an array. + * + * $groups = Profiler::groups(); + * + * @return array + */ + public static function groups() + { + $groups = array(); + + foreach (Profiler::$_marks as $token => $mark) + { + // Sort the tokens by the group and name + $groups[$mark['group']][$mark['name']][] = $token; + } + + return $groups; + } + + /** + * Gets the min, max, average and total of a set of tokens as an array. + * + * $stats = Profiler::stats($tokens); + * + * @param array $tokens profiler tokens + * @return array min, max, average, total + * @uses Profiler::total + */ + public static function stats(array $tokens) + { + // Min and max are unknown by default + $min = $max = array( + 'time' => NULL, + 'memory' => NULL); + + // Total values are always integers + $total = array( + 'time' => 0, + 'memory' => 0); + + foreach ($tokens as $token) + { + // Get the total time and memory for this benchmark + list($time, $memory) = Profiler::total($token); + + if ($max['time'] === NULL OR $time > $max['time']) + { + // Set the maximum time + $max['time'] = $time; + } + + if ($min['time'] === NULL OR $time < $min['time']) + { + // Set the minimum time + $min['time'] = $time; + } + + // Increase the total time + $total['time'] += $time; + + if ($max['memory'] === NULL OR $memory > $max['memory']) + { + // Set the maximum memory + $max['memory'] = $memory; + } + + if ($min['memory'] === NULL OR $memory < $min['memory']) + { + // Set the minimum memory + $min['memory'] = $memory; + } + + // Increase the total memory + $total['memory'] += $memory; + } + + // Determine the number of tokens + $count = count($tokens); + + // Determine the averages + $average = array( + 'time' => $total['time'] / $count, + 'memory' => $total['memory'] / $count); + + return array( + 'min' => $min, + 'max' => $max, + 'total' => $total, + 'average' => $average); + } + + /** + * Gets the min, max, average and total of profiler groups as an array. + * + * $stats = Profiler::group_stats('test'); + * + * @param mixed $groups single group name string, or array with group names; all groups by default + * @return array min, max, average, total + * @uses Profiler::groups + * @uses Profiler::stats + */ + public static function group_stats($groups = NULL) + { + // Which groups do we need to calculate stats for? + $groups = ($groups === NULL) + ? Profiler::groups() + : array_intersect_key(Profiler::groups(), array_flip( (array) $groups)); + + // All statistics + $stats = array(); + + foreach ($groups as $group => $names) + { + foreach ($names as $name => $tokens) + { + // Store the stats for each subgroup. + // We only need the values for "total". + $_stats = Profiler::stats($tokens); + $stats[$group][$name] = $_stats['total']; + } + } + + // Group stats + $groups = array(); + + foreach ($stats as $group => $names) + { + // Min and max are unknown by default + $groups[$group]['min'] = $groups[$group]['max'] = array( + 'time' => NULL, + 'memory' => NULL); + + // Total values are always integers + $groups[$group]['total'] = array( + 'time' => 0, + 'memory' => 0); + + foreach ($names as $total) + { + if ( ! isset($groups[$group]['min']['time']) OR $groups[$group]['min']['time'] > $total['time']) + { + // Set the minimum time + $groups[$group]['min']['time'] = $total['time']; + } + if ( ! isset($groups[$group]['min']['memory']) OR $groups[$group]['min']['memory'] > $total['memory']) + { + // Set the minimum memory + $groups[$group]['min']['memory'] = $total['memory']; + } + + if ( ! isset($groups[$group]['max']['time']) OR $groups[$group]['max']['time'] < $total['time']) + { + // Set the maximum time + $groups[$group]['max']['time'] = $total['time']; + } + if ( ! isset($groups[$group]['max']['memory']) OR $groups[$group]['max']['memory'] < $total['memory']) + { + // Set the maximum memory + $groups[$group]['max']['memory'] = $total['memory']; + } + + // Increase the total time and memory + $groups[$group]['total']['time'] += $total['time']; + $groups[$group]['total']['memory'] += $total['memory']; + } + + // Determine the number of names (subgroups) + $count = count($names); + + // Determine the averages + $groups[$group]['average']['time'] = $groups[$group]['total']['time'] / $count; + $groups[$group]['average']['memory'] = $groups[$group]['total']['memory'] / $count; + } + + return $groups; + } + + /** + * Gets the total execution time and memory usage of a benchmark as a list. + * + * list($time, $memory) = Profiler::total($token); + * + * @param string $token + * @return array execution time, memory + */ + public static function total($token) + { + // Import the benchmark data + $mark = Profiler::$_marks[$token]; + + if ($mark['stop_time'] === FALSE) + { + // The benchmark has not been stopped yet + $mark['stop_time'] = microtime(TRUE); + $mark['stop_memory'] = memory_get_usage(); + } + + return array + ( + // Total time in seconds + $mark['stop_time'] - $mark['start_time'], + + // Amount of memory in bytes + $mark['stop_memory'] - $mark['start_memory'], + ); + } + + /** + * Gets the total application run time and memory usage. Caches the result + * so that it can be compared between requests. + * + * list($time, $memory) = Profiler::application(); + * + * @return array execution time, memory + * @uses Kohana::cache + */ + public static function application() + { + // Load the stats from cache, which is valid for 1 day + $stats = Kohana::cache('profiler_application_stats', NULL, 3600 * 24); + + if ( ! is_array($stats) OR $stats['count'] > Profiler::$rollover) + { + // Initialize the stats array + $stats = array( + 'min' => array( + 'time' => NULL, + 'memory' => NULL), + 'max' => array( + 'time' => NULL, + 'memory' => NULL), + 'total' => array( + 'time' => NULL, + 'memory' => NULL), + 'count' => 0); + } + + // Get the application run time + $time = microtime(TRUE) - KOHANA_START_TIME; + + // Get the total memory usage + $memory = memory_get_usage() - KOHANA_START_MEMORY; + + // Calculate max time + if ($stats['max']['time'] === NULL OR $time > $stats['max']['time']) + { + $stats['max']['time'] = $time; + } + + // Calculate min time + if ($stats['min']['time'] === NULL OR $time < $stats['min']['time']) + { + $stats['min']['time'] = $time; + } + + // Add to total time + $stats['total']['time'] += $time; + + // Calculate max memory + if ($stats['max']['memory'] === NULL OR $memory > $stats['max']['memory']) + { + $stats['max']['memory'] = $memory; + } + + // Calculate min memory + if ($stats['min']['memory'] === NULL OR $memory < $stats['min']['memory']) + { + $stats['min']['memory'] = $memory; + } + + // Add to total memory + $stats['total']['memory'] += $memory; + + // Another mark has been added to the stats + $stats['count']++; + + // Determine the averages + $stats['average'] = array( + 'time' => $stats['total']['time'] / $stats['count'], + 'memory' => $stats['total']['memory'] / $stats['count']); + + // Cache the new stats + Kohana::cache('profiler_application_stats', $stats); + + // Set the current application execution time and memory + // Do NOT cache these, they are specific to the current request only + $stats['current']['time'] = $time; + $stats['current']['memory'] = $memory; + + // Return the total application run time and memory usage + return $stats; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Request.php b/~dev_rating/system/classes/Kohana/Request.php new file mode 100644 index 0000000000000000000000000000000000000000..ba7738548a499b39f446fadf9192dc162c66d85e --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request.php @@ -0,0 +1,1328 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Request. Uses the [Route] class to determine what + * [Controller] to send the request to. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Request implements HTTP_Request { + + /** + * @var string client user agent + */ + public static $user_agent = ''; + + /** + * @var string client IP address + */ + public static $client_ip = '0.0.0.0'; + + /** + * @var string trusted proxy server IPs + */ + public static $trusted_proxies = array('127.0.0.1', 'localhost', 'localhost.localdomain'); + + /** + * @var Request main request instance + */ + public static $initial; + + /** + * @var Request currently executing request instance + */ + public static $current; + + /** + * Creates a new request object for the given URI. New requests should be + * created using the [Request::instance] or [Request::factory] methods. + * + * $request = Request::factory($uri); + * + * If $cache parameter is set, the response for the request will attempt to + * be retrieved from the cache. + * + * @param string $uri URI of the request + * @param array $client_params An array of params to pass to the request client + * @param bool $allow_external Allow external requests? (deprecated in 3.3) + * @param array $injected_routes An array of routes to use, for testing + * @return void|Request + * @throws Request_Exception + * @uses Route::all + * @uses Route::matches + */ + public static function factory($uri = TRUE, $client_params = array(), $allow_external = TRUE, $injected_routes = array()) + { + // If this is the initial request + if ( ! Request::$initial) + { + $protocol = HTTP::$protocol; + + if (isset($_SERVER['REQUEST_METHOD'])) + { + // Use the server request method + $method = $_SERVER['REQUEST_METHOD']; + } + else + { + // Default to GET requests + $method = HTTP_Request::GET; + } + + if (( ! empty($_SERVER['HTTPS']) AND filter_var($_SERVER['HTTPS'], FILTER_VALIDATE_BOOLEAN)) + OR (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) + AND $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') + AND in_array($_SERVER['REMOTE_ADDR'], Request::$trusted_proxies)) + { + // This request is secure + $secure = TRUE; + } + + if (isset($_SERVER['HTTP_REFERER'])) + { + // There is a referrer for this request + $referrer = $_SERVER['HTTP_REFERER']; + } + + if (isset($_SERVER['HTTP_USER_AGENT'])) + { + // Browser type + Request::$user_agent = $_SERVER['HTTP_USER_AGENT']; + } + + if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) + { + // Typically used to denote AJAX requests + $requested_with = $_SERVER['HTTP_X_REQUESTED_WITH']; + } + + if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) + AND isset($_SERVER['REMOTE_ADDR']) + AND in_array($_SERVER['REMOTE_ADDR'], Request::$trusted_proxies)) + { + // Use the forwarded IP address, typically set when the + // client is using a proxy server. + // Format: "X-Forwarded-For: client1, proxy1, proxy2" + $client_ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); + + Request::$client_ip = array_shift($client_ips); + + unset($client_ips); + } + elseif (isset($_SERVER['HTTP_CLIENT_IP']) + AND isset($_SERVER['REMOTE_ADDR']) + AND in_array($_SERVER['REMOTE_ADDR'], Request::$trusted_proxies)) + { + // Use the forwarded IP address, typically set when the + // client is using a proxy server. + $client_ips = explode(',', $_SERVER['HTTP_CLIENT_IP']); + + Request::$client_ip = array_shift($client_ips); + + unset($client_ips); + } + elseif (isset($_SERVER['REMOTE_ADDR'])) + { + // The remote IP address + Request::$client_ip = $_SERVER['REMOTE_ADDR']; + } + + if ($method !== HTTP_Request::GET) + { + // Ensure the raw body is saved for future use + $body = file_get_contents('php://input'); + } + + if ($uri === TRUE) + { + // Attempt to guess the proper URI + $uri = Request::detect_uri(); + } + + $cookies = array(); + + if (($cookie_keys = array_keys($_COOKIE))) + { + foreach ($cookie_keys as $key) + { + $cookies[$key] = Cookie::get($key); + } + } + + // Create the instance singleton + Request::$initial = $request = new Request($uri, $client_params, $allow_external, $injected_routes); + + // Store global GET and POST data in the initial request only + $request->protocol($protocol) + ->query($_GET) + ->post($_POST); + + if (isset($secure)) + { + // Set the request security + $request->secure($secure); + } + + if (isset($method)) + { + // Set the request method + $request->method($method); + } + + if (isset($referrer)) + { + // Set the referrer + $request->referrer($referrer); + } + + if (isset($requested_with)) + { + // Apply the requested with variable + $request->requested_with($requested_with); + } + + if (isset($body)) + { + // Set the request body (probably a PUT type) + $request->body($body); + } + + if (isset($cookies)) + { + $request->cookie($cookies); + } + } + else + { + $request = new Request($uri, $client_params, $allow_external, $injected_routes); + } + + return $request; + } + + /** + * Automatically detects the URI of the main request using PATH_INFO, + * REQUEST_URI, PHP_SELF or REDIRECT_URL. + * + * $uri = Request::detect_uri(); + * + * @return string URI of the main request + * @throws Kohana_Exception + * @since 3.0.8 + */ + public static function detect_uri() + { + if ( ! empty($_SERVER['PATH_INFO'])) + { + // PATH_INFO does not contain the docroot or index + $uri = $_SERVER['PATH_INFO']; + } + else + { + // REQUEST_URI and PHP_SELF include the docroot and index + + if (isset($_SERVER['REQUEST_URI'])) + { + /** + * We use REQUEST_URI as the fallback value. The reason + * for this is we might have a malformed URL such as: + * + * http://localhost/http://example.com/judge.php + * + * which parse_url can't handle. So rather than leave empty + * handed, we'll use this. + */ + $uri = $_SERVER['REQUEST_URI']; + + if ($request_uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)) + { + // Valid URL path found, set it. + $uri = $request_uri; + } + + // Decode the request URI + $uri = rawurldecode($uri); + } + elseif (isset($_SERVER['PHP_SELF'])) + { + $uri = $_SERVER['PHP_SELF']; + } + elseif (isset($_SERVER['REDIRECT_URL'])) + { + $uri = $_SERVER['REDIRECT_URL']; + } + else + { + // If you ever see this error, please report an issue at http://dev.kohanaphp.com/projects/kohana3/issues + // along with any relevant information about your web server setup. Thanks! + throw new Kohana_Exception('Unable to detect the URI using PATH_INFO, REQUEST_URI, PHP_SELF or REDIRECT_URL'); + } + + // Get the path from the base URL, including the index file + $base_url = parse_url(Kohana::$base_url, PHP_URL_PATH); + + if (strpos($uri, $base_url) === 0) + { + // Remove the base URL from the URI + $uri = (string) substr($uri, strlen($base_url)); + } + + if (Kohana::$index_file AND strpos($uri, Kohana::$index_file) === 0) + { + // Remove the index file from the URI + $uri = (string) substr($uri, strlen(Kohana::$index_file)); + } + } + + return $uri; + } + + /** + * Return the currently executing request. This is changed to the current + * request when [Request::execute] is called and restored when the request + * is completed. + * + * $request = Request::current(); + * + * @return Request + * @since 3.0.5 + */ + public static function current() + { + return Request::$current; + } + + /** + * Returns the first request encountered by this framework. This will should + * only be set once during the first [Request::factory] invocation. + * + * // Get the first request + * $request = Request::initial(); + * + * // Test whether the current request is the first request + * if (Request::initial() === Request::current()) + * // Do something useful + * + * @return Request + * @since 3.1.0 + */ + public static function initial() + { + return Request::$initial; + } + + /** + * Returns information about the initial user agent. + * + * @param mixed $value array or string to return: browser, version, robot, mobile, platform + * @return mixed requested information, FALSE if nothing is found + * @uses Request::$user_agent + * @uses Text::user_agent + */ + public static function user_agent($value) + { + return Text::user_agent(Request::$user_agent, $value); + } + + /** + * Returns the accepted content types. If a specific type is defined, + * the quality of that type will be returned. + * + * $types = Request::accept_type(); + * + * [!!] Deprecated in favor of using [HTTP_Header::accepts_at_quality]. + * + * @deprecated since version 3.3.0 + * @param string $type Content MIME type + * @return mixed An array of all types or a specific type as a string + * @uses Request::_parse_accept + */ + public static function accept_type($type = NULL) + { + static $accepts; + + if ($accepts === NULL) + { + // Parse the HTTP_ACCEPT header + $accepts = Request::_parse_accept($_SERVER['HTTP_ACCEPT'], array('*/*' => 1.0)); + } + + if (isset($type)) + { + // Return the quality setting for this type + return isset($accepts[$type]) ? $accepts[$type] : $accepts['*/*']; + } + + return $accepts; + } + + /** + * Returns the accepted languages. If a specific language is defined, + * the quality of that language will be returned. If the language is not + * accepted, FALSE will be returned. + * + * $langs = Request::accept_lang(); + * + * [!!] Deprecated in favor of using [HTTP_Header::accepts_language_at_quality]. + * + * @deprecated since version 3.3.0 + * @param string $lang Language code + * @return mixed An array of all types or a specific type as a string + * @uses Request::_parse_accept + */ + public static function accept_lang($lang = NULL) + { + static $accepts; + + if ($accepts === NULL) + { + // Parse the HTTP_ACCEPT_LANGUAGE header + $accepts = Request::_parse_accept($_SERVER['HTTP_ACCEPT_LANGUAGE']); + } + + if (isset($lang)) + { + // Return the quality setting for this lang + return isset($accepts[$lang]) ? $accepts[$lang] : FALSE; + } + + return $accepts; + } + + /** + * Returns the accepted encodings. If a specific encoding is defined, + * the quality of that encoding will be returned. If the encoding is not + * accepted, FALSE will be returned. + * + * $encodings = Request::accept_encoding(); + * + * [!!] Deprecated in favor of using [HTTP_Header::accepts_encoding_at_quality]. + * + * @deprecated since version 3.3.0 + * @param string $type Encoding type + * @return mixed An array of all types or a specific type as a string + * @uses Request::_parse_accept + */ + public static function accept_encoding($type = NULL) + { + static $accepts; + + if ($accepts === NULL) + { + // Parse the HTTP_ACCEPT_LANGUAGE header + $accepts = Request::_parse_accept($_SERVER['HTTP_ACCEPT_ENCODING']); + } + + if (isset($type)) + { + // Return the quality setting for this type + return isset($accepts[$type]) ? $accepts[$type] : FALSE; + } + + return $accepts; + } + + /** + * Determines if a file larger than the post_max_size has been uploaded. PHP + * does not handle this situation gracefully on its own, so this method + * helps to solve that problem. + * + * @return boolean + * @uses Num::bytes + * @uses Arr::get + */ + public static function post_max_size_exceeded() + { + // Make sure the request method is POST + if (Request::$initial->method() !== HTTP_Request::POST) + return FALSE; + + // Get the post_max_size in bytes + $max_bytes = Num::bytes(ini_get('post_max_size')); + + // Error occurred if method is POST, and content length is too long + return (Arr::get($_SERVER, 'CONTENT_LENGTH') > $max_bytes); + } + + /** + * Process a request to find a matching route + * + * @param object $request Request + * @param array $routes Route + * @return array + */ + public static function process(Request $request, $routes = NULL) + { + // Load routes + $routes = (empty($routes)) ? Route::all() : $routes; + $params = NULL; + + foreach ($routes as $name => $route) + { + // We found something suitable + if ($params = $route->matches($request)) + { + return array( + 'params' => $params, + 'route' => $route, + ); + } + } + + return NULL; + } + + /** + * Parses an accept header and returns an array (type => quality) of the + * accepted types, ordered by quality. + * + * $accept = Request::_parse_accept($header, $defaults); + * + * @param string $header Header to parse + * @param array $accepts Default values + * @return array + */ + protected static function _parse_accept( & $header, array $accepts = NULL) + { + if ( ! empty($header)) + { + // Get all of the types + $types = explode(',', $header); + + foreach ($types as $type) + { + // Split the type into parts + $parts = explode(';', $type); + + // Make the type only the MIME + $type = trim(array_shift($parts)); + + // Default quality is 1.0 + $quality = 1.0; + + foreach ($parts as $part) + { + // Prevent undefined $value notice below + if (strpos($part, '=') === FALSE) + continue; + + // Separate the key and value + list ($key, $value) = explode('=', trim($part)); + + if ($key === 'q') + { + // There is a quality for this type + $quality = (float) trim($value); + } + } + + // Add the accept type and quality + $accepts[$type] = $quality; + } + } + + // Make sure that accepts is an array + $accepts = (array) $accepts; + + // Order by quality + arsort($accepts); + + return $accepts; + } + + /** + * @var string the x-requested-with header which most likely + * will be xmlhttprequest + */ + protected $_requested_with; + + /** + * @var string method: GET, POST, PUT, DELETE, HEAD, etc + */ + protected $_method = 'GET'; + + /** + * @var string protocol: HTTP/1.1, FTP, CLI, etc + */ + protected $_protocol; + + /** + * @var boolean + */ + protected $_secure = FALSE; + + /** + * @var string referring URL + */ + protected $_referrer; + + /** + * @var Route route matched for this request + */ + protected $_route; + + /** + * @var Route array of routes to manually look at instead of the global namespace + */ + protected $_routes; + + /** + * @var Kohana_HTTP_Header headers to sent as part of the request + */ + protected $_header; + + /** + * @var string the body + */ + protected $_body; + + /** + * @var string controller directory + */ + protected $_directory = ''; + + /** + * @var string controller to be executed + */ + protected $_controller; + + /** + * @var string action to be executed in the controller + */ + protected $_action; + + /** + * @var string the URI of the request + */ + protected $_uri; + + /** + * @var boolean external request + */ + protected $_external = FALSE; + + /** + * @var array parameters from the route + */ + protected $_params = array(); + + /** + * @var array query parameters + */ + protected $_get = array(); + + /** + * @var array post parameters + */ + protected $_post = array(); + + /** + * @var array cookies to send with the request + */ + protected $_cookies = array(); + + /** + * @var Kohana_Request_Client + */ + protected $_client; + + /** + * Creates a new request object for the given URI. New requests should be + * created using the [Request::instance] or [Request::factory] methods. + * + * $request = new Request($uri); + * + * If $cache parameter is set, the response for the request will attempt to + * be retrieved from the cache. + * + * @param string $uri URI of the request + * @param array $client_params Array of params to pass to the request client + * @param bool $allow_external Allow external requests? (deprecated in 3.3) + * @param array $injected_routes An array of routes to use, for testing + * @return void + * @throws Request_Exception + * @uses Route::all + * @uses Route::matches + */ + public function __construct($uri, $client_params = array(), $allow_external = TRUE, $injected_routes = array()) + { + $client_params = is_array($client_params) ? $client_params : array(); + + // Initialise the header + $this->_header = new HTTP_Header(array()); + + // Assign injected routes + $this->_routes = $injected_routes; + + // Cleanse query parameters from URI (faster that parse_url()) + $split_uri = explode('?', $uri); + $uri = array_shift($split_uri); + + // Initial request has global $_GET already applied + if (Request::$initial !== NULL) + { + if ($split_uri) + { + parse_str($split_uri[0], $this->_get); + } + } + + // Detect protocol (if present) + // $allow_external = FALSE prevents the default index.php from + // being able to proxy external pages. + if ( ! $allow_external OR strpos($uri, '://') === FALSE) + { + // Remove trailing slashes from the URI + $this->_uri = trim($uri, '/'); + + // Apply the client + $this->_client = new Request_Client_Internal($client_params); + } + else + { + // Create a route + $this->_route = new Route($uri); + + // Store the URI + $this->_uri = $uri; + + // Set the security setting if required + if (strpos($uri, 'https://') === 0) + { + $this->secure(TRUE); + } + + // Set external state + $this->_external = TRUE; + + // Setup the client + $this->_client = Request_Client_External::factory($client_params); + } + } + + /** + * Returns the response as the string representation of a request. + * + * echo $request; + * + * @return string + */ + public function __toString() + { + return $this->render(); + } + + /** + * Sets and gets the uri from the request. + * + * @param string $uri + * @return mixed + */ + public function uri($uri = NULL) + { + if ($uri === NULL) + { + // Act as a getter + return empty($this->_uri) ? '/' : $this->_uri; + } + + // Act as a setter + $this->_uri = $uri; + + return $this; + } + + /** + * Create a URL string from the current request. This is a shortcut for: + * + * echo URL::site($this->request->uri(), $protocol); + * + * @param array $params URI parameters + * @param mixed $protocol protocol string or Request object + * @return string + * @since 3.0.7 + * @uses URL::site + */ + public function url($protocol = NULL) + { + // Create a URI with the current route and convert it to a URL + return URL::site($this->uri(), $protocol); + } + + /** + * Retrieves a value from the route parameters. + * + * $id = $request->param('id'); + * + * @param string $key Key of the value + * @param mixed $default Default value if the key is not set + * @return mixed + */ + public function param($key = NULL, $default = NULL) + { + if ($key === NULL) + { + // Return the full array + return $this->_params; + } + + return isset($this->_params[$key]) ? $this->_params[$key] : $default; + } + + /** + * Sets and gets the referrer from the request. + * + * @param string $referrer + * @return mixed + */ + public function referrer($referrer = NULL) + { + if ($referrer === NULL) + { + // Act as a getter + return $this->_referrer; + } + + // Act as a setter + $this->_referrer = (string) $referrer; + + return $this; + } + + /** + * Sets and gets the route from the request. + * + * @param string $route + * @return mixed + */ + public function route(Route $route = NULL) + { + if ($route === NULL) + { + // Act as a getter + return $this->_route; + } + + // Act as a setter + $this->_route = $route; + + return $this; + } + + /** + * Sets and gets the directory for the controller. + * + * @param string $directory Directory to execute the controller from + * @return mixed + */ + public function directory($directory = NULL) + { + if ($directory === NULL) + { + // Act as a getter + return $this->_directory; + } + + // Act as a setter + $this->_directory = (string) $directory; + + return $this; + } + + /** + * Sets and gets the controller for the matched route. + * + * @param string $controller Controller to execute the action + * @return mixed + */ + public function controller($controller = NULL) + { + if ($controller === NULL) + { + // Act as a getter + return $this->_controller; + } + + // Act as a setter + $this->_controller = (string) $controller; + + return $this; + } + + /** + * Sets and gets the action for the controller. + * + * @param string $action Action to execute the controller from + * @return mixed + */ + public function action($action = NULL) + { + if ($action === NULL) + { + // Act as a getter + return $this->_action; + } + + // Act as a setter + $this->_action = (string) $action; + + return $this; + } + + /** + * Provides access to the [Request_Client]. + * + * @return Request_Client + * @return self + */ + public function client(Request_Client $client = NULL) + { + if ($client === NULL) + return $this->_client; + else + { + $this->_client = $client; + return $this; + } + } + + /** + * Gets and sets the requested with property, which should + * be relative to the x-requested-with pseudo header. + * + * @param string $requested_with Requested with value + * @return mixed + */ + public function requested_with($requested_with = NULL) + { + if ($requested_with === NULL) + { + // Act as a getter + return $this->_requested_with; + } + + // Act as a setter + $this->_requested_with = strtolower($requested_with); + + return $this; + } + + /** + * Processes the request, executing the controller action that handles this + * request, determined by the [Route]. + * + * 1. Before the controller action is called, the [Controller::before] method + * will be called. + * 2. Next the controller action will be called. + * 3. After the controller action is called, the [Controller::after] method + * will be called. + * + * By default, the output from the controller is captured and returned, and + * no headers are sent. + * + * $request->execute(); + * + * @return Response + * @throws Request_Exception + * @throws HTTP_Exception_404 + * @uses [Kohana::$profiling] + * @uses [Profiler] + */ + public function execute() + { + if ( ! $this->_external) + { + $processed = Request::process($this, $this->_routes); + + if ($processed) + { + // Store the matching route + $this->_route = $processed['route']; + $params = $processed['params']; + + // Is this route external? + $this->_external = $this->_route->is_external(); + + if (isset($params['directory'])) + { + // Controllers are in a sub-directory + $this->_directory = $params['directory']; + } + + // Store the controller + $this->_controller = $params['controller']; + + // Store the action + $this->_action = (isset($params['action'])) + ? $params['action'] + : Route::$default_action; + + // These are accessible as public vars and can be overloaded + unset($params['controller'], $params['action'], $params['directory']); + + // Params cannot be changed once matched + $this->_params = $params; + } + } + + if ( ! $this->_route instanceof Route) + { + return HTTP_Exception::factory(404, 'Unable to find a route to match the URI: :uri', array( + ':uri' => $this->_uri, + ))->request($this) + ->get_response(); + } + + if ( ! $this->_client instanceof Request_Client) + { + throw new Request_Exception('Unable to execute :uri without a Kohana_Request_Client', array( + ':uri' => $this->_uri, + )); + } + + return $this->_client->execute($this); + } + + /** + * Returns whether this request is the initial request Kohana received. + * Can be used to test for sub requests. + * + * if ( ! $request->is_initial()) + * // This is a sub request + * + * @return boolean + */ + public function is_initial() + { + return ($this === Request::$initial); + } + + /** + * Readonly access to the [Request::$_external] property. + * + * if ( ! $request->is_external()) + * // This is an internal request + * + * @return boolean + */ + public function is_external() + { + return $this->_external; + } + + /** + * Returns whether this is an ajax request (as used by JS frameworks) + * + * @return boolean + */ + public function is_ajax() + { + return ($this->requested_with() === 'xmlhttprequest'); + } + + /** + * Gets or sets the HTTP method. Usually GET, POST, PUT or DELETE in + * traditional CRUD applications. + * + * @param string $method Method to use for this request + * @return mixed + */ + public function method($method = NULL) + { + if ($method === NULL) + { + // Act as a getter + return $this->_method; + } + + // Act as a setter + $this->_method = strtoupper($method); + + return $this; + } + + /** + * Gets or sets the HTTP protocol. If there is no current protocol set, + * it will use the default set in HTTP::$protocol + * + * @param string $protocol Protocol to set to the request + * @return mixed + */ + public function protocol($protocol = NULL) + { + if ($protocol === NULL) + { + if ($this->_protocol) + return $this->_protocol; + else + return $this->_protocol = HTTP::$protocol; + } + + // Act as a setter + $this->_protocol = strtoupper($protocol); + return $this; + } + + /** + * Getter/Setter to the security settings for this request. This + * method should be treated as immutable. + * + * @param boolean $secure is this request secure? + * @return mixed + */ + public function secure($secure = NULL) + { + if ($secure === NULL) + return $this->_secure; + + // Act as a setter + $this->_secure = (bool) $secure; + return $this; + } + + /** + * Gets or sets HTTP headers oo the request. All headers + * are included immediately after the HTTP protocol definition during + * transmission. This method provides a simple array or key/value + * interface to the headers. + * + * @param mixed $key Key or array of key/value pairs to set + * @param string $value Value to set to the supplied key + * @return mixed + */ + public function headers($key = NULL, $value = NULL) + { + if ($key instanceof HTTP_Header) + { + // Act a setter, replace all headers + $this->_header = $key; + + return $this; + } + + if (is_array($key)) + { + // Act as a setter, replace all headers + $this->_header->exchangeArray($key); + + return $this; + } + + if ($this->_header->count() === 0 AND $this->is_initial()) + { + // Lazy load the request headers + $this->_header = HTTP::request_headers(); + } + + if ($key === NULL) + { + // Act as a getter, return all headers + return $this->_header; + } + elseif ($value === NULL) + { + // Act as a getter, single header + return ($this->_header->offsetExists($key)) ? $this->_header->offsetGet($key) : NULL; + } + + // Act as a setter for a single header + $this->_header[$key] = $value; + + return $this; + } + + /** + * Set and get cookies values for this request. + * + * @param mixed $key Cookie name, or array of cookie values + * @param string $value Value to set to cookie + * @return string + * @return mixed + */ + public function cookie($key = NULL, $value = NULL) + { + if (is_array($key)) + { + // Act as a setter, replace all cookies + $this->_cookies = $key; + return $this; + } + elseif ($key === NULL) + { + // Act as a getter, all cookies + return $this->_cookies; + } + elseif ($value === NULL) + { + // Act as a getting, single cookie + return isset($this->_cookies[$key]) ? $this->_cookies[$key] : NULL; + } + + // Act as a setter for a single cookie + $this->_cookies[$key] = (string) $value; + + return $this; + } + + /** + * Gets or sets the HTTP body of the request. The body is + * included after the header, separated by a single empty new line. + * + * @param string $content Content to set to the object + * @return mixed + */ + public function body($content = NULL) + { + if ($content === NULL) + { + // Act as a getter + return $this->_body; + } + + // Act as a setter + $this->_body = $content; + + return $this; + } + + /** + * Returns the length of the body for use with + * content header + * + * @return integer + */ + public function content_length() + { + return strlen($this->body()); + } + + /** + * Renders the HTTP_Interaction to a string, producing + * + * - Protocol + * - Headers + * - Body + * + * If there are variables set to the `Kohana_Request::$_post` + * they will override any values set to body. + * + * @return string + */ + public function render() + { + if ( ! $post = $this->post()) + { + $body = $this->body(); + } + else + { + $this->headers('content-type', + 'application/x-www-form-urlencoded; charset='.Kohana::$charset); + $body = http_build_query($post, NULL, '&'); + } + + // Set the content length + $this->headers('content-length', (string) $this->content_length()); + + // If Kohana expose, set the user-agent + if (Kohana::$expose) + { + $this->headers('user-agent', Kohana::version()); + } + + // Prepare cookies + if ($this->_cookies) + { + $cookie_string = array(); + + // Parse each + foreach ($this->_cookies as $key => $value) + { + $cookie_string[] = $key.'='.$value; + } + + // Create the cookie string + $this->_header['cookie'] = implode('; ', $cookie_string); + } + + $output = $this->method().' '.$this->uri().' '.$this->protocol()."\r\n"; + $output .= (string) $this->_header; + $output .= $body; + + return $output; + } + + /** + * Gets or sets HTTP query string. + * + * @param mixed $key Key or key value pairs to set + * @param string $value Value to set to a key + * @return mixed + * @uses Arr::path + */ + public function query($key = NULL, $value = NULL) + { + if (is_array($key)) + { + // Act as a setter, replace all query strings + $this->_get = $key; + + return $this; + } + + if ($key === NULL) + { + // Act as a getter, all query strings + return $this->_get; + } + elseif ($value === NULL) + { + // Act as a getter, single query string + return Arr::path($this->_get, $key); + } + + // Act as a setter, single query string + $this->_get[$key] = $value; + + return $this; + } + + /** + * Gets or sets HTTP POST parameters to the request. + * + * @param mixed $key Key or key value pairs to set + * @param string $value Value to set to a key + * @return mixed + * @uses Arr::path + */ + public function post($key = NULL, $value = NULL) + { + if (is_array($key)) + { + // Act as a setter, replace all fields + $this->_post = $key; + + return $this; + } + + if ($key === NULL) + { + // Act as a getter, all fields + return $this->_post; + } + elseif ($value === NULL) + { + // Act as a getter, single field + return Arr::path($this->_post, $key); + } + + // Act as a setter, single field + $this->_post[$key] = $value; + + return $this; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Request/Client.php b/~dev_rating/system/classes/Kohana/Request/Client.php new file mode 100644 index 0000000000000000000000000000000000000000..1190a30fc4fa420e85c5895e56a3e52b3adffe5b --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Client.php @@ -0,0 +1,427 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Request Client. Processes a [Request] and handles [HTTP_Caching] if + * available. Will usually return a [Response] object as a result of the + * request unless an unexpected error occurs. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + * @since 3.1.0 + */ +abstract class Kohana_Request_Client { + + /** + * @var Cache Caching library for request caching + */ + protected $_cache; + + /** + * @var bool Should redirects be followed? + */ + protected $_follow = FALSE; + + /** + * @var array Headers to preserve when following a redirect + */ + protected $_follow_headers = array('Authorization'); + + /** + * @var bool Follow 302 redirect with original request method? + */ + protected $_strict_redirect = TRUE; + + /** + * @var array Callbacks to use when response contains given headers + */ + protected $_header_callbacks = array( + 'Location' => 'Request_Client::on_header_location' + ); + + /** + * @var int Maximum number of requests that header callbacks can trigger before the request is aborted + */ + protected $_max_callback_depth = 5; + + /** + * @var int Tracks the callback depth of the currently executing request + */ + protected $_callback_depth = 1; + + /** + * @var array Arbitrary parameters that are shared with header callbacks through their Request_Client object + */ + protected $_callback_params = array(); + + /** + * Creates a new `Request_Client` object, + * allows for dependency injection. + * + * @param array $params Params + */ + public function __construct(array $params = array()) + { + foreach ($params as $key => $value) + { + if (method_exists($this, $key)) + { + $this->$key($value); + } + } + } + + /** + * Processes the request, executing the controller action that handles this + * request, determined by the [Route]. + * + * 1. Before the controller action is called, the [Controller::before] method + * will be called. + * 2. Next the controller action will be called. + * 3. After the controller action is called, the [Controller::after] method + * will be called. + * + * By default, the output from the controller is captured and returned, and + * no headers are sent. + * + * $request->execute(); + * + * @param Request $request + * @param Response $response + * @return Response + * @throws Kohana_Exception + * @uses [Kohana::$profiling] + * @uses [Profiler] + */ + public function execute(Request $request) + { + // Prevent too much recursion of header callback requests + if ($this->callback_depth() > $this->max_callback_depth()) + throw new Request_Client_Recursion_Exception( + "Could not execute request to :uri - too many recursions after :depth requests", + array( + ':uri' => $request->uri(), + ':depth' => $this->callback_depth() - 1, + )); + + // Execute the request and pass the currently used protocol + $orig_response = $response = Response::factory(array('_protocol' => $request->protocol())); + + if (($cache = $this->cache()) instanceof HTTP_Cache) + return $cache->execute($this, $request, $response); + + $response = $this->execute_request($request, $response); + + // Execute response callbacks + foreach ($this->header_callbacks() as $header => $callback) + { + if ($response->headers($header)) + { + $cb_result = call_user_func($callback, $request, $response, $this); + + if ($cb_result instanceof Request) + { + // If the callback returns a request, automatically assign client params + $this->assign_client_properties($cb_result->client()); + $cb_result->client()->callback_depth($this->callback_depth() + 1); + + // Execute the request + $response = $cb_result->execute(); + } + elseif ($cb_result instanceof Response) + { + // Assign the returned response + $response = $cb_result; + } + + // If the callback has created a new response, do not process any further + if ($response !== $orig_response) + break; + } + } + + return $response; + } + + /** + * Processes the request passed to it and returns the response from + * the URI resource identified. + * + * This method must be implemented by all clients. + * + * @param Request $request request to execute by client + * @param Response $response + * @return Response + * @since 3.2.0 + */ + abstract public function execute_request(Request $request, Response $response); + + /** + * Getter and setter for the internal caching engine, + * used to cache responses if available and valid. + * + * @param HTTP_Cache $cache engine to use for caching + * @return HTTP_Cache + * @return Request_Client + */ + public function cache(HTTP_Cache $cache = NULL) + { + if ($cache === NULL) + return $this->_cache; + + $this->_cache = $cache; + return $this; + } + + /** + * Getter and setter for the follow redirects + * setting. + * + * @param bool $follow Boolean indicating if redirects should be followed + * @return bool + * @return Request_Client + */ + public function follow($follow = NULL) + { + if ($follow === NULL) + return $this->_follow; + + $this->_follow = $follow; + + return $this; + } + + /** + * Getter and setter for the follow redirects + * headers array. + * + * @param array $follow_headers Array of headers to be re-used when following a Location header + * @return array + * @return Request_Client + */ + public function follow_headers($follow_headers = NULL) + { + if ($follow_headers === NULL) + return $this->_follow_headers; + + $this->_follow_headers = $follow_headers; + + return $this; + } + + /** + * Getter and setter for the strict redirects setting + * + * [!!] HTTP/1.1 specifies that a 302 redirect should be followed using the + * original request method. However, the vast majority of clients and servers + * get this wrong, with 302 widely used for 'POST - 302 redirect - GET' patterns. + * By default, Kohana's client is fully compliant with the HTTP spec. Some + * non-compliant third party sites may require that strict_redirect is set + * FALSE to force the client to switch to GET following a 302 response. + * + * @param bool $strict_redirect Boolean indicating if 302 redirects should be followed with the original method + * @return Request_Client + */ + public function strict_redirect($strict_redirect = NULL) + { + if ($strict_redirect === NULL) + return $this->_strict_redirect; + + $this->_strict_redirect = $strict_redirect; + + return $this; + } + + /** + * Getter and setter for the header callbacks array. + * + * Accepts an array with HTTP response headers as keys and a PHP callback + * function as values. These callbacks will be triggered if a response contains + * the given header and can either issue a subsequent request or manipulate + * the response as required. + * + * By default, the [Request_Client::on_header_location] callback is assigned + * to the Location header to support automatic redirect following. + * + * $client->header_callbacks(array( + * 'Location' => 'Request_Client::on_header_location', + * 'WWW-Authenticate' => function($request, $response, $client) {return $new_response;}, + * ); + * + * @param array $header_callbacks Array of callbacks to trigger on presence of given headers + * @return Request_Client + */ + public function header_callbacks($header_callbacks = NULL) + { + if ($header_callbacks === NULL) + return $this->_header_callbacks; + + $this->_header_callbacks = $header_callbacks; + + return $this; + } + + /** + * Getter and setter for the maximum callback depth property. + * + * This protects the main execution from recursive callback execution (eg + * following infinite redirects, conflicts between callbacks causing loops + * etc). Requests will only be allowed to nest to the level set by this + * param before execution is aborted with a Request_Client_Recursion_Exception. + * + * @param int $depth Maximum number of callback requests to execute before aborting + * @return Request_Client|int + */ + public function max_callback_depth($depth = NULL) + { + if ($depth === NULL) + return $this->_max_callback_depth; + + $this->_max_callback_depth = $depth; + + return $this; + } + + /** + * Getter/Setter for the callback depth property, which is used to track + * how many recursions have been executed within the current request execution. + * + * @param int $depth Current recursion depth + * @return Request_Client|int + */ + public function callback_depth($depth = NULL) + { + if ($depth === NULL) + return $this->_callback_depth; + + $this->_callback_depth = $depth; + + return $this; + } + + /** + * Getter/Setter for the callback_params array, which allows additional + * application-specific parameters to be shared with callbacks. + * + * As with other Kohana setter/getters, usage is: + * + * // Set full array + * $client->callback_params(array('foo'=>'bar')); + * + * // Set single key + * $client->callback_params('foo','bar'); + * + * // Get full array + * $params = $client->callback_params(); + * + * // Get single key + * $foo = $client->callback_params('foo'); + * + * @param string|array $param + * @param mixed $value + * @return Request_Client|mixed + */ + public function callback_params($param = NULL, $value = NULL) + { + // Getter for full array + if ($param === NULL) + return $this->_callback_params; + + // Setter for full array + if (is_array($param)) + { + $this->_callback_params = $param; + return $this; + } + // Getter for single value + elseif ($value === NULL) + { + return Arr::get($this->_callback_params, $param); + } + // Setter for single value + else + { + $this->_callback_params[$param] = $value; + return $this; + } + + } + + /** + * Assigns the properties of the current Request_Client to another + * Request_Client instance - used when setting up a subsequent request. + * + * @param Request_Client $client + */ + public function assign_client_properties(Request_Client $client) + { + $client->cache($this->cache()); + $client->follow($this->follow()); + $client->follow_headers($this->follow_headers()); + $client->header_callbacks($this->header_callbacks()); + $client->max_callback_depth($this->max_callback_depth()); + $client->callback_params($this->callback_params()); + } + + /** + * The default handler for following redirects, triggered by the presence of + * a Location header in the response. + * + * The client's follow property must be set TRUE and the HTTP response status + * one of 201, 301, 302, 303 or 307 for the redirect to be followed. + * + * @param Request $request + * @param Response $response + * @param Request_Client $client + */ + public static function on_header_location(Request $request, Response $response, Request_Client $client) + { + // Do we need to follow a Location header ? + if ($client->follow() AND in_array($response->status(), array(201, 301, 302, 303, 307))) + { + // Figure out which method to use for the follow request + switch ($response->status()) + { + default: + case 301: + case 307: + $follow_method = $request->method(); + break; + case 201: + case 303: + $follow_method = Request::GET; + break; + case 302: + // Cater for sites with broken HTTP redirect implementations + if ($client->strict_redirect()) + { + $follow_method = $request->method(); + } + else + { + $follow_method = Request::GET; + } + break; + } + + // Prepare the additional request, copying any follow_headers that were present on the original request + $orig_headers = $request->headers()->getArrayCopy(); + $follow_headers = array_intersect_assoc($orig_headers, array_fill_keys($client->follow_headers(), TRUE)); + + $follow_request = Request::factory($response->headers('Location')) + ->method($follow_method) + ->headers($follow_headers); + + if ($follow_method !== Request::GET) + { + $follow_request->body($request->body()); + } + + return $follow_request; + } + + return NULL; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Request/Client/Curl.php b/~dev_rating/system/classes/Kohana/Request/Client/Curl.php new file mode 100644 index 0000000000000000000000000000000000000000..c5dffa6f06fbf59267bccd75b95d9d6a78a3bcac --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Client/Curl.php @@ -0,0 +1,133 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * [Request_Client_External] Curl driver performs external requests using the + * php-curl extention. This is the default driver for all external requests. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + * @uses [PHP cURL](http://php.net/manual/en/book.curl.php) + */ +class Kohana_Request_Client_Curl extends Request_Client_External { + + /** + * Sends the HTTP message [Request] to a remote server and processes + * the response. + * + * @param Request $request request to send + * @param Response $request response to send + * @return Response + */ + public function _send_message(Request $request, Response $response) + { + // Response headers + $response_headers = array(); + + $options = array(); + + // Set the request method + $options = $this->_set_curl_request_method($request, $options); + + // Set the request body. This is perfectly legal in CURL even + // if using a request other than POST. PUT does support this method + // and DOES NOT require writing data to disk before putting it, if + // reading the PHP docs you may have got that impression. SdF + $options[CURLOPT_POSTFIELDS] = $request->body(); + + // Process headers + if ($headers = $request->headers()) + { + $http_headers = array(); + + foreach ($headers as $key => $value) + { + $http_headers[] = $key.': '.$value; + } + + $options[CURLOPT_HTTPHEADER] = $http_headers; + } + + // Process cookies + if ($cookies = $request->cookie()) + { + $options[CURLOPT_COOKIE] = http_build_query($cookies, NULL, '; '); + } + + // Get any exisiting response headers + $response_header = $response->headers(); + + // Implement the standard parsing parameters + $options[CURLOPT_HEADERFUNCTION] = array($response_header, 'parse_header_string'); + $this->_options[CURLOPT_RETURNTRANSFER] = TRUE; + $this->_options[CURLOPT_HEADER] = FALSE; + + // Apply any additional options set to + $options += $this->_options; + + $uri = $request->uri(); + + if ($query = $request->query()) + { + $uri .= '?'.http_build_query($query, NULL, '&'); + } + + // Open a new remote connection + $curl = curl_init($uri); + + // Set connection options + if ( ! curl_setopt_array($curl, $options)) + { + throw new Request_Exception('Failed to set CURL options, check CURL documentation: :url', + array(':url' => 'http://php.net/curl_setopt_array')); + } + + // Get the response body + $body = curl_exec($curl); + + // Get the response information + $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); + + if ($body === FALSE) + { + $error = curl_error($curl); + } + + // Close the connection + curl_close($curl); + + if (isset($error)) + { + throw new Request_Exception('Error fetching remote :url [ status :code ] :error', + array(':url' => $request->url(), ':code' => $code, ':error' => $error)); + } + + $response->status($code) + ->body($body); + + return $response; + } + + /** + * Sets the appropriate curl request options. Uses the responding option + * for POST or CURLOPT_CUSTOMREQUEST otherwise + * + * @param Request $request + * @param array $options + * @return array + */ + public function _set_curl_request_method(Request $request, array $options) + { + switch ($request->method()) { + case Request::POST: + $options[CURLOPT_POST] = TRUE; + break; + default: + $options[CURLOPT_CUSTOMREQUEST] = $request->method(); + break; + } + return $options; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Request/Client/External.php b/~dev_rating/system/classes/Kohana/Request/Client/External.php new file mode 100644 index 0000000000000000000000000000000000000000..985b915325fb4dbaacd29262433e3e0a85586d46 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Client/External.php @@ -0,0 +1,207 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * [Request_Client_External] provides a wrapper for all external request + * processing. This class should be extended by all drivers handling external + * requests. + * + * Supported out of the box: + * - Curl (default) + * - PECL HTTP + * - Streams + * + * To select a specific external driver to use as the default driver, set the + * following property within the Application bootstrap. Alternatively, the + * client can be injected into the request object. + * + * @example + * + * // In application bootstrap + * Request_Client_External::$client = 'Request_Client_Stream'; + * + * // Add client to request + * $request = Request::factory('http://some.host.tld/foo/bar') + * ->client(Request_Client_External::factory('Request_Client_HTTP)); + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + * @uses [PECL HTTP](http://php.net/manual/en/book.http.php) + */ +abstract class Kohana_Request_Client_External extends Request_Client { + + /** + * Use: + * - Request_Client_Curl (default) + * - Request_Client_HTTP + * - Request_Client_Stream + * + * @var string defines the external client to use by default + */ + public static $client = 'Request_Client_Curl'; + + /** + * Factory method to create a new Request_Client_External object based on + * the client name passed, or defaulting to Request_Client_External::$client + * by default. + * + * Request_Client_External::$client can be set in the application bootstrap. + * + * @param array $params parameters to pass to the client + * @param string $client external client to use + * @return Request_Client_External + * @throws Request_Exception + */ + public static function factory(array $params = array(), $client = NULL) + { + if ($client === NULL) + { + $client = Request_Client_External::$client; + } + + $client = new $client($params); + + if ( ! $client instanceof Request_Client_External) + { + throw new Request_Exception('Selected client is not a Request_Client_External object.'); + } + + return $client; + } + + /** + * @var array curl options + * @link http://www.php.net/manual/function.curl-setopt + * @link http://www.php.net/manual/http.request.options + */ + protected $_options = array(); + + /** + * Processes the request, executing the controller action that handles this + * request, determined by the [Route]. + * + * 1. Before the controller action is called, the [Controller::before] method + * will be called. + * 2. Next the controller action will be called. + * 3. After the controller action is called, the [Controller::after] method + * will be called. + * + * By default, the output from the controller is captured and returned, and + * no headers are sent. + * + * $request->execute(); + * + * @param Request $request A request object + * @param Response $response A response object + * @return Response + * @throws Kohana_Exception + * @uses [Kohana::$profiling] + * @uses [Profiler] + */ + public function execute_request(Request $request, Response $response) + { + if (Kohana::$profiling) + { + // Set the benchmark name + $benchmark = '"'.$request->uri().'"'; + + if ($request !== Request::$initial AND Request::$current) + { + // Add the parent request uri + $benchmark .= ' В« "'.Request::$current->uri().'"'; + } + + // Start benchmarking + $benchmark = Profiler::start('Requests', $benchmark); + } + + // Store the current active request and replace current with new request + $previous = Request::$current; + Request::$current = $request; + + // Resolve the POST fields + if ($post = $request->post()) + { + $request->body(http_build_query($post, NULL, '&')) + ->headers('content-type', 'application/x-www-form-urlencoded; charset='.Kohana::$charset); + } + + // If Kohana expose, set the user-agent + if (Kohana::$expose) + { + $request->headers('user-agent', Kohana::version()); + } + + try + { + $response = $this->_send_message($request, $response); + } + catch (Exception $e) + { + // Restore the previous request + Request::$current = $previous; + + if (isset($benchmark)) + { + // Delete the benchmark, it is invalid + Profiler::delete($benchmark); + } + + // Re-throw the exception + throw $e; + } + + // Restore the previous request + Request::$current = $previous; + + if (isset($benchmark)) + { + // Stop the benchmark + Profiler::stop($benchmark); + } + + // Return the response + return $response; + } + + /** + * Set and get options for this request. + * + * @param mixed $key Option name, or array of options + * @param mixed $value Option value + * @return mixed + * @return Request_Client_External + */ + public function options($key = NULL, $value = NULL) + { + if ($key === NULL) + return $this->_options; + + if (is_array($key)) + { + $this->_options = $key; + } + elseif ($value === NULL) + { + return Arr::get($this->_options, $key); + } + else + { + $this->_options[$key] = $value; + } + + return $this; + } + + /** + * Sends the HTTP message [Request] to a remote server and processes + * the response. + * + * @param Request $request Request to send + * @param Response $response Response to send + * @return Response + */ + abstract protected function _send_message(Request $request, Response $response); + +} diff --git a/~dev_rating/system/classes/Kohana/Request/Client/HTTP.php b/~dev_rating/system/classes/Kohana/Request/Client/HTTP.php new file mode 100644 index 0000000000000000000000000000000000000000..5a9ceb651d8e1a18df4d9822c6dab31467373f62 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Client/HTTP.php @@ -0,0 +1,121 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * [Request_Client_External] HTTP driver performs external requests using the + * php-http extension. To use this driver, ensure the following is completed + * before executing an external request- ideally in the application bootstrap. + * + * @example + * + * // In application bootstrap + * Request_Client_External::$client = 'Request_Client_HTTP'; + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + * @uses [PECL HTTP](http://php.net/manual/en/book.http.php) + */ +class Kohana_Request_Client_HTTP extends Request_Client_External { + + /** + * Creates a new `Request_Client` object, + * allows for dependency injection. + * + * @param array $params Params + * @throws Request_Exception + */ + public function __construct(array $params = array()) + { + // Check that PECL HTTP supports requests + if ( ! http_support(HTTP_SUPPORT_REQUESTS)) + { + throw new Request_Exception('Need HTTP request support!'); + } + + // Carry on + parent::__construct($params); + } + + /** + * @var array curl options + * @link http://www.php.net/manual/function.curl-setopt + */ + protected $_options = array(); + + /** + * Sends the HTTP message [Request] to a remote server and processes + * the response. + * + * @param Request $request request to send + * @param Response $request response to send + * @return Response + */ + public function _send_message(Request $request, Response $response) + { + $http_method_mapping = array( + HTTP_Request::GET => HTTPRequest::METH_GET, + HTTP_Request::HEAD => HTTPRequest::METH_HEAD, + HTTP_Request::POST => HTTPRequest::METH_POST, + HTTP_Request::PUT => HTTPRequest::METH_PUT, + HTTP_Request::DELETE => HTTPRequest::METH_DELETE, + HTTP_Request::OPTIONS => HTTPRequest::METH_OPTIONS, + HTTP_Request::TRACE => HTTPRequest::METH_TRACE, + HTTP_Request::CONNECT => HTTPRequest::METH_CONNECT, + ); + + // Create an http request object + $http_request = new HTTPRequest($request->uri(), $http_method_mapping[$request->method()]); + + if ($this->_options) + { + // Set custom options + $http_request->setOptions($this->_options); + } + + // Set headers + $http_request->setHeaders($request->headers()->getArrayCopy()); + + // Set cookies + $http_request->setCookies($request->cookie()); + + // Set query data (?foo=bar&bar=foo) + $http_request->setQueryData($request->query()); + + // Set the body + if ($request->method() == HTTP_Request::PUT) + { + $http_request->addPutData($request->body()); + } + else + { + $http_request->setBody($request->body()); + } + + try + { + $http_request->send(); + } + catch (HTTPRequestException $e) + { + throw new Request_Exception($e->getMessage()); + } + catch (HTTPMalformedHeaderException $e) + { + throw new Request_Exception($e->getMessage()); + } + catch (HTTPEncodingException $e) + { + throw new Request_Exception($e->getMessage()); + } + + // Build the response + $response->status($http_request->getResponseCode()) + ->headers($http_request->getResponseHeader()) + ->cookie($http_request->getResponseCookies()) + ->body($http_request->getResponseBody()); + + return $response; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Request/Client/Internal.php b/~dev_rating/system/classes/Kohana/Request/Client/Internal.php new file mode 100644 index 0000000000000000000000000000000000000000..88340489ed673cfbc3ea974e184125ef7a1eb336 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Client/Internal.php @@ -0,0 +1,135 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Request Client for internal execution + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + * @since 3.1.0 + */ +class Kohana_Request_Client_Internal extends Request_Client { + + /** + * @var array + */ + protected $_previous_environment; + + /** + * Processes the request, executing the controller action that handles this + * request, determined by the [Route]. + * + * $request->execute(); + * + * @param Request $request + * @return Response + * @throws Kohana_Exception + * @uses [Kohana::$profiling] + * @uses [Profiler] + */ + public function execute_request(Request $request, Response $response) + { + // Create the class prefix + $prefix = 'Controller_'; + + // Directory + $directory = $request->directory(); + + // Controller + $controller = $request->controller(); + + if ($directory) + { + // Add the directory name to the class prefix + $prefix .= str_replace(array('\\', '/'), '_', trim($directory, '/')).'_'; + } + + if (Kohana::$profiling) + { + // Set the benchmark name + $benchmark = '"'.$request->uri().'"'; + + if ($request !== Request::$initial AND Request::$current) + { + // Add the parent request uri + $benchmark .= ' В« "'.Request::$current->uri().'"'; + } + + // Start benchmarking + $benchmark = Profiler::start('Requests', $benchmark); + } + + // Store the currently active request + $previous = Request::$current; + + // Change the current request to this request + Request::$current = $request; + + // Is this the initial request + $initial_request = ($request === Request::$initial); + + try + { + if ( ! class_exists($prefix.$controller)) + { + throw HTTP_Exception::factory(404, + 'The requested URL :uri was not found on this server.', + array(':uri' => $request->uri()) + )->request($request); + } + + // Load the controller using reflection + $class = new ReflectionClass($prefix.$controller); + + if ($class->isAbstract()) + { + throw new Kohana_Exception( + 'Cannot create instances of abstract :controller', + array(':controller' => $prefix.$controller) + ); + } + + // Create a new instance of the controller + $controller = $class->newInstance($request, $response); + + // Run the controller's execute() method + $response = $class->getMethod('execute')->invoke($controller); + + if ( ! $response instanceof Response) + { + // Controller failed to return a Response. + throw new Kohana_Exception('Controller failed to return a Response'); + } + } + catch (HTTP_Exception $e) + { + // Store the request context in the Exception + if ($e->request() === NULL) + { + $e->request($request); + } + + // Get the response via the Exception + $response = $e->get_response(); + } + catch (Exception $e) + { + // Generate an appropriate Response object + $response = Kohana_Exception::_handler($e); + } + + // Restore the previous request + Request::$current = $previous; + + if (isset($benchmark)) + { + // Stop the benchmark + Profiler::stop($benchmark); + } + + // Return the response + return $response; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Request/Client/Recursion/Exception.php b/~dev_rating/system/classes/Kohana/Request/Client/Recursion/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..47ae2e397f274b4d61b80bca99dbd7db0b7f0120 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Client/Recursion/Exception.php @@ -0,0 +1,9 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Request_Client_Recursion_Exception extends Kohana_Exception {} diff --git a/~dev_rating/system/classes/Kohana/Request/Client/Stream.php b/~dev_rating/system/classes/Kohana/Request/Client/Stream.php new file mode 100644 index 0000000000000000000000000000000000000000..b53fd45ab0a077d1e93e7e49e4d53c318d3bf0a5 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Client/Stream.php @@ -0,0 +1,109 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * [Request_Client_External] Stream driver performs external requests using php + * sockets. To use this driver, ensure the following is completed + * before executing an external request- ideally in the application bootstrap. + * + * @example + * + * // In application bootstrap + * Request_Client_External::$client = 'Request_Client_Stream'; + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + * @uses [PHP Streams](http://php.net/manual/en/book.stream.php) + */ +class Kohana_Request_Client_Stream extends Request_Client_External { + + /** + * Sends the HTTP message [Request] to a remote server and processes + * the response. + * + * @param Request $request request to send + * @param Response $request response to send + * @return Response + * @uses [PHP cURL](http://php.net/manual/en/book.curl.php) + */ + public function _send_message(Request $request, Response $response) + { + // Calculate stream mode + $mode = ($request->method() === HTTP_Request::GET) ? 'r' : 'r+'; + + // Process cookies + if ($cookies = $request->cookie()) + { + $request->headers('cookie', http_build_query($cookies, NULL, '; ')); + } + + // Get the message body + $body = $request->body(); + + if (is_resource($body)) + { + $body = stream_get_contents($body); + } + + // Set the content length + $request->headers('content-length', (string) strlen($body)); + + list($protocol) = explode('/', $request->protocol()); + + // Create the context + $options = array( + strtolower($protocol) => array( + 'method' => $request->method(), + 'header' => (string) $request->headers(), + 'content' => $body + ) + ); + + // Create the context stream + $context = stream_context_create($options); + + stream_context_set_option($context, $this->_options); + + $uri = $request->uri(); + + if ($query = $request->query()) + { + $uri .= '?'.http_build_query($query, NULL, '&'); + } + + $stream = fopen($uri, $mode, FALSE, $context); + + $meta_data = stream_get_meta_data($stream); + + // Get the HTTP response code + $http_response = array_shift($meta_data['wrapper_data']); + + if (preg_match_all('/(\w+\/\d\.\d) (\d{3})/', $http_response, $matches) !== FALSE) + { + $protocol = $matches[1][0]; + $status = (int) $matches[2][0]; + } + else + { + $protocol = NULL; + $status = NULL; + } + + // Get any exisiting response headers + $response_header = $response->headers(); + + // Process headers + array_map(array($response_header, 'parse_header_string'), array(), $meta_data['wrapper_data']); + + $response->status($status) + ->protocol($protocol) + ->body(stream_get_contents($stream)); + + // Close the stream after use + fclose($stream); + + return $response; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Request/Exception.php b/~dev_rating/system/classes/Kohana/Request/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..69ff9a4f2b2284aaea744d2ee179fa5d362f8609 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Request/Exception.php @@ -0,0 +1,9 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Request_Exception extends Kohana_Exception {} diff --git a/~dev_rating/system/classes/Kohana/Response.php b/~dev_rating/system/classes/Kohana/Response.php new file mode 100644 index 0000000000000000000000000000000000000000..68699791573c124e7e94ac01dfe001faa93fc7a3 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Response.php @@ -0,0 +1,714 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Response wrapper. Created as the result of any [Request] execution + * or utility method (i.e. Redirect). Implements standard HTTP + * response format. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + * @since 3.1.0 + */ +class Kohana_Response implements HTTP_Response { + + /** + * Factory method to create a new [Response]. Pass properties + * in using an associative array. + * + * // Create a new response + * $response = Response::factory(); + * + * // Create a new response with headers + * $response = Response::factory(array('status' => 200)); + * + * @param array $config Setup the response object + * @return Response + */ + public static function factory(array $config = array()) + { + return new Response($config); + } + + // HTTP status codes and messages + public static $messages = array( + // Informational 1xx + 100 => 'Continue', + 101 => 'Switching Protocols', + + // Success 2xx + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + + // Redirection 3xx + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', // 1.1 + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + // 306 is deprecated but reserved + 307 => 'Temporary Redirect', + + // Client Error 4xx + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + + // Server Error 5xx + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported', + 509 => 'Bandwidth Limit Exceeded' + ); + + /** + * @var integer The response http status + */ + protected $_status = 200; + + /** + * @var HTTP_Header Headers returned in the response + */ + protected $_header; + + /** + * @var string The response body + */ + protected $_body = ''; + + /** + * @var array Cookies to be returned in the response + */ + protected $_cookies = array(); + + /** + * @var string The response protocol + */ + protected $_protocol; + + /** + * Sets up the response object + * + * @param array $config Setup the response object + * @return void + */ + public function __construct(array $config = array()) + { + $this->_header = new HTTP_Header; + + foreach ($config as $key => $value) + { + if (property_exists($this, $key)) + { + if ($key == '_header') + { + $this->headers($value); + } + else + { + $this->$key = $value; + } + } + } + } + + /** + * Outputs the body when cast to string + * + * @return string + */ + public function __toString() + { + return $this->_body; + } + + /** + * Gets or sets the body of the response + * + * @return mixed + */ + public function body($content = NULL) + { + if ($content === NULL) + return $this->_body; + + $this->_body = (string) $content; + return $this; + } + + /** + * Gets or sets the HTTP protocol. The standard protocol to use + * is `HTTP/1.1`. + * + * @param string $protocol Protocol to set to the request/response + * @return mixed + */ + public function protocol($protocol = NULL) + { + if ($protocol) + { + $this->_protocol = strtoupper($protocol); + return $this; + } + + if ($this->_protocol === NULL) + { + $this->_protocol = HTTP::$protocol; + } + + return $this->_protocol; + } + + /** + * Sets or gets the HTTP status from this response. + * + * // Set the HTTP status to 404 Not Found + * $response = Response::factory() + * ->status(404); + * + * // Get the current status + * $status = $response->status(); + * + * @param integer $status Status to set to this response + * @return mixed + */ + public function status($status = NULL) + { + if ($status === NULL) + { + return $this->_status; + } + elseif (array_key_exists($status, Response::$messages)) + { + $this->_status = (int) $status; + return $this; + } + else + { + throw new Kohana_Exception(__METHOD__.' unknown status value : :value', array(':value' => $status)); + } + } + + /** + * Gets and sets headers to the [Response], allowing chaining + * of response methods. If chaining isn't required, direct + * access to the property should be used instead. + * + * // Get a header + * $accept = $response->headers('Content-Type'); + * + * // Set a header + * $response->headers('Content-Type', 'text/html'); + * + * // Get all headers + * $headers = $response->headers(); + * + * // Set multiple headers + * $response->headers(array('Content-Type' => 'text/html', 'Cache-Control' => 'no-cache')); + * + * @param mixed $key + * @param string $value + * @return mixed + */ + public function headers($key = NULL, $value = NULL) + { + if ($key === NULL) + { + return $this->_header; + } + elseif (is_array($key)) + { + $this->_header->exchangeArray($key); + return $this; + } + elseif ($value === NULL) + { + return Arr::get($this->_header, $key); + } + else + { + $this->_header[$key] = $value; + return $this; + } + } + + /** + * Returns the length of the body for use with + * content header + * + * @return integer + */ + public function content_length() + { + return strlen($this->body()); + } + + /** + * Set and get cookies values for this response. + * + * // Get the cookies set to the response + * $cookies = $response->cookie(); + * + * // Set a cookie to the response + * $response->cookie('session', array( + * 'value' => $value, + * 'expiration' => 12352234 + * )); + * + * @param mixed $key cookie name, or array of cookie values + * @param string $value value to set to cookie + * @return string + * @return void + * @return [Response] + */ + public function cookie($key = NULL, $value = NULL) + { + // Handle the get cookie calls + if ($key === NULL) + return $this->_cookies; + elseif ( ! is_array($key) AND ! $value) + return Arr::get($this->_cookies, $key); + + // Handle the set cookie calls + if (is_array($key)) + { + reset($key); + while (list($_key, $_value) = each($key)) + { + $this->cookie($_key, $_value); + } + } + else + { + if ( ! is_array($value)) + { + $value = array( + 'value' => $value, + 'expiration' => Cookie::$expiration + ); + } + elseif ( ! isset($value['expiration'])) + { + $value['expiration'] = Cookie::$expiration; + } + + $this->_cookies[$key] = $value; + } + + return $this; + } + + /** + * Deletes a cookie set to the response + * + * @param string $name + * @return Response + */ + public function delete_cookie($name) + { + unset($this->_cookies[$name]); + return $this; + } + + /** + * Deletes all cookies from this response + * + * @return Response + */ + public function delete_cookies() + { + $this->_cookies = array(); + return $this; + } + + /** + * Sends the response status and all set headers. + * + * @param boolean $replace replace existing headers + * @param callback $callback function to handle header output + * @return mixed + */ + public function send_headers($replace = FALSE, $callback = NULL) + { + return $this->_header->send_headers($this, $replace, $callback); + } + + /** + * Send file download as the response. All execution will be halted when + * this method is called! Use TRUE for the filename to send the current + * response as the file content. The third parameter allows the following + * options to be set: + * + * Type | Option | Description | Default Value + * ----------|-----------|------------------------------------|-------------- + * `boolean` | inline | Display inline instead of download | `FALSE` + * `string` | mime_type | Manual mime type | Automatic + * `boolean` | delete | Delete the file after sending | `FALSE` + * + * Download a file that already exists: + * + * $request->send_file('media/packages/kohana.zip'); + * + * Download generated content as a file: + * + * $request->response($content); + * $request->send_file(TRUE, $filename); + * + * [!!] No further processing can be done after this method is called! + * + * @param string $filename filename with path, or TRUE for the current response + * @param string $download downloaded file name + * @param array $options additional options + * @return void + * @throws Kohana_Exception + * @uses File::mime_by_ext + * @uses File::mime + * @uses Request::send_headers + */ + public function send_file($filename, $download = NULL, array $options = NULL) + { + if ( ! empty($options['mime_type'])) + { + // The mime-type has been manually set + $mime = $options['mime_type']; + } + + if ($filename === TRUE) + { + if (empty($download)) + { + throw new Kohana_Exception('Download name must be provided for streaming files'); + } + + // Temporary files will automatically be deleted + $options['delete'] = FALSE; + + if ( ! isset($mime)) + { + // Guess the mime using the file extension + $mime = File::mime_by_ext(strtolower(pathinfo($download, PATHINFO_EXTENSION))); + } + + // Force the data to be rendered if + $file_data = (string) $this->_body; + + // Get the content size + $size = strlen($file_data); + + // Create a temporary file to hold the current response + $file = tmpfile(); + + // Write the current response into the file + fwrite($file, $file_data); + + // File data is no longer needed + unset($file_data); + } + else + { + // Get the complete file path + $filename = realpath($filename); + + if (empty($download)) + { + // Use the file name as the download file name + $download = pathinfo($filename, PATHINFO_BASENAME); + } + + // Get the file size + $size = filesize($filename); + + if ( ! isset($mime)) + { + // Get the mime type from the extension of the download file + $mime = File::mime_by_ext(pathinfo($download, PATHINFO_EXTENSION)); + } + + // Open the file for reading + $file = fopen($filename, 'rb'); + } + + if ( ! is_resource($file)) + { + throw new Kohana_Exception('Could not read file to send: :file', array( + ':file' => $download, + )); + } + + // Inline or download? + $disposition = empty($options['inline']) ? 'attachment' : 'inline'; + + // Calculate byte range to download. + list($start, $end) = $this->_calculate_byte_range($size); + + if ( ! empty($options['resumable'])) + { + if ($start > 0 OR $end < ($size - 1)) + { + // Partial Content + $this->_status = 206; + } + + // Range of bytes being sent + $this->_header['content-range'] = 'bytes '.$start.'-'.$end.'/'.$size; + $this->_header['accept-ranges'] = 'bytes'; + } + + // Set the headers for a download + $this->_header['content-disposition'] = $disposition.'; filename="'.$download.'"'; + $this->_header['content-type'] = $mime; + $this->_header['content-length'] = (string) (($end - $start) + 1); + + if (Request::user_agent('browser') === 'Internet Explorer') + { + // Naturally, IE does not act like a real browser... + if (Request::$initial->secure()) + { + // http://support.microsoft.com/kb/316431 + $this->_header['pragma'] = $this->_header['cache-control'] = 'public'; + } + + if (version_compare(Request::user_agent('version'), '8.0', '>=')) + { + // http://ajaxian.com/archives/ie-8-security + $this->_header['x-content-type-options'] = 'nosniff'; + } + } + + // Send all headers now + $this->send_headers(); + + while (ob_get_level()) + { + // Flush all output buffers + ob_end_flush(); + } + + // Manually stop execution + ignore_user_abort(TRUE); + + if ( ! Kohana::$safe_mode) + { + // Keep the script running forever + set_time_limit(0); + } + + // Send data in 16kb blocks + $block = 1024 * 16; + + fseek($file, $start); + + while ( ! feof($file) AND ($pos = ftell($file)) <= $end) + { + if (connection_aborted()) + break; + + if ($pos + $block > $end) + { + // Don't read past the buffer. + $block = $end - $pos + 1; + } + + // Output a block of the file + echo fread($file, $block); + + // Send the data now + flush(); + } + + // Close the file + fclose($file); + + if ( ! empty($options['delete'])) + { + try + { + // Attempt to remove the file + unlink($filename); + } + catch (Exception $e) + { + // Create a text version of the exception + $error = Kohana_Exception::text($e); + + if (is_object(Kohana::$log)) + { + // Add this exception to the log + Kohana::$log->add(Log::ERROR, $error); + + // Make sure the logs are written + Kohana::$log->write(); + } + + // Do NOT display the exception, it will corrupt the output! + } + } + + // Stop execution + exit; + } + + /** + * Renders the HTTP_Interaction to a string, producing + * + * - Protocol + * - Headers + * - Body + * + * @return string + */ + public function render() + { + if ( ! $this->_header->offsetExists('content-type')) + { + // Add the default Content-Type header if required + $this->_header['content-type'] = Kohana::$content_type.'; charset='.Kohana::$charset; + } + + // Set the content length + $this->headers('content-length', (string) $this->content_length()); + + // If Kohana expose, set the user-agent + if (Kohana::$expose) + { + $this->headers('user-agent', Kohana::version()); + } + + // Prepare cookies + if ($this->_cookies) + { + if (extension_loaded('http')) + { + $this->_header['set-cookie'] = http_build_cookie($this->_cookies); + } + else + { + $cookies = array(); + + // Parse each + foreach ($this->_cookies as $key => $value) + { + $string = $key.'='.$value['value'].'; expires='.date('l, d M Y H:i:s T', $value['expiration']); + $cookies[] = $string; + } + + // Create the cookie string + $this->_header['set-cookie'] = $cookies; + } + } + + $output = $this->_protocol.' '.$this->_status.' '.Response::$messages[$this->_status]."\r\n"; + $output .= (string) $this->_header; + $output .= $this->_body; + + return $output; + } + + /** + * Generate ETag + * Generates an ETag from the response ready to be returned + * + * @throws Request_Exception + * @return String Generated ETag + */ + public function generate_etag() + { + if ($this->_body === '') + { + throw new Request_Exception('No response yet associated with request - cannot auto generate resource ETag'); + } + + // Generate a unique hash for the response + return '"'.sha1($this->render()).'"'; + } + + /** + * Parse the byte ranges from the HTTP_RANGE header used for + * resumable downloads. + * + * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35 + * @return array|FALSE + */ + protected function _parse_byte_range() + { + if ( ! isset($_SERVER['HTTP_RANGE'])) + { + return FALSE; + } + + // TODO, speed this up with the use of string functions. + preg_match_all('/(-?[0-9]++(?:-(?![0-9]++))?)(?:-?([0-9]++))?/', $_SERVER['HTTP_RANGE'], $matches, PREG_SET_ORDER); + + return $matches[0]; + } + + /** + * Calculates the byte range to use with send_file. If HTTP_RANGE doesn't + * exist then the complete byte range is returned + * + * @param integer $size + * @return array + */ + protected function _calculate_byte_range($size) + { + // Defaults to start with when the HTTP_RANGE header doesn't exist. + $start = 0; + $end = $size - 1; + + if ($range = $this->_parse_byte_range()) + { + // We have a byte range from HTTP_RANGE + $start = $range[1]; + + if ($start[0] === '-') + { + // A negative value means we start from the end, so -500 would be the + // last 500 bytes. + $start = $size - abs($start); + } + + if (isset($range[2])) + { + // Set the end range + $end = $range[2]; + } + } + + // Normalize values. + $start = abs(intval($start)); + + // Keep the the end value in bounds and normalize it. + $end = min(abs(intval($end)), $size - 1); + + // Keep the start in bounds. + $start = ($end < $start) ? 0 : max($start, 0); + + return array($start, $end); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Route.php b/~dev_rating/system/classes/Kohana/Route.php new file mode 100644 index 0000000000000000000000000000000000000000..718bf179685b04e1752df27aa661b0de410e95c2 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Route.php @@ -0,0 +1,604 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Routes are used to determine the controller and action for a requested URI. + * Every route generates a regular expression which is used to match a URI + * and a route. Routes may also contain keys which can be used to set the + * controller, action, and parameters. + * + * Each <key> will be translated to a regular expression using a default + * regular expression pattern. You can override the default pattern by providing + * a pattern for the key: + * + * // This route will only match when <id> is a digit + * Route::set('user', 'user/<action>/<id>', array('id' => '\d+')); + * + * // This route will match when <path> is anything + * Route::set('file', '<path>', array('path' => '.*')); + * + * It is also possible to create optional segments by using parentheses in + * the URI definition: + * + * // This is the standard default route, and no keys are required + * Route::set('default', '(<controller>(/<action>(/<id>)))'); + * + * // This route only requires the <file> key + * Route::set('file', '(<path>/)<file>(.<format>)', array('path' => '.*', 'format' => '\w+')); + * + * Routes also provide a way to generate URIs (called "reverse routing"), which + * makes them an extremely powerful and flexible way to generate internal links. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Route { + + // Matches a URI group and captures the contents + const REGEX_GROUP = '\(((?:(?>[^()]+)|(?R))*)\)'; + + // Defines the pattern of a <segment> + const REGEX_KEY = '<([a-zA-Z0-9_]++)>'; + + // What can be part of a <segment> value + const REGEX_SEGMENT = '[^/.,;?\n]++'; + + // What must be escaped in the route regex + const REGEX_ESCAPE = '[.\\+*?[^\\]${}=!|]'; + + /** + * @var string default protocol for all routes + * + * @example 'http://' + */ + public static $default_protocol = 'http://'; + + /** + * @var array list of valid localhost entries + */ + public static $localhosts = array(FALSE, '', 'local', 'localhost'); + + /** + * @var string default action for all routes + */ + public static $default_action = 'index'; + + /** + * @var bool Indicates whether routes are cached + */ + public static $cache = FALSE; + + /** + * @var array + */ + protected static $_routes = array(); + + /** + * Stores a named route and returns it. The "action" will always be set to + * "index" if it is not defined. + * + * Route::set('default', '(<controller>(/<action>(/<id>)))') + * ->defaults(array( + * 'controller' => 'welcome', + * )); + * + * @param string $name route name + * @param string $uri URI pattern + * @param array $regex regex patterns for route keys + * @return Route + */ + public static function set($name, $uri = NULL, $regex = NULL) + { + return Route::$_routes[$name] = new Route($uri, $regex); + } + + /** + * Retrieves a named route. + * + * $route = Route::get('default'); + * + * @param string $name route name + * @return Route + * @throws Kohana_Exception + */ + public static function get($name) + { + if ( ! isset(Route::$_routes[$name])) + { + throw new Kohana_Exception('The requested route does not exist: :route', + array(':route' => $name)); + } + + return Route::$_routes[$name]; + } + + /** + * Retrieves all named routes. + * + * $routes = Route::all(); + * + * @return array routes by name + */ + public static function all() + { + return Route::$_routes; + } + + /** + * Get the name of a route. + * + * $name = Route::name($route) + * + * @param Route $route instance + * @return string + */ + public static function name(Route $route) + { + return array_search($route, Route::$_routes); + } + + /** + * Saves or loads the route cache. If your routes will remain the same for + * a long period of time, use this to reload the routes from the cache + * rather than redefining them on every page load. + * + * if ( ! Route::cache()) + * { + * // Set routes here + * Route::cache(TRUE); + * } + * + * @param boolean $save cache the current routes + * @param boolean $append append, rather than replace, cached routes when loading + * @return void when saving routes + * @return boolean when loading routes + * @uses Kohana::cache + */ + public static function cache($save = FALSE, $append = FALSE) + { + if ($save === TRUE) + { + try + { + // Cache all defined routes + Kohana::cache('Route::cache()', Route::$_routes); + } + catch (Exception $e) + { + // We most likely have a lambda in a route, which cannot be cached + throw new Kohana_Exception('One or more routes could not be cached (:message)', array( + ':message' => $e->getMessage(), + ), 0, $e); + } + } + else + { + if ($routes = Kohana::cache('Route::cache()')) + { + if ($append) + { + // Append cached routes + Route::$_routes += $routes; + } + else + { + // Replace existing routes + Route::$_routes = $routes; + } + + // Routes were cached + return Route::$cache = TRUE; + } + else + { + // Routes were not cached + return Route::$cache = FALSE; + } + } + } + + /** + * Create a URL from a route name. This is a shortcut for: + * + * echo URL::site(Route::get($name)->uri($params), $protocol); + * + * @param string $name route name + * @param array $params URI parameters + * @param mixed $protocol protocol string or boolean, adds protocol and domain + * @return string + * @since 3.0.7 + * @uses URL::site + */ + public static function url($name, array $params = NULL, $protocol = NULL) + { + $route = Route::get($name); + + // Create a URI with the route and convert it to a URL + if ($route->is_external()) + return $route->uri($params); + else + return URL::site($route->uri($params), $protocol); + } + + /** + * Returns the compiled regular expression for the route. This translates + * keys and optional groups to a proper PCRE regular expression. + * + * $compiled = Route::compile( + * '<controller>(/<action>(/<id>))', + * array( + * 'controller' => '[a-z]+', + * 'id' => '\d+', + * ) + * ); + * + * @return string + * @uses Route::REGEX_ESCAPE + * @uses Route::REGEX_SEGMENT + */ + public static function compile($uri, array $regex = NULL) + { + // The URI should be considered literal except for keys and optional parts + // Escape everything preg_quote would escape except for : ( ) < > + $expression = preg_replace('#'.Route::REGEX_ESCAPE.'#', '\\\\$0', $uri); + + if (strpos($expression, '(') !== FALSE) + { + // Make optional parts of the URI non-capturing and optional + $expression = str_replace(array('(', ')'), array('(?:', ')?'), $expression); + } + + // Insert default regex for keys + $expression = str_replace(array('<', '>'), array('(?P<', '>'.Route::REGEX_SEGMENT.')'), $expression); + + if ($regex) + { + $search = $replace = array(); + foreach ($regex as $key => $value) + { + $search[] = "<$key>".Route::REGEX_SEGMENT; + $replace[] = "<$key>$value"; + } + + // Replace the default regex with the user-specified regex + $expression = str_replace($search, $replace, $expression); + } + + return '#^'.$expression.'$#uD'; + } + + /** + * @var array route filters + */ + protected $_filters = array(); + + /** + * @var string route URI + */ + protected $_uri = ''; + + /** + * @var array + */ + protected $_regex = array(); + + /** + * @var array + */ + protected $_defaults = array('action' => 'index', 'host' => FALSE); + + /** + * @var string + */ + protected $_route_regex; + + /** + * Creates a new route. Sets the URI and regular expressions for keys. + * Routes should always be created with [Route::set] or they will not + * be properly stored. + * + * $route = new Route($uri, $regex); + * + * The $uri parameter should be a string for basic regex matching. + * + * + * @param string $uri route URI pattern + * @param array $regex key patterns + * @return void + * @uses Route::_compile + */ + public function __construct($uri = NULL, $regex = NULL) + { + if ($uri === NULL) + { + // Assume the route is from cache + return; + } + + if ( ! empty($uri)) + { + $this->_uri = $uri; + } + + if ( ! empty($regex)) + { + $this->_regex = $regex; + } + + // Store the compiled regex locally + $this->_route_regex = Route::compile($uri, $regex); + } + + /** + * Provides default values for keys when they are not present. The default + * action will always be "index" unless it is overloaded here. + * + * $route->defaults(array( + * 'controller' => 'welcome', + * 'action' => 'index' + * )); + * + * If no parameter is passed, this method will act as a getter. + * + * @param array $defaults key values + * @return $this or array + */ + public function defaults(array $defaults = NULL) + { + if ($defaults === NULL) + { + return $this->_defaults; + } + + $this->_defaults = $defaults; + + return $this; + } + + /** + * Filters to be run before route parameters are returned: + * + * $route->filter( + * function(Route $route, $params, Request $request) + * { + * if ($request->method() !== HTTP_Request::POST) + * { + * return FALSE; // This route only matches POST requests + * } + * if ($params AND $params['controller'] === 'welcome') + * { + * $params['controller'] = 'home'; + * } + * + * return $params; + * } + * ); + * + * To prevent a route from matching, return `FALSE`. To replace the route + * parameters, return an array. + * + * [!!] Default parameters are added before filters are called! + * + * @throws Kohana_Exception + * @param array $callback callback string, array, or closure + * @return $this + */ + public function filter($callback) + { + if ( ! is_callable($callback)) + { + throw new Kohana_Exception('Invalid Route::callback specified'); + } + + $this->_filters[] = $callback; + + return $this; + } + + /** + * Tests if the route matches a given Request. A successful match will return + * all of the routed parameters as an array. A failed match will return + * boolean FALSE. + * + * // Params: controller = users, action = edit, id = 10 + * $params = $route->matches(Request::factory('users/edit/10')); + * + * This method should almost always be used within an if/else block: + * + * if ($params = $route->matches($request)) + * { + * // Parse the parameters + * } + * + * @param Request $request Request object to match + * @return array on success + * @return FALSE on failure + */ + public function matches(Request $request) + { + // Get the URI from the Request + $uri = trim($request->uri(), '/'); + + if ( ! preg_match($this->_route_regex, $uri, $matches)) + return FALSE; + + $params = array(); + foreach ($matches as $key => $value) + { + if (is_int($key)) + { + // Skip all unnamed keys + continue; + } + + // Set the value for all matched keys + $params[$key] = $value; + } + + foreach ($this->_defaults as $key => $value) + { + if ( ! isset($params[$key]) OR $params[$key] === '') + { + // Set default values for any key that was not matched + $params[$key] = $value; + } + } + + if ( ! empty($params['controller'])) + { + // PSR-0: Replace underscores with spaces, run ucwords, then replace underscore + $params['controller'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $params['controller']))); + } + + if ( ! empty($params['directory'])) + { + // PSR-0: Replace underscores with spaces, run ucwords, then replace underscore + $params['directory'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $params['directory']))); + } + + if ($this->_filters) + { + foreach ($this->_filters as $callback) + { + // Execute the filter giving it the route, params, and request + $return = call_user_func($callback, $this, $params, $request); + + if ($return === FALSE) + { + // Filter has aborted the match + return FALSE; + } + elseif (is_array($return)) + { + // Filter has modified the parameters + $params = $return; + } + } + } + + return $params; + } + + /** + * Returns whether this route is an external route + * to a remote controller. + * + * @return boolean + */ + public function is_external() + { + return ! in_array(Arr::get($this->_defaults, 'host', FALSE), Route::$localhosts); + } + + /** + * Generates a URI for the current route based on the parameters given. + * + * // Using the "default" route: "users/profile/10" + * $route->uri(array( + * 'controller' => 'users', + * 'action' => 'profile', + * 'id' => '10' + * )); + * + * @param array $params URI parameters + * @return string + * @throws Kohana_Exception + * @uses Route::REGEX_GROUP + * @uses Route::REGEX_KEY + */ + public function uri(array $params = NULL) + { + $defaults = $this->_defaults; + + /** + * Recursively compiles a portion of a URI specification by replacing + * the specified parameters and any optional parameters that are needed. + * + * @param string $portion Part of the URI specification + * @param boolean $required Whether or not parameters are required (initially) + * @return array Tuple of the compiled portion and whether or not it contained specified parameters + */ + $compile = function ($portion, $required) use (&$compile, $defaults, $params) + { + $missing = array(); + + $pattern = '#(?:'.Route::REGEX_KEY.'|'.Route::REGEX_GROUP.')#'; + $result = preg_replace_callback($pattern, function ($matches) use (&$compile, $defaults, &$missing, $params, &$required) + { + if ($matches[0][0] === '<') + { + // Parameter, unwrapped + $param = $matches[1]; + + if (isset($params[$param])) + { + // This portion is required when a specified + // parameter does not match the default + $required = ($required OR ! isset($defaults[$param]) OR $params[$param] !== $defaults[$param]); + + // Add specified parameter to this result + return $params[$param]; + } + + // Add default parameter to this result + if (isset($defaults[$param])) + return $defaults[$param]; + + // This portion is missing a parameter + $missing[] = $param; + } + else + { + // Group, unwrapped + $result = $compile($matches[2], FALSE); + + if ($result[1]) + { + // This portion is required when it contains a group + // that is required + $required = TRUE; + + // Add required groups to this result + return $result[0]; + } + + // Do not add optional groups to this result + } + }, $portion); + + if ($required AND $missing) + { + throw new Kohana_Exception( + 'Required route parameter not passed: :param', + array(':param' => reset($missing)) + ); + } + + return array($result, $required); + }; + + list($uri) = $compile($this->_uri, TRUE); + + // Trim all extra slashes from the URI + $uri = preg_replace('#//+#', '/', rtrim($uri, '/')); + + if ($this->is_external()) + { + // Need to add the host to the URI + $host = $this->_defaults['host']; + + if (strpos($host, '://') === FALSE) + { + // Use the default defined protocol + $host = Route::$default_protocol.$host; + } + + // Clean up the host and prepend it to the URI + $uri = rtrim($host, '/').'/'.$uri; + } + + return $uri; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Security.php b/~dev_rating/system/classes/Kohana/Security.php new file mode 100644 index 0000000000000000000000000000000000000000..b8f66c635f66de02f6053722e395e559118865c4 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Security.php @@ -0,0 +1,113 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Security helper class. + * + * @package Kohana + * @category Security + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Security { + + /** + * @var string key name used for token storage + */ + public static $token_name = 'security_token'; + + /** + * Generate and store a unique token which can be used to help prevent + * [CSRF](http://wikipedia.org/wiki/Cross_Site_Request_Forgery) attacks. + * + * $token = Security::token(); + * + * You can insert this token into your forms as a hidden field: + * + * echo Form::hidden('csrf', Security::token()); + * + * And then check it when using [Validation]: + * + * $array->rules('csrf', array( + * 'not_empty' => NULL, + * 'Security::check' => NULL, + * )); + * + * This provides a basic, but effective, method of preventing CSRF attacks. + * + * @param boolean $new force a new token to be generated? + * @return string + * @uses Session::instance + */ + public static function token($new = FALSE) + { + $session = Session::instance(); + + // Get the current token + $token = $session->get(Security::$token_name); + + if ($new === TRUE OR ! $token) + { + // Generate a new unique token + if (function_exists('openssl_random_pseudo_bytes')) + { + // Generate a random pseudo bytes token if openssl_random_pseudo_bytes is available + // This is more secure than uniqid, because uniqid relies on microtime, which is predictable + $token = base64_encode(openssl_random_pseudo_bytes(32)); + } + else + { + // Otherwise, fall back to a hashed uniqid + $token = sha1(uniqid(NULL, TRUE)); + } + + // Store the new token + $session->set(Security::$token_name, $token); + } + + return $token; + } + + /** + * Check that the given token matches the currently stored security token. + * + * if (Security::check($token)) + * { + * // Pass + * } + * + * @param string $token token to check + * @return boolean + * @uses Security::token + */ + public static function check($token) + { + return Security::token() === $token; + } + + /** + * Remove image tags from a string. + * + * $str = Security::strip_image_tags($str); + * + * @param string $str string to sanitize + * @return string + */ + public static function strip_image_tags($str) + { + return preg_replace('#<img\s.*?(?:src\s*=\s*["\']?([^"\'<>\s]*)["\']?[^>]*)?>#is', '$1', $str); + } + + /** + * Encodes PHP tags in a string. + * + * $str = Security::encode_php_tags($str); + * + * @param string $str string to sanitize + * @return string + */ + public static function encode_php_tags($str) + { + return str_replace(array('<?', '?>'), array('<?', '?>'), $str); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Session.php b/~dev_rating/system/classes/Kohana/Session.php new file mode 100644 index 0000000000000000000000000000000000000000..b15bf4324e75560cedb987867b54d02c924de461 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Session.php @@ -0,0 +1,505 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Base session class. + * + * @package Kohana + * @category Session + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +abstract class Kohana_Session { + + /** + * @var string default session adapter + */ + public static $default = 'native'; + + /** + * @var array session instances + */ + public static $instances = array(); + + /** + * Creates a singleton session of the given type. Some session types + * (native, database) also support restarting a session by passing a + * session id as the second parameter. + * + * $session = Session::instance(); + * + * [!!] [Session::write] will automatically be called when the request ends. + * + * @param string $type type of session (native, cookie, etc) + * @param string $id session identifier + * @return Session + * @uses Kohana::$config + */ + public static function instance($type = NULL, $id = NULL) + { + if ($type === NULL) + { + // Use the default type + $type = Session::$default; + } + + if ( ! isset(Session::$instances[$type])) + { + // Load the configuration for this type + $config = Kohana::$config->load('session')->get($type); + + // Set the session class name + $class = 'Session_'.ucfirst($type); + + // Create a new session instance + Session::$instances[$type] = $session = new $class($config, $id); + + // Write the session at shutdown + register_shutdown_function(array($session, 'write')); + } + + return Session::$instances[$type]; + } + + /** + * @var string cookie name + */ + protected $_name = 'session'; + + /** + * @var int cookie lifetime + */ + protected $_lifetime = 0; + + /** + * @var bool encrypt session data? + */ + protected $_encrypted = FALSE; + + /** + * @var array session data + */ + protected $_data = array(); + + /** + * @var bool session destroyed? + */ + protected $_destroyed = FALSE; + + /** + * Overloads the name, lifetime, and encrypted session settings. + * + * [!!] Sessions can only be created using the [Session::instance] method. + * + * @param array $config configuration + * @param string $id session id + * @return void + * @uses Session::read + */ + public function __construct(array $config = NULL, $id = NULL) + { + if (isset($config['name'])) + { + // Cookie name to store the session id in + $this->_name = (string) $config['name']; + } + + if (isset($config['lifetime'])) + { + // Cookie lifetime + $this->_lifetime = (int) $config['lifetime']; + } + + if (isset($config['encrypted'])) + { + if ($config['encrypted'] === TRUE) + { + // Use the default Encrypt instance + $config['encrypted'] = 'default'; + } + + // Enable or disable encryption of data + $this->_encrypted = $config['encrypted']; + } + + // Load the session + $this->read($id); + } + + /** + * Session object is rendered to a serialized string. If encryption is + * enabled, the session will be encrypted. If not, the output string will + * be encoded. + * + * echo $session; + * + * @return string + * @uses Encrypt::encode + */ + public function __toString() + { + // Serialize the data array + $data = $this->_serialize($this->_data); + + if ($this->_encrypted) + { + // Encrypt the data using the default key + $data = Encrypt::instance($this->_encrypted)->encode($data); + } + else + { + // Encode the data + $data = $this->_encode($data); + } + + return $data; + } + + /** + * Returns the current session array. The returned array can also be + * assigned by reference. + * + * // Get a copy of the current session data + * $data = $session->as_array(); + * + * // Assign by reference for modification + * $data =& $session->as_array(); + * + * @return array + */ + public function & as_array() + { + return $this->_data; + } + + /** + * Get the current session id, if the session supports it. + * + * $id = $session->id(); + * + * [!!] Not all session types have ids. + * + * @return string + * @since 3.0.8 + */ + public function id() + { + return NULL; + } + + /** + * Get the current session cookie name. + * + * $name = $session->name(); + * + * @return string + * @since 3.0.8 + */ + public function name() + { + return $this->_name; + } + + /** + * Get a variable from the session array. + * + * $foo = $session->get('foo'); + * + * @param string $key variable name + * @param mixed $default default value to return + * @return mixed + */ + public function get($key, $default = NULL) + { + return array_key_exists($key, $this->_data) ? $this->_data[$key] : $default; + } + + /** + * Get and delete a variable from the session array. + * + * $bar = $session->get_once('bar'); + * + * @param string $key variable name + * @param mixed $default default value to return + * @return mixed + */ + public function get_once($key, $default = NULL) + { + $value = $this->get($key, $default); + + unset($this->_data[$key]); + + return $value; + } + + /** + * Set a variable in the session array. + * + * $session->set('foo', 'bar'); + * + * @param string $key variable name + * @param mixed $value value + * @return $this + */ + public function set($key, $value) + { + $this->_data[$key] = $value; + + return $this; + } + + /** + * Set a variable by reference. + * + * $session->bind('foo', $foo); + * + * @param string $key variable name + * @param mixed $value referenced value + * @return $this + */ + public function bind($key, & $value) + { + $this->_data[$key] =& $value; + + return $this; + } + + /** + * Removes a variable in the session array. + * + * $session->delete('foo'); + * + * @param string $key,... variable name + * @return $this + */ + public function delete($key) + { + $args = func_get_args(); + + foreach ($args as $key) + { + unset($this->_data[$key]); + } + + return $this; + } + + /** + * Loads existing session data. + * + * $session->read(); + * + * @param string $id session id + * @return void + */ + public function read($id = NULL) + { + $data = NULL; + + try + { + if (is_string($data = $this->_read($id))) + { + if ($this->_encrypted) + { + // Decrypt the data using the default key + $data = Encrypt::instance($this->_encrypted)->decode($data); + } + else + { + // Decode the data + $data = $this->_decode($data); + } + + // Unserialize the data + $data = $this->_unserialize($data); + } + else + { + // Ignore these, session is valid, likely no data though. + } + } + catch (Exception $e) + { + // Error reading the session, usually a corrupt session. + throw new Session_Exception('Error reading session data.', NULL, Session_Exception::SESSION_CORRUPT); + } + + if (is_array($data)) + { + // Load the data locally + $this->_data = $data; + } + } + + /** + * Generates a new session id and returns it. + * + * $id = $session->regenerate(); + * + * @return string + */ + public function regenerate() + { + return $this->_regenerate(); + } + + /** + * Sets the last_active timestamp and saves the session. + * + * $session->write(); + * + * [!!] Any errors that occur during session writing will be logged, + * but not displayed, because sessions are written after output has + * been sent. + * + * @return boolean + * @uses Kohana::$log + */ + public function write() + { + if (headers_sent() OR $this->_destroyed) + { + // Session cannot be written when the headers are sent or when + // the session has been destroyed + return FALSE; + } + + // Set the last active timestamp + $this->_data['last_active'] = time(); + + try + { + return $this->_write(); + } + catch (Exception $e) + { + // Log & ignore all errors when a write fails + Kohana::$log->add(Log::ERROR, Kohana_Exception::text($e))->write(); + + return FALSE; + } + } + + /** + * Completely destroy the current session. + * + * $success = $session->destroy(); + * + * @return boolean + */ + public function destroy() + { + if ($this->_destroyed === FALSE) + { + if ($this->_destroyed = $this->_destroy()) + { + // The session has been destroyed, clear all data + $this->_data = array(); + } + } + + return $this->_destroyed; + } + + /** + * Restart the session. + * + * $success = $session->restart(); + * + * @return boolean + */ + public function restart() + { + if ($this->_destroyed === FALSE) + { + // Wipe out the current session. + $this->destroy(); + } + + // Allow the new session to be saved + $this->_destroyed = FALSE; + + return $this->_restart(); + } + + /** + * Serializes the session data. + * + * @param array $data data + * @return string + */ + protected function _serialize($data) + { + return serialize($data); + } + + /** + * Unserializes the session data. + * + * @param string $data data + * @return array + */ + protected function _unserialize($data) + { + return unserialize($data); + } + + /** + * Encodes the session data using [base64_encode]. + * + * @param string $data data + * @return string + */ + protected function _encode($data) + { + return base64_encode($data); + } + + /** + * Decodes the session data using [base64_decode]. + * + * @param string $data data + * @return string + */ + protected function _decode($data) + { + return base64_decode($data); + } + + /** + * Loads the raw session data string and returns it. + * + * @param string $id session id + * @return string + */ + abstract protected function _read($id = NULL); + + /** + * Generate a new session id and return it. + * + * @return string + */ + abstract protected function _regenerate(); + + /** + * Writes the current session. + * + * @return boolean + */ + abstract protected function _write(); + + /** + * Destroys the current session. + * + * @return boolean + */ + abstract protected function _destroy(); + + /** + * Restarts the current session. + * + * @return boolean + */ + abstract protected function _restart(); + +} diff --git a/~dev_rating/system/classes/Kohana/Session/Cookie.php b/~dev_rating/system/classes/Kohana/Session/Cookie.php new file mode 100644 index 0000000000000000000000000000000000000000..17ae36dc23e40063cf5e0366ab82f834b4e2a2cf --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Session/Cookie.php @@ -0,0 +1,55 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Cookie-based session class. + * + * @package Kohana + * @category Session + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Session_Cookie extends Session { + + /** + * @param string $id session id + * @return string + */ + protected function _read($id = NULL) + { + return Cookie::get($this->_name, NULL); + } + + /** + * @return null + */ + protected function _regenerate() + { + // Cookie sessions have no id + return NULL; + } + + /** + * @return bool + */ + protected function _write() + { + return Cookie::set($this->_name, $this->__toString(), $this->_lifetime); + } + + /** + * @return bool + */ + protected function _restart() + { + return TRUE; + } + + /** + * @return bool + */ + protected function _destroy() + { + return Cookie::delete($this->_name); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Session/Exception.php b/~dev_rating/system/classes/Kohana/Session/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..917ea671eba6fd42097f41c751c88b721da4146a --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Session/Exception.php @@ -0,0 +1,13 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Session_Exception extends Kohana_Exception { + + const SESSION_CORRUPT = 1; + +} diff --git a/~dev_rating/system/classes/Kohana/Session/Native.php b/~dev_rating/system/classes/Kohana/Session/Native.php new file mode 100644 index 0000000000000000000000000000000000000000..a5c8917b3b233f9fa6cdca8487a021855ad39d6f --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Session/Native.php @@ -0,0 +1,107 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Native PHP session class. + * + * @package Kohana + * @category Session + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Session_Native extends Session { + + /** + * @return string + */ + public function id() + { + return session_id(); + } + + /** + * @param string $id session id + * @return null + */ + protected function _read($id = NULL) + { + // Sync up the session cookie with Cookie parameters + session_set_cookie_params($this->_lifetime, Cookie::$path, Cookie::$domain, Cookie::$secure, Cookie::$httponly); + + // Do not allow PHP to send Cache-Control headers + session_cache_limiter(FALSE); + + // Set the session cookie name + session_name($this->_name); + + if ($id) + { + // Set the session id + session_id($id); + } + + // Start the session + session_start(); + + // Use the $_SESSION global for storing data + $this->_data =& $_SESSION; + + return NULL; + } + + /** + * @return string + */ + protected function _regenerate() + { + // Regenerate the session id + session_regenerate_id(); + + return session_id(); + } + + /** + * @return bool + */ + protected function _write() + { + // Write and close the session + session_write_close(); + + return TRUE; + } + + /** + * @return bool + */ + protected function _restart() + { + // Fire up a new session + $status = session_start(); + + // Use the $_SESSION global for storing data + $this->_data =& $_SESSION; + + return $status; + } + + /** + * @return bool + */ + protected function _destroy() + { + // Destroy the current session + session_destroy(); + + // Did destruction work? + $status = ! session_id(); + + if ($status) + { + // Make sure the session cannot be restarted + Cookie::delete($this->_name); + } + + return $status; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Text.php b/~dev_rating/system/classes/Kohana/Text.php new file mode 100644 index 0000000000000000000000000000000000000000..7514fd66cb58f1a1a5405f63d9cc74e413b754d5 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Text.php @@ -0,0 +1,686 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Text helper class. Provides simple methods for working with text. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Text { + + /** + * @var array number units and text equivalents + */ + public static $units = array( + 1000000000 => 'billion', + 1000000 => 'million', + 1000 => 'thousand', + 100 => 'hundred', + 90 => 'ninety', + 80 => 'eighty', + 70 => 'seventy', + 60 => 'sixty', + 50 => 'fifty', + 40 => 'fourty', + 30 => 'thirty', + 20 => 'twenty', + 19 => 'nineteen', + 18 => 'eighteen', + 17 => 'seventeen', + 16 => 'sixteen', + 15 => 'fifteen', + 14 => 'fourteen', + 13 => 'thirteen', + 12 => 'twelve', + 11 => 'eleven', + 10 => 'ten', + 9 => 'nine', + 8 => 'eight', + 7 => 'seven', + 6 => 'six', + 5 => 'five', + 4 => 'four', + 3 => 'three', + 2 => 'two', + 1 => 'one', + ); + + /** + * Limits a phrase to a given number of words. + * + * $text = Text::limit_words($text); + * + * @param string $str phrase to limit words of + * @param integer $limit number of words to limit to + * @param string $end_char end character or entity + * @return string + */ + public static function limit_words($str, $limit = 100, $end_char = NULL) + { + $limit = (int) $limit; + $end_char = ($end_char === NULL) ? '…' : $end_char; + + if (trim($str) === '') + return $str; + + if ($limit <= 0) + return $end_char; + + preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); + + // Only attach the end character if the matched string is shorter + // than the starting string. + return rtrim($matches[0]).((strlen($matches[0]) === strlen($str)) ? '' : $end_char); + } + + /** + * Limits a phrase to a given number of characters. + * + * $text = Text::limit_chars($text); + * + * @param string $str phrase to limit characters of + * @param integer $limit number of characters to limit to + * @param string $end_char end character or entity + * @param boolean $preserve_words enable or disable the preservation of words while limiting + * @return string + * @uses UTF8::strlen + */ + public static function limit_chars($str, $limit = 100, $end_char = NULL, $preserve_words = FALSE) + { + $end_char = ($end_char === NULL) ? '…' : $end_char; + + $limit = (int) $limit; + + if (trim($str) === '' OR UTF8::strlen($str) <= $limit) + return $str; + + if ($limit <= 0) + return $end_char; + + if ($preserve_words === FALSE) + return rtrim(UTF8::substr($str, 0, $limit)).$end_char; + + // Don't preserve words. The limit is considered the top limit. + // No strings with a length longer than $limit should be returned. + if ( ! preg_match('/^.{0,'.$limit.'}\s/us', $str, $matches)) + return $end_char; + + return rtrim($matches[0]).((strlen($matches[0]) === strlen($str)) ? '' : $end_char); + } + + /** + * Alternates between two or more strings. + * + * echo Text::alternate('one', 'two'); // "one" + * echo Text::alternate('one', 'two'); // "two" + * echo Text::alternate('one', 'two'); // "one" + * + * Note that using multiple iterations of different strings may produce + * unexpected results. + * + * @param string $str,... strings to alternate between + * @return string + */ + public static function alternate() + { + static $i; + + if (func_num_args() === 0) + { + $i = 0; + return ''; + } + + $args = func_get_args(); + return $args[($i++ % count($args))]; + } + + /** + * Generates a random string of a given type and length. + * + * + * $str = Text::random(); // 8 character random string + * + * The following types are supported: + * + * alnum + * : Upper and lower case a-z, 0-9 (default) + * + * alpha + * : Upper and lower case a-z + * + * hexdec + * : Hexadecimal characters a-f, 0-9 + * + * distinct + * : Uppercase characters and numbers that cannot be confused + * + * You can also create a custom type by providing the "pool" of characters + * as the type. + * + * @param string $type a type of pool, or a string of characters to use as the pool + * @param integer $length length of string to return + * @return string + * @uses UTF8::split + */ + public static function random($type = NULL, $length = 8) + { + if ($type === NULL) + { + // Default is to generate an alphanumeric string + $type = 'alnum'; + } + + $utf8 = FALSE; + + switch ($type) + { + case 'alnum': + $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'alpha': + $pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'hexdec': + $pool = '0123456789abcdef'; + break; + case 'numeric': + $pool = '0123456789'; + break; + case 'nozero': + $pool = '123456789'; + break; + case 'distinct': + $pool = '2345679ACDEFHJKLMNPRSTUVWXYZ'; + break; + default: + $pool = (string) $type; + $utf8 = ! UTF8::is_ascii($pool); + break; + } + + // Split the pool into an array of characters + $pool = ($utf8 === TRUE) ? UTF8::str_split($pool, 1) : str_split($pool, 1); + + // Largest pool key + $max = count($pool) - 1; + + $str = ''; + for ($i = 0; $i < $length; $i++) + { + // Select a random character from the pool and add it to the string + $str .= $pool[mt_rand(0, $max)]; + } + + // Make sure alnum strings contain at least one letter and one digit + if ($type === 'alnum' AND $length > 1) + { + if (ctype_alpha($str)) + { + // Add a random digit + $str[mt_rand(0, $length - 1)] = chr(mt_rand(48, 57)); + } + elseif (ctype_digit($str)) + { + // Add a random letter + $str[mt_rand(0, $length - 1)] = chr(mt_rand(65, 90)); + } + } + + return $str; + } + + /** + * Uppercase words that are not separated by spaces, using a custom + * delimiter or the default. + * + * $str = Text::ucfirst('content-type'); // returns "Content-Type" + * + * @param string $string string to transform + * @param string $delimiter delimiter to use + * @return string + */ + public static function ucfirst($string, $delimiter = '-') + { + // Put the keys back the Case-Convention expected + return implode($delimiter, array_map('ucfirst', explode($delimiter, $string))); + } + + /** + * Reduces multiple slashes in a string to single slashes. + * + * $str = Text::reduce_slashes('foo//bar/baz'); // "foo/bar/baz" + * + * @param string $str string to reduce slashes of + * @return string + */ + public static function reduce_slashes($str) + { + return preg_replace('#(?<!:)//+#', '/', $str); + } + + /** + * Replaces the given words with a string. + * + * // Displays "What the #####, man!" + * echo Text::censor('What the frick, man!', array( + * 'frick' => '#####', + * )); + * + * @param string $str phrase to replace words in + * @param array $badwords words to replace + * @param string $replacement replacement string + * @param boolean $replace_partial_words replace words across word boundaries (space, period, etc) + * @return string + * @uses UTF8::strlen + */ + public static function censor($str, $badwords, $replacement = '#', $replace_partial_words = TRUE) + { + foreach ( (array) $badwords as $key => $badword) + { + $badwords[$key] = str_replace('\*', '\S*?', preg_quote( (string) $badword)); + } + + $regex = '('.implode('|', $badwords).')'; + + if ($replace_partial_words === FALSE) + { + // Just using \b isn't sufficient when we need to replace a badword that already contains word boundaries itself + $regex = '(?<=\b|\s|^)'.$regex.'(?=\b|\s|$)'; + } + + $regex = '!'.$regex.'!ui'; + + if (UTF8::strlen($replacement) == 1) + { + $regex .= 'e'; + return preg_replace($regex, 'str_repeat($replacement, UTF8::strlen(\'$1\'))', $str); + } + + return preg_replace($regex, $replacement, $str); + } + + /** + * Finds the text that is similar between a set of words. + * + * $match = Text::similar(array('fred', 'fran', 'free'); // "fr" + * + * @param array $words words to find similar text of + * @return string + */ + public static function similar(array $words) + { + // First word is the word to match against + $word = current($words); + + for ($i = 0, $max = strlen($word); $i < $max; ++$i) + { + foreach ($words as $w) + { + // Once a difference is found, break out of the loops + if ( ! isset($w[$i]) OR $w[$i] !== $word[$i]) + break 2; + } + } + + // Return the similar text + return substr($word, 0, $i); + } + + /** + * Converts text email addresses and anchors into links. Existing links + * will not be altered. + * + * echo Text::auto_link($text); + * + * [!!] This method is not foolproof since it uses regex to parse HTML. + * + * @param string $text text to auto link + * @return string + * @uses Text::auto_link_urls + * @uses Text::auto_link_emails + */ + public static function auto_link($text) + { + // Auto link emails first to prevent problems with "www.domain.com@example.com" + return Text::auto_link_urls(Text::auto_link_emails($text)); + } + + /** + * Converts text anchors into links. Existing links will not be altered. + * + * echo Text::auto_link_urls($text); + * + * [!!] This method is not foolproof since it uses regex to parse HTML. + * + * @param string $text text to auto link + * @return string + * @uses HTML::anchor + */ + public static function auto_link_urls($text) + { + // Find and replace all http/https/ftp/ftps links that are not part of an existing html anchor + $text = preg_replace_callback('~\b(?<!href="|">)(?:ht|f)tps?://[^<\s]+(?:/|\b)~i', 'Text::_auto_link_urls_callback1', $text); + + // Find and replace all naked www.links.com (without http://) + return preg_replace_callback('~\b(?<!://|">)www(?:\.[a-z0-9][-a-z0-9]*+)+\.[a-z]{2,6}[^<\s]*\b~i', 'Text::_auto_link_urls_callback2', $text); + } + + protected static function _auto_link_urls_callback1($matches) + { + return HTML::anchor($matches[0]); + } + + protected static function _auto_link_urls_callback2($matches) + { + return HTML::anchor('http://'.$matches[0], $matches[0]); + } + + /** + * Converts text email addresses into links. Existing links will not + * be altered. + * + * echo Text::auto_link_emails($text); + * + * [!!] This method is not foolproof since it uses regex to parse HTML. + * + * @param string $text text to auto link + * @return string + * @uses HTML::mailto + */ + public static function auto_link_emails($text) + { + // Find and replace all email addresses that are not part of an existing html mailto anchor + // Note: The "58;" negative lookbehind prevents matching of existing encoded html mailto anchors + // The html entity for a colon (:) is : or : or : etc. + return preg_replace_callback('~\b(?<!href="mailto:|58;)(?!\.)[-+_a-z0-9.]++(?<!\.)@(?![-.])[-a-z0-9.]+(?<!\.)\.[a-z]{2,6}\b(?!</a>)~i', 'Text::_auto_link_emails_callback', $text); + } + + protected static function _auto_link_emails_callback($matches) + { + return HTML::mailto($matches[0]); + } + + /** + * Automatically applies "p" and "br" markup to text. + * Basically [nl2br](http://php.net/nl2br) on steroids. + * + * echo Text::auto_p($text); + * + * [!!] This method is not foolproof since it uses regex to parse HTML. + * + * @param string $str subject + * @param boolean $br convert single linebreaks to <br /> + * @return string + */ + public static function auto_p($str, $br = TRUE) + { + // Trim whitespace + if (($str = trim($str)) === '') + return ''; + + // Standardize newlines + $str = str_replace(array("\r\n", "\r"), "\n", $str); + + // Trim whitespace on each line + $str = preg_replace('~^[ \t]+~m', '', $str); + $str = preg_replace('~[ \t]+$~m', '', $str); + + // The following regexes only need to be executed if the string contains html + if ($html_found = (strpos($str, '<') !== FALSE)) + { + // Elements that should not be surrounded by p tags + $no_p = '(?:p|div|h[1-6r]|ul|ol|li|blockquote|d[dlt]|pre|t[dhr]|t(?:able|body|foot|head)|c(?:aption|olgroup)|form|s(?:elect|tyle)|a(?:ddress|rea)|ma(?:p|th))'; + + // Put at least two linebreaks before and after $no_p elements + $str = preg_replace('~^<'.$no_p.'[^>]*+>~im', "\n$0", $str); + $str = preg_replace('~</'.$no_p.'\s*+>$~im', "$0\n", $str); + } + + // Do the <p> magic! + $str = '<p>'.trim($str).'</p>'; + $str = preg_replace('~\n{2,}~', "</p>\n\n<p>", $str); + + // The following regexes only need to be executed if the string contains html + if ($html_found !== FALSE) + { + // Remove p tags around $no_p elements + $str = preg_replace('~<p>(?=</?'.$no_p.'[^>]*+>)~i', '', $str); + $str = preg_replace('~(</?'.$no_p.'[^>]*+>)</p>~i', '$1', $str); + } + + // Convert single linebreaks to <br /> + if ($br === TRUE) + { + $str = preg_replace('~(?<!\n)\n(?!\n)~', "<br />\n", $str); + } + + return $str; + } + + /** + * Returns human readable sizes. Based on original functions written by + * [Aidan Lister](http://aidanlister.com/repos/v/function.size_readable.php) + * and [Quentin Zervaas](http://www.phpriot.com/d/code/strings/filesize-format/). + * + * echo Text::bytes(filesize($file)); + * + * @param integer $bytes size in bytes + * @param string $force_unit a definitive unit + * @param string $format the return string format + * @param boolean $si whether to use SI prefixes or IEC + * @return string + */ + public static function bytes($bytes, $force_unit = NULL, $format = NULL, $si = TRUE) + { + // Format string + $format = ($format === NULL) ? '%01.2f %s' : (string) $format; + + // IEC prefixes (binary) + if ($si == FALSE OR strpos($force_unit, 'i') !== FALSE) + { + $units = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'); + $mod = 1024; + } + // SI prefixes (decimal) + else + { + $units = array('B', 'kB', 'MB', 'GB', 'TB', 'PB'); + $mod = 1000; + } + + // Determine unit to use + if (($power = array_search( (string) $force_unit, $units)) === FALSE) + { + $power = ($bytes > 0) ? floor(log($bytes, $mod)) : 0; + } + + return sprintf($format, $bytes / pow($mod, $power), $units[$power]); + } + + /** + * Format a number to human-readable text. + * + * // Display: one thousand and twenty-four + * echo Text::number(1024); + * + * // Display: five million, six hundred and thirty-two + * echo Text::number(5000632); + * + * @param integer $number number to format + * @return string + * @since 3.0.8 + */ + public static function number($number) + { + // The number must always be an integer + $number = (int) $number; + + // Uncompiled text version + $text = array(); + + // Last matched unit within the loop + $last_unit = NULL; + + // The last matched item within the loop + $last_item = ''; + + foreach (Text::$units as $unit => $name) + { + if ($number / $unit >= 1) + { + // $value = the number of times the number is divisible by unit + $number -= $unit * ($value = (int) floor($number / $unit)); + // Temporary var for textifying the current unit + $item = ''; + + if ($unit < 100) + { + if ($last_unit < 100 AND $last_unit >= 20) + { + $last_item .= '-'.$name; + } + else + { + $item = $name; + } + } + else + { + $item = Text::number($value).' '.$name; + } + + // In the situation that we need to make a composite number (i.e. twenty-three) + // then we need to modify the previous entry + if (empty($item)) + { + array_pop($text); + + $item = $last_item; + } + + $last_item = $text[] = $item; + $last_unit = $unit; + } + } + + if (count($text) > 1) + { + $and = array_pop($text); + } + + $text = implode(', ', $text); + + if (isset($and)) + { + $text .= ' and '.$and; + } + + return $text; + } + + /** + * Prevents [widow words](http://www.shauninman.com/archive/2006/08/22/widont_wordpress_plugin) + * by inserting a non-breaking space between the last two words. + * + * echo Text::widont($text); + * + * @param string $str text to remove widows from + * @return string + */ + public static function widont($str) + { + $str = rtrim($str); + $space = strrpos($str, ' '); + + if ($space !== FALSE) + { + $str = substr($str, 0, $space).' '.substr($str, $space + 1); + } + + return $str; + } + + /** + * Returns information about the client user agent. + * + * // Returns "Chrome" when using Google Chrome + * $browser = Text::user_agent('browser'); + * + * Multiple values can be returned at once by using an array: + * + * // Get the browser and platform with a single call + * $info = Text::user_agent(array('browser', 'platform')); + * + * When using an array for the value, an associative array will be returned. + * + * @param mixed $value array or string to return: browser, version, robot, mobile, platform + * @return mixed requested information, FALSE if nothing is found + * @uses Kohana::$config + */ + public static function user_agent($agent, $value) + { + if (is_array($value)) + { + $data = array(); + foreach ($value as $part) + { + // Add each part to the set + $data[$part] = Text::user_agent($agent, $part); + } + + return $data; + } + + if ($value === 'browser' OR $value == 'version') + { + // Extra data will be captured + $info = array(); + + // Load browsers + $browsers = Kohana::$config->load('user_agents')->browser; + + foreach ($browsers as $search => $name) + { + if (stripos($agent, $search) !== FALSE) + { + // Set the browser name + $info['browser'] = $name; + + if (preg_match('#'.preg_quote($search).'[^0-9.]*+([0-9.][0-9.a-z]*)#i', Request::$user_agent, $matches)) + { + // Set the version number + $info['version'] = $matches[1]; + } + else + { + // No version number found + $info['version'] = FALSE; + } + + return $info[$value]; + } + } + } + else + { + // Load the search group for this type + $group = Kohana::$config->load('user_agents')->$value; + + foreach ($group as $search => $name) + { + if (stripos($agent, $search) !== FALSE) + { + // Set the value name + return $name; + } + } + } + + // The value requested could not be found + return FALSE; + } + +} diff --git a/~dev_rating/system/classes/Kohana/URL.php b/~dev_rating/system/classes/Kohana/URL.php new file mode 100644 index 0000000000000000000000000000000000000000..b75809512fca41ddde2d42228e6176e7a6516b67 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/URL.php @@ -0,0 +1,213 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * URL helper class. + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_URL { + + /** + * Gets the base URL to the application. + * To specify a protocol, provide the protocol as a string or request object. + * If a protocol is used, a complete URL will be generated using the + * `$_SERVER['HTTP_HOST']` variable. + * + * // Absolute URL path with no host or protocol + * echo URL::base(); + * + * // Absolute URL path with host, https protocol and index.php if set + * echo URL::base('https', TRUE); + * + * // Absolute URL path with host and protocol from $request + * echo URL::base($request); + * + * @param mixed $protocol Protocol string, [Request], or boolean + * @param boolean $index Add index file to URL? + * @return string + * @uses Kohana::$index_file + * @uses Request::protocol() + */ + public static function base($protocol = NULL, $index = FALSE) + { + // Start with the configured base URL + $base_url = Kohana::$base_url; + + if ($protocol === TRUE) + { + // Use the initial request to get the protocol + $protocol = Request::$initial; + } + + if ($protocol instanceof Request) + { + if ( ! $protocol->secure()) + { + // Use the current protocol + list($protocol) = explode('/', strtolower($protocol->protocol())); + } + else + { + $protocol = 'https'; + } + } + + if ( ! $protocol) + { + // Use the configured default protocol + $protocol = parse_url($base_url, PHP_URL_SCHEME); + } + + if ($index === TRUE AND ! empty(Kohana::$index_file)) + { + // Add the index file to the URL + $base_url .= Kohana::$index_file.'/'; + } + + if (is_string($protocol)) + { + if ($port = parse_url($base_url, PHP_URL_PORT)) + { + // Found a port, make it usable for the URL + $port = ':'.$port; + } + + if ($domain = parse_url($base_url, PHP_URL_HOST)) + { + // Remove everything but the path from the URL + $base_url = parse_url($base_url, PHP_URL_PATH); + } + else + { + // Attempt to use HTTP_HOST and fallback to SERVER_NAME + $domain = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']; + } + + // Add the protocol and domain to the base URL + $base_url = $protocol.'://'.$domain.$port.$base_url; + } + + return $base_url; + } + + /** + * Fetches an absolute site URL based on a URI segment. + * + * echo URL::site('foo/bar'); + * + * @param string $uri Site URI to convert + * @param mixed $protocol Protocol string or [Request] class to use protocol from + * @param boolean $index Include the index_page in the URL + * @return string + * @uses URL::base + */ + public static function site($uri = '', $protocol = NULL, $index = TRUE) + { + // Chop off possible scheme, host, port, user and pass parts + $path = preg_replace('~^[-a-z0-9+.]++://[^/]++/?~', '', trim($uri, '/')); + + if ( ! UTF8::is_ascii($path)) + { + // Encode all non-ASCII characters, as per RFC 1738 + $path = preg_replace_callback('~([^/]+)~', 'URL::_rawurlencode_callback', $path); + } + + // Concat the URL + return URL::base($protocol, $index).$path; + } + + /** + * Callback used for encoding all non-ASCII characters, as per RFC 1738 + * Used by URL::site() + * + * @param array $matches Array of matches from preg_replace_callback() + * @return string Encoded string + */ + protected static function _rawurlencode_callback($matches) + { + return rawurlencode($matches[0]); + } + + /** + * Merges the current GET parameters with an array of new or overloaded + * parameters and returns the resulting query string. + * + * // Returns "?sort=title&limit=10" combined with any existing GET values + * $query = URL::query(array('sort' => 'title', 'limit' => 10)); + * + * Typically you would use this when you are sorting query results, + * or something similar. + * + * [!!] Parameters with a NULL value are left out. + * + * @param array $params Array of GET parameters + * @param boolean $use_get Include current request GET parameters + * @return string + */ + public static function query(array $params = NULL, $use_get = TRUE) + { + if ($use_get) + { + if ($params === NULL) + { + // Use only the current parameters + $params = $_GET; + } + else + { + // Merge the current and new parameters + $params = Arr::merge($_GET, $params); + } + } + + if (empty($params)) + { + // No query parameters + return ''; + } + + // Note: http_build_query returns an empty string for a params array with only NULL values + $query = http_build_query($params, '', '&'); + + // Don't prepend '?' to an empty string + return ($query === '') ? '' : ('?'.$query); + } + + /** + * Convert a phrase to a URL-safe title. + * + * echo URL::title('My Blog Post'); // "my-blog-post" + * + * @param string $title Phrase to convert + * @param string $separator Word separator (any single character) + * @param boolean $ascii_only Transliterate to ASCII? + * @return string + * @uses UTF8::transliterate_to_ascii + */ + public static function title($title, $separator = '-', $ascii_only = FALSE) + { + if ($ascii_only === TRUE) + { + // Transliterate non-ASCII characters + $title = UTF8::transliterate_to_ascii($title); + + // Remove all characters that are not the separator, a-z, 0-9, or whitespace + $title = preg_replace('![^'.preg_quote($separator).'a-z0-9\s]+!', '', strtolower($title)); + } + else + { + // Remove all characters that are not the separator, letters, numbers, or whitespace + $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', UTF8::strtolower($title)); + } + + // Replace all separator characters and whitespace by a single separator + $title = preg_replace('!['.preg_quote($separator).'\s]+!u', $separator, $title); + + // Trim separators from the beginning and end + return trim($title, $separator); + } + +} diff --git a/~dev_rating/system/classes/Kohana/UTF8.php b/~dev_rating/system/classes/Kohana/UTF8.php new file mode 100644 index 0000000000000000000000000000000000000000..ca5e315a8de9b84860e9b59e081c2efd2c83893b --- /dev/null +++ b/~dev_rating/system/classes/Kohana/UTF8.php @@ -0,0 +1,765 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * A port of [phputf8](http://phputf8.sourceforge.net/) to a unified set + * of files. Provides multi-byte aware replacement string functions. + * + * For UTF-8 support to work correctly, the following requirements must be met: + * + * - PCRE needs to be compiled with UTF-8 support (--enable-utf8) + * - Support for [Unicode properties](http://php.net/manual/reference.pcre.pattern.modifiers.php) + * is highly recommended (--enable-unicode-properties) + * - The [mbstring extension](http://php.net/mbstring) is highly recommended, + * but must not be overloading string functions + * + * [!!] This file is licensed differently from the rest of Kohana. As a port of + * [phputf8](http://phputf8.sourceforge.net/), this file is released under the LGPL. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +class Kohana_UTF8 { + + /** + * @var boolean Does the server support UTF-8 natively? + */ + public static $server_utf8 = NULL; + + /** + * @var array List of called methods that have had their required file included. + */ + public static $called = array(); + + /** + * Recursively cleans arrays, objects, and strings. Removes ASCII control + * codes and converts to the requested charset while silently discarding + * incompatible characters. + * + * UTF8::clean($_GET); // Clean GET data + * + * @param mixed $var variable to clean + * @param string $charset character set, defaults to Kohana::$charset + * @return mixed + * @uses UTF8::clean + * @uses UTF8::strip_ascii_ctrl + * @uses UTF8::is_ascii + */ + public static function clean($var, $charset = NULL) + { + if ( ! $charset) + { + // Use the application character set + $charset = Kohana::$charset; + } + + if (is_array($var) OR is_object($var)) + { + foreach ($var as $key => $val) + { + // Recursion! + $var[UTF8::clean($key)] = UTF8::clean($val); + } + } + elseif (is_string($var) AND $var !== '') + { + // Remove control characters + $var = UTF8::strip_ascii_ctrl($var); + + if ( ! UTF8::is_ascii($var)) + { + // Disable notices + $error_reporting = error_reporting(~E_NOTICE); + + $var = mb_convert_encoding($var, $charset, $charset); + + // Turn notices back on + error_reporting($error_reporting); + } + } + + return $var; + } + + /** + * Tests whether a string contains only 7-bit ASCII bytes. This is used to + * determine when to use native functions or UTF-8 functions. + * + * $ascii = UTF8::is_ascii($str); + * + * @param mixed $str string or array of strings to check + * @return boolean + */ + public static function is_ascii($str) + { + if (is_array($str)) + { + $str = implode($str); + } + + return ! preg_match('/[^\x00-\x7F]/S', $str); + } + + /** + * Strips out device control codes in the ASCII range. + * + * $str = UTF8::strip_ascii_ctrl($str); + * + * @param string $str string to clean + * @return string + */ + public static function strip_ascii_ctrl($str) + { + return preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S', '', $str); + } + + /** + * Strips out all non-7bit ASCII bytes. + * + * $str = UTF8::strip_non_ascii($str); + * + * @param string $str string to clean + * @return string + */ + public static function strip_non_ascii($str) + { + return preg_replace('/[^\x00-\x7F]+/S', '', $str); + } + + /** + * Replaces special/accented UTF-8 characters by ASCII-7 "equivalents". + * + * $ascii = UTF8::transliterate_to_ascii($utf8); + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $str string to transliterate + * @param integer $case -1 lowercase only, +1 uppercase only, 0 both cases + * @return string + */ + public static function transliterate_to_ascii($str, $case = 0) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _transliterate_to_ascii($str, $case); + } + + /** + * Returns the length of the given string. This is a UTF8-aware version + * of [strlen](http://php.net/strlen). + * + * $length = UTF8::strlen($str); + * + * @param string $str string being measured for length + * @return integer + * @uses UTF8::$server_utf8 + * @uses Kohana::$charset + */ + public static function strlen($str) + { + if (UTF8::$server_utf8) + return mb_strlen($str, Kohana::$charset); + + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strlen($str); + } + + /** + * Finds position of first occurrence of a UTF-8 string. This is a + * UTF8-aware version of [strpos](http://php.net/strpos). + * + * $position = UTF8::strpos($str, $search); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str haystack + * @param string $search needle + * @param integer $offset offset from which character in haystack to start searching + * @return integer position of needle + * @return boolean FALSE if the needle is not found + * @uses UTF8::$server_utf8 + * @uses Kohana::$charset + */ + public static function strpos($str, $search, $offset = 0) + { + if (UTF8::$server_utf8) + return mb_strpos($str, $search, $offset, Kohana::$charset); + + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strpos($str, $search, $offset); + } + + /** + * Finds position of last occurrence of a char in a UTF-8 string. This is + * a UTF8-aware version of [strrpos](http://php.net/strrpos). + * + * $position = UTF8::strrpos($str, $search); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str haystack + * @param string $search needle + * @param integer $offset offset from which character in haystack to start searching + * @return integer position of needle + * @return boolean FALSE if the needle is not found + * @uses UTF8::$server_utf8 + */ + public static function strrpos($str, $search, $offset = 0) + { + if (UTF8::$server_utf8) + return mb_strrpos($str, $search, $offset, Kohana::$charset); + + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strrpos($str, $search, $offset); + } + + /** + * Returns part of a UTF-8 string. This is a UTF8-aware version + * of [substr](http://php.net/substr). + * + * $sub = UTF8::substr($str, $offset); + * + * @author Chris Smith <chris@jalakai.co.uk> + * @param string $str input string + * @param integer $offset offset + * @param integer $length length limit + * @return string + * @uses UTF8::$server_utf8 + * @uses Kohana::$charset + */ + public static function substr($str, $offset, $length = NULL) + { + if (UTF8::$server_utf8) + return ($length === NULL) + ? mb_substr($str, $offset, mb_strlen($str), Kohana::$charset) + : mb_substr($str, $offset, $length, Kohana::$charset); + + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _substr($str, $offset, $length); + } + + /** + * Replaces text within a portion of a UTF-8 string. This is a UTF8-aware + * version of [substr_replace](http://php.net/substr_replace). + * + * $str = UTF8::substr_replace($str, $replacement, $offset); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str input string + * @param string $replacement replacement string + * @param integer $offset offset + * @return string + */ + public static function substr_replace($str, $replacement, $offset, $length = NULL) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _substr_replace($str, $replacement, $offset, $length); + } + + /** + * Makes a UTF-8 string lowercase. This is a UTF8-aware version + * of [strtolower](http://php.net/strtolower). + * + * $str = UTF8::strtolower($str); + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $str mixed case string + * @return string + * @uses UTF8::$server_utf8 + * @uses Kohana::$charset + */ + public static function strtolower($str) + { + if (UTF8::$server_utf8) + return mb_strtolower($str, Kohana::$charset); + + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strtolower($str); + } + + /** + * Makes a UTF-8 string uppercase. This is a UTF8-aware version + * of [strtoupper](http://php.net/strtoupper). + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $str mixed case string + * @return string + * @uses UTF8::$server_utf8 + * @uses Kohana::$charset + */ + public static function strtoupper($str) + { + if (UTF8::$server_utf8) + return mb_strtoupper($str, Kohana::$charset); + + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strtoupper($str); + } + + /** + * Makes a UTF-8 string's first character uppercase. This is a UTF8-aware + * version of [ucfirst](http://php.net/ucfirst). + * + * $str = UTF8::ucfirst($str); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str mixed case string + * @return string + */ + public static function ucfirst($str) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _ucfirst($str); + } + + /** + * Makes the first character of every word in a UTF-8 string uppercase. + * This is a UTF8-aware version of [ucwords](http://php.net/ucwords). + * + * $str = UTF8::ucwords($str); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str mixed case string + * @return string + */ + public static function ucwords($str) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _ucwords($str); + } + + /** + * Case-insensitive UTF-8 string comparison. This is a UTF8-aware version + * of [strcasecmp](http://php.net/strcasecmp). + * + * $compare = UTF8::strcasecmp($str1, $str2); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str1 string to compare + * @param string $str2 string to compare + * @return integer less than 0 if str1 is less than str2 + * @return integer greater than 0 if str1 is greater than str2 + * @return integer 0 if they are equal + */ + public static function strcasecmp($str1, $str2) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strcasecmp($str1, $str2); + } + + /** + * Returns a string or an array with all occurrences of search in subject + * (ignoring case) and replaced with the given replace value. This is a + * UTF8-aware version of [str_ireplace](http://php.net/str_ireplace). + * + * [!!] This function is very slow compared to the native version. Avoid + * using it when possible. + * + * @author Harry Fuecks <hfuecks@gmail.com + * @param string|array $search text to replace + * @param string|array $replace replacement text + * @param string|array $str subject text + * @param integer $count number of matched and replaced needles will be returned via this parameter which is passed by reference + * @return string if the input was a string + * @return array if the input was an array + */ + public static function str_ireplace($search, $replace, $str, & $count = NULL) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _str_ireplace($search, $replace, $str, $count); + } + + /** + * Case-insensitive UTF-8 version of strstr. Returns all of input string + * from the first occurrence of needle to the end. This is a UTF8-aware + * version of [stristr](http://php.net/stristr). + * + * $found = UTF8::stristr($str, $search); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str input string + * @param string $search needle + * @return string matched substring if found + * @return FALSE if the substring was not found + */ + public static function stristr($str, $search) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _stristr($str, $search); + } + + /** + * Finds the length of the initial segment matching mask. This is a + * UTF8-aware version of [strspn](http://php.net/strspn). + * + * $found = UTF8::strspn($str, $mask); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str input string + * @param string $mask mask for search + * @param integer $offset start position of the string to examine + * @param integer $length length of the string to examine + * @return integer length of the initial segment that contains characters in the mask + */ + public static function strspn($str, $mask, $offset = NULL, $length = NULL) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strspn($str, $mask, $offset, $length); + } + + /** + * Finds the length of the initial segment not matching mask. This is a + * UTF8-aware version of [strcspn](http://php.net/strcspn). + * + * $found = UTF8::strcspn($str, $mask); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str input string + * @param string $mask mask for search + * @param integer $offset start position of the string to examine + * @param integer $length length of the string to examine + * @return integer length of the initial segment that contains characters not in the mask + */ + public static function strcspn($str, $mask, $offset = NULL, $length = NULL) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strcspn($str, $mask, $offset, $length); + } + + /** + * Pads a UTF-8 string to a certain length with another string. This is a + * UTF8-aware version of [str_pad](http://php.net/str_pad). + * + * $str = UTF8::str_pad($str, $length); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str input string + * @param integer $final_str_length desired string length after padding + * @param string $pad_str string to use as padding + * @param string $pad_type padding type: STR_PAD_RIGHT, STR_PAD_LEFT, or STR_PAD_BOTH + * @return string + */ + public static function str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _str_pad($str, $final_str_length, $pad_str, $pad_type); + } + + /** + * Converts a UTF-8 string to an array. This is a UTF8-aware version of + * [str_split](http://php.net/str_split). + * + * $array = UTF8::str_split($str); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str input string + * @param integer $split_length maximum length of each chunk + * @return array + */ + public static function str_split($str, $split_length = 1) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _str_split($str, $split_length); + } + + /** + * Reverses a UTF-8 string. This is a UTF8-aware version of [strrev](http://php.net/strrev). + * + * $str = UTF8::strrev($str); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $str string to be reversed + * @return string + */ + public static function strrev($str) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _strrev($str); + } + + /** + * Strips whitespace (or other UTF-8 characters) from the beginning and + * end of a string. This is a UTF8-aware version of [trim](http://php.net/trim). + * + * $str = UTF8::trim($str); + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $str input string + * @param string $charlist string of characters to remove + * @return string + */ + public static function trim($str, $charlist = NULL) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _trim($str, $charlist); + } + + /** + * Strips whitespace (or other UTF-8 characters) from the beginning of + * a string. This is a UTF8-aware version of [ltrim](http://php.net/ltrim). + * + * $str = UTF8::ltrim($str); + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $str input string + * @param string $charlist string of characters to remove + * @return string + */ + public static function ltrim($str, $charlist = NULL) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _ltrim($str, $charlist); + } + + /** + * Strips whitespace (or other UTF-8 characters) from the end of a string. + * This is a UTF8-aware version of [rtrim](http://php.net/rtrim). + * + * $str = UTF8::rtrim($str); + * + * @author Andreas Gohr <andi@splitbrain.org> + * @param string $str input string + * @param string $charlist string of characters to remove + * @return string + */ + public static function rtrim($str, $charlist = NULL) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _rtrim($str, $charlist); + } + + /** + * Returns the unicode ordinal for a character. This is a UTF8-aware + * version of [ord](http://php.net/ord). + * + * $digit = UTF8::ord($character); + * + * @author Harry Fuecks <hfuecks@gmail.com> + * @param string $chr UTF-8 encoded character + * @return integer + */ + public static function ord($chr) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _ord($chr); + } + + /** + * Takes an UTF-8 string and returns an array of ints representing the Unicode characters. + * Astral planes are supported i.e. the ints in the output can be > 0xFFFF. + * Occurrences of the BOM are ignored. Surrogates are not allowed. + * + * $array = UTF8::to_unicode($str); + * + * The Original Code is Mozilla Communicator client code. + * The Initial Developer of the Original Code is Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. + * Ported to PHP by Henri Sivonen <hsivonen@iki.fi>, see <http://hsivonen.iki.fi/php-utf8/> + * Slight modifications to fit with phputf8 library by Harry Fuecks <hfuecks@gmail.com> + * + * @param string $str UTF-8 encoded string + * @return array unicode code points + * @return FALSE if the string is invalid + */ + public static function to_unicode($str) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _to_unicode($str); + } + + /** + * Takes an array of ints representing the Unicode characters and returns a UTF-8 string. + * Astral planes are supported i.e. the ints in the input can be > 0xFFFF. + * Occurrences of the BOM are ignored. Surrogates are not allowed. + * + * $str = UTF8::to_unicode($array); + * + * The Original Code is Mozilla Communicator client code. + * The Initial Developer of the Original Code is Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 the Initial Developer. + * Ported to PHP by Henri Sivonen <hsivonen@iki.fi>, see http://hsivonen.iki.fi/php-utf8/ + * Slight modifications to fit with phputf8 library by Harry Fuecks <hfuecks@gmail.com>. + * + * @param array $str unicode code points representing a string + * @return string utf8 string of characters + * @return boolean FALSE if a code point cannot be found + */ + public static function from_unicode($arr) + { + if ( ! isset(UTF8::$called[__FUNCTION__])) + { + require Kohana::find_file('utf8', __FUNCTION__); + + // Function has been called + UTF8::$called[__FUNCTION__] = TRUE; + } + + return _from_unicode($arr); + } + +} + +if (Kohana_UTF8::$server_utf8 === NULL) +{ + // Determine if this server supports UTF-8 natively + Kohana_UTF8::$server_utf8 = extension_loaded('mbstring'); +} diff --git a/~dev_rating/system/classes/Kohana/UTF8/Exception.php b/~dev_rating/system/classes/Kohana/UTF8/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..6f640fe903022568d076522b28b4155d89364f52 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/UTF8/Exception.php @@ -0,0 +1,9 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_UTF8_Exception extends Kohana_Exception {} diff --git a/~dev_rating/system/classes/Kohana/Upload.php b/~dev_rating/system/classes/Kohana/Upload.php new file mode 100644 index 0000000000000000000000000000000000000000..2d0aca3b82a91eb5e5856e62564e2fe8b86dbd64 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Upload.php @@ -0,0 +1,256 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Upload helper class for working with uploaded files and [Validation]. + * + * $array = Validation::factory($_FILES); + * + * [!!] Remember to define your form with "enctype=multipart/form-data" or file + * uploading will not work! + * + * The following configuration properties can be set: + * + * - [Upload::$remove_spaces] + * - [Upload::$default_directory] + * + * @package Kohana + * @category Helpers + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Upload { + + /** + * @var boolean remove spaces in uploaded files + */ + public static $remove_spaces = TRUE; + + /** + * @var string default upload directory + */ + public static $default_directory = 'upload'; + + /** + * Save an uploaded file to a new location. If no filename is provided, + * the original filename will be used, with a unique prefix added. + * + * This method should be used after validating the $_FILES array: + * + * if ($array->check()) + * { + * // Upload is valid, save it + * Upload::save($array['file']); + * } + * + * @param array $file uploaded file data + * @param string $filename new filename + * @param string $directory new directory + * @param integer $chmod chmod mask + * @return string on success, full path to new file + * @return FALSE on failure + */ + public static function save(array $file, $filename = NULL, $directory = NULL, $chmod = 0644) + { + if ( ! isset($file['tmp_name']) OR ! is_uploaded_file($file['tmp_name'])) + { + // Ignore corrupted uploads + return FALSE; + } + + if ($filename === NULL) + { + // Use the default filename, with a timestamp pre-pended + $filename = uniqid().$file['name']; + } + + if (Upload::$remove_spaces === TRUE) + { + // Remove spaces from the filename + $filename = preg_replace('/\s+/u', '_', $filename); + } + + if ($directory === NULL) + { + // Use the pre-configured upload directory + $directory = Upload::$default_directory; + } + + if ( ! is_dir($directory) OR ! is_writable(realpath($directory))) + { + throw new Kohana_Exception('Directory :dir must be writable', + array(':dir' => Debug::path($directory))); + } + + // Make the filename into a complete path + $filename = realpath($directory).DIRECTORY_SEPARATOR.$filename; + + if (move_uploaded_file($file['tmp_name'], $filename)) + { + if ($chmod !== FALSE) + { + // Set permissions on filename + chmod($filename, $chmod); + } + + // Return new file path + return $filename; + } + + return FALSE; + } + + /** + * Tests if upload data is valid, even if no file was uploaded. If you + * _do_ require a file to be uploaded, add the [Upload::not_empty] rule + * before this rule. + * + * $array->rule('file', 'Upload::valid') + * + * @param array $file $_FILES item + * @return bool + */ + public static function valid($file) + { + return (isset($file['error']) + AND isset($file['name']) + AND isset($file['type']) + AND isset($file['tmp_name']) + AND isset($file['size'])); + } + + /** + * Tests if a successful upload has been made. + * + * $array->rule('file', 'Upload::not_empty'); + * + * @param array $file $_FILES item + * @return bool + */ + public static function not_empty(array $file) + { + return (isset($file['error']) + AND isset($file['tmp_name']) + AND $file['error'] === UPLOAD_ERR_OK + AND is_uploaded_file($file['tmp_name'])); + } + + /** + * Test if an uploaded file is an allowed file type, by extension. + * + * $array->rule('file', 'Upload::type', array(':value', array('jpg', 'png', 'gif'))); + * + * @param array $file $_FILES item + * @param array $allowed allowed file extensions + * @return bool + */ + public static function type(array $file, array $allowed) + { + if ($file['error'] !== UPLOAD_ERR_OK) + return TRUE; + + $ext = strtolower(pathinfo($file['name'], PATHINFO_EXTENSION)); + + return in_array($ext, $allowed); + } + + /** + * Validation rule to test if an uploaded file is allowed by file size. + * File sizes are defined as: SB, where S is the size (1, 8.5, 300, etc.) + * and B is the byte unit (K, MiB, GB, etc.). All valid byte units are + * defined in Num::$byte_units + * + * $array->rule('file', 'Upload::size', array(':value', '1M')) + * $array->rule('file', 'Upload::size', array(':value', '2.5KiB')) + * + * @param array $file $_FILES item + * @param string $size maximum file size allowed + * @return bool + */ + public static function size(array $file, $size) + { + if ($file['error'] === UPLOAD_ERR_INI_SIZE) + { + // Upload is larger than PHP allowed size (upload_max_filesize) + return FALSE; + } + + if ($file['error'] !== UPLOAD_ERR_OK) + { + // The upload failed, no size to check + return TRUE; + } + + // Convert the provided size to bytes for comparison + $size = Num::bytes($size); + + // Test that the file is under or equal to the max size + return ($file['size'] <= $size); + } + + /** + * Validation rule to test if an upload is an image and, optionally, is the correct size. + * + * // The "image" file must be an image + * $array->rule('image', 'Upload::image') + * + * // The "photo" file has a maximum size of 640x480 pixels + * $array->rule('photo', 'Upload::image', array(':value', 640, 480)); + * + * // The "image" file must be exactly 100x100 pixels + * $array->rule('image', 'Upload::image', array(':value', 100, 100, TRUE)); + * + * + * @param array $file $_FILES item + * @param integer $max_width maximum width of image + * @param integer $max_height maximum height of image + * @param boolean $exact match width and height exactly? + * @return boolean + */ + public static function image(array $file, $max_width = NULL, $max_height = NULL, $exact = FALSE) + { + if (Upload::not_empty($file)) + { + try + { + // Get the width and height from the uploaded image + list($width, $height) = getimagesize($file['tmp_name']); + } + catch (ErrorException $e) + { + // Ignore read errors + } + + if (empty($width) OR empty($height)) + { + // Cannot get image size, cannot validate + return FALSE; + } + + if ( ! $max_width) + { + // No limit, use the image width + $max_width = $width; + } + + if ( ! $max_height) + { + // No limit, use the image height + $max_height = $height; + } + + if ($exact) + { + // Check if dimensions match exactly + return ($width === $max_width AND $height === $max_height); + } + else + { + // Check if size is within maximum dimensions + return ($width <= $max_width AND $height <= $max_height); + } + } + + return FALSE; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Valid.php b/~dev_rating/system/classes/Kohana/Valid.php new file mode 100644 index 0000000000000000000000000000000000000000..9c14b0e06996d077a7a4f2982035a88800e051c6 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Valid.php @@ -0,0 +1,551 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Validation rules. + * + * @package Kohana + * @category Security + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Valid { + + /** + * Checks if a field is not empty. + * + * @return boolean + */ + public static function not_empty($value) + { + if (is_object($value) AND $value instanceof ArrayObject) + { + // Get the array from the ArrayObject + $value = $value->getArrayCopy(); + } + + // Value cannot be NULL, FALSE, '', or an empty array + return ! in_array($value, array(NULL, FALSE, '', array()), TRUE); + } + + /** + * Checks a field against a regular expression. + * + * @param string $value value + * @param string $expression regular expression to match (including delimiters) + * @return boolean + */ + public static function regex($value, $expression) + { + return (bool) preg_match($expression, (string) $value); + } + + /** + * Checks that a field is long enough. + * + * @param string $value value + * @param integer $length minimum length required + * @return boolean + */ + public static function min_length($value, $length) + { + return UTF8::strlen($value) >= $length; + } + + /** + * Checks that a field is short enough. + * + * @param string $value value + * @param integer $length maximum length required + * @return boolean + */ + public static function max_length($value, $length) + { + return UTF8::strlen($value) <= $length; + } + + /** + * Checks that a field is exactly the right length. + * + * @param string $value value + * @param integer|array $length exact length required, or array of valid lengths + * @return boolean + */ + public static function exact_length($value, $length) + { + if (is_array($length)) + { + foreach ($length as $strlen) + { + if (UTF8::strlen($value) === $strlen) + return TRUE; + } + return FALSE; + } + + return UTF8::strlen($value) === $length; + } + + /** + * Checks that a field is exactly the value required. + * + * @param string $value value + * @param string $required required value + * @return boolean + */ + public static function equals($value, $required) + { + return ($value === $required); + } + + /** + * Check an email address for correct format. + * + * @link http://www.iamcal.com/publish/articles/php/parsing_email/ + * @link http://www.w3.org/Protocols/rfc822/ + * + * @param string $email email address + * @param boolean $strict strict RFC compatibility + * @return boolean + */ + public static function email($email, $strict = FALSE) + { + if (UTF8::strlen($email) > 254) + { + return FALSE; + } + + if ($strict === TRUE) + { + $qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]'; + $dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]'; + $atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+'; + $pair = '\\x5c[\\x00-\\x7f]'; + + $domain_literal = "\\x5b($dtext|$pair)*\\x5d"; + $quoted_string = "\\x22($qtext|$pair)*\\x22"; + $sub_domain = "($atom|$domain_literal)"; + $word = "($atom|$quoted_string)"; + $domain = "$sub_domain(\\x2e$sub_domain)*"; + $local_part = "$word(\\x2e$word)*"; + + $expression = "/^$local_part\\x40$domain$/D"; + } + else + { + $expression = '/^[-_a-z0-9\'+*$^&%=~!?{}]++(?:\.[-_a-z0-9\'+*$^&%=~!?{}]+)*+@(?:(?![-.])[-a-z0-9.]+(?<![-.])\.[a-z]{2,6}|\d{1,3}(?:\.\d{1,3}){3})$/iD'; + } + + return (bool) preg_match($expression, (string) $email); + } + + /** + * Validate the domain of an email address by checking if the domain has a + * valid MX record. + * + * @link http://php.net/checkdnsrr not added to Windows until PHP 5.3.0 + * + * @param string $email email address + * @return boolean + */ + public static function email_domain($email) + { + if ( ! Valid::not_empty($email)) + return FALSE; // Empty fields cause issues with checkdnsrr() + + // Check if the email domain has a valid MX record + return (bool) checkdnsrr(preg_replace('/^[^@]++@/', '', $email), 'MX'); + } + + /** + * Validate a URL. + * + * @param string $url URL + * @return boolean + */ + public static function url($url) + { + // Based on http://www.apps.ietf.org/rfc/rfc1738.html#sec-5 + if ( ! preg_match( + '~^ + + # scheme + [-a-z0-9+.]++:// + + # username:password (optional) + (?: + [-a-z0-9$_.+!*\'(),;?&=%]++ # username + (?::[-a-z0-9$_.+!*\'(),;?&=%]++)? # password (optional) + @ + )? + + (?: + # ip address + \d{1,3}+(?:\.\d{1,3}+){3}+ + + | # or + + # hostname (captured) + ( + (?!-)[-a-z0-9]{1,63}+(?<!-) + (?:\.(?!-)[-a-z0-9]{1,63}+(?<!-)){0,126}+ + ) + ) + + # port (optional) + (?::\d{1,5}+)? + + # path (optional) + (?:/.*)? + + $~iDx', $url, $matches)) + return FALSE; + + // We matched an IP address + if ( ! isset($matches[1])) + return TRUE; + + // Check maximum length of the whole hostname + // http://en.wikipedia.org/wiki/Domain_name#cite_note-0 + if (strlen($matches[1]) > 253) + return FALSE; + + // An extra check for the top level domain + // It must start with a letter + $tld = ltrim(substr($matches[1], (int) strrpos($matches[1], '.')), '.'); + return ctype_alpha($tld[0]); + } + + /** + * Validate an IP. + * + * @param string $ip IP address + * @param boolean $allow_private allow private IP networks + * @return boolean + */ + public static function ip($ip, $allow_private = TRUE) + { + // Do not allow reserved addresses + $flags = FILTER_FLAG_NO_RES_RANGE; + + if ($allow_private === FALSE) + { + // Do not allow private or reserved addresses + $flags = $flags | FILTER_FLAG_NO_PRIV_RANGE; + } + + return (bool) filter_var($ip, FILTER_VALIDATE_IP, $flags); + } + + /** + * Validates a credit card number, with a Luhn check if possible. + * + * @param integer $number credit card number + * @param string|array $type card type, or an array of card types + * @return boolean + * @uses Valid::luhn + */ + public static function credit_card($number, $type = NULL) + { + // Remove all non-digit characters from the number + if (($number = preg_replace('/\D+/', '', $number)) === '') + return FALSE; + + if ($type == NULL) + { + // Use the default type + $type = 'default'; + } + elseif (is_array($type)) + { + foreach ($type as $t) + { + // Test each type for validity + if (Valid::credit_card($number, $t)) + return TRUE; + } + + return FALSE; + } + + $cards = Kohana::$config->load('credit_cards'); + + // Check card type + $type = strtolower($type); + + if ( ! isset($cards[$type])) + return FALSE; + + // Check card number length + $length = strlen($number); + + // Validate the card length by the card type + if ( ! in_array($length, preg_split('/\D+/', $cards[$type]['length']))) + return FALSE; + + // Check card number prefix + if ( ! preg_match('/^'.$cards[$type]['prefix'].'/', $number)) + return FALSE; + + // No Luhn check required + if ($cards[$type]['luhn'] == FALSE) + return TRUE; + + return Valid::luhn($number); + } + + /** + * Validate a number against the [Luhn](http://en.wikipedia.org/wiki/Luhn_algorithm) + * (mod10) formula. + * + * @param string $number number to check + * @return boolean + */ + public static function luhn($number) + { + // Force the value to be a string as this method uses string functions. + // Converting to an integer may pass PHP_INT_MAX and result in an error! + $number = (string) $number; + + if ( ! ctype_digit($number)) + { + // Luhn can only be used on numbers! + return FALSE; + } + + // Check number length + $length = strlen($number); + + // Checksum of the card number + $checksum = 0; + + for ($i = $length - 1; $i >= 0; $i -= 2) + { + // Add up every 2nd digit, starting from the right + $checksum += substr($number, $i, 1); + } + + for ($i = $length - 2; $i >= 0; $i -= 2) + { + // Add up every 2nd digit doubled, starting from the right + $double = substr($number, $i, 1) * 2; + + // Subtract 9 from the double where value is greater than 10 + $checksum += ($double >= 10) ? ($double - 9) : $double; + } + + // If the checksum is a multiple of 10, the number is valid + return ($checksum % 10 === 0); + } + + /** + * Checks if a phone number is valid. + * + * @param string $number phone number to check + * @param array $lengths + * @return boolean + */ + public static function phone($number, $lengths = NULL) + { + if ( ! is_array($lengths)) + { + $lengths = array(7,10,11); + } + + // Remove all non-digit characters from the number + $number = preg_replace('/\D+/', '', $number); + + // Check if the number is within range + return in_array(strlen($number), $lengths); + } + + /** + * Tests if a string is a valid date string. + * + * @param string $str date to check + * @return boolean + */ + public static function date($str) + { + return (strtotime($str) !== FALSE); + } + + /** + * Checks whether a string consists of alphabetical characters only. + * + * @param string $str input string + * @param boolean $utf8 trigger UTF-8 compatibility + * @return boolean + */ + public static function alpha($str, $utf8 = FALSE) + { + $str = (string) $str; + + if ($utf8 === TRUE) + { + return (bool) preg_match('/^\pL++$/uD', $str); + } + else + { + return ctype_alpha($str); + } + } + + /** + * Checks whether a string consists of alphabetical characters and numbers only. + * + * @param string $str input string + * @param boolean $utf8 trigger UTF-8 compatibility + * @return boolean + */ + public static function alpha_numeric($str, $utf8 = FALSE) + { + if ($utf8 === TRUE) + { + return (bool) preg_match('/^[\pL\pN]++$/uD', $str); + } + else + { + return ctype_alnum($str); + } + } + + /** + * Checks whether a string consists of alphabetical characters, numbers, underscores and dashes only. + * + * @param string $str input string + * @param boolean $utf8 trigger UTF-8 compatibility + * @return boolean + */ + public static function alpha_dash($str, $utf8 = FALSE) + { + if ($utf8 === TRUE) + { + $regex = '/^[-\pL\pN_]++$/uD'; + } + else + { + $regex = '/^[-a-z0-9_]++$/iD'; + } + + return (bool) preg_match($regex, $str); + } + + /** + * Checks whether a string consists of digits only (no dots or dashes). + * + * @param string $str input string + * @param boolean $utf8 trigger UTF-8 compatibility + * @return boolean + */ + public static function digit($str, $utf8 = FALSE) + { + if ($utf8 === TRUE) + { + return (bool) preg_match('/^\pN++$/uD', $str); + } + else + { + return (is_int($str) AND $str >= 0) OR ctype_digit($str); + } + } + + /** + * Checks whether a string is a valid number (negative and decimal numbers allowed). + * + * Uses {@link http://www.php.net/manual/en/function.localeconv.php locale conversion} + * to allow decimal point to be locale specific. + * + * @param string $str input string + * @return boolean + */ + public static function numeric($str) + { + // Get the decimal point for the current locale + list($decimal) = array_values(localeconv()); + + // A lookahead is used to make sure the string contains at least one digit (before or after the decimal point) + return (bool) preg_match('/^-?+(?=.*[0-9])[0-9]*+'.preg_quote($decimal).'?+[0-9]*+$/D', (string) $str); + } + + /** + * Tests if a number is within a range. + * + * @param string $number number to check + * @param integer $min minimum value + * @param integer $max maximum value + * @param integer $step increment size + * @return boolean + */ + public static function range($number, $min, $max, $step = NULL) + { + if ($number < $min OR $number > $max) + { + // Number is outside of range + return FALSE; + } + + if ( ! $step) + { + // Default to steps of 1 + $step = 1; + } + + // Check step requirements + return (($number - $min) % $step === 0); + } + + /** + * Checks if a string is a proper decimal format. Optionally, a specific + * number of digits can be checked too. + * + * @param string $str number to check + * @param integer $places number of decimal places + * @param integer $digits number of digits + * @return boolean + */ + public static function decimal($str, $places = 2, $digits = NULL) + { + if ($digits > 0) + { + // Specific number of digits + $digits = '{'.( (int) $digits).'}'; + } + else + { + // Any number of digits + $digits = '+'; + } + + // Get the decimal point for the current locale + list($decimal) = array_values(localeconv()); + + return (bool) preg_match('/^[+-]?[0-9]'.$digits.preg_quote($decimal).'[0-9]{'.( (int) $places).'}$/D', $str); + } + + /** + * Checks if a string is a proper hexadecimal HTML color value. The validation + * is quite flexible as it does not require an initial "#" and also allows for + * the short notation using only three instead of six hexadecimal characters. + * + * @param string $str input string + * @return boolean + */ + public static function color($str) + { + return (bool) preg_match('/^#?+[0-9a-f]{3}(?:[0-9a-f]{3})?$/iD', $str); + } + + /** + * Checks if a field matches the value of another field. + * + * @param array $array array of values + * @param string $field field name + * @param string $match field name to match + * @return boolean + */ + public static function matches($array, $field, $match) + { + return ($array[$field] === $array[$match]); + } + +} diff --git a/~dev_rating/system/classes/Kohana/Validation.php b/~dev_rating/system/classes/Kohana/Validation.php new file mode 100644 index 0000000000000000000000000000000000000000..4b46497e49c956667d1116eb7d98a007fd37b1ef --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Validation.php @@ -0,0 +1,612 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Array and variable validation. + * + * @package Kohana + * @category Security + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Validation implements ArrayAccess { + + /** + * Creates a new Validation instance. + * + * @param array $array array to use for validation + * @return Validation + */ + public static function factory(array $array) + { + return new Validation($array); + } + + // Bound values + protected $_bound = array(); + + // Field rules + protected $_rules = array(); + + // Field labels + protected $_labels = array(); + + // Rules that are executed even when the value is empty + protected $_empty_rules = array('not_empty', 'matches'); + + // Error list, field => rule + protected $_errors = array(); + + // Array to validate + protected $_data = array(); + + /** + * Sets the unique "any field" key and creates an ArrayObject from the + * passed array. + * + * @param array $array array to validate + * @return void + */ + public function __construct(array $array) + { + $this->_data = $array; + } + + /** + * Throws an exception because Validation is read-only. + * Implements ArrayAccess method. + * + * @throws Kohana_Exception + * @param string $offset key to set + * @param mixed $value value to set + * @return void + */ + public function offsetSet($offset, $value) + { + throw new Kohana_Exception('Validation objects are read-only.'); + } + + /** + * Checks if key is set in array data. + * Implements ArrayAccess method. + * + * @param string $offset key to check + * @return bool whether the key is set + */ + public function offsetExists($offset) + { + return isset($this->_data[$offset]); + } + + /** + * Throws an exception because Validation is read-only. + * Implements ArrayAccess method. + * + * @throws Kohana_Exception + * @param string $offset key to unset + * @return void + */ + public function offsetUnset($offset) + { + throw new Kohana_Exception('Validation objects are read-only.'); + } + + /** + * Gets a value from the array data. + * Implements ArrayAccess method. + * + * @param string $offset key to return + * @return mixed value from array + */ + public function offsetGet($offset) + { + return $this->_data[$offset]; + } + + /** + * Copies the current rules to a new array. + * + * $copy = $array->copy($new_data); + * + * @param array $array new data set + * @return Validation + * @since 3.0.5 + */ + public function copy(array $array) + { + // Create a copy of the current validation set + $copy = clone $this; + + // Replace the data set + $copy->_data = $array; + + return $copy; + } + + /** + * Returns the array representation of the current object. + * Deprecated in favor of [Validation::data] + * + * @deprecated + * @return array + */ + public function as_array() + { + return $this->_data; + } + + /** + * Returns the array of data to be validated. + * + * @return array + */ + public function data() + { + return $this->_data; + } + + /** + * Sets or overwrites the label name for a field. + * + * @param string $field field name + * @param string $label label + * @return $this + */ + public function label($field, $label) + { + // Set the label for this field + $this->_labels[$field] = $label; + + return $this; + } + + /** + * Sets labels using an array. + * + * @param array $labels list of field => label names + * @return $this + */ + public function labels(array $labels) + { + $this->_labels = $labels + $this->_labels; + + return $this; + } + + /** + * Overwrites or appends rules to a field. Each rule will be executed once. + * All rules must be string names of functions method names. Parameters must + * match the parameters of the callback function exactly + * + * Aliases you can use in callback parameters: + * - :validation - the validation object + * - :field - the field name + * - :value - the value of the field + * + * // The "username" must not be empty and have a minimum length of 4 + * $validation->rule('username', 'not_empty') + * ->rule('username', 'min_length', array(':value', 4)); + * + * // The "password" field must match the "password_repeat" field + * $validation->rule('password', 'matches', array(':validation', 'password', 'password_repeat')); + * + * // Using closure (anonymous function) + * $validation->rule('index', + * function(Validation $array, $field, $value) + * { + * if ($value > 6 AND $value < 10) + * { + * $array->error($field, 'custom'); + * } + * } + * , array(':validation', ':field', ':value') + * ); + * + * [!!] Errors must be added manually when using closures! + * + * @param string $field field name + * @param callback $rule valid PHP callback or closure + * @param array $params extra parameters for the rule + * @return $this + */ + public function rule($field, $rule, array $params = NULL) + { + if ($params === NULL) + { + // Default to array(':value') + $params = array(':value'); + } + + if ($field !== TRUE AND ! isset($this->_labels[$field])) + { + // Set the field label to the field name + $this->_labels[$field] = preg_replace('/[^\pL]+/u', ' ', $field); + } + + // Store the rule and params for this rule + $this->_rules[$field][] = array($rule, $params); + + return $this; + } + + /** + * Add rules using an array. + * + * @param string $field field name + * @param array $rules list of callbacks + * @return $this + */ + public function rules($field, array $rules) + { + foreach ($rules as $rule) + { + $this->rule($field, $rule[0], Arr::get($rule, 1)); + } + + return $this; + } + + /** + * Bind a value to a parameter definition. + * + * // This allows you to use :model in the parameter definition of rules + * $validation->bind(':model', $model) + * ->rule('status', 'valid_status', array(':model')); + * + * @param string $key variable name or an array of variables + * @param mixed $value value + * @return $this + */ + public function bind($key, $value = NULL) + { + if (is_array($key)) + { + foreach ($key as $name => $value) + { + $this->_bound[$name] = $value; + } + } + else + { + $this->_bound[$key] = $value; + } + + return $this; + } + + /** + * Executes all validation rules. This should + * typically be called within an if/else block. + * + * if ($validation->check()) + * { + * // The data is valid, do something here + * } + * + * @return boolean + */ + public function check() + { + if (Kohana::$profiling === TRUE) + { + // Start a new benchmark + $benchmark = Profiler::start('Validation', __FUNCTION__); + } + + // New data set + $data = $this->_errors = array(); + + // Store the original data because this class should not modify it post-validation + $original = $this->_data; + + // Get a list of the expected fields + $expected = Arr::merge(array_keys($original), array_keys($this->_labels)); + + // Import the rules locally + $rules = $this->_rules; + + foreach ($expected as $field) + { + // Use the submitted value or NULL if no data exists + $data[$field] = Arr::get($this, $field); + + if (isset($rules[TRUE])) + { + if ( ! isset($rules[$field])) + { + // Initialize the rules for this field + $rules[$field] = array(); + } + + // Append the rules + $rules[$field] = array_merge($rules[$field], $rules[TRUE]); + } + } + + // Overload the current array with the new one + $this->_data = $data; + + // Remove the rules that apply to every field + unset($rules[TRUE]); + + // Bind the validation object to :validation + $this->bind(':validation', $this); + // Bind the data to :data + $this->bind(':data', $this->_data); + + // Execute the rules + foreach ($rules as $field => $set) + { + // Get the field value + $value = $this[$field]; + + // Bind the field name and value to :field and :value respectively + $this->bind(array + ( + ':field' => $field, + ':value' => $value, + )); + + foreach ($set as $array) + { + // Rules are defined as array($rule, $params) + list($rule, $params) = $array; + + foreach ($params as $key => $param) + { + if (is_string($param) AND array_key_exists($param, $this->_bound)) + { + // Replace with bound value + $params[$key] = $this->_bound[$param]; + } + } + + // Default the error name to be the rule (except array and lambda rules) + $error_name = $rule; + + if (is_array($rule)) + { + // Allows rule('field', array(':model', 'some_rule')); + if (is_string($rule[0]) AND array_key_exists($rule[0], $this->_bound)) + { + // Replace with bound value + $rule[0] = $this->_bound[$rule[0]]; + } + + // This is an array callback, the method name is the error name + $error_name = $rule[1]; + $passed = call_user_func_array($rule, $params); + } + elseif ( ! is_string($rule)) + { + // This is a lambda function, there is no error name (errors must be added manually) + $error_name = FALSE; + $passed = call_user_func_array($rule, $params); + } + elseif (method_exists('Valid', $rule)) + { + // Use a method in this object + $method = new ReflectionMethod('Valid', $rule); + + // Call static::$rule($this[$field], $param, ...) with Reflection + $passed = $method->invokeArgs(NULL, $params); + } + elseif (strpos($rule, '::') === FALSE) + { + // Use a function call + $function = new ReflectionFunction($rule); + + // Call $function($this[$field], $param, ...) with Reflection + $passed = $function->invokeArgs($params); + } + else + { + // Split the class and method of the rule + list($class, $method) = explode('::', $rule, 2); + + // Use a static method call + $method = new ReflectionMethod($class, $method); + + // Call $Class::$method($this[$field], $param, ...) with Reflection + $passed = $method->invokeArgs(NULL, $params); + } + + // Ignore return values from rules when the field is empty + if ( ! in_array($rule, $this->_empty_rules) AND ! Valid::not_empty($value)) + continue; + + if ($passed === FALSE AND $error_name !== FALSE) + { + // Add the rule to the errors + $this->error($field, $error_name, $params); + + // This field has an error, stop executing rules + break; + } + elseif (isset($this->_errors[$field])) + { + // The callback added the error manually, stop checking rules + break; + } + } + } + + // Restore the data to its original form + $this->_data = $original; + + if (isset($benchmark)) + { + // Stop benchmarking + Profiler::stop($benchmark); + } + + return empty($this->_errors); + } + + /** + * Add an error to a field. + * + * @param string $field field name + * @param string $error error message + * @param array $params + * @return $this + */ + public function error($field, $error, array $params = NULL) + { + $this->_errors[$field] = array($error, $params); + + return $this; + } + + /** + * Returns the error messages. If no file is specified, the error message + * will be the name of the rule that failed. When a file is specified, the + * message will be loaded from "field/rule", or if no rule-specific message + * exists, "field/default" will be used. If neither is set, the returned + * message will be "file/field/rule". + * + * By default all messages are translated using the default language. + * A string can be used as the second parameter to specified the language + * that the message was written in. + * + * // Get errors from messages/forms/login.php + * $errors = $Validation->errors('forms/login'); + * + * @uses Kohana::message + * @param string $file file to load error messages from + * @param mixed $translate translate the message + * @return array + */ + public function errors($file = NULL, $translate = TRUE) + { + if ($file === NULL) + { + // Return the error list + return $this->_errors; + } + + // Create a new message list + $messages = array(); + + foreach ($this->_errors as $field => $set) + { + list($error, $params) = $set; + + // Get the label for this field + $label = $this->_labels[$field]; + + if ($translate) + { + if (is_string($translate)) + { + // Translate the label using the specified language + $label = __($label, NULL, $translate); + } + else + { + // Translate the label + $label = __($label); + } + } + + // Start the translation values list + $values = array( + ':field' => $label, + ':value' => Arr::get($this, $field), + ); + + if (is_array($values[':value'])) + { + // All values must be strings + $values[':value'] = implode(', ', Arr::flatten($values[':value'])); + } + + if ($params) + { + foreach ($params as $key => $value) + { + if (is_array($value)) + { + // All values must be strings + $value = implode(', ', Arr::flatten($value)); + } + elseif (is_object($value)) + { + // Objects cannot be used in message files + continue; + } + + // Check if a label for this parameter exists + if (isset($this->_labels[$value])) + { + // Use the label as the value, eg: related field name for "matches" + $value = $this->_labels[$value]; + + if ($translate) + { + if (is_string($translate)) + { + // Translate the value using the specified language + $value = __($value, NULL, $translate); + } + else + { + // Translate the value + $value = __($value); + } + } + } + + // Add each parameter as a numbered value, starting from 1 + $values[':param'.($key + 1)] = $value; + } + } + + if ($message = Kohana::message($file, "{$field}.{$error}") AND is_string($message)) + { + // Found a message for this field and error + } + elseif ($message = Kohana::message($file, "{$field}.default") AND is_string($message)) + { + // Found a default message for this field + } + elseif ($message = Kohana::message($file, $error) AND is_string($message)) + { + // Found a default message for this error + } + elseif ($message = Kohana::message('validation', $error) AND is_string($message)) + { + // Found a default message for this error + } + else + { + // No message exists, display the path expected + $message = "{$file}.{$field}.{$error}"; + } + + if ($translate) + { + if (is_string($translate)) + { + // Translate the message using specified language + $message = __($message, $values, $translate); + } + else + { + // Translate the message using the default language + $message = __($message, $values); + } + } + else + { + // Do not translate, just replace the values + $message = strtr($message, $values); + } + + // Set the message for this field + $messages[$field] = $message; + } + + return $messages; + } + +} diff --git a/~dev_rating/system/classes/Kohana/Validation/Exception.php b/~dev_rating/system/classes/Kohana/Validation/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..f22ed3616d7dd7e860df1068b8caa868ffbff91c --- /dev/null +++ b/~dev_rating/system/classes/Kohana/Validation/Exception.php @@ -0,0 +1,29 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Validation_Exception extends Kohana_Exception { + + /** + * @var object Validation instance + */ + public $array; + + /** + * @param Validation $array Validation object + * @param string $message error message + * @param array $values translation variables + * @param int $code the exception code + */ + public function __construct(Validation $array, $message = 'Failed to validate array', array $values = NULL, $code = 0, Exception $previous = NULL) + { + $this->array = $array; + + parent::__construct($message, $values, $code, $previous); + } + +} diff --git a/~dev_rating/system/classes/Kohana/View.php b/~dev_rating/system/classes/Kohana/View.php new file mode 100644 index 0000000000000000000000000000000000000000..662a9327a3f52474b74be129ba837592fa5a90ed --- /dev/null +++ b/~dev_rating/system/classes/Kohana/View.php @@ -0,0 +1,351 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Acts as an object wrapper for HTML pages with embedded PHP, called "views". + * Variables can be assigned with the view object and referenced locally within + * the view. + * + * @package Kohana + * @category Base + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_View { + + // Array of global variables + protected static $_global_data = array(); + + /** + * Returns a new View object. If you do not define the "file" parameter, + * you must call [View::set_filename]. + * + * $view = View::factory($file); + * + * @param string $file view filename + * @param array $data array of values + * @return View + */ + public static function factory($file = NULL, array $data = NULL) + { + return new View($file, $data); + } + + /** + * Captures the output that is generated when a view is included. + * The view data will be extracted to make local variables. This method + * is static to prevent object scope resolution. + * + * $output = View::capture($file, $data); + * + * @param string $kohana_view_filename filename + * @param array $kohana_view_data variables + * @return string + */ + protected static function capture($kohana_view_filename, array $kohana_view_data) + { + // Import the view variables to local namespace + extract($kohana_view_data, EXTR_SKIP); + + if (View::$_global_data) + { + // Import the global view variables to local namespace + extract(View::$_global_data, EXTR_SKIP | EXTR_REFS); + } + + // Capture the view output + ob_start(); + + try + { + // Load the view within the current scope + include $kohana_view_filename; + } + catch (Exception $e) + { + // Delete the output buffer + ob_end_clean(); + + // Re-throw the exception + throw $e; + } + + // Get the captured output and close the buffer + return ob_get_clean(); + } + + /** + * Sets a global variable, similar to [View::set], except that the + * variable will be accessible to all views. + * + * View::set_global($name, $value); + * + * @param string $key variable name or an array of variables + * @param mixed $value value + * @return void + */ + public static function set_global($key, $value = NULL) + { + if (is_array($key)) + { + foreach ($key as $key2 => $value) + { + View::$_global_data[$key2] = $value; + } + } + else + { + View::$_global_data[$key] = $value; + } + } + + /** + * Assigns a global variable by reference, similar to [View::bind], except + * that the variable will be accessible to all views. + * + * View::bind_global($key, $value); + * + * @param string $key variable name + * @param mixed $value referenced variable + * @return void + */ + public static function bind_global($key, & $value) + { + View::$_global_data[$key] =& $value; + } + + // View filename + protected $_file; + + // Array of local variables + protected $_data = array(); + + /** + * Sets the initial view filename and local data. Views should almost + * always only be created using [View::factory]. + * + * $view = new View($file); + * + * @param string $file view filename + * @param array $data array of values + * @return void + * @uses View::set_filename + */ + public function __construct($file = NULL, array $data = NULL) + { + if ($file !== NULL) + { + $this->set_filename($file); + } + + if ($data !== NULL) + { + // Add the values to the current data + $this->_data = $data + $this->_data; + } + } + + /** + * Magic method, searches for the given variable and returns its value. + * Local variables will be returned before global variables. + * + * $value = $view->foo; + * + * [!!] If the variable has not yet been set, an exception will be thrown. + * + * @param string $key variable name + * @return mixed + * @throws Kohana_Exception + */ + public function & __get($key) + { + if (array_key_exists($key, $this->_data)) + { + return $this->_data[$key]; + } + elseif (array_key_exists($key, View::$_global_data)) + { + return View::$_global_data[$key]; + } + else + { + throw new Kohana_Exception('View variable is not set: :var', + array(':var' => $key)); + } + } + + /** + * Magic method, calls [View::set] with the same parameters. + * + * $view->foo = 'something'; + * + * @param string $key variable name + * @param mixed $value value + * @return void + */ + public function __set($key, $value) + { + $this->set($key, $value); + } + + /** + * Magic method, determines if a variable is set. + * + * isset($view->foo); + * + * [!!] `NULL` variables are not considered to be set by [isset](http://php.net/isset). + * + * @param string $key variable name + * @return boolean + */ + public function __isset($key) + { + return (isset($this->_data[$key]) OR isset(View::$_global_data[$key])); + } + + /** + * Magic method, unsets a given variable. + * + * unset($view->foo); + * + * @param string $key variable name + * @return void + */ + public function __unset($key) + { + unset($this->_data[$key], View::$_global_data[$key]); + } + + /** + * Magic method, returns the output of [View::render]. + * + * @return string + * @uses View::render + */ + public function __toString() + { + try + { + return $this->render(); + } + catch (Exception $e) + { + /** + * Display the exception message. + * + * We use this method here because it's impossible to throw an + * exception from __toString(). + */ + $error_response = Kohana_Exception::_handler($e); + + return $error_response->body(); + } + } + + /** + * Sets the view filename. + * + * $view->set_filename($file); + * + * @param string $file view filename + * @return View + * @throws View_Exception + */ + public function set_filename($file) + { + if (($path = Kohana::find_file('views', $file)) === FALSE) + { + throw new View_Exception('The requested view :file could not be found', array( + ':file' => $file, + )); + } + + // Store the file path locally + $this->_file = $path; + + return $this; + } + + /** + * Assigns a variable by name. Assigned values will be available as a + * variable within the view file: + * + * // This value can be accessed as $foo within the view + * $view->set('foo', 'my value'); + * + * You can also use an array to set several values at once: + * + * // Create the values $food and $beverage in the view + * $view->set(array('food' => 'bread', 'beverage' => 'water')); + * + * @param string $key variable name or an array of variables + * @param mixed $value value + * @return $this + */ + public function set($key, $value = NULL) + { + if (is_array($key)) + { + foreach ($key as $name => $value) + { + $this->_data[$name] = $value; + } + } + else + { + $this->_data[$key] = $value; + } + + return $this; + } + + /** + * Assigns a value by reference. The benefit of binding is that values can + * be altered without re-setting them. It is also possible to bind variables + * before they have values. Assigned values will be available as a + * variable within the view file: + * + * // This reference can be accessed as $ref within the view + * $view->bind('ref', $bar); + * + * @param string $key variable name + * @param mixed $value referenced variable + * @return $this + */ + public function bind($key, & $value) + { + $this->_data[$key] =& $value; + + return $this; + } + + /** + * Renders the view object to a string. Global and local data are merged + * and extracted to create local variables within the view file. + * + * $output = $view->render(); + * + * [!!] Global variables with the same key name as local variables will be + * overwritten by the local variable. + * + * @param string $file view filename + * @return string + * @throws View_Exception + * @uses View::capture + */ + public function render($file = NULL) + { + if ($file !== NULL) + { + $this->set_filename($file); + } + + if (empty($this->_file)) + { + throw new View_Exception('You must set the file to use within your view before rendering'); + } + + // Combine local and global data and capture the output + return View::capture($this->_file, $this->_data); + } + +} diff --git a/~dev_rating/system/classes/Kohana/View/Exception.php b/~dev_rating/system/classes/Kohana/View/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..461e9367caa84e48f82e03d7a9e931b9db02da42 --- /dev/null +++ b/~dev_rating/system/classes/Kohana/View/Exception.php @@ -0,0 +1,9 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * @package Kohana + * @category Exceptions + * @author Kohana Team + * @copyright (c) 2009-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_View_Exception extends Kohana_Exception {} diff --git a/~dev_rating/system/classes/Log.php b/~dev_rating/system/classes/Log.php new file mode 100644 index 0000000000000000000000000000000000000000..44ad17c42f56620cca4b1918540dd5d95427a4e5 --- /dev/null +++ b/~dev_rating/system/classes/Log.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Log extends Kohana_Log {} diff --git a/~dev_rating/system/classes/Log/File.php b/~dev_rating/system/classes/Log/File.php new file mode 100644 index 0000000000000000000000000000000000000000..747e08b573dd792e7c21d696f2120163cbc923c6 --- /dev/null +++ b/~dev_rating/system/classes/Log/File.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Log_File extends Kohana_Log_File {} diff --git a/~dev_rating/system/classes/Log/StdErr.php b/~dev_rating/system/classes/Log/StdErr.php new file mode 100644 index 0000000000000000000000000000000000000000..2b7dfafe663666b367dbe65b9a65c8845c89e1df --- /dev/null +++ b/~dev_rating/system/classes/Log/StdErr.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Log_StdErr extends Kohana_Log_StdErr {} diff --git a/~dev_rating/system/classes/Log/StdOut.php b/~dev_rating/system/classes/Log/StdOut.php new file mode 100644 index 0000000000000000000000000000000000000000..fcd9fc21b89d13367001f400e1e1728a6aa3e181 --- /dev/null +++ b/~dev_rating/system/classes/Log/StdOut.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Log_StdOut extends Kohana_Log_StdOut {} diff --git a/~dev_rating/system/classes/Log/Syslog.php b/~dev_rating/system/classes/Log/Syslog.php new file mode 100644 index 0000000000000000000000000000000000000000..7c67d584f4d018fe50e2665cbee63e760751440c --- /dev/null +++ b/~dev_rating/system/classes/Log/Syslog.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Log_Syslog extends Kohana_Log_Syslog {} diff --git a/~dev_rating/system/classes/Log/Writer.php b/~dev_rating/system/classes/Log/Writer.php new file mode 100644 index 0000000000000000000000000000000000000000..93e008e0ee195d9442fdaa2a1a841eb1332fcaca --- /dev/null +++ b/~dev_rating/system/classes/Log/Writer.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Log_Writer extends Kohana_Log_Writer {} diff --git a/~dev_rating/system/classes/Model.php b/~dev_rating/system/classes/Model.php new file mode 100644 index 0000000000000000000000000000000000000000..346b2b73179977697687096836238f660d5dc489 --- /dev/null +++ b/~dev_rating/system/classes/Model.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Model extends Kohana_Model {} diff --git a/~dev_rating/system/classes/Num.php b/~dev_rating/system/classes/Num.php new file mode 100644 index 0000000000000000000000000000000000000000..4928df13fe0538e9de60355cbd1f1cc9c55e8fc4 --- /dev/null +++ b/~dev_rating/system/classes/Num.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Num extends Kohana_Num {} diff --git a/~dev_rating/system/classes/Profiler.php b/~dev_rating/system/classes/Profiler.php new file mode 100644 index 0000000000000000000000000000000000000000..5fd2e8d0d893e5c2b2d135de113612999e352ca2 --- /dev/null +++ b/~dev_rating/system/classes/Profiler.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Profiler extends Kohana_Profiler {} diff --git a/~dev_rating/system/classes/Request.php b/~dev_rating/system/classes/Request.php new file mode 100644 index 0000000000000000000000000000000000000000..051d841a6f3210520c19853ffef0546efd4fe48f --- /dev/null +++ b/~dev_rating/system/classes/Request.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Request extends Kohana_Request {} diff --git a/~dev_rating/system/classes/Request/Client.php b/~dev_rating/system/classes/Request/Client.php new file mode 100644 index 0000000000000000000000000000000000000000..1541327abd007eaf0ae06a9331bfea1c72d08817 --- /dev/null +++ b/~dev_rating/system/classes/Request/Client.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Request_Client extends Kohana_Request_Client {} diff --git a/~dev_rating/system/classes/Request/Client/Curl.php b/~dev_rating/system/classes/Request/Client/Curl.php new file mode 100644 index 0000000000000000000000000000000000000000..2461c475d0f32deb4db56c179e4076ee1c98719d --- /dev/null +++ b/~dev_rating/system/classes/Request/Client/Curl.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Request_Client_Curl extends Kohana_Request_Client_Curl {} diff --git a/~dev_rating/system/classes/Request/Client/External.php b/~dev_rating/system/classes/Request/Client/External.php new file mode 100644 index 0000000000000000000000000000000000000000..6f4ad2dba630ff4c2565262a1b36e8c63096d348 --- /dev/null +++ b/~dev_rating/system/classes/Request/Client/External.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Request_Client_External extends Kohana_Request_Client_External {} diff --git a/~dev_rating/system/classes/Request/Client/HTTP.php b/~dev_rating/system/classes/Request/Client/HTTP.php new file mode 100644 index 0000000000000000000000000000000000000000..3a9092812ea951220c3636829af434e61599e31d --- /dev/null +++ b/~dev_rating/system/classes/Request/Client/HTTP.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Request_Client_HTTP extends Kohana_Request_Client_HTTP {} diff --git a/~dev_rating/system/classes/Request/Client/Internal.php b/~dev_rating/system/classes/Request/Client/Internal.php new file mode 100644 index 0000000000000000000000000000000000000000..dbb735930fb0aed9db94116c4052fb743e7a7e7a --- /dev/null +++ b/~dev_rating/system/classes/Request/Client/Internal.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Request_Client_Internal extends Kohana_Request_Client_Internal {} diff --git a/~dev_rating/system/classes/Request/Client/Recursion/Exception.php b/~dev_rating/system/classes/Request/Client/Recursion/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..8f8b23f8b2a2d6615ea6548d9e330c04833979e6 --- /dev/null +++ b/~dev_rating/system/classes/Request/Client/Recursion/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Request_Client_Recursion_Exception extends Kohana_Request_Client_Recursion_Exception {} diff --git a/~dev_rating/system/classes/Request/Client/Stream.php b/~dev_rating/system/classes/Request/Client/Stream.php new file mode 100644 index 0000000000000000000000000000000000000000..0953c2e27e16211fd398f32a2dd40ae2be133849 --- /dev/null +++ b/~dev_rating/system/classes/Request/Client/Stream.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Request_Client_Stream extends Kohana_Request_Client_Stream {} diff --git a/~dev_rating/system/classes/Request/Exception.php b/~dev_rating/system/classes/Request/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..ba150f03b96a3d5e4542e9c24990d2da3844c7e2 --- /dev/null +++ b/~dev_rating/system/classes/Request/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Request_Exception extends Kohana_Request_Exception {} diff --git a/~dev_rating/system/classes/Response.php b/~dev_rating/system/classes/Response.php new file mode 100644 index 0000000000000000000000000000000000000000..1ceb2da16f2af48e59c7c24ff2ee802eee51af28 --- /dev/null +++ b/~dev_rating/system/classes/Response.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Response extends Kohana_Response {} diff --git a/~dev_rating/system/classes/Route.php b/~dev_rating/system/classes/Route.php new file mode 100644 index 0000000000000000000000000000000000000000..c57b07ab93a86434b0d8a91868a42c35d4fac744 --- /dev/null +++ b/~dev_rating/system/classes/Route.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Route extends Kohana_Route {} diff --git a/~dev_rating/system/classes/Security.php b/~dev_rating/system/classes/Security.php new file mode 100644 index 0000000000000000000000000000000000000000..edf671393b9b094175f3af83a713b7e62a00facc --- /dev/null +++ b/~dev_rating/system/classes/Security.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Security extends Kohana_Security {} diff --git a/~dev_rating/system/classes/Session.php b/~dev_rating/system/classes/Session.php new file mode 100644 index 0000000000000000000000000000000000000000..6923ab018cf2bd11bb916f02290991215796d1f1 --- /dev/null +++ b/~dev_rating/system/classes/Session.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +abstract class Session extends Kohana_Session {} diff --git a/~dev_rating/system/classes/Session/Cookie.php b/~dev_rating/system/classes/Session/Cookie.php new file mode 100644 index 0000000000000000000000000000000000000000..ad457b31fe6e1f23ea30292d1a2265afb0e47fdf --- /dev/null +++ b/~dev_rating/system/classes/Session/Cookie.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Session_Cookie extends Kohana_Session_Cookie {} diff --git a/~dev_rating/system/classes/Session/Exception.php b/~dev_rating/system/classes/Session/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..51760b4435e9a0ea0da2dcbc314b62225efb8cab --- /dev/null +++ b/~dev_rating/system/classes/Session/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Session_Exception extends Kohana_Session_Exception {} diff --git a/~dev_rating/system/classes/Session/Native.php b/~dev_rating/system/classes/Session/Native.php new file mode 100644 index 0000000000000000000000000000000000000000..7edccb3f9716125c6b83d9c646d5c3a0e34562d2 --- /dev/null +++ b/~dev_rating/system/classes/Session/Native.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Session_Native extends Kohana_Session_Native {} diff --git a/~dev_rating/system/classes/Text.php b/~dev_rating/system/classes/Text.php new file mode 100644 index 0000000000000000000000000000000000000000..89db1ffa372034d703fd6e884a639c21b360f4f1 --- /dev/null +++ b/~dev_rating/system/classes/Text.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Text extends Kohana_Text {} diff --git a/~dev_rating/system/classes/URL.php b/~dev_rating/system/classes/URL.php new file mode 100644 index 0000000000000000000000000000000000000000..f2a4cf0537ac64da5935b6d81a380e6f3e24aa02 --- /dev/null +++ b/~dev_rating/system/classes/URL.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class URL extends Kohana_URL {} diff --git a/~dev_rating/system/classes/UTF8.php b/~dev_rating/system/classes/UTF8.php new file mode 100644 index 0000000000000000000000000000000000000000..51c14c68a7cdaac33950437621a4127a0ef6feed --- /dev/null +++ b/~dev_rating/system/classes/UTF8.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class UTF8 extends Kohana_UTF8 {} diff --git a/~dev_rating/system/classes/UTF8/Exception.php b/~dev_rating/system/classes/UTF8/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..af92c6b3080639b2183832c59915b946e8464742 --- /dev/null +++ b/~dev_rating/system/classes/UTF8/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class UTF8_Exception extends Kohana_UTF8_Exception {} diff --git a/~dev_rating/system/classes/Upload.php b/~dev_rating/system/classes/Upload.php new file mode 100644 index 0000000000000000000000000000000000000000..041d7073905c585a33ecc4dd63ebcbf0106fcd10 --- /dev/null +++ b/~dev_rating/system/classes/Upload.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Upload extends Kohana_Upload {} diff --git a/~dev_rating/system/classes/Valid.php b/~dev_rating/system/classes/Valid.php new file mode 100644 index 0000000000000000000000000000000000000000..3d59fff55c8721d5ba74ed438e32af98827e6f11 --- /dev/null +++ b/~dev_rating/system/classes/Valid.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Valid extends Kohana_Valid {} diff --git a/~dev_rating/system/classes/Validation.php b/~dev_rating/system/classes/Validation.php new file mode 100644 index 0000000000000000000000000000000000000000..d51c21ae3a912f52d73be3c02bb6a939db128ac5 --- /dev/null +++ b/~dev_rating/system/classes/Validation.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Validation extends Kohana_Validation {} diff --git a/~dev_rating/system/classes/Validation/Exception.php b/~dev_rating/system/classes/Validation/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..f983b15120809796a90403cbc066782d61ba7259 --- /dev/null +++ b/~dev_rating/system/classes/Validation/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class Validation_Exception extends Kohana_Validation_Exception {} diff --git a/~dev_rating/system/classes/View.php b/~dev_rating/system/classes/View.php new file mode 100644 index 0000000000000000000000000000000000000000..f2c2ace770b7b1a517e5ca40f87625f430e70a41 --- /dev/null +++ b/~dev_rating/system/classes/View.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class View extends Kohana_View {} diff --git a/~dev_rating/system/classes/View/Exception.php b/~dev_rating/system/classes/View/Exception.php new file mode 100644 index 0000000000000000000000000000000000000000..7c4b242153cf28cdd105eede9cf6358d7a74a6f5 --- /dev/null +++ b/~dev_rating/system/classes/View/Exception.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +class View_Exception extends Kohana_View_Exception {} diff --git a/~dev_rating/system/composer.json b/~dev_rating/system/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..2c07aa849d84918dfff59fe47bf516e8bf5adcd1 --- /dev/null +++ b/~dev_rating/system/composer.json @@ -0,0 +1,35 @@ +{ + "name": "kohana/core", + "description": "Core system classes for the Kohana application framework", + "homepage": "http://kohanaframework.org", + "license": "BSD-3-Clause", + "keywords": ["kohana", "framework"], + "authors": [ + { + "name": "Kohana Team", + "email": "team@kohanaframework.org", + "homepage": "http://kohanaframework.org/team", + "role": "developer" + } + ], + "support": { + "issues": "http://dev.kohanaframework.org", + "forum": "http://forum.kohanaframework.org", + "irc": "irc://irc.freenode.net/kohana", + "source": "http://github.com/kohana/core" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-http": "*", + "ext-curl": "*", + "ext-mcrypt": "*" + }, + "extra": { + "branch-alias": { + "dev-3.3/develop": "3.3.x-dev", + "dev-3.4/develop": "3.4.x-dev" + } + } +} diff --git a/~dev_rating/system/config/credit_cards.php b/~dev_rating/system/config/credit_cards.php new file mode 100644 index 0000000000000000000000000000000000000000..b32424a23d53242a75419c90ded1dee6acad0fd7 --- /dev/null +++ b/~dev_rating/system/config/credit_cards.php @@ -0,0 +1,60 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Credit card validation configuration. + * + * Options for each credit card: + * length - All the allowed card number lengths, in a comma separated string + * prefix - The digits the card needs to start with, in regex format + * luhn - Enable or disable card number validation by the Luhn algorithm + */ +return array( + + 'default' => array( + 'length' => '13,14,15,16,17,18,19', + 'prefix' => '', + 'luhn' => TRUE, + ), + + 'american express' => array( + 'length' => '15', + 'prefix' => '3[47]', + 'luhn' => TRUE, + ), + + 'diners club' => array( + 'length' => '14,16', + 'prefix' => '36|55|30[0-5]', + 'luhn' => TRUE, + ), + + 'discover' => array( + 'length' => '16', + 'prefix' => '6(?:5|011)', + 'luhn' => TRUE, + ), + + 'jcb' => array( + 'length' => '15,16', + 'prefix' => '3|1800|2131', + 'luhn' => TRUE, + ), + + 'maestro' => array( + 'length' => '16,18', + 'prefix' => '50(?:20|38)|6(?:304|759)', + 'luhn' => TRUE, + ), + + 'mastercard' => array( + 'length' => '16', + 'prefix' => '5[1-5]', + 'luhn' => TRUE, + ), + + 'visa' => array( + 'length' => '13,16', + 'prefix' => '4', + 'luhn' => TRUE, + ), + +); diff --git a/~dev_rating/system/config/curl.php b/~dev_rating/system/config/curl.php new file mode 100644 index 0000000000000000000000000000000000000000..6a79da5293d1baa97a88b2f7dde4f24b074b5b02 --- /dev/null +++ b/~dev_rating/system/config/curl.php @@ -0,0 +1,10 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + CURLOPT_USERAGENT => 'Mozilla/5.0 (compatible; Kohana v'.Kohana::VERSION.' +http://kohanaframework.org/)', + CURLOPT_CONNECTTIMEOUT => 5, + CURLOPT_TIMEOUT => 5, + CURLOPT_HEADER => FALSE, + +); diff --git a/~dev_rating/system/config/encrypt.php b/~dev_rating/system/config/encrypt.php new file mode 100644 index 0000000000000000000000000000000000000000..3f9065e1911b36ecbd611d9e948608c22e7f10a1 --- /dev/null +++ b/~dev_rating/system/config/encrypt.php @@ -0,0 +1,17 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'default' => array( + /** + * The following options must be set: + * + * string key secret passphrase + * integer mode encryption mode, one of MCRYPT_MODE_* + * integer cipher encryption cipher, one of the Mcrpyt cipher constants + */ + 'cipher' => MCRYPT_RIJNDAEL_128, + 'mode' => MCRYPT_MODE_NOFB, + ), + +); diff --git a/~dev_rating/system/config/inflector.php b/~dev_rating/system/config/inflector.php new file mode 100644 index 0000000000000000000000000000000000000000..c9cfd6239e00f976c21b43aba47dba29dcd2fe54 --- /dev/null +++ b/~dev_rating/system/config/inflector.php @@ -0,0 +1,98 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'uncountable' => array( + 'access', + 'advice', + 'aircraft', + 'art', + 'baggage', + 'bison', + 'dances', + 'deer', + 'equipment', + 'fish', + 'fuel', + 'furniture', + 'heat', + 'honey', + 'homework', + 'impatience', + 'information', + 'knowledge', + 'luggage', + 'media', + 'money', + 'moose', + 'music', + 'news', + 'patience', + 'progress', + 'pollution', + 'research', + 'rice', + 'salmon', + 'sand', + 'series', + 'sheep', + 'sms', + 'spam', + 'species', + 'staff', + 'swine', + 'toothpaste', + 'traffic', + 'understanding', + 'water', + 'weather', + 'work', + ), + + 'irregular' => array( + 'appendix' => 'appendices', + 'cactus' => 'cacti', + 'calf' => 'calves', + 'child' => 'children', + 'crisis' => 'crises', + 'criterion' => 'criteria', + 'curriculum' => 'curricula', + 'diagnosis' => 'diagnoses', + 'elf' => 'elves', + 'ellipsis' => 'ellipses', + 'foot' => 'feet', + 'goose' => 'geese', + 'hero' => 'heroes', + 'hoof' => 'hooves', + 'hypothesis' => 'hypotheses', + 'is' => 'are', + 'knife' => 'knives', + 'leaf' => 'leaves', + 'life' => 'lives', + 'loaf' => 'loaves', + 'man' => 'men', + 'mouse' => 'mice', + 'nucleus' => 'nuclei', + 'oasis' => 'oases', + 'octopus' => 'octopi', + 'ox' => 'oxen', + 'paralysis' => 'paralyses', + 'parenthesis' => 'parentheses', + 'person' => 'people', + 'phenomenon' => 'phenomena', + 'potato' => 'potatoes', + 'quiz' => 'quizzes', + 'radius' => 'radii', + 'scarf' => 'scarves', + 'stimulus' => 'stimuli', + 'syllabus' => 'syllabi', + 'synthesis' => 'syntheses', + 'thief' => 'thieves', + 'tooth' => 'teeth', + 'was' => 'were', + 'wharf' => 'wharves', + 'wife' => 'wives', + 'woman' => 'women', + 'release' => 'releases', + ), +); diff --git a/~dev_rating/system/config/mimes.php b/~dev_rating/system/config/mimes.php new file mode 100644 index 0000000000000000000000000000000000000000..2e31b0b43eb9c7cba00ee160fd4e08f725a8a76f --- /dev/null +++ b/~dev_rating/system/config/mimes.php @@ -0,0 +1,226 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * A list of mime types. Our list is generally more complete and accurate than + * the operating system MIME list. + * + * If there are any missing options, please create a ticket on our issue tracker, + * http://kohanaphp.com/trac/newticket. Be sure to give the filename and + * expected MIME type, as well as any additional information you can provide. + */ +return array( + '323' => array('text/h323'), + '7z' => array('application/x-7z-compressed'), + 'abw' => array('application/x-abiword'), + 'acx' => array('application/internet-property-stream'), + 'ai' => array('application/postscript'), + 'aif' => array('audio/x-aiff'), + 'aifc' => array('audio/x-aiff'), + 'aiff' => array('audio/x-aiff'), + 'amf' => array('application/x-amf'), + 'asf' => array('video/x-ms-asf'), + 'asr' => array('video/x-ms-asf'), + 'asx' => array('video/x-ms-asf'), + 'atom' => array('application/atom+xml'), + 'avi' => array('video/avi', 'video/msvideo', 'video/x-msvideo'), + 'bin' => array('application/octet-stream','application/macbinary'), + 'bmp' => array('image/bmp'), + 'c' => array('text/x-csrc'), + 'c++' => array('text/x-c++src'), + 'cab' => array('application/x-cab'), + 'cc' => array('text/x-c++src'), + 'cda' => array('application/x-cdf'), + 'class' => array('application/octet-stream'), + 'cpp' => array('text/x-c++src'), + 'cpt' => array('application/mac-compactpro'), + 'csh' => array('text/x-csh'), + 'css' => array('text/css'), + 'csv' => array('text/x-comma-separated-values', 'application/vnd.ms-excel', 'text/comma-separated-values', 'text/csv'), + 'dbk' => array('application/docbook+xml'), + 'dcr' => array('application/x-director'), + 'deb' => array('application/x-debian-package'), + 'diff' => array('text/x-diff'), + 'dir' => array('application/x-director'), + 'divx' => array('video/divx'), + 'dll' => array('application/octet-stream', 'application/x-msdos-program'), + 'dmg' => array('application/x-apple-diskimage'), + 'dms' => array('application/octet-stream'), + 'doc' => array('application/msword'), + 'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document'), + 'dvi' => array('application/x-dvi'), + 'dxr' => array('application/x-director'), + 'eml' => array('message/rfc822'), + 'eps' => array('application/postscript'), + 'evy' => array('application/envoy'), + 'exe' => array('application/x-msdos-program', 'application/octet-stream'), + 'fla' => array('application/octet-stream'), + 'flac' => array('application/x-flac'), + 'flc' => array('video/flc'), + 'fli' => array('video/fli'), + 'flv' => array('video/x-flv'), + 'gif' => array('image/gif'), + 'gtar' => array('application/x-gtar'), + 'gz' => array('application/x-gzip'), + 'h' => array('text/x-chdr'), + 'h++' => array('text/x-c++hdr'), + 'hh' => array('text/x-c++hdr'), + 'hpp' => array('text/x-c++hdr'), + 'hqx' => array('application/mac-binhex40'), + 'hs' => array('text/x-haskell'), + 'htm' => array('text/html'), + 'html' => array('text/html'), + 'ico' => array('image/x-icon'), + 'ics' => array('text/calendar'), + 'iii' => array('application/x-iphone'), + 'ins' => array('application/x-internet-signup'), + 'iso' => array('application/x-iso9660-image'), + 'isp' => array('application/x-internet-signup'), + 'jar' => array('application/java-archive'), + 'java' => array('application/x-java-applet'), + 'jpe' => array('image/jpeg', 'image/pjpeg'), + 'jpeg' => array('image/jpeg', 'image/pjpeg'), + 'jpg' => array('image/jpeg', 'image/pjpeg'), + 'js' => array('application/javascript'), + 'json' => array('application/json'), + 'latex' => array('application/x-latex'), + 'lha' => array('application/octet-stream'), + 'log' => array('text/plain', 'text/x-log'), + 'lzh' => array('application/octet-stream'), + 'm4a' => array('audio/mpeg'), + 'm4p' => array('video/mp4v-es'), + 'm4v' => array('video/mp4'), + 'man' => array('application/x-troff-man'), + 'mdb' => array('application/x-msaccess'), + 'midi' => array('audio/midi'), + 'mid' => array('audio/midi'), + 'mif' => array('application/vnd.mif'), + 'mka' => array('audio/x-matroska'), + 'mkv' => array('video/x-matroska'), + 'mov' => array('video/quicktime'), + 'movie' => array('video/x-sgi-movie'), + 'mp2' => array('audio/mpeg'), + 'mp3' => array('audio/mpeg'), + 'mp4' => array('application/mp4','audio/mp4','video/mp4'), + 'mpa' => array('video/mpeg'), + 'mpe' => array('video/mpeg'), + 'mpeg' => array('video/mpeg'), + 'mpg' => array('video/mpeg'), + 'mpg4' => array('video/mp4'), + 'mpga' => array('audio/mpeg'), + 'mpp' => array('application/vnd.ms-project'), + 'mpv' => array('video/x-matroska'), + 'mpv2' => array('video/mpeg'), + 'ms' => array('application/x-troff-ms'), + 'msg' => array('application/msoutlook','application/x-msg'), + 'msi' => array('application/x-msi'), + 'nws' => array('message/rfc822'), + 'oda' => array('application/oda'), + 'odb' => array('application/vnd.oasis.opendocument.database'), + 'odc' => array('application/vnd.oasis.opendocument.chart'), + 'odf' => array('application/vnd.oasis.opendocument.forumla'), + 'odg' => array('application/vnd.oasis.opendocument.graphics'), + 'odi' => array('application/vnd.oasis.opendocument.image'), + 'odm' => array('application/vnd.oasis.opendocument.text-master'), + 'odp' => array('application/vnd.oasis.opendocument.presentation'), + 'ods' => array('application/vnd.oasis.opendocument.spreadsheet'), + 'odt' => array('application/vnd.oasis.opendocument.text'), + 'oga' => array('audio/ogg'), + 'ogg' => array('application/ogg'), + 'ogv' => array('video/ogg'), + 'otg' => array('application/vnd.oasis.opendocument.graphics-template'), + 'oth' => array('application/vnd.oasis.opendocument.web'), + 'otp' => array('application/vnd.oasis.opendocument.presentation-template'), + 'ots' => array('application/vnd.oasis.opendocument.spreadsheet-template'), + 'ott' => array('application/vnd.oasis.opendocument.template'), + 'p' => array('text/x-pascal'), + 'pas' => array('text/x-pascal'), + 'patch' => array('text/x-diff'), + 'pbm' => array('image/x-portable-bitmap'), + 'pdf' => array('application/pdf', 'application/x-download'), + 'php' => array('application/x-httpd-php'), + 'php3' => array('application/x-httpd-php'), + 'php4' => array('application/x-httpd-php'), + 'php5' => array('application/x-httpd-php'), + 'phps' => array('application/x-httpd-php-source'), + 'phtml' => array('application/x-httpd-php'), + 'pl' => array('text/x-perl'), + 'pm' => array('text/x-perl'), + 'png' => array('image/png', 'image/x-png'), + 'po' => array('text/x-gettext-translation'), + 'pot' => array('application/vnd.ms-powerpoint'), + 'pps' => array('application/vnd.ms-powerpoint'), + 'ppt' => array('application/powerpoint'), + 'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation'), + 'ps' => array('application/postscript'), + 'psd' => array('application/x-photoshop', 'image/x-photoshop'), + 'pub' => array('application/x-mspublisher'), + 'py' => array('text/x-python'), + 'qt' => array('video/quicktime'), + 'ra' => array('audio/x-realaudio'), + 'ram' => array('audio/x-realaudio', 'audio/x-pn-realaudio'), + 'rar' => array('application/rar'), + 'rgb' => array('image/x-rgb'), + 'rm' => array('audio/x-pn-realaudio'), + 'rpm' => array('audio/x-pn-realaudio-plugin', 'application/x-redhat-package-manager'), + 'rss' => array('application/rss+xml'), + 'rtf' => array('text/rtf'), + 'rtx' => array('text/richtext'), + 'rv' => array('video/vnd.rn-realvideo'), + 'sea' => array('application/octet-stream'), + 'sh' => array('text/x-sh'), + 'shtml' => array('text/html'), + 'sit' => array('application/x-stuffit'), + 'smi' => array('application/smil'), + 'smil' => array('application/smil'), + 'so' => array('application/octet-stream'), + 'src' => array('application/x-wais-source'), + 'svg' => array('image/svg+xml'), + 'swf' => array('application/x-shockwave-flash'), + 't' => array('application/x-troff'), + 'tar' => array('application/x-tar'), + 'tcl' => array('text/x-tcl'), + 'tex' => array('application/x-tex'), + 'text' => array('text/plain'), + 'texti' => array('application/x-texinfo'), + 'textinfo' => array('application/x-texinfo'), + 'tgz' => array('application/x-tar'), + 'tif' => array('image/tiff'), + 'tiff' => array('image/tiff'), + 'torrent' => array('application/x-bittorrent'), + 'tr' => array('application/x-troff'), + 'tsv' => array('text/tab-separated-values'), + 'txt' => array('text/plain'), + 'wav' => array('audio/x-wav'), + 'wax' => array('audio/x-ms-wax'), + 'wbxml' => array('application/wbxml'), + 'webm' => array('video/webm'), + 'wm' => array('video/x-ms-wm'), + 'wma' => array('audio/x-ms-wma'), + 'wmd' => array('application/x-ms-wmd'), + 'wmlc' => array('application/wmlc'), + 'wmv' => array('video/x-ms-wmv', 'application/octet-stream'), + 'wmx' => array('video/x-ms-wmx'), + 'wmz' => array('application/x-ms-wmz'), + 'word' => array('application/msword', 'application/octet-stream'), + 'wp5' => array('application/wordperfect5.1'), + 'wpd' => array('application/vnd.wordperfect'), + 'wvx' => array('video/x-ms-wvx'), + 'xbm' => array('image/x-xbitmap'), + 'xcf' => array('image/xcf'), + 'xhtml' => array('application/xhtml+xml'), + 'xht' => array('application/xhtml+xml'), + 'xl' => array('application/excel', 'application/vnd.ms-excel'), + 'xla' => array('application/excel', 'application/vnd.ms-excel'), + 'xlc' => array('application/excel', 'application/vnd.ms-excel'), + 'xlm' => array('application/excel', 'application/vnd.ms-excel'), + 'xls' => array('application/excel', 'application/vnd.ms-excel'), + 'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'), + 'xlt' => array('application/excel', 'application/vnd.ms-excel'), + 'xml' => array('text/xml', 'application/xml'), + 'xof' => array('x-world/x-vrml'), + 'xpm' => array('image/x-xpixmap'), + 'xsl' => array('text/xml'), + 'xvid' => array('video/x-xvid'), + 'xwd' => array('image/x-xwindowdump'), + 'z' => array('application/x-compress'), + 'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed') +); diff --git a/~dev_rating/system/config/session.php b/~dev_rating/system/config/session.php new file mode 100644 index 0000000000000000000000000000000000000000..1b858ae4920166b5ea1c02bbc9398ed00fb29f38 --- /dev/null +++ b/~dev_rating/system/config/session.php @@ -0,0 +1,9 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'cookie' => array( + 'encrypted' => FALSE, + ), + +); diff --git a/~dev_rating/system/config/user_agents.php b/~dev_rating/system/config/user_agents.php new file mode 100644 index 0000000000000000000000000000000000000000..f4b92eac44c8311e9661c1897093359f7e74f15b --- /dev/null +++ b/~dev_rating/system/config/user_agents.php @@ -0,0 +1,109 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'platform' => array( + 'windows nt 6.2' => 'Windows 8', + 'windows nt 6.1' => 'Windows 7', + 'windows nt 6.0' => 'Windows Vista', + 'windows nt 5.2' => 'Windows 2003', + 'windows nt 5.1' => 'Windows XP', + 'windows nt 5.0' => 'Windows 2000', + 'windows nt 4.0' => 'Windows NT', + 'winnt4.0' => 'Windows NT', + 'winnt 4.0' => 'Windows NT', + 'winnt' => 'Windows NT', + 'windows 98' => 'Windows 98', + 'win98' => 'Windows 98', + 'windows 95' => 'Windows 95', + 'win95' => 'Windows 95', + 'windows' => 'Unknown Windows OS', + 'os x' => 'Mac OS X', + 'intel mac' => 'Intel Mac', + 'ppc mac' => 'PowerPC Mac', + 'powerpc' => 'PowerPC', + 'ppc' => 'PowerPC', + 'cygwin' => 'Cygwin', + 'linux' => 'Linux', + 'debian' => 'Debian', + 'openvms' => 'OpenVMS', + 'sunos' => 'Sun Solaris', + 'amiga' => 'Amiga', + 'beos' => 'BeOS', + 'apachebench' => 'ApacheBench', + 'freebsd' => 'FreeBSD', + 'netbsd' => 'NetBSD', + 'bsdi' => 'BSDi', + 'openbsd' => 'OpenBSD', + 'os/2' => 'OS/2', + 'warp' => 'OS/2', + 'aix' => 'AIX', + 'irix' => 'Irix', + 'osf' => 'DEC OSF', + 'hp-ux' => 'HP-UX', + 'hurd' => 'GNU/Hurd', + 'unix' => 'Unknown Unix OS', + ), + + 'browser' => array( + 'Opera' => 'Opera', + 'MSIE' => 'Internet Explorer', + 'Internet Explorer' => 'Internet Explorer', + 'Shiira' => 'Shiira', + 'Firefox' => 'Firefox', + 'Chimera' => 'Chimera', + 'Phoenix' => 'Phoenix', + 'Firebird' => 'Firebird', + 'Camino' => 'Camino', + 'Navigator' => 'Netscape', + 'Netscape' => 'Netscape', + 'OmniWeb' => 'OmniWeb', + 'Chrome' => 'Chrome', + 'Safari' => 'Safari', + 'CFNetwork' => 'Safari', // Core Foundation for OSX, WebKit/Safari + 'Konqueror' => 'Konqueror', + 'Epiphany' => 'Epiphany', + 'Galeon' => 'Galeon', + 'Mozilla' => 'Mozilla', + 'icab' => 'iCab', + 'lynx' => 'Lynx', + 'links' => 'Links', + 'hotjava' => 'HotJava', + 'amaya' => 'Amaya', + 'IBrowse' => 'IBrowse', + ), + + 'mobile' => array( + 'mobileexplorer' => 'Mobile Explorer', + 'openwave' => 'Open Wave', + 'opera mini' => 'Opera Mini', + 'operamini' => 'Opera Mini', + 'elaine' => 'Palm', + 'palmsource' => 'Palm', + 'digital paths' => 'Palm', + 'avantgo' => 'Avantgo', + 'xiino' => 'Xiino', + 'palmscape' => 'Palmscape', + 'nokia' => 'Nokia', + 'ericsson' => 'Ericsson', + 'blackBerry' => 'BlackBerry', + 'motorola' => 'Motorola', + 'iphone' => 'iPhone', + 'ipad' => 'iPad', + 'ipod' => 'iPod', + 'android' => 'Android', + ), + + 'robot' => array( + 'googlebot' => 'Googlebot', + 'msnbot' => 'MSNBot', + 'facebookexternalhit' => 'Facebook', + 'slurp' => 'Inktomi Slurp', + 'yahoo' => 'Yahoo', + 'askjeeves' => 'AskJeeves', + 'fastcrawler' => 'FastCrawler', + 'infoseek' => 'InfoSeek Robot 1.0', + 'lycos' => 'Lycos', + ), + +); diff --git a/~dev_rating/system/config/userguide.php b/~dev_rating/system/config/userguide.php new file mode 100644 index 0000000000000000000000000000000000000000..ff759688b8a66c0e5b7e2ca11a79fb3428d821e5 --- /dev/null +++ b/~dev_rating/system/config/userguide.php @@ -0,0 +1,24 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + // Leave this alone + 'modules' => array( + + // This should be the path to this modules userguide pages, without the 'guide/'. Ex: '/guide/modulename/' would be 'modulename' + 'kohana' => array( + + // Whether this modules userguide pages should be shown + 'enabled' => TRUE, + + // The name that should show up on the userguide index page + 'name' => 'Kohana', + + // A short description of this module, shown on the index page + 'description' => 'Documentation for Kohana core/system.', + + // Copyright message, shown in the footer for this module + 'copyright' => '© 2008–2012 Kohana Team', + ), + ), + +); diff --git a/~dev_rating/system/guide/kohana/autoloading.md b/~dev_rating/system/guide/kohana/autoloading.md new file mode 100644 index 0000000000000000000000000000000000000000..49986d733fbb80c985b1240084471cafb55be2f6 --- /dev/null +++ b/~dev_rating/system/guide/kohana/autoloading.md @@ -0,0 +1,72 @@ +# Loading Classes + +Kohana supports the [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) autoloading specification as of version 3.3. This allows you to take advantage of PHP [autoloading](http://php.net/manual/language.oop5.autoload.php), removing the need to call [include](http://php.net/include) or [require](http://php.net/require) before using a class. When you use a class Kohana will find and include the class file for you. For instance, when you want to use the [Cookie::set] method, you simply call: + + Cookie::set('mycookie', 'any string value'); + +Or to load an [Encrypt] instance, just call [Encrypt::instance]: + + $encrypt = Encrypt::instance(); + +Classes are loaded via the [Kohana::auto_load] method, which makes a simple conversion from class name to file name: + +1. Classes are placed in the `classes/` directory of the [filesystem](files) +2. Any underscore characters in the class name are converted to slashes +2. The filename must match the case of the class + +When calling a class that has not been loaded (eg: `Session_Cookie`), Kohana will search the filesystem using [Kohana::find_file] for a file named `classes/Session/Cookie.php`. + +If your classes do not follow this convention, they cannot be autoloaded by Kohana. You will have to manually included your files, or add your own [autoload function.](http://us3.php.net/manual/en/function.spl-autoload-register.php) + +## Custom Autoloaders + +Kohana's default autoloader is enabled in `application/bootstrap.php` using [spl_autoload_register](http://php.net/spl_autoload_register): + + spl_autoload_register(array('Kohana', 'auto_load')); + +This allows [Kohana::auto_load] to attempt to find and include any class that does not yet exist when the class is first used as long as it follows the PSR-0 specification. If you wish to support the previous Kohana filename convention (using lowercase filesnames), an additional autoloader is provided by Kohana: + + spl_autoload_register(array('Kohana', 'auto_load_lowercase')); + + +### Example: Zend + +You can easily gain access to other libraries if they include an autoloader. For example, here is how to enable Zend's autoloader so you can use Zend libraries in your Kohana application. + +#### Download and install the Zend Framework files + +- [Download the latest Zend Framework files](http://framework.zend.com/download/latest). +- Create a `vendor` directory at `application/vendor`. This keeps third party software separate from your application classes. +- Move the decompressed Zend folder containing Zend Framework to `application/vendor/Zend`. + + +#### Include Zend's Autoloader in your bootstrap + +Somewhere in `application/bootstrap.php`, copy the following code: + + /** + * Enable Zend Framework autoloading + */ + if ($path = Kohana::find_file('vendor', 'Zend/Loader')) + { + ini_set('include_path', + ini_get('include_path').PATH_SEPARATOR.dirname(dirname($path))); + + require_once 'Zend/Loader/Autoloader.php'; + Zend_Loader_Autoloader::getInstance(); + } + +#### Usage example + +You can now autoload any Zend Framework classes from inside your Kohana application. + + if ($validate($this->request->post())) + { + $mailer = new Zend_Mail; + + $mailer->setBodyHtml($view) + ->setFrom(Kohana::$config->load('site')->email_from) + ->addTo($email) + ->setSubject($message) + ->send(); + } diff --git a/~dev_rating/system/guide/kohana/bootstrap.md b/~dev_rating/system/guide/kohana/bootstrap.md new file mode 100644 index 0000000000000000000000000000000000000000..22c560f23e6cd208bbb6e965d273944bb4383133 --- /dev/null +++ b/~dev_rating/system/guide/kohana/bootstrap.md @@ -0,0 +1,111 @@ +# Bootstrap + +The bootstrap is located at `application/bootstrap.php`. It is responsible for setting up the Kohana environment and executing the main response. It is included by `index.php` (see [Request flow](flow)) + +[!!] The bootstrap is responsible for the flow of your application. In previous versions of Kohana the bootstrap was in `system` and was somewhat of an unseen, uneditible force. In Kohana 3 the bootstrap takes on a much more integral and versatile role. Do not be afraid to edit and change your bootstrap however you see fit. + +## Environment setup + +The bootstrap first sets the timezone and locale, and then adds Kohana's autoloader so the [cascading filesystem](files) works. You could add any other settings that all your application needed here. + +~~~ +// Sample excerpt from bootstrap.php with comments trimmed down + +// Set the default time zone. +date_default_timezone_set('America/Chicago'); + +// Set the default locale. +setlocale(LC_ALL, 'en_US.utf-8'); + +// Enable the Kohana auto-loader. +spl_autoload_register(array('Kohana', 'auto_load')); + +// Enable the Kohana auto-loader for unserialization. +ini_set('unserialize_callback_func', 'spl_autoload_call'); +~~~ + +## Initialization and Configuration + +Kohana is then initialized by calling [Kohana::init], and the log and [config](files/config) reader/writers are enabled. + +~~~ +// Sample excerpt from bootstrap.php with comments trimmed down + +Kohana::init(array(' + base_url' => '/kohana/', + index_file => false, +)); + +// Attach the file writer to logging. Multiple writers are supported. +Kohana::$log->attach(new Kohana_Log_File(APPPATH.'logs')); + +// Attach a file reader to config. Multiple readers are supported. +Kohana::$config->attach(new Kohana_Config_File); +~~~ + +You can add conditional statements to make the bootstrap have different values based on certain settings. For example, detect whether we are live by checking `$_SERVER['HTTP_HOST']` and set caching, profiling, etc. accordingly. This is just an example, there are many different ways to accomplish the same thing. + +~~~ +// Excerpt from http://github.com/isaiahdw/kohanaphp.com/blob/f2afe8e28b/application/bootstrap.php +... [trimmed] + +/** + * Set the environment status by the domain. + */ +if (strpos($_SERVER['HTTP_HOST'], 'kohanaphp.com') !== FALSE) +{ + // We are live! + Kohana::$environment = Kohana::PRODUCTION; + + // Turn off notices and strict errors + error_reporting(E_ALL ^ E_NOTICE ^ E_STRICT); +} + +/** + * Initialize Kohana, setting the default options. + ... [trimmed] + */ +Kohana::init(array( + 'base_url' => Kohana::$environment === Kohana::PRODUCTION ? '/' : '/kohanaphp.com/', + 'caching' => Kohana::$environment === Kohana::PRODUCTION, + 'profile' => Kohana::$environment !== Kohana::PRODUCTION, + 'index_file' => FALSE, +)); + +... [trimmed] + +~~~ + +[!!] Note: The default bootstrap will set `Kohana::$environment = $_ENV['KOHANA_ENV']` if set. Docs on how to supply this variable are available in your web server's documentation (e.g. [Apache](http://httpd.apache.org/docs/1.3/mod/mod_env.html#setenv), [Lighttpd](http://redmine.lighttpd.net/wiki/1/Docs:ModSetEnv#Options)). This is considered better practice than many alternative methods to set `Kohana::$enviroment`, as you can change the setting per server, without having to rely on config options or hostnames. + +## Modules + +**Read the [Modules](modules) page for a more detailed description.** + +[Modules](modules) are then loaded using [Kohana::modules()]. Including modules is optional. + +Each key in the array should be the name of the module, and the value is the path to the module, either relative or absolute. +~~~ +// Example excerpt from bootstrap.php + +Kohana::modules(array( + 'database' => MODPATH.'database', + 'orm' => MODPATH.'orm', + 'userguide' => MODPATH.'userguide', +)); +~~~ + +## Routes + +**Read the [Routing](routing) page for a more detailed description and more examples.** + +[Routes](routing) are then defined via [Route::set()]. + +~~~ +// The default route that comes with Kohana 3 +Route::set('default', '(<controller>(/<action>(/<id>)))') + ->defaults(array( + 'controller' => 'Welcome', + 'action' => 'index', + )); +~~~ diff --git a/~dev_rating/system/guide/kohana/config.md b/~dev_rating/system/guide/kohana/config.md new file mode 100644 index 0000000000000000000000000000000000000000..1673f96686343cdeeb380a8a342b97286ae4a846 --- /dev/null +++ b/~dev_rating/system/guide/kohana/config.md @@ -0,0 +1,193 @@ +# Configuration + +By default Kohana is setup to load configuration values from [config files](files/config) in the +cascading filesystem. However, it is very easy to adapt it to load config values in other +locations/formats. + +## Sources + +The system is designed around the concept of **Config Sources**, which loosely means a method of +storing configuration values. + +To read config from a source you need a **Config Reader**. Similarly, to write config to a source +you need a **Config Writer**. + +Implementing them is as simple as extending the +[Kohana_Config_Reader] / [Kohana_Config_Writer] interfaces: + + class Kohana_Config_Database_Reader implements Kohana_Config_Reader + class Kohana_Config_Database_Writer extends Kohana_Config_Database_Reader implements Kohana_Config_Writer + +You'll notice in the above example that the Database Writer extends the Database Reader. +This is the convention with config sources, the reasoning being that if you can write to a +source chances are you can also read from it as well. However, this convention is not enforced +and is left to the developer's discretion. + +## Groups + +In order to aid organisation config values are split up into logical "groups". For example, +database related settings go in a `database` group, and session related settings go in a +`session` group. + +How these groups are stored/organised is up to the config source. For example, the file source +puts different config groups into different files (`database.php`, `session.php`) whereas +the database source uses a column to distinguish between groups. + +To load a config group simply call `Kohana::$config->load()` with the name of the group you wish to load: + + $config = Kohana::$config->load('my_group'); + +`load()` will return an instance of [Config_Group] which encapsulates the config values and ensures +that any modifications made will be passed back to the config writers. + +To get a config value from a [Config_Group] object simply call [Config_Group::get]: + + $config = Kohana::$config->load('my_group'); + $value = $config->get('var'); + +To modify a value call [Config_Group::set]: + + $config = Kohana::$config->load('my_group'); + $config->set('var', 'new_value'); + +### Alternative methods for getting / setting config + +In addition to the methods described above you can also access config values using dots to outline a path +from the config group to the value you want: + + // Config file: database.php + return array( + 'default' => array( + 'connection' => array( + 'hostname' => 'localhost' + ) + ) + ); + + // Code which needs hostname: + $hostname = Kohana::$config->load('database.default.connection.hostname'); + + +Which is equivalent to: + + $config = Kohana::$config->load('database')->get('default'); + + $hostname = $config['connection']['hostname']; + +Obviously this method is a lot more compact than the original. However, please bear in mind that using +`dot.notation` is a _lot_ slower than calling `get()` and traversing the array yourself. Dot notation +can be useful if you only need one specific variable, but otherwise it's best to use `get()`. + +As [Config_Group] extends [Array_Object](http://php.net/manual/en/class.arrayobject.php) you can also use array +syntax to get/set config vars: + + $config = Kohana::$config->load('database'); + + // Getting the var + $hostname = $config['default']['connection']['hostname']; + + // Setting the var + $config['default']['connection']['hostname'] = '127.0.0.1'; + +Again, this syntax is more costly than calling `get()` / `set()`. + +## Config Merging + +One of the useful features of the config system is config group merging. This works in a similar way +to the cascading filesystem, with configuration from lower sources lower down the source stack being +merged with sources further up the stack. + +If two sources contain the same config variables then the one from the source further up the stack will +override the one from the "lower" source. However, if the source from higher up the stack does not contain +a particular config variable but a source lower down the stack does then the value from the lower source will +be used. + +The position of sources in the stack is determined by how they are loaded in your bootstrap. +By default when you load a source it is pushed to the top of a stack: + + // Stack: <empty> + Kohana::$config->attach(new Config_File); + // Stack: Config_File + Kohana::$config->attach(new Config_Database); + // Stack: Config_Database, Config_File + +In the example above, any config values found in the database will override those found in the filesystem. +For example, using the setup outlined above: + + // Configuration in the filesystem: + email: + sender: + email: my.awesome.address@example.com + name: Unknown + method: smtp + + // Configuration in the database: + email: + sender: + email: my.supercool.address@gmail.com + name: Kohana Bot + + // Configuration returned by Kohana::$config->load('email') + email: + sender: + email: my.supercool.address@gmail.com + name: Kohana Bot + method: smtp + +[!!] **Note:** The above syntax is simply pseudo code to illustrate the concept of config merging. + +On some occasions you may want to append a config source to the bottom of the stack, to do this pass `FALSE` +as the second parameter to `attach()`: + + // Stack: <empty> + Kohana::$config->attach(new Config_File); + // Stack: Config_File + Kohana::$config->attach(new Config_Database, FALSE); + // Stack: Config_File, Config_Database + +In this example, any values found in the filesystem will override those found in the db. For example: + + // Configuration in the filesystem: + email: + sender: + email: my.awesome.address@example.com + name: Unknown + method: smtp + + // Configuration in the database: + email: + sender: + email: my.supercool.address@gmail.com + name: Kohana Bot + + // Configuration returned by Kohana::$config->load('email') + email: + sender: + email: my.awesome.address@example.com + name: Unknown + method: smtp + +## Using different config sources based on the environment + +In some situations you'll need to use different config values depending on which state `Kohana::$environment` +is in. Unit testing is a prime example of such a situation. Most setups have two databases; one for normal +development and a separate one for unit testing (to isolate the tests from your development). + +In this case you still need access to the config settings stored in the `config` directory as it contains generic +settings that are needed whatever environment your application is in (e.g. encryption settings), +so replacing the default `Config_File` source isn't really an option. + +To get around this you can attach a separate config file reader which loads its config from a subdir of `config` called +"testing": + + Kohana::$config->attach(new Config_File); + + Kohana::$config->attach(new Config_Database); + + if (Kohana::$environment === Kohana::TESTING) + { + Kohana::$config->attach(new Config_File('config/testing')); + } + +During normal development the config source stack looks like `Config_Database, Config_File('config')`. However, +when `Kohana::$environment === Kohana::TESTING` the stack looks like `Config_File('config/testing'), Config_Database, Config_File('config')` \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/controllers.md b/~dev_rating/system/guide/kohana/controllers.md new file mode 100644 index 0000000000000000000000000000000000000000..d95d98ad1903eeef175c0053b97372587779e9cb --- /dev/null +++ b/~dev_rating/system/guide/kohana/controllers.md @@ -0,0 +1 @@ +This will discuss controller basics, like before() and after(), private function, and about extending controllers like the Controller_Template, or using a parent::before() for authentication. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/conventions.md b/~dev_rating/system/guide/kohana/conventions.md new file mode 100644 index 0000000000000000000000000000000000000000..2157178ca9230e6ed884f47a357d3bc311a36e09 --- /dev/null +++ b/~dev_rating/system/guide/kohana/conventions.md @@ -0,0 +1,418 @@ +# Conventions and Coding Style + +It is encouraged that you follow Kohana's coding style. This makes code more readable and allows for easier code sharing and contributing. + +## Class Names and File Location + +Class names in Kohana follow a strict convention to facilitate [autoloading](autoloading). Class names should have uppercase first letters with underscores to separate words. Underscores are significant as they directly reflect the file location in the filesystem. + +The following conventions apply: + +1. CamelCased class names should be used when it is undesirable to create a new directory level. +2. All class file names and directory names must match the case of the class as per [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md). +3. All classes should be in the `classes` directory. This may be at any level in the [cascading filesystem](files). + +### Examples {#class-name-examples} + +Remember that in a class, an underscore means a new directory. Consider the following examples: + +Class Name | File Path +----------------------|------------------------------- +Controller_Template | classes/Controller/Template.php +Model_User | classes/Model/User.php +Model_BlogPost | classes/Model/BlogPost.php +Database | classes/Database.php +Database_Query | classes/Database/Query.php +Form | classes/Form.php + +## Coding Standards + +In order to produce highly consistent source code, we ask that everyone follow the coding standards as closely as possible. + +### Brackets + +Please use [BSD/Allman Style](http://en.wikipedia.org/wiki/Indent_style#BSD.2FAllman_style) bracketing. + +#### Curly Brackets + +Curly brackets are placed on their own line, indented to the same level as the control statement. + + // Correct + if ($a === $b) + { + ... + } + else + { + ... + } + + // Incorrect + if ($a === $b) { + ... + } else { + ... + } + +#### Class Brackets + +The only exception to the curly bracket rule is, the opening bracket of a class goes on the same line. + + // Correct + class Foo { + + // Incorrect + class Foo + { + +#### Empty Brackets + +Don't put any characters inside empty brackets. + + // Correct + class Foo {} + + // Incorrect + class Foo { } + +#### Array Brackets + +Arrays may be single line or multi-line. + + array('a' => 'b', 'c' => 'd') + + array( + 'a' => 'b', + 'c' => 'd', + ) + +##### Opening Parenthesis + +The opening array parenthesis goes on the same line. + + // Correct + array( + ... + ) + + // Incorrect: + array + ( + ... + ) + +##### Closing parenthesis + +###### Single Dimension + +The closing parenthesis of a multi-line single dimension array is placed on its own line, indented to the same level as the assignment or statement. + + // Correct + $array = array( + ... + ) + + // Incorrect + $array = array( + ... + ) + +###### Multidimensional + +The nested array is indented one tab to the right, following the single dimension rules. + + // Correct + array( + 'arr' => array( + ... + ), + 'arr' => array( + ... + ), + ) + + array( + 'arr' => array(...), + 'arr' => array(...), + ) + +##### Arrays as Function Arguments + + + // Correct + do(array( + ... + )) + + // Incorrect + do(array( + ... + )) + +As noted at the start of the array bracket section, single line syntax is also valid. + + // Correct + do(array(...)) + + // Alternative for wrapping long lines + do($bar, 'this is a very long line', + array(...)); + +### Naming Conventions + +Kohana uses under_score naming, not camelCase naming. + +#### Classes + + // Controller class, uses Controller_ prefix + class Controller_Apple extends Controller { + + // Model class, uses Model_ prefix + class Model_Cheese extends Model { + + // Regular class + class Peanut { + +When creating an instance of a class, don't use parentheses if you're not passing something on to the constructor: + + // Correct: + $db = new Database; + + // Incorrect: + $db = new Database(); + +#### Functions and Methods + +Functions should be all lowercase, and use under_scores to separate words: + + function drink_beverage($beverage) + { + +#### Variables + +All variables should be lowercase and use under_score, not camelCase: + + // Correct: + $foo = 'bar'; + $long_example = 'uses underscores'; + + // Incorrect: + $weDontWantThis = 'understood?'; + +### Indentation + +You must use tabs to indent your code. Using spaces for tabbing is strictly forbidden. + +Vertical spacing (for multi-line) is done with spaces. Tabs are not good for vertical alignment because different people have different tab widths. + + $text = 'this is a long text block that is wrapped. Normally, we aim for ' + .'wrapping at 80 chars. Vertical alignment is very important for ' + .'code readability. Remember that all indentation is done with tabs,' + .'but vertical alignment should be completed with spaces, after ' + .'indenting with tabs.'; + +### String Concatenation + +Do not put spaces around the concatenation operator: + + // Correct: + $str = 'one'.$var.'two'; + + // Incorrect: + $str = 'one'. $var .'two'; + $str = 'one' . $var . 'two'; + +### Single Line Statements + +Single-line IF statements should only be used when breaking normal execution (e.g. return or continue): + + // Acceptable: + if ($foo == $bar) + return $foo; + + if ($foo == $bar) + continue; + + if ($foo == $bar) + break; + + if ($foo == $bar) + throw new Exception('You screwed up!'); + + // Not acceptable: + if ($baz == $bun) + $baz = $bar + 2; + +### Comparison Operations + +Please use OR and AND for comparison: + + // Correct: + if (($foo AND $bar) OR ($b AND $c)) + + // Incorrect: + if (($foo && $bar) || ($b && $c)) + +Please use elseif, not else if: + + // Correct: + elseif ($bar) + + // Incorrect: + else if($bar) + +### Switch Structures + +Each case, break and default should be on a separate line. The block inside a case or default must be indented by 1 tab. + + switch ($var) + { + case 'bar': + case 'foo': + echo 'hello'; + break; + case 1: + echo 'one'; + break; + default: + echo 'bye'; + break; + } + +### Parentheses + +There should be one space after statement name, followed by a parenthesis. The ! (bang) character must have a space on either side to ensure maximum readability. Except in the case of a bang or type casting, there should be no whitespace after an opening parenthesis or before a closing parenthesis. + + // Correct: + if ($foo == $bar) + if ( ! $foo) + + // Incorrect: + if($foo == $bar) + if(!$foo) + if ((int) $foo) + if ( $foo == $bar ) + if (! $foo) + +### Ternaries + +All ternary operations should follow a standard format. Use parentheses around expressions only, not around just variables. + + $foo = ($bar == $foo) ? $foo : $bar; + $foo = $bar ? $foo : $bar; + +All comparisons and operations must be done inside of a parentheses group: + + $foo = ($bar > 5) ? ($bar + $foo) : strlen($bar); + +When separating complex ternaries (ternaries where the first part goes beyond ~80 chars) into multiple lines, spaces should be used to line up operators, which should be at the front of the successive lines: + + $foo = ($bar == $foo) + ? $foo + : $bar; + +### Type Casting + +Type casting should be done with spaces on each side of the cast: + + // Correct: + $foo = (string) $bar; + if ( (string) $bar) + + // Incorrect: + $foo = (string)$bar; + +When possible, please use type casting instead of ternary operations: + + // Correct: + $foo = (bool) $bar; + + // Incorrect: + $foo = ($bar == TRUE) ? TRUE : FALSE; + +When casting type to integer or boolean, use the short format: + + // Correct: + $foo = (int) $bar; + $foo = (bool) $bar; + + // Incorrect: + $foo = (integer) $bar; + $foo = (boolean) $bar; + +### Constants + +Always use uppercase for constants: + + // Correct: + define('MY_CONSTANT', 'my_value'); + $a = TRUE; + $b = NULL; + + // Incorrect: + define('MyConstant', 'my_value'); + $a = True; + $b = null; + +Place constant comparisons at the end of tests: + + // Correct: + if ($foo !== FALSE) + + // Incorrect: + if (FALSE !== $foo) + +This is a slightly controversial choice, so I will explain the reasoning. If we were to write the previous example in plain English, the correct example would read: + + if variable $foo is not exactly FALSE + +And the incorrect example would read: + + if FALSE is not exactly variable $foo + +Since we are reading left to right, it simply doesn't make sense to put the constant first. + +### Comments + +#### One-line Comments + +Use //, preferably above the line of code you're commenting on. Leave a space after it and start with a capital. Never use #. + + // Correct + + //Incorrect + // incorrect + # Incorrect + +### Regular Expressions + +When coding regular expressions please use PCRE rather than the POSIX flavor. PCRE is considered more powerful and faster. + + // Correct: + if (preg_match('/abc/i', $str)) + + // Incorrect: + if (eregi('abc', $str)) + +Use single quotes around your regular expressions rather than double quotes. Single-quoted strings are more convenient because of their simplicity. Unlike double-quoted strings they don't support variable interpolation nor integrated backslash sequences like \n or \t, etc. + + // Correct: + preg_match('/abc/', $str); + + // Incorrect: + preg_match("/abc/", $str); + +When performing a regular expression search and replace, please use the $n notation for backreferences. This is preferred over \\n. + + // Correct: + preg_replace('/(\d+) dollar/', '$1 euro', $str); + + // Incorrect: + preg_replace('/(\d+) dollar/', '\\1 euro', $str); + +Finally, please note that the $ character for matching the position at the end of the line allows for a following newline character. Use the D modifier to fix this if needed. [More info](http://blog.php-security.org/archives/76-Holes-in-most-preg_match-filters.html). + + $str = "email@example.com\n"; + + preg_match('/^.+@.+$/', $str); // TRUE + preg_match('/^.+@.+$/D', $str); // FALSE \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/cookies.md b/~dev_rating/system/guide/kohana/cookies.md new file mode 100644 index 0000000000000000000000000000000000000000..b53a130f02e5bf717eac9476f2c879b85ee97467 --- /dev/null +++ b/~dev_rating/system/guide/kohana/cookies.md @@ -0,0 +1,100 @@ +# Cookies + +Kohana provides classes that make it easy to work with both cookies and sessions. At a high level both sessions and cookies provide the same functionality. They allow the developer to store temporary or persistent information about a specific client for later retrieval, usually to make something persistent between requests. + +[Cookies](http://en.wikipedia.org/wiki/HTTP_cookie) should be used for storing non-private data that is persistent for a long period of time. For example storing a user preference or a language setting. Use the [Cookie] class for getting and setting cookies. + +[!!] Kohana uses "signed" cookies. Every cookie that is stored is combined with a secure hash to prevent modification of the cookie. If a cookie is modified outside of Kohana the hash will be incorrect and the cookie will be deleted. This hash is generated using [Cookie::salt()], which uses the [Cookie::$salt] property. You must define this setting in your bootstrap.php: + + Cookie::$salt = 'foobar'; + +Or define an extended cookie class in your application: + + class Cookie extends Kohana_Cookie + { + public static $salt = 'foobar'; + } + +You should set the salt to a secure value. The example above is only for demonstrative purposes. + +Nothing stops you from using `$_COOKIE` like normal, but you can not mix using the Cookie class and the regular `$_COOKIE` global, because the hash that Kohana uses to sign cookies will not be present, and Kohana will delete the cookie. + +## Storing, Retrieving, and Deleting Data + +[Cookie] and [Session] provide a very similar API for storing data. The main difference between them is that sessions are accessed using an object, and cookies are accessed using a static class. + +### Storing Data + +Storing session or cookie data is done using the [Cookie::set] method: + + // Set cookie data + Cookie::set($key, $value); + + // Store a user id + Cookie::set('user_id', 10); + +### Retrieving Data + +Getting session or cookie data is done using the [Cookie::get] method: + + // Get cookie data + $data = Cookie::get($key, $default_value); + + // Get the user id + $user = Cookie::get('user_id'); + +### Deleting Data + +Deleting session or cookie data is done using the [Cookie::delete] method: + + // Delete cookie data + Cookie::delete($key); + + // Delete the user id + Cookie::delete('user_id'); + +## Cookie Settings + +All of the cookie settings are changed using static properties. You can either change these settings in `bootstrap.php` or by using [transparent extension](extension). Always check these settings before making your application live, as many of them will have a direct affect on the security of your application. + +The most important setting is [Cookie::$salt], which is used for secure signing. This value should be changed and kept secret: + + Cookie::$salt = 'your secret is safe with me'; + +[!!] Changing this value will render all cookies that have been set before invalid. + +By default, cookies are stored until the browser is closed. To use a specific lifetime, change the [Cookie::$expiration] setting: + + // Set cookies to expire after 1 week + Cookie::$expiration = 604800; + + // Alternative to using raw integers, for better clarity + Cookie::$expiration = Date::WEEK; + +The path that the cookie can be accessed from can be restricted using the [Cookie::$path] setting. + + // Allow cookies only when going to /public/* + Cookie::$path = '/public/'; + +The domain that the cookie can be accessed from can also be restricted, using the [Cookie::$domain] setting. + + // Allow cookies only on the domain www.example.com + Cookie::$domain = 'www.example.com'; + +If you want to make the cookie accessible on all subdomains, use a dot at the beginning of the domain. + + // Allow cookies to be accessed on example.com and *.example.com + Cookie::$domain = '.example.com'; + +To only allow the cookie to be accessed over a secure (HTTPS) connection, use the [Cookie::$secure] setting. + + // Allow cookies to be accessed only on a secure connection + Cookie::$secure = TRUE; + + // Allow cookies to be accessed on any connection + Cookie::$secure = FALSE; + +To prevent cookies from being accessed using Javascript, you can change the [Cookie::$httponly] setting. + + // Make cookies inaccessible to Javascript + Cookie::$httponly = TRUE; \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/debugging.md b/~dev_rating/system/guide/kohana/debugging.md new file mode 100644 index 0000000000000000000000000000000000000000..251e557ca46eb5efd265668286e6926e7df62e6f --- /dev/null +++ b/~dev_rating/system/guide/kohana/debugging.md @@ -0,0 +1,20 @@ +# Debugging + +Kohana includes several tools to help you debug your application. + +The most basic of these is [Debug::vars]. This simple method will display any number of variables, similar to [var_export](http://php.net/var_export) or [print_r](http://php.net/print_r), but using HTML for extra formatting. + + // Display a dump of the $foo and $bar variables + echo Debug::vars($foo, $bar); + +Kohana also provides a method to show the source code of a particular file using [Debug::source]. + + // Display this line of source code + echo Debug::source(__FILE__, __LINE__); + +If you want to display information about your application files without exposing the installation directory, you can use [Debug::path]: + + // Displays "APPPATH/cache" rather than the real path + echo Debug::path(APPPATH.'cache'); + +If you are having trouble getting something to work correctly, you could check your Kohana logs and your webserver logs, as well as using a debugging tool like [Xdebug](http://www.xdebug.org/). \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/errors.md b/~dev_rating/system/guide/kohana/errors.md new file mode 100644 index 0000000000000000000000000000000000000000..9f40f8ba9e48bba047a666d21784461bbaf84ddc --- /dev/null +++ b/~dev_rating/system/guide/kohana/errors.md @@ -0,0 +1,64 @@ +# Error/Exception Handling + +Kohana provides both an exception handler and an error handler that transforms errors into exceptions using PHP's [ErrorException](http://php.net/errorexception) class. Many details of the error and the internal state of the application is displayed by the handler: + +1. Exception class +2. Error level +3. Error message +4. Source of the error, with the error line highlighted +5. A [debug backtrace](http://php.net/debug_backtrace) of the execution flow +6. Included files, loaded extensions, and global variables + +## Example + +Click any of the links to toggle the display of additional information: + +<div>{{userguide/examples/error}}</div> + +## Disabling Error/Exception Handling + +If you do not want to use the internal error handling, you can disable it (highly discouraged) when calling [Kohana::init]: + + Kohana::init(array('errors' => FALSE)); + +## Error Reporting + +By default, Kohana displays all errors, including strict mode warnings. This is set using [error_reporting](http://php.net/error_reporting): + + error_reporting(E_ALL | E_STRICT); + +When you application is live and in production, a more conservative setting is recommended, such as ignoring notices: + + error_reporting(E_ALL & ~E_NOTICE); + +If you get a white screen when an error is triggered, your host probably has disabled displaying errors. You can turn it on again by adding this line just after your `error_reporting` call: + + ini_set('display_errors', TRUE); + +Errors should **always** be displayed, even in production, because it allows you to use [exception and error handling](debugging.errors) to serve a nice error page rather than a blank white screen when an error happens. + +## HTTP Exception Handling + +Kohana comes with a robust system for handing http errors. It includes exception classes for each http status code. To trigger a 404 in your application (the most common scenario): + + throw HTTP_Exception::factory(404, 'File not found!'); + +To register error pages for these, using 404 as an example: + + class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 { + + public function get_response() + { + $response = Response::factory(); + + $view = View::factory('errors/404'); + + // We're inside an instance of Exception here, all the normal stuff is available. + $view->message = $this->getMessage(); + + $response->body($view->render()); + + return $response; + } + + } \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/extension.md b/~dev_rating/system/guide/kohana/extension.md new file mode 100644 index 0000000000000000000000000000000000000000..f89301498894f90792702abc5cd33c456babee0d --- /dev/null +++ b/~dev_rating/system/guide/kohana/extension.md @@ -0,0 +1,101 @@ +# Transparent Class Extension + +The [cascading filesystem](files) allows transparent class extension. For instance, the class [Cookie] is defined in `SYSPATH/classes/Cookie.php` as: + + class Cookie extends Kohana_Cookie {} + +The default Kohana classes, and many extensions, use this definition so that almost all classes can be extended. You extend any class transparently, by defining your own class in `APPPATH/classes/Cookie.php` to add your own methods. + +[!!] You should **never** modify any of the files that are distributed with Kohana. Always make modifications to classes using transparent extension to prevent upgrade issues. + +For instance, if you wanted to create method that sets encrypted cookies using the [Encrypt] class, you would create a file at `APPPATH/classes/Cookie.php` that extends Kohana_Cookie, and adds your functions: + + <?php defined('SYSPATH') OR die('No direct script access.'); + + class Cookie extends Kohana_Cookie { + + /** + * @var mixed default encryption instance + */ + public static $encryption = 'default'; + + /** + * Sets an encrypted cookie. + * + * @uses Cookie::set + * @uses Encrypt::encode + */ + public static function encrypt($name, $value, $expiration = NULL) + { + $value = Encrypt::instance(Cookie::$encrpytion)->encode((string) $value); + + parent::set($name, $value, $expiration); + } + + /** + * Gets an encrypted cookie. + * + * @uses Cookie::get + * @uses Encrypt::decode + */ + public static function decrypt($name, $default = NULL) + { + if ($value = parent::get($name, NULL)) + { + $value = Encrypt::instance(Cookie::$encryption)->decode($value); + } + + return isset($value) ? $value : $default; + } + + } // End Cookie + +Now calling `Cookie::encrypt('secret', $data)` will create an encrypted cookie which we can decrypt with `$data = Cookie::decrypt('secret')`. + +## How it works + +To understand how this works, let's look at what happens normally. When you use the Cookie class, [Kohana::autoload] looks for `classes/Cookie.php` in the [cascading filesystem](files). It looks in `application`, then each module, then `system`. The file is found in `system` and is included. Of course, `system/classes/Cookie.php` is just an empty class which extends `Kohana_Cookie`. Again, [Kohana::autoload] is called this time looking for `classes/Kohana/Cookie.php` which it finds in `system`. + +When you add your transparently extended cookie class at `application/classes/Cookie.php` this file essentially "replaces" the file at `system/classes/Cookie.php` without actually touching it. This happens because this time when we use the Cookie class [Kohana::autoload] looks for `classes/Cookie.php` and finds the file in `application` and includes that one, instead of the one in system. + +## Example: changing [Cookie] settings + +If you are using the [Cookie](cookies) class, and want to change a setting, you should do so using transparent extension, rather than editing the file in the system folder. If you edit it directly, and in the future you upgrade your Kohana version by replacing the system folder, your changes will be reverted and your cookies will probably be invalid. Instead, create a Cookie.php file either in `application/classes/Cookie.php` or a module (`MODPATH/<modulename>/classes/Cookie.php`). + + class Cookie extends Kohana_Cookie { + + // Set a new salt + public $salt = "some new better random salt phrase"; + + // Don't allow javascript access to cookies + public $httponly = TRUE; + + } + +## Example: TODO: an example + +Just post the code and brief description of what function it adds, you don't have to do the "How it works" like above. + +## Example: TODO: something else + +Just post the code and brief description of what function it adds, you don't have to do the "How it works" like above. + +## More examples + +TODO: Provide some links to modules on github, etc that have examples of transparent extension in use. + +## Multiple Levels of Extension + +If you are extending a Kohana class in a module, you should maintain transparent extensions. In other words, do not include any variables or function in the "base" class (eg. Cookie). Instead make your own namespaced class, and have the "base" class extend that one. With our Encrypted cookie example we can create `MODPATH/mymod/Encrypted/Cookie.php`: + + class Encrypted_Cookie extends Kohana_Cookie { + + // Use the same encrypt() and decrypt() methods as above + + } + +And create `MODPATH/mymod/Cookie.php`: + + class Cookie extends Encrypted_Cookie {} + +This will still allow users to add their own extension to [Cookie] while leaving your extensions intact. To do that they would make a cookie class that extends `Encrypted_Cookie` (rather than `Kohana_Cookie`) in their application folder. diff --git a/~dev_rating/system/guide/kohana/files.md b/~dev_rating/system/guide/kohana/files.md new file mode 100644 index 0000000000000000000000000000000000000000..5be015e8692ceb0ac46a28ef25222a53f452b9f7 --- /dev/null +++ b/~dev_rating/system/guide/kohana/files.md @@ -0,0 +1,83 @@ +# Cascading Filesystem + +The Kohana filesystem is a hierarchy of similar directory structures that cascade. The hierarchy in Kohana (used when a file is loaded by [Kohana::find_file]) is in the following order: + +1. **Application Path** + Defined as `APPPATH` in `index.php`. The default value is `application`. + +2. **Module Paths** + This is set as an associative array using [Kohana::modules] in `APPPATH/bootstrap.php`. Each of the values of the array will be searched **in the order that the modules are defined**. + +3. **System Path** + Defined as `SYSPATH` in `index.php`. The default value is `system`. All of the main or "core" files and classes are defined here. + +Files that are in directories higher up the include path order take precedence over files of the same name lower down the order, which makes it is possible to overload any file by placing a file with the same name in a "higher" directory: + + + +This image is only shows certain files, but we can use it to illustrate some examples of the cascading filesystem: + +* If Kohana catches an error, it would display the `kohana/error.php` view, So it would call `Kohana::find_file('views', 'kohana/error')`. This would return `application/views/kohana/error.php` because it takes precidence over `system/views/kohana/error.php`. By doing this we can change the error view without editing the system folder. + +* If we used `View::factory('welcome')` it would call `Kohana::find_file('views','welcome')` which would return `application/views/welcome.php` because it takes precidence over `modules/common/views/welcome.php`. By doing this, you can overwrite things in a module without editing the modules files. + +* If use the Cookie class, [Kohana::auto_load] will call `Kohana::find_file('classes', 'Cookie')` which will return `application/classes/Cookie.php`. Assuming Cookie extends Kohana_Cookie, the autoloader would then call `Kohana::find_file('classes','Kohana/Cookie')` which will return `system/classes/Kohana/Cookie.php` because that file does not exist anywhere higher in the cascade. This is an example of [transparent extension](extension). + +* If you used `View::factory('user')` it would call `Kohana::find_file('views','user')` which would return `modules/common/views/user.php`. + +* If we wanted to change something in `config/database.php` we could copy the file to `application/config/database.php` and make the changes there. Keep in mind that [config files are merged](files/config#merge) rather than overwritten by the cascade. + +## Types of Files + +The top level directories of the application, module, and system paths have the following default directories: + +classes/ +: All classes that you want to [autoload](autoloading) should be stored here. This includes [controllers](mvc/controllers), [models](mvc/models), and all other classes. All classes must follow the [class naming conventions](conventions#class-names-and-file-location) including matching the case of the class i.e. Kohana_Cookie should be stored in classes/Kohana/Cookie.php and not classes/kohana/cookie.php. + +config/ +: Configuration files return an associative array of options that can be loaded using [Kohana::$config]. Config files are merged rather than overwritten by the cascade. See [config files](files/config) for more information. + +i18n/ +: Translation files return an associative array of strings. Translation is done using the `__()` method. To translate "Hello, world!" into Spanish, you would call `__('Hello, world!')` with [I18n::$lang] set to "es-es". I18n files are merged rather than overwritten by the cascade. See [I18n files](files/i18n) for more information. + +messages/ +: Message files return an associative array of strings that can be loaded using [Kohana::message]. Messages and i18n files differ in that messages are not translated, but always written in the default language and referred to by a single key. Message files are merged rather than overwritten by the cascade. See [message files](files/messages) for more information. + +views/ +: Views are plain PHP files which are used to generate HTML or other output. The view file is loaded into a [View] object and assigned variables, which it then converts into an HTML fragment. Multiple views can be used within each other. See [views](mvc/views) for more information. + +*other* +: You can include any other folders in your cascading filesystem. Examples include, but are not limited to, `guide`, `vendor`, `media`, whatever you want. For example, to find `media/logo.png` in the cascading filesystem you would call `Kohana::find_file('media','logo','png')`. + +## Finding Files + +The path to any file within the filesystem can be found by calling [Kohana::find_file]: + + // Find the full path to "classes/Cookie.php" + $path = Kohana::find_file('classes', 'Cookie'); + + // Find the full path to "views/user/login.php" + $path = Kohana::find_file('views', 'user/login'); + +If the file doesn't have a `.php` extension, pass the extension as the third param. + + // Find the full path to "guide/menu.md" + $path = Kohana::find_file('guide', 'menu', 'md'); + + // If $name is "2000-01-01-first-post" this would look for "posts/2000-01-01-first-post.textile" + $path = Kohana::find_file('posts', $name, '.textile'); + + +## Vendor Extensions + +We call extensions or external libraries that are not specific to Kohana "vendor" extensions, and they go in the vendor folder, either in application or in a module. Because these libraries do not follow Kohana's file naming conventions, they cannot be autoloaded by Kohana, so you will have to manually included them. Some examples of vendor libraries are [Markdown](http://daringfireball.net/projects/markdown/), [DOMPDF](http://code.google.com/p/dompdf), [Mustache](http://github.com/bobthecow/mustache.php) and [Swiftmailer](http://swiftmailer.org/). + +For example, if you wanted to use [DOMPDF](http://code.google.com/p/dompdf), you would copy it to `application/vendor/dompdf` and include the DOMPDF autoloading class. It can be useful to do this in a controller's before method, as part of a module's init.php, or the contstructor of a singleton class. + + require Kohana::find_file('vendor', 'dompdf/dompdf/dompdf_config','inc'); + +Now you can use DOMPDF without loading any more files: + + $pdf = new DOMPDF; + +[!!] If you want to convert views into PDFs using DOMPDF, try the [PDFView](http://github.com/shadowhand/pdfview) module. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/files/classes.md b/~dev_rating/system/guide/kohana/files/classes.md new file mode 100644 index 0000000000000000000000000000000000000000..0dabf2850b33618db43756762f06a9a0e8f9c30f --- /dev/null +++ b/~dev_rating/system/guide/kohana/files/classes.md @@ -0,0 +1,41 @@ +# Classes + +TODO: Brief intro to classes. + +[Models](mvc/models) and [Controllers](mvc/controllers) are classes as well, but are treated slightly differently by Kohana. Read their respective pages to learn more. + +## Helper or Library? + +Kohana 3 does not differentiate between "helper" classes and "library" classes like in previous versions. They are all placed in the `classes/` folder and follow the same conventions. The distinction is that in general, a "helper" class is used statically, (for examples see the [helpers included in Kohana](helpers)), and library classes are typically instantiated and used as objects (like the [Database query builders](../database/query/builder)). The distinction is not black and white, and is irrelevant anyways, since they are treated the same by Kohana. + +## Creating a class + +To create a new class, simply place a file in the `classes/` directory at any point in the [Cascading Filesystem](files), that follows the [Class naming conventions](conventions#class-names-and-file-location). For example, lets create a `Foobar` class. + + // classes/Foobar.php + + class Foobar { + static function magic() { + // Does something + } + } + +We can now call `Foobar::magic()` any where and Kohana will [autoload](autoloading) the file for us. + +We can also put classes in subdirectories. + + // classes/Professor/Baxter.php + + class Professor_Baxter { + static function teach() { + // Does something + } + } + +We could now call `Professor_Baxter::teach()` any where we want. + +For examples of how to create and use classes, simply look at the 'classes' folder in `system` or any module. + +## Namespacing your classes + +TODO: Discuss namespacing to provide transparent extension functionality in your own classes/modules. diff --git a/~dev_rating/system/guide/kohana/files/config.md b/~dev_rating/system/guide/kohana/files/config.md new file mode 100644 index 0000000000000000000000000000000000000000..92484e669ab9584f46ebc946c9b556d8cf23fe2d --- /dev/null +++ b/~dev_rating/system/guide/kohana/files/config.md @@ -0,0 +1,84 @@ +# Config Files + +Configuration files are used to store any kind of configuration needed for a module, class, or anything else you want. They are plain PHP files, stored in the `config/` directory, which return an associative array: + + <?php defined('SYSPATH') OR die('No direct script access.'); + + return array( + 'setting' => 'value', + 'options' => array( + 'foo' => 'bar', + ), + ); + +If the above configuration file was called `myconf.php`, you could access it using: + + $config = Kohana::$config->load('myconf'); + $options = $config->get('options') + +## Merge + +Configuration files are slightly different from most other files within the [cascading filesystem](files) in that they are **merged** rather than overloaded. This means that all configuration files with the same file path are combined to produce the final configuration. The end result is that you can overload *individual* settings rather than duplicating an entire file. + +For example, if we wanted to change or add to an entry in the inflector configuration file, we would not need to duplicate all the other entries from the default configuration file. + + // config/inflector.php + + <?php defined('SYSPATH') OR die('No direct script access.'); + + return array( + 'irregular' => array( + 'die' => 'dice', // does not exist in default config file + 'mouse' => 'mouses', // overrides 'mouse' => 'mice' in the default config file + ); + + +## Creating your own config files + +Let's say we want a config file to store and easily change things like the title of a website, or the google analytics code. We would create a config file, let's call it `site.php`: + + // config/site.php + + <?php defined('SYSPATH') OR die('No direct script access.'); + + return array( + 'title' => 'Our Shiny Website', + 'analytics' => FALSE, // analytics code goes here, set to FALSE to disable + ); + +We could now call `Kohana::$config->load('site.title')` to get the site name, and `Kohana::$config->load('site.analytics')` to get the analytics code. + +Let's say we want an archive of versions of some software. We could use config files to store each version, and include links to download, documentation, and issue tracking. + + // config/versions.php + + <?php defined('SYSPATH') OR die('No direct script access.'); + + return array( + '1.0.0' => array( + 'codename' => 'Frog', + 'download' => 'files/ourapp-1.0.0.tar.gz', + 'documentation' => 'docs/1.0.0', + 'released' => '06/05/2009', + 'issues' => 'link/to/bug/tracker', + ), + '1.1.0' => array( + 'codename' => 'Lizard', + 'download' => 'files/ourapp-1.1.0.tar.gz', + 'documentation' => 'docs/1.1.0', + 'released' => '10/15/2009', + 'issues' => 'link/to/bug/tracker', + ), + /// ... etc ... + ); + +You could then do the following: + + // In your controller + $view->versions = Kohana::$config->load('versions'); + + // In your view: + foreach ($versions as $version) + { + // echo some html to display each version + } diff --git a/~dev_rating/system/guide/kohana/files/i18n.md b/~dev_rating/system/guide/kohana/files/i18n.md new file mode 100644 index 0000000000000000000000000000000000000000..52efc811ceb9cca1fb17d4102ead9cdbbe654446 --- /dev/null +++ b/~dev_rating/system/guide/kohana/files/i18n.md @@ -0,0 +1,67 @@ +# I18n + +Kohana has a fairly simple and easy to use i18n system. It is slightly modeled after gettext, but is not as featureful. If you need the features of gettext, please use that :) + +## __() + +Kohana has a __() function to do your translations for you. This function is only meant for small sections of text, not entire paragraphs or pages of translated text. + +To echo a translated string: + + <?php echo __('Hello, world!');?> + +This will echo 'Home' unless you've changed the defined language, which is explained below. + +## Changing the displayed language + +Use the I18n::lang() method to change the displayed language: + + I18n::lang('fr'); + +This will change the language to 'es-es'. + +## Defining language files + +To define the language file for the above language change, create a `i18n/fr.php` that contains: + + <?php + + return array + ( + 'Hello, world!' => 'Bonjour, monde!', + ); + +Now when you do `__('Hello, world!')`, you will get `Bonjour, monde!` + +## I18n variables + +You can define variables in your __() calls like so: + + echo __('Hello, :user', array(':user' => $username)); + +Your i18n key in your translation file will need to be defined as: + + <?php + + return array + ( + 'Hello, :user' => 'Bonjour, :user', + ); + +## Defining your own __() function + +You can define your own __() function by simply defining your own i18n class: + + <?php + + class I18n extends Kohana_I18n + { + // Intentionally empty + } + + function __($string, array $values = NULL, $lang = 'en-us') + { + // Your functionality here + } + +This will cause the built-in __() function to be ignored. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/files/messages.md b/~dev_rating/system/guide/kohana/files/messages.md new file mode 100644 index 0000000000000000000000000000000000000000..5359430db397680e81c62523dd1970be085f5140 --- /dev/null +++ b/~dev_rating/system/guide/kohana/files/messages.md @@ -0,0 +1,36 @@ +# Messages + +Kohana has a robust key based lookup system so you can define system messages. + +## Getting a message + +Use the Kohana::message() method to get a message key: + + Kohana::message('forms', 'foobar'); + +This will look in the `messages/forms.php` file for the `foobar` key: + + <?php + + return array( + 'foobar' => 'Hello, world!', + ); + +You can also look in subfolders and sub-keys: + + Kohana::message('forms/contact', 'foobar.bar'); + +This will look in the `messages/forms/contact.php` for the `[foobar][bar]` key: + + <?php + + return array( + 'foobar' => array( + 'bar' => 'Hello, world!', + ), + ); + +## Notes + + * Don't use __() in your messages files, as these files can be cached and will not work properly. + * Messages are merged by the cascading file system, not overwritten like classes and views. diff --git a/~dev_rating/system/guide/kohana/flow.md b/~dev_rating/system/guide/kohana/flow.md new file mode 100644 index 0000000000000000000000000000000000000000..81a2e54b1cd4c1f1f2044d58df7b749078167cb7 --- /dev/null +++ b/~dev_rating/system/guide/kohana/flow.md @@ -0,0 +1,27 @@ +# Request Flow + +Every application follows the same flow: + +1. Application starts from `index.php`. + 1. The application, module, and system paths are set. (`APPPATH`, `MODPATH`, and `SYSPATH`) + 2. Error reporting levels are set. + 3. Install file is loaded, if it exists. + 4. The bootstrap file, `APPPATH/bootstrap.php`, is included. +2. Once we are in `bootstrap.php`: + 6. The [Kohana] class is loaded. + 7. [Kohana::init] is called, which sets up error handling, caching, and logging. + 8. [Kohana_Config] readers and [Kohana_Log] writers are attached. + 9. [Kohana::modules] is called to enable additional modules. + * Module paths are added to the [cascading filesystem](files). + * Includes each module's `init.php` file, if it exists. + * The `init.php` file can perform additional environment setup, including adding routes. + 10. [Route::set] is called multiple times to define the [application routes](routing). + 11. [Request::instance] is called to start processing the request. + 1. Checks each route that has been set until a match is found. + 2. Creates the controller instance and passes the request to it. + 3. Calls the [Controller::before] method. + 4. Calls the controller action, which generates the request response. + 5. Calls the [Controller::after] method. + * The above 5 steps can be repeated multiple times when using [HMVC sub-requests](requests). +3. Application flow returns to index.php + 12. The main [Request] response is displayed \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/fragments.md b/~dev_rating/system/guide/kohana/fragments.md new file mode 100644 index 0000000000000000000000000000000000000000..fa4f0e31bc61601ae583b3401a5374121dc18fc0 --- /dev/null +++ b/~dev_rating/system/guide/kohana/fragments.md @@ -0,0 +1,135 @@ +# Fragments + +Fragments are a quick and simple way to cache HTML or other output. Fragments are not useful for caching objects or raw database results, in which case you should use a more robust caching method, which can be achieved with the [Cache module](../cache). Fragments use [Kohana::cache()] and will be placed in the cache directory (`application/cache` by default). + +You should use Fragment (or any caching solution) when reading the cache is faster than reprocessing the result. Reading and parsing a remote file, parsing a complicated template, calculating something, etc. + +Fragments are typically used in view files. + +## Usage + +Fragments are used by calling [Fragment::load()] in an `if` statement at the beginning of what you want cached, and [Fragment::save()] at the end. They use [output buffering](http://www.php.net/manual/en/function.ob-start.php) to capture the output between the two function calls. + +You can specify the lifetime (in seconds) of the Fragment using the second parameter of [Fragment::load()]. The default lifetime is 30 seconds. You can use the [Date] helper to make more readable times. + +Fragments will store a different cache for each language (using [I18n]) if you pass `true` as the third parameter to [Fragment::load()]; + +You can force the deletion of a Fragment using [Fragment::delete()], or specify a lifetime of 0. + +~~~ +// Cache for 5 minutes, and cache each language +if ( ! Fragment::load('foobar', Date::MINUTE * 5, true)) +{ + // Anything that is echo'ed here will be saved + Fragment::save(); +} +~~~ + +## Example: Calculating Pi + +In this example we will calculate pi to 1000 places, and cache the result using a fragment. The first time you run this it will probably take a few seconds, but subsequent loads will be much faster, until the fragment lifetime runs out. + +~~~ +if ( ! Fragment::load('pi1000', Date::HOUR * 4)) +{ + // Change function nesting limit + ini_set('xdebug.max_nesting_level',1000); + + // Source: http://mgccl.com/2007/01/22/php-calculate-pi-revisited + function bcfact($n) + { + return ($n == 0 || $n== 1) ? 1 : bcmul($n,bcfact($n-1)); + } + function bcpi($precision) + { + $num = 0;$k = 0; + bcscale($precision+3); + $limit = ($precision+3)/14; + while($k < $limit) + { + $num = bcadd($num, bcdiv(bcmul(bcadd('13591409',bcmul('545140134', $k)),bcmul(bcpow(-1, $k), bcfact(6*$k))),bcmul(bcmul(bcpow('640320',3*$k+1),bcsqrt('640320')), bcmul(bcfact(3*$k), bcpow(bcfact($k),3))))); + ++$k; + } + return bcdiv(1,(bcmul(12,($num))),$precision); + } + + echo bcpi(1000); + + Fragment::save(); +} + +echo View::factory('profiler/stats'); + +?> +~~~ + +## Example: Recent Wikipedia edits + +In this example we will use the [Feed] class to retrieve and parse an RSS feed of recent edits to [http://en.wikipedia.org](http://en.wikipedia.org), then use Fragment to cache the results. + +~~~ +$feed = "http://en.wikipedia.org/w/index.php?title=Special:RecentChanges&feed=rss"; +$limit = 50; + +// Displayed feeds are cached for 30 seconds (default) +if ( ! Fragment::load('rss:'.$feed)): + + // Parse the feed + $items = Feed::parse($feed, $limit); + + foreach ($items as $item): + + // Convert $item to object + $item = (object) $item; + + echo HTML::anchor($item->link,$item->title); + + ?> + <blockquote> + <p>author: <?php echo $item->creator ?></p> + <p>date: <?php echo $item->pubDate ?></p> + </blockquote> + <?php + + endforeach; + + Fragment::save(); + +endif; + +echo View::factory('profiler/stats'); +~~~ + +## Example: Nested Fragments + +You can nest fragments with different lifetimes to provide more specific control. For example, let's say your page has lots of dynamic content so we want to cache it with a lifetime of five minutes, but one of the pieces takes much longer to generate, and only changes every hour anyways. No reason to generate it every 5 minutes, so we will use a nested fragment. + +[!!] If a nested fragment has a shorter lifetime than the parent, it will only get processed when the parent has expired. + +~~~ +// Cache homepage for five minutes +if ( ! Fragment::load('homepage', Date::MINUTE * 5)): + + echo "<p>Home page stuff</p>"; + + // Pretend like we are actually doing something :) + sleep(2); + + // Cache this every hour since it doesn't change as often + if ( ! Fragment::load('homepage-subfragment', Date::HOUR)): + + echo "<p>Home page special thingy</p>"; + + // Pretend like this takes a long time + sleep(5); + + Fragment::save(); endif; + + echo "<p>More home page stuff</p>"; + + Fragment::save(); + +endif; + +echo View::factory('profiler/stats'); +~~~ \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/helpers.md b/~dev_rating/system/guide/kohana/helpers.md new file mode 100644 index 0000000000000000000000000000000000000000..fb0559dd2f8aaf009779ba49261c3d2086301bf9 --- /dev/null +++ b/~dev_rating/system/guide/kohana/helpers.md @@ -0,0 +1,53 @@ +# Helpers + +Kohana comes with many static "helper" functions to make certain tasks easier. + +You can make your own helpers by simply making a class and putting it in the `classes` directory, and you can also extend any helper to modify or add new functions using transparent extension. + + - **[Arr]** - Array functions. Get an array key or default to a set value, get an array key by path, etc. + + - **[CLI]** - Parse command line options. + + - **[Cookie]** - Covered in more detail on the [Cookies](cookies) page. + + - **[Date]** - Useful date functions and constants. Time between two dates, convert between am/pm and military, date offset, etc. + + - **[Encrypt]** - Covered in more detail on the [Security](security) page. + + - **[Feed]** - Parse and create RSS feeds. + + - **[File]** - Get file type by mime, split and merge a file into small pieces. + + - **[Form]** - Create HTML form elements. + + - **[Fragment]** - Simple file based caching. Covered in more detail on the [Fragments](fragments) page. + + - **[HTML]** - Useful HTML functions. Encode, obfuscate, create script, anchor, and image tags, etc. + + - **[I18n]** - Internationalization helper for creating multilanguage sites. + + - **[Inflector]** - Change a word into plural or singular form, camelize or humanize a phrase, etc. + + - **[Kohana]** - The Kohana class is also a helper. Debug variables (like print_r but better), file loading, etc. + + - **[Num]** - Provides locale aware formating and english ordinals (th, st, nd, etc). + + - **[Profiler]** - Covered in more detail on the [Profiling](profiling) page. + + - **[Remote]** - Remote server access helper using [CURL](http://php.net/curl). + + - **[Request]** - Get the current request url, create expire tags, send a file, get the user agent, etc. + + - **[Route]** - Create routes, create an internal link using a route. + + - **[Security]** - Covered in more detail on the [Security](security) page. + + - **[Session]** - Covered in more detail on the [Sessions](sessions) page. + + - **[Text]** - Autolink, prevent window words, convert a number to text, etc. + + - **[URL]** - Create a relative or absolute URL, make a URL-safe title, etc. + + - **[UTF8]** - Provides multi-byte aware string functions like strlen, strpos, substr, etc. + + - **[Upload]** - Helper for uploading files from a form. diff --git a/~dev_rating/system/guide/kohana/index.md b/~dev_rating/system/guide/kohana/index.md new file mode 100644 index 0000000000000000000000000000000000000000..699a5c1997c012ebf8b4a612796f046b299aaacb --- /dev/null +++ b/~dev_rating/system/guide/kohana/index.md @@ -0,0 +1,19 @@ +# What is Kohana? + +Kohana is an open source, [object oriented](http://en.wikipedia.org/wiki/Object-oriented_programming) [MVC](http://en.wikipedia.org/wiki/Model–view–controller "Model View Controller") [web framework](http://en.wikipedia.org/wiki/Web_application_framework) built using [PHP5](http://php.net/manual/intro-whatis "PHP Hypertext Preprocessor") by a team of volunteers that aims to be swift, secure, and small. + +[!!] Kohana is licensed under a [BSD license](http://kohanaframework.org/license), so you can legally use it for any kind of open source, commercial, or personal project. + +## What makes Kohana great? + +Anything can be extended using the unique [filesystem](files) design, little or no [configuration](config) is necessary, [error handling](errors) helps locate the source of errors quickly, and [debugging](debugging) and [profiling](profiling) provide insight into the application. + +To help secure your applications, tools for [input validation](security/validation), [signed cookies](security/cookies), [form] and [HTML] generators are all included. The [database](security/database) layer provides protection against [SQL injection](http://wikipedia.org/wiki/SQL_injection). Of course, all official code is carefully written and reviewed for security. + +## Contribute to the Documentation + +We are working very hard to provide complete documentation. To help improve the guide, please [fork the userguide](http://github.com/kohana/userguide), make your changes, and send a pull request. If you are not familiar with Git, you can also submit a [feature request](http://dev.kohanaframework.org/projects/kohana3/issues) (requires registration). + +## Unofficial Documentation + +If you are having trouble finding an answer here, have a look through the [unofficial wiki](http://kerkness.ca/kowiki/doku.php). Your answer may also be found by searching the [forum](http://forum.kohanaframework.org/) or [Stack Overflow](http://stackoverflow.com/questions/tagged/kohana) followed by asking your question on either. Additionally, you can chat with the community of developers on the freenode [#kohana](irc://irc.freenode.net/kohana) IRC channel. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/install.md b/~dev_rating/system/guide/kohana/install.md new file mode 100644 index 0000000000000000000000000000000000000000..f8e0e420b3f70b3e629812f07f7069a4121228cc --- /dev/null +++ b/~dev_rating/system/guide/kohana/install.md @@ -0,0 +1,64 @@ +# Requirements + +[!!] Before continuing, make sure you have a web server (like Apache) configured with the following requirements. + + - PHP 5.3.3 or newer. + - [Iconv Extension](http://php.net/iconv) + - [Character Type (CTYPE) Extension](http://php.net/ctype) + +# Download + +You can get the latest **stable** release on the [Kohana website](http://kohanaframework.org/). This will give you a fully functional application with an `application`, `modules`, and `system` directory. + +[!!] You can find information about the file structure on the [Cascading Filesystem](files) page. + +Once downloaded, you should extract the Kohana application to a directory where the web server can access it. Going forward, we are going to assume you've extracted the application to a `kohana` directory such that `http://localhost/kohana/index.php` is pointing to the `index.php` file in the Kohana release. + +# Configure + +Before the application can be run, you will need to make a few changes to the `application/bootstrap.php` file. This file is the first one to be included by `index.php` and sets up most of the global options for the application. Open `application/bootstrap.php` and make the following changes: + + - Set the default [timezone](http://php.net/timezones) for your application. +~~~ +// Example of changing timezone to Sao Paulo, Brazil +date_default_timezone_set('America/Sao_Paulo'); +~~~ + - Set the `base_url` in the [Kohana::init] call to reflect the location of the kohana folder on your server relative to the document root. +~~~ +/** + * Example of kohana's installation at /var/www/kohana and + * Apache's DocumentRoot configured to /var/www + */ +Kohana::init(array( + 'base_url' => '/kohana/', +)); +~~~ + + - Make sure the `application/cache` and `application/logs` directories are writable by the web server. +~~~ +sudo chmod -R a+rwx application/cache +sudo chmod -R a+rwx application/logs +~~~ + + - Define a salt for the `Cookie` class. +~~~ +Cookie::$salt = [really-long-cookie-salt-here] +~~~ + +[!!] Make sure to use a unique salt for your application and never to share it. Take a look at the [Cookies](cookies) page for more information on how cookies work in Kohana. If you do not define a `Cookie::$salt` value, Kohana will throw an exception when it encounters any cookie on your domain. + + - Test your installation by opening [http://localhost/kohana](http://localhost/kohana). + +You should see the installation page. If it reports any errors, you will need to correct them before continuing. + + + +Once your install page reports that your environment is set up correctly you need to either rename or delete `install.php`. Kohana is now installed and you should see the output of the welcome controller: + + + +## Installing Kohana From GitHub + +The [source code](http://github.com/kohana/kohana) for Kohana is hosted with [GitHub](http://github.com). To install Kohana using the github source code first you need to install [git](http://git-scm.com/). Visit [http://help.github.com](http://help.github.com) for details on how to install git on your platform. + +[!!] For more information on installing Kohana using git, see the [Working with Git](tutorials/git) tutorial. diff --git a/~dev_rating/system/guide/kohana/menu.md b/~dev_rating/system/guide/kohana/menu.md new file mode 100644 index 0000000000000000000000000000000000000000..01e1de45daccb50b30fa877fb5d7155461297f6b --- /dev/null +++ b/~dev_rating/system/guide/kohana/menu.md @@ -0,0 +1,47 @@ +## [Kohana]() + +- [Installation](install) +- Getting Started + - [Conventions and Style](conventions) + - [Model View Controller](mvc) + - [Controllers](mvc/controllers) + - [Models](mvc/models) + - [Views](mvc/views) + - [Cascading Filesystem](files) + - [Class Files](files/classes) + - [Config Files](files/config) + - [Translation Files](files/i18n) + - [Message Files](files/messages) + - [Configuration](config) + - [Request Flow](flow) + - [Bootstrap](bootstrap) + - [Modules](modules) + - [Routing](routing) + - [Error Handling](errors) + - [Tips & Common Mistakes](tips) + - [Upgrading from v3.2](upgrading) +- Basic Usage + - [Debugging](debugging) + - [Loading Classes](autoloading) + - [Transparent Extension](extension) + - [Helpers](helpers) + - [Requests](requests) + - [Sessions](sessions) + - [Cookies](cookies) + - [Fragments](fragments) + - [Profiling](profiling) +- [Security](security) + - [XSS](security/xss) + - [Validation](security/validation) + - [Cookies](security/cookies) + - [Database](security/database) + - [Encryption](security/encryption) + - [Deploying](security/deploying) +- Tutorials + - [Hello World](tutorials/hello-world) + - [Simple MVC](tutorials/simple-mvc) + - [Custom Error Pages](tutorials/error-pages) + - [Clean URLs](tutorials/clean-urls) + - [Sharing Kohana](tutorials/sharing-kohana) + - [Kohana as a Library](tutorials/library-kohana) + - [Working with Git](tutorials/git) diff --git a/~dev_rating/system/guide/kohana/modules.md b/~dev_rating/system/guide/kohana/modules.md new file mode 100644 index 0000000000000000000000000000000000000000..bc906c4e7faac4e5e73126dcd2e2bc8d04ae5268 --- /dev/null +++ b/~dev_rating/system/guide/kohana/modules.md @@ -0,0 +1,40 @@ +# Modules + +Modules are simply an addition to the [Cascading Filesystem](files). A module can add any kind of file (controllers, views, classes, config files, etc.) to the filesystem available to Kohana (via [Kohana::find_file]). This is useful to make any part of your application more transportable or shareable between different apps. For example, creating a new modeling system, a search engine, a css/js manager, etc. + +## Where to find modules + +Kolanos has created [kohana-universe](http://github.com/kolanos/kohana-universe/tree/master/modules/), a fairly comprehensive list of modules that are available on Github. To get your module listed there, send him a message via Github. + +Mon Geslani created a [very nice site](http://kohana.mongeslani.com/) that allows you to sort Github modules by activity, watchers, forks, etc. It seems to not be as comprehensive as kohana-universe. + +Andrew Hutchings has created [kohana-modules](http://www.kohana-modules.com) which is similar to the above sites. + +## Enabling modules + +Modules are enabled by calling [Kohana::modules] and passing an array of `'name' => 'path'`. The name isn't important, but the path obviously is. A module's path does not have to be in `MODPATH`, but usually is. You can only call [Kohana::modules] once. + + Kohana::modules(array( + 'auth' => MODPATH.'auth', // Basic authentication + 'cache' => MODPATH.'cache', // Caching with multiple backends + 'codebench' => MODPATH.'codebench', // Benchmarking tool + 'database' => MODPATH.'database', // Database access + 'image' => MODPATH.'image', // Image manipulation + 'orm' => MODPATH.'orm', // Object Relationship Mapping + 'oauth' => MODPATH.'oauth', // OAuth authentication + 'pagination' => MODPATH.'pagination', // Paging of results + 'unittest' => MODPATH.'unittest', // Unit testing + 'userguide' => MODPATH.'userguide', // User guide and API documentation + )); + +## Init.php + +When a module is activated, if an `init.php` file exists in that module's directory, it is included. This is the ideal place to have a module include routes or other initialization necessary for the module to function. The Userguide and Codebench modules have init.php files you can look at. + +## How modules work + +A file in an enabled module is virtually the same as having that exact file in the same place in the application folder. The main difference being that it can be overwritten by a file of the same name in a higher location (a module enabled after it, or the application folder) via the [Cascading Filesystem](files). It also provides an easy way to organize and share your code. + +## Creating your own module + +To create a module simply create a folder (usually in `DOCROOT/modules`) and place the files you want to be in the module there, and activate that module in your bootstrap. To share your module, you can upload it to [Github](http://github.com). You can look at examples of modules made by [Kohana](http://github.com/kohana) or [other users](#where-to-find-modules). \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/mvc.md b/~dev_rating/system/guide/kohana/mvc.md new file mode 100644 index 0000000000000000000000000000000000000000..d57b751209d7abc948d1590a542393c09da29a78 --- /dev/null +++ b/~dev_rating/system/guide/kohana/mvc.md @@ -0,0 +1,3 @@ +<http://kohanaframework.org/guide/about.mvc> + +Discuss the MVC pattern, as it pertains to Kohana. Perhaps have an image, etc. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/mvc/controllers.md b/~dev_rating/system/guide/kohana/mvc/controllers.md new file mode 100644 index 0000000000000000000000000000000000000000..3a155dbff6e8d1126ccc02d7abb2551e4b5eb2e3 --- /dev/null +++ b/~dev_rating/system/guide/kohana/mvc/controllers.md @@ -0,0 +1,181 @@ +# Controllers + +A Controller is a class file that stands in between the models and the views in an application. It passes information on to the model when data needs to be changed and it requests information from the model when data needs to be loaded. Controllers then pass on the information of the model to the views where the final output can be rendered for the users. Controllers essentially control the flow of the application. + +Controllers are called by the [Request::execute()] function based on the [Route] that the url matched. Be sure to read the [routing](routing) page to understand how to use routes to map urls to your controllers. + +## Creating Controllers + +In order to function, a controller must do the following: + +* Reside in `classes/Controller` (or a sub-directory) +* Filename must match the class name exactly, e.g. `Articles.php` +* The class name must map to the filename (with `/` replaced with `_`) and each word is capitalized +* Must have the Controller class as a (grand)parent + +Some examples of controller names and file locations: + + // classes/Controller/Foobar.php + class Controller_Foobar extends Controller { + + // classes/Controller/Admin.php + class Controller_Admin extends Controller { + +Controllers can be in sub-folders: + + // classes/Controller/Baz/Bar.php + class Controller_Baz_Bar extends Controller { + + // classes/Controller/Product/Category.php + class Controller_Product_Category extends Controller { + +[!!] Note that controllers in sub-folders can not be called by the default route, you will need to define a route that has a [directory](routing#directory) param or sets a default value for directory. + +Controllers can extend other controllers. + + // classes/Controller/Users.php + class Controller_Users extends Controller_Template + + // classes/Controller/Api.php + class Controller_Api extends Controller_REST + +[!!] [Controller_Template] is an example controller provided in Kohana. + +You can also have a controller extend another controller to share common things, such as requiring you to be logged in to use all of those controllers. + + // classes/Controller/Admin.php + class Controller_Admin extends Controller { + // This controller would have a before() that checks if the user is logged in + + // classes/Controller/Admin/Plugins.php + class Controller_Admin_Plugins extends Controller_Admin { + // Because this controller extends Controller_Admin, it would have the same logged in check + +## $this->request + +Every controller has the `$this->request` property which is the [Request] object that called the controller. You can use this to get information about the current request, as well as set the response body via `$this->response->body($ouput)`. + +Here is a partial list of the properties and methods available to `$this->request`. These can also be accessed via `Request::instance()`, but `$this->request` is provided as a shortcut. See the [Request] class for more information on any of these. + +Property/method | What it does +--- | --- +[$this->request->route()](../api/Request#property:route) | The [Route] that matched the current request url +[$this->request->directory()](../api/Request#property:directory), <br /> [$this->request->controller](../api/Request#property:controller), <br /> [$this->request->action](../api/Request#property:action) | The directory, controller and action that matched for the current route +[$this->request->param()](../api/Request#param) | Any other params defined in your route + +## $this->response +[$this->response->body()](../api/Response#property:body) | The content to return for this request +[$this->response->status()](../api/Response#property:status) | The HTTP status for the request (200, 404, 500, etc.) +[$this->response->headers()](../api/Response#property:headers) | The HTTP headers to return with the response + + +## Actions + +You create actions for your controller by defining a public function with an `action_` prefix. Any method that is not declared as `public` and prefixed with `action_` can NOT be called via routing. + +An action method will decide what should be done based on the current request, it *controls* the application. Did the user want to save a blog post? Did they provide the necessary fields? Do they have permission to do that? The controller will call other classes, including models, to accomplish this. Every action should set `$this->response->body($view)` to the [view file](mvc/views) to be sent to the browser, unless it redirected or otherwise ended the script earlier. + +A very basic action method that simply loads a [view](mvc/views) file. + + public function action_hello() + { + $this->response->body(View::factory('hello/world')); // This will load views/hello/world.php + } + +### Parameters + +Parameters are accessed by calling `$this->request->param('name')` where `name` is the name defined in the route. + + // Assuming Route::set('example','<controller>(/<action>(/<id>(/<new>)))'); + + public function action_foobar() + { + $id = $this->request->param('id'); + $new = $this->request->param('new'); + +If that parameter is not set it will be returned as NULL. You can provide a second parameter to set a default value if that param is not set. + + public function action_foobar() + { + // $id will be false if it was not supplied in the url + $id = $this->request->param('user',FALSE); + +### Examples + +A view action for a product page. + + public function action_view() + { + $product = new Model_Product($this->request->param('id')); + + if ( ! $product->loaded()) + { + throw HTTP_Exception::factory(404, 'Product not found!'); + } + + $this->response->body(View::factory('product/view') + ->set('product', $product)); + } + +A user login action. + + public function action_login() + { + $view = View::factory('user/login'); + + if ($this->request->post()) + { + // Try to login + if (Auth::instance()->login($this->request->post('username'), $this->request->post('password'))) + { + $this->redirect('home', 303); + } + + $view->errors = 'Invalid email or password'; + } + + $this->response->body($view); + } + +## Before and after + +You can use the `before()` and `after()` functions to have code executed before or after the action is executed. For example, you could check if the user is logged in, set a template view, loading a required file, etc. + +For example, if you look in `Controller_Template` you can see that in the be + +You can check what action has been requested (via `$this->request->action`) and do something based on that, such as requiring the user to be logged in to use a controller, unless they are using the login action. + + // Checking auth/login in before, and redirecting if necessary: + + Controller_Admin extends Controller { + + public function before() + { + // If this user doesn't have the admin role, and is not trying to login, redirect to login + if ( ! Auth::instance()->logged_in('admin') AND $this->request->action !== 'login') + { + $this->redirect('admin/login', 302); + } + } + + public function action_login() { + ... + +### Custom __construct() function + +In general, you should not have to change the `__construct()` function, as anything you need for all actions can be done in `before()`. If you need to change the controller constructor, you must preserve the parameters or PHP will complain. This is so the Request object that called the controller is available. *Again, in most cases you should probably be using `before()`, and not changing the constructor*, but if you really, *really* need to it should look like this: + + // You should almost never need to do this, use before() instead! + + // Be sure Kohana_Request is in the params + public function __construct(Request $request, Response $response) + { + // You must call parent::__construct at some point in your function + parent::__construct($request, $response); + + // Do whatever else you want + } + +## Extending other controllers + +TODO: More description and examples of extending other controllers, multiple extension, etc. diff --git a/~dev_rating/system/guide/kohana/mvc/models.md b/~dev_rating/system/guide/kohana/mvc/models.md new file mode 100644 index 0000000000000000000000000000000000000000..bfcf2400682b8bf56a77c8eb1781fc34bbbb39e4 --- /dev/null +++ b/~dev_rating/system/guide/kohana/mvc/models.md @@ -0,0 +1,35 @@ +# Models + +From Wikipedia: + + > The model manages the behavior and data of the application domain, + > responds to requests for information about its state (usually from the view), + > and responds to instructions to change state (usually from the controller). + +Creating a simple model: + + class Model_Post extends Model + { + public function do_stuff() + { + // This is where you do domain logic... + } + } + +If you want database access, have your model extend the Model_Database class: + + class Model_Post extends Model_Database + { + public function do_stuff() + { + // This is where you do domain logic... + } + + public function get_stuff() + { + // Get stuff from the database: + return $this->db->query(...); + } + } + +If you want CRUD/ORM capabilities, see the [ORM Module](../../guide/orm) \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/mvc/views.md b/~dev_rating/system/guide/kohana/mvc/views.md new file mode 100644 index 0000000000000000000000000000000000000000..93368ab225440be5fe0b44ec35de474f2d3189fb --- /dev/null +++ b/~dev_rating/system/guide/kohana/mvc/views.md @@ -0,0 +1,153 @@ +# Views + +Views are files that contain the display information for your application. This is most commonly HTML, CSS and Javascript but can be anything you require such as XML or JSON for AJAX output. The purpose of views is to keep this information separate from your application logic for easy reusability and cleaner code. + +Views themselves can contain code used for displaying the data you pass into them. For example, looping through an array of product information and display each one on a new table row. Views are still PHP files so you can use any code you normally would. However, you should try to keep your views as "dumb" as possible and retreive all data you need in your controllers, then pass it to the view. + +# Creating View Files + +View files are stored in the `views` directory of the [filesystem](files). You can also create sub-directories within the `views` directory to organize your files. All of the following examples are reasonable view files: + + APPPATH/views/home.php + APPPATH/views/pages/about.php + APPPATH/views/products/details.php + MODPATH/error/views/errors/404.php + MODPATH/common/views/template.php + +## Loading Views + +[View] objects will typically be created inside a [Controller](mvc/controllers) using the [View::factory] method. Typically the view is then assigned as the [Request::$response] property or to another view. + + public function action_about() + { + $this->response->body(View::factory('pages/about')); + } + +When a view is assigned as the [Response::body], as in the example above, it will automatically be rendered when necessary. To get the rendered result of a view you can call the [View::render] method or just type cast it to a string. When a view is rendered, the view file is loaded and HTML is generated. + + public function action_index() + { + $view = View::factory('pages/about'); + + // Render the view + $about_page = $view->render(); + + // Or just type cast it to a string + $about_page = (string) $view; + + $this->response->body($about_page); + } + +## Variables in Views + +Once view has been loaded, variables can be assigned to it using the [View::set] and [View::bind] methods. + + public function action_roadtrip() + { + $view = View::factory('user/roadtrip') + ->set('places', array('Rome', 'Paris', 'London', 'New York', 'Tokyo')); + ->bind('user', $this->user); + + // The view will have $places and $user variables + $this->response->body($view); + } + +[!!] The only difference between `set()` and `bind()` is that `bind()` assigns the variable by reference. If you `bind()` a variable before it has been defined, the variable will be created with a value of `NULL`. + +You can also assign variables directly to the View object. This is identical to calling `set()`; + + public function action_roadtrip() + { + $view = View::factory('user/roadtrip'); + + $view->places = array('Rome', 'Paris', 'London', 'New York', 'Tokyo'); + $view->user = $this->user; + + // The view will have $places and $user variables + $this->response->body($view); + } + +### Global Variables + +An application may have several view files that need access to the same variables. For example, to display a page title in both the header of your template and in the body of the page content. You can create variables that are accessible in any view using the [View::set_global] and [View::bind_global] methods. + + // Assign $page_title to all views + View::bind_global('page_title', $page_title); + +If the application has three views that are rendered for the home page: `template`, `template/sidebar`, and `pages/home`. First, an abstract controller to create the template will be created: + + abstract class Controller_Website extends Controller_Template { + + public $page_title; + + public function before() + { + parent::before(); + + // Make $page_title available to all views + View::bind_global('page_title', $this->page_title); + + // Load $sidebar into the template as a view + $this->template->sidebar = View::factory('template/sidebar'); + } + + } + +Next, the home controller will extend `Controller_Website`: + + class Controller_Home extends Controller_Website { + + public function action_index() + { + $this->page_title = 'Home'; + + $this->template->content = View::factory('pages/home'); + } + + } + +## Views Within Views + +If you want to include another view within a view, there are two choices. By calling [View::factory] you can sandbox the included view. This means that you will have to provide all of the variables to the view using [View::set] or [View::bind]: + + // In your view file: + + // Only the $user variable will be available in "views/user/login.php" + <?php echo View::factory('user/login')->bind('user', $user) ?> + +The other option is to include the view directly, which makes all of the current variables available to the included view: + + // In your view file: + + // Any variable defined in this view will be included in "views/message.php" + <?php include Kohana::find_file('views', 'user/login') ?> + +You can also assign a variable of your parent view to be the child view from within your controller. For example: + + // In your controller: + + public function action_index() + { + $view = View::factory('common/template'); + + $view->title = "Some title"; + $view->body = View::factory('pages/foobar'); + } + + // In views/common/template.php: + + <html> + <head> + <title><?php echo $title></title> + </head> + + <body> + <?php echo $body ?> + </body> + </html> + +Of course, you can also load an entire [Request] within a view: + + <?php echo Request::factory('user/login')->execute() ?> + +This is an example of \[HMVC], which makes it possible to create and read calls to other URLs within your application. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/profiling.md b/~dev_rating/system/guide/kohana/profiling.md new file mode 100644 index 0000000000000000000000000000000000000000..e7303c82b94f0307d4084167c42a2be8dc9d8c18 --- /dev/null +++ b/~dev_rating/system/guide/kohana/profiling.md @@ -0,0 +1,54 @@ +# Profiling + +Kohana provides a very simple way to display statistics about your application: + +1. Common [Kohana] method calls, such as [Kohana::find_file()]. +2. Requests. Including the main request, as well as any sub-requests. +3. [Database] queries +4. Average execution times for your application + +[!!] In order for profiling to work, the `profile` setting must be `TRUE` in your [Kohana::init()] call in your bootstrap. + +## Profiling your code + +You can easily add profiling to your own functions and code. This is done using the [Profiler::start()] function. The first parameter is the group, the second parameter is the name of the benchmark. + + public function foobar($input) + { + // Be sure to only profile if it's enabled + if (Kohana::$profiling === TRUE) + { + // Start a new benchmark + $benchmark = Profiler::start('Your Category', __FUNCTION__); + } + + // Do some stuff + + if (isset($benchmark)) + { + // Stop the benchmark + Profiler::stop($benchmark); + } + + return $something; + } + +## How to read the profiling report + +The benchmarks are sorted into groups. Each benchmark will show its name, how many times it was run (show in parenthesis after the benchmark name), and then the min, max, average, and total time and memory spent on that benchmark. The total column will have shaded backgrounds to show the relative times between benchmarks in the same group. + +At the very end is a group called "Application Execution". This keeps track of how long each execution has taken. The number in parenthesis is how many executions are being compared. It shows the fastest, slowest, and average time and memory usage of the last several requsets. The last box is the time and memory usage of the current request. + +((This could use a picture of a profiler with some database queries, etc. with annotations to point out each area as just described.)) + +## Displaying the profiler + +You can display or collect the current [profiler] statistics at any time: + + <?php echo View::factory('profiler/stats') ?> + +## Preview + +(This is the actual profiler stats for this page.) + +{{profiler/stats}} \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/requests.md b/~dev_rating/system/guide/kohana/requests.md new file mode 100644 index 0000000000000000000000000000000000000000..eca76a6e0cedbae45423e8c5e2f575a94e72b94e --- /dev/null +++ b/~dev_rating/system/guide/kohana/requests.md @@ -0,0 +1,150 @@ +# Requests + +Kohana includes a flexible HMVC request system. It supports out of the box support for internal requests and external requests. + +HMVC stands for `Hierarchical Model View Controller` and basically means requests can each have MVC triads called from inside each other. + +The Request object in Kohana is HTTP/1.1 compliant. + +## Creating Requests + +Creating a request is very easy: + +### Internal Requests + +An internal request is a request calling to the internal application. It utilizes [routes](routing) to direct the application based on the URI that is passed to it. A basic internal request might look something like: + + $request = Request::factory('welcome'); + +In this example, the URI is 'welcome'. + +#### The initial request + +Since Kohana uses HMVC, you can call many requests inside each other. The first request (usually called from `index.php`) is called the "initial request". You can access this request via: + + Request::initial(); + +You should only use this method if you are absolutely sure you want the initial request. Otherwise you should use the `Request::current()` method. + +#### Sub-requests + +You can call a request at any time in your application by using the `Request::factory()` syntax. All of these requests will be considered sub-requests. + +Other than this difference, they are exactly the same. You can detect if the request is a sub-request in your controller with the is_initial() method: + + $sub_request = ! $this->request->is_initial() + +### External Requests + +An external request calls out to a third party website. + +You can use this to scrape HTML from a remote site, or make a REST call to a third party API: + + // This uses GET + $request = Request::factory('http://www.google.com/'); + + // This uses PUT + $request = Request::factory('http://example.com/put_api')->method(Request::PUT)->body(json_encode('the body'))->headers('Content-Type', 'application/json'); + + // This uses POST + $request = Request::factory('http://example.com/post_api')->method(Request::POST)->post(array('foo' => 'bar', 'bar' => 'baz')); + +## Executing Requests + +To execute a request, use the `execute()` method on it. This will give you a [response](responses) object. + + $request = Request::factory('welcome'); + $response = $request->execute(); + +### Header callbacks +The request client supports header callbacks - an array of callbacks that will be triggered when a specified header is included in the response from a server. Header callbacks provide a powerful way to deal with scenarios including authentication, rate limiting, redirects and other application-specific use cases: + + $request = Request::factory('http://example.com/user', array( + 'header_callbacks' => array( + 'Content-Encoding' => + function (Request $request, Response $response, Request_Client $client) + { + // Uncompress the response + $response->body(GZIP::expand($response->body())); + }, + 'X-Rate-Limited' => + function (Request $request, Response $response, Request_Client $client) + { + // Log the rate limit event + // And perhaps set a deadlock in cache to prevent further requests + }, + 'WWW-Authenticate' => + function (Request $request, Response $response, Request_Client $client) + { + // Execute a request to refresh your OAuth token somehow + // Have the original request resent + return Request::factory($request->uri()) + ->query($request->query()) + ->headers('Authorization', 'token'.$token); + })); + +Where multiple headers are present in the response, callbacks will be executed in sequence. Callbacks can be any valid PHP callback type and have three possible return types: + +Type | Function +------------------|--------- +[Request] object | If a new request is returned, the request client will automatically assign properties, callbacks etc to match the original request and then execute the request. No further callbacks will be triggered for the original request, but the new request may trigger callbacks when executed. +[Response] object | If the callback returns a new response instance it will be returned to the application. No further callbacks will be triggered for the original request. The callback is responsible for setting any relevant callbacks and properties for the request it executes +NULL | The callback can, if required, modify the provided Response object and return NULL. The modified response object will be passed into subsequent callbacks. + +#### Nested requests +If your callback returns a new Request object, the request client will apply the same callback and property definitions to it before execution. This allows for nested requests - for example, you might need to re-authenticate before submitting a POST request and then being redirected to a new location. To avoid infinite recursion and fatal errors, the request client keeps track of the number of subrequests and will throw a [Request_Client_Recursion_Exception] if the recursion gets too deep. This behaviour is controlled by two properties: [Request_Client::callback_depth()] and [Request_Client::max_callback_depth()]. The default limit is 5 subrequests. + +If your callback executes a new request itself and returns the response, it is responsible for dealing with any callbacks and request nesting itself. You may find the [Request_Client::assign_client_properties()] method useful in this case. + +#### Callback parameters +Arbitrary parameters can be passed to the callbacks through the [Request_Client::callback_params()] property: + + $request = Request::factory('http://example.com/foo', array( + 'header_callbacks' => array( + 'X-Custom-1' => + function (Request $request, Response $response, Request_Client $client) + { + // Do something that needs an external parameter + if ($client->callback_params('foo') == 'bar') + { + // etc + } + }, + ) + 'callback_params' => array( + 'foo' => 'bar' + ) + )); + + // later on + $request->client()->callback_params('foo',FALSE); + +As with nested requests, callback_params will automatically be passed to subrequests if the callback returns a new Request object. If the callback returns a Response object, it is responsible for passing on any relevant parameters. + +#### Following redirects +The request client ships with a standard callback to automatically follow redirects - [Request_Client::on_header_location()]. This will recursively follow redirects that are specified with a Location header and a status code in 201, 301, 302, 303, 307. This behaviour is disabled by default, but can be enabled by passing a set of options to the Request's constructor: + + $request = Request::factory('http://example.com/redirectme', array( + 'follow' => TRUE)); + +[!!] If you define additional header callbacks of your own, you will need to include the 'Location' callback in your callbacks array. + +A number of options are available to control the behaviour of the [Request_Client] when following redirects. + +Option |Default |Function +-----------------|------------------------|--------- +follow | FALSE |Whether to follow redirects +follow_headers | array('Authorization') |The keys of headers that will be re-sent with the redirected request +strict_redirect | TRUE |Whether to use the original request method following to a 302 redirect (see below) + +[!!] HTTP/1.1 specifies that a 302 redirect should be followed using the original request method. However, the vast majority of clients and servers get this wrong, with 302 widely used for 'POST - 302 redirect - GET' patterns. By default, Kohana's client is fully compliant with the HTTP spec. If you need to interact with non-compliant third party sites you may need to set strict_redirect FALSE to force the client to switch to GET following a 302 response. + +You can easily alter this behaviour by configuring your own 'Location' header callback. + +## Request Cache Control + +You can cache requests for fast execution by passing a cache instance in as the second parameter of factory: + + $request = Request::factory('welcome', array('cache'=>Cache::instance())); + +TODO diff --git a/~dev_rating/system/guide/kohana/routing.md b/~dev_rating/system/guide/kohana/routing.md new file mode 100644 index 0000000000000000000000000000000000000000..bbf1dcac5306ad3ef3ba853751102107d7c15346 --- /dev/null +++ b/~dev_rating/system/guide/kohana/routing.md @@ -0,0 +1,243 @@ +# Routing + +Kohana provides a very powerful routing system. In essence, routes provide an interface between the urls and your controllers and actions. With the correct routes you could make almost any url scheme correspond to almost any arrangement of controllers, and you could change one without impacting the other. + +As mentioned in the [Request Flow](flow) section, a request is handled by the [Request] class, which will look for a matching [Route] and load the appropriate controller to handle that request. + +[!!] It is important to understand that **routes are matched in the order they are added**, and as soon as a URL matches a route, routing is essentially "stopped" and *the remaining routes are never tried*. Because the default route matches almost anything, including an empty url, new routes must be place before it. + +## Creating routes + +If you look in `APPPATH/bootstrap.php` you will see the "default" route as follows: + + Route::set('default', '(<controller>(/<action>(/<id>)))') + ->defaults(array( + 'controller' => 'Welcome', + 'action' => 'index', + )); + +[!!] The default route is simply provided as a sample, you can remove it and replace it with your own routes. + +So this creates a route with the name `default` that will match urls in the format of `(<controller>(/<action>(/<id>)))`. + +Let's take a closer look at each of the parameters of [Route::set], which are `name`, `uri`, and an optional array `regex`. + +### Name + +The name of the route must be a **unique** string. If it is not it will overwrite the older route with the same name. The name is used for creating urls by reverse routing, or checking which route was matched. + +### URI + +The uri is a string that represents the format of urls that should be matched. The tokens surrounded with `<>` are *keys* and anything surrounded with `()` are *optional* parts of the uri. In Kohana routes, any character is allowed and treated literally aside from `()<>`. The `/` has no meaning besides being a character that must match in the uri. Usually the `/` is used as a static seperator but as long as the regex makes sense, there are no restrictions to how you can format your routes. + +Lets look at the default route again, the uri is `(<controller>(/<action>(/<id>)))`. We have three keys or params: controller, action, and id. In this case, the entire uri is optional, so a blank uri would match and the default controller and action (set by defaults(), [covered below](#defaults)) would be assumed resulting in the `Controller_Welcome` class being loaded and the `action_index` method being called to handle the request. + +You can use any name you want for your keys, but the following keys have special meaning to the [Request] object, and will influence which controller and action are called: + + * **Directory** - The sub-directory of `classes/Controller` to look for the controller (\[covered below]\(#directory)) + * **Controller** - The controller that the request should execute. + * **Action** - The action method to call. + +### Regex + +The Kohana route system uses [perl compatible regular expressions](http://perldoc.perl.org/perlre.html) in its matching process. By default each key (surrounded by `<>`) will match `[^/.,;?\n]++` (or in english: anything that is not a slash, period, comma, semicolon, question mark, or newline). You can define your own patterns for each key by passing an associative array of keys and patterns as an additional third argument to Route::set. + +In this example, we have controllers in two directories, `admin` and `affiliate`. Because this route will only match urls that begin with `admin` or `affiliate`, the default route would still work for controllers in `classes/Controller`. + + Route::set('sections', '<directory>(/<controller>(/<action>(/<id>)))', + array( + 'directory' => '(admin|affiliate)' + )) + ->defaults(array( + 'controller' => 'Home', + 'action' => 'index', + )); + +You can also use a less restrictive regex to match unlimited parameters, or to ignore overflow in a route. In this example, the url `foobar/baz/and-anything/else_that/is-on-the/url` would be routed to `Controller_Foobar::action_baz()` and the `"stuff"` parameter would be `"and-anything/else_that/is-on-the/url"`. If you wanted to use this for unlimited parameters, you could [explode](http://php.net/manual/en/function.explode.php) it, or you just ignore the overflow. + + Route::set('default', '(<controller>(/<action>(/<stuff>)))', array('stuff' => '.*')) + ->defaults(array( + 'controller' => 'Welcome', + 'action' => 'index', + )); + + +### Default values + +If a key in a route is optional (or not present in the route), you can provide a default value for that key by passing an associated array of keys and default values to [Route::defaults], chained after your [Route::set]. This can be useful to provide a default controller or action for your site, among other things. + +[!!] The `controller` and `action` key must always have a value, so they either need to be required in your route (not inside of parentheses) or have a default value provided. + +[!!] Kohana automatically converts controllers to follow the standard naming convention. For example /blog/view/123 would look for the controller Controller_Blog in classes/Controller/Blog.php and trigger the action_view() method on it. + +In the default route, all the keys are optional, and the controller and action are given a default. If we called an empty url, the defaults would fill in and `Controller_Welcome::action_index()` would be called. If we called `foobar` then only the default for action would be used, so it would call `Controller_Foobar::action_index()` and finally, if we called `foobar/baz` then neither default would be used and `Controller_Foobar::action_baz()` would be called. + +TODO: need an example here + +You can also use defaults to set a key that isn't in the route at all. + +TODO: example of either using directory or controller where it isn't in the route, but set by defaults + +### Directory + +## Route Filters + +In 3.3, you can specify advanced routing schemes by using filter callbacks. When you need to match a route based on more than just the URI of a request, for example, based on the method request (GET/POST/DELETE), a filter will allow you to do so. These filters will receive the `Route` object being tested, the currently matched `$params` array, and the `Request` object as the three parameters. Here's a simple example: + + Route::set('save-form', 'save') + ->filter(function($route, $params, $request) + { + if ($request->method() !== HTTP_Request::POST) + { + return FALSE; // This route only matches POST requests + } + }); + +Filters can also replace or alter the array of parameters: + + Route::set('rest-api', 'api/<action>') + ->filter(function($route, $params, $request) + { + // Prefix the method to the action name + $params['action'] = strtolower($request->method()).'_'.$params['action']; + return $params; // Returning an array will replace the parameters + }) + ->defaults(array( + 'controller' => 'api', + )); + +If you are using php 5.2, you can still use any valid callback for this behavior: + + Route::set('testing', 'foo') + ->filter(array('Class', 'method_to_process_my_uri')); + +## Examples + +There are countless other possibilities for routes. Here are some more examples: + + /* + * Authentication shortcuts + */ + Route::set('auth', '<action>', + array( + 'action' => '(login|logout)' + )) + ->defaults(array( + 'controller' => 'Auth' + )); + + /* + * Multi-format feeds + * 452346/comments.rss + * 5373.json + */ + Route::set('feeds', '<user_id>(/<action>).<format>', + array( + 'user_id' => '\d+', + 'format' => '(rss|atom|json)', + )) + ->defaults(array( + 'controller' => 'Feeds', + 'action' => 'status', + )); + + /* + * Static pages + */ + Route::set('static', '<path>.html', + array( + 'path' => '[a-zA-Z0-9_/]+', + )) + ->defaults(array( + 'controller' => 'Static', + 'action' => 'index', + )); + + /* + * You don't like slashes? + * EditGallery:bahamas + * Watch:wakeboarding + */ + Route::set('gallery', '<action>(<controller>):<id>', + array( + 'controller' => '[A-Z][a-z]++', + 'action' => '[A-Z][a-z]++', + )) + ->defaults(array( + 'controller' => 'Slideshow', + )); + + /* + * Quick search + */ + Route::set('search', ':<query>', array('query' => '.*')) + ->defaults(array( + 'controller' => 'Search', + 'action' => 'index', + )); + +## Request parameters + +The `directory`, `controller` and `action` can be accessed from the [Request] as public properties like so: + + // From within a controller: + $this->request->action(); + $this->request->controller(); + $this->request->directory(); + + // Can be used anywhere: + Request::current()->action(); + Request::current()->controller(); + Request::current()->directory(); + +All other keys specified in a route can be accessed via [Request::param()]: + + // From within a controller: + $this->request->param('key_name'); + + // Can be used anywhere: + Request::current()->param('key_name'); + +The [Request::param] method takes an optional second argument to specify a default return value in case the key is not set by the route. If no arguments are given, all keys are returned as an associative array. In addition, `action`, `controller` and `directory` are not accessible via [Request::param()]. + +For example, with the following route: + + Route::set('ads','ad/<ad>(/<affiliate>)') + ->defaults(array( + 'controller' => 'ads', + 'action' => 'index', + )); + +If a url matches the route, then `Controller_Ads::index()` will be called. You can access the parameters by using the `param()` method of the controller's [Request]. Remember to define a default value (via the second, optional parameter of [Request::param]) if you didn't in `->defaults()`. + + class Controller_Ads extends Controller { + public function action_index() + { + $ad = $this->request->param('ad'); + $affiliate = $this->request->param('affiliate',NULL); + } + + +## Where should routes be defined? + +The established convention is to either place your custom routes in the `MODPATH/<module>/init.php` file of your module if the routes belong to a module, or simply insert them into the `APPPATH/bootstrap.php` file (be sure to put them **above** the default route) if they are specific to the application. Of course, nothing stops you from including them from an external file, or even generating them dynamically. + +## A deeper look at how routes work + +TODO: talk about how routes are compiled + +## Creating URLs and links using routes + +Along with Kohana's powerful routing capabilities are included some methods for generating URLs for your routes' uris. You can always specify your uris as a string using [URL::site] to create a full URL like so: + + URL::site('admin/edit/user/'.$user_id); + +However, Kohana also provides a method to generate the uri from the route's definition. This is extremely useful if your routing could ever change since it would relieve you from having to go back through your code and change everywhere that you specified a uri as a string. Here is an example of dynamic generation that corresponds to the `feeds` route example from above: + + Route::get('feeds')->uri(array( + 'user_id' => $user_id, + 'action' => 'comments', + 'format' => 'rss' + )); + +Let's say you decided later to make that route definition more verbose by changing it to `feeds/<user_id>(/<action>).<format>`. If you wrote your code with the above uri generation method you wouldn't have to change a single line! When a part of the uri is enclosed in parentheses and specifies a key for which there in no value provided for uri generation and no default value specified in the route, then that part will be removed from the uri. An example of this is the `(/<id>)` part of the default route; this will not be included in the generated uri if an id is not provided. diff --git a/~dev_rating/system/guide/kohana/security.md b/~dev_rating/system/guide/kohana/security.md new file mode 100644 index 0000000000000000000000000000000000000000..2f90a04b090e76e0f814c2cc091d5e6f3deba8e2 --- /dev/null +++ b/~dev_rating/system/guide/kohana/security.md @@ -0,0 +1 @@ +General security concerns, like using the Security class, CSRF, and a brief intro to XSS, database security, etc. Also mention the security features that Kohana provides, like cleaning globals. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/security/cookies.md b/~dev_rating/system/guide/kohana/security/cookies.md new file mode 100644 index 0000000000000000000000000000000000000000..3966f6c1af95a2168f6a657491486675035ad685 --- /dev/null +++ b/~dev_rating/system/guide/kohana/security/cookies.md @@ -0,0 +1,3 @@ +Discuss security of cookies, like changing the encryption key in the config. + +Not sure why I'm linking to this: <http://kohanaframework.org/guide/security.cookies> \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/security/database.md b/~dev_rating/system/guide/kohana/security/database.md new file mode 100644 index 0000000000000000000000000000000000000000..e6190b7b597a4dbfe05ef607973384790deba1fb --- /dev/null +++ b/~dev_rating/system/guide/kohana/security/database.md @@ -0,0 +1,5 @@ +Discuss database security. + +How to avoid injection, etc. + +Not sure why I'm linking to this: <http://kohanaframework.org/guide/security.database> \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/security/deploying.md b/~dev_rating/system/guide/kohana/security/deploying.md new file mode 100644 index 0000000000000000000000000000000000000000..432e29f26cf20f2e66fb93359fdaf2e8e3024001 --- /dev/null +++ b/~dev_rating/system/guide/kohana/security/deploying.md @@ -0,0 +1,31 @@ +Changes that should happen when you deploy. (Production) + +Security settings from: <http://kohanaframework.org/guide/using.configuration> + +<http://kerkness.ca/wiki/doku.php?id=setting_up_production_environment> + + +## Setting up a production environment + +There are a few things you'll want to do with your application before moving into production. + +1. See the [Bootstrap page](bootstrap) in the docs. + This covers most of the global settings that would change between environments. + As a general rule, you should enable caching and disable profiling ([Kohana::init] settings) for production sites. + [Route::cache] can also help if you have a lot of routes. +2. Turn on APC or some kind of opcode caching. + This is the single easiest performance boost you can make to PHP itself. The more complex your application, the bigger the benefit of using opcode caching. + + /** + * Set the environment string by the domain (defaults to Kohana::DEVELOPMENT). + */ + Kohana::$environment = ($_SERVER['SERVER_NAME'] !== 'localhost') ? Kohana::PRODUCTION : Kohana::DEVELOPMENT; + /** + * Initialise Kohana based on environment + */ + Kohana::init(array( + 'base_url' => '/', + 'index_file' => FALSE, + 'profile' => Kohana::$environment !== Kohana::PRODUCTION, + 'caching' => Kohana::$environment === Kohana::PRODUCTION, + )); diff --git a/~dev_rating/system/guide/kohana/security/encryption.md b/~dev_rating/system/guide/kohana/security/encryption.md new file mode 100644 index 0000000000000000000000000000000000000000..2d9252fee8f99f343f40a085aa316123c31127f7 --- /dev/null +++ b/~dev_rating/system/guide/kohana/security/encryption.md @@ -0,0 +1,107 @@ +# Encryption + +Kohana supports built-in encryption and decryption via the [Encrypt] class, which is a convenient wrapper for the [Mcrypt library](http://www.php.net/mcrypt). + +To use the class, first start by ensuring you have the Mcrypt extension loaded to your PHP config. See the [Mcrypt Installation page](http://www.php.net/manual/en/mcrypt.installation.php) on php.net. The Mcrypt extension requires [libmcrypt](http://sourceforge.net/projects/mcrypt/files/). + +Next, copy the default config/encryption.php from system/config folder to your application/config folder. + +The default Encryption config file that ships with Kohana 3.2.x looks like this: + + <?php defined('SYSPATH') OR die('No direct script access.'); + + return array( + + 'default' => array( + /** + * The following options must be set: + * + * string key secret passphrase + * integer mode encryption mode, one of MCRYPT_MODE_* + * integer cipher encryption cipher, one of the Mcrpyt cipher constants + */ + 'cipher' => MCRYPT_RIJNDAEL_128, + 'mode' => MCRYPT_MODE_NOFB, + ), + + ); + + +A couple of notes about the config. +First, you may have multiple first-level keys other than 'default' if you need to. +In this respect, the config file is similar to having multiple databases defined in your config/database.php file. +Second, notice there is no key provided. You need to add that. +It is strongly recommended that you choose a high-strength random key using the [pwgen linux program](http://linux.die.net/man/1/pwgen)... + + shell> pwgen 63 1 + trwQwVXX96TIJoKxyBHB9AJkwAOHixuV1ENZmIWyanI0j1zNgSVvqywy044Agaj + +...or by going to [GRC.com/passwords.htm](https://www.grc.com/passwords.htm). + +## Complete Config Example + +Here's a sample encryption configuration with three types of encryption defined. **If you copy this example, please change your keys!** + + <?php defined('SYSPATH') OR die('No direct script access.'); + // application/config/encrypt.php + + return array( + + 'default' => array( + 'key' => 'trwQwVXX96TIJoKxyBHB9AJkwAOHixuV1ENZmIWyanI0j1zNgSVvqywy044Agaj', + 'cipher' => MCRYPT_RIJNDAEL_128, + 'mode' => MCRYPT_MODE_NOFB, + ), + 'blowfish' => array( + 'key' => '7bZJJkmNrelj5NaKoY6h6rMSRSmeUlJuTeOd5HHka5XknyMX4uGSfeVolTz4IYy', + 'cipher' => MCRYPT_BLOWFISH, + 'mode' => MCRYPT_MODE_ECB, + ), + 'tripledes' => array( + 'key' => 'a9hcSLRvA3LkFc7EJgxXIKQuz1ec91J7P6WNq1IaxMZp4CTj5m31gZLARLxI1jD', + 'cipher' => MCRYPT_3DES, + 'mode' => MCRYPT_MODE_CBC, + ), + ); + +You can view the available encryption ciphers and modes on your system by running... + + shell> php -r "print_r(get_defined_constants());" | grep MCRYPT + +For more information on Mcrypt ciphers, visit [php.net/mcrypt.ciphers](http://us3.php.net/manual/en/mcrypt.ciphers.php). + +## Basic Usage + +### Create an instance + +To use the Encryption class, obtain an instance of the Encrypt class by calling it's *instance* method, +optionally passing the desired configuration group. If you do not pass a config group to the instance method, +the default group will be used. + + $encrypt = Encrypt::instance('tripledes'); + +### Encoding Data + +Next, encode some data using the *encode* method: + + $encrypt = Encrypt::instance('tripledes'); + $encrypted_data = $encrypt->encode('Data to Encode'); + // $encrypted_data now contains pCD5Z6oVdb9hbLxxV+FgGrhwVzZuhQoH + +[!!] Raw encrypted strings usually won't print in a browser, and may not store properly in a VARCHAR or TEXT field. For this reason, Kohana's Encrypt class automatically calls base64_encode on encode, and base64_decode on decode, to prevent this problem. + +[!!] One word of caution. The length of the encoded data expands quite a bit, so be sure your database column is long enough to store the encrypted data. If even one character is truncated, the data will not be recoverable. + +### Decoding Data + +To decode some data, load it from the place you stored it (most likely your database) then pass it to the *decode* method: + + $encrypt = Encrypt::instance('tripledes'); + $decoded_string = $encrypt->decode($encrypted_data); + echo $decoded_string; + // prints 'Data to Encode' + +You can't know in advance what the encoded string will be, and it's not reproducible, either. +That is, you can encode the same value over and over, but you'll always obtain a different encoded version, +even without changing your key, cipher and mode. This is because Kohana adds some random entropy before encoding it with your value. +This ensures an attacker cannot easily discover your key and cipher, even given a collection of encoded values. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/security/validation.md b/~dev_rating/system/guide/kohana/security/validation.md new file mode 100644 index 0000000000000000000000000000000000000000..43b1e1c26dc5ac3e185af0a7a45428e5c9db2c66 --- /dev/null +++ b/~dev_rating/system/guide/kohana/security/validation.md @@ -0,0 +1,266 @@ +# Validation + +*This page needs to be reviewed for accuracy by the development team. Better examples would be helpful.* + +Validation can be performed on any array using the [Validation] class. Labels and rules can be attached to a Validation object by the array key, called a "field name". + +labels +: A label is a human-readable version of the field name. + +rules +: A rule is a callback or closure used to decide whether or not to add an error to a field + +[!!] Note that any valid [PHP callback](http://php.net/manual/language.pseudo-types.php#language.types.callback) can be used as a rule. + +Using `TRUE` as the field name when adding a rule will be applied to all named fields. + +Creating a validation object is done using the [Validation::factory] method: + + $object = Validation::factory($array); + +[!!] The `$object` object will be used for the rest of this tutorial. This tutorial will show you how to validate the registration of a new user. + +## Provided Rules + +Kohana provides a set of useful rules in the [Valid] class: + +Rule name | Function +------------------------- |------------------------------------------------- +[Valid::not_empty] | Value must be a non-empty value +[Valid::regex] | Match the value against a regular expression +[Valid::min_length] | Minimum number of characters for value +[Valid::max_length] | Maximum number of characters for value +[Valid::exact_length] | Value must be an exact number of characters +[Valid::email] | An email address is required +[Valid::email_domain] | Check that the domain of the email exists +[Valid::url] | Value must be a URL +[Valid::ip] | Value must be an IP address +[Valid::phone] | Value must be a phone number +[Valid::credit_card] | Require a credit card number +[Valid::date] | Value must be a date (and time) +[Valid::alpha] | Only alpha characters allowed +[Valid::alpha_dash] | Only alpha and hyphens allowed +[Valid::alpha_numeric] | Only alpha and numbers allowed +[Valid::digit] | Value must be an integer digit +[Valid::decimal] | Value must be a decimal or float value +[Valid::numeric] | Only numeric characters allowed +[Valid::range] | Value must be within a range +[Valid::color] | Value must be a valid HEX color +[Valid::matches] | Value matches another field value + +## Adding Rules + +All validation rules are defined as a field name, a method, a function (using the [PHP callback](http://php.net/callback) syntax) or [closure](http://php.net/manual/functions.anonymous.php), and an array of parameters: + + $object->rule($field, $callback, array($parameter1, $parameter2)); + +If no parameters are specified, the field value will be passed to the callback. The following two rules are equivalent: + + $object->rule($field, 'not_empty'); + $object->rule($field, 'not_empty', array(':value')); + +Rules defined in the [Valid] class can be added by using the method name alone. The following three rules are equivalent: + + $object->rule('number', 'phone'); + $object->rule('number', array('Valid', 'phone')); + $object->rule('number', 'Valid::phone'); + +### Adding Rules for multiple fields together + +To validate multiple fields together, you can do something like this: + + $object->rule('one', 'only_one', array(':validation', array('one', 'two'))); + $object->rule('two', 'only_one', array(':validation', array('one', 'two'))); + + public function only_one($validation, $fields) + { + // If more than 1 field is set, bail. + $matched = 0; + + foreach ($fields as $field) + { + if (isset($validation[$field])) + { + $matched++; + } + } + + if ($matched > 0) + { + // Add the error to all concerned fields + foreach ($fields as $field) + { + $validation->error($field, 'only_one'); + } + } + } + +## Binding Variables + +The [Validation] class allows you to bind variables to certain strings so that they can be used when defining rules. Variables are bound by calling the [Validation::bind] method. + + $object->bind(':model', $user_model); + // Future code will be able to use :model to reference the object + $object->rule('username', 'some_rule', array(':model')); + +By default, the validation object will automatically bind the following values for you to use as rule parameters: + +- `:validation` - references the validation object +- `:field` - references the field name the rule is for +- `:value` - references the value of the field the rule is for + +## Adding Errors + +The [Validation] class will add an error for a field if any of the rules associated to it return `FALSE`. This allows many built in PHP functions to be used as rules, like `in_array`. + + $object->rule('color', 'in_array', array(':value', array('red', 'green', 'blue'))); + +Rules added to empty fields will run, but returning `FALSE` will not automatically add an error for the field. In order for a rule to affect empty fields, you must add the error manually by calling the [Validation::error] method. In order to do this, you must pass the validation object to the rule. + + $object->rule($field, 'the_rule', array(':validation', ':field')); + + public function the_rule($validation, $field) + { + if (something went wrong) + { + $validation->error($field, 'the_rule'); + } + } + +[!!] `not_empty` and `matches` are the only rules that will run on empty fields and add errors by returning `FALSE`. + +## Example + +To start our example, we will perform validation on the HTTP POST data of the current request that contains user registration information: + +[!!] In Kohana controllers, we access `$this->request->post()` instead of `$_POST` for better request isolation. + + $object = Validation::factory($this->request->post()); + +Next we need to process the POST'ed information using [Validation]. To start, we need to add some rules: + + $object + ->rule('username', 'not_empty') + ->rule('username', 'regex', array(':value', '/^[a-z_.]++$/iD')) + ->rule('password', 'not_empty') + ->rule('password', 'min_length', array(':value', '6')) + ->rule('confirm', 'matches', array(':validation', 'confirm', 'password')) + ->rule('use_ssl', 'not_empty'); + +Any existing PHP function can also be used a rule. For instance, if we want to check if the user entered a proper value for the SSL question: + + $object->rule('use_ssl', 'in_array', array(':value', array('yes', 'no'))); + +Note that all array parameters must still be wrapped in an array! Without the wrapping array, `in_array` would be called as `in_array($value, 'yes', 'no')`, which would result in a PHP error. + +Any custom rules can be added using a [PHP callback](http://php.net/manual/language.pseudo-types.php#language.types.callback]: + + $object->rule('username', 'User_Model::unique_username'); + +The method `User_Model::unique_username()` would be defined similar to: + + public static function unique_username($username) + { + // Check if the username already exists in the database + return ! DB::select(array(DB::expr('COUNT(username)'), 'total')) + ->from('users') + ->where('username', '=', $username) + ->execute() + ->get('total'); + } + +[!!] Custom rules allow many additional checks to be reused for multiple purposes. These methods will almost always exist in a model, but may be defined in any class. + +# A Complete Example + +First, we need a [View] that contains the HTML form, which will be placed in `application/views/user/register.php`: + + <?php echo Form::open() ?> + <?php if ($errors): ?> + <p class="message">Some errors were encountered, please check the details you entered.</p> + <ul class="errors"> + <?php foreach ($errors as $message): ?> + <li><?php echo $message ?></li> + <?php endforeach ?> + <?php endif ?> + + <dl> + <dt><?php echo Form::label('username', 'Username') ?></dt> + <dd><?php echo Form::input('username', $post['username']) ?></dd> + + <dt><?php echo Form::label('password', 'Password') ?></dt> + <dd><?php echo Form::password('password') ?></dd> + <dd class="help">Passwords must be at least 6 characters long.</dd> + <dt><?php echo Form::label('confirm', 'Confirm Password') ?></dt> + <dd><?php echo Form::password('confirm') ?></dd> + + <dt><?php echo Form::label('use_ssl', 'Use extra security?') ?></dt> + <dd><?php echo Form::select('use_ssl', array('yes' => 'Always', 'no' => 'Only when necessary'), $post['use_ssl']) ?></dd> + <dd class="help">For security, SSL is always used when making payments.</dd> + </dl> + + <?php echo Form::submit(NULL, 'Sign Up') ?> + <?php echo Form::close() ?> + +[!!] This example uses the [Form] helper extensively. Using [Form] instead of writing HTML ensures that all of the form inputs will properly handle input that includes HTML characters. If you prefer to write the HTML yourself, be sure to use [HTML::chars] to escape user input. + +Next, we need a controller and action to process the registration, which will be placed in `application/classes/Controller/User.php`: + + class Controller_User extends Controller { + + public function action_register() + { + $user = Model::factory('user'); + + $validation = Validation::factory($this->request->post()) + ->rule('username', 'not_empty') + ->rule('username', 'regex', array(':value', '/^[a-z_.]++$/iD')) + ->rule('username', array($user, 'unique_username')) + + ->rule('password', 'not_empty') + ->rule('password', 'min_length', array(':value', 6)) + ->rule('confirm', 'matches', array(':validation', ':field', 'password')) + + ->rule('use_ssl', 'not_empty') + ->rule('use_ssl', 'in_array', array(':value', array('yes', 'no'))); + + if ($validation->check()) + { + // Data has been validated, register the user + $user->register($this->request->post()); + + // Always redirect after a successful POST to prevent refresh warnings + $this->redirect('user/profile', 303); + } + + // Validation failed, collect the errors + $errors = $validation->errors('user'); + + // Display the registration form + $this->response->body(View::factory('user/register')) + ->bind('post', $this->request->post()) + ->bind('errors', $errors); + } + + } + +We will also need a user model, which will be placed in `application/classes/Model/User.php`: + + class Model_User extends Model { + + public function register($array) + { + // Create a new user record in the database + $id = DB::insert(array_keys($array)) + ->values($array) + ->execute(); + + // Save the new user id to a cookie + cookie::set('user', $id); + + return $id; + } + + } + +That is it, we have a complete user registration example that properly checks user input! diff --git a/~dev_rating/system/guide/kohana/security/xss.md b/~dev_rating/system/guide/kohana/security/xss.md new file mode 100644 index 0000000000000000000000000000000000000000..d1e1c11e69bef437d6fbd38427ed76efc88af5f5 --- /dev/null +++ b/~dev_rating/system/guide/kohana/security/xss.md @@ -0,0 +1,17 @@ +# Cross-Site Scripting (XSS) Security + +*This page is not comprehensive and should not be considered a complete guide to XSS prevention.* + +The first step to preventing [XSS](http://wikipedia.org/wiki/Cross-Site_Scripting) attacks is knowing when you need to protect yourself. XSS can only be triggered when it is displayed within HTML content, sometimes via a form input or being displayed from database results. Any global variable that contains client information can be tainted. This includes `$_GET`, `$_POST`, and `$_COOKIE` data. + +## Prevention + +There are a few simple rules to follow to guard your application HTML against XSS. If you do not want HTML in a variable, use [strip_tags](http://php.net/strip_tags) to remove all unwanted HTML tags from a value. + +[!!] If you allow users to submit HTML to your application, it is highly recommended to use an HTML cleaning tool such as [HTML Purifier](http://htmlpurifier.org/) or [HTML Tidy](http://php.net/tidy). + +The second is to always escape data when inserting into HTML. The [HTML] class provides generators for many common tags, including script and stylesheet links, anchors, images, and email (mailto) links. Any untrusted content should be escaped using [HTML::chars]. + +## References + +* [OWASP XSS Cheat Sheet](http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet) \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/sessions.md b/~dev_rating/system/guide/kohana/sessions.md new file mode 100644 index 0000000000000000000000000000000000000000..d60e70966d8c3e9c43095394c5b6bfbf35df98bb --- /dev/null +++ b/~dev_rating/system/guide/kohana/sessions.md @@ -0,0 +1,167 @@ +# Sessions + +Kohana provides classes that make it easy to work with both cookies and sessions. At a high level both sessions and cookies provide the same functionality. They allow the developer to store temporary or persistent information about a specific client for later retrieval, usually to make something persistent between requests. + +Sessions should be used for storing temporary or private data. Very sensitive data should be stored using the [Session] class with the "database" or "native" adapters. When using the "cookie" adapter, the session should always be encrypted. + +[!!] For more information on best practices with session variables see [the seven deadly sins of sessions](http://lists.nyphp.org/pipermail/talk/2006-December/020358.html). + +## Storing, Retrieving, and Deleting Data + +[Cookie] and [Session] provide a very similar API for storing data. The main difference between them is that sessions are accessed using an object, and cookies are accessed using a static class. + +Accessing the session instance is done using the [Session::instance] method: + + // Get the session instance + $session = Session::instance(); + +When using sessions, you can also get all of the current session data using the [Session::as_array] method: + + // Get all of the session data as an array + $data = $session->as_array(); + +You can also use this to overload the `$_SESSION` global to get and set data in a way more similar to standard PHP: + + // Overload $_SESSION with the session data + $_SESSION =& $session->as_array(); + + // Set session data + $_SESSION[$key] = $value; + +### Storing Data + +Storing session or cookie data is done using the `set` method: + + // Set session data + $session->set($key, $value); + // Or + Session::instance()->set($key, $value); + + // Store a user id + $session->set('user_id', 10); + +### Retrieving Data + +Getting session or cookie data is done using the `get` method: + + // Get session data + $data = $session->get($key, $default_value); + + // Get the user id + $user = $session->get('user_id'); + +### Deleting Data + +Deleting session or cookie data is done using the `delete` method: + + // Delete session data + $session->delete($key); + + + // Delete the user id + $session->delete('user_id'); + +## Session Configuration + +Always check these settings before making your application live, as many of them will have a direct affect on the security of your application. + +## Session Adapters + +When creating or accessing an instance of the [Session] class you can decide which session adapter or driver you wish to use. The session adapters that are available to you are: + +Native +: Stores session data in the default location for your web server. The storage location is defined by [session.save_path](http://php.net/manual/session.configuration.php#ini.session.save-path) in `php.ini` or defined by [ini_set](http://php.net/ini_set). + +Database +: Stores session data in a database table using the [Session_Database] class. Requires the [Database] module to be enabled. + +Cookie +: Stores session data in a cookie using the [Cookie] class. **Sessions will have a 4KB limit when using this adapter, and should be encrypted.** + +The default adapter can be set by changing the value of [Session::$default]. The default adapter is "native". + +To access a Session using the default adapter, simply call [Session::instance()]. To access a Session using something other than the default, pass the adapter name to `instance()`, for example: `Session::instance('cookie')` + + +### Session Adapter Settings + +You can apply configuration settings to each of the session adapters by creating a session config file at `APPPATH/config/session.php`. The following sample configuration file defines all the settings for each adapter: + +[!!] As with cookies, a "lifetime" setting of "0" means that the session will expire when the browser is closed. + + return array( + 'native' => array( + 'name' => 'session_name', + 'lifetime' => 43200, + ), + 'cookie' => array( + 'name' => 'cookie_name', + 'encrypted' => TRUE, + 'lifetime' => 43200, + ), + 'database' => array( + 'name' => 'cookie_name', + 'encrypted' => TRUE, + 'lifetime' => 43200, + 'group' => 'default', + 'table' => 'table_name', + 'columns' => array( + 'session_id' => 'session_id', + 'last_active' => 'last_active', + 'contents' => 'contents' + ), + 'gc' => 500, + ), + ); + +#### Native Adapter + +Type | Setting | Description | Default +----------|-----------|---------------------------------------------------|----------- +`string` | name | name of the session | `"session"` +`integer` | lifetime | number of seconds the session should live for | `0` + +#### Cookie Adapter + +Type | Setting | Description | Default +----------|-----------|---------------------------------------------------|----------- +`string` | name | name of the cookie used to store the session data | `"session"` +`boolean` | encrypted | encrypt the session data using [Encrypt]? | `FALSE` +`integer` | lifetime | number of seconds the session should live for | `0` + +#### Database Adapter + +Type | Setting | Description | Default +----------|-----------|---------------------------------------------------|----------- +`string` | group | [Database::instance] group name | `"default"` +`string` | table | table name to store sessions in | `"sessions"` +`array` | columns | associative array of column aliases | `array` +`integer` | gc | 1:x chance that garbage collection will be run | `500` +`string` | name | name of the cookie used to store the session data | `"session"` +`boolean` | encrypted | encrypt the session data using [Encrypt]? | `FALSE` +`integer` | lifetime | number of seconds the session should live for | `0` + +##### Table Schema + +You will need to create the session storage table in the database. This is the default schema: + + CREATE TABLE `sessions` ( + `session_id` VARCHAR(24) NOT NULL, + `last_active` INT UNSIGNED NOT NULL, + `contents` TEXT NOT NULL, + PRIMARY KEY (`session_id`), + INDEX (`last_active`) + ) ENGINE = MYISAM; + +##### Table Columns + +You can change the column names to match an existing database schema when connecting to a legacy session table. The default value is the same as the key value. + +session_id +: the name of the "id" column + +last_active +: UNIX timestamp of the last time the session was updated + +contents +: session data stored as a serialized string, and optionally encrypted \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/tips.md b/~dev_rating/system/guide/kohana/tips.md new file mode 100644 index 0000000000000000000000000000000000000000..2d6b733b5d68c5fd0b8e4642ceb6d387b288cdb3 --- /dev/null +++ b/~dev_rating/system/guide/kohana/tips.md @@ -0,0 +1,41 @@ +# Tips and Common Mistakes + +This is a collection of tips and common mistakes or errors you may encounter. + +## Never edit the `system` folder! + +You should (almost) never edit the system folder. Any change you want to make to files in system and modules can be made via the [cascading filesystem](files) and [transparent extension](extension) and won't break when you try to update your Kohana version. + +## Don't try and use one route for everything + +Kohana 3 [routes](routing) are very powerful and flexible, don't be afraid to use as many as you need to make your app function the way you want! + +## Files not found on some systems + +As of Kohana 3.3, classes are autoloaded using the case-sensitive PSR-0 autoloader. This means that using the class Foo {} with a file in classes/foo.php will work on case-insensitive file systems (such as the default HFS+ FS used in Mac OS X) but will fail when used on a case-sensitive FS (typical on many production Linux servers). + +## Handling lots of routes + +Sometimes your application is sufficiently complex that you have many routes and it becomes unmanageable to put them all in bootstrap.php. If this is the case, simply make a `routes.php` file in APPPATH and require that in your bootstrap: `require_once APPPATH.'routes'.EXT;` + +## Reflection_Exception + +If you get a Reflection_Exception when setting up your site, it is almost certainly because your [Kohana::init] 'base_url' setting is wrong. If your base url is correct something is probably wrong with your [routes](routing). + + ReflectionException [ -1 ]: Class controller_<something> does not exist + // where <something> is part of the url you entered in your browser + +### Solution {#reflection-exception-solution} + +Set your [Kohana::init] 'base_url' to the correct setting. The base url should be the path to your index.php file relative to the webserver document root. + +## ORM/Session __sleep() bug + +There is a bug in php which can corrupt your session after a fatal error. A production server shouldn't have uncaught fatal errors, so this bug should only happen during development, when you do something stupid and cause a fatal error. On the next page load you will get a database connection error, then all subsequent page loads will display the following error: + + ErrorException [ Notice ]: Undefined index: id + MODPATH/orm/classes/kohana/orm.php [ 1308 ] + +### Solution {#orm-session-sleep-solution} + +To fix this, clear your cookies for that domain to reset your session. This should never happen on a production server, so you won't have to explain to your clients how to clear their cookies. You can see the [discussion on this issue](http://dev.kohanaframework.org/issues/3242) for more details. diff --git a/~dev_rating/system/guide/kohana/tutorials/clean-urls.md b/~dev_rating/system/guide/kohana/tutorials/clean-urls.md new file mode 100644 index 0000000000000000000000000000000000000000..e5a60c40b8ffa435c33ebf73cba14a1d16b4efa7 --- /dev/null +++ b/~dev_rating/system/guide/kohana/tutorials/clean-urls.md @@ -0,0 +1,93 @@ +# Clean URLs + +Removing `index.php` from your urls. + +To keep your URLs clean, you will probably want to be able to access your app without having `/index.php/` in the URL. There are two steps to remove `index.php` from the URL. + +1. Edit the bootstrap file +2. Set up rewriting + +## 1. Configure Bootstrap + +The first thing you will need to change is the `index_file` setting of [Kohana::init] to false: + + Kohana::init(array( + 'base_url' => '/myapp/', + 'index_file' => FALSE, + )); + +This change will make it so all of the links generated using [URL::site], [URL::base], and [HTML::anchor] will no longer include "index.php" in the URL. All generated links will start with `/myapp/` instead of `/myapp/index.php/`. + +## 2. URL Rewriting + +Enabling rewriting is done differently, depending on your web server. + +Rewriting will make it so urls will be passed to index.php. + +## Apache + +Rename `example.htaccess` to only `.htaccess` and alter the `RewriteBase` line to match the `base_url` setting from your [Kohana::init] + + RewriteBase /myapp/ + +The rest of the `.htaccess file` rewrites all requests through index.php, unless the file exists on the server (so your css, images, favicon, etc. are still loaded like normal). In most cases, you are done! + +### 404 errors + +If you get a "404 Not Found" error when trying to view a page then it's likely Apache is not configured to read the `.htaccess` file. + +In the main apache configuration file (usually `httpd.conf`), or in the virtual server configuration file, check that the `AccessFileName` directive is set to `.htaccess` and the `AllowOverride` directive is set to `All`. + + AccessFileName .htaccess + + <Directory "/var/www/html/myapp"> + AllowOverride All + </Directory> + + +### Failed! + +If you get a "Internal Server Error" or "No input file specified" error, try changing: + + RewriteRule ^(?:application|modules|system)\b - [F,L] + +Instead, we can try a slash: + + RewriteRule ^(application|modules|system)/ - [F,L] + +If that doesn't work, try changing: + + RewriteRule .* index.php/$0 [PT] + +To something more simple: + + RewriteRule .* index.php [PT] + +### Still Failed! + +If you are still getting errors, check to make sure that your host supports URL `mod_rewrite`. If you can change the Apache configuration, add these lines to the configuration, usually `httpd.conf`: + + <Directory "/var/www/html/myapp"> + Order allow,deny + Allow from all + AllowOverride All + </Directory> + +You should also check your Apache logs to see if they can shed some light on the error. + +## NGINX + +It is hard to give examples of nginx configuration, but here is a sample for a server: + + location / { + index index.php index.html index.htm; + try_files $uri index.php; + } + + location = index.php { + include fastcgi.conf; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + } + +If you are having issues getting this working, enable debug level logging in nginx and check the access and error logs. diff --git a/~dev_rating/system/guide/kohana/tutorials/error-pages.md b/~dev_rating/system/guide/kohana/tutorials/error-pages.md new file mode 100644 index 0000000000000000000000000000000000000000..adb027f3c6c4ee51c9d486d37f9a595b1f7322c0 --- /dev/null +++ b/~dev_rating/system/guide/kohana/tutorials/error-pages.md @@ -0,0 +1,99 @@ +# Custom Error Pages + +Custom error pages allow you to display a friendly error message to users, rather than the standard Kohana stack trace. + +## Prerequisites + +1. You will need `'errors' => TRUE` passed to [Kohana::init]. This will convert PHP-errors into exceptions which are easier to handle (The default value is `TRUE`). +2. Custom error pages will only be used to handle throw [HTTP_Exception]'s. If you simply set a status of, for example, 404 via [Respose::status] the custom page will not be used. + +## Extending the HTTP_Exception classes + +Handling [HTTP_Exception]'s in Kohana has become easier with the changes introduced in 3.3. + +For each [HTTP_Exception] class we can individually override the generation of the [Response] instance. + +[!!] Note: We can also use HMVC to issue a sub-request to another page rather than generating the [Response] in the [HTTP_Exception] itself. + +For example, to handle 404 pages we can do this in APPPATH/classes/HTTP/Exception/404.php: + + class HTTP_Exception_404 extends Kohana_HTTP_Exception_404 { + + /** + * Generate a Response for the 404 Exception. + * + * The user should be shown a nice 404 page. + * + * @return Response + */ + public function get_response() + { + $view = View::factory('errors/404'); + + // Remembering that `$this` is an instance of HTTP_Exception_404 + $view->message = $this->getMessage(); + + $response = Response::factory() + ->status(404) + ->body($view->render()); + + return $response; + } + } + +Another example, this time to handle 401 Unauthorized errors (aka "Not Logged In") we can do this in APPPATH/classes/HTTP/Exception/401.php: + + class HTTP_Exception_401 extends Kohana_HTTP_Exception_401 { + + /** + * Generate a Response for the 401 Exception. + * + * The user should be redirect to a login page. + * + * @return Response + */ + public function get_response() + { + $response = Response::factory() + ->status(401) + ->headers('Location', URL::site('account/login')); + + return $response; + } + } + +Finally, to override the default [Response] for all [HTTP_Exception]'s without a more specific override we can do this in APPPATH/classes/HTTP/Exception.php: + + class HTTP_Exception extends Kohana_HTTP_Exception { + + /** + * Generate a Response for all Exceptions without a more specific override + * + * The user should see a nice error page, however, if we are in development + * mode we should show the normal Kohana error page. + * + * @return Response + */ + public function get_response() + { + // Lets log the Exception, Just in case it's important! + Kohana_Exception::log($this); + + if (Kohana::$environment >= Kohana::DEVELOPMENT) + { + // Show the normal Kohana error page. + return parent::get_response(); + } + else + { + // Generate a nicer looking "Oops" page. + $view = View::factory('errors/default'); + + $response = Response::factory() + ->status($this->getCode()) + ->body($view->render()); + + return $response; + } + } + } \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/tutorials/git.md b/~dev_rating/system/guide/kohana/tutorials/git.md new file mode 100644 index 0000000000000000000000000000000000000000..6487ed9a23b4ae358107ff984d8aafb7dd7699dd --- /dev/null +++ b/~dev_rating/system/guide/kohana/tutorials/git.md @@ -0,0 +1,143 @@ +# Creating a New Application + +[!!] The following examples assume that your web server is already set up, and you are going to create a new application at <http://localhost/gitorial/>. + +Using your console, change to the empty directory `gitorial` and run `git init`. This will create the bare structure for a new git repository. + +Next, we will create a [submodule](http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html) for the `system` directory. Go to <http://github.com/kohana/core> and copy the "Clone URL": + + + +Now use the URL to create the submodule for `system`: + + git submodule add git://github.com/kohana/core.git system + +[!!] This will create a link to the current development version of the next stable release. The development version should almost always be safe to use, have the same API as the current stable download with bugfixes applied. + +Now add whatever submodules you need. For example, if you need the [Database] module: + + git submodule add git://github.com/kohana/database.git modules/database + +After submodules are added, they must be initialized: + + git submodule init + +Now that the submodules are added, you can commit them: + + git commit -m 'Added initial submodules' + +Next, create the application directory structure. This is the bare minimum required: + + mkdir -p application/classes/{Controller,Model} + mkdir -p application/{config,views} + mkdir -m 0777 -p application/{cache,logs} + +If you run `find application` you should see this: + + application + application/cache + application/config + application/classes + application/classes/Controller + application/classes/Model + application/logs + application/views + +We don't want git to track log or cache files, so add a `.gitignore` file to each of the directories. This will ignore all non-hidden files: + + echo '[^.]*' > application/{logs,cache}/.gitignore + +[!!] Git ignores empty directories, so adding a `.gitignore` file also makes sure that git will track the directory, but not the files within it. + +Now we need the `index.php` and `bootstrap.php` files: + + wget https://github.com/kohana/kohana/raw/3.3/master/index.php --no-check-certificate + wget https://github.com/kohana/kohana/raw/3.3/master/application/bootstrap.php --no-check-certificate -O application/bootstrap.php + +Commit these changes too: + + git add application + git commit -m 'Added initial directory structure' + +That's all there is to it. You now have an application that is using Git for versioning. + +## Adding Submodules +To add a new submodule complete the following steps: + +1. run the following code - git submodule add repository path for each new submodule e.g.: + + git submodule add git://github.com/shadowhand/sprig.git modules/sprig + +2. then init and update the submodules: + + git submodule init + git submodule update + +## Updating Submodules + +At some point you will probably also want to upgrade your submodules. To update all of your submodules to the latest `HEAD` version: + + git submodule foreach 'git checkout 3.3/master && git pull origin 3.3/master' + +To update a single submodule, for example, `system`: + + cd system + git checkout 3.3/master + git pull origin 3.3/master + cd .. + git add system + git commit -m 'Updated system to latest version' + +If you want to update a single submodule to a specific commit: + + cd modules/database + git pull origin 3.3/master + git checkout fbfdea919028b951c23c3d99d2bc1f5bbeda0c0b + cd ../.. + git add database + git commit -m 'Updated database module' + +Note that you can also check out the commit at a tagged official release point, for example: + + git checkout v3.3.0 + +Simply run `git tag` without arguments to get a list of all tags. + +## Removing Submodules +To remove a submodule that is no longer needed complete the following steps: + +1. open .gitmodules and remove the reference to the to submodule + It will look something like this: + + [submodule "modules/auth"] + path = modules/auth + url = git://github.com/kohana/auth.git + +2. open .git/config and remove the reference to the to submodule\\ + + [submodule "modules/auth"] + url = git://github.com/kohana/auth.git + +3. run git rm --cached path/to/submodule, e.g. + + git rm --cached modules/auth + +**Note:** Do not put a trailing slash at the end of path. If you put a trailing slash at the end of the command, it will fail. + +## Updating Remote Repository URL + +During the development of a project, the source of a submodule may change for any reason (you've created your own fork, the server URL changed, the repository name or path changed, etc...) and you'll have to update those changes. To do so, you'll need to perform the following steps: + +1. edit the .gitmodules file, and change the URL for the submodules which changed. + +2. in your source tree's root run: + + git submodule sync + +3. run `git init` to update the project's repository configuration with the new URLs: + + git submodule init + +And it's done, now you can continue pushing and pulling your submodules with no problems. + +Source: http://jtrancas.wordpress.com/2011/02/06/git-submodule-location/ \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/tutorials/hello-world.md b/~dev_rating/system/guide/kohana/tutorials/hello-world.md new file mode 100644 index 0000000000000000000000000000000000000000..0d2140953c7e0beeebcc068fd08e182f45d8bdd0 --- /dev/null +++ b/~dev_rating/system/guide/kohana/tutorials/hello-world.md @@ -0,0 +1,106 @@ +# Hello, World + +Just about every framework ever written has some kind of hello world example included, so it'd be pretty rude of us to break this tradition! + +We'll start out by creating a very very basic hello world, and then we'll expand it to follow MVC principles. + +## Bare bones + +First off we have to make a controller that Kohana can use to handle a request. + +Create the file `application/classes/Controller/Hello.php` in your application folder and fill it out like so: + + <?php defined('SYSPATH') OR die('No Direct Script Access'); + + Class Controller_Hello extends Controller + { + public function action_index() + { + echo 'hello, world!'; + } + } + +Lets see what's going on here: + +`<?php defined('SYSPATH') OR die('No Direct Script Access');` +: You should recognize the first tag as an opening php tag (if you don't you should probably [learn php](http://php.net)). What follows is a small check that makes sure that this file is being included by Kohana. It stops people from accessing files directly from the url. + +`Class Controller_Hello extends Controller` +: This line declares our controller, each controller class has to be prefixed with `Controller_` and an underscore delimited path to the folder the controller is in (see [Conventions and styles](about.conventions) for more info). Each controller should also extend the base `Controller` class which provides a standard structure for controllers. + + +`public function action_index()` +: This defines the "index" action of our controller. Kohana will attempt to call this action if the user hasn't specified an action. (See [Routes, URLs and Links](tutorials.urls)) + +`echo 'hello, world!';` +: And this is the line which outputs the customary phrase! + +Now if you open your browser and go to http://localhost/index.php/hello you should see something like: + + + +## That was good, but we can do better + +What we did in the previous section was a good example of how easy it to create an *extremely* basic Kohana app. (In fact it's so basic, that you should never make it again!) + +If you've ever heard anything about MVC you'll probably have realised that echoing content out in a controller is strictly against the principles of MVC. + +The proper way to code with an MVC framework is to use _views_ to handle the presentation of your application, and allow the controller to do what it does best – control the flow of the request! + +Lets change our original controller slightly: + + <?php defined('SYSPATH') OR die('No Direct Script Access'); + + Class Controller_Hello extends Controller_Template + { + public $template = 'site'; + + public function action_index() + { + $this->template->message = 'hello, world!'; + } + } + +`extends Controller_Template` +: We're now extending the template controller, it makes it more convenient to use views within our controller. + +`public $template = 'site';` +: The template controller needs to know what template you want to use. It'll automatically load the view defined in this variable and assign the view object to it. + +`$this->template->message = 'hello, world!';` +: `$this->template` is a reference to the view object for our site template. What we're doing here is assigning a variable called "message", with a value of "hello, world!" to the view. + +Now lets try running our code... + + + +For some reason Kohana's thrown a wobbly and isn't showing our amazing message. + +If we look at the error message we can see that the View library wasn't able to find our site template, probably because we haven't made it yet – *doh*! + +Let's go and make the view file `application/views/site.php` for our message: + + <html> + <head> + <title>We've got a message for you!</title> + <style type="text/css"> + body {font-family: Georgia;} + h1 {font-style: italic;} + + </style> + </head> + <body> + <h1><?php echo $message; ?></h1> + <p>We just wanted to say it! :)</p> + </body> + </html> + +If we refresh the page then we can see the fruits of our labour: + + + +## Stage 3 – Profit! + +In this tutorial you've learnt how to create a controller and use a view to separate your logic from your display. + +This is obviously a very basic introduction to working with Kohana and doesn't even scrape the potential you have when developing applications with it. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/tutorials/library-kohana.md b/~dev_rating/system/guide/kohana/tutorials/library-kohana.md new file mode 100644 index 0000000000000000000000000000000000000000..91fa495357917d8d0c20e82c8442e7731d22c664 --- /dev/null +++ b/~dev_rating/system/guide/kohana/tutorials/library-kohana.md @@ -0,0 +1,219 @@ +# Importing Kohana as a Library + +If you're working with an existing codebase it's often difficult to modernise the code as it would mean a complete rewrite and there's rarely the time. An alternative is to improve the codebase incrementally as best you can, gradually outsourcing code to external libraries to reduce the amount of old code there is to maintain. + +This tutorial describes how to include the Kohana PHP framework into existing PHP applications, without having to use the routing and HMVC request handling features. + +[!!] The code modified in this tutorial was copied from Kohana version 3.1.x. You may need to update it to work with future releases. + +In normal usage of the Kohana framework, the `index.php` file acts as the request handler; it sets up the environment, loads the system configuration, and then handles the request (see [Request Flow](flow)). +We'll walk you through the steps required to create a file we'll call `include.php` which will allow you to include Kohana from exiting PHP applications. + +## Demo application + +The following file will serve as our (insultingly simple) demo application for this tutorial. + +### File: `demo.php` + +~~~ + <?php + $content = 'Hello World'; + ?> + <html> + <head> + <title>Demo page</title> + </head> + <body> + <?php echo $content; ?> + </body> + </html> +~~~ + +## Install Kohana + +[Download and install the Kohana framework](install); from this point on, we'll be referring to the location of the Kohana libraries as the `kohana` directory. + +## Create a common setup file + +Since `index.php` and `include.php` will duplicate a lot of code, we're going to move that code to a third file, `common.php`. The bulk of the code is unchanged; we've changed the install check to exit rather than return after rendering, and removed the request execution. + +The new file creates the initial request object, rather than fully executing the request, so that, if you do define routes, the `Request::$initial` variable will be set up correctly. + +### File: `kohana/common.php` + +~~~ + <?php + + /** + * The directory in which your application specific resources are located. + * The application directory must contain the bootstrap.php file. + * + * @link http://kohanaframework.org/guide/about.install#application + */ + $application = 'application'; + + /** + * The directory in which your modules are located. + * + * @link http://kohanaframework.org/guide/about.install#modules + */ + $modules = 'modules'; + + /** + * The directory in which the Kohana resources are located. The system + * directory must contain the classes/kohana.php file. + * + * @link http://kohanaframework.org/guide/about.install#system + */ + $system = 'system'; + + /** + * The default extension of resource files. If you change this, all resources + * must be renamed to use the new extension. + * + * @link http://kohanaframework.org/guide/about.install#ext + */ + define('EXT', '.php'); + + /** + * Set the PHP error reporting level. If you set this in php.ini, you remove this. + * @link http://www.php.net/manual/errorfunc.configuration#ini.error-reporting + * + * When developing your application, it is highly recommended to enable notices + * and strict warnings. Enable them by using: E_ALL | E_STRICT + * + * In a production environment, it is safe to ignore notices and strict warnings. + * Disable them by using: E_ALL ^ E_NOTICE + * + * When using a legacy application with PHP >= 5.3, it is recommended to disable + * deprecated notices. Disable with: E_ALL & ~E_DEPRECATED + */ + error_reporting(E_ALL | E_STRICT); + + /** + * End of standard configuration! Changing any of the code below should only be + * attempted by those with a working knowledge of Kohana internals. + * + * @link http://kohanaframework.org/guide/using.configuration + */ + + // Set the full path to the docroot + define('DOCROOT', realpath(dirname(__FILE__)).DIRECTORY_SEPARATOR); + + // Make the application relative to the docroot, for symlink'd index.php + if ( ! is_dir($application) AND is_dir(DOCROOT.$application)) + $application = DOCROOT.$application; + + // Make the modules relative to the docroot, for symlink'd index.php + if ( ! is_dir($modules) AND is_dir(DOCROOT.$modules)) + $modules = DOCROOT.$modules; + + // Make the system relative to the docroot, for symlink'd index.php + if ( ! is_dir($system) AND is_dir(DOCROOT.$system)) + $system = DOCROOT.$system; + + // Define the absolute paths for configured directories + define('APPPATH', realpath($application).DIRECTORY_SEPARATOR); + define('MODPATH', realpath($modules).DIRECTORY_SEPARATOR); + define('SYSPATH', realpath($system).DIRECTORY_SEPARATOR); + + // Clean up the configuration vars + unset($application, $modules, $system); + + if (file_exists('install'.EXT)) + { + // Load the installation check + include 'install'.EXT; + exit; // Changes were made here + } + + /** + * Define the start time of the application, used for profiling. + */ + if ( ! defined('KOHANA_START_TIME')) + { + define('KOHANA_START_TIME', microtime(TRUE)); + } + + /** + * Define the memory usage at the start of the application, used for profiling. + */ + if ( ! defined('KOHANA_START_MEMORY')) + { + define('KOHANA_START_MEMORY', memory_get_usage()); + } + + // Bootstrap the application + require APPPATH.'bootstrap'.EXT; + + /** + * Instantiate the request object. A source of the URI can be passed, eg: $_SERVER['PATH_INFO']. + * If no source is specified, the URI will be automatically detected. + */ + Request::factory(); // Changes were made here +~~~ + +## Alter Kohana's `index.php` + +Having moved most of the code from Kohana's `index.php` to `common.php` the new `kohana/index.php` contains only this: + +### File: `kohana/index.php` + +~~~ + <?php + + require_once 'common.php'; + + // Execute the request + Request::$initial->execute() + ->execute() + ->send_headers(TRUE) + ->body(); +~~~ + +## Create the include file + +Our `include.php` file is also pretty simple. The try-catch clause is needed because if the request matches no routes Kohana will throw an `HTTP_Exception_404` exception. + +### File: `kohana/include.php` + +~~~ + <?php + + try { + require_once 'common.php'; + } + catch (HTTP_Exception_404 $e) + { + // The request did not match any routes; ignore the 404 exception. + } +~~~ + +**NB:** Due to the way Kohana's routing works, if the request matches no routes it will fail to instantiate an object, and `Request::$current` and `Request::$initial` will not be available. + +## Integration + +Now that we're set up, we can add Kohana into our application using a single include, and then we're good to go. + +### File: `demo.php` + +~~~ + <?php + require_once 'kohana/include.php'; + + $content = 'Hello World'; + $content = HTML::anchor('http://kohanaframework.org/', $content); + ?> + <html> + <head> + <title>Demo page</title> + </head> + <body> + <?php echo $content; ?> + <hr /> + <?php echo URL::base(); ?> + <hr /> + <?php echo Debug::dump(array(1,2,3,4,5)); ?> + </body> + </html> +~~~ \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/tutorials/sharing-kohana.md b/~dev_rating/system/guide/kohana/tutorials/sharing-kohana.md new file mode 100644 index 0000000000000000000000000000000000000000..193998a305b2bc2465c3155813f1fbac3c489f01 --- /dev/null +++ b/~dev_rating/system/guide/kohana/tutorials/sharing-kohana.md @@ -0,0 +1,54 @@ +# Sharing Kohana + +Kohana follows a [front controller pattern](http://en.wikipedia.org/wiki/Front_Controller_pattern "Front Controller pattern") (which means that all requests are sent to `index.php`) and as such the [filesystem](files) is very configurable. Inside of `index.php` you can change the `$application`, `$modules`, and `$system` paths. + +[!!] There is a security check at the top of every Kohana file to prevent it from being accessed without using the front controller. Also, the `.htaccess` file should protect those folders as well. Moving the application, modules, and system directories to a location that cannot be accessed via the web can add another layer of security, but is optional. + +The `$application` variable lets you set the directory that contains your application files. By default, this is `application`. The `$modules` variable lets you set the directory that contains module files. The `$system` variable lets you set the directory that contains the default Kohana files. You can move these three directories anywhere. + +For instance, by default the directories are set up like this: + + www/ + index.php + application/ + modules/ + system/ + +You could move the directories out of the web root so they look like this: + + application/ + modules/ + system/ + www/ + index.php + +Then you would need to change the settings in `index.php` to be: + + $application = '../application'; + $modules = '../modules'; + $system = '../system'; + +## Sharing system and modules + +To take this a step further, we could point several Kohana apps to the same system and modules folders. For example (and this is just an example, you could arrange these anyway you want): + + apps/ + foobar/ + application/ + www/ + bazbar/ + application/ + www/ + kohana/ + 3.0.6/ + 3.0.7/ + 3.0.8/ + modules/ + +And you would need to change the settings in `index.php` to be: + + $application = '../application'; + $system = '../../../kohana/3.0.6'; + $modules = '../../../kohana/modules'; + +With this method each app can point to a central copy of Kohana, and when you add a new version, allow you to quickly update the apps by editing their respective `index.php` files. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/tutorials/simple-mvc.md b/~dev_rating/system/guide/kohana/tutorials/simple-mvc.md new file mode 100644 index 0000000000000000000000000000000000000000..b3a475d464bacfdcb9b0e7665c09031335552fc8 --- /dev/null +++ b/~dev_rating/system/guide/kohana/tutorials/simple-mvc.md @@ -0,0 +1 @@ +Simple example of controller model and view working together. \ No newline at end of file diff --git a/~dev_rating/system/guide/kohana/upgrading.md b/~dev_rating/system/guide/kohana/upgrading.md new file mode 100644 index 0000000000000000000000000000000000000000..5c1499437d15ef24656c72efe315ae8f722c27ef --- /dev/null +++ b/~dev_rating/system/guide/kohana/upgrading.md @@ -0,0 +1,100 @@ +# Migrating from 3.2.x + +## HVMC Isolation + +HVMC Sub-request isolation has been improved to prevent exceptions leaking from this inner to the outer request. If you were previously catching any exceptions from sub-requests, you should now be checking the [Response] object returned from [Request::execute]. + +## HTTP Exceptions + +The use of HTTP Exceptions is now encouraged over manually setting the [Response] status to, for example, '404'. This allows for easier custom error pages (detailed below); + +The full list of supported codes can be seen in the SYSPATH/classes/HTTP/Exception/ folder. + +Syntax: + + throw HTTP_Exception::factory($code, $message, array $variables, Exception $previous); + +Examples: + + // Page Not Found + throw HTTP_Exception::factory(404, 'The requested URL :uri was not found on this server.', array( + ':uri' => $this->request->uri(), + )); + + // Unauthorized / Login Requied + throw HTTP_Exception::factory(401)->authenticate('Basic realm="MySite"'); + + // Forbidden / Permission Deined + throw HTTP_Exception::factory(403); + +## Redirects (HTTP 300, 301, 302, 303, 307) + +Redirects are no longer issued against the [Request] object. The new syntax from inside a controller is: + + $this->redirect('http://www.google.com', 302); + +or from outside a controller: + + HTTP::redirect('http://www.google.com', 302); + +## Custom Error Pages (HTTP 500, 404, 403, 401 etc) + +Custom error pages are now easier than ever to implement, thanks to some of the changes brought about by the HVMC and Redirect changes above. + +See [Custom Error Pages](tutorials/error-pages) for more details. + +## Browser cache checking (ETags) + +The Response::check_cache method has moved to [HTTP::check_cache], with an alias at [Controller::check_cache]. Previously, this method would be used from a controller like this: + + $this->response->check_cache(sha1('my content'), Request $this->request); + +Now, there are two options for using the method: + + $this->check_cache(sha1('my content')); + +which is an alias for: + + HTTP::check_cache($this->request, $this->response, sha1('my content')); + +## PSR-0 support (file/class naming conventions) + +With the introduction of [PSR-0](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md) support, the autoloading of classes is case sensitive. Now, the file (and folder) names must match the class name exactly. + +Examples: + + Kohana_Core + +would be located in + + classes/Kohana/Core.php + +and + + Kohana_HTTP_Header + +would be located in + + classes/Kohana/HTTP/Header.php + +This also affects dynamically named classes such as drivers and ORMs. So for example, in the database config using `'mysql'` as the type instead of `'MySQL'` would throw a class not found error. + +## Query Builder Identifier Escaping + +The query builder will no longer detect columns like `COUNT("*")`. Instead, you will need to use `DB::expr()` any time you need an unescaped column. For example: + + DB::select(DB::expr('COUNT(*)'))->from('users')->execute() + +## Route Filters + +In `3.3.0`, you can no longer pass a callback to `Route::uri()`. Instead, we've added the ability to define one or more filters which will be able to decide if the route matches and will also allow you to change any of the parameters. These filters will receive the `Route` object being tested, the currently matched `$params` array, and the `Request` object as the three parameters. + + Route::set('route-name', 'some/uri/<id>') + ->filter(function($route, $params, $request) { + // Returning FALSE will make this route not match + // Returning an array will replace the $params sent to the controller + }); + +These filters can be used for things like prepending the request method to the action, checking if a resource exists before matching the route, or any other logic that the URI alone cannot provide. You can add as many filters as needed so it's useful to keep filters as small as possible to make them reusable. + +See [Routing](routing#route-filters) for more details. \ No newline at end of file diff --git a/~dev_rating/system/i18n/en.php b/~dev_rating/system/i18n/en.php new file mode 100644 index 0000000000000000000000000000000000000000..eda544711f49e9e4eb353b089b8ce60f7d68f57e --- /dev/null +++ b/~dev_rating/system/i18n/en.php @@ -0,0 +1,3 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array(); \ No newline at end of file diff --git a/~dev_rating/system/i18n/es.php b/~dev_rating/system/i18n/es.php new file mode 100644 index 0000000000000000000000000000000000000000..f2f5b16b6d717297450bae1be4743c005f546fd9 --- /dev/null +++ b/~dev_rating/system/i18n/es.php @@ -0,0 +1,8 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'Spanish' => 'EspaГ±ol', + 'Hello, world!' => 'ВЎHola, mundo!', + +); diff --git a/~dev_rating/system/i18n/fr.php b/~dev_rating/system/i18n/fr.php new file mode 100644 index 0000000000000000000000000000000000000000..a4ab944649cf7441773830adf1bde863f9fc3f4b --- /dev/null +++ b/~dev_rating/system/i18n/fr.php @@ -0,0 +1,8 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'French' => 'FranГ§ais', + 'Hello, world!' => 'Bonjour, monde!', + +); diff --git a/~dev_rating/system/media/guide/kohana/cascading_filesystem.png b/~dev_rating/system/media/guide/kohana/cascading_filesystem.png new file mode 100644 index 0000000000000000000000000000000000000000..52a3576df98ae30b214ac4ad2f209dfe2d8690ef Binary files /dev/null and b/~dev_rating/system/media/guide/kohana/cascading_filesystem.png differ diff --git a/~dev_rating/system/media/guide/kohana/hello_world_1.png b/~dev_rating/system/media/guide/kohana/hello_world_1.png new file mode 100644 index 0000000000000000000000000000000000000000..e4ea75d3a230bc6bbb07c96023342dfb3d9c7613 Binary files /dev/null and b/~dev_rating/system/media/guide/kohana/hello_world_1.png differ diff --git a/~dev_rating/system/media/guide/kohana/hello_world_2.png b/~dev_rating/system/media/guide/kohana/hello_world_2.png new file mode 100644 index 0000000000000000000000000000000000000000..9eb10f5676d980b0c689a531e822a542b6608224 Binary files /dev/null and b/~dev_rating/system/media/guide/kohana/hello_world_2.png differ diff --git a/~dev_rating/system/media/guide/kohana/hello_world_2_error.png b/~dev_rating/system/media/guide/kohana/hello_world_2_error.png new file mode 100644 index 0000000000000000000000000000000000000000..244c38e58dc07eaeb4685ff8154c7f47f18ce5f5 Binary files /dev/null and b/~dev_rating/system/media/guide/kohana/hello_world_2_error.png differ diff --git a/~dev_rating/system/media/guide/kohana/install.png b/~dev_rating/system/media/guide/kohana/install.png new file mode 100644 index 0000000000000000000000000000000000000000..d4ea788d1f3463a68eb1dbb23b56702681068e27 Binary files /dev/null and b/~dev_rating/system/media/guide/kohana/install.png differ diff --git a/~dev_rating/system/media/guide/kohana/welcome.png b/~dev_rating/system/media/guide/kohana/welcome.png new file mode 100644 index 0000000000000000000000000000000000000000..0d7ac3d8427e3ef55cb8b0ce9862d238bef17be9 Binary files /dev/null and b/~dev_rating/system/media/guide/kohana/welcome.png differ diff --git a/~dev_rating/system/messages/tests/validation/error_type_check.php b/~dev_rating/system/messages/tests/validation/error_type_check.php new file mode 100644 index 0000000000000000000000000000000000000000..6c5a5fda3effa9e73e894fb89ae65b31e79c29e5 --- /dev/null +++ b/~dev_rating/system/messages/tests/validation/error_type_check.php @@ -0,0 +1,9 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'email' => array( + 'custom' => 'very nice email address you have there', + ), + +); diff --git a/~dev_rating/system/messages/validation.php b/~dev_rating/system/messages/validation.php new file mode 100644 index 0000000000000000000000000000000000000000..236c2abc625f250f856bd970a80fd1a8ac90f219 --- /dev/null +++ b/~dev_rating/system/messages/validation.php @@ -0,0 +1,29 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); + +return array( + + 'alpha' => ':field must contain only letters', + 'alpha_dash' => ':field must contain only numbers, letters and dashes', + 'alpha_numeric' => ':field must contain only letters and numbers', + 'color' => ':field must be a color', + 'credit_card' => ':field must be a credit card number', + 'date' => ':field must be a date', + 'decimal' => ':field must be a decimal with :param2 places', + 'digit' => ':field must be a digit', + 'email' => ':field must be an email address', + 'email_domain' => ':field must contain a valid email domain', + 'equals' => ':field must equal :param2', + 'exact_length' => ':field must be exactly :param2 characters long', + 'in_array' => ':field must be one of the available options', + 'ip' => ':field must be an ip address', + 'matches' => ':field must be the same as :param3', + 'min_length' => ':field must be at least :param2 characters long', + 'max_length' => ':field must not exceed :param2 characters long', + 'not_empty' => ':field must not be empty', + 'numeric' => ':field must be numeric', + 'phone' => ':field must be a phone number', + 'range' => ':field must be within the range of :param2 to :param3', + 'regex' => ':field does not match the required format', + 'url' => ':field must be a url', + +); diff --git a/~dev_rating/system/tests/kohana/ArrTest.php b/~dev_rating/system/tests/kohana/ArrTest.php new file mode 100644 index 0000000000000000000000000000000000000000..12a85efe1ed4f3fb0b15b59b399417e654c82362 --- /dev/null +++ b/~dev_rating/system/tests/kohana/ArrTest.php @@ -0,0 +1,698 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the Arr lib that's shipped with kohana + * + * @group kohana + * @group kohana.core + * @group kohana.core.arr + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ArrTest extends Unittest_TestCase +{ + /** + * Provides test data for test_callback() + * + * @return array + */ + public function provider_callback() + { + return array( + // Tests.... + // That no parameters returns null + array('function', array('function', NULL)), + // That we can get an array of parameters values + array('function(1,2,3)', array('function', array('1', '2', '3'))), + // That it's not just using the callback "function" + array('different_name(harry,jerry)', array('different_name', array('harry', 'jerry'))), + // That static callbacks are parsed into arrays + array('kohana::appify(this)', array(array('kohana', 'appify'), array('this'))), + // Spaces are preserved in parameters + array('deal::make(me, my mate )', array(array('deal', 'make'), array('me', ' my mate '))) + // TODO: add more cases + ); + } + + /** + * Tests Arr::callback() + * + * @test + * @dataProvider provider_callback + * @param string $str String to parse + * @param array $expected Callback and its parameters + */ + public function test_callback($str, $expected) + { + $result = Arr::callback($str); + + $this->assertSame(2, count($result)); + $this->assertSame($expected, $result); + } + + /** + * Provides test data for test_extract + * + * @return array + */ + public function provider_extract() + { + return array( + array( + array('kohana' => 'awesome', 'blueflame' => 'was'), + array('kohana', 'cakephp', 'symfony'), + NULL, + array('kohana' => 'awesome', 'cakephp' => NULL, 'symfony' => NULL) + ), + // I realise noone should EVER code like this in real life, + // but unit testing is very very very very boring + array( + array('chocolate cake' => 'in stock', 'carrot cake' => 'in stock'), + array('carrot cake', 'humble pie'), + 'not in stock', + array('carrot cake' => 'in stock', 'humble pie' => 'not in stock'), + ), + array( + // Source Array + array('level1' => array('level2a' => 'value 1', 'level2b' => 'value 2')), + // Paths to extract + array('level1.level2a', 'level1.level2b'), + // Default + NULL, + // Expected Result + array('level1' => array('level2a' => 'value 1', 'level2b' => 'value 2')), + ), + array( + // Source Array + array('level1a' => array('level2a' => 'value 1'), 'level1b' => array('level2b' => 'value 2')), + // Paths to extract + array('level1a', 'level1b.level2b'), + // Default + NULL, + // Expected Result + array('level1a' => array('level2a' => 'value 1'), 'level1b' => array('level2b' => 'value 2')), + ), + array( + // Source Array + array('level1a' => array('level2a' => 'value 1'), 'level1b' => array('level2b' => 'value 2')), + // Paths to extract + array('level1a', 'level1b.level2b', 'level1c', 'level1d.notfound'), + // Default + 'default', + // Expected Result + array('level1a' => array('level2a' => 'value 1'), 'level1b' => array('level2b' => 'value 2'), 'level1c' => 'default', 'level1d' => array('notfound' => 'default')), + ), + ); + } + + /** + * Tests Arr::extract() + * + * @test + * @dataProvider provider_extract + * @param array $array + * @param array $paths + * @param mixed $default + * @param array $expected + */ + public function test_extract(array $array, array $paths, $default, $expected) + { + $array = Arr::extract($array, $paths, $default); + + $this->assertSame(count($expected), count($array)); + $this->assertSame($expected, $array); + } + + /** + * Provides test data for test_pluck + * + * @return array + */ + public function provider_pluck() + { + return array( + array( + array( + array('id' => 20, 'name' => 'John Smith'), + array('name' => 'Linda'), + array('id' => 25, 'name' => 'Fred'), + ), + 'id', + array(20, 25) + ), + ); + } + + /** + * Tests Arr::pluck() + * + * @test + * @dataProvider provider_pluck + * @param array $array + * @param string $key + * @param array $expected + */ + public function test_pluck(array $array, $key, $expected) + { + $array = Arr::pluck($array, $key); + + $this->assertSame(count($expected), count($array)); + $this->assertSame($expected, $array); + } + + /** + * Provides test data for test_get() + * + * @return array + */ + public function provider_get() + { + return array( + array(array('uno', 'dos', 'tress'), 1, NULL, 'dos'), + array(array('we' => 'can', 'make' => 'change'), 'we', NULL, 'can'), + + array(array('uno', 'dos', 'tress'), 10, NULL, NULL), + array(array('we' => 'can', 'make' => 'change'), 'he', NULL, NULL), + array(array('we' => 'can', 'make' => 'change'), 'he', 'who', 'who'), + array(array('we' => 'can', 'make' => 'change'), 'he', array('arrays'), array('arrays')), + ); + } + + /** + * Tests Arr::get() + * + * @test + * @dataProvider provider_get() + * @param array $array Array to look in + * @param string|integer $key Key to look for + * @param mixed $default What to return if $key isn't set + * @param mixed $expected The expected value returned + */ + public function test_get(array $array, $key, $default, $expected) + { + $this->assertSame( + $expected, + Arr::get($array, $key, $default) + ); + } + + /** + * Provides test data for test_is_assoc() + * + * @return array + */ + public function provider_is_assoc() + { + return array( + array(array('one', 'two', 'three'), FALSE), + array(array('one' => 'o clock', 'two' => 'o clock', 'three' => 'o clock'), TRUE), + ); + } + + /** + * Tests Arr::is_assoc() + * + * @test + * @dataProvider provider_is_assoc + * @param array $array Array to check + * @param boolean $expected Is $array assoc + */ + public function test_is_assoc(array $array, $expected) + { + $this->assertSame( + $expected, + Arr::is_assoc($array) + ); + } + + /** + * Provides test data for test_is_array() + * + * @return array + */ + public function provider_is_array() + { + return array( + array($a = array('one', 'two', 'three'), TRUE), + array(new ArrayObject($a), TRUE), + array(new ArrayIterator($a), TRUE), + array('not an array', FALSE), + array(new stdClass, FALSE), + ); + } + + /** + * Tests Arr::is_array() + * + * @test + * @dataProvider provider_is_array + * @param mixed $value Value to check + * @param boolean $expected Is $value an array? + */ + public function test_is_array($array, $expected) + { + $this->assertSame( + $expected, + Arr::is_array($array) + ); + } + + public function provider_merge() + { + return array( + // Test how it merges arrays and sub arrays with assoc keys + array( + array('name' => 'mary', 'children' => array('fred', 'paul', 'sally', 'jane')), + array('name' => 'john', 'children' => array('fred', 'paul', 'sally', 'jane')), + array('name' => 'mary', 'children' => array('jane')), + ), + // See how it merges sub-arrays with numerical indexes + array( + array(array('test1'), array('test2'), array('test3')), + array(array('test1'), array('test2')), + array(array('test2'), array('test3')), + ), + array( + array(array(array('test1')), array(array('test2')), array(array('test3'))), + array(array(array('test1')), array(array('test2'))), + array(array(array('test2')), array(array('test3'))), + ), + array( + array('a' => array('test1','test2'), 'b' => array('test2','test3')), + array('a' => array('test1'), 'b' => array('test2')), + array('a' => array('test2'), 'b' => array('test3')), + ), + array( + array('digits' => array(0, 1, 2, 3)), + array('digits' => array(0, 1)), + array('digits' => array(2, 3)), + ), + // See how it manages merging items with numerical indexes + array( + array(0, 1, 2, 3), + array(0, 1), + array(2, 3), + ), + // Try and get it to merge assoc. arrays recursively + array( + array('foo' => 'bar', array('temp' => 'life')), + array('foo' => 'bin', array('temp' => 'name')), + array('foo' => 'bar', array('temp' => 'life')), + ), + // Bug #3139 + array( + array('foo' => array('bar')), + array('foo' => 'bar'), + array('foo' => array('bar')), + ), + array( + array('foo' => 'bar'), + array('foo' => array('bar')), + array('foo' => 'bar'), + ), + + // data set #9 + // Associative, Associative + array( + array('a' => 'K', 'b' => 'K', 'c' => 'L'), + array('a' => 'J', 'b' => 'K'), + array('a' => 'K', 'c' => 'L'), + ), + // Associative, Indexed + array( + array('a' => 'J', 'b' => 'K', 'L'), + array('a' => 'J', 'b' => 'K'), + array('K', 'L'), + ), + // Associative, Mixed + array( + array('a' => 'J', 'b' => 'K', 'K', 'c' => 'L'), + array('a' => 'J', 'b' => 'K'), + array('K', 'c' => 'L'), + ), + + // data set #12 + // Indexed, Associative + array( + array('J', 'K', 'a' => 'K', 'c' => 'L'), + array('J', 'K'), + array('a' => 'K', 'c' => 'L'), + ), + // Indexed, Indexed + array( + array('J', 'K', 'L'), + array('J', 'K'), + array('K', 'L'), + ), + // Indexed, Mixed + array( + array('K', 'K', 'c' => 'L'), + array('J', 'K'), + array('K', 'c' => 'L'), + ), + + // data set #15 + // Mixed, Associative + array( + array('a' => 'K', 'K', 'c' => 'L'), + array('a' => 'J', 'K'), + array('a' => 'K', 'c' => 'L'), + ), + // Mixed, Indexed + array( + array('a' => 'J', 'K', 'L'), + array('a' => 'J', 'K'), + array('J', 'L'), + ), + // Mixed, Mixed + array( + array('a' => 'K', 'L'), + array('a' => 'J', 'K'), + array('a' => 'K', 'L'), + ), + + // Bug #3141 + array( + array('servers' => array(array('1.1.1.1', 4730), array('2.2.2.2', 4730))), + array('servers' => array(array('1.1.1.1', 4730))), + array('servers' => array(array('2.2.2.2', 4730))), + ), + ); + } + + /** + * + * @test + * @dataProvider provider_merge + */ + public function test_merge($expected, $array1, $array2) + { + $this->assertSame( + $expected, + Arr::merge($array1,$array2) + ); + } + + /** + * Provides test data for test_path() + * + * @return array + */ + public function provider_path() + { + $array = array( + 'foobar' => array('definition' => 'lost'), + 'kohana' => 'awesome', + 'users' => array( + 1 => array('name' => 'matt'), + 2 => array('name' => 'john', 'interests' => array('hocky' => array('length' => 2), 'football' => array())), + 3 => 'frank', // Issue #3194 + ), + 'object' => new ArrayObject(array('iterator' => TRUE)), // Iterable object should work exactly the same + ); + + return array( + // Tests returns normal values + array($array['foobar'], $array, 'foobar'), + array($array['kohana'], $array, 'kohana'), + array($array['foobar']['definition'], $array, 'foobar.definition'), + // Custom delimiters + array($array['foobar']['definition'], $array, 'foobar/definition', NULL, '/'), + // We should be able to use NULL as a default, returned if the key DNX + array(NULL, $array, 'foobar.alternatives', NULL), + array(NULL, $array, 'kohana.alternatives', NULL), + // Try using a string as a default + array('nothing', $array, 'kohana.alternatives', 'nothing'), + // Make sure you can use arrays as defaults + array(array('far', 'wide'), $array, 'cheese.origins', array('far', 'wide')), + // Ensures path() casts ints to actual integers for keys + array($array['users'][1]['name'], $array, 'users.1.name'), + // Test that a wildcard returns the entire array at that "level" + array($array['users'], $array, 'users.*'), + // Now we check that keys after a wilcard will be processed + array(array(0 => array(0 => 2)), $array, 'users.*.interests.*.length'), + // See what happens when it can't dig any deeper from a wildcard + array(NULL, $array, 'users.*.fans'), + // Starting wildcards, issue #3269 + array(array('matt', 'john'), $array['users'], '*.name'), + // Path as array, issue #3260 + array($array['users'][2]['name'], $array, array('users', 2, 'name')), + array($array['object']['iterator'], $array, 'object.iterator'), + ); + } + + /** + * Tests Arr::path() + * + * @test + * @dataProvider provider_path + * @param string $path The path to follow + * @param mixed $default The value to return if dnx + * @param boolean $expected The expected value + * @param string $delimiter The path delimiter + */ + public function test_path($expected, $array, $path, $default = NULL, $delimiter = NULL) + { + $this->assertSame( + $expected, + Arr::path($array, $path, $default, $delimiter) + ); + } + + /** + * Provides test data for test_path() + * + * @return array + */ + public function provider_set_path() + { + return array( + // Tests returns normal values + array(array('foo' => 'bar'), array(), 'foo', 'bar'), + array(array('kohana' => array('is' => 'awesome')), array(), 'kohana.is', 'awesome'), + array(array('kohana' => array('is' => 'cool', 'and' => 'slow')), + array('kohana' => array('is' => 'cool')), 'kohana.and', 'slow'), + // Custom delimiters + array(array('kohana' => array('is' => 'awesome')), array(), 'kohana/is', 'awesome', '/'), + // Ensures set_path() casts ints to actual integers for keys + array(array('foo' => array('bar')), array('foo' => array('test')), 'foo.0', 'bar'), + // Tests if it allows arrays + array(array('kohana' => array('is' => 'awesome')), array(), array('kohana', 'is'), 'awesome'), + ); + } + + /** + * Tests Arr::path() + * + * @test + * @dataProvider provider_set_path + * @param string $path The path to follow + * @param boolean $expected The expected value + * @param string $delimiter The path delimiter + */ + public function test_set_path($expected, $array, $path, $value, $delimiter = NULL) + { + Arr::set_path($array, $path, $value, $delimiter); + + $this->assertSame($expected, $array); + } + + /** + * Provides test data for test_range() + * + * @return array + */ + public function provider_range() + { + return array( + array(1, 2), + array(1, 100), + array(25, 10), + ); + } + + /** + * Tests Arr::range() + * + * @dataProvider provider_range + * @param integer $step The step between each value in the array + * @param integer $max The max value of the range (inclusive) + */ + public function test_range($step, $max) + { + $range = Arr::range($step, $max); + + $this->assertSame( (int) floor($max / $step), count($range)); + + $current = $step; + + foreach ($range as $key => $value) + { + $this->assertSame($key, $value); + $this->assertSame($current, $key); + $this->assertLessThanOrEqual($max, $key); + $current += $step; + } + } + + /** + * Provides test data for test_unshift() + * + * @return array + */ + public function provider_unshift() + { + return array( + array(array('one' => '1', 'two' => '2',), 'zero', '0'), + array(array('step 1', 'step 2', 'step 3'), 'step 0', 'wow') + ); + } + + /** + * Tests Arr::unshift() + * + * @test + * @dataProvider provider_unshift + * @param array $array + * @param string $key + * @param mixed $value + */ + public function test_unshift(array $array, $key, $value) + { + $original = $array; + + Arr::unshift($array, $key, $value); + + $this->assertNotSame($original, $array); + $this->assertSame(count($original) + 1, count($array)); + $this->assertArrayHasKey($key, $array); + + $this->assertSame($value, reset($array)); + $this->assertSame(key($array), $key); + } + + /** + * Provies test data for test_overwrite + * + * @return array Test Data + */ + public function provider_overwrite() + { + return array( + array( + array('name' => 'Henry', 'mood' => 'tired', 'food' => 'waffles', 'sport' => 'checkers'), + array('name' => 'John', 'mood' => 'bored', 'food' => 'bacon', 'sport' => 'checkers'), + array('name' => 'Matt', 'mood' => 'tired', 'food' => 'waffles'), + array('name' => 'Henry', 'age' => 18,), + ), + ); + } + + /** + * + * @test + * @dataProvider provider_overwrite + */ + public function test_overwrite($expected, $arr1, $arr2, $arr3 = array(), $arr4 = array()) + { + $this->assertSame( + $expected, + Arr::overwrite($arr1, $arr2, $arr3, $arr4) + ); + } + + /** + * Provides test data for test_map + * + * @return array Test Data + */ + public function provider_map() + { + return array( + array('strip_tags', array('<p>foobar</p>'), NULL, array('foobar')), + array('strip_tags', array(array('<p>foobar</p>'), array('<p>foobar</p>')), NULL, array(array('foobar'), array('foobar'))), + array( + 'strip_tags', + array( + 'foo' => '<p>foobar</p>', + 'bar' => '<p>foobar</p>', + ), + NULL, + array( + 'foo' => 'foobar', + 'bar' => 'foobar', + ), + ), + array( + 'strip_tags', + array( + 'foo' => '<p>foobar</p>', + 'bar' => '<p>foobar</p>', + ), + array('foo'), + array( + 'foo' => 'foobar', + 'bar' => '<p>foobar</p>', + ), + ), + array( + array( + 'strip_tags', + 'trim', + ), + array( + 'foo' => '<p>foobar </p>', + 'bar' => '<p>foobar</p>', + ), + NULL, + array( + 'foo' => 'foobar', + 'bar' => 'foobar', + ), + ), + ); + } + + /** + * + * @test + * @dataProvider provider_map + */ + public function test_map($method, $source, $keys, $expected) + { + $this->assertSame( + $expected, + Arr::map($method, $source, $keys) + ); + } + + /** + * Provides test data for test_flatten + * + * @return array Test Data + */ + public function provider_flatten() + { + return array( + array(array('set' => array('one' => 'something'), 'two' => 'other'), array('one' => 'something', 'two' => 'other')), + ); + } + + /** + * + * @test + * @dataProvider provider_flatten + */ + public function test_flatten($source, $expected) + { + $this->assertSame( + $expected, + Arr::flatten($source) + ); + } +} diff --git a/~dev_rating/system/tests/kohana/Config/File/ReaderTest.php b/~dev_rating/system/tests/kohana/Config/File/ReaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..bfc755edaeabd84c34c4e49d3d8b59cddd95a664 --- /dev/null +++ b/~dev_rating/system/tests/kohana/Config/File/ReaderTest.php @@ -0,0 +1,94 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the Config file reader that's shipped with kohana + * + * @group kohana + * @group kohana.config + * + * @package Unittest + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @author Matt Button <matthew@sigswitch.com> + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Config_File_ReaderTest extends Kohana_Unittest_TestCase { + + /** + * If we don't pass a directory to the reader then it should assume + * that we want to search the dir 'config' by default + * + * @test + * @covers Kohana_Config_File_Reader + */ + public function test_default_search_dir_is_config() + { + $reader = new Kohana_Config_File_Reader; + + $this->assertAttributeSame('config', '_directory', $reader); + } + + /** + * If we pass a directory to the constructor of the file reader it + * should change the search directory + * + * @test + * @covers Kohana_Config_File_Reader + */ + public function test_constructor_sets_search_dir_from_param() + { + $reader = new Kohana_Config_File_Reader('gafloog'); + + $this->assertAttributeSame('gafloog', '_directory', $reader); + } + + /** + * If the config dir does not exist then the function should just + * return an empty array + * + * @test + * @covers Kohana_Config_File_Reader::load + */ + public function test_load_returns_empty_array_if_conf_dir_dnx() + { + $config = new Kohana_Config_File_Reader('gafloogle'); + + $this->assertSame(array(), $config->load('values')); + } + + /** + * If the requested config group does not exist then the reader + * should return an empty array + * + * @test + * @covers Kohana_Config_File_Reader::load + */ + public function test_load_returns_empty_array_if_conf_dnx() + { + $config = new Kohana_Config_File_Reader; + + $this->assertSame(array(), $config->load('gafloogle')); + } + + /** + * Test that the load() function is actually loading the + * configuration from the files. + * + * @test + * @covers Kohana_Config_File_Reader::load + */ + public function test_loads_config_from_files() + { + $config = new Kohana_Config_File_Reader; + + $values = $config->load('inflector'); + + // Due to the way the cascading filesystem works there could be + // any number of modifications to the system config in the + // actual output. Therefore to increase compatability we just + // check that we've got an array and that it's not empty + $this->assertNotSame(array(), $values); + $this->assertInternalType('array', $values); + } +} diff --git a/~dev_rating/system/tests/kohana/Config/GroupTest.php b/~dev_rating/system/tests/kohana/Config/GroupTest.php new file mode 100644 index 0000000000000000000000000000000000000000..6222c8df68ed36c149e649066fa29b9a4cbc2e92 --- /dev/null +++ b/~dev_rating/system/tests/kohana/Config/GroupTest.php @@ -0,0 +1,192 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the Config group lib + * + * @group kohana + * @group kohana.config + * + * @package Unittest + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @author Matt Button <matthew@sigswitch.com> + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Config_GroupTest extends Kohana_Unittest_TestCase +{ + /** + * Create a mock Kohana_Config instance + * + * @return Kohana_Config + */ + public function get_mock_config() + { + return new Kohana_Config; + } + + /** + * Gets a fresh instance of Kohana_Config_Group + * + * @param string $group Config Group name + * @param array $config Configuration + * @param Kohana_Config $instance Instance of Kohana_Config + * @return Kohana_Config_Group + */ + public function get_mock_group($group, $config = array(), $instance = NULL) + { + if ($instance === NULL) + { + $instance = $this->get_mock_config(); + } + + return new Kohana_Config_Group($instance, $group, $config); + } + + /** + * The group name and group's config values should be loaded into the object + * by the constructor + * + * @test + * @covers Kohana_Config_Group + */ + public function test_loads_group_name_and_values_in_constructor() + { + $group_name = 'information'; + $group_values = array('var' => 'value'); + + $group = $this->get_mock_group($group_name, $group_values); + + // Now usually we'd just use assertAttributeSame, but that tries to get at protected properties + // by casting the object in question into an array. This usually works fine, but as Kohana_Config_Group + // is a subclass of ArrayObject, casting to an array returns the config items! + // Therefore we have to use this little workaround + $this->assertSame($group_name, $group->group_name()); + $this->assertSame($group_values, $group->getArrayCopy()); + } + + /** + * A config group may not exist (or may not have any values) when it is loaded. + * The config group should allow for this situation and not complain + * + * @test + * @covers Kohana_Config_Group + */ + public function test_allows_empty_group_values() + { + $group = $this->get_mock_group('informatica'); + + $this->assertSame(array(), $group->getArrayCopy()); + } + + /** + * When get() is called it should fetch the config value specified + * + * @test + * @covers Kohana_Config_Group::get + */ + public function test_get_fetches_config_value() + { + $group = $this->get_mock_group('kohana', array('status' => 'awesome')); + + $this->assertSame('awesome', $group->get('status')); + } + + /** + * If a config option does not exist then get() should return the default value, which is + * NULL by default + * + * @test + * @covers Kohana_Config_Group::get + */ + public function test_get_returns_default_value_if_config_option_dnx() + { + $group = $this->get_mock_group('kohana'); + + $this->assertSame(NULL, $group->get('problems', NULL)); + $this->assertSame('nada', $group->get('problems', 'nada')); + } + + /** + * We should be able to modify existing configuration items using set() + * + * @test + * @covers Kohana_Config_Group::set + */ + public function test_set_modifies_existing_config() + { + $group = $this->get_mock_group('kohana', array('status' => 'pre-awesome')); + + $group->set('status', 'awesome'); + + $this->assertSame('awesome', $group->get('status')); + } + + /** + * If we modify the config via set() [$var] or ->$var then the change should be passed to + * the parent config instance so that the config writers can be notified. + * + * The modification to the config should also stick + * + * @test + * @covers Kohana_Config_Group::offsetSet + */ + public function test_writes_changes_to_config() + { + $mock = $this->getMock('Kohana_Config', array('_write_config')); + + $mock + ->expects($this->exactly(3)) + ->method('_write_config') + ->with('kohana', 'status', $this->LogicalOr('totally', 'maybe', 'not')); + + $group = $this->get_mock_group('kohana', array('status' => 'kool'), $mock); + + $group['status'] = 'totally'; + + $group->status = 'maybe'; + + $group->set('status', 'not'); + } + + /** + * Calling as_array() should return the full array, inc. any modifications + * + * @test + * @covers Kohana_Config_Group::as_array + */ + public function test_as_array_returns_full_array() + { + $config = $this->get_mock_group('something', array('var' => 'value')); + + $this->assertSame(array('var' => 'value'), $config->as_array()); + + // Now change some vars **ahem** + $config->var = 'LOLCAT'; + $config->lolcat = 'IN UR CODE'; + + $this->assertSame( + array('var' => 'LOLCAT', 'lolcat' => 'IN UR CODE'), + $config->as_array() + ); + + // And if we remove an item it should be removed from the exported array + unset($config['lolcat']); + $this->assertSame(array('var' => 'LOLCAT'), $config->as_array()); + } + + /** + * Casting the object to a string should serialize the output of as_array + * + * @test + * @covers Kohana_Config_Group::__toString + */ + public function test_to_string_serializes_array_output() + { + $vars = array('kohana' => 'cool', 'unit_tests' => 'boring'); + $config = $this->get_mock_group('hehehe', $vars); + + $this->assertSame(serialize($vars), (string) $config); + } +} + diff --git a/~dev_rating/system/tests/kohana/ConfigTest.php b/~dev_rating/system/tests/kohana/ConfigTest.php new file mode 100644 index 0000000000000000000000000000000000000000..5766d6eb2bb6d7d9b0155efdab5b395ceff9cace --- /dev/null +++ b/~dev_rating/system/tests/kohana/ConfigTest.php @@ -0,0 +1,406 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the Config lib that's shipped with kohana + * + * @group kohana + * @group kohana.core + * @group kohana.core.config + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @author Matt Button <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ConfigTest extends Unittest_TestCase +{ + + /** + * When a config object is initially created there should be + * no readers attached + * + * @test + * @covers Config + */ + public function test_initially_there_are_no_sources() + { + $config = new Config; + + $this->assertAttributeSame(array(), '_sources', $config); + } + + /** + * Test that calling attach() on a kohana config object + * adds the specified reader to the config object + * + * @test + * @covers Config::attach + */ + public function test_attach_adds_reader_and_returns_this() + { + $config = new Config; + $reader = $this->getMock('Kohana_Config_Reader'); + + $this->assertSame($config, $config->attach($reader)); + + $this->assertAttributeContains($reader, '_sources', $config); + } + + /** + * By default (or by passing TRUE as the second parameter) the config object + * should prepend the reader to the front of the readers queue + * + * @test + * @covers Config::attach + */ + public function test_attach_adds_reader_to_front_of_queue() + { + $config = new Config; + + $reader1 = $this->getMock('Kohana_Config_Reader'); + $reader2 = $this->getMock('Kohana_Config_Reader'); + + $config->attach($reader1); + $config->attach($reader2); + + // Rather than do two assertContains we'll do an assertSame to assert + // the order of the readers + $this->assertAttributeSame(array($reader2, $reader1), '_sources', $config); + + // Now we test using the second parameter + $config = new Config; + + $config->attach($reader1); + $config->attach($reader2, TRUE); + + $this->assertAttributeSame(array($reader2, $reader1), '_sources', $config); + } + + /** + * Test that attaching a new reader (and passing FALSE as second param) causes + * phpunit to append the reader rather than prepend + * + * @test + * @covers Config::attach + */ + public function test_attach_can_add_reader_to_end_of_queue() + { + $config = new Config; + $reader1 = $this->getMock('Kohana_Config_Reader'); + $reader2 = $this->getMock('Kohana_Config_Reader'); + + $config->attach($reader1); + $config->attach($reader2, FALSE); + + $this->assertAttributeSame(array($reader1, $reader2), '_sources', $config); + } + + /** + * Calling detach() on a config object should remove it from the queue of readers + * + * @test + * @covers Config::detach + */ + public function test_detach_removes_reader_and_returns_this() + { + $config = new Config; + + // Due to the way phpunit mock generator works if you try and mock a class + // that has already been used then it just re-uses the first's name + + // To get around this we have to specify a totally random name for the second mock object + $reader1 = $this->getMock('Kohana_Config_Reader'); + $reader2 = $this->getMock('Kohana_Config_Reader', array(), array(), 'MY_AWESOME_READER'); + + $config->attach($reader1); + $config->attach($reader2); + + $this->assertSame($config, $config->detach($reader1)); + + $this->assertAttributeNotContains($reader1, '_sources', $config); + $this->assertAttributeContains($reader2, '_sources', $config); + + $this->assertSame($config, $config->detach($reader2)); + + $this->assertAttributeNotContains($reader2, '_sources', $config); + } + + /** + * detach() should return $this even if the specified reader does not exist + * + * @test + * @covers Config::detach + */ + public function test_detach_returns_this_even_when_reader_dnx() + { + $config = new Config; + $reader = $this->getMock('Kohana_Config_Reader'); + + $this->assertSame($config, $config->detach($reader)); + } + + /** + * If we request a config variable with a dot path then + * Config::load() should load the group and return the requested variable + * + * @test + * @covers Config::load + */ + public function test_load_can_get_var_from_dot_path() + { + $config = new Config; + + $reader = $this->getMock('Kohana_Config_Reader', array('load')); + + $reader + ->expects($this->once()) + ->method('load') + ->with('beer') + ->will($this->returnValue(array('stout' => 'Guinness'))); + + $config->attach($reader); + + $this->assertSame('Guinness', $config->load('beer.stout')); + } + + /** + * If we've already loaded a config group then the correct variable + * should be returned if we use the dot path notation to to request + * a var + * + * @test + * @covers Config::load + */ + public function test_load_can_get_var_from_dot_path_for_loaded_group() + { + $config = new Config; + + $reader = $this->getMock('Kohana_Config_Reader', array('load')); + + $reader + ->expects($this->once()) + ->method('load') + ->with('beer') + ->will($this->returnValue(array('stout' => 'Guinness'))); + + $config->attach($reader); + + $config->load('beer'); + + $this->assertSame('Guinness', $config->load('beer.stout')); + } + + /** + * If load() is called and there are no readers present then it should throw + * a kohana exception + * + * @test + * @covers Config::load + * @expectedException Kohana_Exception + */ + public function test_load_throws_exception_if_there_are_no_sources() + { + // The following code should throw an exception and phpunit will catch / handle it + // (see the @expectedException doccomment) + $config = new Kohana_config; + + $config->load('random'); + } + + /** + * Provides test data for test_load_throws_exception_if_no_group_is_given() + * + * @return array + */ + public function provider_load_throws_exception_if_no_group_is_given() + { + return array( + array(NULL), + array(''), + array(array()), + array(array('foo' => 'bar')), + array(new StdClass), + ); + } + + /** + * If an invalid group name is specified then an exception should be thrown. + * + * Invalid means it's either a non-string value, or empty + * + * @test + * @dataProvider provider_load_throws_exception_if_no_group_is_given + * @covers Config::load + * @expectedException Kohana_Exception + */ + public function test_load_throws_exception_if_invalid_group($value) + { + $config = new Kohana_Config; + + $reader = $this->getMock('Kohana_Config_Reader'); + + $config->attach($reader); + + $config->load($value); + } + + /** + * Make sure that _write_config() passes the changed configuration to all + * writers in the queue + * + * @test + * @covers Kohana_Config + */ + public function test_write_config_passes_changed_config_to_all_writers() + { + $config = new Kohana_Config; + + $reader1 = $this->getMock('Kohana_Config_Reader'); + $writer1 = $this->getMock('Kohana_Config_Writer', array('write')); + $writer2 = $this->getMock('Kohana_Config_Writer', array('write')); + + $writer1 + ->expects($this->once()) + ->method('write') + ->with('some_group', 'key', 'value'); + + $writer2 + ->expects($this->once()) + ->method('write') + ->with('some_group', 'key', 'value'); + + $config->attach($reader1)->attach($writer1)->attach($writer2); + + $config->_write_config('some_group', 'key', 'value'); + } + + /** + * Config sources are stored in a stack, make sure that config at the bottom + * of the stack is overriden by config at the top + * + * @test + * @covers Config::load + */ + public function test_config_is_loaded_from_top_to_bottom_of_stack() + { + $group_name = 'lolumns'; + + $reader1 = $this->getMock('Kohana_Config_Reader', array('load'), array(), 'Unittest_Config_Reader_1'); + $reader2 = $this->getMock('Kohana_Config_Reader', array('load'), array(), 'Unittest_Config_Reader_2'); + + $reader1 + ->expects($this->once()) + ->method('load') + ->with($group_name) + ->will($this->returnValue(array('foo' => 'bar', 'kohana' => 'awesome', 'life' => array('normal', 'fated')))); + + $reader2 + ->expects($this->once()) + ->method('load') + ->with($group_name) + ->will($this->returnValue(array('kohana' => 'sweet', 'music' => 'tasteful', 'life' => array('extraordinary', 'destined')))); + + $config = new Kohana_Config; + + // Attach $reader1 at the "top" and reader2 at the "bottom" + $config->attach($reader1)->attach($reader2, FALSE); + + $this->assertSame( + array( + 'kohana' => 'awesome', + 'music' => 'tasteful', + 'life' => array( + 'extraordinary', + 'destined', + 'normal', + 'fated', + ), + 'foo' => 'bar', + ), + $config->load($group_name)->as_array() + ); + } + + /** + * load() should keep a record of what config groups have been requested and if + * a group is requested more than once the first instance should be returned + * + * @test + * @covers Config::load + */ + public function test_load_reuses_config_groups() + { + $reader = $this->getMock('Kohana_Config_Reader', array('load')); + $reader + ->expects($this->once()) + ->method('load') + ->with('something') + ->will($this->returnValue(array())); + + $config = new Kohana_Config; + + $config->attach($reader); + + $group = $config->load('something'); + + $this->assertSame($group, $config->load('something')); + } + + /** + * When we call copy() we expect it to copy the merged config to all writers + * + * @TODO This test sucks due to limitations in the phpunit mock generator. MAKE THIS AWESOME AGAIN! + * @test + * @covers Kohana_Config::copy + */ + public function test_copy_copies_merged_config_to_all_writers() + { + $config = new Kohana_Config; + + $reader1 = $this->getMock('Kohana_Config_Reader', array('load')); + $reader2 = $this->getMock('Kohana_Config_Reader', array('load')); + + $reader1 + ->expects($this->once()) + ->method('load') + ->with('something') + ->will($this->returnValue(array('pie' => 'good', 'kohana' => 'awesome'))); + + $reader2 + ->expects($this->once()) + ->method('load') + ->with('something') + ->will($this->returnValue(array('kohana' => 'good'))); + + $writer1 = $this->getMock('Kohana_Config_Writer', array('write')); + $writer2 = $this->getMock('Kohana_Config_Writer', array('write')); + + // Due to crazy limitations in phpunit's mocking engine we have to be fairly + // liberal here as to what order we receive the config items + // Good news is that order shouldn't matter *yay* + // + // Now save your eyes and skip the next... 13 lines! + $key = $this->logicalOr('pie', 'kohana'); + $val = $this->logicalOr('good', 'awesome'); + + $writer1 + ->expects($this->exactly(2)) + ->method('write') + ->with('something', clone $key, clone $val); + + $writer2 + ->expects($this->exactly(2)) + ->method('write') + ->with('something', clone $key, clone $val); + + $config + ->attach($reader1)->attach($reader2, FALSE) + ->attach($writer1)->attach($writer2); + + // Now let's get this thing going! + $config->copy('something'); + } +} diff --git a/~dev_rating/system/tests/kohana/CookieTest.php b/~dev_rating/system/tests/kohana/CookieTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9c1fe400cdcd496cb8b894f296cb685ce8e313fa --- /dev/null +++ b/~dev_rating/system/tests/kohana/CookieTest.php @@ -0,0 +1,177 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the cookie class + * + * @group kohana + * @group kohana.core + * @group kohana.core.cookie + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_CookieTest extends Unittest_TestCase +{ + + protected $_default_salt = 'AdaoidadnAВЈASDNadnaoiwdnawd'; + /** + * Sets up the environment + */ + // @codingStandardsIgnoreStart + public function setUp() + // @codingStandardsIgnoreEnd + { + parent::setUp(); + + Cookie::$salt = $this->_default_salt; + } + + /** + * Tears down the environment + */ + // @codingStandardsIgnoreStart + public function tearDown() + // @codingStandardsIgnoreEnd + { + parent::tearDown(); + + Cookie::$salt = NULL; + } + + /** + * Provides test data for test_set() + * + * @return array + */ + public function provider_set() + { + return array( + array('foo', 'bar', NULL, TRUE), + array('foo', 'bar', 10, TRUE), + ); + } + + /** + * Tests cookie::set() + * + * @test + * @dataProvider provider_set + * @covers cookie::set + * @param mixed $key key to use + * @param mixed $value value to set + * @param mixed $exp exp to set + * @param boolean $expected Output for cookie::set() + */ + public function test_set($key, $value, $exp, $expected) + { + if (headers_sent()) { + $this->markTestSkipped('Cannot test setting cookies as headers have already been sent'); + } + + $this->assertSame($expected, cookie::set($key, $value, $exp)); + } + + /** + * Provides test data for test_get() + * + * @return array + */ + public function provider_get() + { + // setUp is called after the provider so we need to specify a + // salt here in order to use it in the provider + Cookie::$salt = $this->_default_salt; + + return array( + array('foo', Cookie::salt('foo', 'bar').'~bar', 'bar'), + array('bar', Cookie::salt('foo', 'bar').'~bar', NULL), + array(NULL, Cookie::salt('foo', 'bar').'~bar', NULL), + ); + } + + /** + * Tests cookie::set() + * + * @test + * @dataProvider provider_get + * @covers cookie::get + * @param mixed $key key to use + * @param mixed $value value to set + * @param boolean $expected Output for cookie::get() + */ + public function test_get($key, $value, $expected) + { + if (headers_sent()) { + $this->markTestSkipped('Cannot test setting cookies as headers have already been sent'); + } + + // Force $_COOKIE + if ($key !== NULL) + { + $_COOKIE[$key] = $value; + } + + $this->assertSame($expected, cookie::get($key)); + } + + /** + * Provides test data for test_delete() + * + * @return array + */ + public function provider_delete() + { + return array( + array('foo', TRUE), + ); + } + + /** + * Tests cookie::delete() + * + * @test + * @dataProvider provider_delete + * @covers cookie::delete + * @param mixed $key key to use + * @param boolean $expected Output for cookie::delete() + */ + public function test_delete($key, $expected) + { + if (headers_sent()) { + $this->markTestSkipped('Cannot test setting cookies as headers have already been sent'); + } + + $this->assertSame($expected, cookie::delete($key)); + } + + /** + * Provides test data for test_salt() + * + * @return array + */ + public function provider_salt() + { + return array( + array('foo', 'bar', 'b5773a6255d1deefc23f9f69bcc40fdc998e5802'), + ); + } + + /** + * Tests cookie::salt() + * + * @test + * @dataProvider provider_salt + * @covers cookie::salt + * @param mixed $key key to use + * @param mixed $value value to salt with + * @param boolean $expected Output for cookie::delete() + */ + public function test_salt($key, $value, $expected) + { + $this->assertSame($expected, cookie::salt($key, $value)); + } +} diff --git a/~dev_rating/system/tests/kohana/CoreTest.php b/~dev_rating/system/tests/kohana/CoreTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a0099d103666414cd25dd4db14307f12d7c2940b --- /dev/null +++ b/~dev_rating/system/tests/kohana/CoreTest.php @@ -0,0 +1,391 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana Core + * + * @TODO Use a virtual filesystem (see phpunit doc on mocking fs) for find_file etc. + * + * @group kohana + * @group kohana.core + * @group kohana.core.core + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_CoreTest extends Unittest_TestCase +{ + + /** + * Provides test data for test_sanitize() + * + * @return array + */ + public function provider_sanitize() + { + return array( + // $value, $result + array('foo', 'foo'), + array("foo\r\nbar", "foo\nbar"), + array("foo\rbar", "foo\nbar"), + array("Is your name O\'reilly?", "Is your name O'reilly?") + ); + } + + /** + * Tests Kohana::santize() + * + * @test + * @dataProvider provider_sanitize + * @covers Kohana::sanitize + * @param boolean $value Input for Kohana::sanitize + * @param boolean $result Output for Kohana::sanitize + */ + public function test_sanitize($value, $result) + { + $this->setEnvironment(array('Kohana::$magic_quotes' => TRUE)); + + $this->assertSame($result, Kohana::sanitize($value)); + } + + /** + * Passing FALSE for the file extension should prevent appending any extension. + * See issue #3214 + * + * @test + * @covers Kohana::find_file + */ + public function test_find_file_no_extension() + { + // EXT is manually appened to the _file name_, not passed as the extension + $path = Kohana::find_file('classes', $file = 'Kohana/Core'.EXT, FALSE); + + $this->assertInternalType('string', $path); + + $this->assertStringEndsWith($file, $path); + } + + /** + * If a file can't be found then find_file() should return FALSE if + * only a single file was requested, or an empty array if multiple files + * (i.e. configuration files) were requested + * + * @test + * @covers Kohana::find_file + */ + public function test_find_file_returns_false_or_array_on_failure() + { + $this->assertFalse(Kohana::find_file('configy', 'zebra')); + + $this->assertSame(array(), Kohana::find_file('configy', 'zebra', NULL, TRUE)); + } + + /** + * Kohana::list_files() should return an array on success and an empty array on failure + * + * @test + * @covers Kohana::list_files + */ + public function test_list_files_returns_array_on_success_and_failure() + { + $files = Kohana::list_files('config'); + + $this->assertInternalType('array', $files); + $this->assertGreaterThan(3, count($files)); + + $this->assertSame(array(), Kohana::list_files('geshmuck')); + } + + /** + * Tests Kohana::globals() + * + * @test + * @covers Kohana::globals + */ + public function test_globals_removes_user_def_globals() + { + // Store the globals + $temp_globals = array( + 'cookie' => $_COOKIE, + 'get' => $_GET, + 'files' => $_FILES, + 'post' => $_POST, + 'request' => $_REQUEST, + 'server' => $_SERVER, + 'session' => $_SESSION, + 'globals' => $GLOBALS, + ); + + $GLOBALS = array('hackers' => 'foobar','name' => array('','',''), '_POST' => array()); + + Kohana::globals(); + + $this->assertEquals(array('_POST' => array()), $GLOBALS); + + // Reset the globals for other tests + $_COOKIE = $temp_globals['cookie']; + $_GET = $temp_globals['get']; + $_FILES = $temp_globals['files']; + $_POST = $temp_globals['post']; + $_REQUEST = $temp_globals['request']; + $_SERVER = $temp_globals['server']; + $_SESSION = $temp_globals['session']; + $GLOBALS = $temp_globals['globals']; + } + + /** + * Provides test data for testCache() + * + * @return array + */ + public function provider_cache() + { + return array( + // $value, $result + array('foo', 'hello, world', 10), + array('bar', NULL, 10), + array('bar', NULL, -10), + ); + } + + /** + * Tests Kohana::cache() + * + * @test + * @dataProvider provider_cache + * @covers Kohana::cache + * @param boolean $key Key to cache/get for Kohana::cache + * @param boolean $value Output from Kohana::cache + * @param boolean $lifetime Lifetime for Kohana::cache + */ + public function test_cache($key, $value, $lifetime) + { + Kohana::cache($key, $value, $lifetime); + $this->assertEquals($value, Kohana::cache($key)); + } + + /** + * Provides test data for test_message() + * + * @return array + */ + public function provider_message() + { + return array( + // $value, $result + array(':field must not be empty', 'validation', 'not_empty'), + array( + array( + 'alpha' => ':field must contain only letters', + 'alpha_dash' => ':field must contain only numbers, letters and dashes', + 'alpha_numeric' => ':field must contain only letters and numbers', + 'color' => ':field must be a color', + 'credit_card' => ':field must be a credit card number', + 'date' => ':field must be a date', + 'decimal' => ':field must be a decimal with :param2 places', + 'digit' => ':field must be a digit', + 'email' => ':field must be a email address', + 'email_domain' => ':field must contain a valid email domain', + 'equals' => ':field must equal :param2', + 'exact_length' => ':field must be exactly :param2 characters long', + 'in_array' => ':field must be one of the available options', + 'ip' => ':field must be an ip address', + 'matches' => ':field must be the same as :param2', + 'min_length' => ':field must be at least :param2 characters long', + 'max_length' => ':field must not exceed :param2 characters long', + 'not_empty' => ':field must not be empty', + 'numeric' => ':field must be numeric', + 'phone' => ':field must be a phone number', + 'range' => ':field must be within the range of :param2 to :param3', + 'regex' => ':field does not match the required format', + 'url' => ':field must be a url', + ), + 'validation', NULL, + ), + ); + } + + /** + * Tests Kohana::message() + * + * @test + * @dataProvider provider_message + * @covers Kohana::message + * @param boolean $expected Output for Kohana::message + * @param boolean $file File to look in for Kohana::message + * @param boolean $key Key for Kohana::message + */ + public function test_message($expected, $file, $key) + { + $this->markTestSkipped('This test is incredibly fragile and needs to be re-done'); + $this->assertEquals($expected, Kohana::message($file, $key)); + } + + /** + * Provides test data for test_error_handler() + * + * @return array + */ + public function provider_error_handler() + { + return array( + array(1, 'Foobar', 'foobar.php', __LINE__), + ); + } + + /** + * Tests Kohana::error_handler() + * + * @test + * @dataProvider provider_error_handler + * @covers Kohana::error_handler + * @param boolean $code Input for Kohana::sanitize + * @param boolean $error Input for Kohana::sanitize + * @param boolean $file Input for Kohana::sanitize + * @param boolean $line Output for Kohana::sanitize + */ + public function test_error_handler($code, $error, $file, $line) + { + $error_level = error_reporting(); + error_reporting(E_ALL); + try + { + Kohana::error_handler($code, $error, $file, $line); + } + catch (Exception $e) + { + $this->assertEquals($code, $e->getCode()); + $this->assertEquals($error, $e->getMessage()); + } + error_reporting($error_level); + } + + /** + * Provides test data for test_modules_sets_and_returns_valid_modules() + * + * @return array + */ + public function provider_modules_detects_invalid_modules() + { + return array( + array(array('unittest' => MODPATH.'fo0bar')), + array(array('unittest' => MODPATH.'unittest', 'fo0bar' => MODPATH.'fo0bar')), + ); + } + + /** + * Tests Kohana::modules() + * + * @test + * @dataProvider provider_modules_detects_invalid_modules + * @expectedException Kohana_Exception + * @param boolean $source Input for Kohana::modules + * + */ + public function test_modules_detects_invalid_modules($source) + { + $modules = Kohana::modules(); + + try + { + Kohana::modules($source); + } + catch(Exception $e) + { + // Restore modules + Kohana::modules($modules); + + throw $e; + } + + // Restore modules + Kohana::modules($modules); + } + + /** + * Provides test data for test_modules_sets_and_returns_valid_modules() + * + * @return array + */ + public function provider_modules_sets_and_returns_valid_modules() + { + return array( + array(array(), array()), + array(array('unittest' => MODPATH.'unittest'), array('unittest' => $this->dirSeparator(MODPATH.'unittest/'))), + ); + } + + /** + * Tests Kohana::modules() + * + * @test + * @dataProvider provider_modules_sets_and_returns_valid_modules + * @param boolean $source Input for Kohana::modules + * @param boolean $expected Output for Kohana::modules + */ + public function test_modules_sets_and_returns_valid_modules($source, $expected) + { + $modules = Kohana::modules(); + + try + { + $this->assertEquals($expected, Kohana::modules($source)); + } + catch(Exception $e) + { + Kohana::modules($modules); + + throw $e; + } + + Kohana::modules($modules); + } + + /** + * To make the tests as portable as possible this just tests that + * you get an array of modules when you can Kohana::modules() and that + * said array contains unittest + * + * @test + * @covers Kohana::modules + */ + public function test_modules_returns_array_of_modules() + { + $modules = Kohana::modules(); + + $this->assertInternalType('array', $modules); + + $this->assertArrayHasKey('unittest', $modules); + } + + /** + * Tests Kohana::include_paths() + * + * The include paths must contain the apppath and syspath + * @test + * @covers Kohana::include_paths + */ + public function test_include_paths() + { + $include_paths = Kohana::include_paths(); + $modules = Kohana::modules(); + + $this->assertInternalType('array', $include_paths); + + // We must have at least 2 items in include paths (APP / SYS) + $this->assertGreaterThan(2, count($include_paths)); + // Make sure said paths are in the include paths + // And make sure they're in the correct positions + $this->assertSame(APPPATH, reset($include_paths)); + $this->assertSame(SYSPATH, end($include_paths)); + + foreach ($modules as $module) + { + $this->assertContains($module, $include_paths); + } + } +} + diff --git a/~dev_rating/system/tests/kohana/DateTest.php b/~dev_rating/system/tests/kohana/DateTest.php new file mode 100644 index 0000000000000000000000000000000000000000..66c41ac96927ac9eb0ebc7b42ef1a08976bb6cfe --- /dev/null +++ b/~dev_rating/system/tests/kohana/DateTest.php @@ -0,0 +1,790 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Date class + * + * @group kohana + * @group kohana.core + * @group kohana.core.date + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_DateTest extends Unittest_TestCase +{ + protected $_original_timezone = NULL; + + /** + * Ensures we have a consistant timezone for testing. + */ + // @codingStandardsIgnoreStart + public function setUp() + // @codingStandardsIgnoreEnd + { + parent::setUp(); + + $this->_original_timezone = date_default_timezone_get(); + + date_default_timezone_set('America/Chicago'); + } + + /** + * Restores original timezone after testing. + */ + // @codingStandardsIgnoreStart + public function tearDown() + // @codingStandardsIgnoreEnd + { + date_default_timezone_set($this->_original_timezone); + + parent::tearDown(); + } + + /** + * Provides test data for test_offset() + * + * @return array + */ + public function provider_offset() + { + return array( + array(30600, 'Asia/Calcutta', 'America/Argentina/Buenos_Aires'), + ); + } + + /** + * Tests Date::offset() + * + * @test + * @dataProvider provider_offset + * @covers Date::offset + * @param integer $expected Expected offset + * @param string $remote Remote TZ + * @param string $local Local TZ + * @param integer $now Current timestamp + */ + public function test_offset($expected, $remote, $local, $now = NULL) + { + $this->assertSame($expected, Date::offset($remote, $local, $now)); + } + + /** + * Provides test data for test_date() + * + * @return array + */ + public function provider_am_pm() + { + return array( + // All possible values + array(0, 'AM'), + array(1, 'AM'), + array(2, 'AM'), + array(3, 'AM'), + array(4, 'AM'), + array(5, 'AM'), + array(6, 'AM'), + array(7, 'AM'), + array(8, 'AM'), + array(9, 'AM'), + array(10, 'AM'), + array(11, 'AM'), + array(12, 'PM'), + array(13, 'PM'), + array(14, 'PM'), + array(15, 'PM'), + array(16, 'PM'), + array(17, 'PM'), + array(18, 'PM'), + array(19, 'PM'), + array(20, 'PM'), + array(21, 'PM'), + array(22, 'PM'), + array(23, 'PM'), + array(24, 'PM'), + // ampm doesn't validate the hour, so I don't think we should test it.. + // test strings are converted + array('0', 'AM'), + array('12', 'PM'), + ); + } + + /** + * Tests Date::ampm() + * + * @test + * @covers Date::ampm + * @dataProvider provider_am_pm + * @param <type> $hour + * @param <type> $expected + */ + public function test_am_pm($hour, $expected) + { + $this->assertSame( + $expected, + Date::ampm($hour) + ); + } + + /** + * Provides test data for test_adjust() + * + * @return array + */ + public function provider_adjust() + { + return array( + // Might as well test all possibilities + array(1, 'am', '01'), + array(2, 'am', '02'), + array(3, 'am', '03'), + array(4, 'am', '04'), + array(5, 'am', '05'), + array(6, 'am', '06'), + array(7, 'am', '07'), + array(8, 'am', '08'), + array(9, 'am', '09'), + array(10, 'am', '10'), + array(11, 'am', '11'), + array(12, 'am', '00'), + array(1, 'pm', '13'), + array(2, 'pm', '14'), + array(3, 'pm', '15'), + array(4, 'pm', '16'), + array(5, 'pm', '17'), + array(6, 'pm', '18'), + array(7, 'pm', '19'), + array(8, 'pm', '20'), + array(9, 'pm', '21'), + array(10, 'pm', '22'), + array(11, 'pm', '23'), + array(12, 'pm', '12'), + // It should also work with strings instead of ints + array('10', 'pm', '22'), + array('10', 'am', '10'), + ); + } + + /** + * Tests Date::ampm() + * + * @test + * @dataProvider provider_adjust + * @param integer $hour Hour in 12 hour format + * @param string $ampm Either am or pm + * @param string $expected Expected result + */ + public function test_adjust($hour, $ampm, $expected) + { + $this->assertSame( + $expected, + Date::adjust($hour, $ampm) + ); + } + + /** + * Provides test data for test_days() + * + * @return array + */ + public function provider_days() + { + return array( + // According to "the rhyme" these should be the same every year + array(9, FALSE, 30), + array(4, FALSE, 30), + array(6, FALSE, 30), + array(11, FALSE, 30), + array(1, FALSE, 31), + array(3, FALSE, 31), + array(5, FALSE, 31), + array(7, FALSE, 31), + array(8, FALSE, 31), + array(10, FALSE, 31), + // February is such a pain + array(2, 2001, 28), + array(2, 2000, 29), + array(2, 2012, 29), + ); + } + + /** + * Tests Date::days() + * + * @test + * @covers Date::days + * @dataProvider provider_days + * @param integer $month + * @param integer $year + * @param integer $expected + */ + public function test_days($month, $year, $expected) + { + $days = Date::days($month, $year); + + $this->assertSame( + $expected, + count($days) + ); + + // This should be a mirrored array, days => days + for ($i = 1; $i <= $expected; ++$i) + { + $this->assertArrayHasKey($i, $days); + // Combining the type check into this saves about 400-500 assertions! + $this->assertSame( (string) $i, $days[$i]); + } + } + + /** + * Provides test data for test_formatted_time() + * + * @return array + */ + public function provider_formatted_time() + { + return array( + // Test the default format + array('2010-04-16 17:00:00', '5:00PM 16th April 2010'), + // Now we use our own format + // Binary date! + array('01/01/2010 01:00', '1AM 1st January 2010', 'd/m/Y H:i'), + // Timezones (see #3902) + array('2011-04-01 01:23:45 Antarctica/South_Pole', '2011-04-01 01:23:45', 'Y-m-d H:i:s e', 'Antarctica/South_Pole'), + array('2011-04-01 01:23:45 Antarctica/South_Pole', '2011-03-31 14:23:45 Europe/Paris', 'Y-m-d H:i:s e', 'Antarctica/South_Pole'), + array('2011-04-01 01:23:45 Antarctica/South_Pole', '@1301574225', 'Y-m-d H:i:s e', 'Antarctica/South_Pole'), + ); + } + + /** + * Tests Date::formatted_time() + * + * @test + * @dataProvider provider_formatted_time + * @covers Date::formatted_time + * @ticket 3035 3902 + * @param string $expected Expected output + * @param string|integer $datetime_str The datetime timestamp / string + * @param string|null $timestamp_format The output format + * @param string|null $timezone The timezone identifier + */ + public function test_formatted_time($expected, $datetime_str, $timestamp_format = NULL, $timezone = NULL) + { + $timestamp = Date::formatted_time($datetime_str, $timestamp_format, $timezone); + + $this->assertSame($expected, $timestamp); + } + + /** + * Provider for test_months() + * + * @return array Test data + */ + public function provider_months() + { + return array( + array( + array( + 1 => "1", + 2 => "2", + 3 => "3", + 4 => "4", + 5 => "5", + 6 => "6", + 7 => "7", + 8 => "8", + 9 => "9", + 10 => "10", + 11 => "11", + 12 => "12" + ), + NULL + ), + array( + array( + 1 => "1", + 2 => "2", + 3 => "3", + 4 => "4", + 5 => "5", + 6 => "6", + 7 => "7", + 8 => "8", + 9 => "9", + 10 => "10", + 11 => "11", + 12 => "12" + ), + 'Guinness' + ), + array( + array( + 1 => "January", + 2 => "February", + 3 => "March", + 4 => "April", + 5 => "May", + 6 => "June", + 7 => "July", + 8 => "August", + 9 => "September", + 10 => "October", + 11 => "November", + 12 => "December" + ), + Date::MONTHS_LONG + ), + array( + array( + 1 => "Jan", + 2 => "Feb", + 3 => "Mar", + 4 => "Apr", + 5 => "May", + 6 => "Jun", + 7 => "Jul", + 8 => "Aug", + 9 => "Sep", + 10 => "Oct", + 11 => "Nov", + 12 => "Dec" + ), + Date::MONTHS_SHORT + ) + + ); + } + + /** + * Date::months() should allow the user to specify different format types, defaulting + * to a mirrored month number => month number array if format is NULL or unrecognised + * + * @test + * @dataProvider provider_months + * @covers Date::months + */ + public function test_months($expected, $format) + { + $months = Date::months($format); + + $this->assertSame($expected, $months); + } + + /** + * Provides test data for test_span() + * + * @return array + */ + public function provider_span() + { + $time = time(); + return array( + // Test that it must specify an output format + array( + $time, + $time, + '', + FALSE + ), + // Test that providing only one output just returns that output + array( + $time - 30, + $time, + 'seconds', + 30 + ), + // Random tests + array( + $time - 30, + $time, + 'years,months,weeks,days,hours,minutes,seconds', + array('years' => 0, 'months' => 0, 'weeks' => 0, 'days' => 0, 'hours' => 0, 'minutes' => 0, 'seconds' => 30), + ), + array( + $time - (60 * 60 * 24 * 782) + (60 * 25), + $time, + 'years,months,weeks,days,hours,minutes,seconds', + array('years' => 2, 'months' => 1, 'weeks' => 3, 'days' => 0, 'hours' => 1, 'minutes' => 28, 'seconds' => 24), + ), + // Should be able to compare with the future & that it only uses formats specified + array( + $time + (60 * 60 * 24 * 15) + (60 * 5), + $time, + 'weeks,days,hours,minutes,seconds', + array('weeks' => 2, 'days' => 1, 'hours' => 0, 'minutes' => 5, 'seconds' => 0), + ), + array( + // Add a bit of extra time to account for phpunit processing + $time + (14 * 31 * 24* 60 * 60) + (79 * 80), + NULL, + 'months,years', + array('months' => 2, 'years' => 1), + ), + ); + } + + /** + * Tests Date::span() + * + * @test + * @covers Date::span + * @dataProvider provider_span + * @param integer $time1 Time in the past + * @param integer $time2 Time to compare against + * @param string $output Units to output + * @param array $expected Array of $outputs => values + */ + public function test_span($time1, $time2, $output, $expected) + { + $this->assertSame( + $expected, + Date::span($time1, $time2, $output) + ); + } + + /** + * Provides test data to test_fuzzy_span + * + * This test data is provided on the assumption that it + * won't take phpunit more than 30 seconds to get the + * data from this provider to the test... ;) + * + * @return array Test Data + */ + public function provider_fuzzy_span() + { + $now = time(); + + return array( + array('moments ago', $now - 30, $now), + array('in moments', $now + 30, $now), + + array('a few minutes ago', $now - 10*60, $now), + array('in a few minutes', $now + 10*60, $now), + + array('less than an hour ago', $now - 45*60, $now), + array('in less than an hour', $now + 45*60, $now), + + array('a couple of hours ago', $now - 2*60*60, $now), + array('in a couple of hours', $now + 2*60*60, $now), + + array('less than a day ago', $now - 12*60*60, $now), + array('in less than a day', $now + 12*60*60, $now), + + array('about a day ago', $now - 30*60*60, $now), + array('in about a day', $now + 30*60*60, $now), + + array('a couple of days ago', $now - 3*24*60*60, $now), + array('in a couple of days', $now + 3*24*60*60, $now), + + array('less than a week ago', $now - 5*24*60*60, $now), + array('in less than a week', $now + 5*24*60*60, $now), + + array('about a week ago', $now - 9*24*60*60, $now), + array('in about a week', $now + 9*24*60*60, $now), + + array('less than a month ago', $now - 20*24*60*60, $now), + array('in less than a month', $now + 20*24*60*60, $now), + + array('about a month ago', $now - 40*24*60*60, $now), + array('in about a month', $now + 40*24*60*60, $now), + + array('a couple of months ago', $now - 3*30*24*60*60, $now), + array('in a couple of months', $now + 3*30*24*60*60, $now), + + array('less than a year ago', $now - 7*31*24*60*60, $now), + array('in less than a year', $now + 7*31*24*60*60, $now), + + array('about a year ago', $now - 18*31*24*60*60, $now), + array('in about a year', $now + 18*31*24*60*60, $now), + + array('a couple of years ago', $now - 3*12*31*24*60*60, $now), + array('in a couple of years', $now + 3*12*31*24*60*60, $now), + + array('a few years ago', $now - 5*12*31*24*60*60, $now), + array('in a few years', $now + 5*12*31*24*60*60, $now), + + array('about a decade ago', $now - 11*12*31*24*60*60, $now), + array('in about a decade', $now + 11*12*31*24*60*60, $now), + + array('a couple of decades ago', $now - 20*12*31*24*60*60, $now), + array('in a couple of decades', $now + 20*12*31*24*60*60, $now), + + array('several decades ago', $now - 50*12*31*24*60*60, $now), + array('in several decades', $now + 50*12*31*24*60*60, $now), + + array('a long time ago', $now - pow(10,10), $now), + array('in a long time', $now + pow(10,10), $now), + ); + } + + /** + * Test of Date::fuzy_span() + * + * @test + * @dataProvider provider_fuzzy_span + * @param string $expected Expected output + * @param integer $timestamp Timestamp to use + * @param integer $local_timestamp The local timestamp to use + */ + public function test_fuzzy_span($expected, $timestamp, $local_timestamp) + { + $this->assertSame( + $expected, + Date::fuzzy_span($timestamp, $local_timestamp) + ); + } + + /** + * Provides test data for test_years() + * + * @return array Test Data + */ + public function provider_years() + { + return array( + array( + array ( + 2005 => '2005', + 2006 => '2006', + 2007 => '2007', + 2008 => '2008', + 2009 => '2009', + 2010 => '2010', + 2011 => '2011', + 2012 => '2012', + 2013 => '2013', + 2014 => '2014', + 2015 => '2015', + ), + 2005, + 2015 + ), + ); + } + + /** + * Tests Data::years() + * + * @test + * @dataProvider provider_years + */ + public function test_years($expected, $start = FALSE, $end = FALSE) + { + $this->assertSame( + $expected, + Date::years($start, $end) + ); + } + + public function provider_hours() + { + return array( + array( + array( + 1 => '1', + 2 => '2', + 3 => '3', + 4 => '4', + 5 => '5', + 6 => '6', + 7 => '7', + 8 => '8', + 9 => '9', + 10 => '10', + 11 => '11', + 12 => '12', + ), + ), + ); + } + + /** + * Test for Date::hours + * + * @test + * @dataProvider provider_hours + */ + public function test_hours($expected, $step = 1, $long = FALSE, $start = NULL) + { + $this->assertSame( + $expected, + Date::hours($step, $long, $start) + ); + } + + /** + * Provides test data for test_seconds + * + * @return array Test data + */ + public function provider_seconds() + { + return array( + array( + // Thank god for var_export() + array ( + 0 => '00', 1 => '01', 2 => '02', 3 => '03', 4 => '04', + 5 => '05', 6 => '06', 7 => '07', 8 => '08', 9 => '09', + 10 => '10', 11 => '11', 12 => '12', 13 => '13', 14 => '14', + 15 => '15', 16 => '16', 17 => '17', 18 => '18', 19 => '19', + 20 => '20', 21 => '21', 22 => '22', 23 => '23', 24 => '24', + 25 => '25', 26 => '26', 27 => '27', 28 => '28', 29 => '29', + 30 => '30', 31 => '31', 32 => '32', 33 => '33', 34 => '34', + 35 => '35', 36 => '36', 37 => '37', 38 => '38', 39 => '39', + 40 => '40', 41 => '41', 42 => '42', 43 => '43', 44 => '44', + 45 => '45', 46 => '46', 47 => '47', 48 => '48', 49 => '49', + 50 => '50', 51 => '51', 52 => '52', 53 => '53', 54 => '54', + 55 => '55', 56 => '56', 57 => '57', 58 => '58', 59 => '59', + ), + 1, + 0, + 60 + ), + ); + } + + /** + * + * @test + * @dataProvider provider_seconds + * @covers Date::seconds + */ + public function test_seconds($expected, $step = 1, $start = 0, $end = 60) + { + $this->assertSame( + $expected, + Date::seconds($step, $start, $end) + ); + } + + /** + * Provides test data for test_minutes + * + * @return array Test data + */ + public function provider_minutes() + { + return array( + array( + array( + 0 => '00', 5 => '05', 10 => '10', + 15 => '15', 20 => '20', 25 => '25', + 30 => '30', 35 => '35', 40 => '40', + 45 => '45', 50 => '50', 55 => '55', + ), + 5, + ), + ); + } + + /** + * + * @test + * @dataProvider provider_minutes + */ + public function test_minutes($expected, $step) + { + $this->assertSame( + $expected, + Date::minutes($step) + ); + } + + /** + * This tests that the minutes helper defaults to using a $step of 5 + * and thus returns an array of 5 minute itervals + * + * @test + * @covers Date::minutes + */ + public function test_minutes_defaults_to_using_step_of5() + { + $minutes = array( + 0 => '00', 5 => '05', 10 => '10', + 15 => '15', 20 => '20', 25 => '25', + 30 => '30', 35 => '35', 40 => '40', + 45 => '45', 50 => '50', 55 => '55', + ); + + $this->assertSame( + $minutes, + Date::minutes() + ); + } + + /** + * Provids for test_unix2dos + * + * @return array Test Data + */ + public function provider_unix2dos() + { + return array( + array( + 1024341746, + 1281786936 + ), + array( + 2162688, + 315554400 + ) + ); + } + + /** + * Test Date::unix2dos() + * + * You should always pass a timestamp as otherwise the current + * date/time would be used and that's oviously variable + * + * Geert seems to be the only person who knows how unix2dos() works + * so we just throw in some random values and see what happens + * + * @test + * @dataProvider provider_unix2dos + * @covers Date::unix2dos + * @param integer $expected Expected output + * @param integer $timestamp Input timestamp + */ + public function test_unix2dos($expected, $timestamp) + { + $this->assertSame($expected, Date::unix2dos($timestamp)); + } + + /** + * Provides test data for test_dos2unix + * + * @return array Test data + */ + public function provider_dos2unix() + { + return array( + array( + 1281786936, + 1024341746, + ), + array( + 315554400, + 2162688, + ), + ); + } + + /** + * Tests Date::dos2unix + * + * @test + * @dataProvider provider_dos2unix + * @param integer $expected Expected output + * @param integer $timestamp Input timestamp + */ + public function test_dos2unix($expected, $timestamp) + { + $this->assertEquals($expected, Date::dos2unix($timestamp)); + } +} diff --git a/~dev_rating/system/tests/kohana/DebugTest.php b/~dev_rating/system/tests/kohana/DebugTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3f845361ea4d61c9d67645159d6a114437ecb037 --- /dev/null +++ b/~dev_rating/system/tests/kohana/DebugTest.php @@ -0,0 +1,126 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana Core + * + * @TODO Use a virtual filesystem (see phpunit doc on mocking fs) for find_file etc. + * + * @group kohana + * @group kohana.core + * @group kohana.core.debug + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_DebugTest extends Unittest_TestCase +{ + + /** + * Provides test data for test_debug() + * + * @return array + */ + public function provider_vars() + { + return array( + // $thing, $expected + array(array('foobar'), "<pre class=\"debug\"><small>array</small><span>(1)</span> <span>(\n 0 => <small>string</small><span>(6)</span> \"foobar\"\n)</span></pre>"), + ); + } + + /** + * Tests Debug::vars() + * + * @test + * @dataProvider provider_vars + * @covers Debug::vars + * @param boolean $thing The thing to debug + * @param boolean $expected Output for Debug::vars + */ + public function test_var($thing, $expected) + { + $this->assertEquals($expected, Debug::vars($thing)); + } + + /** + * Provides test data for testDebugPath() + * + * @return array + */ + public function provider_debug_path() + { + return array( + array( + SYSPATH.'classes'.DIRECTORY_SEPARATOR.'kohana'.EXT, + 'SYSPATH'.DIRECTORY_SEPARATOR.'classes'.DIRECTORY_SEPARATOR.'kohana.php' + ), + array( + MODPATH.$this->dirSeparator('unittest/classes/kohana/unittest/runner').EXT, + $this->dirSeparator('MODPATH/unittest/classes/kohana/unittest/runner').EXT + ), + ); + } + + /** + * Tests Debug::path() + * + * @test + * @dataProvider provider_debug_path + * @covers Debug::path + * @param boolean $path Input for Debug::path + * @param boolean $expected Output for Debug::path + */ + public function test_debug_path($path, $expected) + { + $this->assertEquals($expected, Debug::path($path)); + } + + /** + * Provides test data for test_dump() + * + * @return array + */ + public function provider_dump() + { + return array( + array('foobar', 128, 10, '<small>string</small><span>(6)</span> "foobar"'), + array('foobar', 2, 10, '<small>string</small><span>(6)</span> "fo …"'), + array(NULL, 128, 10, '<small>NULL</small>'), + array(TRUE, 128, 10, '<small>bool</small> TRUE'), + array(array('foobar'), 128, 10, "<small>array</small><span>(1)</span> <span>(\n 0 => <small>string</small><span>(6)</span> \"foobar\"\n)</span>"), + array(new StdClass, 128, 10, "<small>object</small> <span>stdClass(0)</span> <code>{\n}</code>"), + array("fo\x6F\xFF\x00bar\x8F\xC2\xB110", 128, 10, '<small>string</small><span>(10)</span> "foobarВ±10"'), + array(array('level1' => array('level2' => array('level3' => array('level4' => array('value' => 'something'))))), 128, 4, +'<small>array</small><span>(1)</span> <span>( + "level1" => <small>array</small><span>(1)</span> <span>( + "level2" => <small>array</small><span>(1)</span> <span>( + "level3" => <small>array</small><span>(1)</span> <span>( + "level4" => <small>array</small><span>(1)</span> ( + ... + ) + )</span> + )</span> + )</span> +)</span>'), + ); + } + + /** + * Tests Debug::dump() + * + * @test + * @dataProvider provider_dump + * @covers Debug::dump + * @covers Debug::_dump + * @param object $exception exception to test + * @param string $expected expected output + */ + public function test_dump($input, $length, $limit, $expected) + { + $this->assertEquals($expected, Debug::dump($input, $length, $limit)); + } +} diff --git a/~dev_rating/system/tests/kohana/ExceptionTest.php b/~dev_rating/system/tests/kohana/ExceptionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..7c35afb927376baad8af4f02a607996bacfeedd7 --- /dev/null +++ b/~dev_rating/system/tests/kohana/ExceptionTest.php @@ -0,0 +1,99 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana Exception Class + * + * @group kohana + * @group kohana.core + * @group kohana.core.exception + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ExceptionTest extends Unittest_TestCase +{ + /** + * Provides test data for test_constructor() + * + * @return array + */ + public function provider_constructor() + { + return array( + array(array(''), '', 0), + array(array(':a'), ':a', 0), + + array(array(':a', NULL), ':a', 0), + array(array(':a', array()), ':a', 0), + array(array(':a', array(':a' => 'b')), 'b', 0), + array(array(':a :b', array(':a' => 'c', ':b' => 'd')), 'c d', 0), + + array(array(':a', NULL, 5), ':a', 5), + // #3358 + array(array(':a', NULL, '3F000'), ':a', '3F000'), + // #3404 + array(array(':a', NULL, '42S22'), ':a', '42S22'), + // #3927 + array(array(':a', NULL, 'b'), ':a', 'b'), + // #4039 + array(array(':a', NULL, '25P01'), ':a', '25P01'), + ); + } + + /** + * Tests Kohana_Kohana_Exception::__construct() + * + * @test + * @dataProvider provider_constructor + * @covers Kohana_Kohana_Exception::__construct + * @param array $arguments Arguments + * @param string $expected_message Value from getMessage() + * @param integer|string $expected_code Value from getCode() + */ + public function test_constructor($arguments, $expected_message, $expected_code) + { + switch (count($arguments)) + { + case 1: + $exception = new Kohana_Exception(reset($arguments)); + break; + case 2: + $exception = new Kohana_Exception(reset($arguments), next($arguments)); + break; + default: + $exception = new Kohana_Exception(reset($arguments), next($arguments), next($arguments)); + } + + $this->assertSame($expected_code, $exception->getCode()); + $this->assertSame($expected_message, $exception->getMessage()); + } + + /** + * Provides test data for test_text() + * + * @return array + */ + public function provider_text() + { + return array( + array(new Kohana_Exception('foobar'), $this->dirSeparator('Kohana_Exception [ 0 ]: foobar ~ SYSPATH/tests/kohana/ExceptionTest.php [ '.__LINE__.' ]')), + ); + } + + /** + * Tests Kohana_Exception::text() + * + * @test + * @dataProvider provider_text + * @covers Kohana_Exception::text + * @param object $exception exception to test + * @param string $expected expected output + */ + public function test_text($exception, $expected) + { + $this->assertEquals($expected, Kohana_Exception::text($exception)); + } +} diff --git a/~dev_rating/system/tests/kohana/FeedTest.php b/~dev_rating/system/tests/kohana/FeedTest.php new file mode 100644 index 0000000000000000000000000000000000000000..40986303b7be8787200792dd3328661ef8938a66 --- /dev/null +++ b/~dev_rating/system/tests/kohana/FeedTest.php @@ -0,0 +1,123 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Test for feed helper + * + * @group kohana + * @group kohana.core + * @group kohana.core.feed + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_FeedTest extends Unittest_TestCase +{ + /** + * Provides test data for test_parse() + * + * @return array + */ + public function provider_parse() + { + return array( + // $source, $expected + array('http://dev.kohanaframework.org/projects/kohana3/activity.atom', 15), + ); + } + + /** + * Tests that Feed::parse gets the correct number of elements + * + * @test + * @dataProvider provider_parse + * @covers feed::parse + * @param string $source URL to test + * @param integer $expected Count of items + */ + public function test_parse($source, $expected) + { + $this->markTestSkipped('We don\'t go to the internet for tests.'); + + $this->assertEquals($expected, count(Feed::parse($source))); + } + + /** + * Provides test data for test_create() + * + * @return array + */ + public function provider_create() + { + $info = array('pubDate' => 123, 'image' => array('link' => 'http://kohanaframework.org/image.png', 'url' => 'http://kohanaframework.org/', 'title' => 'title')); + + return array( + // $source, $expected + array($info, array('foo' => array('foo' => 'bar', 'pubDate' => 123, 'link' => 'foo')), array('_SERVER' => array('HTTP_HOST' => 'localhost')+$_SERVER), + array( + 'tag' => 'channel', + 'descendant' => array( + 'tag' => 'item', + 'child' => array( + 'tag' => 'foo', + 'content' => 'bar' + ) + ) + ), + array( + $this->matcher_composer($info, 'image', 'link'), + $this->matcher_composer($info, 'image', 'url'), + $this->matcher_composer($info, 'image', 'title') + ) + ), + ); + } + + /** + * Helper for handy matcher composing + * + * @param array $data + * @param string $tag + * @param string $child + * @return array + */ + private function matcher_composer($data, $tag, $child) + { + return array( + 'tag' => 'channel', + 'descendant' => array( + 'tag' => $tag, + 'child' => array( + 'tag' => $child, + 'content' => $data[$tag][$child] + ) + ) + ); + } + + /** + * @test + * + * @dataProvider provider_create + * + * @covers feed::create + * + * @param string $info info to pass + * @param integer $items items to add + * @param integer $matcher output + */ + public function test_create($info, $items, $enviroment, $matcher_item, $matchers_image) + { + $this->setEnvironment($enviroment); + + $this->assertTag($matcher_item, Feed::create($info, $items), '', FALSE); + + foreach ($matchers_image as $matcher_image) + { + $this->assertTag($matcher_image, Feed::create($info, $items), '', FALSE); + } + } +} diff --git a/~dev_rating/system/tests/kohana/FileTest.php b/~dev_rating/system/tests/kohana/FileTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8d4c4911276b8ba9ba26ebaedb554a261ff1647a --- /dev/null +++ b/~dev_rating/system/tests/kohana/FileTest.php @@ -0,0 +1,81 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana File helper + * + * @group kohana + * @group kohana.core + * @group kohana.core.url + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_FileTest extends Unittest_TestCase +{ + /** + * Provides test data for test_sanitize() + * + * @return array + */ + public function provider_mime() + { + return array( + // $value, $result + array(Kohana::find_file('classes', 'File')), + array(Kohana::find_file('tests', 'test_data/github', 'png')), + ); + } + + /** + * Tests File::mime() + * + * @test + * @dataProvider provider_mime + * @param boolean $input Input for File::mime + * @param boolean $expected Output for File::mime + */ + public function test_mime($input) + { + $this->markTestSkipped( + 'This test doesn\'t do anything useful!' + ); + $this->assertSame(1, preg_match('/^(?:application|audio|image|message|multipart|text|video)\/[a-z.+0-9-]+$/i', File::mime($input))); + } + + /** + * Provides test data for test_split_join() + * + * @return array + */ + public function provider_split_join() + { + return array( + // $value, $result + array(Kohana::find_file('tests', 'test_data/github', 'png'), .01, 1), + ); + } + + /** + * Tests File::mime() + * + * @test + * @dataProvider provider_split_join + * @param boolean $input Input for File::split + * @param boolean $peices Input for File::split + * @param boolean $expected Output for File::splut + */ + public function test_split_join($input, $peices, $expected) + { + $this->assertSame($expected, File::split($input, $peices)); + $this->assertSame($expected, File::join($input)); + + foreach (glob(Kohana::find_file('tests', 'test_data/github', 'png').'.*') as $file) + { + unlink($file); + } + } +} diff --git a/~dev_rating/system/tests/kohana/FormTest.php b/~dev_rating/system/tests/kohana/FormTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a3ade9462508d6ecec0aa24bc0e4a1835a0a5c35 --- /dev/null +++ b/~dev_rating/system/tests/kohana/FormTest.php @@ -0,0 +1,408 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana Form helper + * + * @group kohana + * @group kohana.core + * @group kohana.core.form + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_FormTest extends Unittest_TestCase +{ + /** + * Defaults for this test + * @var array + */ + // @codingStandardsIgnoreStart + protected $environmentDefault = array( + 'Kohana::$base_url' => '/', + 'HTTP_HOST' => 'kohanaframework.org', + 'Kohana::$index_file' => '', + ); + // @codingStandardsIgnoreEnd + + /** + * Provides test data for test_open() + * + * @return array + */ + public function provider_open() + { + return array( + array( + array('', NULL), + array('action' => '') + ), + array( + array(NULL, NULL), + array('action' => '') + ), + array( + array('foo', NULL), + array('action' => '/foo') + ), + array( + array('foo', array('method' => 'get')), + array('action' => '/foo', 'method' => 'get') + ), + ); + } + + /** + * Tests Form::open() + * + * @test + * @dataProvider provider_open + * @param boolean $input Input for Form::open + * @param boolean $expected Output for Form::open + */ + public function test_open($input, $expected) + { + list($action, $attributes) = $input; + + $tag = Form::open($action, $attributes); + + $matcher = array( + 'tag' => 'form', + // Default attributes + 'attributes' => array( + 'method' => 'post', + 'accept-charset' => 'utf-8', + ), + ); + + $matcher['attributes'] = $expected + $matcher['attributes']; + + $this->assertTag($matcher, $tag); + } + + /** + * Tests Form::close() + * + * @test + */ + public function test_close() + { + $this->assertSame('</form>', Form::close()); + } + + /** + * Provides test data for test_input() + * + * @return array + */ + public function provider_input() + { + return array( + // $value, $result + array('input', 'foo', 'bar', NULL, 'input'), + array('input', 'foo', NULL, NULL, 'input'), + array('hidden', 'foo', 'bar', NULL, 'hidden'), + array('password', 'foo', 'bar', NULL, 'password'), + ); + } + + /** + * Tests Form::input() + * + * @test + * @dataProvider provider_input + * @param boolean $input Input for Form::input + * @param boolean $expected Output for Form::input + */ + public function test_input($type, $name, $value, $attributes) + { + $matcher = array( + 'tag' => 'input', + 'attributes' => array('name' => $name, 'type' => $type) + ); + + // Form::input creates a text input + if ($type === 'input') + { + $matcher['attributes']['type'] = 'text'; + } + + // NULL just means no value + if ($value !== NULL) + { + $matcher['attributes']['value'] = $value; + } + + // Add on any attributes + if (is_array($attributes)) + { + $matcher['attributes'] = $attributes + $matcher['attributes']; + } + + $tag = Form::$type($name, $value, $attributes); + + $this->assertTag($matcher, $tag, $tag); + } + + /** + * Provides test data for test_file() + * + * @return array + */ + public function provider_file() + { + return array( + // $value, $result + array('foo', NULL, '<input type="file" name="foo" />'), + ); + } + + /** + * Tests Form::file() + * + * @test + * @dataProvider provider_file + * @param boolean $input Input for Form::file + * @param boolean $expected Output for Form::file + */ + public function test_file($name, $attributes, $expected) + { + $this->assertSame($expected, Form::file($name, $attributes)); + } + + /** + * Provides test data for test_check() + * + * @return array + */ + public function provider_check() + { + return array( + // $value, $result + array('checkbox', 'foo', NULL, FALSE, NULL), + array('checkbox', 'foo', NULL, TRUE, NULL), + array('checkbox', 'foo', 'bar', TRUE, NULL), + + array('radio', 'foo', NULL, FALSE, NULL), + array('radio', 'foo', NULL, TRUE, NULL), + array('radio', 'foo', 'bar', TRUE, NULL), + ); + } + + /** + * Tests Form::check() + * + * @test + * @dataProvider provider_check + * @param boolean $input Input for Form::check + * @param boolean $expected Output for Form::check + */ + public function test_check($type, $name, $value, $checked, $attributes) + { + $matcher = array('tag' => 'input', 'attributes' => array('name' => $name, 'type' => $type)); + + if ($value !== NULL) + { + $matcher['attributes']['value'] = $value; + } + + if (is_array($attributes)) + { + $matcher['attributes'] = $attributes + $matcher['attributes']; + } + + if ($checked === TRUE) + { + $matcher['attributes']['checked'] = 'checked'; + } + + $tag = Form::$type($name, $value, $checked, $attributes); + $this->assertTag($matcher, $tag, $tag); + } + + /** + * Provides test data for test_text() + * + * @return array + */ + public function provider_text() + { + return array( + // $value, $result + array('textarea', 'foo', 'bar', NULL), + array('textarea', 'foo', 'bar', array('rows' => 20, 'cols' => 20)), + array('button', 'foo', 'bar', NULL), + array('label', 'foo', 'bar', NULL), + array('label', 'foo', NULL, NULL), + ); + } + + /** + * Tests Form::textarea() + * + * @test + * @dataProvider provider_text + * @param boolean $input Input for Form::textarea + * @param boolean $expected Output for Form::textarea + */ + public function test_text($type, $name, $body, $attributes) + { + $matcher = array( + 'tag' => $type, + 'attributes' => array(), + 'content' => $body, + ); + + if ($type !== 'label') + { + $matcher['attributes'] = array('name' => $name); + } + else + { + $matcher['attributes'] = array('for' => $name); + } + + + if (is_array($attributes)) + { + $matcher['attributes'] = $attributes + $matcher['attributes']; + } + + $tag = Form::$type($name, $body, $attributes); + + $this->assertTag($matcher, $tag, $tag); + } + + + /** + * Provides test data for test_select() + * + * @return array + */ + public function provider_select() + { + return array( + // $value, $result + array('foo', NULL, NULL, "<select name=\"foo\"></select>"), + array('foo', array('bar' => 'bar'), NULL, "<select name=\"foo\">\n<option value=\"bar\">bar</option>\n</select>"), + array('foo', array('bar' => 'bar'), 'bar', "<select name=\"foo\">\n<option value=\"bar\" selected=\"selected\">bar</option>\n</select>"), + array('foo', array('bar' => array('foo' => 'bar')), NULL, "<select name=\"foo\">\n<optgroup label=\"bar\">\n<option value=\"foo\">bar</option>\n</optgroup>\n</select>"), + array('foo', array('bar' => array('foo' => 'bar')), 'foo', "<select name=\"foo\">\n<optgroup label=\"bar\">\n<option value=\"foo\" selected=\"selected\">bar</option>\n</optgroup>\n</select>"), + // #2286 + array('foo', array('bar' => 'bar', 'unit' => 'test', 'foo' => 'foo'), array('bar', 'foo'), "<select name=\"foo\" multiple=\"multiple\">\n<option value=\"bar\" selected=\"selected\">bar</option>\n<option value=\"unit\">test</option>\n<option value=\"foo\" selected=\"selected\">foo</option>\n</select>"), + ); + } + + /** + * Tests Form::select() + * + * @test + * @dataProvider provider_select + * @param boolean $input Input for Form::select + * @param boolean $expected Output for Form::select + */ + public function test_select($name, $options, $selected, $expected) + { + // Much more efficient just to assertSame() rather than assertTag() on each element + $this->assertSame($expected, Form::select($name, $options, $selected)); + } + + /** + * Provides test data for test_submit() + * + * @return array + */ + public function provider_submit() + { + return array( + // $value, $result + array('foo', 'Foobar!', '<input type="submit" name="foo" value="Foobar!" />'), + ); + } + + /** + * Tests Form::submit() + * + * @test + * @dataProvider provider_submit + * @param boolean $input Input for Form::submit + * @param boolean $expected Output for Form::submit + */ + public function test_submit($name, $value, $expected) + { + $matcher = array( + 'tag' => 'input', + 'attributes' => array('name' => $name, 'type' => 'submit', 'value' => $value) + ); + + $this->assertTag($matcher, Form::submit($name, $value)); + } + + + /** + * Provides test data for test_image() + * + * @return array + */ + public function provider_image() + { + return array( + // $value, $result + array('foo', 'bar', array('src' => 'media/img/login.png'), '<input type="image" name="foo" value="bar" src="/media/img/login.png" />'), + ); + } + + /** + * Tests Form::image() + * + * @test + * @dataProvider provider_image + * @param boolean $name Input for Form::image + * @param boolean $value Input for Form::image + * @param boolean $attributes Input for Form::image + * @param boolean $expected Output for Form::image + */ + public function test_image($name, $value, $attributes, $expected) + { + $this->assertSame($expected, Form::image($name, $value, $attributes)); + } + + /** + * Provides test data for test_label() + * + * @return array + */ + function provider_label() + { + return array( + // $value, $result + // Single for provided + array('email', NULL, NULL, '<label for="email">Email</label>'), + array('email_address', NULL, NULL, '<label for="email_address">Email Address</label>'), + array('email-address', NULL, NULL, '<label for="email-address">Email Address</label>'), + // For and text values provided + array('name', 'First name', NULL, '<label for="name">First name</label>'), + // with attributes + array('lastname', 'Last name', array('class' => 'text'), '<label class="text" for="lastname">Last name</label>'), + array('lastname', 'Last name', array('class' => 'text', 'id'=>'txt_lastname'), '<label id="txt_lastname" class="text" for="lastname">Last name</label>'), + ); + } + + /** + * Tests Form::label() + * + * @test + * @dataProvider provider_label + * @param boolean $for Input for Form::label + * @param boolean $text Input for Form::label + * @param boolean $attributes Input for Form::label + * @param boolean $expected Output for Form::label + */ + function test_label($for, $text, $attributes, $expected) + { + $this->assertSame($expected, Form::label($for, $text, $attributes)); + } +} diff --git a/~dev_rating/system/tests/kohana/HTMLTest.php b/~dev_rating/system/tests/kohana/HTMLTest.php new file mode 100644 index 0000000000000000000000000000000000000000..015a65da4a866f27d90ffd95abe3eb23a650254f --- /dev/null +++ b/~dev_rating/system/tests/kohana/HTMLTest.php @@ -0,0 +1,367 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests HTML + * + * @group kohana + * @group kohana.core + * @group kohana.core.html + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_HTMLTest extends Unittest_TestCase +{ + /** + * Defaults for this test + * @var array + */ + // @codingStandardsIgnoreStart + protected $environmentDefault = array( + 'Kohana::$base_url' => '/kohana/', + 'Kohana::$index_file' => 'index.php', + 'HTML::$strict' => TRUE, + 'HTTP_HOST' => 'www.kohanaframework.org', + ); + // @codingStandardsIgnoreStart + + /** + * Provides test data for test_attributes() + * + * @return array + */ + public function provider_attributes() + { + return array( + array( + array('name' => 'field', 'random' => 'not_quite', 'id' => 'unique_field'), + array(), + ' id="unique_field" name="field" random="not_quite"' + ), + array( + array('invalid' => NULL), + array(), + '' + ), + array( + array(), + array(), + '' + ), + array( + array('name' => 'field', 'checked'), + array(), + ' name="field" checked="checked"', + ), + array( + array('id' => 'disabled_field', 'disabled'), + array('HTML::$strict' => FALSE), + ' id="disabled_field" disabled', + ), + ); + } + + /** + * Tests HTML::attributes() + * + * @test + * @dataProvider provider_attributes + * @param array $attributes Attributes to use + * @param array $options Environment options to use + * @param string $expected Expected output + */ + public function test_attributes(array $attributes, array $options, $expected) + { + $this->setEnvironment($options); + + $this->assertSame( + $expected, + HTML::attributes($attributes) + ); + } + + /** + * Provides test data for test_script + * + * @return array Array of test data + */ + public function provider_script() + { + return array( + array( + '<script type="text/javascript" src="http://google.com/script.js"></script>', + 'http://google.com/script.js', + ), + array( + '<script type="text/javascript" src="http://www.kohanaframework.org/kohana/index.php/my/script.js"></script>', + 'my/script.js', + NULL, + 'http', + TRUE + ), + array( + '<script type="text/javascript" src="https://www.kohanaframework.org/kohana/my/script.js"></script>', + 'my/script.js', + NULL, + 'https', + FALSE + ), + array( + '<script type="text/javascript" src="https://www.kohanaframework.org/kohana/my/script.js"></script>', + '/my/script.js', // Test absolute paths + NULL, + 'https', + FALSE + ), + + ); + } + + /** + * Tests HTML::script() + * + * @test + * @dataProvider provider_script + * @param string $expected Expected output + * @param string $file URL to script + * @param array $attributes HTML attributes for the anchor + * @param string $protocol Protocol to use + * @param bool $index Should the index file be included in url? + */ + public function test_script($expected, $file, array $attributes = NULL, $protocol = NULL, $index = FALSE) + { + $this->assertSame( + $expected, + HTML::script($file, $attributes, $protocol, $index) + ); + } + + /** + * Data provider for the style test + * + * @return array Array of test data + */ + public function provider_style() + { + return array( + array( + '<link type="text/css" href="http://google.com/style.css" rel="stylesheet" />', + 'http://google.com/style.css', + array(), + NULL, + FALSE + ), + array( + '<link type="text/css" href="/kohana/my/style.css" rel="stylesheet" />', + 'my/style.css', + array(), + NULL, + FALSE + ), + array( + '<link type="text/css" href="https://www.kohanaframework.org/kohana/my/style.css" rel="stylesheet" />', + 'my/style.css', + array(), + 'https', + FALSE + ), + array( + '<link type="text/css" href="https://www.kohanaframework.org/kohana/index.php/my/style.css" rel="stylesheet" />', + 'my/style.css', + array(), + 'https', + TRUE + ), + array( + '<link type="text/css" href="https://www.kohanaframework.org/kohana/index.php/my/style.css" rel="stylesheet" />', + '/my/style.css', + array(), + 'https', + TRUE + ), + array( + // #4283: http://dev.kohanaframework.org/issues/4283 + '<link type="text/css" href="https://www.kohanaframework.org/kohana/index.php/my/style.css" rel="stylesheet/less" />', + 'my/style.css', + array( + 'rel' => 'stylesheet/less' + ), + 'https', + TRUE + ), + ); + } + + /** + * Tests HTML::style() + * + * @test + * @dataProvider provider_style + * @param string $expected The expected output + * @param string $file The file to link to + * @param array $attributes Any extra attributes for the link + * @param string $protocol Protocol to use + * @param bool $index Whether the index file should be added to the link + */ + public function test_style($expected, $file, array $attributes = NULL, $protocol = NULL, $index = FALSE) + { + $this->assertSame( + $expected, + HTML::style($file, $attributes, $protocol, $index) + ); + } + + /** + * Provides test data for test_anchor + * + * @return array Test data + */ + public function provider_anchor() + { + return array( + array( + '<a href="http://kohanaframework.org">Kohana</a>', + array(), + 'http://kohanaframework.org', + 'Kohana', + ), + array( + '<a href="http://google.com" target="_blank">GOOGLE</a>', + array(), + 'http://google.com', + 'GOOGLE', + array('target' => '_blank'), + 'http', + ), + array( + '<a href="https://www.kohanaframework.org/kohana/users/example">Kohana</a>', + array(), + 'users/example', + 'Kohana', + NULL, + 'https', + FALSE, + ), + array( + '<a href="https://www.kohanaframework.org/kohana/index.php/users/example">Kohana</a>', + array(), + 'users/example', + 'Kohana', + NULL, + 'https', + TRUE, + ), + array( + '<a href="https://www.kohanaframework.org/kohana/index.php/users/example">Kohana</a>', + array(), + 'users/example', + 'Kohana', + NULL, + 'https', + ), + array( + '<a href="https://www.kohanaframework.org/kohana/index.php/users/example">Kohana</a>', + array(), + 'users/example', + 'Kohana', + NULL, + 'https', + TRUE, + ), + array( + '<a href="https://www.kohanaframework.org/kohana/users/example">Kohana</a>', + array(), + 'users/example', + 'Kohana', + NULL, + 'https', + FALSE, + ), + array( + '<a href="https://www.kohanaframework.org/kohana/users/example">Kohana</a>', + array(), + '/users/example', + 'Kohana', + NULL, + 'https', + FALSE, + ), + ); + } + + /** + * Tests HTML::anchor + * + * @test + * @dataProvider provider_anchor + */ + public function test_anchor($expected, array $options, $uri, $title = NULL, array $attributes = NULL, $protocol = NULL, $index = TRUE) + { + // $this->setEnvironment($options); + + $this->assertSame( + $expected, + HTML::anchor($uri, $title, $attributes, $protocol, $index) + ); + } + + /** + * Data provider for test_file_anchor + * + * @return array + */ + public function provider_file_anchor() + { + return array( + array( + '<a href="/kohana/mypic.png">My picture file</a>', + array(), + 'mypic.png', + 'My picture file', + ), + array( + '<a href="https://www.kohanaframework.org/kohana/index.php/mypic.png" attr="value">My picture file</a>', + array('attr' => 'value'), + 'mypic.png', + 'My picture file', + 'https', + TRUE + ), + array( + '<a href="ftp://www.kohanaframework.org/kohana/mypic.png">My picture file</a>', + array(), + 'mypic.png', + 'My picture file', + 'ftp', + FALSE + ), + array( + '<a href="ftp://www.kohanaframework.org/kohana/mypic.png">My picture file</a>', + array(), + '/mypic.png', + 'My picture file', + 'ftp', + FALSE + ), + ); + } + + /** + * Test for HTML::file_anchor() + * + * @test + * @covers HTML::file_anchor + * @dataProvider provider_file_anchor + */ + public function test_file_anchor($expected, array $attributes, $file, $title = NULL, $protocol = NULL, $index = FALSE) + { + $this->assertSame( + $expected, + HTML::file_anchor($file, $title, $attributes, $protocol, $index) + ); + } +} diff --git a/~dev_rating/system/tests/kohana/HTTPTest.php b/~dev_rating/system/tests/kohana/HTTPTest.php new file mode 100644 index 0000000000000000000000000000000000000000..0f80548981ba9accad7566cf2281937e970d44cd --- /dev/null +++ b/~dev_rating/system/tests/kohana/HTTPTest.php @@ -0,0 +1,87 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests HTTP + * + * @group kohana + * @group kohana.core + * @group kohana.core.http + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_HTTPTest extends Unittest_TestCase { + + /** + * Defaults for this test + * @var array + */ + // @codingStandardsIgnoreStart + protected $environmentDefault = array( + 'Kohana::$base_url' => '/kohana/', + 'Kohana::$index_file' => 'index.php', + 'HTTP_HOST' => 'www.example.com', + ); + // @codingStandardsIgnoreEnd + + /** + * Provides test data for test_attributes() + * + * @return array + */ + public function provider_redirect() + { + return array( + array( + 'http://www.example.org/', + 301, + 'HTTP_Exception_301', + 'http://www.example.org/' + ), + array( + '/page_one', + 302, + 'HTTP_Exception_302', + 'http://www.example.com/kohana/index.php/page_one' + ), + array( + 'page_two', + 303, + 'HTTP_Exception_303', + 'http://www.example.com/kohana/index.php/page_two' + ), + ); + } + + /** + * Tests HTTP::redirect() + * + * @test + * @dataProvider provider_redirect + * @param array $location Location to redirect to + * @param array $code HTTP Code to use for the redirect + * @param string $expected_exception Expected exception + * @param string $expected_location Expected exception + */ + public function test_redirect($location, $code, $expected_exception, $expected_location) + { + try + { + HTTP::redirect($location, $code); + } + catch (HTTP_Exception_Redirect $e) + { + $response = $e->get_response(); + + $this->assertInstanceOf($expected_exception, $e); + $this->assertEquals($expected_location, $response->headers('Location')); + + return; + } + + $this->fail('HTTP_Exception_Redirect not thrown'); + } +} diff --git a/~dev_rating/system/tests/kohana/Http/HeaderTest.php b/~dev_rating/system/tests/kohana/Http/HeaderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8f241d3a567769de153d035a60e06d58e261cb8e --- /dev/null +++ b/~dev_rating/system/tests/kohana/Http/HeaderTest.php @@ -0,0 +1,1491 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * Unit Tests for Kohana_HTTP_Header + * + * @group kohana + * @group kohana.core + * @group kohana.core.http + * @group kohana.core.http.header + * @group kohana.core.http.header + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2014 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_HTTP_HeaderTest extends Unittest_TestCase { + + /** + * Provides data for test_accept_quality + * + * @return array + */ + public function provider_accept_quality() + { + return array( + array( + array( + 'text/html; q=1', + 'text/plain; q=.5', + 'application/json; q=.1', + 'text/*' + ), + array( + 'text/html' => (float) 1, + 'text/plain' => 0.5, + 'application/json' => 0.1, + 'text/*' => (float) 1 + ) + ), + array( + array( + 'text/*', + 'text/html; level=1; q=0.4', + 'application/xml+rss; q=0.5; level=4' + ), + array( + 'text/*' => (float) 1, + 'text/html; level=1' => 0.4, + 'application/xml+rss; level=4' => 0.5 + ) + ) + ); + } + + /** + * Tests the `accept_quality` method parses the quality values + * correctly out of header parts + * + * @dataProvider provider_accept_quality + * + * @param array $parts input + * @param array $expected expected output + * @return void + */ + public function test_accept_quality(array $parts, array $expected) + { + $out = HTTP_Header::accept_quality($parts); + + foreach ($out as $key => $value) + { + $this->assertInternalType('float', $value); + } + + $this->assertSame($expected, $out); + } + + /** + * Data provider for test_parse_accept_header + * + * @return array + */ + public function provider_parse_accept_header() + { + return array( + array( + 'text/html, text/plain, text/*, */*', + array( + 'text' => array( + 'html' => (float) 1, + 'plain' => (float) 1, + '*' => (float) 1 + ), + '*' => array( + '*' => (float) 1 + ) + ) + ), + array( + 'text/html; q=.5, application/json, application/xml+rss; level=1; q=.7, text/*, */*', + array( + 'text' => array( + 'html' => 0.5, + '*' => (float) 1 + ), + 'application' => array( + 'json' => (float) 1, + 'xml+rss; level=1' => 0.7 + ), + '*' => array( + '*' => (float) 1 + ) + ) + ) + ); + } + + /** + * Tests the `parse_accept_header` method parses the Accept: header + * correctly and returns expected output + * + * @dataProvider provider_parse_accept_header + * + * @param string $accept accept in + * @param array $expected expected out + * @return void + */ + public function test_parse_accept_header($accept, array $expected) + { + $this->assertSame($expected, HTTP_Header::parse_accept_header($accept)); + } + + /** + * Provides data for test_parse_charset_header + * + * @return array + */ + public function provider_parse_charset_header() + { + return array( + array( + 'utf-8, utf-10, utf-16, iso-8859-1', + array( + 'utf-8' => (float) 1, + 'utf-10' => (float) 1, + 'utf-16' => (float) 1, + 'iso-8859-1'=> (float) 1 + ) + ), + array( + 'utf-8, utf-10; q=.9, utf-16; q=.5, iso-8859-1; q=.75', + array( + 'utf-8' => (float) 1, + 'utf-10' => 0.9, + 'utf-16' => 0.5, + 'iso-8859-1'=> 0.75 + ) + ), + array( + NULL, + array( + '*' => (float) 1 + ) + ) + ); + } + + /** + * Tests the `parse_charset_header` method parsed the Accept-Charset header + * correctly + * + * @dataProvider provider_parse_charset_header + * + * @param string $accept accept + * @param array $expected expected + * @return void + */ + public function test_parse_charset_header($accept, array $expected) + { + $this->assertSame($expected, HTTP_Header::parse_charset_header($accept)); + } + + /** + * Provides data for test_parse_charset_header + * + * @return array + */ + public function provider_parse_encoding_header() + { + return array( + array( + 'compress, gzip, blowfish', + array( + 'compress' => (float) 1, + 'gzip' => (float) 1, + 'blowfish' => (float) 1 + ) + ), + array( + 'compress, gzip; q=0.12345, blowfish; q=1.0', + array( + 'compress' => (float) 1, + 'gzip' => 0.12345, + 'blowfish' => (float) 1 + ) + ), + array( + NULL, + array( + '*' => (float) 1 + ) + ), + array( + '', + array( + 'identity' => (float) 1 + ) + ) + ); + } + + /** + * Tests the `parse_encoding_header` method parses the Accept-Encoding header + * correctly + * + * @dataProvider provider_parse_encoding_header + * + * @param string $accept accept + * @param array $expected expected + * @return void + */ + public function test_parse_encoding_header($accept, array $expected) + { + $this->assertSame($expected, HTTP_Header::parse_encoding_header($accept)); + } + + /** + * Provides data for test_parse_charset_header + * + * @return array + */ + public function provider_parse_language_header() + { + return array( + array( + 'en, en-us, en-gb, fr, fr-fr, es-es', + array( + 'en' => array( + '*' => (float) 1, + 'us' => (float) 1, + 'gb' => (float) 1 + ), + 'fr' => array( + '*' => (float) 1, + 'fr' => (float) 1 + ), + 'es' => array( + 'es' => (float) 1 + ) + ) + ), + array( + 'en; q=.9, en-us, en-gb, fr; q=.5, fr-fr; q=0.4, es-es; q=0.9, en-gb-gb; q=.45', + array( + 'en' => array( + '*' => 0.9, + 'us' => (float) 1, + 'gb' => (float) 1, + 'gb-gb' => 0.45 + ), + 'fr' => array( + '*' => 0.5, + 'fr' => 0.4 + ), + 'es' => array( + 'es' => 0.9 + ) + ) + ), + array( + NULL, + array( + '*' => array( + '*' => (float) 1 + ) + ) + ) + ); + } + + /** + * Tests the `parse_language_header` method parses the Accept-Language header + * correctly + * + * @dataProvider provider_parse_language_header + * + * @param string $accept accept + * @param array $expected expected + * @return void + */ + public function test_parse_language_header($accept, array $expected) + { + $this->assertSame($expected, HTTP_Header::parse_language_header($accept)); + } + + /** + * Data provider for test_create_cache_control + * + * @return array + */ + public function provider_create_cache_control() + { + return array( + array( + array( + 'public', + 'max-age' => 1800, + 'must-revalidate', + 's-max-age' => 3600 + ), + 'public, max-age=1800, must-revalidate, s-max-age=3600' + ), + array( + array( + 'max-age' => 1800, + 's-max-age' => 1800, + 'public', + 'must-revalidate', + ), + 'max-age=1800, s-max-age=1800, public, must-revalidate' + ), + array( + array( + 'private', + 'no-cache', + 'max-age' => 0, + 'must-revalidate' + ), + 'private, no-cache, max-age=0, must-revalidate' + ) + ); + } + + /** + * Tests that `create_cache_control()` outputs the correct cache control + * string from the supplied input + * + * @dataProvider provider_create_cache_control + * + * @param array $input input + * @param string $expected expected + * @return void + */ + public function test_create_cache_control(array $input, $expected) + { + $this->assertSame($expected, HTTP_Header::create_cache_control($input)); + } + + /** + * Data provider for parse_cache_control + * + * @return array + */ + public function provider_parse_cache_control() + { + return array( + array( + 'public, max-age=1800, must-revalidate, s-max-age=3600', + array( + 'public', + 'max-age' => 1800, + 'must-revalidate', + 's-max-age' => 3600 + ) + ), + array( + 'max-age=1800, s-max-age=1800, public, must-revalidate', + array( + 'max-age' => 1800, + 's-max-age' => 1800, + 'public', + 'must-revalidate', + ) + ), + array( + 'private, no-cache, max-age=0, must-revalidate', + array( + 'private', + 'no-cache', + 'max-age' => 0, + 'must-revalidate' + ) + ) + ); + } + + /** + * Tests that `parse_cache_control()` outputs the correct cache control + * parsed data from the input string + * + * @dataProvider provider_parse_cache_control + * + * @param string $input input + * @param array $expected expected + * @return void + */ + public function test_parse_cache_control($input, array $expected) + { + $parsed = HTTP_Header::parse_cache_control($input); + + $this->assertInternalType('array', $parsed); + + foreach ($expected as $key => $value) + { + if (is_int($key)) + { + $this->assertTrue(in_array($value, $parsed)); + } + else + { + $this->assertTrue(array_key_exists($key, $parsed)); + $this->assertSame($value, $parsed[$key]); + } + } + } + + /** + * Data provider for test_offsetSet + * + * @return array + */ + // @codingStandardsIgnoreStart + public function provider_offsetSet() + // @codingStandardsIgnoreEnd + { + return array( + array( + array( + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Accept' => 'text/html, text/plain; q=.1, */*', + 'Accept-Language' => 'en-gb, en-us, en; q=.1' + ), + array( + array( + 'Accept-Encoding', + 'compress, gzip', + FALSE + ) + ), + array( + 'content-type' => 'application/x-www-form-urlencoded', + 'accept' => 'text/html, text/plain; q=.1, */*', + 'accept-language' => 'en-gb, en-us, en; q=.1', + 'accept-encoding' => 'compress, gzip' + ) + ), + array( + array( + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Accept' => 'text/html, text/plain; q=.1, */*', + 'Accept-Language' => 'en-gb, en-us, en; q=.1' + ), + array( + array( + 'Accept-Encoding', + 'compress, gzip', + FALSE + ), + array( + 'Accept-Encoding', + 'bzip', + FALSE + ) + ), + array( + 'content-type' => 'application/x-www-form-urlencoded', + 'accept' => 'text/html, text/plain; q=.1, */*', + 'accept-language' => 'en-gb, en-us, en; q=.1', + 'accept-encoding' => array( + 'compress, gzip', + 'bzip' + ) + ) + ), + array( + array( + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Accept' => 'text/html, text/plain; q=.1, */*', + 'Accept-Language' => 'en-gb, en-us, en; q=.1' + ), + array( + array( + 'Accept-Encoding', + 'compress, gzip', + FALSE + ), + array( + 'Accept-Encoding', + 'bzip', + TRUE + ), + array( + 'Accept', + 'text/*', + FALSE + ) + ), + array( + 'content-type' => 'application/x-www-form-urlencoded', + 'accept' => array( + 'text/html, text/plain; q=.1, */*', + 'text/*' + ), + 'accept-language' => 'en-gb, en-us, en; q=.1', + 'accept-encoding' => 'bzip' + ) + ), + ); + } + + /** + * Ensures that offsetSet normalizes the array keys + * + * @dataProvider provider_offsetSet + * + * @param array $constructor constructor + * @param array $to_set to_set + * @param array $expected expected + * @return void + */ + // @codingStandardsIgnoreStart + public function test_offsetSet(array $constructor, array $to_set, array $expected) + // @codingStandardsIgnoreEnd + { + $http_header = new HTTP_Header($constructor); + + $reflection = new ReflectionClass($http_header); + $method = $reflection->getMethod('offsetSet'); + + foreach ($to_set as $args) + { + $method->invokeArgs($http_header, $args); + } + + $this->assertSame($expected, $http_header->getArrayCopy()); + } + + /** + * Data provider for test_offsetGet + * + * @return array + */ + // @codingStandardsIgnoreStart + public function provider_offsetGet() + // @codingStandardsIgnoreEnd + { + return array( + array( + array( + 'FoO' => 'bar', + 'START' => 'end', + 'true' => TRUE + ), + 'FOO', + 'bar' + ), + array( + array( + 'FoO' => 'bar', + 'START' => 'end', + 'true' => TRUE + ), + 'true', + TRUE + ), + array( + array( + 'FoO' => 'bar', + 'START' => 'end', + 'true' => TRUE + ), + 'True', + TRUE + ), + array( + array( + 'FoO' => 'bar', + 'START' => 'end', + 'true' => TRUE + ), + 'Start', + 'end' + ), + array( + array( + 'content-type' => 'bar', + 'Content-Type' => 'end', + 'Accept' => '*/*' + ), + 'content-type', + 'end' + ) + ); + } + + /** + * Ensures that offsetGet normalizes the array keys + * + * @dataProvider provider_offsetGet + * + * @param array start state + * @param string key to retrieve + * @param mixed expected + * @return void + */ + // @codingStandardsIgnoreStart + public function test_offsetGet(array $state, $key, $expected) + // @codingStandardsIgnoreEnd + { + $header = new HTTP_Header($state); + + $this->assertSame($expected, $header->offsetGet($key)); + } + + /** + * Data provider for test_offsetExists + * + * @return array + */ + // @codingStandardsIgnoreStart + public function provider_offsetExists() + // @codingStandardsIgnoreEnd + { + return array( + array( + array( + 'Accept' => 'text/html, application/json', + 'Accept-Language' => 'en, en-GB', + 'Content-Type' => 'application/x-www-form-urlencoded' + ), + 'Content-Type', + TRUE + ), + array( + array( + 'Accept' => 'text/html, application/json', + 'Accept-Language' => 'en, en-GB', + 'Content-Type' => 'application/x-www-form-urlencoded' + ), + 'CONTENT-TYPE', + TRUE + ), + array( + array( + 'Accept' => 'text/html, application/json', + 'Accept-Language' => 'en, en-GB', + 'Content-Type' => 'application/x-www-form-urlencoded' + ), + 'accept-language', + TRUE + ), + array( + array( + 'Accept' => 'text/html, application/json', + 'Accept-Language' => 'en, en-GB', + 'Content-Type' => 'application/x-www-form-urlencoded' + ), + 'x-powered-by', + FALSE + ) + ); + } + + /** + * Ensures that offsetExists normalizes the array key + * + * @dataProvider provider_offsetExists + * + * @param array $state state + * @param string $key key + * @param boolean $expected expected + * @return void + */ + // @codingStandardsIgnoreStart + public function test_offsetExists(array $state, $key, $expected) + // @codingStandardsIgnoreEnd + { + $header = new HTTP_Header($state); + + $this->assertSame($expected, $header->offsetExists($key)); + } + + /** + * Data provider for test_offsetUnset + * + * @return array + */ + // @codingStandardsIgnoreStart + public function provider_offsetUnset() + // @codingStandardsIgnoreEnd + { + return array( + array( + array( + 'Accept' => 'text/html, application/json', + 'Accept-Language' => 'en, en-GB', + 'Content-Type' => 'application/x-www-form-urlencoded' + ), + 'Accept-Language', + array( + 'accept' => 'text/html, application/json', + 'content-type' => 'application/x-www-form-urlencoded' + ) + ), + array( + array( + 'Accept' => 'text/html, application/json', + 'Accept-Language' => 'en, en-GB', + 'Content-Type' => 'application/x-www-form-urlencoded' + ), + 'ACCEPT', + array( + 'accept-language' => 'en, en-GB', + 'content-type' => 'application/x-www-form-urlencoded' + ) + ), + array( + array( + 'Accept' => 'text/html, application/json', + 'Accept-Language' => 'en, en-GB', + 'Content-Type' => 'application/x-www-form-urlencoded' + ), + 'content-type', + array( + 'accept' => 'text/html, application/json', + 'accept-language' => 'en, en-GB', + ) + ) + ); + } + + /** + * Tests that `offsetUnset` normalizes the key names properly + * + * @dataProvider provider_offsetUnset + * + * @param array $state state + * @param string $remove remove + * @param array $expected expected + * @return void + */ + // @codingStandardsIgnoreStart + public function test_offsetUnset(array $state, $remove, array $expected) + // @codingStandardsIgnoreEnd + { + $header = new HTTP_Header($state); + $header->offsetUnset($remove); + + $this->assertSame($expected, $header->getArrayCopy()); + } + + /** + * Provides data for test_parse_header_string + * + * @return array + */ + public function provider_parse_header_string() + { + return array( + array( + array( + "Content-Type: application/x-www-form-urlencoded\r\n", + "Accept: text/html, text/plain; q=.5, application/json, */* \r\n", + "X-Powered-By: Kohana Baby \r\n" + ), + array( + 'content-type' => 'application/x-www-form-urlencoded', + 'accept' => 'text/html, text/plain; q=.5, application/json, */* ', + 'x-powered-by' => 'Kohana Baby ' + ) + ), + array( + array( + "Content-Type: application/x-www-form-urlencoded\r\n", + "Accept: text/html, text/plain; q=.5, application/json, */* \r\n", + "X-Powered-By: Kohana Baby \r\n", + "Content-Type: application/json\r\n" + ), + array( + 'content-type' => array( + 'application/x-www-form-urlencoded', + 'application/json' + ), + 'accept' => 'text/html, text/plain; q=.5, application/json, */* ', + 'x-powered-by' => 'Kohana Baby ' + ) + ) + ); + } + + /** + * Tests that `parse_header_string` performs as expected + * + * @dataProvider provider_parse_header_string + * + * @param array headers + * @param array expected + * @return void + */ + public function test_parse_header_string(array $headers, array $expected) + { + $http_header = new HTTP_Header(array()); + + foreach ($headers as $header) + { + + $this->assertEquals(strlen($header), $http_header->parse_header_string(NULL, $header)); + } + + $this->assertSame($expected, $http_header->getArrayCopy()); + } + + /** + * Data Provider for test_accepts_at_quality + * + * @return array + */ + public function provider_accepts_at_quality() + { + return array( + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + 'application/json', + FALSE, + 1.0 + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + 'text/html', + FALSE, + 0.5 + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + 'text/plain', + FALSE, + 0.1 + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + 'text/plain', + TRUE, + FALSE + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + 'application/xml', + FALSE, + 1.0 + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + 'application/xml', + TRUE, + FALSE + ), + array( + array(), + 'application/xml', + FALSE, + 1.0 + ), + array( + array(), + 'application/xml', + TRUE, + FALSE + ) + ); + } + + /** + * Tests `accepts_at_quality` parsed the Accept: header as expected + * + * @dataProvider provider_accepts_at_quality + * + * @param array starting state + * @param string accept header to test + * @param boolean explicitly check + * @param mixed expected output + * @return void + */ + public function test_accepts_at_quality(array $state, $accept, $explicit, $expected) + { + $header = new HTTP_Header($state); + + $this->assertSame($expected, $header->accepts_at_quality($accept, $explicit)); + } + + /** + * Data provider for test_preferred_accept + * + * @return array + */ + public function provider_preferred_accept() + { + return array( + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + array( + 'text/html', + 'application/json', + 'text/plain' + ), + FALSE, + 'application/json' + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + array( + 'text/plain', + 'application/xml', + 'image/jpeg' + ), + FALSE, + 'application/xml' + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1' + ), + array( + 'text/plain', + 'application/xml', + 'image/jpeg' + ), + FALSE, + 'text/plain' + ), + array( + array( + 'Accept' => 'application/json, text/html; q=.5, text/*; q=.1, */*' + ), + array( + 'text/plain', + 'application/xml', + 'image/jpeg' + ), + TRUE, + FALSE + ), + + ); + } + + /** + * Tests `preferred_accept` returns the correct preferred type + * + * @dataProvider provider_preferred_accept + * + * @param array state + * @param array accepts + * @param string explicit + * @param string expected + * @return void + */ + public function test_preferred_accept(array $state, array $accepts, $explicit, $expected) + { + $header = new HTTP_Header($state); + + $this->assertSame($expected, $header->preferred_accept($accepts, $explicit)); + } + + /** + * Data provider for test_accepts_charset_at_quality + * + * @return array + */ + public function provider_accepts_charset_at_quality() + { + return array( + array( + array( + 'Accept-Charset' => 'utf-8, utf-10, utf-16, iso-8859-1' + ), + 'utf-8', + 1.0 + ), + array( + array( + 'Accept-Charset' => 'utf-8, utf-10, utf-16, iso-8859-1' + ), + 'utf-16', + 1.0 + ), + array( + array( + 'Accept-Charset' => 'utf-8; q=.1, utf-10, utf-16; q=.2, iso-8859-1' + ), + 'utf-8', + 0.1 + ), + array( + array( + 'Accept-Charset' => 'utf-8; q=.1, utf-10, utf-16; q=.2, iso-8859-1; q=.5' + ), + 'iso-8859-1', + 0.5 + ) + ); + } + + /** + * Tests `accepts_charset_at_quality` works as expected, returning the correct + * quality value + * + * @dataProvider provider_accepts_charset_at_quality + * + * @param array state + * @param string charset + * @param string expected + * @return void + */ + public function test_accepts_charset_at_quality(array $state, $charset, $expected) + { + $header = new HTTP_Header($state); + + $this->assertSame($expected, $header->accepts_charset_at_quality($charset)); + } + + /** + * Data provider for test_preferred_charset + * + * @return array + */ + public function provider_preferred_charset() + { + return array( + array( + array( + 'Accept-Charset' => 'utf-8, utf-10, utf-16, iso-8859-1' + ), + array( + 'utf-8', + 'utf-16' + ), + 'utf-8' + ), + array( + array( + 'Accept-Charset' => 'utf-8, utf-10, utf-16, iso-8859-1' + ), + array( + 'UTF-10' + ), + 'UTF-10' + ), + ); + } + + /** + * Tests `preferred_charset` works as expected, returning the correct charset + * from the list supplied + * + * @dataProvider provider_preferred_charset + * + * @param array state + * @param array charsets + * @param string expected + * @return void + */ + public function test_preferred_charset(array $state, array $charsets, $expected) + { + $header = new HTTP_Header($state); + + $this->assertSame($expected, $header->preferred_charset($charsets)); + } + + /** + * Data provider for test_accepts_encoding_at_quality + * + * @return array + */ + public function provider_accepts_encoding_at_quality() + { + return array( + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + 'gzip', + FALSE, + 1.0 + ), + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + 'gzip', + TRUE, + 1.0 + ), + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + 'blowfish', + FALSE, + 0.7 + ), + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + 'bzip', + FALSE, + 0.5 + ), + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + 'bzip', + TRUE, + (float) 0 + ) + ); + } + + /** + * Tests `accepts_encoding_at_quality` parses and returns the correct + * quality value for Accept-Encoding headers + * + * @dataProvider provider_accepts_encoding_at_quality + * + * @param array state + * @param string encoding + * @param boolean explicit + * @param float expected + * @return void + */ + public function test_accepts_encoding_at_quality(array $state, $encoding, $explicit, $expected) + { + $header = new HTTP_Header($state); + $this->assertSame($expected, $header->accepts_encoding_at_quality($encoding, $explicit)); + } + + /** + * Data provider for test_preferred_encoding + * + * @return array + */ + public function provider_preferred_encoding() + { + return array( + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + array('gzip', 'blowfish', 'bzip'), + FALSE, + 'gzip' + ), + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + array('bzip', 'ROT-13'), + FALSE, + 'bzip' + ), + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.7, *; q=.5' + ), + array('bzip', 'ROT-13'), + TRUE, + FALSE + ), + array( + array( + 'accept-encoding' => 'compress, gzip, blowfish; q=.2, *; q=.5' + ), + array('ROT-13', 'blowfish'), + FALSE, + 'ROT-13' + ), + ); + } + + /** + * Tests that `preferred_encoding` parses and returns the correct + * encoding type + * + * @dataProvider provider_preferred_encoding + * + * @param array state in + * @param array encodings to interrogate + * @param boolean explicit check + * @param string expected output + * @return void + */ + public function test_preferred_encoding(array $state, array $encodings, $explicit, $expected) + { + $header = new HTTP_Header($state); + $this->assertSame($expected, $header->preferred_encoding($encodings, $explicit)); + } + + /** + * Data provider for test_accepts_language_at_quality + * + * @return array + */ + public function provider_accepts_language_at_quality() + { + return array( + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + 'en', + FALSE, + 0.5 + ), + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + 'en-gb', + FALSE, + 0.7 + ), + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + 'en', + TRUE, + 0.5 + ), + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + 'fr-ni', + FALSE, + 0.8 + ), + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + 'fr-ni', + TRUE, + (float) 0 + ), + array( + array( + 'accept-language' => 'en-US' + ), + 'en-us', + TRUE, + (float) 1 + ), + ); + } + + /** + * Tests `accepts_language_at_quality` parses the Accept-Language header + * correctly and identifies the correct quality supplied, explicit or not + * + * @dataProvider provider_accepts_language_at_quality + * + * @param array state in + * @param string language to interrogate + * @param boolean explicit check + * @param float expected output + * @return void + */ + public function test_accepts_language_at_quality(array $state, $language, $explicit, $expected) + { + $header = new HTTP_Header($state); + $this->assertSame($expected, $header->accepts_language_at_quality($language, $explicit)); + } + + /** + * Data provider for test_preferred_language + * + * @return array + */ + public function provider_preferred_language() + { + return array( + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + array( + 'en', + 'fr', + 'en-gb' + ), + FALSE, + 'fr' + ), + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + array( + 'en', + 'fr', + 'en-gb' + ), + TRUE, + 'fr' + ), + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + array( + 'en-au', + 'fr-ni', + 'fr' + ), + FALSE, + 'fr-ni' + ), + array( + array( + 'accept-language' => 'en-us; q=.9, en-gb; q=.7, en; q=.5, fr-fr; q=.9, fr; q=.8' + ), + array( + 'en-au', + 'fr-ni', + 'fr' + ), + TRUE, + 'fr' + ), + array( + array( + 'accept-language' => 'en-US' + ), + array( + 'en-us' + ), + TRUE, + 'en-us' + ), + ); + } + + /** + * Tests that `preferred_language` correctly identifies the right + * language based on the Accept-Language header and `$explicit` setting + * + * @dataProvider provider_preferred_language + * + * @param array state in + * @param array languages to interrogate + * @param boolean explicit check + * @param string expected output + * @return void + */ + public function test_preferred_language(array $state, array $languages, $explicit, $expected) + { + $header = new HTTP_Header($state); + $this->assertSame($expected, $header->preferred_language($languages, $explicit)); + } + + /** + * Data provider for test_send_headers + * + * @return array + */ + public function provider_send_headers() + { + $content_type = Kohana::$content_type.'; charset='.Kohana::$charset; + + return array( + array( + array(), + array( + 'HTTP/1.1 200 OK', + 'Content-Type: '.$content_type, + ), + FALSE, + ), + array( + array(), + array( + 'HTTP/1.1 200 OK', + 'Content-Type: '.$content_type, + 'X-Powered-By: '.Kohana::version(), + ), + TRUE, + ), + array( + array( + 'accept' => 'text/html, text/plain, text/*, */*', + 'accept-charset' => 'utf-8, utf-10, iso-8859-1', + 'accept-encoding' => 'compress, gzip', + 'accept-language' => 'en, en-gb, en-us' + ), + array( + 'HTTP/1.1 200 OK', + 'Accept: text/html, text/plain, text/*, */*', + 'Accept-Charset: utf-8, utf-10, iso-8859-1', + 'Accept-Encoding: compress, gzip', + 'Accept-Language: en, en-gb, en-us', + 'Content-Type: '.$content_type, + ), + FALSE + ), + array( + array( + 'accept' => 'text/html, text/plain, text/*, */*', + 'accept-charset' => 'utf-8, utf-10, iso-8859-1', + 'accept-encoding' => 'compress, gzip', + 'accept-language' => 'en, en-gb, en-us', + 'content-type' => 'application/json', + 'x-powered-by' => 'Mohana', + 'x-ssl-enabled' => 'TRUE' + ), + array( + 'HTTP/1.1 200 OK', + 'Accept: text/html, text/plain, text/*, */*', + 'Accept-Charset: utf-8, utf-10, iso-8859-1', + 'Accept-Encoding: compress, gzip', + 'Accept-Language: en, en-gb, en-us', + 'Content-Type: application/json', + 'X-Powered-By: Mohana', + 'X-Ssl-Enabled: TRUE' + ), + TRUE + ) + ); + } + + /** + * Tests that send headers processes the headers sent to PHP correctly + * + * @dataProvider provider_send_headers + * + * @param array state in + * @param array expected out + * @return void + */ + public function test_send_headers(array $state, array $expected, $expose) + { + Kohana::$expose = $expose; + + $response = new Response; + $response->headers($state); + + $this->assertSame( + $expected, + $response->send_headers(FALSE, array($this, 'send_headers_handler')) + ); + } + + /** + * Callback handler for send headers + * + * @param array headers + * @param boolean replace + * @return array + */ + public function send_headers_handler($response, $headers, $replace) + { + return $headers; + } +} // End Kohana_HTTP_HeaderTest \ No newline at end of file diff --git a/~dev_rating/system/tests/kohana/I18nTest.php b/~dev_rating/system/tests/kohana/I18nTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b91fdd4bd2d3fd9bf3d337ab92f292967c1c7aa7 --- /dev/null +++ b/~dev_rating/system/tests/kohana/I18nTest.php @@ -0,0 +1,90 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana i18n class + * + * @group kohana + * @group kohana.core + * @group kohana.core.i18n + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_I18nTest extends Unittest_TestCase { + + /** + * Default values for the environment, see setEnvironment + * @var array + */ + // @codingStandardsIgnoreStart + protected $environmentDefault = array( + 'I18n::$lang' => 'en-us', + ); + // @codingStandardsIgnoreEnd + + /** + * Provides test data for test_lang() + * + * @return array + */ + public function provider_lang() + { + return array( + // $input, $expected_result + array(NULL, 'en-us'), + array('es-es', 'es-es'), + ); + } + + /** + * Tests I18n::lang() + * + * @test + * @dataProvider provider_lang + * @param boolean $input Input for I18n::lang + * @param boolean $expected Output for I18n::lang + */ + public function test_lang($input, $expected_result) + { + $this->assertSame($expected_result, I18n::lang($input)); + $this->assertSame($expected_result, I18n::lang()); + } + + /** + * Provides test data for test_get() + * + * @return array + */ + public function provider_get() + { + return array( + // $value, $result + array('en-us', 'Hello, world!', 'Hello, world!'), + array('es-es', 'Hello, world!', 'ВЎHola, mundo!'), + array('fr-fr', 'Hello, world!', 'Bonjour, monde!'), + ); + } + + /** + * Tests i18n::get() + * + * @test + * @dataProvider provider_get + * @param boolean $input Input for File::mime + * @param boolean $expected Output for File::mime + */ + public function test_get($lang, $input, $expected) + { + I18n::lang($lang); + $this->assertSame($expected, I18n::get($input)); + + // Test immediate translation, issue #3085 + I18n::lang('en-us'); + $this->assertSame($expected, I18n::get($input, $lang)); + } + +} diff --git a/~dev_rating/system/tests/kohana/InflectorTest.php b/~dev_rating/system/tests/kohana/InflectorTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9478a0d34fec36a967d2db368e44a359193ebc7b --- /dev/null +++ b/~dev_rating/system/tests/kohana/InflectorTest.php @@ -0,0 +1,186 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana inflector class + * + * @group kohana + * @group kohana.core + * @group kohana.core.inflector + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_InflectorTest extends Unittest_TestCase +{ + /** + * Provides test data for test_lang() + * + * @return array + */ + public function provider_uncountable() + { + return array( + // $value, $result + array('fish', TRUE), + array('cat', FALSE), + array('deer', TRUE), + array('bison', TRUE), + array('friend', FALSE), + ); + } + + /** + * Tests Inflector::uncountable + * + * @test + * @dataProvider provider_uncountable + * @param boolean $input Input for File::mime + * @param boolean $expected Output for File::mime + */ + public function test_uncountable($input, $expected) + { + $this->assertSame($expected, Inflector::uncountable($input)); + } + + /** + * Provides test data for test_lang() + * + * @return array + */ + public function provider_singular() + { + return array( + // $value, $result + array('fish', NULL, 'fish'), + array('cats', NULL, 'cat'), + array('cats', 2, 'cats'), + array('cats', '2', 'cats'), + array('children', NULL, 'child'), + array('meters', 0.6, 'meters'), + array('meters', 1.6, 'meters'), + array('meters', 1.0, 'meter'), + array('status', NULL, 'status'), + array('statuses', NULL, 'status'), + array('heroes', NULL, 'hero'), + ); + } + + /** + * Tests Inflector::singular + * + * @test + * @dataProvider provider_singular + * @param boolean $input Input for File::mime + * @param boolean $expected Output for File::mime + */ + public function test_singular($input, $count, $expected) + { + $this->assertSame($expected, Inflector::singular($input, $count)); + } + + /** + * Provides test data for test_lang() + * + * @return array + */ + public function provider_plural() + { + return array( + // $value, $result + array('fish', NULL, 'fish'), + array('cat', NULL, 'cats'), + array('cats', 1, 'cats'), + array('cats', '1', 'cats'), + array('movie', NULL, 'movies'), + array('meter', 0.6, 'meters'), + array('meter', 1.6, 'meters'), + array('meter', 1.0, 'meter'), + array('hero', NULL, 'heroes'), + array('Dog', NULL, 'Dogs'), // Titlecase + array('DOG', NULL, 'DOGS'), // Uppercase + ); + } + + /** + * Tests Inflector::plural + * + * @test + * @dataProvider provider_plural + * @param boolean $input Input for File::mime + * @param boolean $expected Output for File::mime + */ + public function test_plural($input, $count, $expected) + { + $this->assertSame($expected, Inflector::plural($input, $count)); + } + + /** + * Provides test data for test_camelize() + * + * @return array + */ + public function provider_camelize() + { + return array( + // $value, $result + array('mother cat', 'camelize', 'motherCat'), + array('kittens in bed', 'camelize', 'kittensInBed'), + array('mother cat', 'underscore', 'mother_cat'), + array('kittens in bed', 'underscore', 'kittens_in_bed'), + array('kittens-are-cats', 'humanize', 'kittens are cats'), + array('dogs_as_well', 'humanize', 'dogs as well'), + ); + } + + /** + * Tests Inflector::camelize + * + * @test + * @dataProvider provider_camelize + * @param boolean $input Input for File::mime + * @param boolean $expected Output for File::mime + */ + public function test_camelize($input, $method, $expected) + { + $this->assertSame($expected, Inflector::$method($input)); + } + + /** + * Provides data for test_decamelize() + * + * @return array + */ + public function provider_decamelize() + { + return array( + array('getText', '_', 'get_text'), + array('getJSON', '_', 'get_json'), + array('getLongText', '_', 'get_long_text'), + array('getI18N', '_', 'get_i18n'), + array('getL10n', '_', 'get_l10n'), + array('getTe5t1ng', '_', 'get_te5t1ng'), + array('OpenFile', '_', 'open_file'), + array('CloseIoSocket', '_', 'close_io_socket'), + array('fooBar', ' ', 'foo bar'), + array('camelCase', '+', 'camel+case'), + ); + } + + /** + * Tests Inflector::decamelize() + * + * @test + * @dataProvider provider_decamelize + * @param string $input Camelized string + * @param string $glue Glue + * @param string $expected Expected string + */ + public function test_decamelize($input, $glue, $expected) + { + $this->assertSame($expected, Inflector::decamelize($input, $glue)); + } +} diff --git a/~dev_rating/system/tests/kohana/LogTest.php b/~dev_rating/system/tests/kohana/LogTest.php new file mode 100644 index 0000000000000000000000000000000000000000..df77c3977ac964fe004ca0ed4b6d5d19aa00cd0f --- /dev/null +++ b/~dev_rating/system/tests/kohana/LogTest.php @@ -0,0 +1,111 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana Logging API + * + * @group kohana + * @group kohana.core + * @group kohana.core.logging + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Matt Button <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_LogTest extends Unittest_TestCase +{ + + /** + * Tests that when a new logger is created the list of messages is initially + * empty + * + * @test + * @covers Log + */ + public function test_messages_is_initially_empty() + { + $logger = new Log; + + $this->assertAttributeSame(array(), '_messages', $logger); + } + + /** + * Tests that when a new logger is created the list of writers is initially + * empty + * + * @test + * @covers Log + */ + public function test_writers_is_initially_empty() + { + $logger = new Log; + + $this->assertAttributeSame(array(), '_writers', $logger); + } + + /** + * Test that attaching a log writer using an array of levels adds it to the array of log writers + * + * @TODO Is this test too specific? + * + * @test + * @covers Log::attach + */ + public function test_attach_attaches_log_writer_and_returns_this() + { + $logger = new Log; + $writer = $this->getMockForAbstractClass('Log_Writer'); + + $this->assertSame($logger, $logger->attach($writer)); + + $this->assertAttributeSame( + array(spl_object_hash($writer) => array('object' => $writer, 'levels' => array())), + '_writers', + $logger + ); + } + + /** + * Test that attaching a log writer using a min/max level adds it to the array of log writers + * + * @TODO Is this test too specific? + * + * @test + * @covers Log::attach + */ + public function test_attach_attaches_log_writer_min_max_and_returns_this() + { + $logger = new Log; + $writer = $this->getMockForAbstractClass('Log_Writer'); + + $this->assertSame($logger, $logger->attach($writer, Log::NOTICE, Log::CRITICAL)); + + $this->assertAttributeSame( + array(spl_object_hash($writer) => array('object' => $writer, 'levels' => array(Log::CRITICAL, Log::ERROR, Log::WARNING, Log::NOTICE))), + '_writers', + $logger + ); + } + + /** + * When we call detach() we expect the specified log writer to be removed + * + * @test + * @covers Log::detach + */ + public function test_detach_removes_log_writer_and_returns_this() + { + $logger = new Log; + $writer = $this->getMockForAbstractClass('Log_Writer'); + + $logger->attach($writer); + + $this->assertSame($logger, $logger->detach($writer)); + + $this->assertAttributeSame(array(), '_writers', $logger); + } + + +} diff --git a/~dev_rating/system/tests/kohana/ModelTest.php b/~dev_rating/system/tests/kohana/ModelTest.php new file mode 100644 index 0000000000000000000000000000000000000000..8e33d84742c43bbfa6ff432801bbb720afec5e58 --- /dev/null +++ b/~dev_rating/system/tests/kohana/ModelTest.php @@ -0,0 +1,36 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * This test only really exists for code coverage. + * + * @group kohana + * @group kohana.core + * @group kohana.core.model + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ModelTest extends Unittest_TestCase +{ + /** + * Test the model's factory. + * + * @test + * @covers Model::factory + */ + public function test_create() + { + $foobar = Model::factory('Foobar'); + + $this->assertEquals(TRUE, $foobar instanceof Model); + } +} + +class Model_Foobar extends Model +{ + +} diff --git a/~dev_rating/system/tests/kohana/NumTest.php b/~dev_rating/system/tests/kohana/NumTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ddb9bac09fb6efb876e7c6fcb905b57a548fe2d2 --- /dev/null +++ b/~dev_rating/system/tests/kohana/NumTest.php @@ -0,0 +1,205 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Num + * + * @group kohana + * @group kohana.core + * @group kohana.core.num + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_NumTest extends Unittest_TestCase +{ + protected $default_locale; + + /** + * SetUp test enviroment + */ + // @codingStandardsIgnoreStart + public function setUp() + // @codingStandardsIgnoreEnd + { + parent::setUp(); + + setlocale(LC_ALL, 'en_US.utf8'); + } + + /** + * Tear down environment + */ + // @codingStandardsIgnoreStart + public function tearDown() + // @codingStandardsIgnoreEnd + { + parent::tearDown(); + + setlocale(LC_ALL, $this->default_locale); + } + + /** + * Provides test data for test_bytes() + * + * @return array + */ + public function provider_bytes() + { + return array( + array(204800.0, '200K'), + array(5242880.0, '5MiB'), + array(1000.0, 1000), + array(2684354560.0, '2.5GB'), + ); + } + + /** + * Tests Num::bytes() + * + * @test + * @covers Num::bytes + * @dataProvider provider_bytes + * @param integer Expected Value + * @param string Input value + */ + public function test_bytes($expected, $size) + { + $this->assertSame($expected, Num::bytes($size)); + } + + /** + * Provides test data for test_ordinal() + * @return array + */ + public function provider_ordinal() + { + return array( + array(0, 'th'), + array(1, 'st'), + array(21, 'st'), + array(112, 'th'), + array(23, 'rd'), + array(42, 'nd'), + ); + } + + /** + * + * @test + * @dataProvider provider_ordinal + * @param integer $number + * @param <type> $expected + */ + public function test_ordinal($number, $expected) + { + $this->assertSame($expected, Num::ordinal($number)); + } + + /** + * Provides test data for test_format() + * @return array + */ + public function provider_format() + { + return array( + // English + array(10000, 2, FALSE, '10,000.00'), + array(10000, 2, TRUE, '10,000.00'), + + // Additional dp's should be removed + array(123.456, 2, FALSE, '123.46'), + array(123.456, 2, TRUE, '123.46'), + ); + } + + /** + * @todo test locales + * @test + * @dataProvider provider_format + * @param integer $number + * @param integer $places + * @param boolean $monetary + * @param string $expected + */ + public function test_format($number, $places, $monetary, $expected) + { + $this->assertSame($expected, Num::format($number, $places, $monetary)); + } + + /** + * Provides data for test_round() + * @return array + */ + function provider_round() + { + return array( + array(5.5, 0, array( + 6.0, + 5.0, + 6.0, + 5.0, + )), + array(42.5, 0, array( + 43.0, + 42.0, + 42.0, + 43.0, + )), + array(10.4, 0, array( + 10.0, + 10.0, + 10.0, + 10.0, + )), + array(10.8, 0, array( + 11.0, + 11.0, + 11.0, + 11.0, + )), + array(-5.5, 0, array( + -6.0, + -5.0, + -6.0, + -5.0, + )), + array(-10.5, 0, array( + -11.0, + -10.0, + -10.0, + -11.0, + )), + array(26.12375, 4, array( + 26.1238, + 26.1237, + 26.1238, + 26.1237, + )), + array(26.12325, 4, array( + 26.1233, + 26.1232, + 26.1232, + 26.1233, + )), + ); + } + + /** + * @test + * @dataProvider provider_round + * @param number $input + * @param integer $precision + * @param integer $mode + * @param number $expected + */ + function test_round($input, $precision, $expected) + { + foreach (array(Num::ROUND_HALF_UP, Num::ROUND_HALF_DOWN, Num::ROUND_HALF_EVEN, Num::ROUND_HALF_ODD) as $i => $mode) + { + $this->assertSame($expected[$i], Num::round($input, $precision, $mode, FALSE)); + } + } +} diff --git a/~dev_rating/system/tests/kohana/RequestTest.php b/~dev_rating/system/tests/kohana/RequestTest.php new file mode 100644 index 0000000000000000000000000000000000000000..3ba516f354ecd95d74a5f36cec4f13013a6f0e45 --- /dev/null +++ b/~dev_rating/system/tests/kohana/RequestTest.php @@ -0,0 +1,720 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Unit tests for request class + * + * @group kohana + * @group kohana.core + * @group kohana.core.request + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_RequestTest extends Unittest_TestCase +{ + protected $_inital_request; + + // @codingStandardsIgnoreStart + public function setUp() + // @codingStandardsIgnoreEnd + { + parent::setUp(); + $this->_initial_request = Request::$initial; + Request::$initial = new Request('/'); + } + + // @codingStandardsIgnoreStart + public function tearDown() + // @codingStandardsIgnoreEnd + { + Request::$initial = $this->_initial_request; + parent::tearDown(); + } + + public function test_initial() + { + $this->setEnvironment(array( + 'Request::$initial' => NULL, + 'Request::$client_ip' => NULL, + 'Request::$user_agent' => NULL, + '_SERVER' => array( + 'HTTPS' => NULL, + 'PATH_INFO' => '/', + 'HTTP_REFERER' => 'http://example.com/', + 'HTTP_USER_AGENT' => 'whatever (Mozilla 5.0/compatible)', + 'REMOTE_ADDR' => '127.0.0.1', + 'REQUEST_METHOD' => 'GET', + 'HTTP_X_REQUESTED_WITH' => 'ajax-or-something', + ), + '_GET' => array(), + '_POST' => array(), + )); + + $request = Request::factory(); + + $this->assertEquals(Request::$initial, $request); + + $this->assertEquals(Request::$client_ip, '127.0.0.1'); + + $this->assertEquals(Request::$user_agent, 'whatever (Mozilla 5.0/compatible)'); + + $this->assertEquals($request->protocol(), 'HTTP/1.1'); + + $this->assertEquals($request->referrer(), 'http://example.com/'); + + $this->assertEquals($request->requested_with(), 'ajax-or-something'); + + $this->assertEquals($request->query(), array()); + + $this->assertEquals($request->post(), array()); + } + + /** + * Tests that the allow_external flag prevents an external request. + * + * @return null + */ + public function test_disable_external_tests() + { + $this->setEnvironment( + array( + 'Request::$initial' => NULL, + ) + ); + + $request = new Request('http://www.google.com/', array(), FALSE); + + $this->assertEquals(FALSE, $request->is_external()); + } + + /** + * Provides the data for test_create() + * @return array + */ + public function provider_create() + { + return array( + array('foo/bar', 'Request_Client_Internal'), + array('http://google.com', 'Request_Client_External'), + ); + } + + /** + * Ensures the create class is created with the correct client + * + * @test + * @dataProvider provider_create + */ + public function test_create($uri, $client_class) + { + $request = Request::factory($uri); + + $this->assertInstanceOf($client_class, $request->client()); + } + + /** + * Ensure that parameters can be read + * + * @test + */ + public function test_param() + { + $route = new Route('(<controller>(/<action>(/<id>)))'); + + $uri = 'foo/bar/id'; + $request = Request::factory($uri, NULL, TRUE, array($route)); + + // We need to execute the request before it has matched a route + try + { + $request->execute(); + } + catch (Exception $e) {} + + $this->assertArrayHasKey('id', $request->param()); + $this->assertArrayNotHasKey('foo', $request->param()); + $this->assertEquals($request->uri(), $uri); + + // Ensure the params do not contain contamination from controller, action, route, uri etc etc + $params = $request->param(); + + // Test for illegal components + $this->assertArrayNotHasKey('controller', $params); + $this->assertArrayNotHasKey('action', $params); + $this->assertArrayNotHasKey('directory', $params); + $this->assertArrayNotHasKey('uri', $params); + $this->assertArrayNotHasKey('route', $params); + + $route = new Route('(<uri>)', array('uri' => '.+')); + $route->defaults(array('controller' => 'foobar', 'action' => 'index')); + $request = Request::factory('foobar', NULL, TRUE, array($route)); + + // We need to execute the request before it has matched a route + try + { + $request->execute(); + } + catch (Exception $e) {} + + $this->assertSame('foobar', $request->param('uri')); + } + + /** + * Tests Request::method() + * + * @test + */ + public function test_method() + { + $request = Request::factory('foo/bar'); + + $this->assertEquals($request->method(), 'GET'); + $this->assertEquals(($request->method('post') === $request), TRUE); + $this->assertEquals(($request->method() === 'POST'), TRUE); + } + + /** + * Tests Request::route() + * + * @test + */ + public function test_route() + { + $request = Request::factory(''); // This should always match something, no matter what changes people make + + // We need to execute the request before it has matched a route + try + { + $request->execute(); + } + catch (Exception $e) {} + + $this->assertInstanceOf('Route', $request->route()); + } + + /** + * Tests Request::route() + * + * @test + */ + public function test_route_is_not_set_before_execute() + { + $request = Request::factory(''); // This should always match something, no matter what changes people make + + // The route should be NULL since the request has not been executed yet + $this->assertEquals($request->route(), NULL); + } + + /** + * Tests Request::accept_type() + * + * @test + * @covers Request::accept_type + */ + public function test_accept_type() + { + $this->assertEquals(array('*/*' => 1), Request::accept_type()); + } + + /** + * Provides test data for Request::accept_lang() + * @return array + */ + public function provider_accept_lang() + { + return array( + array('en-us', 1, array('_SERVER' => array('HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5'))), + array('en-us', 1, array('_SERVER' => array('HTTP_ACCEPT_LANGUAGE' => 'en-gb'))), + array('en-us', 1, array('_SERVER' => array('HTTP_ACCEPT_LANGUAGE' => 'sp-sp;q=0.5'))) + ); + } + + /** + * Tests Request::accept_lang() + * + * @test + * @covers Request::accept_lang + * @dataProvider provider_accept_lang + * @param array $params Query string + * @param string $expected Expected result + * @param array $enviroment Set environment + */ + public function test_accept_lang($params, $expected, $enviroment) + { + $this->setEnvironment($enviroment); + + $this->assertEquals( + $expected, + Request::accept_lang($params) + ); + } + + /** + * Provides test data for Request::url() + * @return array + */ + public function provider_url() + { + return array( + array( + 'foo/bar', + 'http', + 'http://localhost/kohana/foo/bar' + ), + array( + 'foo', + 'http', + 'http://localhost/kohana/foo' + ), + ); + } + + /** + * Tests Request::url() + * + * @test + * @dataProvider provider_url + * @covers Request::url + * @param string $uri the uri to use + * @param string $protocol the protocol to use + * @param array $expected The string we expect + */ + public function test_url($uri, $protocol, $expected) + { + if ( ! isset($_SERVER['argc'])) + { + $_SERVER['argc'] = 1; + } + + $this->setEnvironment(array( + 'Kohana::$base_url' => '/kohana/', + '_SERVER' => array('HTTP_HOST' => 'localhost', 'argc' => $_SERVER['argc']), + 'Kohana::$index_file' => FALSE, + )); + + $this->assertEquals(Request::factory($uri)->url($protocol), $expected); + } + + /** + * Data provider for test_set_protocol() test + * + * @return array + */ + public function provider_set_protocol() + { + return array( + array( + 'http/1.1', + 'HTTP/1.1', + ), + array( + 'ftp', + 'FTP', + ), + array( + 'hTTp/1.0', + 'HTTP/1.0', + ), + ); + } + + /** + * Tests the protocol() method + * + * @dataProvider provider_set_protocol + * + * @return null + */ + public function test_set_protocol($protocol, $expected) + { + $request = Request::factory(); + + // Set the supplied protocol + $result = $request->protocol($protocol); + + // Test the set value + $this->assertSame($expected, $request->protocol()); + + // Test the return value + $this->assertTrue($request instanceof $result); + } + + /** + * Provides data for test_post_max_size_exceeded() + * + * @return array + */ + public function provider_post_max_size_exceeded() + { + // Get the post max size + $post_max_size = Num::bytes(ini_get('post_max_size')); + + return array( + array( + $post_max_size+200000, + TRUE + ), + array( + $post_max_size-20, + FALSE + ), + array( + $post_max_size, + FALSE + ) + ); + } + + /** + * Tests the post_max_size_exceeded() method + * + * @dataProvider provider_post_max_size_exceeded + * + * @param int content_length + * @param bool expected + * @return void + */ + public function test_post_max_size_exceeded($content_length, $expected) + { + // Ensure the request method is set to POST + Request::$initial->method(HTTP_Request::POST); + + // Set the content length + $_SERVER['CONTENT_LENGTH'] = $content_length; + + // Test the post_max_size_exceeded() method + $this->assertSame(Request::post_max_size_exceeded(), $expected); + } + + /** + * Provides data for test_uri_only_trimed_on_internal() + * + * @return array + */ + public function provider_uri_only_trimed_on_internal() + { + $old_request = Request::$initial; + Request::$initial = new Request(TRUE); + + $result = array( + array( + new Request('http://www.google.com'), + 'http://www.google.com' + ), + array( + new Request('http://www.google.com/'), + 'http://www.google.com/' + ), + array( + new Request('foo/bar/'), + 'foo/bar' + ), + array( + new Request('foo/bar'), + 'foo/bar' + ), + array( + new Request('/'), + '/' + ), + array( + new Request(''), + '/' + ) + ); + + Request::$initial = $old_request; + return $result; + } + + /** + * Tests that the uri supplied to Request is only trimed + * for internal requests. + * + * @dataProvider provider_uri_only_trimed_on_internal + * + * @return void + */ + public function test_uri_only_trimed_on_internal(Request $request, $expected) + { + $this->assertSame($request->uri(), $expected); + } + + /** + * Data provider for test_options_set_to_external_client() + * + * @return array + */ + public function provider_options_set_to_external_client() + { + $provider = array( + array( + array( + CURLOPT_PROXYPORT => 8080, + CURLOPT_PROXYTYPE => CURLPROXY_HTTP, + CURLOPT_VERBOSE => TRUE + ), + array( + CURLOPT_PROXYPORT => 8080, + CURLOPT_PROXYTYPE => CURLPROXY_HTTP, + CURLOPT_VERBOSE => TRUE + ) + ) + ); + + return $provider; + } + + /** + * Test for Request_Client_External::options() to ensure options + * can be set to the external client (for cURL and PECL_HTTP) + * + * @dataProvider provider_options_set_to_external_client + * + * @param array settings + * @param array expected + * @return void + */ + public function test_options_set_to_external_client($settings, $expected) + { + $request_client = Request_Client_External::factory(array(), 'Request_Client_Curl'); + + // Test for empty array + $this->assertSame(array(), $request_client->options()); + + // Test that set works as expected + $this->assertSame($request_client->options($settings), $request_client); + + // Test that each setting is present and returned + foreach ($expected as $key => $value) + { + $this->assertSame($request_client->options($key), $value); + } + } + + /** + * Provides data for test_headers_get() + * + * @return array + */ + public function provider_headers_get() + { + $x_powered_by = 'Kohana Unit Test'; + $content_type = 'application/x-www-form-urlencoded'; + + return array( + array( + $request = Request::factory('foo/bar') + ->headers(array( + 'x-powered-by' => $x_powered_by, + 'content-type' => $content_type + ) + ), + array( + 'x-powered-by' => $x_powered_by, + 'content-type' => $content_type + ) + ) + ); + } + + /** + * Tests getting headers from the Request object + * + * @dataProvider provider_headers_get + * + * @param Request request to test + * @param array headers to test against + * @return void + */ + public function test_headers_get($request, $headers) + { + foreach ($headers as $key => $expected_value) + { + $this->assertSame( (string) $request->headers($key), $expected_value); + } + } + + /** + * Provides data for test_headers_set + * + * @return array + */ + public function provider_headers_set() + { + return array( + array( + Request::factory(), + array( + 'content-type' => 'application/x-www-form-urlencoded', + 'x-test-header' => 'foo' + ), + "Content-Type: application/x-www-form-urlencoded\r\nX-Test-Header: foo\r\n\r\n" + ), + array( + Request::factory(), + array( + 'content-type' => 'application/json', + 'x-powered-by' => 'kohana' + ), + "Content-Type: application/json\r\nX-Powered-By: kohana\r\n\r\n" + ) + ); + } + + /** + * Tests the setting of headers to the request object + * + * @dataProvider provider_headers_set + * + * @param Request request object + * @param array header(s) to set to the request object + * @param string expected http header + * @return void + */ + public function test_headers_set(Request $request, $headers, $expected) + { + $request->headers($headers); + $this->assertSame($expected, (string) $request->headers()); + } + + /** + * Provides test data for test_query_parameter_parsing() + * + * @return array + */ + public function provider_query_parameter_parsing() + { + return array( + array( + new Request('foo/bar'), + array( + 'foo' => 'bar', + 'sna' => 'fu' + ), + array( + 'foo' => 'bar', + 'sna' => 'fu' + ), + ), + array( + new Request('foo/bar?john=wayne&peggy=sue'), + array( + 'foo' => 'bar', + 'sna' => 'fu' + ), + array( + 'john' => 'wayne', + 'peggy' => 'sue', + 'foo' => 'bar', + 'sna' => 'fu' + ), + ), + array( + new Request('http://host.tld/foo/bar?john=wayne&peggy=sue'), + array( + 'foo' => 'bar', + 'sna' => 'fu' + ), + array( + 'john' => 'wayne', + 'peggy' => 'sue', + 'foo' => 'bar', + 'sna' => 'fu' + ), + ), + ); + } + + /** + * Tests that query parameters are parsed correctly + * + * @dataProvider provider_query_parameter_parsing + * + * @param Request request + * @param array query + * @param array expected + * @return void + */ + public function test_query_parameter_parsing(Request $request, $query, $expected) + { + foreach ($query as $key => $value) + { + $request->query($key, $value); + } + + $this->assertSame($expected, $request->query()); + } + + /** + * Provides data for test_client + * + * @return array + */ + public function provider_client() + { + $internal_client = new Request_Client_Internal; + $external_client = new Request_Client_Stream; + + return array( + array( + new Request('http://kohanaframework.org'), + $internal_client, + $internal_client + ), + array( + new Request('foo/bar'), + $external_client, + $external_client + ) + ); + } + + /** + * Tests the getter/setter for request client + * + * @dataProvider provider_client + * + * @param Request $request + * @param Request_Client $client + * @param Request_Client $expected + * @return void + */ + public function test_client(Request $request, Request_Client $client, Request_Client $expected) + { + $request->client($client); + $this->assertSame($expected, $request->client()); + } + + /** + * Tests that the Request constructor passes client params on to the + * Request_Client once created. + */ + public function test_passes_client_params() + { + $request = Request::factory('http://example.com/', array( + 'follow' => TRUE, + 'strict_redirect' => FALSE + )); + + $client = $request->client(); + + $this->assertEquals($client->follow(), TRUE); + $this->assertEquals($client->strict_redirect(), FALSE); + } + + + +} // End Kohana_RequestTest + +class Controller_Kohana_RequestTest_Dummy extends Controller +{ + public function action_index() + { + + } +} // End Kohana_RequestTest diff --git a/~dev_rating/system/tests/kohana/ResponseTest.php b/~dev_rating/system/tests/kohana/ResponseTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d5e8870c1e17a877a6df6692af7be7c964f348b2 --- /dev/null +++ b/~dev_rating/system/tests/kohana/ResponseTest.php @@ -0,0 +1,208 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Unit tests for response class + * + * @group kohana + * @group kohana.core + * @group kohana.core.response + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ResponseTest extends Unittest_TestCase +{ + /** + * Provider for test_body + * + * @return array + */ + public function provider_body() + { + $view = $this->getMock('View'); + $view->expects($this->any()) + ->method('__toString') + ->will($this->returnValue('foo')); + + return array( + array('unit test', 'unit test'), + array($view, 'foo'), + ); + } + + /** + * Tests that we can set and read a body of a response + * + * @test + * @dataProvider provider_body + * + * @return null + */ + public function test_body($source, $expected) + { + $response = new Response; + $response->body($source); + $this->assertSame($response->body(), $expected); + + $response = (string) $response; + $this->assertSame($response, $expected); + } + + /** + * Provides data for test_body_string_zero() + * + * @return array + */ + public function provider_body_string_zero() + { + return array( + array('0', '0'), + array("0", '0'), + array(0, '0') + ); + } + + /** + * Test that Response::body() handles numerics correctly + * + * @test + * @dataProvider provider_body_string_zero + * @param string $string + * @param string $expected + * @return void + */ + public function test_body_string_zero($string, $expected) + { + $response = new Response; + $response->body($string); + + $this->assertSame($expected, $response->body()); + } + + /** + * provider for test_cookie_set() + * + * @return array + */ + public function provider_cookie_set() + { + return array( + array( + 'test1', + 'foo', + array( + 'test1' => array( + 'value' => 'foo', + 'expiration' => Cookie::$expiration + ), + ) + ), + array( + array( + 'test2' => 'stfu', + 'test3' => array( + 'value' => 'snafu', + 'expiration' => 123456789 + ) + ), + NULL, + array( + 'test2' => array( + 'value' => 'stfu', + 'expiration' => Cookie::$expiration + ), + 'test3' => array( + 'value' => 'snafu', + 'expiration' => 123456789 + ) + ) + ) + ); + } + + /** + * Tests the Response::cookie() method, ensures + * correct values are set, including defaults + * + * @test + * @dataProvider provider_cookie_set + * @param string $key + * @param string $value + * @param string $expected + * @return void + */ + public function test_cookie_set($key, $value, $expected) + { + // Setup the Response and apply cookie + $response = new Response; + $response->cookie($key, $value); + + foreach ($expected as $_key => $_value) + { + $cookie = $response->cookie($_key); + + $this->assertSame($_value['value'], $cookie['value']); + $this->assertSame($_value['expiration'], $cookie['expiration']); + } + } + + /** + * Tests the Response::cookie() get functionality + * + * @return void + */ + public function test_cookie_get() + { + $response = new Response; + + // Test for empty cookies + $this->assertSame(array(), $response->cookie()); + + // Test for no specific cookie + $this->assertNull($response->cookie('foobar')); + + $response->cookie('foo', 'bar'); + $cookie = $response->cookie('foo'); + + $this->assertSame('bar', $cookie['value']); + $this->assertSame(Cookie::$expiration, $cookie['expiration']); + } + + /** + * Tests that the headers are not sent by PHP in CLI mode + * + * @return void + */ + public function test_send_headers_cli() + { + if (headers_sent()) + { + $this->markTestSkipped('Cannot test this feature as headers have already been sent!'); + } + + $content_type = 'application/json'; + $response = new Response; + $response->headers('content-type', $content_type) + ->send_headers(); + + $this->assertFalse(headers_sent()); + + } + + /** + * Test the content type is sent when set + * + * @test + */ + public function test_content_type_when_set() + { + $content_type = 'application/json'; + $response = new Response; + $response->headers('content-type', $content_type); + $headers = $response->send_headers()->headers(); + $this->assertSame($content_type, (string) $headers['content-type']); + } +} \ No newline at end of file diff --git a/~dev_rating/system/tests/kohana/RouteTest.php b/~dev_rating/system/tests/kohana/RouteTest.php new file mode 100644 index 0000000000000000000000000000000000000000..dd7a3f9d90a094b91c2ba804dfd71ee12fb9f56c --- /dev/null +++ b/~dev_rating/system/tests/kohana/RouteTest.php @@ -0,0 +1,912 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Description of RouteTest + * + * @group kohana + * @group kohana.core + * @group kohana.core.route + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ + +include Kohana::find_file('tests', 'test_data/callback_routes'); + +class Kohana_RouteTest extends Unittest_TestCase +{ + /** + * Remove all caches + */ + // @codingStandardsIgnoreStart + public function setUp() + // @codingStandardsIgnoreEnd + { + parent::setUp(); + + $this->cleanCacheDir(); + } + + /** + * Removes cache files created during tests + */ + // @codingStandardsIgnoreStart + public function tearDown() + // @codingStandardsIgnoreEnd + { + parent::tearDown(); + + $this->cleanCacheDir(); + } + + /** + * If Route::get() is asked for a route that does not exist then + * it should throw a Kohana_Exception + * + * Note use of @expectedException + * + * @test + * @covers Route::get + * @expectedException Kohana_Exception + */ + public function test_get_throws_exception_if_route_dnx() + { + Route::get('HAHAHAHAHAHAHAHAHA'); + } + + /** + * Route::all() should return all routes defined via Route::set() + * and not through new Route() + * + * @test + * @covers Route::all + */ + public function test_all_returns_all_defined_routes() + { + $defined_routes = self::readAttribute('Route', '_routes'); + + $this->assertSame($defined_routes, Route::all()); + } + + /** + * Route::name() should fetch the name of a passed route + * If route is not found then it should return FALSE + * + * @TODO: This test needs to segregate the Route::$_routes singleton + * @test + * @covers Route::name + */ + public function test_name_returns_routes_name_or_false_if_dnx() + { + $route = Route::set('flamingo_people', 'flamingo/dance'); + + $this->assertSame('flamingo_people', Route::name($route)); + + $route = new Route('dance/dance'); + + $this->assertFalse(Route::name($route)); + } + + /** + * If Route::cache() was able to restore routes from the cache then + * it should return TRUE and load the cached routes + * + * @test + * @covers Route::cache + */ + public function test_cache_stores_route_objects() + { + $routes = Route::all(); + + // First we create the cache + Route::cache(TRUE); + + // Now lets modify the "current" routes + Route::set('nonsensical_route', 'flabbadaga/ding_dong'); + + // Then try and load said cache + $this->assertTrue(Route::cache()); + + // Check the route cache flag + $this->assertTrue(Route::$cache); + + // And if all went ok the nonsensical route should be gone... + $this->assertEquals($routes, Route::all()); + } + + /** + * Check appending cached routes. See http://dev.kohanaframework.org/issues/4347 + * + * @test + * @covers Route::cache + */ + public function test_cache_append_routes() + { + $cached = Route::all(); + + // First we create the cache + Route::cache(TRUE); + + // Now lets modify the "current" routes + Route::set('nonsensical_route', 'flabbadaga/ding_dong'); + + $modified = Route::all(); + + // Then try and load said cache + $this->assertTrue(Route::cache(NULL, TRUE)); + + // Check the route cache flag + $this->assertTrue(Route::$cache); + + // And if all went ok the nonsensical route should exist with the other routes... + $this->assertEquals(Route::all(), $cached + $modified); + } + + /** + * Route::cache() should return FALSE if cached routes could not be found + * + * The cache is cleared before and after each test in setUp tearDown + * by cleanCacheDir() + * + * @test + * @covers Route::cache + */ + public function test_cache_returns_false_if_cache_dnx() + { + $this->assertSame(FALSE, Route::cache(), 'Route cache was not empty'); + + // Check the route cache flag + $this->assertFalse(Route::$cache); + } + + /** + * If the constructor is passed a NULL uri then it should assume it's + * being loaded from the cache & therefore shouldn't override the cached attributes + * + * @test + * @covers Route::__construct + */ + public function test_constructor_returns_if_uri_is_null() + { + // We use a mock object to make sure that the route wasn't recompiled + $route = $this->getMock('Route', array('_compile'), array(), '', FALSE); + + $route + ->expects($this->never()) + ->method('_compile'); + + $route->__construct(NULL,NULL); + + $this->assertAttributeSame('', '_uri', $route); + $this->assertAttributeSame(array(), '_regex', $route); + $this->assertAttributeSame(array('action' => 'index', 'host' => FALSE), '_defaults', $route); + $this->assertAttributeSame(NULL, '_route_regex', $route); + } + + /** + * Provider for test_constructor_only_changes_custom_regex_if_passed + * + * @return array + */ + public function provider_constructor_only_changes_custom_regex_if_passed() + { + return array( + array('<controller>/<action>', '<controller>/<action>'), + ); + } + + /** + * The constructor should only use custom regex if passed a non-empty array + * + * Technically we can't "test" this as the default regex is an empty array, this + * is purely for improving test coverage + * + * @dataProvider provider_constructor_only_changes_custom_regex_if_passed + * + * @test + * @covers Route::__construct + */ + public function test_constructor_only_changes_custom_regex_if_passed($uri, $uri2) + { + $route = new Route($uri, array()); + + $this->assertAttributeSame(array(), '_regex', $route); + + $route = new Route($uri2, NULL); + + $this->assertAttributeSame(array(), '_regex', $route); + } + + /** + * When we pass custom regex to the route's constructor it should it + * in leu of the default. This does not apply to callback/lambda routes + * + * @test + * @covers Route::__construct + * @covers Route::compile + */ + public function test_route_uses_custom_regex_passed_to_constructor() + { + $regex = array('id' => '[0-9]{1,2}'); + + $route = new Route('<controller>(/<action>(/<id>))', $regex); + + $this->assertAttributeSame($regex, '_regex', $route); + $this->assertAttributeContains( + $regex['id'], + '_route_regex', + $route + ); + } + + /** + * Provider for test_matches_returns_false_on_failure + * + * @return array + */ + public function provider_matches_returns_false_on_failure() + { + return array( + array('projects/(<project_id>/(<controller>(/<action>(/<id>))))', 'apple/pie'), + ); + } + + /** + * Route::matches() should return false if the route doesn't match against a uri + * + * @dataProvider provider_matches_returns_false_on_failure + * + * @test + * @covers Route::matches + */ + public function test_matches_returns_false_on_failure($uri, $match) + { + $route = new Route($uri); + + // Mock a request class with the $match uri + $stub = $this->getMock('Request', array('uri'), array($match)); + $stub->expects($this->any()) + ->method('uri') + // Request::uri() called by Route::matches() will return $match + ->will($this->returnValue($match)); + + $this->assertSame(FALSE, $route->matches($stub)); + } + + /** + * Provider for test_matches_returns_array_of_parameters_on_successful_match + * + * @return array + */ + public function provider_matches_returns_array_of_parameters_on_successful_match() + { + return array( + array( + '(<controller>(/<action>(/<id>)))', + 'welcome/index', + 'Welcome', + 'index', + ), + ); + } + + /** + * Route::matches() should return an array of parameters when a match is made + * An parameters that are not matched should not be present in the array of matches + * + * @dataProvider provider_matches_returns_array_of_parameters_on_successful_match + * + * @test + * @covers Route::matches + */ + public function test_matches_returns_array_of_parameters_on_successful_match($uri, $m, $c, $a) + { + $route = new Route($uri); + + // Mock a request class with the $m uri + $request = $this->getMock('Request', array('uri'), array($m)); + $request->expects($this->any()) + ->method('uri') + // Request::uri() called by Route::matches() will return $m + ->will($this->returnValue($m)); + + $matches = $route->matches($request); + + $this->assertInternalType('array', $matches); + $this->assertArrayHasKey('controller', $matches); + $this->assertArrayHasKey('action', $matches); + $this->assertArrayNotHasKey('id', $matches); + // $this->assertSame(5, count($matches)); + $this->assertSame($c, $matches['controller']); + $this->assertSame($a, $matches['action']); + } + + /** + * Provider for test_matches_returns_array_of_parameters_on_successful_match + * + * @return array + */ + public function provider_defaults_are_used_if_params_arent_specified() + { + return array( + array( + '<controller>(/<action>(/<id>))', + NULL, + array('controller' => 'Welcome', 'action' => 'index'), + 'Welcome', + 'index', + 'unit/test/1', + array( + 'controller' => 'unit', + 'action' => 'test', + 'id' => '1' + ), + 'Welcome', + ), + array( + '(<controller>(/<action>(/<id>)))', + NULL, + array('controller' => 'welcome', 'action' => 'index'), + 'Welcome', + 'index', + 'unit/test/1', + array( + 'controller' => 'unit', + 'action' => 'test', + 'id' => '1' + ), + '', + ), + ); + } + + /** + * Defaults specified with defaults() should be used if their values aren't + * present in the uri + * + * @dataProvider provider_defaults_are_used_if_params_arent_specified + * + * @test + * @covers Route::matches + */ + public function test_defaults_are_used_if_params_arent_specified($uri, $regex, $defaults, $c, $a, $test_uri, $test_uri_array, $default_uri) + { + $route = new Route($uri, $regex); + $route->defaults($defaults); + + $this->assertSame($defaults, $route->defaults()); + + // Mock a request class + $request = $this->getMock('Request', array('uri'), array($default_uri)); + $request->expects($this->any()) + ->method('uri') + ->will($this->returnValue($default_uri)); + + $matches = $route->matches($request); + + $this->assertInternalType('array', $matches); + $this->assertArrayHasKey('controller', $matches); + $this->assertArrayHasKey('action', $matches); + $this->assertArrayNotHasKey('id', $matches); + // $this->assertSame(4, count($matches)); + $this->assertSame($c, $matches['controller']); + $this->assertSame($a, $matches['action']); + $this->assertSame($test_uri, $route->uri($test_uri_array)); + $this->assertSame($default_uri, $route->uri()); + } + + /** + * Provider for test_optional_groups_containing_specified_params + * + * @return array + */ + public function provider_optional_groups_containing_specified_params() + { + return array( + /** + * Specifying this should cause controller and action to show up + * refs #4113 + */ + array( + '(<controller>(/<action>(/<id>)))', + array('controller' => 'welcome', 'action' => 'index'), + array('id' => '1'), + 'welcome/index/1', + ), + array( + '<controller>(/<action>(/<id>))', + array('controller' => 'welcome', 'action' => 'index'), + array('action' => 'foo'), + 'welcome/foo', + ), + array( + '<controller>(/<action>(/<id>))', + array('controller' => 'welcome', 'action' => 'index'), + array('action' => 'index'), + 'welcome', + ), + /** + * refs #4630 + */ + array( + 'api(/<version>)/const(/<id>)(/<custom>)', + array('version' => 1), + NULL, + 'api/const', + ), + array( + 'api(/<version>)/const(/<id>)(/<custom>)', + array('version' => 1), + array('version' => 9), + 'api/9/const', + ), + array( + 'api(/<version>)/const(/<id>)(/<custom>)', + array('version' => 1), + array('id' => 2), + 'api/const/2', + ), + array( + 'api(/<version>)/const(/<id>)(/<custom>)', + array('version' => 1), + array('custom' => 'x'), + 'api/const/x', + ), + array( + '(<controller>(/<action>(/<id>)(/<type>)))', + array('controller' => 'test', 'action' => 'index', 'type' => 'html'), + array('type' => 'json'), + 'test/index/json', + ), + array( + '(<controller>(/<action>(/<id>)(/<type>)))', + array('controller' => 'test', 'action' => 'index', 'type' => 'html'), + array('id' => 123), + 'test/index/123', + ), + array( + '(<controller>(/<action>(/<id>)(/<type>)))', + array('controller' => 'test', 'action' => 'index', 'type' => 'html'), + array('id' => 123, 'type' => 'html'), + 'test/index/123', + ), + array( + '(<controller>(/<action>(/<id>)(/<type>)))', + array('controller' => 'test', 'action' => 'index', 'type' => 'html'), + array('id' => 123, 'type' => 'json'), + 'test/index/123/json', + ), + ); + } + + /** + * When an optional param is specified, the optional params leading up to it + * must be in the URI. + * + * @dataProvider provider_optional_groups_containing_specified_params + * + * @ticket 4113 + * @ticket 4630 + */ + public function test_optional_groups_containing_specified_params($uri, $defaults, $params, $expected) + { + $route = new Route($uri, NULL); + $route->defaults($defaults); + + $this->assertSame($expected, $route->uri($params)); + } + + /** + * Optional params should not be used if what is passed in is identical + * to the default. + * + * refs #4116 + * + * @test + * @covers Route::uri + */ + public function test_defaults_are_not_used_if_param_is_identical() + { + $route = new Route('(<controller>(/<action>(/<id>)))'); + $route->defaults(array( + 'controller' => 'welcome', + 'action' => 'index' + )); + + $this->assertSame('', $route->uri(array('controller' => 'welcome'))); + $this->assertSame('welcome2', $route->uri(array('controller' => 'welcome2'))); + } + + /** + * Provider for test_required_parameters_are_needed + * + * @return array + */ + public function provider_required_parameters_are_needed() + { + return array( + array( + 'admin(/<controller>(/<action>(/<id>)))', + 'admin', + 'admin/users/add', + ), + ); + } + + /** + * This tests that routes with required parameters will not match uris without them present + * + * @dataProvider provider_required_parameters_are_needed + * + * @test + * @covers Route::matches + */ + public function test_required_parameters_are_needed($uri, $matches_route1, $matches_route2) + { + $route = new Route($uri); + + // Mock a request class that will return empty uri + $request = $this->getMock('Request', array('uri'), array('')); + $request->expects($this->any()) + ->method('uri') + ->will($this->returnValue('')); + + $this->assertFalse($route->matches($request)); + + // Mock a request class that will return route1 + $request = $this->getMock('Request', array('uri'), array($matches_route1)); + $request->expects($this->any()) + ->method('uri') + ->will($this->returnValue($matches_route1)); + + $matches = $route->matches($request); + + $this->assertInternalType('array', $matches); + + // Mock a request class that will return route2 uri + $request = $this->getMock('Request', array('uri'), array($matches_route2)); + $request->expects($this->any()) + ->method('uri') + ->will($this->returnValue($matches_route2)); + + $matches = $route->matches($request); + + $this->assertInternalType('array', $matches); + // $this->assertSame(5, count($matches)); + $this->assertArrayHasKey('controller', $matches); + $this->assertArrayHasKey('action', $matches); + } + + /** + * Provider for test_required_parameters_are_needed + * + * @return array + */ + public function provider_reverse_routing_returns_routes_uri_if_route_is_static() + { + return array( + array( + 'info/about_us', + NULL, + 'info/about_us', + array('some' => 'random', 'params' => 'to confuse'), + ), + ); + } + + /** + * This tests the reverse routing returns the uri specified in the route + * if it's a static route + * + * A static route is a route without any parameters + * + * @dataProvider provider_reverse_routing_returns_routes_uri_if_route_is_static + * + * @test + * @covers Route::uri + */ + public function test_reverse_routing_returns_routes_uri_if_route_is_static($uri, $regex, $target_uri, $uri_params) + { + $route = new Route($uri, $regex); + + $this->assertSame($target_uri, $route->uri($uri_params)); + } + + /** + * Provider for test_uri_throws_exception_if_required_params_are_missing + * + * @return array + */ + public function provider_uri_throws_exception_if_required_params_are_missing() + { + return array( + array( + '<controller>(/<action)', + NULL, + array('action' => 'awesome-action'), + ), + /** + * Optional params are required when they lead to a specified param + * refs #4113 + */ + array( + '(<controller>(/<action>))', + NULL, + array('action' => 'awesome-action'), + ), + ); + } + + /** + * When Route::uri is working on a uri that requires certain parameters to be present + * (i.e. <controller> in '<controller(/<action)') then it should throw an exception + * if the param was not provided + * + * @dataProvider provider_uri_throws_exception_if_required_params_are_missing + * + * @test + * @covers Route::uri + */ + public function test_uri_throws_exception_if_required_params_are_missing($uri, $regex, $uri_array) + { + $route = new Route($uri, $regex); + + $this->setExpectedException('Kohana_Exception', 'controller'); + $route->uri($uri_array); + } + + /** + * Provider for test_uri_fills_required_uri_segments_from_params + * + * @return array + */ + public function provider_uri_fills_required_uri_segments_from_params() + { + return array( + array( + '<controller>/<action>(/<id>)', + NULL, + 'users/edit', + array( + 'controller' => 'users', + 'action' => 'edit', + ), + 'users/edit/god', + array( + 'controller' => 'users', + 'action' => 'edit', + 'id' => 'god', + ), + ), + ); + } + + /** + * The logic for replacing required segments is separate (but similar) to that for + * replacing optional segments. + * + * This test asserts that Route::uri will replace required segments with provided + * params + * + * @dataProvider provider_uri_fills_required_uri_segments_from_params + * + * @test + * @covers Route::uri + */ + public function test_uri_fills_required_uri_segments_from_params($uri, $regex, $uri_string1, $uri_array1, $uri_string2, $uri_array2) + { + $route = new Route($uri, $regex); + + $this->assertSame( + $uri_string1, + $route->uri($uri_array1) + ); + + $this->assertSame( + $uri_string2, + $route->uri($uri_array2) + ); + } + + /** + * Provides test data for test_composing_url_from_route() + * @return array + */ + public function provider_composing_url_from_route() + { + return array( + array('/'), + array('/news/view/42', array('controller' => 'news', 'action' => 'view', 'id' => 42)), + array('http://kohanaframework.org/news', array('controller' => 'news'), 'http') + ); + } + + /** + * Tests Route::url() + * + * Checks the url composing from specific route via Route::url() shortcut + * + * @test + * @dataProvider provider_composing_url_from_route + * @param string $expected + * @param array $params + * @param boolean $protocol + */ + public function test_composing_url_from_route($expected, $params = NULL, $protocol = NULL) + { + Route::set('foobar', '(<controller>(/<action>(/<id>)))') + ->defaults(array( + 'controller' => 'welcome', + ) + ); + + $this->setEnvironment(array( + '_SERVER' => array('HTTP_HOST' => 'kohanaframework.org'), + 'Kohana::$base_url' => '/', + 'Kohana::$index_file' => '', + )); + + $this->assertSame($expected, Route::url('foobar', $params, $protocol)); + } + + /** + * Tests Route::compile() + * + * Makes sure that compile will use custom regex if specified + * + * @test + * @covers Route::compile + */ + public function test_compile_uses_custom_regex_if_specificed() + { + $compiled = Route::compile( + '<controller>(/<action>(/<id>))', + array( + 'controller' => '[a-z]+', + 'id' => '\d+', + ) + ); + + $this->assertSame('#^(?P<controller>[a-z]+)(?:/(?P<action>[^/.,;?\n]++)(?:/(?P<id>\d+))?)?$#uD', $compiled); + } + + /** + * Tests Route::is_external(), ensuring the host can return + * whether internal or external host + */ + public function test_is_external_route_from_host() + { + // Setup local route + Route::set('internal', 'local/test/route') + ->defaults(array( + 'controller' => 'foo', + 'action' => 'bar' + ) + ); + + // Setup external route + Route::set('external', 'local/test/route') + ->defaults(array( + 'controller' => 'foo', + 'action' => 'bar', + 'host' => 'http://kohanaframework.org' + ) + ); + + // Test internal route + $this->assertFalse(Route::get('internal')->is_external()); + + // Test external route + $this->assertTrue(Route::get('external')->is_external()); + } + + /** + * Provider for test_external_route_includes_params_in_uri + * + * @return array + */ + public function provider_external_route_includes_params_in_uri() + { + return array( + array( + '<controller>/<action>', + array( + 'controller' => 'foo', + 'action' => 'bar', + 'host' => 'kohanaframework.org' + ), + 'http://kohanaframework.org/foo/bar' + ), + array( + '<controller>/<action>', + array( + 'controller' => 'foo', + 'action' => 'bar', + 'host' => 'http://kohanaframework.org' + ), + 'http://kohanaframework.org/foo/bar' + ), + array( + 'foo/bar', + array( + 'controller' => 'foo', + 'host' => 'http://kohanaframework.org' + ), + 'http://kohanaframework.org/foo/bar' + ), + ); + } + + /** + * Tests the external route include route parameters + * + * @dataProvider provider_external_route_includes_params_in_uri + */ + public function test_external_route_includes_params_in_uri($route, $defaults, $expected_uri) + { + Route::set('test', $route) + ->defaults($defaults); + + $this->assertSame($expected_uri, Route::get('test')->uri()); + } + + /** + * Provider for test_route_filter_modify_params + * + * @return array + */ + public function provider_route_filter_modify_params() + { + return array( + array( + '<controller>/<action>', + array( + 'controller' => 'Test', + 'action' => 'same', + ), + array('Route_Holder', 'route_filter_modify_params_array'), + 'test/different', + array( + 'controller' => 'Test', + 'action' => 'modified', + ), + ), + array( + '<controller>/<action>', + array( + 'controller' => 'test', + 'action' => 'same', + ), + array('Route_Holder', 'route_filter_modify_params_false'), + 'test/fail', + FALSE, + ), + ); + } + + /** + * Tests that route filters can modify parameters + * + * @covers Route::filter + * @dataProvider provider_route_filter_modify_params + */ + public function test_route_filter_modify_params($route, $defaults, $filter, $uri, $expected_params) + { + $route = new Route($route); + + // Mock a request class + $request = $this->getMock('Request', array('uri'), array($uri)); + $request->expects($this->any()) + ->method('uri') + ->will($this->returnValue($uri)); + + $params = $route->defaults($defaults)->filter($filter)->matches($request); + + $this->assertSame($expected_params, $params); + } + +} diff --git a/~dev_rating/system/tests/kohana/SecurityTest.php b/~dev_rating/system/tests/kohana/SecurityTest.php new file mode 100644 index 0000000000000000000000000000000000000000..4c3b368f5a160308a55321c503fc5e1ca4d4e4f9 --- /dev/null +++ b/~dev_rating/system/tests/kohana/SecurityTest.php @@ -0,0 +1,108 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana_Security + * + * @group kohana + * @group kohana.core + * @group kohana.core.security + * + * @package Kohana + * @category Tests + */ +class Kohana_SecurityTest extends Unittest_TestCase +{ + /** + * Provides test data for test_envode_php_tags() + * + * @return array Test data sets + */ + public function provider_encode_php_tags() + { + return array( + array("<?php echo 'helloo'; ?>", "<?php echo 'helloo'; ?>"), + ); + } + + /** + * Tests Security::encode_php_tags() + * + * @test + * @dataProvider provider_encode_php_tags + * @covers Security::encode_php_tags + */ + public function test_encode_php_tags($expected, $input) + { + $this->assertSame($expected, Security::encode_php_tags($input)); + } + + /** + * Provides test data for test_strip_image_tags() + * + * @return array Test data sets + */ + public function provider_strip_image_tags() + { + return array( + array('foo', '<img src="foo" />'), + ); + } + + /** + * Tests Security::strip_image_tags() + * + * @test + * @dataProvider provider_strip_image_tags + * @covers Security::strip_image_tags + */ + public function test_strip_image_tags($expected, $input) + { + $this->assertSame($expected, Security::strip_image_tags($input)); + } + + /** + * Provides test data for Security::token() + * + * @return array Test data sets + */ + public function provider_csrf_token() + { + // Unfortunately this data provider has to use the session in order to + // generate its data. If headers have already been sent then this method + // throws an error, even if the test is does not run. If we return an + // empty array then this also causes an error, so the only way to get + // around it is to return an array of misc data and have the test skip + // if headers have been sent. It's annoying this hack has to be + // implemented, but the security code isn't exactly brilliantly + // implemented. Ideally we'd be able to inject a session instance + if (headers_sent()) + return array(array('', '', 0)); + + $array = array(); + for ($i = 0; $i <= 4; $i++) + { + Security::$token_name = 'token_'.$i; + $array[] = array(Security::token(TRUE), Security::check(Security::token(FALSE)), $i); + } + return $array; + } + + /** + * Tests Security::token() + * + * @test + * @dataProvider provider_csrf_token + * @covers Security::token + */ + public function test_csrf_token($expected, $input, $iteration) + { + if (headers_sent()) { + $this->markTestSkipped('Headers have already been sent, session not available'); + } + + Security::$token_name = 'token_'.$iteration; + $this->assertSame(TRUE, $input); + $this->assertSame($expected, Security::token(FALSE)); + Session::instance()->delete(Security::$token_name); + } +} diff --git a/~dev_rating/system/tests/kohana/SessionTest.php b/~dev_rating/system/tests/kohana/SessionTest.php new file mode 100644 index 0000000000000000000000000000000000000000..1f34fa8079554ee8dc15be97a197139add477075 --- /dev/null +++ b/~dev_rating/system/tests/kohana/SessionTest.php @@ -0,0 +1,502 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the session class + * + * @group kohana + * @group kohana.core + * @group kohana.core.session + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_SessionTest extends Unittest_TestCase +{ + + /** + * Gets a mock of the session class + * + * @return Session + */ + // @codingStandardsIgnoreStart + public function getMockSession(array $config = array()) + // @codingStandardsIgnoreEnd + { + return $this->getMockForAbstractClass('Session', array($config)); + } + + /** + * Provides test data for + * + * test_constructor_uses_name_from_config_and_casts() + * + * @return array + */ + public function provider_constructor_uses_settings_from_config_and_casts() + { + return array( + // array(expected, input) + // data set 0 + array( + array( + 'name' => 'awesomeness', + 'lifetime' => 1231456421, + 'encrypted' => FALSE + ), + array( + 'name' => 'awesomeness', + 'lifetime' => '1231456421', + 'encrypted' => FALSE, + ), + ), + // data set 1 + array( + array( + 'name' => '123', + 'encrypted' => 'default', + ), + array( + 'name' => 123, + 'encrypted' => TRUE, + ), + ), + ); + } + + /** + * The constructor should change its attributes based on config + * passed as the first parameter + * + * @test + * @dataProvider provider_constructor_uses_settings_from_config_and_casts + * @covers Session::__construct + */ + public function test_constructor_uses_settings_from_config_and_casts($expected, $config) + { + $session = $this->getMockForAbstractClass('Session', array($config)); + + foreach ($expected as $var => $value) + { + $this->assertAttributeSame($value, '_'.$var, $session); + } + } + + /** + * Check that the constructor will load a session if it's provided + * witha session id + * + * @test + * @covers Session::__construct + * @covers Session::read + */ + public function test_constructor_loads_session_with_session_id() + { + $this->markTestIncomplete( + 'Need to work out why constructor is not being called' + ); + + $config = array(); + $session_id = 'lolums'; + + // Don't auto-call constructor, we need to setup the mock first + $session = $this->getMockForAbstractClass( + 'Session', + array(), + '', + FALSE + ); + + $session + ->expects($this->once()) + ->method('read') + ->with($session_id); + + $session->__construct($config, $session_id); + } + + /** + * Calling $session->bind() should allow you to bind a variable + * to a session variable + * + * @test + * @covers Session::bind + * @ticket 3164 + */ + public function test_bind_actually_binds_variable() + { + $session = $this->getMockForAbstractClass('Session'); + + $var = 'asd'; + + $session->bind('our_var', $var); + + $var = 'foobar'; + + $this->assertSame('foobar', $session->get('our_var')); + } + + + /** + * When a session is initially created it should have no data + * + * + * @test + * @covers Session::__construct + * @covers Session::set + */ + public function test_initially_session_has_no_data() + { + $session = $this->getMockSession(); + + $this->assertAttributeSame(array(), '_data', $session); + } + + /** + * Make sure that the default session name (the one used if the + * driver does not set one) is 'session' + * + * @test + * @covers Session::__construct + */ + public function test_default_session_name_is_set() + { + $session = $this->getMockSession(); + + $this->assertAttributeSame('session', '_name', $session); + } + + /** + * By default sessions are unencrypted + * + * @test + * @covers Session::__construct + */ + public function test_default_session_is_unencrypted() + { + $session = $this->getMockSession(); + + $this->assertAttributeSame(FALSE, '_encrypted', $session); + } + + /** + * A new session should not be classed as destroyed + * + * @test + * @covers Session::__construct + */ + public function test_default_session_is_not_classed_as_destroyed() + { + $session = $this->getMockSession(); + + $this->assertAttributeSame(FALSE, '_destroyed', $session); + } + + /** + * Provides test data for test_get_returns_default_if_var_dnx() + * + * @return array + */ + public function provider_get_returns_default_if_var_dnx() + { + return array( + array('something_crazy', FALSE), + array('a_true', TRUE), + array('an_int', 158163158), + ); + } + + /** + * Make sure that get() is using the default value we provide and + * isn't tampering with it + * + * @test + * @dataProvider provider_get_returns_default_if_var_dnx + * @covers Session::get + */ + public function test_get_returns_default_if_var_dnx($var, $default) + { + $session = $this->getMockSession(); + + $this->assertSame($default, $session->get($var, $default)); + } + + /** + * By default get() should be using null as the var DNX return value + * + * @test + * @covers Session::get + */ + public function test_get_uses_null_as_default_return_value() + { + $session = $this->getMockSession(); + + $this->assertSame(NULL, $session->get('level_of_cool')); + } + + /** + * This test makes sure that session is using array_key_exists + * as isset will return FALSE if the value is NULL + * + * @test + * @covers Session::get + */ + public function test_get_returns_value_if_it_equals_null() + { + $session = $this->getMockSession(); + + $session->set('arkward', NULL); + + $this->assertSame(NULL, $session->get('arkward', 'uh oh')); + } + + /** + * as_array() should return the session data by reference. + * + * i.e. if we modify the returned data, the session data also changes + * + * @test + * @covers Session::as_array + */ + public function test_as_array_returns_data_by_ref_or_copy() + { + $session = $this->getMockSession(); + + $data_ref =& $session->as_array(); + + $data_ref['something'] = 'pie'; + + $this->assertAttributeSame($data_ref, '_data', $session); + + $data_copy = $session->as_array(); + + $data_copy['pie'] = 'awesome'; + + $this->assertAttributeNotSame($data_copy, '_data', $session); + } + + /** + * set() should add new session data and modify existing ones + * + * Also makes sure that set() returns $this + * + * @test + * @covers Session::set + */ + public function test_set_adds_and_modifies_to_session_data() + { + $session = $this->getMockSession(); + + $this->assertSame($session, $session->set('pork', 'pie')); + + $this->assertAttributeSame( + array('pork' => 'pie'), + '_data', + $session + ); + + $session->set('pork', 'delicious'); + + $this->assertAttributeSame( + array('pork' => 'delicious'), + '_data', + $session + ); + } + + /** + * This tests that delete() removes specified session data + * + * @test + * @covers Session::delete + */ + public function test_delete_removes_select_session_data() + { + $session = $this->getMockSession(); + + // Bit of a hack for mass-loading session data + $data =& $session->as_array(); + + $data += array( + 'a' => 'A', + 'b' => 'B', + 'c' => 'C', + 'easy' => '123' + ); + + // Make a copy of $data for testing purposes + $copy = $data; + + // First we make sure we can delete one item + // Also, check that delete returns $this + $this->assertSame($session, $session->delete('a')); + + unset($copy['a']); + + // We could test against $data but then we'd be testing + // that as_array() is returning by ref + $this->assertAttributeSame($copy, '_data', $session); + + // Now we make sure we can delete multiple items + // We're checking $this is returned just in case + $this->assertSame($session, $session->delete('b', 'c')); + unset($copy['b'], $copy['c']); + + $this->assertAttributeSame($copy, '_data', $session); + } + + /** + * Provides test data for test_read_loads_session_data() + * + * @return array + */ + public function provider_read_loads_session_data() + { + return array( + // If driver returns array then just load it up + array( + array(), + 'wacka_wacka', + array() + ), + array( + array('the it' => 'crowd'), + 'the_it_crowd', + array('the it' => 'crowd'), + ), + // If it's a string an encrpytion is disabled (by default) base64decode and unserialize + array( + array('dead' => 'arrival'), + 'lolums', + 'YToxOntzOjQ6ImRlYWQiO3M6NzoiYXJyaXZhbCI7fQ==' + ), + ); + } + + /** + * This is one of the "big" tests for the session lib + * + * The test makes sure that + * + * 1. Session asks the driver for the data relating to $session_id + * 2. That it will load the returned data into the session + * + * @test + * @dataProvider provider_read_loads_session_data + * @covers Session::read + */ + public function test_read_loads_session_data($expected_data, $session_id, $driver_data, array $config = array()) + { + $session = $this->getMockSession($config); + + $session->expects($this->once()) + ->method('_read') + ->with($session_id) + ->will($this->returnValue($driver_data)); + + $session->read($session_id); + $this->assertAttributeSame($expected_data, '_data', $session); + } + + /** + * regenerate() should tell the driver to regenerate its id + * + * @test + * @covers Session::regenerate + */ + public function test_regenerate_tells_driver_to_regenerate() + { + $session = $this->getMockSession(); + + $new_session_id = 'asdnoawdnoainf'; + + $session->expects($this->once()) + ->method('_regenerate') + ->with() + ->will($this->returnValue($new_session_id)); + + $this->assertSame($new_session_id, $session->regenerate()); + } + + /** + * If the driver destroys the session then all session data should be + * removed + * + * @test + * @covers Session::destroy + */ + public function test_destroy_deletes_data_if_driver_destroys_session() + { + $session = $this->getMockSession(); + + $session + ->set('asd', 'dsa') + ->set('dog', 'god'); + + $session + ->expects($this->once()) + ->method('_destroy') + ->with() + ->will($this->returnValue(TRUE)); + + $this->assertTrue($session->destroy()); + + $this->assertAttributeSame(array(), '_data', $session); + } + + /** + * The session data should only be deleted if the driver reports + * that the session was destroyed ok + * + * @test + * @covers Session::destroy + */ + public function test_destroy_only_deletes_data_if_driver_destroys_session() + { + $session = $this->getMockSession(); + + $session + ->set('asd', 'dsa') + ->set('dog', 'god'); + + $session + ->expects($this->once()) + ->method('_destroy') + ->with() + ->will($this->returnValue(FALSE)); + + $this->assertFalse($session->destroy()); + $this->assertAttributeSame( + array('asd' => 'dsa', 'dog' => 'god'), + '_data', + $session + ); + } + + /** + * If a session variable exists then get_once should get it then remove it. + * If the variable does not exist then it should return the default + * + * @test + * @covers Session::get_once + */ + public function test_get_once_gets_once_or_returns_default() + { + $session = $this->getMockSession(); + + $session->set('foo', 'bar'); + + // Test that a default is returned + $this->assertSame('mud', $session->get_once('fud', 'mud')); + + // Now test that it actually removes the value + $this->assertSame('bar', $session->get_once('foo')); + + $this->assertAttributeSame(array(), '_data', $session); + + $this->assertSame('maybe', $session->get_once('foo', 'maybe')); + } +} diff --git a/~dev_rating/system/tests/kohana/TextTest.php b/~dev_rating/system/tests/kohana/TextTest.php new file mode 100644 index 0000000000000000000000000000000000000000..a59bd5939ba633bf07ddc59a8177c32834651cd9 --- /dev/null +++ b/~dev_rating/system/tests/kohana/TextTest.php @@ -0,0 +1,642 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the kohana text class (Kohana_Text) + * + * @group kohana + * @group kohana.core + * @group kohana.core.text + * + * @package Kohana + * @category Tests + */ +class Kohana_TextTest extends Unittest_TestCase +{ + + /** + * Sets up the test enviroment + */ + // @codingStandardsIgnoreStart + function setUp() + // @codingStandardsIgnoreEnd + { + parent::setUp(); + + Text::alternate(); + } + + /** + * This test makes sure that auto_p returns an empty string if + * an empty input was provided + * + * @test + * @covers Text::auto_p + */ + function test_auto_para_returns_empty_string_on_empty_input() + { + $this->assertSame('', Text::auto_p('')); + } + + /** + * + * @return array Test Data + */ + function provider_auto_para_does_not_enclose_html_tags_in_paragraphs() + { + return array( + array( + array('div'), + '<div>Pick a plum of peppers</div>', + ), + array( + array('div'), + '<div id="awesome">Tangas</div>', + ), + ); + } + + /** + * This test makes sure that auto_p doesn't enclose HTML tags + * in paragraphs + * + * @test + * @covers Text::auto_p + * @dataProvider provider_auto_para_does_not_enclose_html_tags_in_paragraphs + */ + function test_auto_para_does_not_enclose_html_tags_in_paragraphs(array $tags, $text) + { + $output = Text::auto_p($text); + + foreach ($tags as $tag) + { + $this->assertNotTag( + array('tag' => $tag, 'ancestor' => array('tag' => 'p')), + $output + ); + } + } + + /** + * This test makes sure that auto_p surrounds a single line of text + * with paragraph tags + * + * @test + * @covers Text::auto_p + */ + function test_auto_para_encloses_slot_in_paragraph() + { + $text = 'Pick a pinch of purple pepper'; + + $this->assertSame('<p>'.$text.'</p>', Text::auto_p($text)); + } + + /** + * Make sure that multiple new lines are replaced with paragraph tags + * + * @test + * @covers Text::auto_p + */ + public function test_auto_para_replaces_multiple_newlines_with_paragraph() + { + $this->assertSame( + "<p>My name is john</p>\n\n<p>I'm a developer</p>", + Text::auto_p("My name is john\n\n\n\nI'm a developer") + ); + } + + /** + * Data provider for test_limit_words + * + * @return array Array of test data + */ + function provider_limit_words() + { + return array + ( + array('', '', 100, NULL), + array('…', 'The rain in spain', -10, NULL), + array('The rain…', 'The rain in spain', 2, NULL), + array('The rain...', 'The rain in spain', 2, '...'), + ); + } + + /** + * + * @test + * @dataProvider provider_limit_words + */ + function test_limit_words($expected, $str, $limit, $end_char) + { + $this->assertSame($expected, Text::limit_words($str, $limit, $end_char)); + } + + /** + * Provides test data for test_limit_chars() + * + * @return array Test data + */ + function provider_limit_chars() + { + return array + ( + array('', '', 100, NULL, FALSE), + array('…', 'BOO!', -42, NULL, FALSE), + array('making php bet…', 'making php better for the sane', 14, NULL, FALSE), + array('GarГ§on! Un cafГ© s.v.p.', 'GarГ§on! Un cafГ© s.v.p.', 50, '__', FALSE), + array('GarГ§on!__', 'GarГ§on! Un cafГ© s.v.p.', 8, '__', FALSE), + // @issue 3238 + array('making php…', 'making php better for the sane', 14, NULL, TRUE), + array('GarГ§on!__', 'GarГ§on! Un cafГ© s.v.p.', 9, '__', TRUE), + array('GarГ§on!__', 'GarГ§on! Un cafГ© s.v.p.', 7, '__', TRUE), + array('__', 'GarГ§on! Un cafГ© s.v.p.', 5, '__', TRUE), + ); + } + + /** + * Tests Text::limit_chars() + * + * @test + * @dataProvider provider_limit_chars + */ + function test_limit_chars($expected, $str, $limit, $end_char, $preserve_words) + { + $this->assertSame($expected, Text::limit_chars($str, $limit, $end_char, $preserve_words)); + } + + /** + * Test Text::alternate() + * + * @test + */ + function test_alternate_alternates_between_parameters() + { + list($val_a, $val_b, $val_c) = array('good', 'bad', 'ugly'); + + $this->assertSame('good', Text::alternate($val_a, $val_b, $val_c)); + $this->assertSame('bad', Text::alternate($val_a, $val_b, $val_c)); + $this->assertSame('ugly', Text::alternate($val_a, $val_b, $val_c)); + + $this->assertSame('good', Text::alternate($val_a, $val_b, $val_c)); + } + + /** + * Tests Text::alternate() + * + * @test + * @covers Text::alternate + */ + function test_alternate_resets_when_called_with_no_params_and_returns_empty_string() + { + list($val_a, $val_b, $val_c) = array('yes', 'no', 'maybe'); + + $this->assertSame('yes', Text::alternate($val_a, $val_b, $val_c)); + + $this->assertSame('', Text::alternate()); + + $this->assertSame('yes', Text::alternate($val_a, $val_b, $val_c)); + } + + /** + * Provides test data for test_reducde_slashes() + * + * @returns array Array of test data + */ + function provider_reduce_slashes() + { + return array + ( + array('/', '//'), + array('/google/php/kohana/', '//google/php//kohana//'), + ); + } + + /** + * Covers Text::reduce_slashes() + * + * @test + * @dataProvider provider_reduce_slashes + */ + function test_reduce_slashes($expected, $str) + { + $this->assertSame($expected, Text::reduce_slashes($str)); + } + + /** + * Provides test data for test_censor() + * + * @return array Test data + */ + function provider_censor() + { + + return array + ( + // If the replacement is 1 character long it should be repeated for the length of the removed word + array("A donkey is also an ***", 'A donkey is also an ass', array('ass'), '*', TRUE), + array("Cake### isn't nearly as good as kohana###", "CakePHP isn't nearly as good as kohanaphp", array('php'), '#', TRUE), + // If it's > 1 then it's just replaced straight out + array("If you're born out of wedlock you're a --expletive--", "If you're born out of wedlock you're a child", array('child'), '--expletive--', TRUE), + + array('class', 'class', array('ass'), '*', FALSE), + ); + } + + /** + * Tests Text::censor + * + * @test + * @dataProvider provider_censor + */ + function test_censor($expected, $str, $badwords, $replacement, $replace_partial_words) + { + $this->assertSame($expected, Text::censor($str, $badwords, $replacement, $replace_partial_words)); + } + + /** + * Provides test data for test_random + * + * @return array Test Data + */ + function provider_random() + { + return array( + array('alnum', 8), + array('alpha', 10), + array('hexdec', 20), + array('nozero', 5), + array('numeric', 14), + array('distinct', 12), + array('aeiou', 4), + array('‹¡›«¿»', 8), // UTF8 characters + array(NULL, 8), // Issue #3256 + ); + } + + /** + * Tests Text::random() as well as possible + * + * Obviously you can't compare a randomly generated string against a + * pre-generated one and check that they are the same as this goes + * against the whole ethos of random. + * + * This test just makes sure that the value returned is of the correct + * values and length + * + * @test + * @dataProvider provider_random + */ + function test_random($type, $length) + { + if ($type === NULL) + { + $type = 'alnum'; + } + + $pool = (string) $type; + + switch ($pool) + { + case 'alnum': + $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'alpha': + $pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + break; + case 'hexdec': + $pool = '0123456789abcdef'; + break; + case 'numeric': + $pool = '0123456789'; + break; + case 'nozero': + $pool = '123456789'; + break; + case 'distinct': + $pool = '2345679ACDEFHJKLMNPRSTUVWXYZ'; + break; + } + + $this->assertRegExp('/^['.$pool.']{'.$length.'}$/u', Text::random($type, $length)); + } + + /** + * Provides test data for test_similar + * + * @return array + */ + function provider_similar() + { + return array + ( + // TODO: add some more cases + array('foo', array('foobar', 'food', 'fooberry')), + ); + } + + /** + * Tests Text::similar() + * + * @test + * @dataProvider provider_similar + * @covers Text::similar + */ + function test_similar($expected, $words) + { + $this->assertSame($expected, Text::similar($words)); + } + + /** + * Provides test data for test_bytes + * + * @return array + */ + public function provider_bytes() + { + return array + ( + // TODO: cover the other units + array('256.00 B', 256, NULL, NULL, TRUE), + array('1.02 kB', 1024, NULL, NULL, TRUE), + + // In case you need to know the size of a floppy disk in petabytes + array('0.00147 GB', 1.44 * 1000 * 1024, 'GB', '%01.5f %s', TRUE), + + // SI is the standard, but lets deviate slightly + array('1.00 MiB', 1024 * 1024, 'MiB', NULL, FALSE), + ); + } + + /** + * Tests Text::bytes() + * + * @test + * @dataProvider provider_bytes + */ + function test_bytes($expected, $bytes, $force_unit, $format, $si) + { + $this->assertSame($expected, Text::bytes($bytes, $force_unit, $format, $si)); + } + + /** + * Provides test data for test_widont() + * + * @return array Test data + */ + function provider_widont() + { + return array + ( + array('No gain, no pain', 'No gain, no pain'), + array("spaces?what'rethey?", "spaces?what'rethey?"), + array('', ''), + ); + } + + /** + * Tests Text::widont() + * + * @test + * @dataProvider provider_widont + */ + function test_widont($expected, $string) + { + $this->assertSame($expected, Text::widont($string)); + } + + + /** + * This checks that auto_link_emails() respects word boundaries and does not + * just blindly replace all occurences of the email address in the text. + * + * In the sample below the algorithm was replacing all occurences of voorzitter@xxxx.com + * inc the copy in the second list item. + * + * It was updated in 6c199366efc1115545ba13108b876acc66c54b2d to respect word boundaries + * + * @test + * @covers Text::auto_link_emails + * @ticket 2772 + */ + function test_auto_link_emails_respects_word_boundaries() + { + $original = '<ul> + <li>voorzitter@xxxx.com</li> + <li>vicevoorzitter@xxxx.com</li> + </ul>'; + + $this->assertFalse(strpos('vice', Text::auto_link_emails($original))); + } + + + /** + * Provides some test data for test_number() + * + * @return array + */ + public function provider_number() + { + return array( + array('one', 1), + array('twenty-three', 23), + array('fourty-two', 42), + array('five million, six hundred and thirty-two', 5000632), + array('five million, six hundred and thirty', 5000630), + array('nine hundred million', 900000000), + array('thirty-seven thousand', 37000), + array('one thousand and twenty-four', 1024), + ); + } + + /** + * Checks that Text::number formats a number into english text + * + * @test + * @dataProvider provider_number + */ + public function test_number($expected, $number) + { + $this->assertSame($expected, Text::number($number)); + } + + /** + * Provides test data for test_auto_link_urls() + * + * @return array + */ + public function provider_auto_link_urls() + { + return array( + // First we try with the really obvious url + array( + 'Some random text <a href="http://www.google.com">http://www.google.com</a>', + 'Some random text http://www.google.com', + ), + // Then we try with varying urls + array( + 'Some random <a href="http://www.google.com">www.google.com</a>', + 'Some random www.google.com', + ), + array( + 'Some random google.com', + 'Some random google.com', + ), + // Check that it doesn't link urls in a href + array( + 'Look at me <a href="http://google.com">Awesome stuff</a>', + 'Look at me <a href="http://google.com">Awesome stuff</a>', + ), + array( + 'Look at me <a href="http://www.google.com">http://www.google.com</a>', + 'Look at me <a href="http://www.google.com">http://www.google.com</a>', + ), + // Punctuation at the end of the URL + array( + 'Wow <a href="http://www.google.com">http://www.google.com</a>!', + 'Wow http://www.google.com!', + ), + array( + 'Zomg <a href="http://www.google.com">www.google.com</a>!', + 'Zomg www.google.com!', + ), + array( + 'Well this, <a href="http://www.google.com">www.google.com</a>, is cool', + 'Well this, www.google.com, is cool', + ), + // @issue 3190 + array( + '<a href="http://www.google.com/">www.google.com</a>', + '<a href="http://www.google.com/">www.google.com</a>', + ), + array( + '<a href="http://www.google.com/">www.google.com</a> <a href="http://www.google.com/">http://www.google.com/</a>', + '<a href="http://www.google.com/">www.google.com</a> http://www.google.com/', + ), + // @issue 3436 + array( + '<strong><a href="http://www.google.com/">http://www.google.com/</a></strong>', + '<strong>http://www.google.com/</strong>', + ), + // @issue 4208, URLs with a path + array( + 'Foobar <a href="http://www.google.com/analytics">www.google.com/analytics</a> cake', + 'Foobar www.google.com/analytics cake', + ), + array( + 'Look at this <a href="http://www.google.com/analytics">www.google.com/analytics</a>!', + 'Look at this www.google.com/analytics!', + ), + array( + 'Path <a href="http://www.google.com/analytics">http://www.google.com/analytics</a> works?', + 'Path http://www.google.com/analytics works?', + ), + array( + 'Path <a href="http://www.google.com/analytics">http://www.google.com/analytics</a>', + 'Path http://www.google.com/analytics', + ), + array( + 'Path <a href="http://www.google.com/analytics">www.google.com/analytics</a>', + 'Path www.google.com/analytics', + ), + ); + } + + /** + * Runs tests for Test::auto_link_urls + * + * @test + * @dataProvider provider_auto_link_urls + */ + public function test_auto_link_urls($expected, $text) + { + $this->assertSame($expected, Text::auto_link_urls($text)); + } + + /** + * Provides test data for test_auto_link_emails() + * + * @return array + */ + public function provider_auto_link_emails() + { + return array( + // @issue 3162 + array( + '<span class="broken"><a href="mailto:info@test.com">info@test.com</a></span>', + '<span class="broken">info@test.com</span>', + ), + array( + '<a href="mailto:info@test.com">info@test.com</a>', + '<a href="mailto:info@test.com">info@test.com</a>', + ), + // @issue 3189 + array( + '<a href="mailto:email@address.com">email@address.com</a> <a href="mailto:email@address.com">email@address.com</a>', + '<a href="mailto:email@address.com">email@address.com</a> email@address.com', + ), + ); + } + + /** + * Runs tests for Test::auto_link_emails + * + * @test + * @dataProvider provider_auto_link_emails + */ + public function test_auto_link_emails($expected, $text) + { + // Use html_entity_decode because emails will be randomly encoded by HTML::mailto + $this->assertSame($expected, html_entity_decode(Text::auto_link_emails($text))); + } + + /** + * Provides test data for test_auto_link + * + * @return array Test data + */ + public function provider_auto_link() + { + return array( + array( + 'Hi there, my site is kohanaframework.org and you can email me at nobody@kohanaframework.org', + array('kohanaframework.org'), + ), + + array( + 'Hi my.domain.com@domain.com you came from', + FALSE, + array('my.domain.com@domain.com'), + ), + ); + } + + /** + * Tests Text::auto_link() + * + * @test + * @dataProvider provider_auto_link + */ + public function test_auto_link($text, $urls = array(), $emails = array()) + { + $linked_text = Text::auto_link($text); + + if ($urls === FALSE) + { + $this->assertNotContains('http://', $linked_text); + } + elseif (count($urls)) + { + foreach ($urls as $url) + { + // Assert that all the urls have been caught by text auto_link_urls() + $this->assertContains(Text::auto_link_urls($url), $linked_text); + } + } + + foreach ($emails as $email) + { + $this->assertContains('mailto:'.$email, $linked_text); + } + + } + +} diff --git a/~dev_rating/system/tests/kohana/URLTest.php b/~dev_rating/system/tests/kohana/URLTest.php new file mode 100644 index 0000000000000000000000000000000000000000..ed5d9f1686e4f4af8f8abdc4d44fa9125724e97a --- /dev/null +++ b/~dev_rating/system/tests/kohana/URLTest.php @@ -0,0 +1,279 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests URL + * + * @group kohana + * @group kohana.core + * @group kohana.core.url + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_URLTest extends Unittest_TestCase +{ + /** + * Default values for the environment, see setEnvironment + * @var array + */ + // @codingStandardsIgnoreStart + protected $environmentDefault = array( + 'Kohana::$base_url' => '/kohana/', + 'Kohana::$index_file'=> 'index.php', + 'HTTP_HOST' => 'example.com', + '_GET' => array(), + ); + // @codingStandardsIgnoreEnd + + /** + * Provides test data for test_base() + * + * @return array + */ + public function provider_base() + { + return array( + // $protocol, $index, $expected, $enviroment + + // Test with different combinations of parameters for max code coverage + array(NULL, FALSE, '/kohana/'), + array('http', FALSE, 'http://example.com/kohana/'), + array(NULL, TRUE, '/kohana/index.php/'), + array(NULL, TRUE, '/kohana/index.php/'), + array('http', TRUE, 'http://example.com/kohana/index.php/'), + array('https', TRUE, 'https://example.com/kohana/index.php/'), + array('ftp', TRUE, 'ftp://example.com/kohana/index.php/'), + + // Test for automatic protocol detection, protocol = TRUE + array(TRUE, TRUE, 'cli://example.com/kohana/index.php/', array('HTTPS' => FALSE, 'Request::$initial' => Request::factory('/')->protocol('cli'))), + + // Change base url' + array('https', FALSE, 'https://example.com/kohana/', array('Kohana::$base_url' => 'omglol://example.com/kohana/')), + + // Use port in base url, issue #3307 + array('http', FALSE, 'http://example.com:8080/', array('Kohana::$base_url' => 'example.com:8080/')), + + // Use protocol from base url if none specified + array(NULL, FALSE, 'http://www.example.com/', array('Kohana::$base_url' => 'http://www.example.com/')), + + // Use HTTP_HOST before SERVER_NAME + array('http', FALSE, 'http://example.com/kohana/', array('HTTP_HOST' => 'example.com', 'SERVER_NAME' => 'example.org')), + + // Use SERVER_NAME if HTTP_HOST DNX + array('http', FALSE, 'http://example.org/kohana/', array('HTTP_HOST' => NULL, 'SERVER_NAME' => 'example.org')), + ); + } + + /** + * Tests URL::base() + * + * @test + * @dataProvider provider_base + * @param boolean $protocol Parameter for Url::base() + * @param boolean $index Parameter for Url::base() + * @param string $expected Expected url + * @param array $enviroment Array of enviroment vars to change @see Kohana_URLTest::setEnvironment() + */ + public function test_base($protocol, $index, $expected, array $enviroment = array()) + { + $this->setEnvironment($enviroment); + + $this->assertSame( + $expected, + URL::base($protocol, $index) + ); + } + + /** + * Provides test data for test_site() + * + * @return array + */ + public function provider_site() + { + return array( + array('', NULL, '/kohana/index.php/'), + array('', 'http', 'http://example.com/kohana/index.php/'), + + array('my/site', NULL, '/kohana/index.php/my/site'), + array('my/site', 'http', 'http://example.com/kohana/index.php/my/site'), + + // @ticket #3110 + array('my/site/page:5', NULL, '/kohana/index.php/my/site/page:5'), + array('my/site/page:5', 'http', 'http://example.com/kohana/index.php/my/site/page:5'), + + array('my/site?var=asd&kohana=awesome', NULL, '/kohana/index.php/my/site?var=asd&kohana=awesome'), + array('my/site?var=asd&kohana=awesome', 'http', 'http://example.com/kohana/index.php/my/site?var=asd&kohana=awesome'), + + array('?kohana=awesome&life=good', NULL, '/kohana/index.php/?kohana=awesome&life=good'), + array('?kohana=awesome&life=good', 'http', 'http://example.com/kohana/index.php/?kohana=awesome&life=good'), + + array('?kohana=awesome&life=good#fact', NULL, '/kohana/index.php/?kohana=awesome&life=good#fact'), + array('?kohana=awesome&life=good#fact', 'http', 'http://example.com/kohana/index.php/?kohana=awesome&life=good#fact'), + + array('some/long/route/goes/here?kohana=awesome&life=good#fact', NULL, '/kohana/index.php/some/long/route/goes/here?kohana=awesome&life=good#fact'), + array('some/long/route/goes/here?kohana=awesome&life=good#fact', 'http', 'http://example.com/kohana/index.php/some/long/route/goes/here?kohana=awesome&life=good#fact'), + + array('/route/goes/here?kohana=awesome&life=good#fact', 'https', 'https://example.com/kohana/index.php/route/goes/here?kohana=awesome&life=good#fact'), + array('/route/goes/here?kohana=awesome&life=good#fact', 'ftp', 'ftp://example.com/kohana/index.php/route/goes/here?kohana=awesome&life=good#fact'), + ); + } + + /** + * Tests URL::site() + * + * @test + * @dataProvider provider_site + * @param string $uri URI to use + * @param boolean|string $protocol Protocol to use + * @param string $expected Expected result + * @param array $enviroment Array of enviroment vars to set + */ + public function test_site($uri, $protocol, $expected, array $enviroment = array()) + { + $this->setEnvironment($enviroment); + + $this->assertSame( + $expected, + URL::site($uri, $protocol) + ); + } + + /** + * Provides test data for test_site_url_encode_uri() + * See issue #2680 + * + * @return array + */ + public function provider_site_url_encode_uri() + { + $provider = array( + array('test', 'encode'), + array('test', 'éñçø∂ë∂'), + array('†é߆', 'encode'), + array('†é߆', 'éñçø∂ë∂', 'µåñ¥'), + ); + + foreach ($provider as $i => $params) + { + // Every non-ASCII character except for forward slash should be encoded... + $expected = implode('/', array_map('rawurlencode', $params)); + + // ... from a URI that is not encoded + $uri = implode('/', $params); + + $provider[$i] = array("/kohana/index.php/{$expected}", $uri); + } + + return $provider; + } + + /** + * Tests URL::site for proper URL encoding when working with non-ASCII characters. + * + * @test + * @dataProvider provider_site_url_encode_uri + */ + public function test_site_url_encode_uri($expected, $uri) + { + $this->assertSame($expected, URL::site($uri, FALSE)); + } + + /** + * Provides test data for test_title() + * @return array + */ + public function provider_title() + { + return array( + // Tests that.. + // Title is converted to lowercase + array('we-shall-not-be-moved', 'WE SHALL NOT BE MOVED', '-'), + // Excessive white space is removed and replaced with 1 char + array('thissssss-is-it', 'THISSSSSS IS IT ', '-'), + // separator is either - (dash) or _ (underscore) & others are converted to underscores + array('some-title', 'some title', '-'), + array('some_title', 'some title', '_'), + array('some!title', 'some title', '!'), + array('some:title', 'some title', ':'), + // Numbers are preserved + array('99-ways-to-beat-apple', '99 Ways to beat apple', '-'), + // ... with lots of spaces & caps + array('99_ways_to_beat_apple', '99 ways TO beat APPLE', '_'), + array('99-ways-to-beat-apple', '99 ways TO beat APPLE', '-'), + // Invalid characters are removed + array('each-gbp-is-now-worth-32-usd', 'Each GBP(ВЈ) is now worth 32 USD($)', '-'), + // ... inc. separator + array('is-it-reusable-or-re-usable', 'Is it reusable or re-usable?', '-'), + // Doing some crazy UTF8 tests + array('espana-wins', 'EspaГ±a-wins', '-', TRUE), + ); + } + + /** + * Tests URL::title() + * + * @test + * @dataProvider provider_title + * @param string $title Input to convert + * @param string $separator Seperate to replace invalid characters with + * @param string $expected Expected result + */ + public function test_title($expected, $title, $separator, $ascii_only = FALSE) + { + $this->assertSame( + $expected, + URL::title($title, $separator, $ascii_only) + ); + } + + /** + * Provides test data for URL::query() + * @return array + */ + public function provider_query() + { + return array( + array(array(), '', NULL), + array(array('_GET' => array('test' => 'data')), '?test=data', NULL), + array(array(), '?test=data', array('test' => 'data')), + array(array('_GET' => array('more' => 'data')), '?more=data&test=data', array('test' => 'data')), + array(array('_GET' => array('sort' => 'down')), '?test=data', array('test' => 'data'), FALSE), + + // http://dev.kohanaframework.org/issues/3362 + array(array(), '', array('key' => NULL)), + array(array(), '?key=0', array('key' => FALSE)), + array(array(), '?key=1', array('key' => TRUE)), + array(array('_GET' => array('sort' => 'down')), '?sort=down&key=1', array('key' => TRUE)), + array(array('_GET' => array('sort' => 'down')), '?sort=down&key=0', array('key' => FALSE)), + + // @issue 4240 + array(array('_GET' => array('foo' => array('a' => 100))), '?foo%5Ba%5D=100&foo%5Bb%5D=bar', array('foo' => array('b' => 'bar'))), + array(array('_GET' => array('a' => 'a')), '?a=b', array('a' => 'b')), + ); + } + + /** + * Tests URL::query() + * + * @test + * @dataProvider provider_query + * @param array $enviroment Set environment + * @param string $expected Expected result + * @param array $params Query string + * @param boolean $use_get Combine with GET parameters + */ + public function test_query($enviroment, $expected, $params, $use_get = TRUE) + { + $this->setEnvironment($enviroment); + + $this->assertSame( + $expected, + URL::query($params, $use_get) + ); + } +} diff --git a/~dev_rating/system/tests/kohana/UTF8Test.php b/~dev_rating/system/tests/kohana/UTF8Test.php new file mode 100644 index 0000000000000000000000000000000000000000..fec2d518a9a5cc6b69a7f230ef4a9631af8d6d4e --- /dev/null +++ b/~dev_rating/system/tests/kohana/UTF8Test.php @@ -0,0 +1,631 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); +/** + * Tests Kohana_UTF8 class + * + * @group kohana + * @group kohana.core + * @group kohana.core.utf8 + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_UTF8Test extends Unittest_TestCase +{ + + /** + * Provides test data for test_clean() + */ + public function provider_clean() + { + return array( + array("\0", ''), + array("в†’foo\021", 'в†’foo'), + array("\x7Fbar", 'bar'), + array("\xFF", ''), + array("\x41", 'A'), + array(array("в†’foo\021", "\x41"), array('в†’foo', 'A')), + ); + } + + /** + * Tests UTF8::clean + * + * @test + * @dataProvider provider_clean + */ + public function test_clean($input, $expected) + { + $this->assertSame($expected, UTF8::clean($input)); + } + + /** + * Provides test data for test_is_ascii() + */ + public function provider_is_ascii() + { + return array( + array("\0", TRUE), + array("\$eno\r", TRUE), + array('SeГ±or', FALSE), + array(array('Se', 'nor'), TRUE), + array(array('Se', 'Г±or'), FALSE), + ); + } + + /** + * Tests UTF8::is_ascii + * + * @test + * @dataProvider provider_is_ascii + */ + public function test_is_ascii($input, $expected) + { + $this->assertSame($expected, UTF8::is_ascii($input)); + } + + /** + * Provides test data for test_strip_ascii_ctrl() + */ + public function provider_strip_ascii_ctrl() + { + return array( + array("\0", ''), + array("в†’foo\021", 'в†’foo'), + array("\x7Fbar", 'bar'), + array("\xFF", "\xFF"), + array("\x41", 'A'), + ); + } + + /** + * Tests UTF8::strip_ascii_ctrl + * + * @test + * @dataProvider provider_strip_ascii_ctrl + */ + public function test_strip_ascii_ctrl($input, $expected) + { + $this->assertSame($expected, UTF8::strip_ascii_ctrl($input)); + } + + /** + * Provides test data for test_strip_non_ascii() + */ + public function provider_strip_non_ascii() + { + return array( + array("\0\021\x7F", "\0\021\x7F"), + array('I ♥ cocoГ±Г№С‚', 'I coco'), + ); + } + + /** + * Tests UTF8::strip_non_ascii + * + * @test + * @dataProvider provider_strip_non_ascii + */ + public function test_strip_non_ascii($input, $expected) + { + $this->assertSame($expected, UTF8::strip_non_ascii($input)); + } + + /** + * Provides test data for test_transliterate_to_ascii() + */ + public function provider_transliterate_to_ascii() + { + return array( + array('CocoГ±Г№С‚', -1, 'CoconuС‚'), + array('COCOÑÙТ', -1, 'COCOÑÙТ'), + array('CocoГ±Г№С‚', 0, 'CoconuС‚'), + array('COCOÑÙТ', 0, 'COCONUРў'), + array('CocoГ±Г№С‚', 1, 'CocoГ±Г№С‚'), + array('COCOÑÙТ', 1, 'COCONUРў'), + ); + } + + /** + * Tests UTF8::transliterate_to_ascii + * + * @test + * @dataProvider provider_transliterate_to_ascii + */ + public function test_transliterate_to_ascii($input, $case, $expected) + { + $this->assertSame($expected, UTF8::transliterate_to_ascii($input, $case)); + } + + /** + * Provides test data for test_strlen() + */ + public function provider_strlen() + { + return array( + array('CocoГ±Г№С‚', 7), + array('Coconut', 7), + ); + } + + /** + * Tests UTF8::strlen + * + * @test + * @dataProvider provider_strlen + */ + public function test_strlen($input, $expected) + { + $this->assertSame($expected, UTF8::strlen($input)); + } + + /** + * Provides test data for test_strpos() + */ + public function provider_strpos() + { + return array( + array('CocoГ±Г№С‚', 'o', 0, 1), + array('CocoГ±Г№С‚', 'Г±', 1, 4), + ); + } + + /** + * Tests UTF8::strpos + * + * @test + * @dataProvider provider_strpos + */ + public function test_strpos($input, $str, $offset, $expected) + { + $this->assertSame($expected, UTF8::strpos($input, $str, $offset)); + } + + /** + * Provides test data for test_strrpos() + */ + public function provider_strrpos() + { + return array( + array('CocoГ±Г№С‚', 'o', 0, 3), + array('CocoГ±Г№С‚', 'Г±', 2, 4), + ); + } + + /** + * Tests UTF8::strrpos + * + * @test + * @dataProvider provider_strrpos + */ + public function test_strrpos($input, $str, $offset, $expected) + { + $this->assertSame($expected, UTF8::strrpos($input, $str, $offset)); + } + + /** + * Provides test data for test_substr() + */ + public function provider_substr() + { + return array( + array('CocoГ±Г№С‚', 3, 2, 'oГ±'), + array('CocoГ±Г№С‚', 3, 9, 'oГ±Г№С‚'), + array('CocoГ±Г№С‚', 3, NULL, 'oГ±Г№С‚'), + array('CocoГ±Г№С‚', 3, -2, 'oГ±'), + ); + } + + /** + * Tests UTF8::substr + * + * @test + * @dataProvider provider_substr + */ + public function test_substr($input, $offset, $length, $expected) + { + $this->assertSame($expected, UTF8::substr($input, $offset, $length)); + } + + /** + * Provides test data for test_substr_replace() + */ + public function provider_substr_replace() + { + return array( + array('CocoГ±Г№С‚', 'ЕЎЕЎ', 3, 2, 'CocЕЎЕЎГ№С‚'), + array('CocoГ±Г№С‚', 'ЕЎЕЎ', 3, 9, 'CocЕЎЕЎ'), + ); + } + + /** + * Tests UTF8::substr_replace + * + * @test + * @dataProvider provider_substr_replace + */ + public function test_substr_replace($input, $replacement, $offset, $length, $expected) + { + $this->assertSame($expected, UTF8::substr_replace($input, $replacement, $offset, $length)); + } + + /** + * Provides test data for test_strtolower() + */ + public function provider_strtolower() + { + return array( + array('COCOÑÙТ', 'cocoГ±Г№С‚'), + array('JГ„GER', 'jГ¤ger'), + ); + } + + /** + * Tests UTF8::strtolower + * + * @test + * @dataProvider provider_strtolower + */ + public function test_strtolower($input, $expected) + { + $this->assertSame($expected, UTF8::strtolower($input)); + } + + /** + * Provides test data for test_strtoupper() + */ + public function provider_strtoupper() + { + return array( + array('CocoГ±Г№С‚', 'COCOÑÙТ'), + array('jГ¤ger', 'JГ„GER'), + ); + } + + /** + * Tests UTF8::strtoupper + * + * @test + * @dataProvider provider_strtoupper + */ + public function test_strtoupper($input, $expected) + { + $this->assertSame($expected, UTF8::strtoupper($input)); + } + + /** + * Provides test data for test_ucfirst() + */ + public function provider_ucfirst() + { + return array( + array('Г±Г№С‚', 'Ñùт'), + ); + } + + /** + * Tests UTF8::ucfirst + * + * @test + * @dataProvider provider_ucfirst + */ + public function test_ucfirst($input, $expected) + { + $this->assertSame($expected, UTF8::ucfirst($input)); + } + + /** + * Provides test data for test_strip_non_ascii() + */ + public function provider_ucwords() + { + return array( + array('ExAmple', 'ExAmple'), + array('i ♥ CocoГ±Г№С‚', 'I ♥ CocoГ±Г№С‚'), + ); + } + + /** + * Tests UTF8::ucwords + * + * @test + * @dataProvider provider_ucwords + */ + public function test_ucwords($input, $expected) + { + $this->assertSame($expected, UTF8::ucwords($input)); + } + + /** + * Provides test data for test_strcasecmp() + */ + public function provider_strcasecmp() + { + return array( + array('CocoГ±Г№С‚', 'CocoГ±Г№С‚', 0), + array('ДЊau', 'ДЊauo', -1), + array('ДЊau', 'ДЊa', 1), + array('CocoГ±Г№С‚', 'CocoГ±', 4), + array('CocoГ±Г№С‚', 'Coco', 6), + ); + } + + /** + * Tests UTF8::strcasecmp + * + * @test + * @dataProvider provider_strcasecmp + */ + public function test_strcasecmp($input, $input2, $expected) + { + $this->assertSame($expected, UTF8::strcasecmp($input, $input2)); + } + + /** + * Provides test data for test_str_ireplace() + */ + public function provider_str_ireplace() + { + return array( + array('С‚', 't', 'cocoГ±uС‚', 'cocoГ±ut'), + array('Г‘', 'N', 'cocoГ±uС‚', 'cocoNuС‚'), + array(array('С‚', 'Г‘', 'k' => 'k'), array('t', 'N', 'K'), array('cocoГ±uС‚'), array('cocoNut')), + array(array('Г±'), 'n', 'cocoГ±uС‚', 'coconuС‚'), + ); + } + + /** + * Tests UTF8::str_ireplace + * + * @test + * @dataProvider provider_str_ireplace + */ + public function test_str_ireplace($search, $replace, $subject, $expected) + { + $this->assertSame($expected, UTF8::str_ireplace($search, $replace, $subject)); + } + + /** + * Provides test data for test_stristr() + */ + public function provider_stristr() + { + return array( + array('CocoГ±Г№С‚', 'oГ±', 'oГ±Г№С‚'), + array('CocoГ±Г№С‚', 'o', 'ocoГ±Г№С‚'), + array('CocoГ±Г№С‚', 'k', FALSE), + ); + } + + /** + * Tests UTF8::stristr + * + * @test + * @dataProvider provider_stristr + */ + public function test_stristr($input, $input2, $expected) + { + $this->assertSame($expected, UTF8::stristr($input, $input2)); + } + + /** + * Provides test data for test_strspn() + */ + public function provider_strspn() + { + return array( + array("foo", "o", 1, 2, 2), + array('CocoГ±Г№С‚', 'oГ±', NULL, NULL, 1), + array('CocoГ±Г№С‚', 'oГ±', 2, 4, 1), + array('CocoГ±Г№С‚', 'ЕЎЕЎ', 3, 9, 4), + ); + } + + /** + * Tests UTF8::strspn + * + * @test + * @dataProvider provider_strspn + */ + public function test_strspn($input, $mask, $offset, $length, $expected) + { + $this->assertSame($expected, UTF8::strspn($input, $mask, $offset, $length)); + } + + /** + * Provides test data for test_strcspn() + */ + public function provider_strcspn() + { + return array( + array('CocoГ±Г№С‚', 'oГ±', NULL, NULL, 1), + array('CocoГ±Г№С‚', 'oГ±', 2, 4, 1), + array('CocoГ±Г№С‚', 'ЕЎЕЎ', 3, 9, 4), + ); + } + + /** + * Tests UTF8::strcspn + * + * @test + * @dataProvider provider_strcspn + */ + public function test_strcspn($input, $mask, $offset, $length, $expected) + { + $this->assertSame($expected, UTF8::strcspn($input, $mask, $offset, $length)); + } + + /** + * Provides test data for test_str_pad() + */ + public function provider_str_pad() + { + return array( + array('CocoГ±Г№С‚', 10, 'ЕЎ', STR_PAD_RIGHT, 'CocoГ±Г№С‚ЕЎЕЎЕЎ'), + array('CocoГ±Г№С‚', 10, 'ЕЎ', STR_PAD_LEFT, 'ЕЎЕЎЕЎCocoГ±Г№С‚'), + array('CocoГ±Г№С‚', 10, 'ЕЎ', STR_PAD_BOTH, 'ЕЎCocoГ±Г№С‚ЕЎЕЎ'), + ); + } + + /** + * Tests UTF8::str_pad + * + * @test + * @dataProvider provider_str_pad + */ + public function test_str_pad($input, $length, $pad, $type, $expected) + { + $this->assertSame($expected, UTF8::str_pad($input, $length, $pad, $type)); + } + + /** + * Tests UTF8::str_pad error + * + * @test + * @expectedException UTF8_Exception + */ + public function test_str_pad_error() + { + UTF8::str_pad('CocoГ±Г№С‚', 10, 'ЕЎ', 15, 'ЕЎCocoГ±Г№С‚ЕЎЕЎ'); + } + + /** + * Provides test data for test_str_split() + */ + public function provider_str_split() + { + return array( + array('BГЎr', 1, array('B', 'ГЎ', 'r')), + array('CocoГ±Г№С‚', 2, array('Co', 'co', 'Г±Г№', 'С‚')), + array('CocoГ±Г№С‚', 3, array('Coc', 'oГ±Г№', 'С‚')), + ); + } + + /** + * Tests UTF8::str_split + * + * @test + * @dataProvider provider_str_split + */ + public function test_str_split($input, $split_length, $expected) + { + $this->assertSame($expected, UTF8::str_split($input, $split_length)); + } + + /** + * Provides test data for test_strrev() + */ + public function provider_strrev() + { + return array( + array('CocoГ±Г№С‚', 'тùñocoC'), + ); + } + + /** + * Tests UTF8::strrev + * + * @test + * @dataProvider provider_strrev + */ + public function test_strrev($input, $expected) + { + $this->assertSame($expected, UTF8::strrev($input)); + } + + /** + * Provides test data for test_trim() + */ + public function provider_trim() + { + return array( + array(' bar ', NULL, 'bar'), + array('bar', 'b', 'ar'), + array('barb', 'b', 'ar'), + ); + } + + /** + * Tests UTF8::trim + * + * @test + * @dataProvider provider_trim + */ + public function test_trim($input, $input2, $expected) + { + $this->assertSame($expected, UTF8::trim($input, $input2)); + } + + /** + * Provides test data for test_ltrim() + */ + public function provider_ltrim() + { + return array( + array(' bar ', NULL, 'bar '), + array('bar', 'b', 'ar'), + array('barb', 'b', 'arb'), + array('Г±Г№С‚', 'Г±', 'Г№С‚'), + ); + } + + /** + * Tests UTF8::ltrim + * + * @test + * @dataProvider provider_ltrim + */ + public function test_ltrim($input, $charlist, $expected) + { + $this->assertSame($expected, UTF8::ltrim($input, $charlist)); + } + + /** + * Provides test data for test_rtrim() + */ + public function provider_rtrim() + { + return array( + array(' bar ', NULL, ' bar'), + array('bar', 'b', 'bar'), + array('barb', 'b', 'bar'), + array('CocoГ±Г№С‚', 'С‚', 'CocoГ±Г№'), + ); + } + + /** + * Tests UTF8::rtrim + * + * @test + * @dataProvider provider_rtrim + */ + public function test_rtrim($input, $input2, $expected) + { + $this->assertSame($expected, UTF8::rtrim($input, $input2)); + } + + /** + * Provides test data for test_ord() + */ + public function provider_ord() + { + return array( + array('f', 102), + array('Г±', 241), + array('Г‘', 209), + ); + } + + /** + * Tests UTF8::ord + * + * @test + * @dataProvider provider_ord + */ + public function test_ord($input, $expected) + { + $this->assertSame($expected, UTF8::ord($input)); + } +} diff --git a/~dev_rating/system/tests/kohana/UploadTest.php b/~dev_rating/system/tests/kohana/UploadTest.php new file mode 100644 index 0000000000000000000000000000000000000000..026ba8ab55fae0ac8e8b2f7df3ad094a2e4ebce0 --- /dev/null +++ b/~dev_rating/system/tests/kohana/UploadTest.php @@ -0,0 +1,225 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests Kohana upload class + * + * @group kohana + * @group kohana.core + * @group kohana.core.upload + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Jeremy Bush <contractfrombelow@gmail.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_UploadTest extends Unittest_TestCase +{ + /** + * Provides test data for test_size() + * + * @return array + */ + public function provider_size() + { + return array( + // $field, $bytes, $environment, $expected + array( + 'unit_test', + 5, + array('_FILES' => array('unit_test' => array('error' => UPLOAD_ERR_INI_SIZE))), + FALSE + ), + array( + 'unit_test', + 5, + array('_FILES' => array('unit_test' => array('error' => UPLOAD_ERR_NO_FILE))), + TRUE + ), + array( + 'unit_test', + '6K', + array('_FILES' => array( + 'unit_test' => array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'Unit_Test File', + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ) + ), + TRUE + ), + array( + 'unit_test', + '1B', + array('_FILES' => array( + 'unit_test' => array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'Unit_Test File', + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ) + ), + FALSE + ), + ); + } + + /** + * Tests Upload::size + * + * @test + * @dataProvider provider_size + * @covers upload::size + * @param string $field the files field to test + * @param string $bytes valid bite size + * @param array $environment set the $_FILES array + * @param bool $expected what to expect + */ + public function test_size($field, $bytes, $environment, $expected) + { + $this->setEnvironment($environment); + + $this->assertSame($expected, Upload::size($_FILES[$field], $bytes)); + } + + /** + * size() should throw an exception of the supplied max size is invalid + * + * @test + * @covers upload::size + * @expectedException Kohana_Exception + */ + public function test_size_throws_exception_for_invalid_size() + { + $this->setEnvironment(array( + '_FILES' => array( + 'unit_test' => array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'Unit_Test File', + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ) + )); + + Upload::size($_FILES['unit_test'], '1DooDah'); + } + + /** + * Provides test data for test_vali() + * + * @test + * @return array + */ + public function provider_valid() + { + return array( + array( + TRUE, + array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'Unit_Test File', + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ), + array( + FALSE, + array( + 'name' => 'Unit_Test File', + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ), + array( + FALSE, + array( + 'error' => UPLOAD_ERR_OK, + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ), + array( + FALSE, + array( + 'name' => 'Unit_Test File', + 'error' => UPLOAD_ERR_OK, + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ), + array( + FALSE, + array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'Unit_Test File', + 'type' => 'image/png', + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ), + array( + FALSE, + array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'Unit_Test File', + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + ) + ), + + ); + } + + /** + * Test Upload::valid + * + * @test + * @dataProvider provider_valid + * @covers Upload::valid + */ + public function test_valid($expected, $file) + { + $this->setEnvironment(array( + '_FILES' => array( + 'unit_test' => $file, + ), + )); + + $this->assertSame($expected, Upload::valid($_FILES['unit_test'])); + } + + /** + * Tests Upload::type + * + * @test + * @covers Upload::type + */ + public function test_type() + { + $this->setEnvironment(array( + '_FILES' => array( + 'unit_test' => array( + 'error' => UPLOAD_ERR_OK, + 'name' => 'github.png', + 'type' => 'image/png', + 'tmp_name' => Kohana::find_file('tests', 'test_data/github', 'png'), + 'size' => filesize(Kohana::find_file('tests', 'test_data/github', 'png')), + ) + ) + )); + + $this->assertTrue(Upload::type($_FILES['unit_test'], array('jpg', 'png', 'gif'))); + + $this->assertFalse(Upload::type($_FILES['unit_test'], array('docx'))); + } +} diff --git a/~dev_rating/system/tests/kohana/ValidTest.php b/~dev_rating/system/tests/kohana/ValidTest.php new file mode 100644 index 0000000000000000000000000000000000000000..764e04947641b1ce44f4cc1a768479c33cec347c --- /dev/null +++ b/~dev_rating/system/tests/kohana/ValidTest.php @@ -0,0 +1,994 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the Valid class + * + * @group kohana + * @group kohana.core + * @group kohana.core.valid + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ValidTest extends Unittest_TestCase +{ + + /** + * Provides test data for test_alpha() + * @return array + */ + public function provider_alpha() + { + return array( + array('asdavafaiwnoabwiubafpowf', TRUE), + array('!aidhfawiodb', FALSE), + array('51535oniubawdawd78', FALSE), + array('!"ВЈ$(G$WВЈ(HFWВЈF(HQ)"n', FALSE), + // UTF-8 tests + array('гЃ‚гЃ„гЃ†гЃ€гЃЉ', TRUE, TRUE), + array('ВҐ', FALSE, TRUE), + // Empty test + array('', FALSE, FALSE), + array(NULL, FALSE, FALSE), + array(FALSE, FALSE, FALSE), + ); + } + + /** + * Tests Valid::alpha() + * + * Checks whether a string consists of alphabetical characters only. + * + * @test + * @dataProvider provider_alpha + * @param string $string + * @param boolean $expected + */ + public function test_alpha($string, $expected, $utf8 = FALSE) + { + $this->assertSame( + $expected, + Valid::alpha($string, $utf8) + ); + } + + /* + * Provides test data for test_alpha_numeric + */ + public function provide_alpha_numeric() + { + return array( + array('abcd1234', TRUE), + array('abcd', TRUE), + array('1234', TRUE), + array('abc123&^/-', FALSE), + // UTF-8 tests + array('гЃ‚гЃ„гЃ†гЃ€гЃЉ', TRUE, TRUE), + array('零一二三四五', TRUE, TRUE), + array('гЃ‚гЃ„е››дє”ВЈ^ВЈ^', FALSE, TRUE), + // Empty test + array('', FALSE, FALSE), + array(NULL, FALSE, FALSE), + array(FALSE, FALSE, FALSE), + ); + } + + /** + * Tests Valid::alpha_numeric() + * + * Checks whether a string consists of alphabetical characters and numbers only. + * + * @test + * @dataProvider provide_alpha_numeric + * @param string $input The string to test + * @param boolean $expected Is $input valid + */ + public function test_alpha_numeric($input, $expected, $utf8 = FALSE) + { + $this->assertSame( + $expected, + Valid::alpha_numeric($input, $utf8) + ); + } + + /** + * Provides test data for test_alpha_dash + */ + public function provider_alpha_dash() + { + return array( + array('abcdef', TRUE), + array('12345', TRUE), + array('abcd1234', TRUE), + array('abcd1234-', TRUE), + array('abc123&^/-', FALSE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + } + + /** + * Tests Valid::alpha_dash() + * + * Checks whether a string consists of alphabetical characters, numbers, underscores and dashes only. + * + * @test + * @dataProvider provider_alpha_dash + * @param string $input The string to test + * @param boolean $contains_utf8 Does the string contain utf8 specific characters + * @param boolean $expected Is $input valid? + */ + public function test_alpha_dash($input, $expected, $contains_utf8 = FALSE) + { + if ( ! $contains_utf8) + { + $this->assertSame( + $expected, + Valid::alpha_dash($input) + ); + } + + $this->assertSame( + $expected, + Valid::alpha_dash($input, TRUE) + ); + } + + /** + * DataProvider for the valid::date() test + */ + public function provider_date() + { + return array( + array('now',TRUE), + array('10 September 2010',TRUE), + array('+1 day',TRUE), + array('+1 week',TRUE), + array('+1 week 2 days 4 hours 2 seconds',TRUE), + array('next Thursday',TRUE), + array('last Monday',TRUE), + + array('blarg',FALSE), + array('in the year 2000',FALSE), + array('324824',FALSE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + } + + /** + * Tests Valid::date() + * + * @test + * @dataProvider provider_date + * @param string $date The date to validate + * @param integer $expected + */ + public function test_date($date, $expected) + { + $this->assertSame( + $expected, + Valid::date($date, $expected) + ); + } + + /** + * DataProvider for the valid::decimal() test + */ + public function provider_decimal() + { + return array( + // Empty test + array('', 2, NULL, FALSE), + array(NULL, 2, NULL, FALSE), + array(FALSE, 2, NULL, FALSE), + array('45.1664', 3, NULL, FALSE), + array('45.1664', 4, NULL, TRUE), + array('45.1664', 4, 2, TRUE), + array('-45.1664', 4, NULL, TRUE), + array('+45.1664', 4, NULL, TRUE), + array('-45.1664', 3, NULL, FALSE), + ); + } + + /** + * Tests Valid::decimal() + * + * @test + * @dataProvider provider_decimal + * @param string $decimal The decimal to validate + * @param integer $places The number of places to check to + * @param integer $digits The number of digits preceding the point to check + * @param boolean $expected Whether $decimal conforms to $places AND $digits + */ + public function test_decimal($decimal, $places, $digits, $expected) + { + $this->assertSame( + $expected, + Valid::decimal($decimal, $places, $digits), + 'Decimal: "'.$decimal.'" to '.$places.' places and '.$digits.' digits (preceeding period)' + ); + } + + /** + * Provides test data for test_digit + * @return array + */ + public function provider_digit() + { + return array( + array('12345', TRUE), + array('10.5', FALSE), + array('abcde', FALSE), + array('abcd1234', FALSE), + array('-5', FALSE), + array(-5, FALSE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + } + + /** + * Tests Valid::digit() + * + * @test + * @dataProvider provider_digit + * @param mixed $input Input to validate + * @param boolean $expected Is $input valid + */ + public function test_digit($input, $expected, $contains_utf8 = FALSE) + { + if ( ! $contains_utf8) + { + $this->assertSame( + $expected, + Valid::digit($input) + ); + } + + $this->assertSame( + $expected, + Valid::digit($input, TRUE) + ); + + } + + /** + * DataProvider for the valid::color() test + */ + public function provider_color() + { + return array( + array('#000000', TRUE), + array('#GGGGGG', FALSE), + array('#AbCdEf', TRUE), + array('#000', TRUE), + array('#abc', TRUE), + array('#DEF', TRUE), + array('000000', TRUE), + array('GGGGGG', FALSE), + array('AbCdEf', TRUE), + array('000', TRUE), + array('DEF', TRUE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + } + + /** + * Tests Valid::color() + * + * @test + * @dataProvider provider_color + * @param string $color The color to test + * @param boolean $expected Is $color valid + */ + public function test_color($color, $expected) + { + $this->assertSame( + $expected, + Valid::color($color) + ); + } + + /** + * Provides test data for test_credit_card() + */ + public function provider_credit_card() + { + return array( + array('4222222222222', 'visa', TRUE), + array('4012888888881881', 'visa', TRUE), + array('4012888888881881', NULL, TRUE), + array('4012888888881881', array('mastercard', 'visa'), TRUE), + array('4012888888881881', array('discover', 'mastercard'), FALSE), + array('4012888888881881', 'mastercard', FALSE), + array('5105105105105100', 'mastercard', TRUE), + array('6011111111111117', 'discover', TRUE), + array('6011111111111117', 'visa', FALSE), + // Empty test + array('', NULL, FALSE), + array(NULL, NULL, FALSE), + array(FALSE, NULL, FALSE), + ); + } + + /** + * Tests Valid::credit_card() + * + * @test + * @covers Valid::credit_card + * @dataProvider provider_credit_card() + * @param string $number Credit card number + * @param string $type Credit card type + * @param boolean $expected + */ + public function test_credit_card($number, $type, $expected) + { + $this->assertSame( + $expected, + Valid::credit_card($number, $type) + ); + } + + /** + * Provides test data for test_credit_card() + */ + public function provider_luhn() + { + return array( + array('4222222222222', TRUE), + array('4012888888881881', TRUE), + array('5105105105105100', TRUE), + array('6011111111111117', TRUE), + array('60111111111111.7', FALSE), + array('6011111111111117X', FALSE), + array('6011111111111117 ', FALSE), + array('WORD ', FALSE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + } + + /** + * Tests Valid::luhn() + * + * @test + * @covers Valid::luhn + * @dataProvider provider_luhn() + * @param string $number Credit card number + * @param boolean $expected + */ + public function test_luhn($number, $expected) + { + $this->assertSame( + $expected, + Valid::luhn($number) + ); + } + + /** + * Provides test data for test_email() + * + * @return array + */ + public function provider_email() + { + return array( + array('foo', TRUE, FALSE), + array('foo', FALSE, FALSE), + + array('foo@bar', TRUE, TRUE), + // RFC is less strict than the normal regex, presumably to allow + // admin@localhost, therefore we IGNORE IT!!! + array('foo@bar', FALSE, FALSE), + array('foo@bar.com', FALSE, TRUE), + array('foo@barcom:80', FALSE, FALSE), + array('foo@bar.sub.com', FALSE, TRUE), + array('foo+asd@bar.sub.com', FALSE, TRUE), + array('foo.asd@bar.sub.com', FALSE, TRUE), + // RFC says 254 length max #4011 + array(Text::random(NULL, 200).'@'.Text::random(NULL, 50).'.com', FALSE, FALSE), + // Empty test + array('', TRUE, FALSE), + array(NULL, TRUE, FALSE), + array(FALSE, TRUE, FALSE), + ); + } + + /** + * Tests Valid::email() + * + * Check an email address for correct format. + * + * @test + * @dataProvider provider_email + * @param string $email Address to check + * @param boolean $strict Use strict settings + * @param boolean $correct Is $email address valid? + */ + public function test_email($email, $strict, $correct) + { + $this->assertSame( + $correct, + Valid::email($email, $strict) + ); + } + + /** + * Returns test data for test_email_domain() + * + * @return array + */ + public function provider_email_domain() + { + return array( + array('google.com', TRUE), + // Don't anybody dare register this... + array('DAWOMAWIDAIWNDAIWNHDAWIHDAIWHDAIWOHDAIOHDAIWHD.com', FALSE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + } + + /** + * Tests Valid::email_domain() + * + * Validate the domain of an email address by checking if the domain has a + * valid MX record. + * + * Test skips on windows + * + * @test + * @dataProvider provider_email_domain + * @param string $email Email domain to check + * @param boolean $correct Is it correct? + */ + public function test_email_domain($email, $correct) + { + if ( ! $this->hasInternet()) + { + $this->markTestSkipped('An internet connection is required for this test'); + } + + if ( ! Kohana::$is_windows OR version_compare(PHP_VERSION, '5.3.0', '>=')) + { + $this->assertSame( + $correct, + Valid::email_domain($email) + ); + } + else + { + $this->markTestSkipped('checkdnsrr() was not added on windows until PHP 5.3'); + } + } + + /** + * Provides data for test_exact_length() + * + * @return array + */ + public function provider_exact_length() + { + return array( + array('somestring', 10, TRUE), + array('somestring', 11, FALSE), + array('anotherstring', 13, TRUE), + // Empty test + array('', 10, FALSE), + array(NULL, 10, FALSE), + array(FALSE, 10, FALSE), + // Test array of allowed lengths + array('somestring', array(1, 3, 5, 7, 9, 10), TRUE), + array('somestring', array(1, 3, 5, 7, 9), FALSE), + ); + } + + /** + * + * Tests Valid::exact_length() + * + * Checks that a field is exactly the right length. + * + * @test + * @dataProvider provider_exact_length + * @param string $string The string to length check + * @param integer $length The length of the string + * @param boolean $correct Is $length the actual length of the string? + * @return bool + */ + public function test_exact_length($string, $length, $correct) + { + return $this->assertSame( + $correct, + Valid::exact_length($string, $length), + 'Reported string length is not correct' + ); + } + + /** + * Provides data for test_equals() + * + * @return array + */ + public function provider_equals() + { + return array( + array('foo', 'foo', TRUE), + array('1', '1', TRUE), + array(1, '1', FALSE), + array('011', 011, FALSE), + // Empty test + array('', 123, FALSE), + array(NULL, 123, FALSE), + array(FALSE, 123, FALSE), + ); + } + + /** + * Tests Valid::equals() + * + * @test + * @dataProvider provider_equals + * @param string $string value to check + * @param integer $required required value + * @param boolean $correct is $string the same as $required? + * @return boolean + */ + public function test_equals($string, $required, $correct) + { + return $this->assertSame( + $correct, + Valid::equals($string, $required), + 'Values are not equal' + ); + } + + /** + * DataProvider for the valid::ip() test + * @return array + */ + public function provider_ip() + { + return array( + array('75.125.175.50', FALSE, TRUE), + // PHP 5.3.6 fixed a bug that allowed 127.0.0.1 as a public ip: http://bugs.php.net/53150 + array('127.0.0.1', FALSE, version_compare(PHP_VERSION, '5.3.6', '<')), + array('256.257.258.259', FALSE, FALSE), + array('255.255.255.255', FALSE, FALSE), + array('192.168.0.1', FALSE, FALSE), + array('192.168.0.1', TRUE, TRUE), + // Empty test + array('', TRUE, FALSE), + array(NULL, TRUE, FALSE), + array(FALSE, TRUE, FALSE), + ); + } + + /** + * Tests Valid::ip() + * + * @test + * @dataProvider provider_ip + * @param string $input_ip + * @param boolean $allow_private + * @param boolean $expected_result + */ + public function test_ip($input_ip, $allow_private, $expected_result) + { + $this->assertEquals( + $expected_result, + Valid::ip($input_ip, $allow_private) + ); + } + + /** + * Returns test data for test_max_length() + * + * @return array + */ + public function provider_max_length() + { + return array( + // Border line + array('some', 4, TRUE), + // Exceeds + array('KOHANARULLLES', 2, FALSE), + // Under + array('CakeSucks', 10, TRUE), + // Empty test + array('', -10, FALSE), + array(NULL, -10, FALSE), + array(FALSE, -10, FALSE), + ); + } + + /** + * Tests Valid::max_length() + * + * Checks that a field is short enough. + * + * @test + * @dataProvider provider_max_length + * @param string $string String to test + * @param integer $maxlength Max length for this string + * @param boolean $correct Is $string <= $maxlength + */ + public function test_max_length($string, $maxlength, $correct) + { + $this->assertSame( + $correct, + Valid::max_length($string, $maxlength) + ); + } + + /** + * Returns test data for test_min_length() + * + * @return array + */ + public function provider_min_length() + { + return array( + array('This is obviously long enough', 10, TRUE), + array('This is not', 101, FALSE), + array('This is on the borderline', 25, TRUE), + // Empty test + array('', 10, FALSE), + array(NULL, 10, FALSE), + array(FALSE, 10, FALSE), + ); + } + + /** + * Tests Valid::min_length() + * + * Checks that a field is long enough. + * + * @test + * @dataProvider provider_min_length + * @param string $string String to compare + * @param integer $minlength The minimum allowed length + * @param boolean $correct Is $string 's length >= $minlength + */ + public function test_min_length($string, $minlength, $correct) + { + $this->assertSame( + $correct, + Valid::min_length($string, $minlength) + ); + } + + /** + * Returns test data for test_not_empty() + * + * @return array + */ + public function provider_not_empty() + { + // Create a blank arrayObject + $ao = new ArrayObject; + + // arrayObject with value + $ao1 = new ArrayObject; + $ao1['test'] = 'value'; + + return array( + array(array(), FALSE), + array(NULL, FALSE), + array('', FALSE), + array($ao, FALSE), + array($ao1, TRUE), + array(array(NULL), TRUE), + array(0, TRUE), + array('0', TRUE), + array('Something', TRUE), + ); + } + + /** + * Tests Valid::not_empty() + * + * Checks if a field is not empty. + * + * @test + * @dataProvider provider_not_empty + * @param mixed $value Value to check + * @param boolean $empty Is the value really empty? + */ + public function test_not_empty($value, $empty) + { + return $this->assertSame( + $empty, + Valid::not_empty($value) + ); + } + + /** + * DataProvider for the Valid::numeric() test + */ + public function provider_numeric() + { + return array( + array(12345, TRUE), + array(123.45, TRUE), + array('12345', TRUE), + array('10.5', TRUE), + array('-10.5', TRUE), + array('10.5a', FALSE), + // @issue 3240 + array(.4, TRUE), + array(-.4, TRUE), + array(4., TRUE), + array(-4., TRUE), + array('.5', TRUE), + array('-.5', TRUE), + array('5.', TRUE), + array('-5.', TRUE), + array('.', FALSE), + array('1.2.3', FALSE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + } + + /** + * Tests Valid::numeric() + * + * @test + * @dataProvider provider_numeric + * @param string $input Input to test + * @param boolean $expected Whether or not $input is numeric + */ + public function test_numeric($input, $expected) + { + $this->assertSame( + $expected, + Valid::numeric($input) + ); + } + + /** + * Provides test data for test_phone() + * @return array + */ + public function provider_phone() + { + return array( + array('0163634840', NULL, TRUE), + array('+27173634840', NULL, TRUE), + array('123578', NULL, FALSE), + // Some uk numbers + array('01234456778', NULL, TRUE), + array('+0441234456778', NULL, FALSE), + // Google UK case you're interested + array('+44 20-7031-3000', array(12), TRUE), + // BT Corporate + array('020 7356 5000', NULL, TRUE), + // Empty test + array('', NULL, FALSE), + array(NULL, NULL, FALSE), + array(FALSE, NULL, FALSE), + ); + } + + /** + * Tests Valid::phone() + * + * @test + * @dataProvider provider_phone + * @param string $phone Phone number to test + * @param boolean $expected Is $phone valid + */ + public function test_phone($phone, $lengths, $expected) + { + $this->assertSame( + $expected, + Valid::phone($phone, $lengths) + ); + } + + /** + * DataProvider for the valid::regex() test + */ + public function provider_regex() + { + return array( + array('hello world', '/[a-zA-Z\s]++/', TRUE), + array('123456789', '/[0-9]++/', TRUE), + array('ВЈ$%ВЈ%', '/[abc]/', FALSE), + array('Good evening', '/hello/', FALSE), + // Empty test + array('', '/hello/', FALSE), + array(NULL, '/hello/', FALSE), + array(FALSE, '/hello/', FALSE), + ); + } + + /** + * Tests Valid::range() + * + * Tests if a number is within a range. + * + * @test + * @dataProvider provider_regex + * @param string $value Value to test against + * @param string $regex Valid pcre regular expression + * @param bool $expected Does the value match the expression? + */ + public function test_regex($value, $regex, $expected) + { + $this->AssertSame( + $expected, + Valid::regex($value, $regex) + ); + } + + /** + * DataProvider for the valid::range() test + */ + public function provider_range() + { + return array( + array(1, 0, 2, NULL, TRUE), + array(-1, -5, 0, NULL, TRUE), + array(-1, 0, 1, NULL, FALSE), + array(1, 0, 0, NULL, FALSE), + array(2147483647, 0, 200000000000000, NULL, TRUE), + array(-2147483647, -2147483655, 2147483645, NULL, TRUE), + // #4043 + array(2, 0, 10, 2, TRUE), + array(3, 0, 10, 2, FALSE), + // #4672 + array(0, 0, 10, NULL, TRUE), + array(10, 0, 10, NULL, TRUE), + array(-10, -10, 10, NULL, TRUE), + array(-10, -1, 1, NULL, FALSE), + array(0, 0, 10, 2, TRUE), // with $step + array(10, 0, 10, 2, TRUE), + array(10, 0, 10, 3, FALSE), // max outside $step + array(12, 0, 12, 3, TRUE), + // Empty test + array('', 5, 10, NULL, FALSE), + array(NULL, 5, 10, NULL, FALSE), + array(FALSE, 5, 10, NULL, FALSE), + ); + } + + /** + * Tests Valid::range() + * + * Tests if a number is within a range. + * + * @test + * @dataProvider provider_range + * @param integer $number Number to test + * @param integer $min Lower bound + * @param integer $max Upper bound + * @param boolean $expected Is Number within the bounds of $min && $max + */ + public function test_range($number, $min, $max, $step, $expected) + { + $this->AssertSame( + $expected, + Valid::range($number, $min, $max, $step) + ); + } + + /** + * Provides test data for test_url() + * + * @return array + */ + public function provider_url() + { + $data = array( + array('http://google.com', TRUE), + array('http://google.com/', TRUE), + array('http://google.com/?q=abc', TRUE), + array('http://google.com/#hash', TRUE), + array('http://localhost', TRUE), + array('http://hello-world.pl', TRUE), + array('http://hello--world.pl', TRUE), + array('http://h.e.l.l.0.pl', TRUE), + array('http://server.tld/get/info', TRUE), + array('http://127.0.0.1', TRUE), + array('http://127.0.0.1:80', TRUE), + array('http://user@127.0.0.1', TRUE), + array('http://user:pass@127.0.0.1', TRUE), + array('ftp://my.server.com', TRUE), + array('rss+xml://rss.example.com', TRUE), + + array('http://google.2com', FALSE), + array('http://google.com?q=abc', FALSE), + array('http://google.com#hash', FALSE), + array('http://hello-.pl', FALSE), + array('http://hel.-lo.world.pl', FALSE), + array('http://wwВЈ.google.com', FALSE), + array('http://127.0.0.1234', FALSE), + array('http://127.0.0.1.1', FALSE), + array('http://user:@127.0.0.1', FALSE), + array("http://finalnewline.com\n", FALSE), + // Empty test + array('', FALSE), + array(NULL, FALSE), + array(FALSE, FALSE), + ); + + $data[] = array('http://'.str_repeat('123456789.', 25).'com/', TRUE); // 253 chars + $data[] = array('http://'.str_repeat('123456789.', 25).'info/', FALSE); // 254 chars + + return $data; + } + + /** + * Tests Valid::url() + * + * @test + * @dataProvider provider_url + * @param string $url The url to test + * @param boolean $expected Is it valid? + */ + public function test_url($url, $expected) + { + $this->assertSame( + $expected, + Valid::url($url) + ); + } + + /** + * DataProvider for the valid::matches() test + */ + public function provider_matches() + { + return array( + array(array('a' => 'hello', 'b' => 'hello'), 'a', 'b', TRUE), + array(array('a' => 'hello', 'b' => 'hello '), 'a', 'b', FALSE), + array(array('a' => '1', 'b' => 1), 'a', 'b', FALSE), + // Empty test + array(array('a' => '', 'b' => 'hello'), 'a', 'b', FALSE), + array(array('a' => NULL, 'b' => 'hello'), 'a', 'b', FALSE), + array(array('a' => FALSE, 'b' => 'hello'), 'a', 'b', FALSE), + ); + } + + /** + * Tests Valid::matches() + * + * Tests if a field matches another from an array of data + * + * @test + * @dataProvider provider_matches + * @param array $data Array of fields + * @param integer $field First field name + * @param integer $match Field name that must match $field in $data + * @param boolean $expected Do the two fields match? + */ + public function test_matches($data, $field, $match, $expected) + { + $this->AssertSame( + $expected, + Valid::matches($data, $field, $match) + ); + } +} diff --git a/~dev_rating/system/tests/kohana/ValidationTest.php b/~dev_rating/system/tests/kohana/ValidationTest.php new file mode 100644 index 0000000000000000000000000000000000000000..c9fce26fde549eb7bb3b41f4d4204826b5a513b3 --- /dev/null +++ b/~dev_rating/system/tests/kohana/ValidationTest.php @@ -0,0 +1,676 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the Validation lib that's shipped with Kohana + * + * @group kohana + * @group kohana.core + * @group kohana.core.validation + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author BRMatt <matthew@sigswitch.com> + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ValidationTest extends Unittest_TestCase +{ + /** + * Tests Validation::factory() + * + * Makes sure that the factory method returns an instance of Validation lib + * and that it uses the variables passed + * + * @test + */ + public function test_factory_method_returns_instance_with_values() + { + $values = array( + 'this' => 'something else', + 'writing tests' => 'sucks', + 'why the hell' => 'amIDoingThis', + ); + + $instance = Validation::factory($values); + + $this->assertTrue($instance instanceof Validation); + + $this->assertSame( + $values, + $instance->data() + ); + } + + /** + * When we copy() a validation object, we should have a new validation object + * with the exact same attributes, apart from the data, which should be the + * same as the array we pass to copy() + * + * @test + * @covers Validation::copy + */ + public function test_copy_copies_all_attributes_except_data() + { + $validation = new Validation(array('foo' => 'bar', 'fud' => 'fear, uncertainty, doubt', 'num' => 9)); + + $validation->rule('num', 'is_int')->rule('foo', 'is_string'); + + $copy_data = array('foo' => 'no', 'fud' => 'maybe', 'num' => 42); + + $copy = $validation->copy($copy_data); + + $this->assertNotSame($validation, $copy); + + foreach (array('_rules', '_bound', '_labels', '_empty_rules', '_errors') as $attribute) + { + // This is just an easy way to check that the attributes are identical + // Without hardcoding the expected values + $this->assertAttributeSame( + self::readAttribute($validation, $attribute), + $attribute, + $copy + ); + } + + $this->assertSame($copy_data, $copy->data()); + } + + /** + * When the validation object is initially created there should be no labels + * specified + * + * @test + */ + public function test_initially_there_are_no_labels() + { + $validation = new Validation(array()); + + $this->assertAttributeSame(array(), '_labels', $validation); + } + + /** + * Adding a label to a field should set it in the labels array + * If the label already exists it should overwrite it + * + * In both cases thefunction should return a reference to $this + * + * @test + * @covers Validation::label + */ + public function test_label_adds_and_overwrites_label_and_returns_this() + { + $validation = new Validation(array()); + + $this->assertSame($validation, $validation->label('email', 'Email Address')); + + $this->assertAttributeSame(array('email' => 'Email Address'), '_labels', $validation); + + $this->assertSame($validation, $validation->label('email', 'Your Email')); + + $validation->label('name', 'Your Name'); + + $this->assertAttributeSame( + array('email' => 'Your Email', 'name' => 'Your Name'), + '_labels', + $validation + ); + } + + /** + * Using labels() we should be able to add / overwrite multiple labels + * + * The function should also return $this for chaining purposes + * + * @test + * @covers Validation::labels + */ + public function test_labels_adds_and_overwrites_multiple_labels_and_returns_this() + { + $validation = new Validation(array()); + $initial_data = array('kung fu' => 'fighting', 'fast' => 'cheetah'); + + $this->assertSame($validation, $validation->labels($initial_data)); + + $this->assertAttributeSame($initial_data, '_labels', $validation); + + $this->assertSame($validation, $validation->labels(array('fast' => 'lightning'))); + + $this->assertAttributeSame( + array('fast' => 'lightning', 'kung fu' => 'fighting'), + '_labels', + $validation + ); + } + + /** + * Using bind() we should be able to add / overwrite multiple bound variables + * + * The function should also return $this for chaining purposes + * + * @test + * @covers Validation::bind + */ + public function test_bind_adds_and_overwrites_multiple_variables_and_returns_this() + { + $validation = new Validation(array()); + $data = array('kung fu' => 'fighting', 'fast' => 'cheetah'); + $bound = array(':foo' => 'some value'); + + // Test binding an array of values + $this->assertSame($validation, $validation->bind($bound)); + $this->assertAttributeSame($bound, '_bound', $validation); + + // Test binding one value + $this->assertSame($validation, $validation->bind(':foo', 'some other value')); + $this->assertAttributeSame(array(':foo' => 'some other value'), '_bound', $validation); + } + + /** + * We should be able to used bound variables in callbacks + * + * @test + * @covers Validation::check + */ + public function test_bound_callback() + { + $data = array( + 'kung fu' => 'fighting', + 'fast' => 'cheetah', + ); + $validation = new Validation($data); + $validation->bind(':class', 'Valid') + // Use the bound value in a callback + ->rule('fast', array(':class', 'max_length'), array(':value', 2)); + + // The rule should have run and check() should fail + $this->assertSame($validation->check(), FALSE); + } + + /** + * Provides test data for test_check + * + * @return array + */ + public function provider_check() + { + // $data_array, $rules, $labels, $first_expected, $expected_error + return array( + array( + array('foo' => 'bar'), + array('foo' => array(array('not_empty', NULL))), + array(), + TRUE, + array(), + ), + array( + array('unit' => 'test'), + array( + 'foo' => array(array('not_empty', NULL)), + 'unit' => array(array('min_length', array(':value', 6)) + ), + ), + array(), + FALSE, + array( + 'foo' => 'foo must not be empty', + 'unit' => 'unit must be at least 6 characters long' + ), + ), + array( + array('foo' => 'bar'), + array( + // Tests wildcard rules + TRUE => array(array('min_length', array(':value', 4))), + 'foo' => array( + array('not_empty', NULL), + // Tests the array syntax for callbacks + array(array('Valid', 'exact_length'), array(':value', 3)), + // Tests the Class::method syntax for callbacks + array('Valid::exact_length', array(':value', 3)), + // Tests the lambda function syntax for callbacks + // Commented out for PHP 5.2 support + // array(function($value){return TRUE;}, array(':value')), + // Tests using a function as a rule + array('is_string', array(':value')), + ), + // Tests that rules do not run on empty fields unless they are in _empty_rules + 'unit' => array(array('exact_length', array(':value', 4))), + ), + array(), + FALSE, + array('foo' => 'foo must be at least 4 characters long'), + ), + // Switch things around and make :value an array + array( + array('foo' => array('test', 'data')), + array('foo' => array(array('in_array', array('kohana', ':value')))), + array(), + FALSE, + array('foo' => 'foo must be one of the available options'), + ), + // Test wildcard rules with no other rules + array( + array('foo' => array('test')), + array(TRUE => array(array('is_string', array(':value')))), + array('foo' => 'foo'), + FALSE, + array('foo' => '1.foo.is_string'), + ), + // Test array rules use method as error name + array( + array('foo' => 'test'), + array('foo' => array(array(array('Valid', 'min_length'), array(':value', 10)))), + array(), + FALSE, + array('foo' => 'foo must be at least 10 characters long'), + ), + ); + } + + /** + * Tests Validation::check() + * + * @test + * @covers Validation::check + * @covers Validation::rule + * @covers Validation::rules + * @covers Validation::errors + * @covers Validation::error + * @dataProvider provider_check + * @param array $array The array of data + * @param array $rules The array of rules + * @param array $labels The array of labels + * @param boolean $expected Is it valid? + * @param boolean $expected_errors Array of expected errors + */ + public function test_check($array, $rules, $labels, $expected, $expected_errors) + { + $validation = new Validation($array); + + foreach ($labels as $field => $label) + { + $validation->label($field, $label); + } + + foreach ($rules as $field => $field_rules) + { + foreach ($field_rules as $rule) + $validation->rule($field, $rule[0], $rule[1]); + } + + $status = $validation->check(); + $errors = $validation->errors(TRUE); + $this->assertSame($expected, $status); + $this->assertSame($expected_errors, $errors); + + $validation = new validation($array); + foreach ($rules as $field => $rules) + { + $validation->rules($field, $rules); + } + $validation->labels($labels); + + $this->assertSame($expected, $validation->check()); + } + + /** + * Tests Validation::check() + * + * @test + * @covers Validation::check + */ + public function test_check_stops_when_error_added_by_callback() + { + $validation = new Validation(array( + 'foo' => 'foo', + )); + + $validation + ->rule('foo', array($this, '_validation_callback'), array(':validation')) + // This rule should never run + ->rule('foo', 'min_length', array(':value', 20)); + + $validation->check(); + $errors = $validation->errors(); + + $expected = array( + 'foo' => array( + 0 => '_validation_callback', + 1 => NULL, + ), + ); + + $this->assertSame($errors, $expected); + } + + public function _validation_callback(Validation $object) + { + // Simply add the error + $object->error('foo', '_validation_callback'); + } + + /** + * Provides test data for test_errors() + * + * @return array + */ + public function provider_errors() + { + // [data, rules, expected], ... + return array( + // No Error + array( + array('username' => 'frank'), + array('username' => array(array('not_empty', NULL))), + array(), + ), + // Error from message file + array( + array('username' => ''), + array('username' => array(array('not_empty', NULL))), + array('username' => 'username must not be empty'), + ), + // No error message exists, display the path expected + array( + array('username' => 'John'), + array('username' => array(array('strpos', array(':value', 'Kohana')))), + array('username' => 'Validation.username.strpos'), + ), + ); + } + + /** + * Tests Validation::errors() + * + * @test + * @covers Validation::errors + * @dataProvider provider_errors + * @param array $array The array of data + * @param array $rules The array of rules + * @param array $expected Array of expected errors + */ + public function test_errors($array, $rules, $expected) + { + $validation = Validation::factory($array); + + foreach ($rules as $field => $field_rules) + { + $validation->rules($field, $field_rules); + } + + $validation->check(); + + $this->assertSame($expected, $validation->errors('Validation', FALSE)); + // Should be able to get raw errors array + $this->assertAttributeSame($validation->errors(NULL), '_errors', $validation); + } + + /** + * Provides test data for test_translated_errors() + * + * @return array + */ + public function provider_translated_errors() + { + // [data, rules, expected], ... + return array( + array( + array('Spanish' => ''), + array('Spanish' => array(array('not_empty', NULL))), + // Errors are not translated yet so only the label will translate + array('Spanish' => 'EspaГ±ol must not be empty'), + array('Spanish' => 'Spanish must not be empty'), + ), + ); + } + + /** + * Tests Validation::errors() + * + * @test + * @covers Validation::errors + * @dataProvider provider_translated_errors + * @param array $data The array of data to test + * @param array $rules The array of rules to add + * @param array $translated_expected The array of expected errors when translated + * @param array $untranslated_expected The array of expected errors when not translated + */ + public function test_translated_errors($data, $rules, $translated_expected, $untranslated_expected) + { + $validation = Validation::factory($data); + + $current = i18n::lang(); + i18n::lang('es'); + + foreach ($rules as $field => $field_rules) + { + $validation->rules($field, $field_rules); + } + + $validation->check(); + + $result_1 = $validation->errors('Validation', TRUE); + $result_2 = $validation->errors('Validation', 'en'); + $result_3 = $validation->errors('Validation', FALSE); + + // Restore the current language + i18n::lang($current); + + $this->assertSame($translated_expected, $result_1); + $this->assertSame($translated_expected, $result_2); + $this->assertSame($untranslated_expected, $result_3); + } + + /** + * Tests Validation::errors() + * + * @test + * @covers Validation::errors + */ + public function test_parameter_labels() + { + $validation = Validation::factory(array('foo' => 'bar')) + ->rule('foo', 'equals', array(':value', 'something')) + ->label('something', 'Spanish'); + + $current = i18n::lang(); + i18n::lang('es'); + + $validation->check(); + + $translated_expected = array('foo' => 'foo must equal EspaГ±ol'); + $untranslated_expected = array('foo' => 'foo must equal Spanish'); + + $result_1 = $validation->errors('Validation', TRUE); + $result_2 = $validation->errors('Validation', 'en'); + $result_3 = $validation->errors('Validation', FALSE); + + // Restore the current language + i18n::lang($current); + + $this->assertSame($translated_expected, $result_1); + $this->assertSame($translated_expected, $result_2); + $this->assertSame($untranslated_expected, $result_3); + } + + /** + * Tests Validation::errors() + * + * @test + * @covers Validation::errors + */ + public function test_arrays_in_parameters() + { + $validation = Validation::factory(array('foo' => 'bar')) + ->rule('foo', 'equals', array(':value', array('one', 'two'))); + + $validation->check(); + + $expected = array('foo' => 'foo must equal one, two'); + + $this->assertSame($expected, $validation->errors('Validation', FALSE)); + } + + /** + * Tests Validation::check() + * + * @test + * @covers Validation::check + */ + public function test_data_stays_unaltered() + { + $validation = Validation::factory(array('foo' => 'bar')) + ->rule('something', 'not_empty'); + + $before = $validation->data(); + $validation->check(); + $after = $validation->data(); + + $expected = array('foo' => 'bar'); + + $this->assertSame($expected, $before); + $this->assertSame($expected, $after); + } + + /** + * Tests Validation::errors() + * + * @test + * @covers Validation::errors + */ + public function test_object_parameters_not_in_messages() + { + $validation = Validation::factory(array('foo' => 'foo')) + ->rule('bar', 'matches', array(':validation', ':field', 'foo')); + + $validation->check(); + $errors = $validation->errors('validation'); + $expected = array('bar' => 'bar must be the same as foo'); + + $this->assertSame($expected, $errors); + } + + /** + * Tests Validation::as_array() + * + * @test + * @covers Validation::as_array + */ + public function test_as_array_returns_original_array() + { + $data = array( + 'one' => 'hello', + 'two' => 'world', + 'ten' => '', + ); + + $validation = Validation::factory($data); + + $this->assertSame($data, $validation->as_array()); + } + + /** + * Tests Validation::data() + * + * @test + * @covers Validation::data + */ + public function test_data_returns_original_array() + { + $data = array( + 'one' => 'hello', + 'two' => 'world', + 'ten' => '', + ); + + $validation = Validation::factory($data); + + $this->assertSame($data, $validation->data()); + } + + // @codingStandardsIgnoreStart + public function test_offsetExists() + // @codingStandardsIgnoreEnd + { + $array = array( + 'one' => 'Hello', + 'two' => 'World', + 'ten' => NULL, + ); + + $validation = Validation::factory($array); + + $this->assertTrue(isset($validation['one'])); + $this->assertFalse(isset($validation['ten'])); + $this->assertFalse(isset($validation['five'])); + } + + // @codingStandardsIgnoreStart + public function test_offsetSet_throws_exception() + // @codingStandardsIgnoreEnd + { + $this->setExpectedException('Kohana_Exception'); + + $validation = Validation::factory(array()); + + // Validation is read-only + $validation['field'] = 'something'; + } + + // @codingStandardsIgnoreStart + public function test_offsetGet() + // @codingStandardsIgnoreEnd + { + $array = array( + 'one' => 'Hello', + 'two' => 'World', + 'ten' => NULL, + ); + + $validation = Validation::factory($array); + + $this->assertSame($array['one'], $validation['one']); + $this->assertSame($array['two'], $validation['two']); + $this->assertSame($array['ten'], $validation['ten']); + } + + // @codingStandardsIgnoreStart + public function test_offsetUnset() + // @codingStandardsIgnoreEnd + { + $this->setExpectedException('Kohana_Exception'); + + $validation = Validation::factory(array( + 'one' => 'Hello, World!', + )); + + // Validation is read-only + unset($validation['one']); + } + + /** + * http://dev.kohanaframework.org/issues/4365 + * + * @test + * @covers Validation::errors + */ + public function test_error_type_check() + { + $array = array( + 'email' => 'not an email address', + ); + + $validation = Validation::factory($array) + ->rule('email', 'not_empty') + ->rule('email', 'email') + ; + + $validation->check(); + + $errors = $validation->errors('tests/validation/error_type_check'); + + $this->assertSame($errors, $validation->errors('validation')); + } + +} diff --git a/~dev_rating/system/tests/kohana/ViewTest.php b/~dev_rating/system/tests/kohana/ViewTest.php new file mode 100644 index 0000000000000000000000000000000000000000..543f411e5cbbf0743e12b31cdfcefaca915a6c46 --- /dev/null +++ b/~dev_rating/system/tests/kohana/ViewTest.php @@ -0,0 +1,83 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Tests the View class + * + * @group kohana + * @group kohana.core + * @group kohana.core.view + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_ViewTest extends Unittest_TestCase +{ + protected static $old_modules = array(); + + /** + * Setups the filesystem for test view files + * + * @return null + */ + // @codingStandardsIgnoreStart + public static function setupBeforeClass() + // @codingStandardsIgnoreEnd + { + self::$old_modules = Kohana::modules(); + + $new_modules = self::$old_modules+array( + 'test_views' => realpath(dirname(__FILE__).'/../test_data/') + ); + Kohana::modules($new_modules); + } + + /** + * Restores the module list + * + * @return null + */ + // @codingStandardsIgnoreStart + public static function teardownAfterClass() + // @codingStandardsIgnoreEnd + { + Kohana::modules(self::$old_modules); + } + + /** + * Provider for test_instaniate + * + * @return array + */ + public function provider_instantiate() + { + return array( + array('kohana/error', FALSE), + array('test.css', FALSE), + array('doesnt_exist', TRUE), + ); + } + + /** + * Tests that we can instantiate a view file + * + * @test + * @dataProvider provider_instantiate + * + * @return null + */ + public function test_instantiate($path, $expects_exception) + { + try + { + $view = new View($path); + $this->assertSame(FALSE, $expects_exception); + } + catch(View_Exception $e) + { + $this->assertSame(TRUE, $expects_exception); + } + } +} diff --git a/~dev_rating/system/tests/kohana/request/ClientTest.php b/~dev_rating/system/tests/kohana/request/ClientTest.php new file mode 100644 index 0000000000000000000000000000000000000000..9ad8702975d337ba46f2e70e94d6c0fc72179160 --- /dev/null +++ b/~dev_rating/system/tests/kohana/request/ClientTest.php @@ -0,0 +1,511 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Unit tests for generic Request_Client class + * + * @group kohana + * @group kohana.core + * @group kohana.core.request + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @author Andrew Coulton + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Request_ClientTest extends Unittest_TestCase +{ + protected $_inital_request; + protected static $_original_routes; + + // @codingStandardsIgnoreStart - PHPUnit does not follow standards + /** + * Sets up a new route to ensure that we have a matching route for our + * Controller_RequestClientDummy class. + */ + public static function setUpBeforeClass() + { + // @codingStandardsIgnoreEnd + parent::setUpBeforeClass(); + + // Set a new Route to the ClientTest controller as the first route + // This requires reflection as the API for editing defined routes is limited + $route_class = new ReflectionClass('Route'); + $routes_prop = $route_class->getProperty('_routes'); + $routes_prop->setAccessible(TRUE); + + self::$_original_routes = $routes_prop->getValue('Route'); + + $routes = array( + 'ko_request_clienttest' => new Route('<controller>/<action>/<data>',array('data'=>'.+')) + ) + self::$_original_routes; + + $routes_prop->setValue('Route',$routes); + + } + + // @codingStandardsIgnoreStart - PHPUnit does not follow standards + /** + * Resets the application's routes to their state prior to this test case + */ + public static function tearDownAfterClass() + { + // @codingStandardsIgnoreEnd + // Reset routes + $route_class = new ReflectionClass('Route'); + $routes_prop = $route_class->getProperty('_routes'); + $routes_prop->setAccessible(TRUE); + $routes_prop->setValue('Route',self::$_original_routes); + + parent::tearDownAfterClass(); + } + + // @codingStandardsIgnoreStart - PHPUnit does not follow standards + public function setUp() + { + // @codingStandardsIgnoreEnd + parent::setUp(); + $this->_initial_request = Request::$initial; + Request::$initial = new Request('/'); + } + + // @codingStandardsIgnoreStart - PHPUnit does not follow standards + public function tearDown() + { + // @codingStandardsIgnoreEnd + Request::$initial = $this->_initial_request; + parent::tearDown(); + } + + /** + * Generates an internal URI to the [Controller_RequestClientDummy] shunt + * controller - the URI contains an encoded form of the required server + * response. + * + * @param string $status HTTP response code to issue + * @param array $headers HTTP headers to send with the response + * @param string $body A string to send back as response body (included in the JSON response) + * @return string + */ + protected function _dummy_uri($status, $headers, $body) + { + $data = array( + 'status' => $status, + 'header' => $headers, + 'body' => $body + ); + return "/requestclientdummy/fake".'/'.urlencode(http_build_query($data)); + } + + /** + * Shortcut method to generate a simple redirect URI - the first request will + * receive a redirect with the given HTTP status code and the second will + * receive a 200 response. The 'body' data value in the first response will + * be 'not-followed' and in the second response it will be 'followed'. This + * allows easy assertion that a redirect has taken place. + * + * @param string $status HTTP response code to issue + * @return string + */ + protected function _dummy_redirect_uri($status) + { + return $this->_dummy_uri($status, + array('Location' => $this->_dummy_uri(200, NULL, 'followed')), + 'not-followed'); + } + + /** + * Provider for test_follows_redirects + * @return array + */ + public function provider_follows_redirects() + { + return array( + array(TRUE, $this->_dummy_uri(200, NULL, 'not-followed'), 'not-followed'), + array(TRUE, $this->_dummy_redirect_uri(200), 'not-followed'), + array(TRUE, $this->_dummy_redirect_uri(302), 'followed'), + array(FALSE, $this->_dummy_redirect_uri(302), 'not-followed'), + ); + } + + /** + * Tests that the client optionally follows properly formed redirects + * + * @dataProvider provider_follows_redirects + * + * @param bool $follow Option value to set + * @param string $request_url URL to request initially (contains data to set up redirect etc) + * @param string $expect_body Body text expected in the eventual result + */ + public function test_follows_redirects($follow, $request_url, $expect_body) + { + $response = Request::factory($request_url, + array('follow' => $follow)) + ->execute(); + + $data = json_decode($response->body(), TRUE); + $this->assertEquals($expect_body, $data['body']); + } + + /** + * Tests that only specified headers are resent following a redirect + */ + public function test_follows_with_headers() + { + $response = Request::factory( + $this->_dummy_redirect_uri(301), + array( + 'follow' => TRUE, + 'follow_headers' => array('Authorization', 'X-Follow-With-Value') + )) + ->headers(array( + 'Authorization' => 'follow', + 'X-Follow-With-Value' => 'follow', + 'X-Not-In-Follow' => 'no-follow' + )) + ->execute(); + + $data = json_decode($response->body(),TRUE); + $headers = $data['rq_headers']; + + $this->assertEquals('followed', $data['body']); + $this->assertEquals('follow', $headers['authorization']); + $this->assertEquals('follow', $headers['x-follow-with-value']); + $this->assertFalse(isset($headers['x-not-in-follow']), 'X-Not-In-Follow should not be passed to next request'); + } + + /** + * Tests that the follow_headers are only added to a redirect request if they were present in the original + * + * @ticket 4790 + */ + public function test_follow_does_not_add_extra_headers() + { + $response = Request::factory( + $this->_dummy_redirect_uri(301), + array( + 'follow' => TRUE, + 'follow_headers' => array('Authorization') + )) + ->headers(array()) + ->execute(); + + $data = json_decode($response->body(),TRUE); + $headers = $data['rq_headers']; + + $this->assertArrayNotHasKey('authorization', $headers, 'Empty headers should not be added when following redirects'); + } + + + /** + * Provider for test_follows_with_strict_method + * + * @return array + */ + public function provider_follows_with_strict_method() + { + return array( + array(201, NULL, Request::POST, Request::GET), + array(301, NULL, Request::GET, Request::GET), + array(302, TRUE, Request::POST, Request::POST), + array(302, FALSE, Request::POST, Request::GET), + array(303, NULL, Request::POST, Request::GET), + array(307, NULL, Request::POST, Request::POST), + ); + } + + /** + * Tests that the correct method is used (allowing for the strict_redirect setting) + * for follow requests. + * + * @dataProvider provider_follows_with_strict_method + * + * @param string $status_code HTTP response code to fake + * @param bool $strict_redirect Option value to set + * @param string $orig_method Request method for the original request + * @param string $expect_method Request method expected for the follow request + */ + public function test_follows_with_strict_method($status_code, $strict_redirect, $orig_method, $expect_method) + { + $response = Request::factory($this->_dummy_redirect_uri($status_code), + array( + 'follow' => TRUE, + 'strict_redirect' => $strict_redirect + )) + ->method($orig_method) + ->execute(); + + $data = json_decode($response->body(), TRUE); + + $this->assertEquals('followed', $data['body']); + $this->assertEquals($expect_method, $data['rq_method']); + } + + /** + * Provider for test_follows_with_body_if_not_get + * + * @return array + */ + public function provider_follows_with_body_if_not_get() + { + return array( + array('GET','301',NULL), + array('POST','303',NULL), + array('POST','307','foo-bar') + ); + } + + /** + * Tests that the original request body is sent when following a redirect + * (unless redirect method is GET) + * + * @dataProvider provider_follows_with_body_if_not_get + * @depends test_follows_with_strict_method + * @depends test_follows_redirects + * + * @param string $original_method Request method to use for the original request + * @param string $status Redirect status that will be issued + * @param string $expect_body Expected value of body() in the second request + */ + public function test_follows_with_body_if_not_get($original_method, $status, $expect_body) + { + $response = Request::factory($this->_dummy_redirect_uri($status), + array('follow' => TRUE)) + ->method($original_method) + ->body('foo-bar') + ->execute(); + + $data = json_decode($response->body(), TRUE); + + $this->assertEquals('followed', $data['body']); + $this->assertEquals($expect_body, $data['rq_body']); + } + + /** + * Provider for test_triggers_header_callbacks + * + * @return array + */ + public function provider_triggers_header_callbacks() + { + return array( + // Straightforward response manipulation + array( + array('X-test-1' => + function($request, $response, $client) + { + $response->body(json_encode(array('body'=>'test1-body-changed'))); + return $response; + }), + $this->_dummy_uri(200, array('X-test-1' => 'foo'), 'test1-body'), + 'test1-body-changed' + ), + // Subsequent request execution + array( + array('X-test-2' => + function($request, $response, $client) + { + return Request::factory($response->headers('X-test-2')); + }), + $this->_dummy_uri(200, + array('X-test-2' => $this->_dummy_uri(200, NULL, 'test2-subsequent-body')), + 'test2-orig-body'), + 'test2-subsequent-body' + ), + // No callbacks triggered + array( + array('X-test-3' => + function ($request, $response, $client) + { + throw new Exception("Unexpected execution of X-test-3 callback"); + }), + $this->_dummy_uri(200, array('X-test-1' => 'foo'), 'test3-body'), + 'test3-body' + ), + // Callbacks not triggered once a previous callback has created a new response + array( + array( + 'X-test-1' => + function($request, $response, $client) + { + return Request::factory($response->headers('X-test-1')); + }, + 'X-test-2' => + function($request, $response, $client) + { + return Request::factory($response->headers('X-test-2')); + } + ), + $this->_dummy_uri(200, + array( + 'X-test-1' => $this->_dummy_uri(200, NULL, 'test1-subsequent-body'), + 'X-test-2' => $this->_dummy_uri(200, NULL, 'test2-subsequent-body') + ), + 'test2-orig-body'), + 'test1-subsequent-body' + ), + // Nested callbacks are supported if callback creates new request + array( + array( + 'X-test-1' => + function($request, $response, $client) + { + return Request::factory($response->headers('X-test-1')); + }, + 'X-test-2' => + function($request, $response, $client) + { + return Request::factory($response->headers('X-test-2')); + } + ), + $this->_dummy_uri(200, + array( + 'X-test-1' => $this->_dummy_uri( + 200, + array('X-test-2' => $this->_dummy_uri(200, NULL, 'test2-subsequent-body')), + 'test1-subsequent-body'), + ), + 'test-orig-body'), + 'test2-subsequent-body' + ), + ); + } + + /** + * Tests that header callbacks are triggered in sequence when specific headers + * are present in the response + * + * @dataProvider provider_triggers_header_callbacks + * + * @param array $callbacks Array of header callbacks + * @param array $headers Headers that will be received in the response + * @param string $expect_body Response body content to expect + */ + public function test_triggers_header_callbacks($callbacks, $uri, $expect_body) + { + $response = Request::factory($uri, + array('header_callbacks' => $callbacks)) + ->execute(); + + $data = json_decode($response->body(), TRUE); + + $this->assertEquals($expect_body, $data['body']); + } + + /** + * Tests that the Request_Client is protected from too many recursions of + * requests triggered by header callbacks. + * + */ + public function test_deep_recursive_callbacks_are_aborted() + { + $uri = $this->_dummy_uri('200', array('x-cb' => '1'), 'body'); + + // Temporary property to track requests + $this->requests_executed = 0; + + try + { + $response = Request::factory( + $uri, + array( + 'header_callbacks' => array( + 'x-cb' => + function ($request, $response, $client) + { + $client->callback_params('testcase')->requests_executed++; + // Recurse into a new request + return Request::factory($request->uri()); + }), + 'max_callback_depth' => 2, + 'callback_params' => array( + 'testcase' => $this, + ) + )) + ->execute(); + } + catch (Request_Client_Recursion_Exception $e) + { + // Verify that two requests were executed + $this->assertEquals(2, $this->requests_executed); + return; + } + + $this->fail('Expected Request_Client_Recursion_Exception was not thrown'); + } + + /** + * Header callback for testing that arbitrary callback_params are available + * to the callback. + * + * @param Request $request + * @param Response $response + * @param Request_Client $client + */ + public function callback_assert_params($request, $response, $client) + { + $this->assertEquals('foo', $client->callback_params('constructor_param')); + $this->assertEquals('bar', $client->callback_params('setter_param')); + $response->body('assertions_ran'); + } + + /** + * Test that arbitrary callback_params can be passed to the callback through + * the Request_Client and are assigned to subsequent requests + */ + public function test_client_can_hold_params_for_callbacks() + { + // Test with param in constructor + $request = Request::factory( + $this->_dummy_uri( + 302, + array('Location' => $this->_dummy_uri('200',array('X-cb'=>'1'), 'followed')), + 'not-followed'), + array( + 'follow' => TRUE, + 'header_callbacks' => array( + 'x-cb' => array($this, 'callback_assert_params'), + 'location' => 'Request_Client::on_header_location', + ), + 'callback_params' => array( + 'constructor_param' => 'foo' + ) + )); + + // Test passing param to setter + $request->client()->callback_params('setter_param', 'bar'); + + // Callback will throw assertion exceptions when executed + $response = $request->execute(); + $this->assertEquals('assertions_ran', $response->body()); + } + +} // End Kohana_Request_ClientTest + + +/** + * Dummy controller class that acts as a shunt - passing back request information + * in the response to allow inspection. + */ +class Controller_RequestClientDummy extends Controller { + + /** + * Takes a urlencoded 'data' parameter from the route and uses it to craft a + * response. Redirect chains can be tested by passing another encoded uri + * as a location header with an appropriate status code. + */ + public function action_fake() + { + parse_str(urldecode($this->request->param('data')), $data); + $this->response->status(Arr::get($data, 'status', 200)); + $this->response->headers(Arr::get($data, 'header', array())); + $this->response->body(json_encode(array( + 'body'=> Arr::get($data,'body','ok'), + 'rq_headers' => $this->request->headers(), + 'rq_body' => $this->request->body(), + 'rq_method' => $this->request->method(), + ))); + } + +} // End Controller_RequestClientDummy diff --git a/~dev_rating/system/tests/kohana/request/client/ExternalTest.php b/~dev_rating/system/tests/kohana/request/client/ExternalTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2c97501a74803c7501fb560a54d3714242ad6281 --- /dev/null +++ b/~dev_rating/system/tests/kohana/request/client/ExternalTest.php @@ -0,0 +1,191 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); +/** + * Unit tests for external request client + * + * @group kohana + * @group kohana.request + * @group kohana.request.client + * @group kohana.request.client.external + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Request_Client_ExternalTest extends Unittest_TestCase { + + /** + * Provider for test_factory() + * + * @return array + */ + public function provider_factory() + { + Request_Client_External::$client = 'Request_Client_Stream'; + + $return = array( + array( + array(), + NULL, + 'Request_Client_Stream' + ), + array( + array(), + 'Request_Client_Stream', + 'Request_Client_Stream' + ) + ); + + if (extension_loaded('curl')) + { + $return[] = array( + array(), + 'Request_Client_Curl', + 'Request_Client_Curl' + ); + } + + if (extension_loaded('http')) + { + $return[] = array( + array(), + 'Request_Client_HTTP', + 'Request_Client_HTTP' + ); + } + + return $return; + } + + /** + * Tests the [Request_Client_External::factory()] method + * + * @dataProvider provider_factory + * + * @param array $params params + * @param string $client client + * @param Request_Client_External $expected expected + * @return void + */ + public function test_factory($params, $client, $expected) + { + $this->assertInstanceOf($expected, Request_Client_External::factory($params, $client)); + } + + /** + * Data provider for test_options + * + * @return array + */ + public function provider_options() + { + return array( + array( + NULL, + NULL, + array() + ), + array( + array('foo' => 'bar', 'stfu' => 'snafu'), + NULL, + array('foo' => 'bar', 'stfu' => 'snafu') + ), + array( + 'foo', + 'bar', + array('foo' => 'bar') + ), + array( + array('foo' => 'bar'), + 'foo', + array('foo' => 'bar') + ) + ); + } + + /** + * Tests the [Request_Client_External::options()] method + * + * @dataProvider provider_options + * + * @param mixed $key key + * @param mixed $value value + * @param array $expected expected + * @return void + */ + public function test_options($key, $value, $expected) + { + // Create a mock external client + $client = new Request_Client_Stream; + + $client->options($key, $value); + $this->assertSame($expected, $client->options()); + } + + /** + * Data provider for test_execute + * + * @return array + */ + public function provider_execute() + { + $json = '{"foo": "bar", "snafu": "stfu"}'; + $post = array('foo' => 'bar', 'snafu' => 'stfu'); + + return array( + array( + 'application/json', + $json, + array(), + array( + 'content-type' => 'application/json', + 'body' => $json + ) + ), + array( + 'application/json', + $json, + $post, + array( + 'content-type' => 'application/x-www-form-urlencoded; charset='.Kohana::$charset, + 'body' => http_build_query($post, NULL, '&') + ) + ) + ); + } + + /** + * Tests the [Request_Client_External::_send_message()] method + * + * @dataProvider provider_execute + * + * @return void + */ + public function test_execute($content_type, $body, $post, $expected) + { + $old_request = Request::$initial; + Request::$initial = TRUE; + + // Create a mock Request + $request = new Request('http://kohanaframework.org/'); + $request->method(HTTP_Request::POST) + ->headers('content-type', $content_type) + ->body($body) + ->post($post); + + $client = $this->getMock('Request_Client_External', array('_send_message')); + $client->expects($this->once()) + ->method('_send_message') + ->with($request) + ->will($this->returnValue($this->getMock('Response'))); + + $request->client($client); + + $this->assertInstanceOf('Response', $request->execute()); + $this->assertSame($expected['body'], $request->body()); + $this->assertSame($expected['content-type'], (string) $request->headers('content-type')); + + Request::$initial = $old_request; + } +} \ No newline at end of file diff --git a/~dev_rating/system/tests/kohana/request/client/InternalTest.php b/~dev_rating/system/tests/kohana/request/client/InternalTest.php new file mode 100644 index 0000000000000000000000000000000000000000..2c87893cd63262b261617888b625c485726914de --- /dev/null +++ b/~dev_rating/system/tests/kohana/request/client/InternalTest.php @@ -0,0 +1,68 @@ +<?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run'); + +/** + * Unit tests for internal request client + * + * @group kohana + * @group kohana.core + * @group kohana.core.request + * @group kohana.core.request.client + * @group kohana.core.request.client.internal + * + * @package Kohana + * @category Tests + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Kohana_Request_Client_InternalTest extends Unittest_TestCase +{ + public function provider_response_failure_status() + { + return array( + array('', 'Welcome', 'missing_action', 'Welcome/missing_action', 404), + array('kohana3', 'missing_controller', 'index', 'kohana3/missing_controller/index', 404), + array('', 'Template', 'missing_action', 'kohana3/Template/missing_action', 500), + ); + } + + /** + * Tests for correct exception messages + * + * @test + * @dataProvider provider_response_failure_status + * + * @return null + */ + public function test_response_failure_status($directory, $controller, $action, $uri, $expected) + { + // Mock for request object + $request = $this->getMock('Request', array('directory', 'controller', 'action', 'uri', 'response'), array($uri)); + + $request->expects($this->any()) + ->method('directory') + ->will($this->returnValue($directory)); + + $request->expects($this->any()) + ->method('controller') + ->will($this->returnValue($controller)); + + $request->expects($this->any()) + ->method('action') + ->will($this->returnValue($action)); + + $request->expects($this->any()) + ->method('uri') + ->will($this->returnValue($uri)); + + $request->expects($this->any()) + ->method('response') + ->will($this->returnValue($this->getMock('Response'))); + + $internal_client = new Request_Client_Internal; + + $response = $internal_client->execute($request); + + $this->assertSame($expected, $response->status()); + } +} \ No newline at end of file diff --git a/~dev_rating/system/tests/test_data/callback_routes.php b/~dev_rating/system/tests/test_data/callback_routes.php new file mode 100644 index 0000000000000000000000000000000000000000..6e69f5a32a0e19efc05a90a8b141c95dd26a8bf6 --- /dev/null +++ b/~dev_rating/system/tests/test_data/callback_routes.php @@ -0,0 +1,100 @@ +<?php +/** + * A holding class for route callback tests + * + * @group kohana + * + * @package Unittest + * @author Kohana Team + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +class Route_Holder +{ + /** + * Just an empty callback that doesn't match anything + */ + public static function default_callback($uri) + { + + } + + /** + * Just an empty callback that matches everything + * + * @return array + */ + public static function default_return_callback($uri) + { + return array( + + ); + } + + /** + * Route callback for test_matches_returns_array_of_parameters_on_successful_match + * + * @return array + */ + public static function matches_returns_array_of_parameters_on_successful_match($uri) + { + return array( + 'controller' => 'welcome', + 'action' => 'index', + ); + } + + /** + * Route callback for test_required_parameters_are_needed + * + * @return array + */ + public static function required_parameters_are_needed($uri) + { + if (substr($uri, 0, 5) == 'admin') + { + return array( + 'controller' => 'foo', + 'action' => 'bar', + ); + } + } + + /** + * Route callback for test reverse_routing_returns_routes_uri_if_route_is_static + * + * @return array + */ + public static function reverse_routing_returns_routes_uri_if_route_is_static($uri) + { + if ($uri == 'info/about_us') + { + return array( + + ); + } + } + + /** + * Route callback for test route_filter_modify_params + * + * @return array + */ + public static function route_filter_modify_params_array(Route $route, $params) + { + $params['action'] = 'modified'; + + return $params; + } + + /** + * Route callback for test route_filter_modify_params + * + * @return array + */ + public static function route_filter_modify_params_false(Route $route, $params) + { + return FALSE; + } + +} \ No newline at end of file diff --git a/~dev_rating/system/tests/test_data/github.png b/~dev_rating/system/tests/test_data/github.png new file mode 100644 index 0000000000000000000000000000000000000000..81176849612fc7d246de8e4e03a68d51e1a90ca8 Binary files /dev/null and b/~dev_rating/system/tests/test_data/github.png differ diff --git a/~dev_rating/system/tests/test_data/views/test.css.php b/~dev_rating/system/tests/test_data/views/test.css.php new file mode 100644 index 0000000000000000000000000000000000000000..5c294dcf648b8194188249ec970ef48a105a35b5 --- /dev/null +++ b/~dev_rating/system/tests/test_data/views/test.css.php @@ -0,0 +1 @@ +This is a view with a dot in the filename. \ No newline at end of file diff --git a/~dev_rating/system/utf8/from_unicode.php b/~dev_rating/system/utf8/from_unicode.php new file mode 100644 index 0000000000000000000000000000000000000000..75471aef6af74c5ffdd4094f5b2135d1cd22f676 --- /dev/null +++ b/~dev_rating/system/utf8/from_unicode.php @@ -0,0 +1,72 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::from_unicode + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _from_unicode($arr) +{ + ob_start(); + + $keys = array_keys($arr); + + foreach ($keys as $k) + { + // ASCII range (including control chars) + if (($arr[$k] >= 0) AND ($arr[$k] <= 0x007f)) + { + echo chr($arr[$k]); + } + // 2 byte sequence + elseif ($arr[$k] <= 0x07ff) + { + echo chr(0xc0 | ($arr[$k] >> 6)); + echo chr(0x80 | ($arr[$k] & 0x003f)); + } + // Byte order mark (skip) + elseif ($arr[$k] == 0xFEFF) + { + // nop -- zap the BOM + } + // Test for illegal surrogates + elseif ($arr[$k] >= 0xD800 AND $arr[$k] <= 0xDFFF) + { + // Found a surrogate + throw new UTF8_Exception("UTF8::from_unicode: Illegal surrogate at index: ':index', value: ':value'", array( + ':index' => $k, + ':value' => $arr[$k], + )); + } + // 3 byte sequence + elseif ($arr[$k] <= 0xffff) + { + echo chr(0xe0 | ($arr[$k] >> 12)); + echo chr(0x80 | (($arr[$k] >> 6) & 0x003f)); + echo chr(0x80 | ($arr[$k] & 0x003f)); + } + // 4 byte sequence + elseif ($arr[$k] <= 0x10ffff) + { + echo chr(0xf0 | ($arr[$k] >> 18)); + echo chr(0x80 | (($arr[$k] >> 12) & 0x3f)); + echo chr(0x80 | (($arr[$k] >> 6) & 0x3f)); + echo chr(0x80 | ($arr[$k] & 0x3f)); + } + // Out of range + else + { + throw new UTF8_Exception("UTF8::from_unicode: Codepoint out of Unicode range at index: ':index', value: ':value'", array( + ':index' => $k, + ':value' => $arr[$k], + )); + } + } + + $result = ob_get_contents(); + ob_end_clean(); + return $result; +} diff --git a/~dev_rating/system/utf8/ltrim.php b/~dev_rating/system/utf8/ltrim.php new file mode 100644 index 0000000000000000000000000000000000000000..a4ac843336eb09290b45d97364bf94fc320a2e22 --- /dev/null +++ b/~dev_rating/system/utf8/ltrim.php @@ -0,0 +1,22 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::ltrim + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _ltrim($str, $charlist = NULL) +{ + if ($charlist === NULL) + return ltrim($str); + + if (UTF8::is_ascii($charlist)) + return ltrim($str, $charlist); + + $charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist); + + return preg_replace('/^['.$charlist.']+/u', '', $str); +} diff --git a/~dev_rating/system/utf8/ord.php b/~dev_rating/system/utf8/ord.php new file mode 100644 index 0000000000000000000000000000000000000000..28a5254ec959110efac1fb955b0ab14ef6c804d1 --- /dev/null +++ b/~dev_rating/system/utf8/ord.php @@ -0,0 +1,72 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::ord + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _ord($chr) +{ + $ord0 = ord($chr); + + if ($ord0 >= 0 AND $ord0 <= 127) + return $ord0; + + if ( ! isset($chr[1])) + { + throw new UTF8_Exception('Short sequence - at least 2 bytes expected, only 1 seen'); + } + + $ord1 = ord($chr[1]); + + if ($ord0 >= 192 AND $ord0 <= 223) + return ($ord0 - 192) * 64 + ($ord1 - 128); + + if ( ! isset($chr[2])) + { + throw new UTF8_Exception('Short sequence - at least 3 bytes expected, only 2 seen'); + } + + $ord2 = ord($chr[2]); + + if ($ord0 >= 224 AND $ord0 <= 239) + return ($ord0 - 224) * 4096 + ($ord1 - 128) * 64 + ($ord2 - 128); + + if ( ! isset($chr[3])) + { + throw new UTF8_Exception('Short sequence - at least 4 bytes expected, only 3 seen'); + } + + $ord3 = ord($chr[3]); + + if ($ord0 >= 240 AND $ord0 <= 247) + return ($ord0 - 240) * 262144 + ($ord1 - 128) * 4096 + ($ord2-128) * 64 + ($ord3 - 128); + + if ( ! isset($chr[4])) + { + throw new UTF8_Exception('Short sequence - at least 5 bytes expected, only 4 seen'); + } + + $ord4 = ord($chr[4]); + + if ($ord0 >= 248 AND $ord0 <= 251) + return ($ord0 - 248) * 16777216 + ($ord1-128) * 262144 + ($ord2 - 128) * 4096 + ($ord3 - 128) * 64 + ($ord4 - 128); + + if ( ! isset($chr[5])) + { + throw new UTF8_Exception('Short sequence - at least 6 bytes expected, only 5 seen'); + } + + if ($ord0 >= 252 AND $ord0 <= 253) + return ($ord0 - 252) * 1073741824 + ($ord1 - 128) * 16777216 + ($ord2 - 128) * 262144 + ($ord3 - 128) * 4096 + ($ord4 - 128) * 64 + (ord($chr[5]) - 128); + + if ($ord0 >= 254 AND $ord0 <= 255) + { + throw new UTF8_Exception("Invalid UTF-8 with surrogate ordinal ':ordinal'", array( + ':ordinal' => $ord0, + )); + } +} diff --git a/~dev_rating/system/utf8/rtrim.php b/~dev_rating/system/utf8/rtrim.php new file mode 100644 index 0000000000000000000000000000000000000000..a116af327f86497966d3bf715a710c5ffefbd03e --- /dev/null +++ b/~dev_rating/system/utf8/rtrim.php @@ -0,0 +1,22 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::rtrim + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _rtrim($str, $charlist = NULL) +{ + if ($charlist === NULL) + return rtrim($str); + + if (UTF8::is_ascii($charlist)) + return rtrim($str, $charlist); + + $charlist = preg_replace('#[-\[\]:\\\\^/]#', '\\\\$0', $charlist); + + return preg_replace('/['.$charlist.']++$/uD', '', $str); +} diff --git a/~dev_rating/system/utf8/str_ireplace.php b/~dev_rating/system/utf8/str_ireplace.php new file mode 100644 index 0000000000000000000000000000000000000000..81e72e5c29a02e3beeb4244fa79f04a283db469f --- /dev/null +++ b/~dev_rating/system/utf8/str_ireplace.php @@ -0,0 +1,70 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::str_ireplace + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _str_ireplace($search, $replace, $str, & $count = NULL) +{ + if (UTF8::is_ascii($search) AND UTF8::is_ascii($replace) AND UTF8::is_ascii($str)) + return str_ireplace($search, $replace, $str, $count); + + if (is_array($str)) + { + foreach ($str as $key => $val) + { + $str[$key] = UTF8::str_ireplace($search, $replace, $val, $count); + } + return $str; + } + + if (is_array($search)) + { + $keys = array_keys($search); + + foreach ($keys as $k) + { + if (is_array($replace)) + { + if (array_key_exists($k, $replace)) + { + $str = UTF8::str_ireplace($search[$k], $replace[$k], $str, $count); + } + else + { + $str = UTF8::str_ireplace($search[$k], '', $str, $count); + } + } + else + { + $str = UTF8::str_ireplace($search[$k], $replace, $str, $count); + } + } + return $str; + } + + $search = UTF8::strtolower($search); + $str_lower = UTF8::strtolower($str); + + $total_matched_strlen = 0; + $i = 0; + + while (preg_match('/(.*?)'.preg_quote($search, '/').'/s', $str_lower, $matches)) + { + $matched_strlen = strlen($matches[0]); + $str_lower = substr($str_lower, $matched_strlen); + + $offset = $total_matched_strlen + strlen($matches[1]) + ($i * (strlen($replace) - 1)); + $str = substr_replace($str, $replace, $offset, strlen($search)); + + $total_matched_strlen += $matched_strlen; + $i++; + } + + $count += $i; + return $str; +} diff --git a/~dev_rating/system/utf8/str_pad.php b/~dev_rating/system/utf8/str_pad.php new file mode 100644 index 0000000000000000000000000000000000000000..1812a303797ece59361aaf11975240553d3ef141 --- /dev/null +++ b/~dev_rating/system/utf8/str_pad.php @@ -0,0 +1,52 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::str_pad + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _str_pad($str, $final_str_length, $pad_str = ' ', $pad_type = STR_PAD_RIGHT) +{ + if (UTF8::is_ascii($str) AND UTF8::is_ascii($pad_str)) + return str_pad($str, $final_str_length, $pad_str, $pad_type); + + $str_length = UTF8::strlen($str); + + if ($final_str_length <= 0 OR $final_str_length <= $str_length) + return $str; + + $pad_str_length = UTF8::strlen($pad_str); + $pad_length = $final_str_length - $str_length; + + if ($pad_type == STR_PAD_RIGHT) + { + $repeat = ceil($pad_length / $pad_str_length); + return UTF8::substr($str.str_repeat($pad_str, $repeat), 0, $final_str_length); + } + + if ($pad_type == STR_PAD_LEFT) + { + $repeat = ceil($pad_length / $pad_str_length); + return UTF8::substr(str_repeat($pad_str, $repeat), 0, floor($pad_length)).$str; + } + + if ($pad_type == STR_PAD_BOTH) + { + $pad_length /= 2; + $pad_length_left = floor($pad_length); + $pad_length_right = ceil($pad_length); + $repeat_left = ceil($pad_length_left / $pad_str_length); + $repeat_right = ceil($pad_length_right / $pad_str_length); + + $pad_left = UTF8::substr(str_repeat($pad_str, $repeat_left), 0, $pad_length_left); + $pad_right = UTF8::substr(str_repeat($pad_str, $repeat_right), 0, $pad_length_right); + return $pad_left.$str.$pad_right; + } + + throw new UTF8_Exception("UTF8::str_pad: Unknown padding type (:pad_type)", array( + ':pad_type' => $pad_type, + )); +} diff --git a/~dev_rating/system/utf8/str_split.php b/~dev_rating/system/utf8/str_split.php new file mode 100644 index 0000000000000000000000000000000000000000..dfc6d92e976449f674f4fded988f948c7dcebff6 --- /dev/null +++ b/~dev_rating/system/utf8/str_split.php @@ -0,0 +1,27 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::str_split + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _str_split($str, $split_length = 1) +{ + $split_length = (int) $split_length; + + if (UTF8::is_ascii($str)) + return str_split($str, $split_length); + + if ($split_length < 1) + return FALSE; + + if (UTF8::strlen($str) <= $split_length) + return array($str); + + preg_match_all('/.{'.$split_length.'}|[^\x00]{1,'.$split_length.'}$/us', $str, $matches); + + return $matches[0]; +} diff --git a/~dev_rating/system/utf8/strcasecmp.php b/~dev_rating/system/utf8/strcasecmp.php new file mode 100644 index 0000000000000000000000000000000000000000..6e4dc5ff5ed4bef4b46e0db1f4d549ecaddff2cd --- /dev/null +++ b/~dev_rating/system/utf8/strcasecmp.php @@ -0,0 +1,19 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strcasecmp + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strcasecmp($str1, $str2) +{ + if (UTF8::is_ascii($str1) AND UTF8::is_ascii($str2)) + return strcasecmp($str1, $str2); + + $str1 = UTF8::strtolower($str1); + $str2 = UTF8::strtolower($str2); + return strcmp($str1, $str2); +} diff --git a/~dev_rating/system/utf8/strcspn.php b/~dev_rating/system/utf8/strcspn.php new file mode 100644 index 0000000000000000000000000000000000000000..9f1f71ba12da6c2483398e619c77e46ba1b8d1be --- /dev/null +++ b/~dev_rating/system/utf8/strcspn.php @@ -0,0 +1,30 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strcspn + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strcspn($str, $mask, $offset = NULL, $length = NULL) +{ + if ($str == '' OR $mask == '') + return 0; + + if (UTF8::is_ascii($str) AND UTF8::is_ascii($mask)) + return ($offset === NULL) ? strcspn($str, $mask) : (($length === NULL) ? strcspn($str, $mask, $offset) : strcspn($str, $mask, $offset, $length)); + + if ($offset !== NULL OR $length !== NULL) + { + $str = UTF8::substr($str, $offset, $length); + } + + // Escape these characters: - [ ] . : \ ^ / + // The . and : are escaped to prevent possible warnings about POSIX regex elements + $mask = preg_replace('#[-[\].:\\\\^/]#', '\\\\$0', $mask); + preg_match('/^[^'.$mask.']+/u', $str, $matches); + + return isset($matches[0]) ? UTF8::strlen($matches[0]) : 0; +} diff --git a/~dev_rating/system/utf8/stristr.php b/~dev_rating/system/utf8/stristr.php new file mode 100644 index 0000000000000000000000000000000000000000..11797270ddc91f3bdf91f3697f80f378ce5146b4 --- /dev/null +++ b/~dev_rating/system/utf8/stristr.php @@ -0,0 +1,28 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::stristr + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _stristr($str, $search) +{ + if (UTF8::is_ascii($str) AND UTF8::is_ascii($search)) + return stristr($str, $search); + + if ($search == '') + return $str; + + $str_lower = UTF8::strtolower($str); + $search_lower = UTF8::strtolower($search); + + preg_match('/^(.*?)'.preg_quote($search_lower, '/').'/s', $str_lower, $matches); + + if (isset($matches[1])) + return substr($str, strlen($matches[1])); + + return FALSE; +} diff --git a/~dev_rating/system/utf8/strlen.php b/~dev_rating/system/utf8/strlen.php new file mode 100644 index 0000000000000000000000000000000000000000..147b3375980162058e0059478ca1f275feef4ac6 --- /dev/null +++ b/~dev_rating/system/utf8/strlen.php @@ -0,0 +1,17 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strlen + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strlen($str) +{ + if (UTF8::is_ascii($str)) + return strlen($str); + + return strlen(utf8_decode($str)); +} diff --git a/~dev_rating/system/utf8/strpos.php b/~dev_rating/system/utf8/strpos.php new file mode 100644 index 0000000000000000000000000000000000000000..bbc632129cb4840febd15e93f5c13efb137bb77f --- /dev/null +++ b/~dev_rating/system/utf8/strpos.php @@ -0,0 +1,27 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strpos + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strpos($str, $search, $offset = 0) +{ + $offset = (int) $offset; + + if (UTF8::is_ascii($str) AND UTF8::is_ascii($search)) + return strpos($str, $search, $offset); + + if ($offset == 0) + { + $array = explode($search, $str, 2); + return isset($array[1]) ? UTF8::strlen($array[0]) : FALSE; + } + + $str = UTF8::substr($str, $offset); + $pos = UTF8::strpos($str, $search); + return ($pos === FALSE) ? FALSE : ($pos + $offset); +} diff --git a/~dev_rating/system/utf8/strrev.php b/~dev_rating/system/utf8/strrev.php new file mode 100644 index 0000000000000000000000000000000000000000..6e2f0caccd3f60f72fdcc17a0bd2a7eff6457c95 --- /dev/null +++ b/~dev_rating/system/utf8/strrev.php @@ -0,0 +1,18 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strrev + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strrev($str) +{ + if (UTF8::is_ascii($str)) + return strrev($str); + + preg_match_all('/./us', $str, $matches); + return implode('', array_reverse($matches[0])); +} diff --git a/~dev_rating/system/utf8/strrpos.php b/~dev_rating/system/utf8/strrpos.php new file mode 100644 index 0000000000000000000000000000000000000000..0565dbf371ea8280ce288fb5008c996a6d31537d --- /dev/null +++ b/~dev_rating/system/utf8/strrpos.php @@ -0,0 +1,27 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strrpos + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strrpos($str, $search, $offset = 0) +{ + $offset = (int) $offset; + + if (UTF8::is_ascii($str) AND UTF8::is_ascii($search)) + return strrpos($str, $search, $offset); + + if ($offset == 0) + { + $array = explode($search, $str, -1); + return isset($array[0]) ? UTF8::strlen(implode($search, $array)) : FALSE; + } + + $str = UTF8::substr($str, $offset); + $pos = UTF8::strrpos($str, $search); + return ($pos === FALSE) ? FALSE : ($pos + $offset); +} diff --git a/~dev_rating/system/utf8/strspn.php b/~dev_rating/system/utf8/strspn.php new file mode 100644 index 0000000000000000000000000000000000000000..e95fe85dafad30f2e95cd613dfb2cac25258e331 --- /dev/null +++ b/~dev_rating/system/utf8/strspn.php @@ -0,0 +1,30 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strspn + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strspn($str, $mask, $offset = NULL, $length = NULL) +{ + if ($str == '' OR $mask == '') + return 0; + + if (UTF8::is_ascii($str) AND UTF8::is_ascii($mask)) + return ($offset === NULL) ? strspn($str, $mask) : (($length === NULL) ? strspn($str, $mask, $offset) : strspn($str, $mask, $offset, $length)); + + if ($offset !== NULL OR $length !== NULL) + { + $str = UTF8::substr($str, $offset, $length); + } + + // Escape these characters: - [ ] . : \ ^ / + // The . and : are escaped to prevent possible warnings about POSIX regex elements + $mask = preg_replace('#[-[\].:\\\\^/]#', '\\\\$0', $mask); + preg_match('/^[^'.$mask.']+/u', $str, $matches); + + return isset($matches[0]) ? UTF8::strlen($matches[0]) : 0; +} diff --git a/~dev_rating/system/utf8/strtolower.php b/~dev_rating/system/utf8/strtolower.php new file mode 100644 index 0000000000000000000000000000000000000000..fd1cc94bffee36917be1d78f305c5c45755556af --- /dev/null +++ b/~dev_rating/system/utf8/strtolower.php @@ -0,0 +1,81 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strtolower + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strtolower($str) +{ + if (UTF8::is_ascii($str)) + return strtolower($str); + + static $utf8_upper_to_lower = NULL; + + if ($utf8_upper_to_lower === NULL) + { + $utf8_upper_to_lower = array( + 0x0041=>0x0061, 0x03A6=>0x03C6, 0x0162=>0x0163, 0x00C5=>0x00E5, 0x0042=>0x0062, + 0x0139=>0x013A, 0x00C1=>0x00E1, 0x0141=>0x0142, 0x038E=>0x03CD, 0x0100=>0x0101, + 0x0490=>0x0491, 0x0394=>0x03B4, 0x015A=>0x015B, 0x0044=>0x0064, 0x0393=>0x03B3, + 0x00D4=>0x00F4, 0x042A=>0x044A, 0x0419=>0x0439, 0x0112=>0x0113, 0x041C=>0x043C, + 0x015E=>0x015F, 0x0143=>0x0144, 0x00CE=>0x00EE, 0x040E=>0x045E, 0x042F=>0x044F, + 0x039A=>0x03BA, 0x0154=>0x0155, 0x0049=>0x0069, 0x0053=>0x0073, 0x1E1E=>0x1E1F, + 0x0134=>0x0135, 0x0427=>0x0447, 0x03A0=>0x03C0, 0x0418=>0x0438, 0x00D3=>0x00F3, + 0x0420=>0x0440, 0x0404=>0x0454, 0x0415=>0x0435, 0x0429=>0x0449, 0x014A=>0x014B, + 0x0411=>0x0431, 0x0409=>0x0459, 0x1E02=>0x1E03, 0x00D6=>0x00F6, 0x00D9=>0x00F9, + 0x004E=>0x006E, 0x0401=>0x0451, 0x03A4=>0x03C4, 0x0423=>0x0443, 0x015C=>0x015D, + 0x0403=>0x0453, 0x03A8=>0x03C8, 0x0158=>0x0159, 0x0047=>0x0067, 0x00C4=>0x00E4, + 0x0386=>0x03AC, 0x0389=>0x03AE, 0x0166=>0x0167, 0x039E=>0x03BE, 0x0164=>0x0165, + 0x0116=>0x0117, 0x0108=>0x0109, 0x0056=>0x0076, 0x00DE=>0x00FE, 0x0156=>0x0157, + 0x00DA=>0x00FA, 0x1E60=>0x1E61, 0x1E82=>0x1E83, 0x00C2=>0x00E2, 0x0118=>0x0119, + 0x0145=>0x0146, 0x0050=>0x0070, 0x0150=>0x0151, 0x042E=>0x044E, 0x0128=>0x0129, + 0x03A7=>0x03C7, 0x013D=>0x013E, 0x0422=>0x0442, 0x005A=>0x007A, 0x0428=>0x0448, + 0x03A1=>0x03C1, 0x1E80=>0x1E81, 0x016C=>0x016D, 0x00D5=>0x00F5, 0x0055=>0x0075, + 0x0176=>0x0177, 0x00DC=>0x00FC, 0x1E56=>0x1E57, 0x03A3=>0x03C3, 0x041A=>0x043A, + 0x004D=>0x006D, 0x016A=>0x016B, 0x0170=>0x0171, 0x0424=>0x0444, 0x00CC=>0x00EC, + 0x0168=>0x0169, 0x039F=>0x03BF, 0x004B=>0x006B, 0x00D2=>0x00F2, 0x00C0=>0x00E0, + 0x0414=>0x0434, 0x03A9=>0x03C9, 0x1E6A=>0x1E6B, 0x00C3=>0x00E3, 0x042D=>0x044D, + 0x0416=>0x0436, 0x01A0=>0x01A1, 0x010C=>0x010D, 0x011C=>0x011D, 0x00D0=>0x00F0, + 0x013B=>0x013C, 0x040F=>0x045F, 0x040A=>0x045A, 0x00C8=>0x00E8, 0x03A5=>0x03C5, + 0x0046=>0x0066, 0x00DD=>0x00FD, 0x0043=>0x0063, 0x021A=>0x021B, 0x00CA=>0x00EA, + 0x0399=>0x03B9, 0x0179=>0x017A, 0x00CF=>0x00EF, 0x01AF=>0x01B0, 0x0045=>0x0065, + 0x039B=>0x03BB, 0x0398=>0x03B8, 0x039C=>0x03BC, 0x040C=>0x045C, 0x041F=>0x043F, + 0x042C=>0x044C, 0x00DE=>0x00FE, 0x00D0=>0x00F0, 0x1EF2=>0x1EF3, 0x0048=>0x0068, + 0x00CB=>0x00EB, 0x0110=>0x0111, 0x0413=>0x0433, 0x012E=>0x012F, 0x00C6=>0x00E6, + 0x0058=>0x0078, 0x0160=>0x0161, 0x016E=>0x016F, 0x0391=>0x03B1, 0x0407=>0x0457, + 0x0172=>0x0173, 0x0178=>0x00FF, 0x004F=>0x006F, 0x041B=>0x043B, 0x0395=>0x03B5, + 0x0425=>0x0445, 0x0120=>0x0121, 0x017D=>0x017E, 0x017B=>0x017C, 0x0396=>0x03B6, + 0x0392=>0x03B2, 0x0388=>0x03AD, 0x1E84=>0x1E85, 0x0174=>0x0175, 0x0051=>0x0071, + 0x0417=>0x0437, 0x1E0A=>0x1E0B, 0x0147=>0x0148, 0x0104=>0x0105, 0x0408=>0x0458, + 0x014C=>0x014D, 0x00CD=>0x00ED, 0x0059=>0x0079, 0x010A=>0x010B, 0x038F=>0x03CE, + 0x0052=>0x0072, 0x0410=>0x0430, 0x0405=>0x0455, 0x0402=>0x0452, 0x0126=>0x0127, + 0x0136=>0x0137, 0x012A=>0x012B, 0x038A=>0x03AF, 0x042B=>0x044B, 0x004C=>0x006C, + 0x0397=>0x03B7, 0x0124=>0x0125, 0x0218=>0x0219, 0x00DB=>0x00FB, 0x011E=>0x011F, + 0x041E=>0x043E, 0x1E40=>0x1E41, 0x039D=>0x03BD, 0x0106=>0x0107, 0x03AB=>0x03CB, + 0x0426=>0x0446, 0x00DE=>0x00FE, 0x00C7=>0x00E7, 0x03AA=>0x03CA, 0x0421=>0x0441, + 0x0412=>0x0432, 0x010E=>0x010F, 0x00D8=>0x00F8, 0x0057=>0x0077, 0x011A=>0x011B, + 0x0054=>0x0074, 0x004A=>0x006A, 0x040B=>0x045B, 0x0406=>0x0456, 0x0102=>0x0103, + 0x039B=>0x03BB, 0x00D1=>0x00F1, 0x041D=>0x043D, 0x038C=>0x03CC, 0x00C9=>0x00E9, + 0x00D0=>0x00F0, 0x0407=>0x0457, 0x0122=>0x0123, + ); + } + + $uni = UTF8::to_unicode($str); + + if ($uni === FALSE) + return FALSE; + + for ($i = 0, $c = count($uni); $i < $c; $i++) + { + if (isset($utf8_upper_to_lower[$uni[$i]])) + { + $uni[$i] = $utf8_upper_to_lower[$uni[$i]]; + } + } + + return UTF8::from_unicode($uni); +} diff --git a/~dev_rating/system/utf8/strtoupper.php b/~dev_rating/system/utf8/strtoupper.php new file mode 100644 index 0000000000000000000000000000000000000000..a69568d64b8c220880ef8e51739e6e5837fd5307 --- /dev/null +++ b/~dev_rating/system/utf8/strtoupper.php @@ -0,0 +1,81 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::strtoupper + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _strtoupper($str) +{ + if (UTF8::is_ascii($str)) + return strtoupper($str); + + static $utf8_lower_to_upper = NULL; + + if ($utf8_lower_to_upper === NULL) + { + $utf8_lower_to_upper = array( + 0x0061=>0x0041, 0x03C6=>0x03A6, 0x0163=>0x0162, 0x00E5=>0x00C5, 0x0062=>0x0042, + 0x013A=>0x0139, 0x00E1=>0x00C1, 0x0142=>0x0141, 0x03CD=>0x038E, 0x0101=>0x0100, + 0x0491=>0x0490, 0x03B4=>0x0394, 0x015B=>0x015A, 0x0064=>0x0044, 0x03B3=>0x0393, + 0x00F4=>0x00D4, 0x044A=>0x042A, 0x0439=>0x0419, 0x0113=>0x0112, 0x043C=>0x041C, + 0x015F=>0x015E, 0x0144=>0x0143, 0x00EE=>0x00CE, 0x045E=>0x040E, 0x044F=>0x042F, + 0x03BA=>0x039A, 0x0155=>0x0154, 0x0069=>0x0049, 0x0073=>0x0053, 0x1E1F=>0x1E1E, + 0x0135=>0x0134, 0x0447=>0x0427, 0x03C0=>0x03A0, 0x0438=>0x0418, 0x00F3=>0x00D3, + 0x0440=>0x0420, 0x0454=>0x0404, 0x0435=>0x0415, 0x0449=>0x0429, 0x014B=>0x014A, + 0x0431=>0x0411, 0x0459=>0x0409, 0x1E03=>0x1E02, 0x00F6=>0x00D6, 0x00F9=>0x00D9, + 0x006E=>0x004E, 0x0451=>0x0401, 0x03C4=>0x03A4, 0x0443=>0x0423, 0x015D=>0x015C, + 0x0453=>0x0403, 0x03C8=>0x03A8, 0x0159=>0x0158, 0x0067=>0x0047, 0x00E4=>0x00C4, + 0x03AC=>0x0386, 0x03AE=>0x0389, 0x0167=>0x0166, 0x03BE=>0x039E, 0x0165=>0x0164, + 0x0117=>0x0116, 0x0109=>0x0108, 0x0076=>0x0056, 0x00FE=>0x00DE, 0x0157=>0x0156, + 0x00FA=>0x00DA, 0x1E61=>0x1E60, 0x1E83=>0x1E82, 0x00E2=>0x00C2, 0x0119=>0x0118, + 0x0146=>0x0145, 0x0070=>0x0050, 0x0151=>0x0150, 0x044E=>0x042E, 0x0129=>0x0128, + 0x03C7=>0x03A7, 0x013E=>0x013D, 0x0442=>0x0422, 0x007A=>0x005A, 0x0448=>0x0428, + 0x03C1=>0x03A1, 0x1E81=>0x1E80, 0x016D=>0x016C, 0x00F5=>0x00D5, 0x0075=>0x0055, + 0x0177=>0x0176, 0x00FC=>0x00DC, 0x1E57=>0x1E56, 0x03C3=>0x03A3, 0x043A=>0x041A, + 0x006D=>0x004D, 0x016B=>0x016A, 0x0171=>0x0170, 0x0444=>0x0424, 0x00EC=>0x00CC, + 0x0169=>0x0168, 0x03BF=>0x039F, 0x006B=>0x004B, 0x00F2=>0x00D2, 0x00E0=>0x00C0, + 0x0434=>0x0414, 0x03C9=>0x03A9, 0x1E6B=>0x1E6A, 0x00E3=>0x00C3, 0x044D=>0x042D, + 0x0436=>0x0416, 0x01A1=>0x01A0, 0x010D=>0x010C, 0x011D=>0x011C, 0x00F0=>0x00D0, + 0x013C=>0x013B, 0x045F=>0x040F, 0x045A=>0x040A, 0x00E8=>0x00C8, 0x03C5=>0x03A5, + 0x0066=>0x0046, 0x00FD=>0x00DD, 0x0063=>0x0043, 0x021B=>0x021A, 0x00EA=>0x00CA, + 0x03B9=>0x0399, 0x017A=>0x0179, 0x00EF=>0x00CF, 0x01B0=>0x01AF, 0x0065=>0x0045, + 0x03BB=>0x039B, 0x03B8=>0x0398, 0x03BC=>0x039C, 0x045C=>0x040C, 0x043F=>0x041F, + 0x044C=>0x042C, 0x00FE=>0x00DE, 0x00F0=>0x00D0, 0x1EF3=>0x1EF2, 0x0068=>0x0048, + 0x00EB=>0x00CB, 0x0111=>0x0110, 0x0433=>0x0413, 0x012F=>0x012E, 0x00E6=>0x00C6, + 0x0078=>0x0058, 0x0161=>0x0160, 0x016F=>0x016E, 0x03B1=>0x0391, 0x0457=>0x0407, + 0x0173=>0x0172, 0x00FF=>0x0178, 0x006F=>0x004F, 0x043B=>0x041B, 0x03B5=>0x0395, + 0x0445=>0x0425, 0x0121=>0x0120, 0x017E=>0x017D, 0x017C=>0x017B, 0x03B6=>0x0396, + 0x03B2=>0x0392, 0x03AD=>0x0388, 0x1E85=>0x1E84, 0x0175=>0x0174, 0x0071=>0x0051, + 0x0437=>0x0417, 0x1E0B=>0x1E0A, 0x0148=>0x0147, 0x0105=>0x0104, 0x0458=>0x0408, + 0x014D=>0x014C, 0x00ED=>0x00CD, 0x0079=>0x0059, 0x010B=>0x010A, 0x03CE=>0x038F, + 0x0072=>0x0052, 0x0430=>0x0410, 0x0455=>0x0405, 0x0452=>0x0402, 0x0127=>0x0126, + 0x0137=>0x0136, 0x012B=>0x012A, 0x03AF=>0x038A, 0x044B=>0x042B, 0x006C=>0x004C, + 0x03B7=>0x0397, 0x0125=>0x0124, 0x0219=>0x0218, 0x00FB=>0x00DB, 0x011F=>0x011E, + 0x043E=>0x041E, 0x1E41=>0x1E40, 0x03BD=>0x039D, 0x0107=>0x0106, 0x03CB=>0x03AB, + 0x0446=>0x0426, 0x00FE=>0x00DE, 0x00E7=>0x00C7, 0x03CA=>0x03AA, 0x0441=>0x0421, + 0x0432=>0x0412, 0x010F=>0x010E, 0x00F8=>0x00D8, 0x0077=>0x0057, 0x011B=>0x011A, + 0x0074=>0x0054, 0x006A=>0x004A, 0x045B=>0x040B, 0x0456=>0x0406, 0x0103=>0x0102, + 0x03BB=>0x039B, 0x00F1=>0x00D1, 0x043D=>0x041D, 0x03CC=>0x038C, 0x00E9=>0x00C9, + 0x00F0=>0x00D0, 0x0457=>0x0407, 0x0123=>0x0122, + ); + } + + $uni = UTF8::to_unicode($str); + + if ($uni === FALSE) + return FALSE; + + for ($i = 0, $c = count($uni); $i < $c; $i++) + { + if (isset($utf8_lower_to_upper[$uni[$i]])) + { + $uni[$i] = $utf8_lower_to_upper[$uni[$i]]; + } + } + + return UTF8::from_unicode($uni); +} diff --git a/~dev_rating/system/utf8/substr.php b/~dev_rating/system/utf8/substr.php new file mode 100644 index 0000000000000000000000000000000000000000..bf17dccf8e81a62b3a2b15583880764f5871f04f --- /dev/null +++ b/~dev_rating/system/utf8/substr.php @@ -0,0 +1,72 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::substr + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _substr($str, $offset, $length = NULL) +{ + if (UTF8::is_ascii($str)) + return ($length === NULL) ? substr($str, $offset) : substr($str, $offset, $length); + + // Normalize params + $str = (string) $str; + $strlen = UTF8::strlen($str); + $offset = (int) ($offset < 0) ? max(0, $strlen + $offset) : $offset; // Normalize to positive offset + $length = ($length === NULL) ? NULL : (int) $length; + + // Impossible + if ($length === 0 OR $offset >= $strlen OR ($length < 0 AND $length <= $offset - $strlen)) + return ''; + + // Whole string + if ($offset == 0 AND ($length === NULL OR $length >= $strlen)) + return $str; + + // Build regex + $regex = '^'; + + // Create an offset expression + if ($offset > 0) + { + // PCRE repeating quantifiers must be less than 65536, so repeat when necessary + $x = (int) ($offset / 65535); + $y = (int) ($offset % 65535); + $regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}'); + $regex .= ($y == 0) ? '' : ('.{'.$y.'}'); + } + + // Create a length expression + if ($length === NULL) + { + $regex .= '(.*)'; // No length set, grab it all + } + // Find length from the left (positive length) + elseif ($length > 0) + { + // Reduce length so that it can't go beyond the end of the string + $length = min($strlen - $offset, $length); + + $x = (int) ($length / 65535); + $y = (int) ($length % 65535); + $regex .= '('; + $regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}'); + $regex .= '.{'.$y.'})'; + } + // Find length from the right (negative length) + else + { + $x = (int) (-$length / 65535); + $y = (int) (-$length % 65535); + $regex .= '(.*)'; + $regex .= ($x == 0) ? '' : ('(?:.{65535}){'.$x.'}'); + $regex .= '.{'.$y.'}'; + } + + preg_match('/'.$regex.'/us', $str, $matches); + return $matches[1]; +} diff --git a/~dev_rating/system/utf8/substr_replace.php b/~dev_rating/system/utf8/substr_replace.php new file mode 100644 index 0000000000000000000000000000000000000000..b3a896c3436308717dea5a3db62dc9a300a5ecfc --- /dev/null +++ b/~dev_rating/system/utf8/substr_replace.php @@ -0,0 +1,22 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::substr_replace + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _substr_replace($str, $replacement, $offset, $length = NULL) +{ + if (UTF8::is_ascii($str)) + return ($length === NULL) ? substr_replace($str, $replacement, $offset) : substr_replace($str, $replacement, $offset, $length); + + $length = ($length === NULL) ? UTF8::strlen($str) : (int) $length; + preg_match_all('/./us', $str, $str_array); + preg_match_all('/./us', $replacement, $replacement_array); + + array_splice($str_array[0], $offset, $length, $replacement_array[0]); + return implode('', $str_array[0]); +} diff --git a/~dev_rating/system/utf8/to_unicode.php b/~dev_rating/system/utf8/to_unicode.php new file mode 100644 index 0000000000000000000000000000000000000000..d03eb626c0d135a1fecf50fc4806886148586d79 --- /dev/null +++ b/~dev_rating/system/utf8/to_unicode.php @@ -0,0 +1,145 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::to_unicode + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _to_unicode($str) +{ + // Cached expected number of octets after the current octet until the beginning of the next UTF8 character sequence + $m_state = 0; + // Cached Unicode character + $m_ucs4 = 0; + // Cached expected number of octets in the current sequence + $m_bytes = 1; + + $out = array(); + + $len = strlen($str); + + for ($i = 0; $i < $len; $i++) + { + $in = ord($str[$i]); + + if ($m_state == 0) + { + // When m_state is zero we expect either a US-ASCII character or a multi-octet sequence. + if (0 == (0x80 & $in)) + { + // US-ASCII, pass straight through. + $out[] = $in; + $m_bytes = 1; + } + elseif (0xC0 == (0xE0 & $in)) + { + // First octet of 2 octet sequence + $m_ucs4 = $in; + $m_ucs4 = ($m_ucs4 & 0x1F) << 6; + $m_state = 1; + $m_bytes = 2; + } + elseif (0xE0 == (0xF0 & $in)) + { + // First octet of 3 octet sequence + $m_ucs4 = $in; + $m_ucs4 = ($m_ucs4 & 0x0F) << 12; + $m_state = 2; + $m_bytes = 3; + } + elseif (0xF0 == (0xF8 & $in)) + { + // First octet of 4 octet sequence + $m_ucs4 = $in; + $m_ucs4 = ($m_ucs4 & 0x07) << 18; + $m_state = 3; + $m_bytes = 4; + } + elseif (0xF8 == (0xFC & $in)) + { + /** First octet of 5 octet sequence. + * + * This is illegal because the encoded codepoint must be either + * (a) not the shortest form or + * (b) outside the Unicode range of 0-0x10FFFF. + * Rather than trying to resynchronize, we will carry on until the end + * of the sequence and let the later error handling code catch it. + **/ + $m_ucs4 = $in; + $m_ucs4 = ($m_ucs4 & 0x03) << 24; + $m_state = 4; + $m_bytes = 5; + } + elseif (0xFC == (0xFE & $in)) + { + // First octet of 6 octet sequence, see comments for 5 octet sequence. + $m_ucs4 = $in; + $m_ucs4 = ($m_ucs4 & 1) << 30; + $m_state = 5; + $m_bytes = 6; + } + else + { + // Current octet is neither in the US-ASCII range nor a legal first octet of a multi-octet sequence. + trigger_error('UTF8::to_unicode: Illegal sequence identifier in UTF-8 at byte '.$i, E_USER_WARNING); + return FALSE; + } + } + else + { + // When m_state is non-zero, we expect a continuation of the multi-octet sequence + if (0x80 == (0xC0 & $in)) + { + // Legal continuation + $shift = ($m_state - 1) * 6; + $tmp = $in; + $tmp = ($tmp & 0x0000003F) << $shift; + $m_ucs4 |= $tmp; + + // End of the multi-octet sequence. mUcs4 now contains the final Unicode codepoint to be output + if (0 == --$m_state) + { + // Check for illegal sequences and codepoints + + // From Unicode 3.1, non-shortest form is illegal + if (((2 == $m_bytes) AND ($m_ucs4 < 0x0080)) OR + ((3 == $m_bytes) AND ($m_ucs4 < 0x0800)) OR + ((4 == $m_bytes) AND ($m_ucs4 < 0x10000)) OR + (4 < $m_bytes) OR + // From Unicode 3.2, surrogate characters are illegal + (($m_ucs4 & 0xFFFFF800) == 0xD800) OR + // Codepoints outside the Unicode range are illegal + ($m_ucs4 > 0x10FFFF)) + { + trigger_error('UTF8::to_unicode: Illegal sequence or codepoint in UTF-8 at byte '.$i, E_USER_WARNING); + return FALSE; + } + + if (0xFEFF != $m_ucs4) + { + // BOM is legal but we don't want to output it + $out[] = $m_ucs4; + } + + // Initialize UTF-8 cache + $m_state = 0; + $m_ucs4 = 0; + $m_bytes = 1; + } + } + else + { + // ((0xC0 & (*in) != 0x80) AND (m_state != 0)) + // Incomplete multi-octet sequence + throw new UTF8_Exception("UTF8::to_unicode: Incomplete multi-octet sequence in UTF-8 at byte ':byte'", array( + ':byte' => $i, + )); + } + } + } + + return $out; +} diff --git a/~dev_rating/system/utf8/transliterate_to_ascii.php b/~dev_rating/system/utf8/transliterate_to_ascii.php new file mode 100644 index 0000000000000000000000000000000000000000..898862d03b74191c96c2e9e8ffe8c1983f5d6027 --- /dev/null +++ b/~dev_rating/system/utf8/transliterate_to_ascii.php @@ -0,0 +1,77 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::transliterate_to_ascii + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _transliterate_to_ascii($str, $case = 0) +{ + static $utf8_lower_accents = NULL; + static $utf8_upper_accents = NULL; + + if ($case <= 0) + { + if ($utf8_lower_accents === NULL) + { + $utf8_lower_accents = array( + 'Г ' => 'a', 'Гґ' => 'o', 'ДЏ' => 'd', 'бёџ' => 'f', 'Г«' => 'e', 'ЕЎ' => 's', 'ЖЎ' => 'o', + 'Гџ' => 'ss', 'Дѓ' => 'a', 'Е™' => 'r', 'И›' => 't', 'Е€' => 'n', 'ДЃ' => 'a', 'Д·' => 'k', + 'Еќ' => 's', 'б»і' => 'y', 'Е†' => 'n', 'Дє' => 'l', 'Д§' => 'h', 'б№—' => 'p', 'Гі' => 'o', + 'Гє' => 'u', 'Д›' => 'e', 'Г©' => 'e', 'Г§' => 'c', 'бєЃ' => 'w', 'Д‹' => 'c', 'Гµ' => 'o', + 'б№Ў' => 's', 'Гё' => 'o', 'ДЈ' => 'g', 'Е§' => 't', 'И™' => 's', 'Д—' => 'e', 'Д‰' => 'c', + 'Е›' => 's', 'Г®' => 'i', 'Е±' => 'u', 'Д‡' => 'c', 'Д™' => 'e', 'Еµ' => 'w', 'ṫ' => 't', + 'Е«' => 'u', 'ДЌ' => 'c', 'Г¶' => 'o', 'ГЁ' => 'e', 'Е·' => 'y', 'Д…' => 'a', 'Е‚' => 'l', + 'Еі' => 'u', 'ЕЇ' => 'u', 'Еџ' => 's', 'Дџ' => 'g', 'Дј' => 'l', 'Ж’' => 'f', 'Еѕ' => 'z', + 'бєѓ' => 'w', 'бёѓ' => 'b', 'ГҐ' => 'a', 'Г¬' => 'i', 'ГЇ' => 'i', 'бё‹' => 'd', 'ЕҐ' => 't', + 'Е—' => 'r', 'Г¤' => 'a', 'Г' => 'i', 'Е•' => 'r', 'ГЄ' => 'e', 'Гј' => 'u', 'ГІ' => 'o', + 'Д“' => 'e', 'Г±' => 'n', 'Е„' => 'n', 'ДҐ' => 'h', 'Дќ' => 'g', 'Д‘' => 'd', 'Дµ' => 'j', + 'Гї' => 'y', 'Е©' => 'u', 'Е' => 'u', 'Ж°' => 'u', 'ЕЈ' => 't', 'ГЅ' => 'y', 'Е‘' => 'o', + 'Гў' => 'a', 'Дѕ' => 'l', 'бє…' => 'w', 'Еј' => 'z', 'Д«' => 'i', 'ГЈ' => 'a', 'ДЎ' => 'g', + 'б№Ѓ' => 'm', 'ЕЌ' => 'o', 'Д©' => 'i', 'Г№' => 'u', 'ДЇ' => 'i', 'Еє' => 'z', 'ГЎ' => 'a', + 'Г»' => 'u', 'Гѕ' => 'th', 'Г°' => 'dh', 'Г¦' => 'ae', 'Вµ' => 'u', 'Д•' => 'e', 'Д±' => 'i', + ); + } + + $str = str_replace( + array_keys($utf8_lower_accents), + array_values($utf8_lower_accents), + $str + ); + } + + if ($case >= 0) + { + if ($utf8_upper_accents === NULL) + { + $utf8_upper_accents = array( + 'ГЂ' => 'A', 'Г”' => 'O', 'ДЋ' => 'D', 'бёћ' => 'F', 'Г‹' => 'E', 'Е ' => 'S', 'Ж ' => 'O', + 'Д‚' => 'A', 'Е' => 'R', 'Иљ' => 'T', 'Е‡' => 'N', 'ДЂ' => 'A', 'Д¶' => 'K', 'Д”' => 'E', + 'Ењ' => 'S', 'б»І' => 'Y', 'Е…' => 'N', 'Д№' => 'L', 'Д¦' => 'H', 'б№–' => 'P', 'Г“' => 'O', + 'Гљ' => 'U', 'Дљ' => 'E', 'Г‰' => 'E', 'Г‡' => 'C', 'бєЂ' => 'W', 'ДЉ' => 'C', 'Г•' => 'O', + 'б№ ' => 'S', 'Г' => 'O', 'Дў' => 'G', 'Е¦' => 'T', 'И' => 'S', 'Д–' => 'E', 'Д€' => 'C', + 'Ељ' => 'S', 'ГЋ' => 'I', 'Е°' => 'U', 'Д†' => 'C', 'Д' => 'E', 'Еґ' => 'W', 'б№Є' => 'T', + 'ЕЄ' => 'U', 'ДЊ' => 'C', 'Г–' => 'O', 'Г€' => 'E', 'Е¶' => 'Y', 'Д„' => 'A', 'ЕЃ' => 'L', + 'ЕІ' => 'U', 'Е®' => 'U', 'Ећ' => 'S', 'Дћ' => 'G', 'Д»' => 'L', 'Ж‘' => 'F', 'ЕЅ' => 'Z', + 'бє‚' => 'W', 'бё‚' => 'B', 'Г…' => 'A', 'ГЊ' => 'I', 'ГЏ' => 'I', 'бёЉ' => 'D', 'Е¤' => 'T', + 'Е–' => 'R', 'Г„' => 'A', 'ГЌ' => 'I', 'Е”' => 'R', 'ГЉ' => 'E', 'Гњ' => 'U', 'Г’' => 'O', + 'Д’' => 'E', 'Г‘' => 'N', 'Еѓ' => 'N', 'Д¤' => 'H', 'Дњ' => 'G', 'Дђ' => 'D', 'Дґ' => 'J', + 'Её' => 'Y', 'ЕЁ' => 'U', 'Е¬' => 'U', 'ЖЇ' => 'U', 'Еў' => 'T', 'Гќ' => 'Y', 'Еђ' => 'O', + 'Г‚' => 'A', 'ДЅ' => 'L', 'бє„' => 'W', 'Е»' => 'Z', 'ДЄ' => 'I', 'Гѓ' => 'A', 'Д ' => 'G', + 'б№Ђ' => 'M', 'ЕЊ' => 'O', 'ДЁ' => 'I', 'Г™' => 'U', 'Д®' => 'I', 'Е№' => 'Z', 'ГЃ' => 'A', + 'Г›' => 'U', 'Гћ' => 'Th', 'Гђ' => 'Dh', 'Г†' => 'Ae', 'Д°' => 'I', + ); + } + + $str = str_replace( + array_keys($utf8_upper_accents), + array_values($utf8_upper_accents), + $str + ); + } + + return $str; +} diff --git a/~dev_rating/system/utf8/trim.php b/~dev_rating/system/utf8/trim.php new file mode 100644 index 0000000000000000000000000000000000000000..aca558ea30c3767f456ae70addddd99718047b4b --- /dev/null +++ b/~dev_rating/system/utf8/trim.php @@ -0,0 +1,17 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::trim + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _trim($str, $charlist = NULL) +{ + if ($charlist === NULL) + return trim($str); + + return UTF8::ltrim(UTF8::rtrim($str, $charlist), $charlist); +} diff --git a/~dev_rating/system/utf8/ucfirst.php b/~dev_rating/system/utf8/ucfirst.php new file mode 100644 index 0000000000000000000000000000000000000000..37bb956ae5dfebeb151b2867a28dbbd2de6ad5d9 --- /dev/null +++ b/~dev_rating/system/utf8/ucfirst.php @@ -0,0 +1,18 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::ucfirst + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _ucfirst($str) +{ + if (UTF8::is_ascii($str)) + return ucfirst($str); + + preg_match('/^(.?)(.*)$/us', $str, $matches); + return UTF8::strtoupper($matches[1]).$matches[2]; +} diff --git a/~dev_rating/system/utf8/ucwords.php b/~dev_rating/system/utf8/ucwords.php new file mode 100644 index 0000000000000000000000000000000000000000..1411ff1d47d4dec8030f230cdf34fa0d368435e0 --- /dev/null +++ b/~dev_rating/system/utf8/ucwords.php @@ -0,0 +1,23 @@ +<?php defined('SYSPATH') OR die('No direct script access.'); +/** + * UTF8::ucwords + * + * @package Kohana + * @author Kohana Team + * @copyright (c) 2007-2012 Kohana Team + * @copyright (c) 2005 Harry Fuecks + * @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + */ +function _ucwords($str) +{ + if (UTF8::is_ascii($str)) + return ucwords($str); + + // [\x0c\x09\x0b\x0a\x0d\x20] matches form feeds, horizontal tabs, vertical tabs, linefeeds and carriage returns. + // This corresponds to the definition of a 'word' defined at http://php.net/ucwords + return preg_replace( + '/(?<=^|[\x0c\x09\x0b\x0a\x0d\x20])[^\x0c\x09\x0b\x0a\x0d\x20]/ue', + 'UTF8::strtoupper(\'$0\')', + $str + ); +} diff --git a/~dev_rating/system/views/kohana/error.php b/~dev_rating/system/views/kohana/error.php new file mode 100644 index 0000000000000000000000000000000000000000..4d8b1d8f5bfc787b039d5c5e43ec0940517c1f8b --- /dev/null +++ b/~dev_rating/system/views/kohana/error.php @@ -0,0 +1,129 @@ +<?php defined('SYSPATH') OR die('No direct script access.') ?> +<?php + +// Unique error identifier +$error_id = uniqid('error'); + +?> +<style type="text/css"> +#kohana_error { background: #ddd; font-size: 1em; font-family:sans-serif; text-align: left; color: #111; } +#kohana_error h1, +#kohana_error h2 { margin: 0; padding: 1em; font-size: 1em; font-weight: normal; background: #911; color: #fff; } + #kohana_error h1 a, + #kohana_error h2 a { color: #fff; } +#kohana_error h2 { background: #222; } +#kohana_error h3 { margin: 0; padding: 0.4em 0 0; font-size: 1em; font-weight: normal; } +#kohana_error p { margin: 0; padding: 0.2em 0; } +#kohana_error a { color: #1b323b; } +#kohana_error pre { overflow: auto; white-space: pre-wrap; } +#kohana_error table { width: 100%; display: block; margin: 0 0 0.4em; padding: 0; border-collapse: collapse; background: #fff; } + #kohana_error table td { border: solid 1px #ddd; text-align: left; vertical-align: top; padding: 0.4em; } +#kohana_error div.content { padding: 0.4em 1em 1em; overflow: hidden; } +#kohana_error pre.source { margin: 0 0 1em; padding: 0.4em; background: #fff; border: dotted 1px #b7c680; line-height: 1.2em; } + #kohana_error pre.source span.line { display: block; } + #kohana_error pre.source span.highlight { background: #f0eb96; } + #kohana_error pre.source span.line span.number { color: #666; } +#kohana_error ol.trace { display: block; margin: 0 0 0 2em; padding: 0; list-style: decimal; } + #kohana_error ol.trace li { margin: 0; padding: 0; } +.js .collapsed { display: none; } +</style> +<script type="text/javascript"> +document.documentElement.className = document.documentElement.className + ' js'; +function koggle(elem) +{ + elem = document.getElementById(elem); + + if (elem.style && elem.style['display']) + // Only works with the "style" attr + var disp = elem.style['display']; + else if (elem.currentStyle) + // For MSIE, naturally + var disp = elem.currentStyle['display']; + else if (window.getComputedStyle) + // For most other browsers + var disp = document.defaultView.getComputedStyle(elem, null).getPropertyValue('display'); + + // Toggle the state of the "display" style + elem.style.display = disp == 'block' ? 'none' : 'block'; + return false; +} +</script> +<div id="kohana_error"> + <h1><span class="type"><?php echo $class ?> [ <?php echo $code ?> ]:</span> <span class="message"><?php echo htmlspecialchars( (string) $message, ENT_QUOTES, Kohana::$charset, TRUE); ?></span></h1> + <div id="<?php echo $error_id ?>" class="content"> + <p><span class="file"><?php echo Debug::path($file) ?> [ <?php echo $line ?> ]</span></p> + <?php echo Debug::source($file, $line) ?> + <ol class="trace"> + <?php foreach (Debug::trace($trace) as $i => $step): ?> + <li> + <p> + <span class="file"> + <?php if ($step['file']): $source_id = $error_id.'source'.$i; ?> + <a href="#<?php echo $source_id ?>" onclick="return koggle('<?php echo $source_id ?>')"><?php echo Debug::path($step['file']) ?> [ <?php echo $step['line'] ?> ]</a> + <?php else: ?> + {<?php echo __('PHP internal call') ?>} + <?php endif ?> + </span> + » + <?php echo $step['function'] ?>(<?php if ($step['args']): $args_id = $error_id.'args'.$i; ?><a href="#<?php echo $args_id ?>" onclick="return koggle('<?php echo $args_id ?>')"><?php echo __('arguments') ?></a><?php endif ?>) + </p> + <?php if (isset($args_id)): ?> + <div id="<?php echo $args_id ?>" class="collapsed"> + <table cellspacing="0"> + <?php foreach ($step['args'] as $name => $arg): ?> + <tr> + <td><code><?php echo $name ?></code></td> + <td><pre><?php echo Debug::dump($arg) ?></pre></td> + </tr> + <?php endforeach ?> + </table> + </div> + <?php endif ?> + <?php if (isset($source_id)): ?> + <pre id="<?php echo $source_id ?>" class="source collapsed"><code><?php echo $step['source'] ?></code></pre> + <?php endif ?> + </li> + <?php unset($args_id, $source_id); ?> + <?php endforeach ?> + </ol> + </div> + <h2><a href="#<?php echo $env_id = $error_id.'environment' ?>" onclick="return koggle('<?php echo $env_id ?>')"><?php echo __('Environment') ?></a></h2> + <div id="<?php echo $env_id ?>" class="content collapsed"> + <?php $included = get_included_files() ?> + <h3><a href="#<?php echo $env_id = $error_id.'environment_included' ?>" onclick="return koggle('<?php echo $env_id ?>')"><?php echo __('Included files') ?></a> (<?php echo count($included) ?>)</h3> + <div id="<?php echo $env_id ?>" class="collapsed"> + <table cellspacing="0"> + <?php foreach ($included as $file): ?> + <tr> + <td><code><?php echo Debug::path($file) ?></code></td> + </tr> + <?php endforeach ?> + </table> + </div> + <?php $included = get_loaded_extensions() ?> + <h3><a href="#<?php echo $env_id = $error_id.'environment_loaded' ?>" onclick="return koggle('<?php echo $env_id ?>')"><?php echo __('Loaded extensions') ?></a> (<?php echo count($included) ?>)</h3> + <div id="<?php echo $env_id ?>" class="collapsed"> + <table cellspacing="0"> + <?php foreach ($included as $file): ?> + <tr> + <td><code><?php echo Debug::path($file) ?></code></td> + </tr> + <?php endforeach ?> + </table> + </div> + <?php foreach (array('_SESSION', '_GET', '_POST', '_FILES', '_COOKIE', '_SERVER') as $var): ?> + <?php if (empty($GLOBALS[$var]) OR ! is_array($GLOBALS[$var])) continue ?> + <h3><a href="#<?php echo $env_id = $error_id.'environment'.strtolower($var) ?>" onclick="return koggle('<?php echo $env_id ?>')">$<?php echo $var ?></a></h3> + <div id="<?php echo $env_id ?>" class="collapsed"> + <table cellspacing="0"> + <?php foreach ($GLOBALS[$var] as $key => $value): ?> + <tr> + <td><code><?php echo htmlspecialchars( (string) $key, ENT_QUOTES, Kohana::$charset, TRUE); ?></code></td> + <td><pre><?php echo Debug::dump($value) ?></pre></td> + </tr> + <?php endforeach ?> + </table> + </div> + <?php endforeach ?> + </div> +</div> diff --git a/~dev_rating/system/views/kohana/generate_logo.php b/~dev_rating/system/views/kohana/generate_logo.php new file mode 100644 index 0000000000000000000000000000000000000000..6b99f1d750313f000aa71dc86a671d3329398f90 --- /dev/null +++ b/~dev_rating/system/views/kohana/generate_logo.php @@ -0,0 +1,14 @@ +<?php + +// Get the latest logo contents +$data = base64_encode(file_get_contents('http://kohanaframework.org/media/img/kohana.png')); + +// Create the logo file +file_put_contents('logo.php', "<?php +/** + * Kohana Logo, base64_encoded PNG + * + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +return array('mime' => 'image/png', 'data' => '{$data}'); ?>"); \ No newline at end of file diff --git a/~dev_rating/system/views/kohana/logo.php b/~dev_rating/system/views/kohana/logo.php new file mode 100644 index 0000000000000000000000000000000000000000..b19e68f46a6cf461e5e22da00b000b877a7e46bb --- /dev/null +++ b/~dev_rating/system/views/kohana/logo.php @@ -0,0 +1,8 @@ +<?php +/** + * Kohana Logo, base64_encoded PNG + * + * @copyright (c) 2008-2012 Kohana Team + * @license http://kohanaframework.org/license + */ +return array('mime' => 'image/png', 'data' => 'iVBORw0KGgoAAAANSUhEUgAAAL8AAAA+CAYAAAB6Bsp7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACtppVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMi4yLWMwNjMgNTMuMzUyNjI0LCAyMDA4LzA3LzMwLTE4OjA1OjQxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6eG1wUmlnaHRzPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvcmlnaHRzLyIKICAgeG1wUmlnaHRzOk1hcmtlZD0iRmFsc2UiCiAgIHhtcFJpZ2h0czpXZWJTdGF0ZW1lbnQ9IiI+CiAgIDxkYzpyaWdodHM+CiAgICA8cmRmOkFsdD4KICAgICA8cmRmOmxpIHhtbDpsYW5nPSJ4LWRlZmF1bHQiLz4KICAgIDwvcmRmOkFsdD4KICAgPC9kYzpyaWdodHM+CiAgIDx4bXBSaWdodHM6VXNhZ2VUZXJtcz4KICAgIDxyZGY6QWx0PgogICAgIDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCIvPgogICAgPC9yZGY6QWx0PgogICA8L3htcFJpZ2h0czpVc2FnZVRlcm1zPgogIDwvcmRmOkRlc2NyaXB0aW9uPgogPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgIAo8P3hwYWNrZXQgZW5kPSJ3Ij8+yvyVbAAAFqJJREFUeNrsXQ1wHMWV7l3tjyzLklb4D6M/y+bniDkLywQCBsOh4OQghalgCFwdYEiZ4yoXE3KFuaPgHEhV7FTAQAIE+y4EX0GIfSRgDrCxD/NjA0kwJ0sG/4CEtRLYxrJ3Ja2k/Zvp6zfTo+3pHe282V1ppUNd1V7v7nS/9/q9fu97r2dWLkopmWim9jPWF/GOabt4/5eJpRv95jqzIfuxE8Y/1Gayvon1i7Mc/w7r17F+dGIpx4fxuyeWb6g9mYPhEz72yYllHEcbB+H5c4EB+YAQl7Pe5HAeuxbmnhpo/Zz1a1nfPEprPloyZpI3V/2SLHS6lvMxqvKyyPDzbIz/r1h/KkcYkO3YFtbvYv0+1hePsDECrZ2srzQ+UE5sJYlDPyaEKplH0iTxnrGOFE37TrZ0H2T9bNZ/MooOD+jewXooR/06bZ18A5xSCHnZJnjXifG/OQqGNyZbrHkpUXo/IESN2gVOkpx0Dik7/43xKOZbXzH9/pBtgF9iMP/dX1XDh6b27WX/JJhnJ7bdM9BKlNA741HMr5p+H6MHmxeIH3iGudCEw5JHN5HEp6ttYQBlnrJ4wRbinjI/ZUjhd0ls3/dREMJTdyfx1vxT2ldAX+neps3FiOSe6HjKiKfqNuKp/od0NqJBRoLRUBXETMz6XW4S2/s94iqarEUCu+u9dXdZ0032kPiBu/ImY7q8tzK6d1h+j9UvfO//640k0fUfSD4po/t9Rvd2xkN5weUdjMYeZy/fsIM9A6xPMt5EdzcSNX6UGUQsM1xIUOKfez8pmbsy9dmHACH2MCA9mHFskq27UnYJCVzwB/OcrbcRNfS2trEYE/YKQq2OG1aIFAUWEX/DJrPXD+0m0b03MGYGRqC8oNN1l55Dis/bZpa/8ymSaF/DxBvIj4xW8k67kvjnbUj7GqtfmMflPYWx169fa8cnp+uaVEeK5/+OvdYWXN6fPrHh1vseffzp4WDPQtHw1b5WQuMnmDHEbSGAwmRQpb2k9u5FjmX/FFWYxsb330nUEzsJTfSy1RrUvTECith28OxKgiSPv0HinRvN/A4G2TU0P3SGoav2fEhi7Y+ZPWE8zGwglj8ZLegmjvwxXV4H+oV5aKwbrwtOl/Z/Svr33TUm5J1+SiWcxVQNZ/z1JiYHO9lcCvO8VItOmbqaZPZbUieMDerjFMV2rAJjJ6XGJr/4PUkeeZlB7wHUeOddlyfS/luzUoBnRR0Bema6vQcfTdt0I0czRXfw6JskW/2m5qHO6DLHFmV0aSJccHkXzju7hr1cMRzmrzcrpSPlCW0aeH7R+NW+fTp+RoyFy4omC2Gx6zm2aFF9R41QA7GS0R4zHwNBtLw5UGbOM2xeu569KS84cmRJPLSXZKvfXAiDfhOMtm/64oLKW1c1axZ7gQ1QZWX8ATP2YJADIIlNTgJwB2TxBYRkd6BDt2pEPgOwzyNunJ4WPRxQe7qDMeZZWNR2s3xzkp/x4HVp/7fdcLD2RRIfA526vA7oQispZnQ9LlKEODOHsWk5XuAK0t35sZb7YBvQ0+gi5U3Cck4yJ55Y/Wq5QZwymSE/o6TE7yJ+n4t4ipAVNEbb5a0ouLwDg1Ej+ayxMv5GM2Zv5Z6B2hqSp6TW/GGiRzd+m7GUY37D8wP00CZEeP04U0jCU0dmXPIb4j+lgUQ/eZQkDz2AWkyIVO7SGsn4O/SdaMOzTDf++Usk3nwrLkIysdyTzGtVcvb9pJZ1p82JvCpbY2/FfJKNfhWAEFFKpix4mJSffgtR+g+TgV2XE5oME5fLPsKqKjVF9kLJ2xbsOmIYvy3mV/uDPJMlGbuqQR6zQtX+TttxxlgXS3Y9pXVD0IOqFDUWDGnKnJs1A4TmP+0apgw/aixgUX+gQTB8RjcW1jXtkK7vtKvRdEFeWSnZNkfysu6ZXEey0W8ywcaWN2iGD62IzeMNnEdc1IXWr9tXUXB5O48eDfH/nmrl+WebFicSROF2JUm1BZEXliJgT1quEG5FjdPPFpghlQpJNkQbhmUwpWOg6xNCsbbptGSXZkeXpVDUrlxoeCRprbKGtVAJI14cXYg4XrMBovXLeJ40c7FEO8K8epF2RmMHP9wlY0PecG+fAXsGPBZlTgF3txoxC5Ww+ksl42dGTNAbp9ZsSCouCdMiTmmtiWeKTOA0zyAaMBi/k+ReoEu1RJmgk/t8eEEwhPihh1BrnOK5Liv9UgueaT+uOACbXcwFCyUvtEOHOwzPf8RjB3moERIxCetksyHp9VYFtbD+SgF+iHAJkWSbDDjeg06ytdKssOl0mKbi6LKxPoFnfa2c0K2zVG6ycxNJtG/Q6uCochXzgFq9nCIuhUhXOT8/+mUOisZ6dIjo0MkUSl5or7z5joH5T9obv2YMFLHLqNkD87EYCAGeweVNZeVKfwcbp9jSBb25WJ4heiSdLrUdq/Ik2zNF8IRAV6EouqKsqTwFv1ayUpTud0l0z0rtEEkv8cZJPuuAmo16yi3WKkv9cmhKMahA0m+h5I3GYtH2zi4D9sQ8GcucGn6m6F0mGpJi4HZkeDJ570gQFdpUCXcbdDGQCfh1M08mG4N+QmJPV06kNAig4kqk2nhx0/XsI4Pv3czA8YBuCCNQ/FatvC94WyzPkn71jaNkpd9CydsdCoeEt2me31TmVELMkBQE/FDhVgopm9eqJvb1Y2pACF410RY1GkaFU/AosoC0t0NfbYTxeyusxqooDCvTVSPc+B0m95pH+vMPmCGCIQySkWqwxumVHiS8VPSEVdSvDi+d67eQ8n554qRo/JkxP+0Log0pzRiwC6vqhx9uf4XgQXGhGIoMpqQzjsehsgE7GSvTTa0VYuOAIUwXcgXmYNTez9icsRE97QR50woSJ1txOY6Vo4DNrjjXbyHl/fzYl4bxR62qPaYyp9KHK4Mlk1SDECbifbgyp1YGE0NiJDh0X4bjcNofHLr3xHGVKNSKHqtYJNlKXwdqreCwxyfCQ6CrJPVk2abFEoQMximJs/WG085JPhd7JbaHTEPyTjFvWI1nhHNTLCKdEhHOYhxUXAopb8cXRwzj1149w5U5NciDrNbAJN5p89OMX48a1HaH+qYKFYgIVwgyUTbhUM2TIccmpbEa3WR2dPu518dUtthYt688K3mjMUpKG1eTysY7tfeRt5YTJfii/WMEVjwbMA3Js0cyJPVEC1K/4ChqCy6vVObUbuhy20IexEmah21F9+dbUnnUgQ0pCGF7yso2jqgUoIs6neULWyZ44Fg4VW5EnDqKi0NjvSkM65RuXzAFHxAnw54s5FU5XcMQoPmmLWRe0JuVvJqjwK6VxLMGEbW8DHHyLzuZAskLbe+BQ4bxn5Q9f705rOllP+xDNsnufaT32WoWa4q1RwD1e7VxEMJUcenF1cuTYIieFJZMQS2CSsIUyYAV5skwY63oOlkr7VR5WoNzeS0ObNS+TiaL2x56GJtOlFfjWcXDyzIraIqDlybjL5C80N7+y55hYY+5zBntQWE6bk66wcMNICTiqBabSABkEo2hA504+qebf7BIOdGKuwNVSsJSMA2R/FnQxa7VUMlQNCR0hYnRnZqlvBBdp2bHM7XiGblWQ8Y/BuTtOnrsiFjmlI3fXObsbkVVa3JpMYbp3JUNQ8akh1MH1RppZ6s9uDKn9uBMudVYZJlTootdKzn5cyIvRBZvlvJqxlCWXpDIphqnj+1AlzlFD1xIeaUyZygj7NEERCaA2bRogpL+KCFVlz8iGFELx87OF8eEQ4l9EuYXEnQnY2E90g0Jt1YyXafyFvkrsuJZz6ukSk93i/Vzp1aOokK6VZ3lc5iTcH3jlBMPdzSFlFcoc1p6fnOZs4djszzbfiypl6/A+Kuvf4kUz5Dxr4LGoUVlEpZE4lC4xlM+22QI6DInPJQh3eClhDtQa0Ulj+REXigJi/I64RmildsfsOAZ50XFHEXj5XgrvsxZMTbk7YlEjB9hOiJWKdPLnN0cWyHCE1wywIwZjLrIRUiJz0W8HpL2pE0kygyeXQM12+mX/YRUn7uc5cbSXYJahYigb7TyltdJngyPQ01hvFeobGGSv3KL6gUSqolKcSKvFjWmN0g84+SVkz8nPIOxectnW8MPDPY2VeMKIy+0tmCnqcwpGr8Z8vR2oI0BnmiigQYy+4aXNGOO7F5NEh8+klaLhd0+9+6ezAL3BtF5BtRo3cWiAXeicOjQ4ggGrONQgk7+/EK0Uo63oO8ilTeOgvSgmqLYenpMXrQLLW8uPMuOwkl+ROSKWoHkhfbG+3/5QoQ8Yp3fbPw9QfQT+glmSJUX/GjIixfX/g3ULtOum+x1kfinWzKHui9bmE5wv5xQzMKMenwv9/ofkXj7Via0/VhYGEU2hl7cLwlocBOSP3HT9eB/7QE2nU+k29OBHgvyGusH8sb2P4+SV+HymgzJAc9JyVHo0IWixielSFcoeaUy54Ds+U0ASYXwpBLc3ZxwL/6pDabDIhcpSjv4c7ncZGDrCjLgXQnPtGmTe2YsIKVXb3aczafmu53Nxw9B4FwB8cC7Ful9ZgNW2KajyLs5vQEp2YWDNQd3c3pNRtiBfjDDtH6ap4jqzxY6jDZOeB7S70ypFI184AfG+sSxBZL3ZE+P+LBAGuwxlznBGBA3l2nZvK9cUqhxdyNNi4HaXXwJ404+Fwnt30aKFx8e2qV04KRuwLhTAmk+XIP1851mDolq+DB/1B9xVF8hl9+Gkzd9rTzl0s1wmryIClMO8iYSDLPXNmTNM+jX7CiMk2Fc4inaRqHkPdz1xRdi4Scz7Al3oB9a90q7zAht9mOpHlKFxXFXztN/uU4dmQ704OdGJp+11JSE0UH8rRhpXjQcRD/w7ikzJ46uyVW8ZDhy8sbihJSde4tZR8daUDxb6VeNhpH6TXcWhZL3g30fB+Uyp2j8s9PKYIC9KcnYYQ2KKmanGQM8B4sZK3tR39yrhkKt3XinPcEU0RelxH/GNaS8cbkpFGv5DYJnwLAyz8ljLai1gi7CQ2j+r/3dEBwaSXlL6i9LL3PCr7Rlo1/IFxD0tdsTpI1TKHlf3/1eUIY8hvHPsSpj0aRq68mg0lMkn3aGO9CesEjyhMVfX0ko/AZOgqOfPHgDmGeALUq4n4XDudeQ065/RjLevagoB7dhAF/+medK8EFFRklqgg+6vHcSd9WleZU3aSNvzvoNBdFRQ1yrQsm7a8//Nr+wbccRucZvYP421gETzdJ2A8OlibIzyMnPmjMiM9htxQw7ly9cbioZapAJk9TA+Fnpf0xs6q1vkdCudeTE2+tIIhImuTbgs2TOpWTm15eTsnnXpJfUqi8mkaSfRHoHbRPWwHnLiX+WuVqD/pUJNf2BEGiVN7xEwkze7jzJC+yUzVtKZp5zjaW8uehX3zyH0fqViwOFkPeRZ579s/A2KBs/NCi5DP2u+PTb3ibTszE04wef0Ac+1j/fEVj0I62PRoMTyOq7g9ktvBblHJwtBGZbflfBZK0YJXlz0i/cDDcQzlm/oyXv+t+/8Jrg9dOM38D8u/JBzOUv1+KdXkbL3OGJJivPMJ6ay1/GZE2iZIXun9UwvuUtLtchEwK0F1q/YPi33/+g6PWbWe+yMv7/ggiR++JUkKLqi/TDP0zCW2lenCPHu4+N9KLsPXDowLU//Of1LQcPHcx1Lm/tJXAHla28WvIXSK89j6a8W9/Z/X5eImX1hTrkR8hcSP1Khq8VfdJkWb16tfH/bRtffNl3tPuEr9jnKyorLZ1iRwjukX6vueXjuTXVVUO7aepZJNL6B6ImYtodDlZPnMWh5MiSnmlLHiAub/HQ5w1XX/dEoGzKoMvlSpZPKZ3sYS0fC9Le2RV8Z8+HrY9tfO7N2+5dvWt/W3vk17/bvK+++rSkE1owTywRj5eWlEzWNrunmFBfOen7+DUGcV2aJ3FZYOdYknnB2ZeRKeekMOn+ts/az1xy9UanPDiR9951v9q68qdr3wd5n93yahul9Hg8kYjkol9P1QUk8vGrRB3s0Z6lHVa/rM9Yav4DHGULLnxotOSVLnmd9Y/SnLX4Z4lcZzZ8jb0sc0L4H2+8bvbj//avN5kqKKHD5MTOh0noT09bnoUATD71ygfI1EtTuO9od/fxUy9qemKsh/5n1j540U1Lv9MkfjbYtpOE3n+a9LT80fKcDCJizd9vJJNPv0wMy1uZd/rTWJfXSr/qYJicfOth0r1zHVq/YKBzmq56ugAigOG/a4lU5L/JxTbAt9nL+U5mf3XDr6749iWLvpELh1veeHPX1Xfc+T/8LYTHGSO8KIdYf5t1hl3IGU4GfvL6y7fMra2uzYU4hGaejEHtOTqK8p7jVL/Pr1u7+Pq/XXLpONVv17Aw3eoP0vEIUMP7qQhCRzrf2nZL1cwZF2TDJWDBWYuafi18BH81e4HAQ3GeFiTI+2f0YHObIO8iJ7SWfeubiV+s+vHymlkz52TDBNSeL75x+Uv87QHGy/NOeXAoL9DoykW/h17fcu3ptTVN+dAv42X1SMubyejlUqcZpx5s/sgKI2VMds9s2PHcQz/b8N0lTRf5vF6fk4W55xePviJ81M3oD+SrAoUq4R1sdkyr6pIr3mUe8eFFjec6KuFAon3lih/8t1x+y4aHHOTNSr9Prr73se9d+a1FFWVTynLQb17lZXxlP5bS/D2qBZDpwnPnL1m1YnnjvNPn1tRXV9VkSlL2ffJpUAiFQ46RLcyOcVH6O7PhVrbZz79p6VVnZ5IXfiD10OGOYPP+g8GbV923W/r630WvPMblvYxFuyW/vO+ei8aKfseM8XNmbnSKoYV2jC3Mk2ScNCYr4NYreejOpjUzeV8k46gxmb/L84Yxod9cjN+d78Vhwj3HXnaynnC6MKy/Mp4MgckKPP8n0Q9QsknIxpW8XOYX2MtrrPeNd/3m3fMLO7JSSlozJinjBepkkBdq4WfZyBsV5N01zuUtYS8XFlq/Ywr2TLRRafD8BVSroNrUnsd5V7EOFZ1vjkGZgbc1rK9n/XanfFttEveEHU20sYyyuFFDW8H6PYLhU/5Z1s0zsb4TbSyjK+n9nhxylQnPP04b/MDAdpL6e4+bLMK+8V0b95Zr+P+NBretnOSQyep6K2j1gXDddpL6oYM2iZ/h5pD5/oDPu53zB62Rf7dKkKVN8vxUGGfwDu0pYZwRHajAZ4DLbBkhJox/fLQ1XPlzuDcMSQpfIXy3lm+OzXyM8eMETfyzpmGuD0g0t3M6cE0l/36TtDmMOXYMM8cyTr9S8OIr+PXLBL5CAp+NHNfLEaCdY/q1wly38/dGW8+vWyHQD1nMN2H846g1CYqFdp3wXaOQAFPuDQO8i0a2jBv/cNc3SoZdzzE24Qa0VvLuIj/3WMxBOP12vjGe4sa6mY81NmajMHeAv+ZSGVovGf/64S6cMP7xA3syfbeZe0Ox7+CfrxA84A6b67H0sA0MfyH32O0CTDF4aRI2thEVQrlgez5XgM/VNGH8478ZRlwvwCDRuy6TqiIGRt4s4Oj1iOvFxLJdoBPgc+wQINcKwdOvGcZoDfxez737ZiES7eDftwubYZXAc7bNgDlGWTQ0fBZM6UQf+z3A+naaah/w13r+/Rrhu5OsrxDGPiVdm+n6VZwO/L9RoEP558YcbRI/8L5pGN63D0MrwD9bI9CmnK4xlgrzyjSMeVdJfBu80ww8aX3ikGuiZdPauCdfP0b5M4oACzNdNFHnn2j/HzdmvZ3hQ/s/AQYA0JN3gGAK3/0AAAAASUVORK5CYII='); ?> \ No newline at end of file diff --git a/~dev_rating/system/views/profiler/stats.php b/~dev_rating/system/views/profiler/stats.php new file mode 100644 index 0000000000000000000000000000000000000000..f3e286815864c1e14ca211135d7df424f7273464 --- /dev/null +++ b/~dev_rating/system/views/profiler/stats.php @@ -0,0 +1,74 @@ +<?php defined('SYSPATH') OR die('No direct script access.') ?> + +<style type="text/css"> +<?php include Kohana::find_file('views', 'profiler/style', 'css') ?> +</style> + +<?php +$group_stats = Profiler::group_stats(); +$group_cols = array('min', 'max', 'average', 'total'); +$application_cols = array('min', 'max', 'average', 'current'); +?> + +<div class="kohana"> + <?php foreach (Profiler::groups() as $group => $benchmarks): ?> + <table class="profiler"> + <tr class="group"> + <th class="name" rowspan="2"><?php echo __(ucfirst($group)) ?></th> + <td class="time" colspan="4"><?php echo number_format($group_stats[$group]['total']['time'], 6) ?> <abbr title="seconds">s</abbr></td> + </tr> + <tr class="group"> + <td class="memory" colspan="4"><?php echo number_format($group_stats[$group]['total']['memory'] / 1024, 4) ?> <abbr title="kilobyte">kB</abbr></td> + </tr> + <tr class="headers"> + <th class="name"><?php echo __('Benchmark') ?></th> + <?php foreach ($group_cols as $key): ?> + <th class="<?php echo $key ?>"><?php echo __(ucfirst($key)) ?></th> + <?php endforeach ?> + </tr> + <?php foreach ($benchmarks as $name => $tokens): ?> + <tr class="mark time"> + <?php $stats = Profiler::stats($tokens) ?> + <th class="name" rowspan="2" scope="rowgroup"><?php echo HTML::chars($name), ' (', count($tokens), ')' ?></th> + <?php foreach ($group_cols as $key): ?> + <td class="<?php echo $key ?>"> + <div> + <div class="value"><?php echo number_format($stats[$key]['time'], 6) ?> <abbr title="seconds">s</abbr></div> + <?php if ($key === 'total'): ?> + <div class="graph" style="left: <?php echo max(0, 100 - $stats[$key]['time'] / $group_stats[$group]['max']['time'] * 100) ?>%"></div> + <?php endif ?> + </div> + </td> + <?php endforeach ?> + </tr> + <tr class="mark memory"> + <?php foreach ($group_cols as $key): ?> + <td class="<?php echo $key ?>"> + <div> + <div class="value"><?php echo number_format($stats[$key]['memory'] / 1024, 4) ?> <abbr title="kilobyte">kB</abbr></div> + <?php if ($key === 'total'): ?> + <div class="graph" style="left: <?php echo max(0, 100 - $stats[$key]['memory'] / $group_stats[$group]['max']['memory'] * 100) ?>%"></div> + <?php endif ?> + </div> + </td> + <?php endforeach ?> + </tr> + <?php endforeach ?> + </table> + <?php endforeach ?> + + <table class="profiler"> + <?php $stats = Profiler::application() ?> + <tr class="final mark time"> + <th class="name" rowspan="2" scope="rowgroup"><?php echo __('Application Execution').' ('.$stats['count'].')' ?></th> + <?php foreach ($application_cols as $key): ?> + <td class="<?php echo $key ?>"><?php echo number_format($stats[$key]['time'], 6) ?> <abbr title="seconds">s</abbr></td> + <?php endforeach ?> + </tr> + <tr class="final mark memory"> + <?php foreach ($application_cols as $key): ?> + <td class="<?php echo $key ?>"><?php echo number_format($stats[$key]['memory'] / 1024, 4) ?> <abbr title="kilobyte">kB</abbr></td> + <?php endforeach ?> + </tr> + </table> +</div> \ No newline at end of file diff --git a/~dev_rating/system/views/profiler/style.css b/~dev_rating/system/views/profiler/style.css new file mode 100644 index 0000000000000000000000000000000000000000..e6af3a05ac4216bcc99277769c5d0dd55495b2c6 --- /dev/null +++ b/~dev_rating/system/views/profiler/style.css @@ -0,0 +1,27 @@ +.kohana table.profiler { width: 99%; margin: 0 auto 1em; border-collapse: collapse; } +.kohana table.profiler th, +.kohana table.profiler td { padding: 0.2em 0.4em; background: #fff; border: solid 1px #999; border-width: 1px 0; text-align: left; font-weight: normal; font-size: 1em; color: #111; vertical-align: top; text-align: right; } +.kohana table.profiler th.name { text-align: left; } +.kohana table.profiler tr.group th { font-size: 1.4em; background: #222; color: #eee; border-color: #222; } +.kohana table.profiler tr.group td { background: #222; color: #777; border-color: #222; } +.kohana table.profiler tr.group td.time { padding-bottom: 0; } +.kohana table.profiler tr.headers th { text-transform: lowercase; font-variant: small-caps; background: #ddd; color: #777; } +.kohana table.profiler tr.mark th.name { width: 40%; font-size: 1.2em; background: #fff; vertical-align: middle; } +.kohana table.profiler tr.mark td { padding: 0; } +.kohana table.profiler tr.mark.final td { padding: 0.2em 0.4em; } +.kohana table.profiler tr.mark td > div { position: relative; padding: 0.2em 0.4em; } +.kohana table.profiler tr.mark td div.value { position: relative; z-index: 2; } +.kohana table.profiler tr.mark td div.graph { position: absolute; top: 0; bottom: 0; right: 0; left: 100%; background: #71bdf0; z-index: 1; } +.kohana table.profiler tr.mark.memory td div.graph { background: #acd4f0; } +.kohana table.profiler tr.mark td.current { background: #eddecc; } +.kohana table.profiler tr.mark td.min { background: #d2f1cb; } +.kohana table.profiler tr.mark td.max { background: #ead3cb; } +.kohana table.profiler tr.mark td.average { background: #ddd; } +.kohana table.profiler tr.mark td.total { background: #d0e3f0; } +.kohana table.profiler tr.time td { border-bottom: 0; font-weight: bold; } +.kohana table.profiler tr.memory td { border-top: 0; } +.kohana table.profiler tr.final th.name { background: #222; color: #fff; } +.kohana table.profiler abbr { border: 0; color: #777; font-weight: normal; } +.kohana table.profiler:hover tr.group td { color: #ccc; } +.kohana table.profiler:hover tr.mark td div.graph { background: #1197f0; } +.kohana table.profiler:hover tr.mark.memory td div.graph { background: #7cc1f0; } \ No newline at end of file