Project

General

Profile

« Previous | Next » 

Revision 864

Added by aldus about 16 years ago

Bugfix for Ticket #608

View differences:

trunk/wb/modules/form/view.php
94 94
	}
95 95
}
96 96
}
97
// Generate temp submission id
98
function new_submission_id() {
99
	$submission_id = '';
100
	$salt = "abchefghjkmnpqrstuvwxyz0123456789";
101
	srand((double)microtime()*1000000);
102
	$i = 0;
103
	while ($i <= 7) {
104
		$num = rand() % 33;
105
		$tmp = substr($salt, $num, 1);
106
		$submission_id = $submission_id . $tmp;
107
		$i++;
97

  
98
if (!function_exists("new_submission_id") ) {
99
	function new_submission_id() {
100
		$submission_id = '';
101
		$salt = "abchefghjkmnpqrstuvwxyz0123456789";
102
		srand((double)microtime()*1000000);
103
		$i = 0;
104
		while ($i <= 7) {
105
			$num = rand() % 33;
106
			$tmp = substr($salt, $num, 1);
107
			$submission_id = $submission_id . $tmp;
108
			$i++;
109
		}
110
		return $submission_id;
108 111
	}
109
	return $submission_id;
110 112
}
111

  
112 113
// Work-out if the form has been submitted or not
113 114
if($_POST == array()) {
114 115

  

Also available in: Unified diff