<?
$lineNumber=0;
do
{
   $lin=$BibleLines[$lineNumber];
   $lint=$BibleTopic[$lineNumber];
   $pos=stripos($lin,` `);
   $buk=substr($lin,0,$pos);
   $pos2=stripos($lin,`:`,$pos);
   $chp=substr($lin,$pos+1,$pos2-$pos-1);
   $lint=substr($lint,$pos2+1);
   $lin2=substr($lin,$pos2+1);
   $pos3=stripos($lin2,` `);
//echo ~pos3=$pos3<br>~;
   $vrs=substr($lin2,0,$pos3);
   $text=substr($lin2,$pos3+1);
   $lint=substr($lint,$pos3+1);
   CleanText($text);
   CleanText($lint);
   $text=str_replace(`;`,CHR(191),$text);
   $lint=str_replace(`;`,CHR(191),$lint);
   $ref=$buk.` `.$chp.`:`.$vrs;
   $fulname=$ful[BookIdx($buk)];

//   echo ~lineNumber=$lineNumber book=$buk chp=$chp vrs=$vrs ref=$ref fulname=$fulname <br> text=$text<br> lint=$lint<br>~;
//die();

   $sql=~insert into Bible (line,testament,book,chapter,verse,bookfull,text,links) ~ .
        ~ values($lineNumber,`OT`,`$buk`,$chp,$vrs,`$fulname`,`~.$text.~`,`~.$lint.~`)~;
//die($sql);
   ExecuteSQL($sql);

   $lineNumber=$lineNumber+1;

}
while ($lineNumber<31102);

?>