You won’t find a dirty menuboard in the Krystal system, as the chain aces menu cleanliness with a perfect 100 percent.
'asc', 'total_units' => 'asc', 'clean_count' => 'asc', 'clean_percent' => 'asc', 'not_clean_count' => 'asc', 'not_clean_percent' => 'asc', ); $indicators = array( 'chain' => '', 'total_units' => '', 'clean_count' => '', 'clean_percent' => '', 'not_clean_count' => '', 'not_clean_percent' => '', ); $header_fields = array( 'chain' => 'Chain', 'total_units' => 'Total Units', 'clean_count' => 'Count', 'clean_percent' => 'Percent', 'not_clean_count' => 'Count', 'not_clean_percent' => 'Percent', ); if ( in_array( $_GET['sort'], array_keys( $sort_dirs ) ) ) { $sort_field = $_GET['sort']; } else { $sort_field = 'chain'; } if ( in_array( $_GET['dir'], array( 'asc', 'desc' ) ) ) { $sort_dir = $_GET['dir']; } else { $sort_dir = 'asc'; } $opposite_dir = ( $sort_dir == 'asc' ) ? 'desc' : 'asc'; $sort_dirs[$sort_field] = $opposite_dir; $indicators[$sort_field] = theme_tablesort_indicator( array ( 'style' => $sort_dir ) ); $header_cols = array(); foreach ( $header_fields as $field => $text ) { $header_cols[] = array( 'data' => l( $text, $_GET['q'], array( 'query' => array('sort' => $field , 'dir' => $sort_dirs[$field] ), 'html' => TRUE ) ) . $indicators[$field], 'class' => 'header' ); } $table_rows = array(); $table_rows[] = array( array( 'data' => ' ', 'colspan' => 2 , 'class' => 'top-header' ), array( 'data' => 'Clean', 'colspan' => 2 , 'class' => 'top-header' ), array( 'data' => 'Not Clean', 'colspan' => 2 , 'class' => 'top-header' ), ); $table_rows[] = $header_cols; /* begin of function area */ $sorted_data = array(); $values = array(); foreach ( $the_data as $id => $value ) { $values[$id] = $value->$sort_field; } if ( $sort_dir == 'asc' ) { asort( $values ); } else { arsort( $values ); } foreach ( $values as $key => $value ) { $data_cells = array(); foreach ( $header_fields as $field => $text ) { $cell_data = $the_data[$key]->$field; if ( preg_match( '/percent/', $field ) ) { $cell_data .= '%'; } $classes = $field; if ( $field == $sort_field ) { $classes .= ' sorted'; } $data_cells[] = array( 'data' => $cell_data, 'class' => $classes ); } $sorted_data[] = $data_cells; } /* end of functional area */ foreach ( $sorted_data as $data_row ) { $table_rows[] = $data_row; } // summary $table_rows[] = array( array('data' => 'Summary','class' => 'total-row',), array('data' => '2,053','class' => 'total-row',), array('data' => '2,040','class' => 'total-row',), array('data' => '99.40%','class' => 'total-row',), array('data' => '13','class' => 'total-row',), array('data' => '0.60%','class' => 'total-row',), ); print theme( 'table', array( 'header' => NULL, 'rows' => $table_rows, 'attributes' => array( 'id' => 'datatable' ) ) ); ?>Drive-Thru Benchmarks