<div class="container">
    <div class="row">

        <div class="col-md-6 col-md-offset-3">
            <div class="panel panel-default">

               
                <div class="panel-heading">
                    <h2 class="form-signin-heading">Change User Type</h2>
                </div>

                <div class="panel-body">
                    
                    <?php echo validation_errors('<p class="alert alert-dismissable alert-danger">'); ?>
                    
                    <?php if ($this->session->flashdata('usertype_updated')) : ?>
                    <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('usertype_updated'); ?></p>
                    <?php endif; ?>
                    
                    <?php
                    $attributes = array(
                        'class' => 'form-horizontal',
                        'id' => 'submit'
                    );
                    ?>
                    
                    <?php echo form_open("auth/changeType/", $attributes); ?>
                    
                    <span class="msgF pull-right">* required field.</span>
   
                    <div class="form-group">           
                        <label for="manufacturer" class="col-sm-4 control-label">Select Type to change to:</label>
                        <div class="col-sm-4">

                            <?php
                            $counter = 0;
                            echo '<select name="category" id="category" class="form-control">';
                            
                            foreach($category_options as $cat)
                            {

                            echo'<option value="'.$counter.'">'.$cat.'</option>';
                            $counter++;  
                            }
                            echo '</select>';                            
                            ?>
                            
                        </div>
                    </div>
                    
                    <div class="form-group">           
                        <label for="activation_id" class="col-sm-4 control-label">Enter User ID to Change:</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" id="activation_id" name="activation_id" autocomplete="off" placeholder="User ID">
                        </div>
                        <div class="col-sm-1">
                            <span class="error2">*</span>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-4 col-sm-10">
                            <button type="submit" class="btn btn-primary btn-xs">Change 
                                <i class="glyphicon glyphicon-check"></i></button>
                        </div>
                    </div>

                    <?php echo form_hidden($csrf); ?>
                    <?php echo form_hidden(array('id' => $user->id)); ?>
                    
                    <?php echo form_close(); ?>

                    <table style="font-size: 13px;" class="table table-bordered table-hover table-condensed">
                        <!--Head Values-->
                        <thead>
                            <?php foreach ($fields as $field_name => $field_display): ?>
                                
                                
                            <th <?php if ($sort_by == $field_name) echo "id=\"sort_$sort_order\"" ?>
                                <?php if ($field_name == 'position' || $field_name == 'country') echo "class=\"hidden-xs\"" ?>>
                                <?php
                                echo anchor("auth/changeType/$query_id/$field_name/" .
                                        (($sort_order == 'asc' && $sort_by == $field_name) ? 'desc' : 'asc'), $field_display);
                                ?>
                            </th>
<?php endforeach; ?>
                        </thead>
                        <!--Main Values-->

                        <tbody>
                                <?php foreach ($membersforview as $user): ?>
                                <tr>
                                        <?php foreach ($fields as $field_name => $field_display): ?>
                                        <td <?php if ($field_name == 'position' || $field_name == 'country') echo "class=\"hidden-xs\"" ?>>
                                            <?php echo $user->$field_name; ?>

                                        </td>
                                <?php endforeach; ?>
                                </tr>
        <?php endforeach; ?>			
                        </tbody>
                    </table>

                    
                </div>
                

                <div class="panel-footer">
                    <div class="row">

                        <div class="col-md-7 pull-right">
                            <div id ="pgcol" class="pgPaginate" id="paginateInfo"> 
                                <?php if (strlen($pagination)): ?>
                                    <?php echo $pagination; ?>
                                <?php endif; ?>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>