50 $name = (empty($params[
'name'])) ?
'default' : $params[
'name'];
51 $print = (isset($params[
'print'])) ? (
bool)$params[
'print'] :
true;
52 $advance = (isset($params[
'advance'])) ? (
bool)$params[
'advance'] :
true;
53 $reset = (isset($params[
'reset'])) ? (
bool)$params[
'reset'] :
false;
55 if (!isset($params[
'values'])) {
56 if(!isset($cycle_vars[$name][
'values'])) {
57 trigger_error(
"cycle: missing 'values' parameter");
61 if(isset($cycle_vars[$name][
'values'])
62 && $cycle_vars[$name][
'values'] != $params[
'values'] ) {
63 $cycle_vars[$name][
'index'] = 0;
65 $cycle_vars[$name][
'values'] = $params[
'values'];
68 if (isset($params[
'delimiter'])) {
69 $cycle_vars[$name][
'delimiter'] = $params[
'delimiter'];
70 }
elseif (!isset($cycle_vars[$name][
'delimiter'])) {
71 $cycle_vars[$name][
'delimiter'] =
',';
74 if(is_array($cycle_vars[$name][
'values'])) {
75 $cycle_array = $cycle_vars[$name][
'values'];
77 $cycle_array = explode($cycle_vars[$name][
'delimiter'],$cycle_vars[$name][
'values']);
80 if(!isset($cycle_vars[$name][
'index']) || $reset ) {
81 $cycle_vars[$name][
'index'] = 0;
84 if (isset($params[
'assign'])) {
86 $template->assign($params[
'assign'], $cycle_array[$cycle_vars[$name][
'index']]);
90 $retval = $cycle_array[$cycle_vars[$name][
'index']];
96 if ( $cycle_vars[$name][
'index'] >= count($cycle_array) -1 ) {
97 $cycle_vars[$name][
'index'] = 0;
99 $cycle_vars[$name][
'index']++;
smarty_function_cycle($params, $template)
Smarty {cycle} function plugin.
if(strlen($date2)== '10') if($type== 'users-by-age'&&a_priv('admin_users', true)) elseif($type== 'forums-count'&&a_priv('admin_content', true)) elseif($type== 'forums-categories'&&a_priv('admin_content', true)) elseif($type== 'users-count'&&a_priv('admin_users', true)) elseif($type== 'product-categories'&&a_priv('admin_products', true)) elseif($type== 'users-by-sex'&&a_priv('admin_users', true)) elseif($type== 'users-by-country'&&a_priv('admin_users', true)) elseif($type== 'sales'&&a_priv('admin_sales', true))