mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-10-31 20:31:41 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			324 lines
		
	
	
		
			8.5 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			324 lines
		
	
	
		
			8.5 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="windows-1251"?>
 | |
| <!-- $Revision$ -->
 | |
| <sect1 id="language.function.html.select.date">
 | |
|  <title>html_select_date</title>
 | |
|  <informaltable frame="all">
 | |
|   <tgroup cols="5">
 | |
|   <colspec colname="param" align="center" />
 | |
|   <colspec colname="type" align="center" />
 | |
|   <colspec colname="required" align="center" />
 | |
|   <colspec colname="default" align="center" />
 | |
|   <colspec colname="desc" />
 | |
|   <thead>
 | |
|    <row>
 | |
|     <entry>Èìÿ àòòðèáóòà</entry>
 | |
|     <entry>Òèï</entry>
 | |
|     <entry>Îáÿçàòåëåí</entry>       
 | |
|     <entry>Ïî óìîë÷àíèþ</entry>
 | |
|     <entry>Îïèñàíèå</entry>
 | |
|    </row>
 | |
|   </thead>
 | |
|   <tbody>
 | |
|    <row>
 | |
|     <entry>prefix</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>Date_</entry>
 | |
|     <entry>ïðåôèêñ íàçâàíèé ïåðåìåííûõ</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>time</entry>
 | |
|     <entry>timestamp/ÃÃÃÃ-ÌÌ-ÄÄ</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>òåêóùåå âðåìÿ â ôîðìàòå unix timestamp 
 | |
|     èëè ÃÃÃÃ-ÌÌ-ÄÄ</entry>
 | |
|     <entry>èñïîëüçóåìîå âðåìÿ</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>start_year</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>òåêóùèé ãîä</entry>
 | |
|     <entry>Íà÷àëüíûé ãîä â âûïàäàþùåì ñïèèñêå. Ëèáî óêàçûâàåòñÿ
 | |
|     ÿâíî, ëèáî îòíîñèòåëüíî òåêóùåãî ãîäà (+/- N)</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>end_year</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>àíàëîãè÷íî start_year</entry>
 | |
|     <entry>Êîíå÷íûé ãîä â âûðàäàþùåì ñïèñêå. Ëèáî óêàçûâàåòñÿ
 | |
|     ÿâíî, ëèáî îòíîñèòåëüíî òåêóùåãî ãîäà (+/- N)</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>display_days</entry>
 | |
|     <entry>ëîãè÷åñêèé (boolean)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>true</entry>
 | |
|     <entry>âûâîäèòü ëè ñïèñîê äíåé</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>display_months</entry>
 | |
|     <entry>ëîãè÷åñêèé (boolean)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>true</entry>
 | |
|     <entry>âûâîäèòü ëè ñïèñîê ìåñÿöåâ</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>display_years</entry>
 | |
|     <entry>ëîãè÷åñêèé (boolean)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>true</entry>
 | |
|     <entry>âûâîäèòü ëè ñïèñîê ëåò</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>month_format</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>%B</entry>
 | |
|     <entry>Ôîðìàò íàçâàíèÿ ìåñÿöåâ (strftime)</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>day_format</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>%02d</entry>
 | |
|     <entry>ôîðìàò íàçâàíèÿ äíåé (sprintf)</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>day_value_format</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>%d</entry>
 | |
|     <entry>ôîðìàò çíà÷åíèÿ äíåé (sprintf)</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>year_as_text</entry>
 | |
|     <entry>ëîãè÷åñêèé (boolean)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>false</entry>
 | |
|     <entry>Âûâîäèòü ëè çíà÷åíèå ãîäà òåêñòîì</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>reverse_years</entry>
 | |
|     <entry>ëîãè÷åñêèé (boolean)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>false</entry>
 | |
|     <entry>Âûâîäèòü ãîäà â îáðàòíîì ïîðÿäêå</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>field_array</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>íàçâàíèå ïåðåìåííîé (name), êîòîðàÿ áóäåò
 | |
|     ñîäåðæàòü âûáðàííûå çíà÷åíèÿ â âèäå ìàññèâà:
 | |
| name[Day], name[Year], name[Month].
 | |
| </entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>day_size</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>Óñòàíàâëèâàåò àòòðèáóò size òýãà select 
 | |
|     äëÿ äíåé</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>month_size</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>Óñòàíàâëèâàåò àòòðèáóò size òýãà select 
 | |
|     äëÿ ìåñÿöåâ</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>year_size</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>Óñòàíàâëèâàåò àòòðèáóò size òýãà select 
 | |
|     äëÿ ëåò</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>all_extra</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>Óñòàíàâëèâàåò äîïîëíèòåëüíûå àòòðèáóòû äëÿ 
 | |
|     âñåõ òýãîâ select/input</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>day_extra</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>Óñòàíàâëèâàåò äîïîëíèòåëüíûå àòòðèáóòû òýãîâ 
 | |
|     select/input äëÿ äíåé</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>month_extra</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>Óñòàíàâëèâàåò äîïîëíèòåëüíûå àòòðèáóòû òýãîâ 
 | |
|     select/input äëÿ ìåñÿöåâ</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>year_extra</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>null</entry>
 | |
|     <entry>Óñòàíàâëèâàåò äîïîëíèòåëüíûå àòòðèáóòû òýãîâ 
 | |
|     select/input äëÿ ëåò</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>field_order</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>MDY</entry>
 | |
|     <entry>Ïîðÿäîê ñëåäîâàíèÿ ïîëåé (ÌÄÃ)</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>field_separator</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>\n</entry>
 | |
|     <entry>òåêñò, ðàçäëÿþùèé ïîëÿ</entry>
 | |
|    </row>
 | |
|    <row>
 | |
|     <entry>month_value_format</entry>
 | |
|     <entry>ñòðîêà (string)</entry>
 | |
|     <entry>Íåò</entry>
 | |
|     <entry>%m</entry>
 | |
|     <entry>ôîðìàò çíà÷åíèÿ ìåñÿöà (strftime).
 | |
|     Ïî óìîë÷àíèþ - %m (íîìåð ìåñÿöà).</entry>
 | |
|    </row>
 | |
|   </tbody>
 | |
|   </tgroup>
 | |
|  </informaltable>
 | |
|  <para>
 | |
|   ïîëüçîâàòåëüñêàÿ ôóíêöèÿ html_select_date ãåíåðèðóåò ïîëÿ âûáîðà 
 | |
|   äàòû.
 | |
|  </para>
 | |
|  <example>
 | |
|   <title>html_select_date</title>
 | |
|   <programlisting>
 | |
| <![CDATA[
 | |
| {html_select_date}
 | |
| 
 | |
| 
 | |
| OUTPUT:
 | |
| 
 | |
| <select name="Date_Month">
 | |
| <option value="1">January</option>
 | |
| <option value="2">February</option>
 | |
| <option value="3">March</option>
 | |
| <option value="4">April</option>
 | |
| <option value="5">May</option>
 | |
| <option value="6">June</option>
 | |
| <option value="7">July</option>
 | |
| <option value="8">August</option>
 | |
| <option value="9">September</option>
 | |
| <option value="10">October</option>
 | |
| <option value="11">November</option>
 | |
| <option value="12" selected>December</option>
 | |
| </select>
 | |
| <select name="Date_Day">
 | |
| <option value="1">01</option>
 | |
| <option value="2">02</option>
 | |
| <option value="3">03</option>
 | |
| <option value="4">04</option>
 | |
| <option value="5">05</option>
 | |
| <option value="6">06</option>
 | |
| <option value="7">07</option>
 | |
| <option value="8">08</option>
 | |
| <option value="9">09</option>
 | |
| <option value="10">10</option>
 | |
| <option value="11">11</option>
 | |
| <option value="12">12</option>
 | |
| <option value="13" selected>13</option>
 | |
| <option value="14">14</option>
 | |
| <option value="15">15</option>
 | |
| <option value="16">16</option>
 | |
| <option value="17">17</option>
 | |
| <option value="18">18</option>
 | |
| <option value="19">19</option>
 | |
| <option value="20">20</option>
 | |
| <option value="21">21</option>
 | |
| <option value="22">22</option>
 | |
| <option value="23">23</option>
 | |
| <option value="24">24</option>
 | |
| <option value="25">25</option>
 | |
| <option value="26">26</option>
 | |
| <option value="27">27</option>
 | |
| <option value="28">28</option>
 | |
| <option value="29">29</option>
 | |
| <option value="30">30</option>
 | |
| <option value="31">31</option>
 | |
| </select>
 | |
| <select name="Date_Year">
 | |
| <option value="2001" selected>2001</option>
 | |
| </select>
 | |
| ]]>
 | |
|   </programlisting>
 | |
|  </example>
 | |
| 
 | |
|  <example>
 | |
|   <title>html_select_date</title>
 | |
|   <programlisting>
 | |
| <![CDATA[
 | |
| {* start and end year can be relative to current year *}
 | |
| {html_select_date prefix="StartDate" time=$time start_year="-5" end_year="+1" display_days=false}
 | |
| 
 | |
| OUTPUT: (current year is 2000)
 | |
| 
 | |
| <select name="StartDateMonth">
 | |
| <option value="1">January</option>
 | |
| <option value="2">February</option>
 | |
| <option value="3">March</option>
 | |
| <option value="4">April</option>
 | |
| <option value="5">May</option>
 | |
| <option value="6">June</option>
 | |
| <option value="7">July</option>
 | |
| <option value="8">August</option>
 | |
| <option value="9">September</option>
 | |
| <option value="10">October</option>
 | |
| <option value="11">November</option>
 | |
| <option value="12" selected>December</option>
 | |
| </select>
 | |
| <select name="StartDateYear">
 | |
| <option value="1999">1995</option>
 | |
| <option value="1999">1996</option>
 | |
| <option value="1999">1997</option>
 | |
| <option value="1999">1998</option>
 | |
| <option value="1999">1999</option>
 | |
| <option value="2000" selected>2000</option>
 | |
| <option value="2001">2001</option>
 | |
| </select>
 | |
| ]]>
 | |
|   </programlisting>
 | |
|  </example>
 | |
|  
 | |
| </sect1>
 | |
| <!-- Keep this comment at the end of the file
 | |
| Local variables:
 | |
| mode: sgml
 | |
| sgml-omittag:t
 | |
| sgml-shorttag:t
 | |
| sgml-minimize-attributes:nil
 | |
| sgml-always-quote-attributes:t
 | |
| sgml-indent-step:1
 | |
| sgml-indent-data:t
 | |
| indent-tabs-mode:nil
 | |
| sgml-parent-document:nil
 | |
| sgml-default-dtd-file:"../../../../manual.ced"
 | |
| sgml-exposed-tags:nil
 | |
| sgml-local-catalogs:nil
 | |
| sgml-local-ecat-files:nil
 | |
| End:
 | |
| vim600: syn=xml fen fdm=syntax fdl=2 si
 | |
| vim: et tw=78 syn=sgml
 | |
| vi: ts=1 sw=1
 | |
| -->
 |