Blame view

plugins/function.fon.php 690 Bytes
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
  <?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_fon($params, &$smarty)
  { 	$array = array("fon_body.jpg","fon_kite.jpg","dakine.jpg","fon_all.jpg"); 
  	$key = rand(0, 3); 
     return '.bg{background:url("/img/'.$array[$key].'") top center no-repeat;}';
  }
  
  /* vim: set expandtab: */
  
  ?>