Blame view

plugins/function.fonl.php 1.06 KB
42868d70   andryeyev   Создал GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  <?php
  /**
   * Smarty plugin
   * @package Smarty
   * @subpackage plugins
   */
  
  
  /**
   * Smarty {math} function plugin
   *
   * Type:     function<br>
   * Name:     math<br>
   * Purpose:  handle math computations in template<br>
   * @link http://smarty.php.net/manual/en/language.function.math.php {math}
   *          (Smarty online manual)
   * @author   Monte Ohrt <monte at ohrt dot com>
   * @param array
   * @param Smarty
   * @return string
   */
  function smarty_function_fonl($params, &$smarty)
  { 	/*$array = array("kurtki_new.jpg","kid_all.jpg");
  	$array_link = array(
  	"http://extremstyle.ua/kurtki-catalogs/",
  	"http://extremstyle.ua/kurtki-catalogs/filter;brend=Rossignol;filter=g48_novaya-kollektsiya/"	
  ); */
  global $objFon;
  $row = $objFon->getFonRand();
  	
  	
  	//$key = rand(0, 1);
  	$out = 'style="';
      $out .= 'width:100%;';
      $out .= 'height: 2126px;';
      $out .= 'position:absolute;';
  	$out .= 'z-index:1;';
  	$out .= 'background: url(/uploaded/pic/fon/'.$row['pic'].') top center no-repeat;';
  	$out .= '" ';
  	$out .= 'href="'.$row['url'].'"';
  	return $out;
  }
  
  /* vim: set expandtab: */
  
  ?>