/
home
/
techb158
/
exp.abdallabala.com
/
vendor
/
smarty
/
smarty
/
libs
/
plugins
/
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins
mkdir
upload
Name
Size
Mode
Actions
block.textformat.php
3664
0644
edit
dl
rm
function.counter.php
1823
0644
edit
dl
rm
function.cycle.php
3308
0644
edit
dl
rm
function.fetch.php
8068
0644
edit
dl
rm
function.html_checkboxes.php
9592
0644
edit
dl
rm
function.html_image.php
5668
0644
edit
dl
rm
function.html_options.php
8246
0644
edit
dl
rm
function.html_radios.php
8434
0644
edit
dl
rm
function.html_select_date.php
15183
0644
edit
dl
rm
function.html_select_time.php
14375
0644
edit
dl
rm
function.html_table.php
5375
0644
edit
dl
rm
function.mailto.php
5386
0644
edit
dl
rm
function.math.php
3785
0644
edit
dl
rm
modifier.capitalize.php
4211
0644
edit
dl
rm
modifier.date_format.php
2691
0644
edit
dl
rm
modifier.debug_print_var.php
3929
0644
edit
dl
rm
modifier.escape.php
9669
0644
edit
dl
rm
modifier.mb_wordwrap.php
2346
0644
edit
dl
rm
modifier.regex_replace.php
1657
0644
edit
dl
rm
modifier.replace.php
999
0644
edit
dl
rm
modifier.spacify.php
756
0644
edit
dl
rm
modifier.truncate.php
2231
0644
edit
dl
rm
modifiercompiler.cat.php
612
0644
edit
dl
rm
modifiercompiler.count_characters.php
918
0644
edit
dl
rm
modifiercompiler.count_paragraphs.php
659
0644
edit
dl
rm
modifiercompiler.count_sentences.php
745
0644
edit
dl
rm
modifiercompiler.count_words.php
979
0644
edit
dl
rm
modifiercompiler.default.php
770
0644
edit
dl
rm
modifiercompiler.escape.php
5125
0644
edit
dl
rm
modifiercompiler.from_charset.php
752
0644
edit
dl
rm
modifiercompiler.indent.php
712
0644
edit
dl
rm
modifiercompiler.lower.php
724
0644
edit
dl
rm
modifiercompiler.noprint.php
340
0644
edit
dl
rm
modifiercompiler.string_format.php
574
0644
edit
dl
rm
modifiercompiler.strip.php
798
0644
edit
dl
rm
modifiercompiler.strip_tags.php
720
0644
edit
dl
rm
modifiercompiler.to_charset.php
746
0644
edit
dl
rm
modifiercompiler.unescape.php
1190
0644
edit
dl
rm
modifiercompiler.upper.php
678
0644
edit
dl
rm
modifiercompiler.wordwrap.php
1112
0644
edit
dl
rm
outputfilter.trimwhitespace.php
3777
0644
edit
dl
rm
shared.escape_special_chars.php
977
0644
edit
dl
rm
shared.literal_compiler_param.php
1047
0644
edit
dl
rm
shared.make_timestamp.php
1483
0644
edit
dl
rm
shared.mb_str_replace.php
1790
0644
edit
dl
rm
shared.mb_unicode.php
1530
0644
edit
dl
rm
variablefilter.htmlspecialchars.php
451
0644
edit
dl
rm
Edit:
/home/techb158/exp.abdallabala.com/vendor/smarty/smarty/libs/plugins/function.html_table.php
(5375B)
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsFunction */ /** * Smarty {html_table} function plugin * Type: function * Name: html_table * Date: Feb 17, 2003 * Purpose: make an html table from an array of data * Params: * * - loop - array to loop through * - cols - number of columns, comma separated list of column names * or array of column names * - rows - number of rows * - table_attr - table attributes * - th_attr - table heading attributes (arrays are cycled) * - tr_attr - table row attributes (arrays are cycled) * - td_attr - table cell attributes (arrays are cycled) * - trailpad - value to pad trailing cells with * - caption - text for caption element * - vdir - vertical direction (default: "down", means top-to-bottom) * - hdir - horizontal direction (default: "right", means left-to-right) * - inner - inner loop (default "cols": print $loop line by line, * $loop will be printed column by column otherwise) * * Examples: * * {table loop=$data} * {table loop=$data cols=4 tr_attr='"bgcolor=red"'} * {table loop=$data cols="first,second,third" tr_attr=$colors} * * @author Monte Ohrt <monte at ohrt dot com> * @author credit to Messju Mohr <messju at lammfellpuschen dot de> * @author credit to boots <boots dot smarty at yahoo dot com> * @version 1.1 * @link http://www.smarty.net/manual/en/language.function.html.table.php {html_table} * (Smarty online manual) * * @param array $params parameters * * @return string */ function smarty_function_html_table($params) { $table_attr = 'border="1"'; $tr_attr = ''; $th_attr = ''; $td_attr = ''; $cols = $cols_count = 3; $rows = 3; $trailpad = ' '; $vdir = 'down'; $hdir = 'right'; $inner = 'cols'; $caption = ''; $loop = null; if (!isset($params[ 'loop' ])) { trigger_error("html_table: missing 'loop' parameter", E_USER_WARNING); return; } foreach ($params as $_key => $_value) { switch ($_key) { case 'loop': $$_key = (array)$_value; break; case 'cols': if (is_array($_value) && !empty($_value)) { $cols = $_value; $cols_count = count($_value); } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) { $cols = explode(',', $_value); $cols_count = count($cols); } elseif (!empty($_value)) { $cols_count = (int)$_value; } else { $cols_count = $cols; } break; case 'rows': $$_key = (int)$_value; break; case 'table_attr': case 'trailpad': case 'hdir': case 'vdir': case 'inner': case 'caption': $$_key = (string)$_value; break; case 'tr_attr': case 'td_attr': case 'th_attr': $$_key = $_value; break; } } $loop_count = count($loop); if (empty($params[ 'rows' ])) { /* no rows specified */ $rows = ceil($loop_count / $cols_count); } elseif (empty($params[ 'cols' ])) { if (!empty($params[ 'rows' ])) { /* no cols specified, but rows */ $cols_count = ceil($loop_count / $rows); } } $output = "<table $table_attr>\n"; if (!empty($caption)) { $output .= '<caption>' . $caption . "</caption>\n"; } if (is_array($cols)) { $cols = ($hdir === 'right') ? $cols : array_reverse($cols); $output .= "<thead><tr>\n"; for ($r = 0; $r < $cols_count; $r++) { $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>'; $output .= $cols[ $r ]; $output .= "</th>\n"; } $output .= "</tr></thead>\n"; } $output .= "<tbody>\n"; for ($r = 0; $r < $rows; $r++) { $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n"; $rx = ($vdir === 'down') ? $r * $cols_count : ($rows - 1 - $r) * $cols_count; for ($c = 0; $c < $cols_count; $c++) { $x = ($hdir === 'right') ? $rx + $c : $rx + $cols_count - 1 - $c; if ($inner !== 'cols') { /* shuffle x to loop over rows*/ $x = floor($x / $cols_count) + ($x % $cols_count) * $rows; } if ($x < $loop_count) { $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[ $x ] . "</td>\n"; } else { $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">$trailpad</td>\n"; } } $output .= "</tr>\n"; } $output .= "</tbody>\n"; $output .= "</table>\n"; return $output; } /** * @param $name * @param $var * @param $no * * @return string */ function smarty_function_html_table_cycle($name, $var, $no) { if (!is_array($var)) { $ret = $var; } else { $ret = $var[ $no % count($var) ]; } return ($ret) ? ' ' . $ret : ''; }
Save
cmd:
run