<?php
include_once("cnfg.php");
if ($fl=@file("userkeys.dat")) {$cnt=count($fl); $time=time();
 for ($i=0;$i<$cnt;$i++) {
  list($p1,$p2,$p3,$p4,$p5,$p6,$p7,$p8)=split('\^',trim($fl[$i]));
  $sr=$p2; $lg=$p3; $ps=$p4; $skl=$p5; $p6=NULL; $shs=$p7; $ib=$p8;
  if ($p1==$k) {
   $str=""; $fl[$i]="$p1^$sr^$lg^$ps^$skl^$time^$shs^$ib\r\n";
   for ($j=0;$j<count($fl);$j++) {$str.=$fl[$j];}
   $f=@fopen("userkeys.dat","w"); @fwrite($f,$str); @fclose($f);
   break;
  } else {
   if ($i==$cnt-1) {header("Location: $dftp/index.php"); exit;}
  }
 }
} else {header("Location: $dftp/index.php"); exit;}
?>