blob: 486a5a882802ec878c62a37aae04b64f00abf0d4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* this generates a relatively unique ids for the
* ajax attachment portions of a form, which must be uniquely identified
* when there are multiple forms enabling attachment uploads on one page.
*/
function smarty_function_form_id(){
if( !isset( $_SESSION['form_id_index'] ) ){
$ret = $_SESSION['form_id_index'] = 1;
}else{
$ret = ( $_SESSION['form_id_index']++ );
}
return $ret;
}
?>
|