X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=vendor%2Fsmarty%2Fsmarty%2Flibs%2Fplugins%2Ffunction.html_select_date.php;fp=vendor%2Fsmarty%2Fsmarty%2Flibs%2Fplugins%2Ffunction.html_select_date.php;h=3a48da0bbed89e503566c0e5cd8e045760e70434;hb=7f447368035b558931da5c1785560c4105ccd1e5;hp=0000000000000000000000000000000000000000;hpb=f97752383ab84cf6f95a56363e005a43d869e828;p=friendica.git
diff --git a/vendor/smarty/smarty/libs/plugins/function.html_select_date.php b/vendor/smarty/smarty/libs/plugins/function.html_select_date.php
new file mode 100644
index 0000000000..3a48da0bbe
--- /dev/null
+++ b/vendor/smarty/smarty/libs/plugins/function.html_select_date.php
@@ -0,0 +1,388 @@
+
+ * Name: html_select_date
+ * Purpose: Prints the dropdowns for date selection.
+ * ChangeLog:
+ *
+ * - 1.0 initial release
+ * - 1.1 added support for +/- N syntax for begin
+ * and end year values. (Monte)
+ * - 1.2 added support for yyyy-mm-dd syntax for
+ * time value. (Jan Rosier)
+ * - 1.3 added support for choosing format for
+ * month values (Gary Loescher)
+ * - 1.3.1 added support for choosing format for
+ * day values (Marcus Bointon)
+ * - 1.3.2 support negative timestamps, force year
+ * dropdown to include given date unless explicitly set (Monte)
+ * - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
+ * of 0000-00-00 dates (cybot, boots)
+ * - 2.0 complete rewrite for performance,
+ * added attributes month_names, *_id
+ *
+ *
+ * @link http://www.smarty.net/manual/en/language.function.html.select.date.php {html_select_date}
+ * (Smarty online manual)
+ * @version 2.0
+ * @author Andrei Zmievski
+ * @author Monte Ohrt
+ * @author Rodney Rehm
+ *
+ * @param array $params parameters
+ *
+ * @return string
+ */
+function smarty_function_html_select_date($params)
+{
+ if (!is_callable('smarty_function_escape_special_chars')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+ }
+ if (!is_callable('smarty_make_timestamp')) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+ }
+ // generate timestamps used for month names only
+ static $_month_timestamps = null;
+ static $_current_year = null;
+ if ($_month_timestamps === null) {
+ $_current_year = date('Y');
+ $_month_timestamps = array();
+ for ($i = 1; $i <= 12; $i ++) {
+ $_month_timestamps[ $i ] = mktime(0, 0, 0, $i, 1, 2000);
+ }
+ }
+
+ /* Default values. */
+ $prefix = "Date_";
+ $start_year = null;
+ $end_year = null;
+ $display_days = true;
+ $display_months = true;
+ $display_years = true;
+ $month_format = "%B";
+ /* Write months as numbers by default GL */
+ $month_value_format = "%m";
+ $day_format = "%02d";
+ /* Write day values using this format MB */
+ $day_value_format = "%d";
+ $year_as_text = false;
+ /* Display years in reverse order? Ie. 2000,1999,.... */
+ $reverse_years = false;
+ /* Should the select boxes be part of an array when returned from PHP?
+ e.g. setting it to "birthday", would create "birthday[Day]",
+ "birthday[Month]" & "birthday[Year]". Can be combined with prefix */
+ $field_array = null;
+ /*