Lines Matching refs:vote_log
73 $vote_log = $this->_read_vote_log( $title );
85 $this->_user_check( $vote_log, $param ) ){
92 $vote_log[ 'results' ][ $option ] += 1;
93 $vote_log[ 'votes' ] += 1;
94 $vote_log[ 'ips' ][] = clientIP( true );
96 $vote_log[ 'users' ][] = $USERINFO['name'];
100 $this->_write_vote_log( $title, $vote_log );
104 $output .= $this->_print_vote_form( $vote_log );
115 function _user_check( $vote_log, $param ) { argument
127 if ( isset( $vote_log['ips'] ) && in_array( $ip, $vote_log['ips'] ) ) {
135 if ( isset( $vote_log['users'] ) && in_array( $user, $vote_log['users'] ) ) {
181 $vote_log = NULL;
184 $vote_log = unserialize( @file_get_contents( $vote_log_file ) );
186 return $vote_log;
191 function _write_vote_log( $title, $vote_log ) { argument
196 fwrite( $fh, serialize( $vote_log ) );
204 function _print_vote_form( $vote_log ){ argument
209 $total = $vote_log['votes'];
212 $option_count = count( $vote_log['results'] );
213 $options = array_keys( (array)( $vote_log[ 'results' ] ) );
214 $votes = array_values( (array)( $vote_log[ 'results' ] ) );