Despite industry pressure to shorten service times, the majority of auditors reported that service pace was “about right,” with highest marks going to Taco Bell.
Question: Would you rate the service you received as …?
Click the header rows to sort the data.
'Chain', 'Total' => 'Total', 'slow_count' => 'Count', 'slow_percent' => 'Percent', 'about_right_count' => 'Count', 'about_right_percent' => 'Percent', 'rushed_count' => 'Count', 'rushed_percent' => 'Percent', );$sort_whitelist = array( 'Chain', 'slow_percent', 'about_right_percent', 'rushed_percent' ); $header = json_decode( $header_json ); $data = json_decode( $data_json, TRUE ); $sort_field = 'Chain'; if ( isset( $_GET['sort'] ) && in_array( $_GET['sort'], $sort_whitelist ) ) { $sort_field = $_GET['sort']; } $sort_dir = 'asc'; if ( isset( $_GET['dir'] ) && in_array( $_GET['dir'], array( 'desc', 'asc' ) ) ) { $sort_dir = $_GET['dir']; } $header_row_data = array(); foreach ( $header as $field ) { $sort_indicator = ''; $dest_dir = 'asc'; if ( $sort_field == $field ) { $sort_indicator = theme_tablesort_indicator( array( 'style' => $sort_dir ) ); if ( $sort_dir == 'asc' ) { $dest_dir = 'desc'; } } if ( in_array( $field, $sort_whitelist ) ) { $header_row_data[] = array( 'data' => l( $full_headers[$field], $_GET['q'], array( 'query' => array( 'sort' => $field, 'dir' => $dest_dir), 'html' => TRUE ) ) . $sort_indicator, 'class' => 'top-header', ); } else { $header_row_data[] = array( 'data' => $full_headers[$field], 'class' => 'top-header', ); } } $table_rows = array(); $table_rows[] = array( array( 'data' => ' ', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Slow', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'About Right', 'colspan' => 2, 'class' => 'top-header' ), array( 'data' => 'Rushed', 'colspan' => 2, 'class' => 'top-header' ), ); $table_rows[] = $header_row_data; $sorted_rows = array(); $values = array(); foreach ( $data as $id => $value ) { $values[$id] = $value[$sort_field]; } if ( $sort_dir == 'asc' ) { asort( $values ); } else { arsort( $values ); } foreach ( $values as $key => $value ) { $row_cells = array(); foreach ( $header as $sort_field ) { $class = 'data'; if ( $sort_field == 'Chain' ) { $class = 'company'; } $row_cells[] = array( 'data' => $data[$key][$sort_field], 'class' => $class ); } $sorted_rows[] = $row_cells; } foreach ( $sorted_rows as $data_row ) { $table_rows[] = $data_row; } $table_rows[] = array( array('data' => 'Summary','class' => 'total-row',), array('data' => '2,002','class' => 'total-row',), array('data' => '344','class' => 'total-row',), array('data' => '17.2%','class' => 'total-row',), array('data' => '1,633','class' => 'total-row',), array('data' => '81.6%','class' => 'total-row',), array('data' => '25','class' => 'total-row',), array('data' => '1.2%','class' => 'total-row',), ); // Summary 2002 344 17.2% 1633 81.6% 25 1.2% print theme( 'table', array( 'header' => NULL, 'rows' => $table_rows, 'attributes' => array( 'id' => 'datatable' ) ) ); /* * this is a support function to sort the data based on the field & direction. * it returns an array that's used for the table row function get_2011_dt_sp_chart_sorted_rows( $data, $field, $dir, $header ) { $sorted_rows = array(); $values = array(); foreach ( $data as $id => $value ) { $values[$id] = $value[$field]; } if ( $dir == 'asc' ) { asort( $values ); } else { arsort( $values ); } foreach ( $values as $key => $value ) { $row_cells = array(); foreach ( $header as $field ) { $class = 'data'; $cell_data = $data[$key][$field]; if ( $field == 'Chain' ) { $class = 'company'; } if ( preg_match( '/percent/', $field ) ) { $cell_data .= '%'; } $row_cells[] = array( 'data' => $cell_data, 'class' => $class ); } $sorted_rows[] = $row_cells; } return $sorted_rows; } */ ?>Drive-Thru Benchmarks