function tool_id3($tbl) {

  global $db,$ar;

  

  $sql4 = select id from .$tbl. where id2=id order by id desc limit 1;

  $res4 = mysqli_query($db, $sql4);

  $rw4 = mysqli_fetch_assoc($res4);

  if(isset($rw4) && $rw4[id]>0) {        

    $sql = select * from .$tbl. where id>.$rw4[id]. order by id;

    $res = mysqli_query($db, $sql);

    $id2=$rw4[id]+1;

    while($rw = mysqli_fetch_assoc($res)) {

      $udt=array(

          id2=>$id2,

      );

      Update($db,$tbl,$udt,id=.$rw[id],0);

      $id2++;

    }  

  }

}