How can i display in themplate file only a few post

Ok. You are toggling your display according to a $_GET parameter that you have added to the URL– this switch in your archive.php

$view = 'poster';
$mode = stripslashes( $_GET["afisare"] );
$modes = array('complex', 'simple', 'poster');
if(in_array($mode, $modes)) $view = $mode;
get_template_part('persoane', $view);

You can alter how many posts will display but that is much too late to do it.

Untested, but I would try a hook on pre_get_posts.

function toggle_modes($query) {
  global $_GET;
  if (isset($_GET["afisare"])) {
    $modes = array(
      'complex' => 12, 
      'simple' => 30, 
      'poster' => 24
    );
    if (isset($modes[$_GET["afisare"]])) {
      $query->set('posts_per_page',$modes[$_GET["afisare"]]);
    }
  }
}
add_action('pre_get_posts','toggle_modes');

Your URL parameters have to be in every request sent to this page or the pagination will get out of sync.

That is the simplest way to go from where you are to where you want to be. It may well not be the best way. You can think about something like: Passing and retrieving query vars in wordpress