$db_object->insert($mysql);
        }
        //DETERMINE THE FAMILY OF THE SELECTED POSITION...
        $mysql = "select family_id from {$family_position} where position_id = '{$posid}'";
        $familypos_arr = $db_object->get_a_line($mysql);
        $familyofpos = $familypos_arr['family_id'];
        //THE POSITION IS OBTAINED FROM THE PREVIOUS SCREEN
        //SHOW THE MODELS RELATING TO THAT POSITION...
        //SELECT THE MODELS THAT THIS PERSON IS CAPABLE OF VIEWING...
        //SELECT THE MODELS RELATING TO THAT POSITIONS' FAMILY...
        $userviewablemodels = $common->viewable_models($db_object, $user_id);
        $modelid_all = @implode("','", $userviewablemodels);
        if ($modelid_all != '') {
            $mysql = "select model_id \n\t\t\t\tfrom {$model_factors_1} \n\t\t\t\twhere family = '{$familyofpos}'\n\t\t\t\tand model_id in ('{$modelid_all}')";
            $models_arr = $db_object->get_single_column($mysql);
            $models_full = @implode("','", $models_arr);
        }
        if ($models_full != '') {
            $mysql = "select model_id,model_name from {$model_name_table} where model_id in ('{$models_full}')";
            $models_display_arr = $db_object->get_rsltset($mysql);
        }
        $multipleloopvalues['modelsview_loop'] = $models_display_arr;
        $values['posid'] = $posid;
        $returncontent = $common->direct_replace($db_object, $returncontent, $values);
        $returncontent = $common->multipleloop_replace($db_object, $returncontent, $multipleloopvalues, '');
        echo $returncontent;
    }
}
$obj = new displaymodels();
$obj->show_models($db_object, $common, $post_var, $default, $user_id);
include_once 'footer.php';