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


PHP smarty_modifier_string_format函数代码示例

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


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

示例1: smarty_core_load_plugins

   compiled from table_row.tpl */
require_once SMARTY_CORE_DIR . 'core.load_plugins.php';
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'table_row.tpl', 2, false), array('modifier', 'string_format', 'table_row.tpl', 5, false))), $this);
?>
<tr>
    <td><?php 
echo is_array($_tmp = $this->_tpl_vars['ad']->getDate()) ? $this->_run_mod_handler('date_format', true, $_tmp, "%d:%m:%Y %T") : smarty_modifier_date_format($_tmp, "%d:%m:%Y %T");
?>
</td>
    <td><?php 
echo $this->_tpl_vars['ad']->getTitle();
?>
</td>
    <td><a class="btn btn-info btn-xs " title="Показать объявление" href="?show=<?php 
echo $this->_tpl_vars['ad']->getId();
?>
#form"><strong>?</strong></a></td>
    <td><?php 
echo is_array($_tmp = $this->_tpl_vars['ad']->getPrice()) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f");
?>
 руб.</td>
    <td><?php 
echo $this->_tpl_vars['ad']->getSeller_name();
?>
</td>
    <td align="center"><a class="btn btn-danger btn-xs " title="Удалить объявление" href="?delete=<?php 
echo $this->_tpl_vars['ad']->getId();
?>
"><strong>X</strong></a></td>
</tr>
               
开发者ID:Anatoliy-Bezhenaru,项目名称:wdc,代码行数:30,代码来源:%%2E^2ED^2ED69227%%table_row.tpl.php

示例2: foreach

if (count($_from) > 0) {
    foreach ($_from as $_smarty_tpl->tpl_vars['template']->key => $_smarty_tpl->tpl_vars['template']->value) {
        ?>
  <font color=brown><?php 
        echo $_smarty_tpl->getVariable('template')->value['name'];
        ?>
</font>
  <span class="exectime">
   (compile <?php 
        echo smarty_modifier_string_format($_smarty_tpl->getVariable('template')->value['compile_time'], "%.5f");
        ?>
) (render <?php 
        echo smarty_modifier_string_format($_smarty_tpl->getVariable('template')->value['render_time'], "%.5f");
        ?>
) (cache <?php 
        echo smarty_modifier_string_format($_smarty_tpl->getVariable('template')->value['cache_time'], "%.5f");
        ?>
)
  </span>
  <br>
<?php 
    }
}
?>
</div>

<h2>assigned template variables</h2>

<table id="table_assigned_vars">
    <?php 
$_smarty_tpl->tpl_vars['vars'] = new Smarty_Variable();
开发者ID:ViniciusFelix,项目名称:ProjetoPadrao,代码行数:31,代码来源:1e34f9f143d06678d63ce583d07357acd576482b.file.debug.tpl.php

示例3: ob_start

        ob_start();
        echo $_smarty_tpl->getVariable('ts')->value['rebate'];
        $_tmp6 = ob_get_clean();
        echo smarty_modifier_string_format($_smarty_tpl->getVariable('show')->value['INTbid'] * $_smarty_tpl->getVariable('show')->value['weight'] * (100 + $_tmp4 + $_tmp5 + $_tmp6) / 100, "%.2f");
        ?>
 (元) - 
			<?php 
        echo $_smarty_tpl->getVariable('show')->value['infml'];
        ?>
 (元) = 
			<?php 
        ob_start();
        echo $_smarty_tpl->getVariable('show')->value['agio'];
        $_tmp7 = ob_get_clean();
        ob_start();
        echo $_smarty_tpl->getVariable('show')->value['baseAgio'];
        $_tmp8 = ob_get_clean();
        ob_start();
        echo $_smarty_tpl->getVariable('ts')->value['rebate'];
        $_tmp9 = ob_get_clean();
        echo $_smarty_tpl->getVariable('show')->value['INTbid'] * $_smarty_tpl->getVariable('show')->value['weight'] * (100 + $_tmp7 + $_tmp8 + $_tmp9) / 100 - smarty_modifier_string_format($_smarty_tpl->getVariable('show')->value['infml'], "%.2f");
        ?>
 (元)
			</div>
		</td>
	</tr>
	<?php 
    }
}
?>
</table>
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:31,代码来源:2aedf61418b0097aba467f41ee54b6d957fc0852.file.product_view_price.html.php

示例4: is_array

            ?>
class="damier"<?php 
        }
        ?>
><?php 
        echo is_array($_tmp = $this->_tpl_vars['raw']['page_per_visit_significant']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.1f") : smarty_modifier_string_format($_tmp, "%.1f");
        ?>
</td>
<td <?php 
        if (!(1 & $this->_foreach['boucle']['iteration'])) {
            ?>
class="damier"<?php 
        }
        ?>
><?php 
        echo is_array($_tmp = $this->_tpl_vars['raw']['one_page_rate']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f");
        ?>
 %</td>
<td <?php 
        if (!(1 & $this->_foreach['boucle']['iteration'])) {
            ?>
class="damier"<?php 
        }
        ?>
><?php 
        echo $this->_tpl_vars['raw']['time_per_visit'];
        ?>
</td>
</tr>	
<?php 
    }
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:31,代码来源:default2.4^%%8A^8A4^8A4DE2DA%%data_array_interest.tpl.php

示例5: is_array

<?php 
echo $this->_plugins['function']['get_debug_info'][0][0]->smartyGetDebugInfo(array(), $this);
?>

<?php 
if ($this->_tpl_vars['enableDebugStats']) {
    ?>
<div id="footer">
	<div id="footerContent">
		<div class="debugStats">
		<?php 
    echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "debug.executionTime"), $this);
    ?>
: <?php 
    echo is_array($_tmp = $this->_tpl_vars['debugExecutionTime']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.4f") : smarty_modifier_string_format($_tmp, "%.4f");
    ?>
s<br />
		<?php 
    echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "debug.databaseQueries"), $this);
    ?>
: <?php 
    echo is_array($_tmp = $this->_tpl_vars['debugNumDatabaseQueries']) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp);
    ?>
<br/>
		<?php 
    if ($this->_tpl_vars['debugNotes']) {
        ?>
			<strong><?php 
        echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "debug.notes"), $this);
        ?>
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:30,代码来源:%%CB^CB6^CB620954%%footer.tpl.php

示例6: is_array

<?php 
} else {
    echo is_array($_tmp = smarty_modifier_t_escape($this->_tpl_vars['input']['end_hour'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%02d") : smarty_modifier_string_format($_tmp, "%02d");
    ?>

<?php 
}
?>
 時
<?php 
if (is_null($this->_tpl_vars['input']['end_minute'])) {
    ?>
--
<?php 
} else {
    echo is_array($_tmp = smarty_modifier_t_escape($this->_tpl_vars['input']['end_minute'])) ? $this->_run_mod_handler('string_format', true, $_tmp, "%02d") : smarty_modifier_string_format($_tmp, "%02d");
    ?>

<?php 
}
?>
 分
</td></tr>
<tr><th>詳  細</th><td><?php 
echo is_array($_tmp = smarty_modifier_t_escape($this->_tpl_vars['input']['body'])) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp);
?>
</td></tr>
<?php 
if (!$this->_tpl_vars['is_unused_schedule']) {
    ?>
<tr><th>お知らせメール</th><td>
开发者ID:KimuraYoichi,项目名称:PukiWiki,代码行数:31,代码来源:dft_pc_templates^%%A6^A6F^A6F51104%%h_schedule_edit_confirm.tpl.php

示例7: settype

                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu">
                    <?php 
    $_from = $this->_tpl_vars['Grid']['Details'];
    if (!is_array($_from) && !is_object($_from)) {
        settype($_from, 'array');
    }
    if (count($_from)) {
        foreach ($_from as $this->_tpl_vars['Detail']) {
            ?>
                    <li><a href="<?php 
            echo is_array($_tmp = $this->_tpl_vars['Detail']['Link']) ? $this->_run_mod_handler('escapeurl', true, $_tmp) : smarty_modifier_escapeurl($_tmp);
            ?>
"><?php 
            echo is_array($_tmp = $this->_tpl_vars['Detail']['Caption']) ? $this->_run_mod_handler('string_format', true, $_tmp, $this->_tpl_vars['Captions']->GetMessageString('ManageDetail')) : smarty_modifier_string_format($_tmp, $this->_tpl_vars['Captions']->GetMessageString('ManageDetail'));
            ?>
</a></li>
                    <?php 
        }
    }
    unset($_from);
    ?>
                </ul>
            </div>
        <?php 
}
?>

        <?php 
if ($this->_tpl_vars['Grid']['PrintOneRecord']) {
开发者ID:howareyoucolin,项目名称:demo,代码行数:31,代码来源:%%52^527^527EF110%%grid.tpl.php

示例8: is_array

    ?>
"><?php 
    echo is_array($_tmp = $this->_tpl_vars['reviewer']->getFullName()) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp);
    ?>
</a></td>
	<td><?php 
    echo is_array($_tmp = $this->_tpl_vars['reviewer']->getInterestString()) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp);
    ?>
</td>
	<?php 
    if ($this->_tpl_vars['rateReviewerOnQuality']) {
        ?>
<td>
		<?php 
        if ($this->_tpl_vars['qualityCount']) {
            echo is_array($_tmp = $this->_tpl_vars['averageQualityRatings'][$this->_tpl_vars['userId']]['average']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.1f") : smarty_modifier_string_format($_tmp, "%.1f");
            ?>

		<?php 
        } else {
            echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => "common.notApplicableShort"), $this);
        }
        ?>
	</td><?php 
    }
    ?>

	<td>
		<?php 
    if ($this->_tpl_vars['completedReviewCounts'][$this->_tpl_vars['userId']]) {
        ?>
开发者ID:EreminDm,项目名称:water-cao,代码行数:31,代码来源:%%12^124^124234EB%%selectReviewer.tpl.php

示例9: is_array

            <?php 
        }
    }
    ?>
            <?php 
    if ($this->_sections['i']['index'] < $this->_tpl_vars['footer_totalPages']) {
        ?>
                &hellip;
            <?php 
    }
    ?>
            <?php 
    if ($this->_sections['i']['index'] <= $this->_tpl_vars['footer_totalPages']) {
        ?>
                <a href="<?php 
        echo is_array($_tmp = $this->_tpl_vars['footer_totalPages']) ? $this->_run_mod_handler('string_format', true, $_tmp, $this->_tpl_vars['footer_pageLink']) : smarty_modifier_string_format($_tmp, $this->_tpl_vars['footer_pageLink']);
        ?>
"><?php 
        echo $this->_tpl_vars['footer_totalPages'];
        ?>
</a>
            <?php 
    }
    ?>
            <?php 
    if ($this->_tpl_vars['footer_next_page']) {
        ?>
                <a title="<?php 
        echo @NEXT_PAGE;
        ?>
" href="<?php 
开发者ID:Juuro,项目名称:Dreamapp-Website,代码行数:31,代码来源:bulletproof^%%FA^FA8^FA860093%%entries.tpl.php

示例10: is_array

            echo is_array($_tmp = $this->_tpl_vars['message']['id']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%d") : smarty_modifier_string_format($_tmp, "%d");
            ?>
,
			text: '<?php 
            echo is_array($_tmp = $this->_tpl_vars['message']['text']) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript');
            ?>
', 
			location: '<?php 
            echo is_array($_tmp = $this->_tpl_vars['message']['location']) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript');
            ?>
',
			type: '<?php 
            echo is_array($_tmp = $this->_tpl_vars['message']['type']) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript');
            ?>
',
			timeout: <?php 
            echo is_array($_tmp = $this->_tpl_vars['message']['timeout']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%d") : smarty_modifier_string_format($_tmp, "%d");
            ?>

		});
<?php 
        }
    }
    unset($_from);
    ?>
	});

//-->
</script>
<?php 
}
开发者ID:SamWinchester,项目名称:revive-adserver,代码行数:31,代码来源:%%78^783^7838842A%%messages.html.php

示例11: is_array

?>
</td>
		<td class='currentvalues'><input type="text" size='5'
			name='oxygen_saturation' id='oxygen_saturation_input' value="<?php 
if ($this->_tpl_vars['vitals']->get_oxygen_saturation() != 0) {
    echo is_array($_tmp = $this->_tpl_vars['vitals']->get_oxygen_saturation()) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f");
}
?>
"/></td>
	<?php 
if (count($_from = (array) $this->_tpl_vars['results'])) {
    foreach ($_from as $this->_tpl_vars['result']) {
        ?>
		<td  class='historicalvalues'><?php 
        if ($this->_tpl_vars['result']['oxygen_saturation'] != 0) {
            echo is_array($_tmp = $this->_tpl_vars['result']['oxygen_saturation']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f");
        }
        ?>
</td>
	<?php 
    }
    unset($_from);
}
?>
</tr>
	
	<?php 
if ($this->_tpl_vars['units_of_measurement'] == 4 || $this->_tpl_vars['gbl_vitals_options'] > 0) {
    ?>
<tr class="hide"><?php 
} else {
开发者ID:sechristsoftware,项目名称:PandiaEMR,代码行数:31,代码来源:%%-69^%%-693912418^general_new.html.php

示例12: is_array

        echo is_array($_tmp = $this->_tpl_vars['subscriptionType']->getSubscriptionTypeName()) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp);
        ?>
<br /><?php 
        echo is_array($_tmp = $this->_tpl_vars['subscriptionType']->getSubscriptionTypeDescription()) ? $this->_run_mod_handler('nl2br', true, $_tmp) : smarty_modifier_nl2br($_tmp);
        ?>
</td>
			<td><?php 
        echo $this->_plugins['function']['translate'][0][0]->smartyTranslate(array('key' => $this->_tpl_vars['subscriptionType']->getFormatString()), $this);
        ?>
</td>
			<td><?php 
        echo is_array($_tmp = $this->_tpl_vars['subscriptionType']->getDurationYearsMonths()) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp);
        ?>
</td>
			<td><?php 
        echo is_array($_tmp = $this->_tpl_vars['subscriptionType']->getCost()) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f");
        ?>
&nbsp;(<?php 
        echo is_array($_tmp = $this->_tpl_vars['subscriptionType']->getCurrencyStringShort()) ? $this->_run_mod_handler('escape', true, $_tmp) : $this->_plugins['modifier']['escape'][0][0]->smartyEscape($_tmp);
        ?>
)</td>
		</tr>
		<tr><td colspan="4" class="<?php 
        if ($this->_tpl_vars['subscriptionTypes']->eof()) {
            ?>
end<?php 
        }
        ?>
separator">&nbsp;</td></tr>
	<?php 
    }
开发者ID:LiteratimBi,项目名称:jupitertfn,代码行数:31,代码来源:%%D0^D01^D01ECFAE%%subscriptions.tpl.php

示例13: is_array

</strong></td>
</tr>
<tr>
	<td class="align"><?php 
echo is_array($_tmp = 'visites_tauxvisite') ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp);
?>
</td>
	<td class="damier"><strong><?php 
echo is_array($_tmp = $this->_tpl_vars['statistics']['one_page_rate']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.0f") : smarty_modifier_string_format($_tmp, "%.0f");
?>
%</strong></td>
</tr>
<?php 
if ($this->_tpl_vars['statistics']['average_visits_per_day']) {
    ?>
<tr>
	<td class="damieralign"><?php 
    echo is_array($_tmp = 'visites_average_visits_per_day') ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp);
    ?>
</td>
	<td><strong><?php 
    echo is_array($_tmp = $this->_tpl_vars['statistics']['average_visits_per_day']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%d") : smarty_modifier_string_format($_tmp, "%d");
    ?>
</strong></td>
</tr>
<?php 
}
?>
</tbody>
</table>
</div>
开发者ID:ber5ien,项目名称:www.jade-palace.co.uk,代码行数:31,代码来源:default2.4^%%B9^B91^B91D2CB2%%statistics.tpl.php

示例14: smarty_function_translate

if (!$this->_tpl_vars['order']['isPaid']) {
    ?>
unpaid<?php 
}
?>
">
		<label class="param"><?php 
echo smarty_function_translate(array('text' => '_amount'), $this);
?>
</label>
		<label class="value">
			<?php 
echo $this->_tpl_vars['order']['Currency']['pricePrefix'];
?>
<span class="order_totalAmount"><?php 
echo is_array($_tmp = is_array($_tmp = @$this->_tpl_vars['order']['totalAmount']) ? $this->_run_mod_handler('default', true, $_tmp, 0) : smarty_modifier_default($_tmp, 0)) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f");
?>
</span><?php 
echo $this->_tpl_vars['order']['Currency']['priceSuffix'];
?>

		</label>
		<span class="notPaid">
			<input type="checkbox" class="checkbox" id="<?php 
echo smarty_function_uniqid(array(), $this);
?>
" value="1" onchange="Backend.CustomerOrder.prototype.changePaidStatus(this, '<?php 
echo smarty_function_link(array('controller' => "backend.payment", 'action' => 'changeOrderPaidStatus', 'id' => $this->_tpl_vars['order']['ID'], 'query' => 'status=_stat_'), $this);
?>
');">
			<label for="<?php 
开发者ID:saiber,项目名称:www,代码行数:31,代码来源:%%38^382^3824AC52%%info.tpl.php

示例15: is_array

        ?>
 <?php 
        $this->assign('ratio', $this->_tpl_vars['uploaded'] / $this->_tpl_vars['downloaded']);
        ?>
 <?php 
    } else {
        ?>
 <?php 
        $this->assign('ratio', "беск.");
        ?>
 <?php 
    }
    ?>
<td colspan=2 class='userblock'>Рейтинг:&nbsp;<?php 
    if ($this->_tpl_vars['ratio'] > 0) {
        echo is_array($_tmp = $this->_tpl_vars['ratio']) ? $this->_run_mod_handler('string_format', true, $_tmp, "%.2f") : smarty_modifier_string_format($_tmp, "%.2f");
    } else {
        ?>
беск.<?php 
    }
    ?>
</td></tr>
<td colspan=2 class='userblock'>Нет новых сообщений</td></tr>
</table>
</div>

</div></div></div>

<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>
</div>
<?php 
开发者ID:BGCX262,项目名称:ztrackerengine-svn-to-git,代码行数:31,代码来源:%%64^640^640ED697%%user_block.tpl.php


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