当前位置: 首页>>代码示例>>PHP>>正文


PHP smarty_function_html_select_date函数代码示例

本文整理汇总了PHP中smarty_function_html_select_date函数的典型用法代码示例。如果您正苦于以下问题:PHP smarty_function_html_select_date函数的具体用法?PHP smarty_function_html_select_date怎么用?PHP smarty_function_html_select_date使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了smarty_function_html_select_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: smarty_function_html_select_date

    }
    ?>
          </td>
          <td align="center" valign="top">
            <table>
                <tr>
                    <td class="default" align="right">From</td>
                    <td align="center" NOWRAP><?php 
    echo smarty_function_html_select_date(array('time' => $this->_tpl_vars['start_date'], 'prefix' => "", 'field_array' => 'start', 'start_year' => "-2", 'end_year' => "+1", 'field_order' => 'YMD', 'month_format' => "%b", 'year_empty' => 'year', 'month_empty' => 'mon', 'day_empty' => 'day', 'all_extra' => "class='default'"), $this);
    ?>
</td>
                </tr>
                <tr>
                    <td class="default" align="right">To</td>
                    <td align="center" NOWRAP><?php 
    echo smarty_function_html_select_date(array('time' => $this->_tpl_vars['end_date'], 'prefix' => "", 'field_array' => 'end', 'start_year' => "-2", 'end_year' => "+1", 'field_order' => 'YMD', 'month_format' => "%b", 'year_empty' => 'year', 'month_empty' => 'mon', 'day_empty' => 'day', 'all_extra' => "class='default'"), $this);
    ?>
</td>
                </tr>
            </table>
            <input type="button" name="clear_date" value="Clear Date" onClick="clearDate()" class="shortcut">
          </td>
          <td align="center" valign="top">
            <select name="display_sections[]" size="5" multiple class="default">
                <?php 
    echo smarty_function_html_options(array('options' => $this->_tpl_vars['sections'], 'selected' => $this->_tpl_vars['display_sections']), $this);
    ?>

            </select>
          </td>
        </tr>
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:%%213^%%2130712436^customer_stats.tpl.html.php

示例2: smarty_function_dataform2


//.........这里部分代码省略.........
                        $_tmp = '<input type="checkbox" checked name="' . $_key . '_keep" /> Conservar archivo actual (' . $_val . ')<br /><img src="' . URL . '/' . ALM_URI . '/themes/' . ALM_ADMIN_THEME . '/img/' . $_icon . '" alt="' . $_val . '" border="0" /><br />';
                    }
                    $_tmp .= '[' . $max_size . ']<input type="file" name="' . $_key . '" value="' . $_val . '" />';
                    break;
                case 'image':
                case 'img':
                    $_tmp = '';
                    $_icon = 'image.png';
                    $_tmp = '[' . $max_size . ']<input name="old_' . $_key . '" type="hidden" value="' . $_val . '" /><img src="' . URL . '/' . ALM_URI . '/themes/' . ALM_ADMIN_THEME . '/img/' . $_icon . '" border="0" alt="Imagen" title="Imagen" />';
                    if ($_val) {
                        $_tmp .= '<input type="checkbox" checked name="' . $_key . '_keep" /> Conservar archivo actual (' . $_val . ')<br /><img src="' . URL . '/' . ALM_URI . '/pic/50/' . $table . '/' . $_val . '" alt="' . $_val . '" width="50" border="0" /><br />';
                    }
                    $_tmp .= '<input type="file" name="' . $_key . '" value="' . $_val . '" />';
                    break;
                case 'boolean':
                case 'bool':
                    if (preg_match("/:/", $dd[$_key]['extra']['label_bool'])) {
                        list($_si, $_no) = preg_split('/:/', $dd[$_key]['extra']['label_bool']);
                        $_tchecked = $_val == 't' ? 'checked' : '';
                        $_fchecked = $_val == 'f' ? 'checked' : '';
                        $_tmp = $_si . '<input type="radio" name="' . $_key . '" ' . $_tchecked . ' value="on" />' . $_no . '<input type="radio" name="' . $_key . '" ' . $_fchecked . ' value="" />';
                    } else {
                        $_checked = $_val == 't' ? 'checked' : '';
                        $_tmp = '<input type="checkbox" name="' . $_key . '" ' . $_checked . ' />';
                    }
                    break;
                case 'datenull':
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    if (!isset($_val) || empty($_val)) {
                        $_val = '--';
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year, 'day_empty' => '--', 'month_empty' => '--', 'year_empty' => '--'), $smarty);
                    break;
                case 'date':
                    if (!$_val) {
                        $_val = $dd[$_key]['extra']['default'];
                    }
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year), $smarty);
                    break;
                case 'time':
                    $_tmp = smarty_function_html_select_time(array('prefix' => $_key . '_', 'time' => $_val, 'display_seconds' => false), $smarty);
                    break;
                case 'datetime':
                    if (!$_val) {
                        $_val = $dd[$_key]['extra']['default'];
                    }
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year), $smarty);
                    $_tmp .= smarty_function_html_select_time(array('prefix' => $_key . '_', 'time' => $_val, 'display_seconds' => false), $smarty);
                    break;
                case 'datetimenull':
                    if (!$_val) {
                        $_val = $dd[$_key]['extra']['default'];
                    }
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year, 'day_empty' => '--', 'month_empty' => '--', 'year_empty' => '--'), $smarty);
                    $_tmp .= smarty_function_html_select_time(array('prefix' => $_key . '_', 'time' => $_val, 'display_seconds' => false), $smarty);
开发者ID:ReneVallecillo,项目名称:almidon,代码行数:67,代码来源:function.dataform2.php

示例3: smarty_function_html_select_date

	</select>
	<?php 
echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "common.between"), $this);
?>

	<?php 
echo smarty_function_html_select_date(array('prefix' => 'dateFrom', 'time' => $this->_tpl_vars['dateFrom'], 'all_extra' => "class=\"selectMenu\"", 'year_empty' => "", 'month_empty' => "", 'day_empty' => "", 'start_year' => "-5", 'end_year' => "+1"), $this);
?>

	<?php 
echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "common.and"), $this);
?>

	<?php 
echo smarty_function_html_select_date(array('prefix' => 'dateTo', 'time' => $this->_tpl_vars['dateTo'], 'all_extra' => "class=\"selectMenu\"", 'year_empty' => "", 'month_empty' => "", 'day_empty' => "", 'start_year' => "-5", 'end_year' => "+1"), $this);
?>

	<input type="hidden" name="dateToHour" value="23" />
	<input type="hidden" name="dateToMinute" value="59" />
	<input type="hidden" name="dateToSecond" value="59" />
	<br/>
	<input type="submit" value="<?php 
echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "common.search"), $this);
?>
" class="button" />
</form>
&nbsp;

<?php 
if ($this->_tpl_vars['displayResults']) {
开发者ID:EreminDm,项目名称:water-cao,代码行数:30,代码来源:%%DE^DE1^DE14894A%%index.tpl.php

示例4: array

                $this->_smarty_include(array('smarty_include_tpl_file' => "error_icon.tpl.html", 'smarty_include_vars' => array('field' => "custom_field[" . $this->_tpl_vars['custom_field_id'] . "][Month]")));
                $this->_tpl_vars = $_smarty_tpl_vars;
                unset($_smarty_tpl_vars);
                ?>
                    <?php 
                echo smarty_function_html_select_date(array('field_array' => "custom_field[" . $this->_tpl_vars['custom_field_id'] . "]", 'prefix' => '', 'all_extra' => "class=\"default\"", 'day_empty' => '', 'time' => '--', 'display_months' => false, 'display_years' => false, 'day_value_format' => "%02d", 'day_extra' => "id=\"custom_field_" . $this->_tpl_vars['custom_field_id'] . "_day\" tabindex=\"" . $this->_tpl_vars['tabindex']++ . "\""), $this);
                ?>

                    <?php 
                $_smarty_tpl_vars = $this->_tpl_vars;
                $this->_smarty_include(array('smarty_include_tpl_file' => "error_icon.tpl.html", 'smarty_include_vars' => array('field' => "custom_field[" . $this->_tpl_vars['custom_field_id'] . "][Day]")));
                $this->_tpl_vars = $_smarty_tpl_vars;
                unset($_smarty_tpl_vars);
                ?>
                    <?php 
                echo smarty_function_html_select_date(array('field_array' => "custom_field[" . $this->_tpl_vars['custom_field_id'] . "]", 'prefix' => '', 'all_extra' => "class=\"default\"", 'year_empty' => '', 'time' => '--', 'display_months' => false, 'display_days' => false, 'start_year' => -1, 'end_year' => "+2", 'year_extra' => "id=\"custom_field_" . $this->_tpl_vars['custom_field_id'] . "_year\" tabindex=\"" . $this->_tpl_vars['tabindex']++ . "\""), $this);
                ?>

                    <?php 
                $_smarty_tpl_vars = $this->_tpl_vars;
                $this->_smarty_include(array('smarty_include_tpl_file' => "error_icon.tpl.html", 'smarty_include_vars' => array('field' => "custom_field[" . $this->_tpl_vars['custom_field_id'] . "][Year]")));
                $this->_tpl_vars = $_smarty_tpl_vars;
                unset($_smarty_tpl_vars);
                ?>
                  <?php 
            }
            ?>
                </td>
              <?php 
            if ($this->_foreach['custom_fields']['iteration'] % 2 != 1) {
                ?>
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:%%-12^%%-1228895191^adv_search.tpl.html.php

示例5: smarty_function_html_select_date

		</td>
	</tr>
	<tr>
		<td width=20% valign=top class=td1_left>
			&nbsp;&nbsp;Время показа:
		</td>
		<td class=td1_right>

			<table>
				<tr><td>C</td><td><?php 
echo smarty_function_html_select_date(array('prefix' => 'start_', 'start_year' => '2011', 'end_year' => '2021', 'time' => $this->_tpl_vars['curdate']), $this);
?>
</td></tr>
				<tr><td colspan="2" height="10"></td></tr>
				<tr><td>По</td><td><?php 
echo smarty_function_html_select_date(array('prefix' => 'end_', 'start_year' => '2011', 'end_year' => '2021', 'time' => $this->_tpl_vars['curdate2']), $this);
?>
</td></tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width=20% valign=top class=td1_left>&nbsp;</td>
		<td class=td1_right>&nbsp;</td>
	</tr>
	
	<?php 
if ($this->_tpl_vars['mode'] == 'edit') {
    ?>
	<tr>
		<td width=20% valign=top class=td1_left>&nbsp;&nbsp;Кликов:</td><td class=td1_right><?php 
开发者ID:askovorodka,项目名称:sqc,代码行数:31,代码来源:%%6B^6B0^6B056DB3%%banners.a_edit.html.php

示例6: content_56453e89398133_84829262

    function content_56453e89398133_84829262($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_capitalize')) {
            require_once '/var/www/html/smarty/libs/plugins/modifier.capitalize.php';
        }
        if (!is_callable('smarty_modifier_date_format')) {
            require_once '/var/www/html/smarty/libs/plugins/modifier.date_format.php';
        }
        if (!is_callable('smarty_function_html_select_date')) {
            require_once '/var/www/html/smarty/libs/plugins/function.html_select_date.php';
        }
        if (!is_callable('smarty_function_html_select_time')) {
            require_once '/var/www/html/smarty/libs/plugins/function.html_select_time.php';
        }
        if (!is_callable('smarty_function_html_options')) {
            require_once '/var/www/html/smarty/libs/plugins/function.html_options.php';
        }
        $_smarty_tpl->properties['nocache_hash'] = '141063041656453e88eecc04_08919544';
        Smarty_Internal_Extension_Config::configLoad($_smarty_tpl, "test.conf", "setup", 'local');
        echo $_smarty_tpl->getSubTemplate("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 9999, $_smarty_tpl->cache_lifetime, array('title' => 'foo'), 0);
        ?>


<PRE>


    <?php 
        if ($_smarty_tpl->getConfigVariable('bold')) {
            ?>
<b><?php 
        }
        ?>
        
        Title: <?php 
        echo smarty_modifier_capitalize($_smarty_tpl->getConfigVariable('title'));
        ?>

        <?php 
        if ($_smarty_tpl->getConfigVariable('bold')) {
            ?>
</b><?php 
        }
        ?>

    The current date and time is <?php 
        echo smarty_modifier_date_format(time(), "%Y-%m-%d %H:%M:%S");
        ?>


    The value of global assigned variable $SCRIPT_NAME is <?php 
        echo $_smarty_tpl->tpl_vars['SCRIPT_NAME']->value;
        ?>


    Example of accessing server environment variable SERVER_NAME: <?php 
        echo $_SERVER['SERVER_NAME'];
        ?>


    The value of {$Name} is <b><?php 
        echo '/*%%SmartyNocache:141063041656453e88eecc04_08919544%%*/<?php echo $_smarty_tpl->tpl_vars[\'Name\']->value;?>
/*/%%SmartyNocache:141063041656453e88eecc04_08919544%%*/';
        ?>
</b>

variable modifier example of {$Name|upper}

<b><?php 
        echo '/*%%SmartyNocache:141063041656453e88eecc04_08919544%%*/<?php echo mb_strtoupper($_smarty_tpl->tpl_vars[\'Name\']->value, \'UTF-8\');?>
/*/%%SmartyNocache:141063041656453e88eecc04_08919544%%*/';
        ?>
</b>


An example of a section loop:

    <?php 
        if (isset($_smarty_tpl->tpl_vars['smarty']->value['section']['outer'])) {
            unset($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']);
        }
        $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['name'] = 'outer';
        $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'] = is_array($_loop = $_smarty_tpl->tpl_vars['FirstName']->value) ? count($_loop) : max(0, (int) $_loop);
        unset($_loop);
        $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show'] = true;
        $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'];
        $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'] = 1;
        $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'] - 1;
        if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show']) {
            $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['loop'];
            if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] == 0) {
                $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show'] = false;
            }
        } else {
            $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total'] = 0;
        }
        if ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['show']) {
            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] = 1; $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['total']; $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration']++) {
                $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['iteration'];
                $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'];
                $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['outer']['step'];
//.........这里部分代码省略.........
开发者ID:HarukiHashimoto,项目名称:htdocs,代码行数:101,代码来源:7a9dcff75315c538ac24344dee4c6dbfdf1725fc_0.file.index.tpl.cache.php

示例7: is_array

					<?php 
        } else {
            ?>
												<?php 
            echo is_array($_tmp = smarty_function_math(array('equation' => "x-10", 'x' => $this->_tpl_vars['currentYear']), $this)) ? $this->_run_mod_handler('assign', true, $_tmp, 'minYear') : $this->_plugins['modifier']['assign'][0][0]->smartyAssign($_tmp, 'minYear');
            ?>

						<?php 
            echo is_array($_tmp = smarty_function_math(array('equation' => "x+2", 'x' => $this->_tpl_vars['currentYear']), $this)) ? $this->_run_mod_handler('assign', true, $_tmp, 'maxYear') : $this->_plugins['modifier']['assign'][0][0]->smartyAssign($_tmp, 'maxYear');
            ?>

					<?php 
        }
        ?>
					<?php 
        echo smarty_function_html_select_date(array('prefix' => 'datePublished', 'time' => is_array($_tmp = @$this->_tpl_vars['publishedArticle']->getDatePublished()) ? $this->_run_mod_handler('default', true, $_tmp, "---") : smarty_modifier_default($_tmp, "---"), 'all_extra' => "class=\"selectMenu\"", 'start_year' => $this->_tpl_vars['minYear'], 'end_year' => $this->_tpl_vars['maxYear'], 'year_empty' => "-", 'month_empty' => "-", 'day_empty' => "-"), $this);
        ?>

				</td>
				<td class="value">
					<input type="submit" value="<?php 
        echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "common.record"), $this);
        ?>
" class="button defaultButton" />&nbsp;
				</td>
			</tr>
		</form>
	<?php 
    }
} else {
    ?>
开发者ID:EreminDm,项目名称:water-cao,代码行数:31,代码来源:%%A3^A38^A385D906%%scheduling.tpl.php

示例8: smarty_function_calendar


//.........这里部分代码省略.........
  
  if(isset($params['months'])){
    unset($months);
    $months = $params['months'];
  }
  
  if(isset($params['events'])){
    //  This param describe who is the field that
    //  contain the info of  star date, if there's not
    //  is the same name
    if(isset($params['start'])){
      $start = $params['start'];
    }
    //  Describe name field of the end date
    if(isset($params['end'])){
      $end = $params['end'];
    }
    //  Field describe the description of event
    if(isset($params['desc'])){
      $desc = $params['desc'];
    }
    //  Field id is number unique of the event
    if(isset($params['id'])){
      $id = $params['id'];
    }
    
    $events = array();
    //  add the events
    for($i=0;$i<count($params['events']);$i++){
      $events[] = array(
        'id' => $params['events'][$i][$id],
        'start' => $params['events'][$i][$start],
        'end' => $params['events'][$i][$end],
        'desc' => $params['events'][$i][$desc]
      );
    }
  }
  
  $Month = & new Calendar_Month_Weekdays($year, $month);
  $MonthDecorator = new MonthPayload_Decorator($Month);
  $MonthDecorator->build($events);
  
  echo '<table class="calendar" cellspacing="0" cellpadding="0" border="0">';
  echo '<caption class="caption">';
   echo $months[$MonthDecorator->thisMonth()].' / '.$MonthDecorator->thisYear();
  echo '</caption>';
  echo '<tr>';
  //  Days of weeks
  for($i=0;$i<count($days);$i++)
    echo '<th class="day_week">'.$days[$i].'</th>';
  echo '</tr>';
  
  while ($Day = $MonthDecorator->fetch()) {

    if ($Day->isFirst()) {
        echo "<tr>\n";
    }

    echo '<td class="general calCell';
    if ($Day->isSelected()) {
        echo ' calCellBusy';
    } elseif ($Day->isEmpty()) {
        echo ' calCellEmpty';
    }
    echo '">';
    
    if($Day->isEmpty())
      echo '<div class="dayNumber2">'.$Day->thisDay().'</div>';
    else
      echo '<div class="dayNumber">'.$Day->thisDay().'</div>';

    if ($Day->isEmpty()) {
        echo '&nbsp;';
    } else {
        echo '<div class="dayContents"><ul>';
        while ($entry = $Day->getEntry()) {
            echo  '<li>';
            if(isset($entry['id']))
              echo '<a href="?'.$id.'='.$entry['id'].'" class="event">'.$entry['desc'].'</a>';
             else echo $entry['desc'];
            echo '</li>';
            //you can print the time range as well
        }
        echo '</ul></div>';
    }
    echo '</td>';

    if ($Day->isLast()) {
        echo "</tr>\n";
    }
    
  }
  echo '</table>';
  $PMonth = $Month->prevMonth('object');
  $prev = $_SERVER['PHP_SELF'].'?year='.$PMonth->thisYear().'&month='.$PMonth->thisMonth();
  $NMonth = $Month->nextMonth('object');
  $next = $_SERVER['PHP_SELF'].'?year='.$NMonth->thisYear().'&month='.$NMonth->thisMonth();
  echo '<table class="calendar_option"><tr><td class="prev"><a href="'.$prev.'" class="option">&lt;&lt; '.$months[$PMonth->thisMonth()].' '.$PMonth->thisYear().'</a></td><td class="next"><a href="'.$next.'" class="option">'.$months[$NMonth->thisMonth()].' '.$NMonth->thisYear().' &gt;&gt;</a></td></tr></table>';
        echo '<form method="GET"><table><tr><td>'.smarty_function_html_select_date(array('prefix'=>'','start_year'=>'-5','end_year'=>'+5','display_days'=>false),$smarty).'</td><td></td>'.'<td><input type="submit" value="Mostrar"/></td></table></form>';
}
开发者ID:ReneVallecillo,项目名称:almidon,代码行数:101,代码来源:function.calendar.php

示例9: wikiplugin_tracker


//.........这里部分代码省略.........
                        if ($showmandatory == 'y' and $f['isMandatory'] == 'y') {
                            $back .= "&nbsp;<b>*</b>&nbsp;";
                            $onemandatory = true;
                        }
                        $checked = $f['value'] == 'y' ? 'checked="checked"' : '';
                        $back .= '</td><td><input type="checkbox" name="track[' . $f["fieldId"] . ']" value="y" ' . $checked . '/>';
                    } elseif ($f['type'] == 'i') {
                        $back .= "<tr><td>" . wikiplugin_tracker_name($f['fieldId'], $f['name'], $field_errors);
                        if ($showmandatory == 'y' and $f['isMandatory'] == 'y') {
                            $back .= "&nbsp;<b>*</b>&nbsp;";
                            $onemandatory = true;
                        }
                        $back .= "</td><td>";
                        $back .= '<input type="file" name="track[' . $f["fieldId"] . ']" />';
                    } elseif ($f['type'] == 'f') {
                        $back .= "<tr><td>" . wikiplugin_tracker_name($f['fieldId'], $f['name'], $field_errors);
                        if ($showmandatory == 'y' and $f['isMandatory'] == 'y') {
                            $back .= "&nbsp;<b>*</b>&nbsp;";
                            $onemandatory = true;
                        }
                        $back .= "</td><td>";
                        include_once 'lib/smarty_tiki/function.html_select_date.php';
                        include_once 'lib/smarty_tiki/function.html_select_time.php';
                        $params['prefix'] = 'track_' . $f['fieldId'];
                        if (isset($f['options_array'][1])) {
                            $params['start_year'] = $f['options_array'][1];
                        }
                        if (isset($f['options_array'][2])) {
                            $params['end_year'] = $f['options_array'][2];
                        }
                        if (isset($f['value'])) {
                            $params['time'] = $f['value'];
                        }
                        $back .= smarty_function_html_select_date($params, $smarty);
                        if (empty($f['options_array'][0]) || $f['options_array'][0] != 'd') {
                            $params['display_seconds'] = false;
                            $back .= smarty_function_html_select_time($params, $smarty);
                        }
                    } elseif ($f['type'] == 'j') {
                        $back .= "<tr><td>" . wikiplugin_tracker_name($f['fieldId'], $f['name'], $field_errors);
                        if ($showmandatory == 'y' and $f['isMandatory'] == 'y') {
                            $back .= "&nbsp;<b>*</b>&nbsp;";
                            $onemandatory = true;
                        }
                        $back .= "</td><td>";
                        include_once 'lib/smarty_tiki/function.jscalendar.php';
                        $params['id'] = 'track[' . $f['fieldId'] . ']';
                        $params['fieldname'] = 'track[' . $f['fieldId'] . ']';
                        if (empty($f['options_array'][0]) || $f['options_array'][0] != 'd') {
                            $params['showtime'] = 'y';
                        } else {
                            $params['showtime'] = 'n';
                        }
                        if (isset($f['value'])) {
                            $params['date'] = $f['value'];
                        }
                        $back .= smarty_function_jscalendar_body($params, $smarty);
                    } elseif ($f['type'] == 'C' && isset($_REQUEST['tr_preview'])) {
                        // computed
                        $back .= "<tr><td>" . wikiplugin_tracker_name($f['fieldId'], $f['name'], $field_errors) . "</td><td>";
                        $calc = preg_replace('/#([0-9]+)/', '$assocNumerics[\\1]', $f['options_array'][0]);
                        eval('$computed = ' . $calc . ';');
                        $back .= $computed;
                    } elseif ($f['type'] == 'l' && isset($_REQUEST['tr_preview'])) {
                        // itemlist
                        $back .= "<tr><td>" . wikiplugin_tracker_name($f['fieldId'], $f['name'], $field_errors) . "</td><td>";
开发者ID:Kraiany,项目名称:kraiany_site_docker,代码行数:67,代码来源:wikiplugin_tracker.php

示例10: smarty_function_dataform


//.........这里部分代码省略.........
                        $_tmp = '<input type="checkbox" checked name="' . $_key . '_keep" /> Conservar archivo actual (' . $_val . ')<br /><img src="' . URL . '/' . ALM_URI . '/themes/' . ALM_ADMIN_THEME . '/img/' . $_icon . '" alt="' . $_val . '" border="0" /><br />';
                    }
                    $_tmp .= '[' . ALM_MAXIMUM . ' ' . $max_size . '] <input type="file" name="' . $_key . '" value="' . $_val . '" />';
                    break;
                case 'image':
                case 'img':
                    $_tmp = '';
                    $_icon = 'image.png';
                    $_tmp = '[' . ALM_MAXIMUM . ' ' . $max_size . '] <img src="' . URL . '/' . ALM_URI . '/themes/' . ALM_ADMIN_THEME . '/img/' . $_icon . '" border="0" alt="Imagen" title="Imagen" />';
                    if ($_val) {
                        $_tmp .= '<input type="checkbox" checked name="' . $_key . '_keep" /> Conservar archivo actual (' . $_val . ')<br /><img src="' . URL . '/' . ALM_URI . '/pic/50/' . $table . '/' . $_val . '" alt="' . $_val . '" width="50" border="0" /><br />';
                    }
                    $_tmp .= '<input type="file" name="' . $_key . '" value="' . $_val . '" />';
                    break;
                case 'boolean':
                case 'bool':
                    if (preg_match("/:/", $dd[$_key]['extra']['label_bool'])) {
                        list($_si, $_no) = preg_split('/:/', $dd[$_key]['extra']['label_bool']);
                        $_tchecked = $_val == 't' ? 'checked' : '';
                        $_fchecked = $_val == 'f' ? 'checked' : '';
                        $_tmp = $_si . '<input type="radio" name="' . $_key . '" ' . $_tchecked . ' value="on" />' . $_no . '<input type="radio" name="' . $_key . '" ' . $_fchecked . ' value="" />';
                    } else {
                        $_checked = $_val == 't' ? 'checked' : '';
                        $_tmp = '<input type="checkbox" name="' . $_key . '" ' . $_checked . ' />';
                    }
                    break;
                case 'datenull':
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    if (!isset($_val) || empty($_val)) {
                        $_val = '--';
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year, 'day_empty' => '--', 'month_empty' => '--', 'year_empty' => '--'), $smarty);
                    break;
                case 'date':
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year), $smarty);
                    break;
                case 'time':
                    $_tmp = smarty_function_html_select_time(array('prefix' => $_key . '_', 'time' => $_val, 'display_seconds' => false), $smarty);
                    break;
                case 'datetime':
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year), $smarty);
                    $_tmp .= smarty_function_html_select_time(array('prefix' => $_key . '_', 'time' => $_val, 'display_seconds' => false), $smarty);
                    break;
                case 'datetimenull':
                    if (preg_match("/:/", $dd[$_key]['extra']['range'])) {
                        list($_start_year, $_end_year) = preg_split('/:/', $dd[$_key]['extra']['range']);
                    }
                    $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => $_start_year, 'end_year' => $_end_year, 'day_empty' => '--', 'month_empty' => '--', 'year_empty' => '--'), $smarty);
                    $_tmp .= smarty_function_html_select_time(array('prefix' => $_key . '_', 'time' => $_val, 'display_seconds' => false), $smarty);
                    break;
                case 'password':
                    $_tmp = '<input type="password" name="' . $_key . '" size="20" maxlength="16" />';
                    break;
                case 'text':
                    $_tmp = '<textarea rows="5" cols="40" name="' . $_key . '">' . $_val . '</textarea> <a href="javascript:edittext(\'' . $name . '\', \'' . $_key . '\', document.forms[\'' . $name . '\'].' . $_key . '.value);">' . ALM_MAX . '</a>';
                    break;
                case 'html':
                    $_tmp = '<textarea rows="5" cols="40" id="' . $_key . '" name="' . $_key . '">' . $_val . '</textarea> <a href="javascript:edithtml(\'' . $name . '\', \'' . $_key . '\', document.forms[\'' . $name . '\'].' . $_key . '.value);">' . ALM_MAX . '</a>';
开发者ID:ReneVallecillo,项目名称:almidon,代码行数:67,代码来源:function.dataform.php

示例11: smarty_function_mini_calendar


//.........这里部分代码省略.........

  # Cuando se hacia un redirect usando el ErrorDocument del 403 al archivo, no se pasaban los
  # parametros
  if((!isset($_REQUEST['Year'])&&!isset($_REQUEST['Month']))||!isset($_REQUEST['Day'])) {
    $query = parse_url($_SERVER['REQUEST_URI'],PHP_URL_QUERY);
    parse_str($query,$_REQUEST);
  }
  if (!isset($_REQUEST['Year'])) $_REQUEST['Year'] = date('Y');
  if (!isset($_REQUEST['Month'])) $_REQUEST['Month'] = date('m');
  if (!isset($_REQUEST['Day'])) $_REQUEST['Day'] = date('d');
  
  // Build the month
  $Month = new Calendar_Month_Weekdays($_REQUEST['Year'],$_REQUEST['Month']);
  
  // Construct strings for next/previous links
  $PMonth = $Month->prevMonth('object'); // Get previous month as object
  $prev = '?Year='.$PMonth->thisYear().'&amp;Month='.$PMonth->thisMonth().'&amp;Day='.$PMonth->thisDay();
  $NMonth = $Month->nextMonth('object');
  $next = '?Year='.$NMonth->thisYear().'&amp;Month='.$NMonth->thisMonth().'&amp;Day='.$NMonth->thisDay();
  
  // Build the days in the month
  if($params['selectedDays'])
    foreach($params['selectedDays'] as $selectedDay) {
      $selectedDays[] = new Calendar_Day(smarty_modifier_date_format($selectedDay,"%Y"),smarty_modifier_date_format($selectedDay,"%m"), smarty_modifier_date_format($selectedDay,"%d"));
    }
  
  $class = ($params['custom_class']?$params['custom_class']:'');
  $Month->build($selectedDays);
  
  $out = "<table class=\"calendar\">";
  $out .= "<caption>".smarty_modifier_date_format($Month->getTimeStamp(),"%B %Y")."</caption>";
  $out .= "<tr>";
  $out .= "<th>Lun</th>";
  $out .= "<th>Mar</th>";
  $out .= "<th>Mie</th>";
  $out .= "<th>Jue</th>";
  $out .= "<th>Vie</th>";
  $out .= "<th".($params['dif_weekend']?" class=\"weekend sat\"":"").">Sáb</th>";
  $out .= "<th".($params['dif_weekend']?" class=\"weekend sun\"":"").">Dom</th>";
  $out .= "</tr>";
  while ( $Day = $Month->fetch() ) {
    // Build a link string for each day
    //$link = $_SERVER['PHP_SELF'].
    $link =     ($params['action']?$params['action']:"").'?Year='.$Day->thisYear().
                '&amp;Month='.$Day->thisMonth().
                '&amp;Day='.$Day->thisDay();

    
    //	Contain the week's day's number, 0 = sunday, ..., 6 = saturday
    $num_day = date("w",strtotime($Day->thisYear()."-".$Day->thisMonth()."-".$Day->thisDay()));
    // isFirst() to find start of week
    if ( $Day->isFirst() )
        $out .= "<tr>\n";

    if ( $Day->isSelected() ) {
        $out .= "<td class=\"selected\">";
        if($params['dif_weekend'])
          if($num_day == 6)
            $out .= "<div class=\"weekend sat\">";
          elseif($num_day == 0)
            $out .= "<div class=\"weekend sun\">";
          elseif($Day->thisDay()==date("d") AND $Day->thisMonth()==date("m") AND $Day->thisYear()==date("Y"))
            $out .= "<div class=\"now\">";
        $out .= "<a href=\"".$link."\"".(($class)?" class=\"$class\"":"").">".$Day->thisDay()."</a>";
        if(($params['dif_weekend'] && ($num_day == 6 || $num_day == 0)) || ($Day->thisDay()==date("d") && $Day->thisMonth()==date("m") && $Day->thisYear()==date("Y")))
          $out .= "</div>";
        $out .= "</td>\n";
    } else if ( $Day->isEmpty() ) {
        $out .= "<td>&nbsp;</td>\n";
    } elseif($Day->thisDay()==date("d") AND $Day->thisMonth()==date("m") AND $Day->thisYear()==date("Y")) {
        $out .= "<td><div class=\"now\">".$Day->thisDay()."</div></td>\n";
    } else {
        $out .= "<td>";
        if($num_day == 6 && $params['dif_weekend'])
          $out .= "<div class=\"weekend sat\">".$Day->thisDay()."</div>";
        elseif($num_day == 0 && $params['dif_weekend'])
          $out .= "<div class=\"weekend sun\">".$Day->thisDay()."</div>";
        else $out .= $Day->thisDay();
	$out .= "</td>\n";
    }
    // isLast() to find end of week
    if ( $Day->isLast() )
        $out .= "</tr>\n";
  }
 
  $start_year = ($params['start_year'])?$params['start_year']:"-5";
  $end_year = ($params['end_year'])?$params['end_year']:"+5";
  if (!isset($params['display_date'])) $params['display_date'] = true;
  $display_date = $params['display_date'];
  $day = $_REQUEST['Year']."-".$_REQUEST['Month']."-01";
  if($display_date) {
    $out .= "<tr>";
    $out .= "<td colspan=\"7\" class=\"control\"><form method=\"get\" action=\"".$params['action']."\"";
    $out .= ($params['frm_extra']?" ".$params['frm_extra']:"").">".smarty_function_html_select_date(array('time'=>$day,'prefix'=>'','start_year'=>$start_year,'end_year'=>$end_year,'display_days'=>false, 'display_months'=>true, 'display_years'=>true, 'month_extra'=>'id="Month"', 'year_extra'=>'id="Year"'),$smarty)."&nbsp;".($params['btn_img']?"<input name=\"btnsubmit\" type=\"image\" src=\"".$params['btn_img']."\"/>":"<input name=\"btnsubmit\" type=\"submit\" value=\"Ir\" />").($params['today_btn']===true?"&nbsp;<input name=\"today\" type=\"button\" value=\"Hoy\" title=\"Presione para ir al mes en curso\" onclick=\"location.href = './'\" />":"")."</form></td>";
    $out .= "</tr>";
  }
  $out .= "</table>";
  $out = smarty_modifier_strip($out);
  return $out;
}
开发者ID:ReneVallecillo,项目名称:almidon,代码行数:101,代码来源:function.mini_calendar.php

示例12: smarty_function_datagrid2


//.........这里部分代码省略.........
                    }
                    if (!$dd[$_key]) {
                        continue;
                    }
                    if ($parent == $_key) {
                        $parentid = $_val;
                        $dd[$_key]['type'] = 'hidden';
                    } elseif ($dd[$_key]['references']) {
                        $_selected = $_val;
                        $_val = $row[$dd[$_key]['references']];
                        $dd[$_key]['type'] = 'references';
                    }
                    switch ($dd[$_key]['type']) {
                        case 'hidden':
                            $_tmp = '<input type="hidden" name="' . $_key . '" value="' . $_val . '"  />';
                            break;
                        case 'file':
                        case 'image':
                        case 'img':
                            $_tmp = '';
                            if ($_val) {
                                $_tmp = '<input type="checkbox" checked name="' . $_key . '_keep" /> Conservar archivo actual (' . $_val . ')<br /><img src="' . URL . '/' . ALM_URI . '/pic/50/' . $table . '/' . $_val . '" alt="' . $_val . '" width="50" border="0" /><br />';
                            }
                            $_tmp .= '<input type="file" name="' . $_key . '" value="' . $_val . '" />';
                            break;
                        case 'time':
                            $_tmp = smarty_function_html_select_time(array('prefix' => $_key . '_', 'time' => $_val, 'display_seconds' => false), $smarty);
                            break;
                        case 'datetime':
                            $_tmp = '<input type="hidden" name="' . $_key . '" value="' . $_val . '" />';
                            $_tmp .= $_val;
                            break;
                        case 'date':
                            $_tmp = smarty_function_html_select_date(array('prefix' => $_key . '_', 'time' => $_val, 'start_year' => "-10", 'end_year' => "+10"), $smarty);
                            break;
                        case 'boolean':
                        case 'bool':
                            if ($dd[$_key]['extra']['label_bool']) {
                                list($_si, $_no) = preg_split('/:/', $dd[$_key]['extra']['label_bool']);
                                $_tchecked = $_val == 't' ? 'checked' : '';
                                $_fchecked = $_val == 'f' ? 'checked' : '';
                                $_tmp = $_si . '<input type="radio" name="' . $_key . '" ' . $_tchecked . ' value="on">' . $_no . '<input type="radio" name="' . $_key . '" ' . $_fchecked . ' value="">';
                            } else {
                                $_checked = $_val == 't' ? 'checked' : '';
                                $_tmp = '<input type="checkbox" name="' . $_key . '" ' . $_checked . ' />';
                            }
                            break;
                        case 'text':
                            $_tmp = preg_replace("/_VALUE_/", qdollar($_val), DGCELLMODTXT);
                            $_tmp = preg_replace("/_FIELD_/", $_key, $_tmp);
                            break;
                        case 'xhtml':
                            $_tmp = '<textarea rows="5" cols="40" class="adm" id="grid' . $_key . '" name="' . $_key . '"' . ($dd[$_key]['extra']['style'] ? ' style="' . $dd[$_key]['extra']['style'] . '"' : '') . '>' . $_val . '</textarea>';
                            $_tmp .= "<script language=\"JavaScript\">\ntinyMCE.execCommand(\"mceAddControl\", true,\"grid{$_key}\");\n</script>\n";
                            break;
                        case 'varchar':
                        case 'char':
                            if ($dd[$_key]['extra']['list_values']) {
                                $_options = $dd[$_key]['extra']['list_values'];
                                $_tmp = smarty_function_html_options(array('options' => $_options, 'selected' => trim($_val)), $smarty);
                                $_tmp = preg_replace("/_REFERENCE_/", qdollar($_tmp), DGCELLMODREF);
                                $_tmp = preg_replace("/_FIELD_/", $_key, $_tmp);
                            } else {
                                $_tmp = preg_replace("/_VALUE_/", qdollar($_val), DGCELLMODSTR);
                                $_tmp = preg_replace("/_FIELD_/", $_key, $_tmp);
                                $_tmp = preg_replace("/_SIZE_/", $dd[$_key]['size'], $_tmp);
开发者ID:ReneVallecillo,项目名称:almidon,代码行数:67,代码来源:function.datagrid2.php

示例13: smarty_function_html_select_time

       <td align='left'><?php 
echo smarty_function_html_select_time(array('prefix' => 'start_', 'display_minutes' => false, 'time' => $this->_tpl_vars['gui']->selected_start_time, 'display_seconds' => false, 'use_24_hours' => true), $this);
?>
</td>
       </tr>
			 </table>
			</td>

			<td align="center">
       <table border='0'>
       <tr>
       <td><?php 
echo $this->_tpl_vars['labels']['date'];
?>
</td><td><?php 
echo smarty_function_html_select_date(array('prefix' => 'end_', 'time' => $this->_tpl_vars['gui']->selected_end_date, 'month_format' => '%m', 'start_year' => "-1", 'end_year' => "+1", 'field_order' => $this->_tpl_vars['gsmarty_html_select_date_field_order']), $this);
?>
</td>
       </tr>
       <tr>
       <td><?php 
echo $this->_tpl_vars['labels']['hour'];
?>
</td>
       <td align='left'><?php 
echo smarty_function_html_select_time(array('prefix' => 'end_', 'display_minutes' => false, 'time' => $this->_tpl_vars['gui']->selected_end_time, 'display_seconds' => false, 'use_24_hours' => true), $this);
?>
</td>
       </tr>
			 </table>
			</td>
开发者ID:viglesiasce,项目名称:tl_RC1,代码行数:31,代码来源:%%76^76D^76DE89E6%%resultsMoreBuildsGUI.tpl.php

示例14: smarty_function_bit_select_datetime

function smarty_function_bit_select_datetime($pParams, &$gBitSmarty)
{
    global $gBitSystem;
    global $gBitUser;
    // Default values
    $name = 'date';
    // ID of the input field
    // unsupported as of now $format       = $gBitSystem->getConfig( 'site_short_date_format' ).' '.$gBitSystem->getConfig( 'site_short_time_format' );      // date format used
    $showtime = 'true';
    //true: show time; false: pick date only
    $time = time();
    // override the currently set date
    //extract actual parameters from the params hashmap.
    extract($pParams);
    //calculate a name we can use for additional (internal) fields
    $nname = str_replace('[', '_', str_replace(']', '_', $name));
    if ($gBitSystem->isFeatureActive('site_use_jscalendar')) {
        // A readonly field will be used to display the currently selected value.
        //A button besides the field will bring up the calendar (style similar to other PIM rich client applications)
        //It is the readonly input field that will be evaluated back on the server
        //unsupported $format = preg_replace( "/%Z/", "", $format );  // JSCalendar does not know about time zones
        $html_result = "<input type=\"text\" name=\"{$name}\" id=\"{$nname}_id\" value=\"{$time}\" readonly />\n";
        $html_result = $html_result . "<button type=\"reset\" id=\"{$nname}_button\">...</button>\n";
        $html_result = $html_result . "<script type=\"text/javascript\">\n";
        $html_result = $html_result . "    Calendar.setup({\n";
        $html_result = $html_result . "        date        : \"{$time}\",\n";
        $html_result = $html_result . "        inputField  :    \"{$nname}_id\",      // id of the input field\n";
        $html_result = $html_result . "        ifFormat    :    \"%Y-%m-%d %H:%M\",       // format of the input field\n";
        $html_result = $html_result . "        showsTime   :    {$showtime},            // will display a time selector\n";
        $html_result = $html_result . "        button      :    \"{$nname}_button\",   // trigger for the calendar (button ID)\n";
        $html_result = $html_result . "        singleClick :    true,           // double-click mode\n";
        $html_result = $html_result . "        step        :    1                // show all years in drop-down boxes (instead of every other year as default)\n";
        $html_result = $html_result . "    });\n";
        $html_result = $html_result . "</script>\n";
    } else {
        $gBitSmarty->loadPlugin('smarty_modifier_html_select_date');
        $gBitSmarty->loadPlugin('smarty_modifier_html_select_time');
        // we use html_select_date and html_select_time to pick a date, which generate a number of select fields.
        //On every change a hidden field will be updated via javascript.
        //it's the hidden field that is evaluated back on the server.
        $pDate = array('prefix' => $nname, 'all_extra' => "onchange=\"bit_select_datetime_{$nname}()\"", 'time' => $time);
        $pTime = array('prefix' => $nname, 'all_extra' => "onchange=\"bit_select_datetime_{$nname}()\"", 'display_seconds' => false, 'time' => $time);
        $html_result = "<input type=\"hidden\" name=\"{$name}\" value=\"{$time}\">";
        $html_result .= smarty_function_html_select_date($pDate, $gBitSmarty);
        if ($showtime == 'true') {
            $html_result .= smarty_function_html_select_time($pTime, $gBitSmarty);
            $html_result .= "<script type=\"text/javascript\"> \n";
            $html_result .= "    function bit_select_datetime_{$nname} () {\n";
            $html_result .= "    \tvar date = new Date(); \n date.setHours ( document.getElementsByName(\"{$nname}Hour\")[0].value);\ndate.setMinutes( document.getElementsByName(\"{$nname}Minute\")[0].value); \n date.setFullYear(document.getElementsByName(\"{$nname}Year\")[0].value,document.getElementsByName(\"{$nname}Month\")[0].value-1,document.getElementsByName(\"{$nname}Day\")[0].value); \n ";
            $html_result .= "document.getElementsByName(\"{$name}\")[0].value = Math.floor(date.getTime() / 1000);";
            $html_result .= "}\n";
            $html_result .= "</script>\n";
        } else {
            $html_result .= "<script type=\"text/javascript\">\n";
            $html_result .= "    function bit_select_datetime_{$name} () {\n";
            $html_result .= "    \tvar date = new Date(); \n date.setDate( document.getElementsByName(\"{$nname}Day\")[0].value ); \n date.setMonth(document.getElementsByName(\"{$nname}Month\")[0].value-1); \n date.setFullYear(document.getElementsByName(\"{$nname}Year\")[0].value); \n ";
            $html_result .= "        document.getElementsByName(\"{$name}\")[0].value = Math.floor(date.getTime() / 1000);";
            $html_result .= "}\n";
            $html_result .= "</script>\n";
        }
    }
    return $html_result . "(" . $gBitUser->getPreference('site_display_utc') . ")\n";
}
开发者ID:kailIII,项目名称:themes,代码行数:63,代码来源:function.bit_select_datetime.php

示例15: content_56789a6a17e782_53410507

    function content_56789a6a17e782_53410507($_smarty_tpl)
    {
        if (!is_callable('smarty_modifier_capitalize')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/modifier.capitalize.php';
        }
        if (!is_callable('smarty_function_ci_config')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/function.ci_config.php';
        }
        if (!is_callable('smarty_modifier_date_format')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/modifier.date_format.php';
        }
        if (!is_callable('smarty_function_html_select_date')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/function.html_select_date.php';
        }
        if (!is_callable('smarty_function_html_select_time')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/function.html_select_time.php';
        }
        if (!is_callable('smarty_function_ci_language')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/function.ci_language.php';
        }
        if (!is_callable('smarty_function_ci_form_validation')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/function.ci_form_validation.php';
        }
        if (!is_callable('smarty_function_html_options')) {
            require_once '/home/hammad/Desktop/Sportoya/application/libraries/smarty/plugins/function.html_options.php';
        }
        $_smarty_tpl->properties['nocache_hash'] = '23305161056789a69797566_98732353';
        echo $_smarty_tpl->getSubTemplate("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('title' => "Example Smarty Page", 'name' => (string) $_smarty_tpl->tpl_vars['Name']->value), 0);
        ?>


<h1>
<?php 
        if ($_smarty_tpl->tpl_vars['bold']->value) {
            ?>
<b><?php 
        }
        ?>

Title: <?php 
        echo smarty_modifier_capitalize($_smarty_tpl->tpl_vars['title']->value);
        ?>

<?php 
        if ($_smarty_tpl->tpl_vars['bold']->value) {
            ?>
</b><?php 
        }
        ?>
</h1>

<?php 
        if ($_smarty_tpl->tpl_vars['error']->value != '') {
            ?>
<p class="error"><?php 
            echo $_smarty_tpl->tpl_vars['error']->value;
            ?>
</p><?php 
        }
        if ($_smarty_tpl->tpl_vars['message']->value != '') {
            ?>
<p class="message"><?php 
            echo $_smarty_tpl->tpl_vars['message']->value;
            ?>
</p><?php 
        }
        ?>

<?php 
        echo smarty_function_ci_config(array('name' => "base_url"), $_smarty_tpl);
        ?>

<p>The configuration value of base_url is <em><?php 
        echo $_smarty_tpl->tpl_vars['base_url']->value;
        ?>
</em></p>

<p>The current date and time is <em><?php 
        echo smarty_modifier_date_format(time(), "%Y-%m-%d %H:%M:%S");
        ?>
</em></p>

<p>The value of global assigned variable $SCRIPT_NAME is <em><?php 
        echo $_smarty_tpl->tpl_vars['SCRIPT_NAME']->value;
        ?>
</em></p>

<p>The value of server environment variable SERVER_NAME is <em><?php 
        echo $_SERVER['SERVER_NAME'];
        ?>
</em></p>

<p>The value of your IP address is: <em><?php 
        echo $_smarty_tpl->tpl_vars['ip_address']->value;
        ?>
</em></p>

<p>The value of {$Name} is <em><?php 
        echo $_smarty_tpl->tpl_vars['Name']->value;
        ?>
//.........这里部分代码省略.........
开发者ID:Hammad90,项目名称:SportoyaRepo,代码行数:101,代码来源:aea8ffdbbdf37e0b39bfc0ed127dff9ce173d1a2_0.file.example.tpl.php


注:本文中的smarty_function_html_select_date函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。