Initial commit
This commit is contained in:
47
func_make_reference_fa.php
Normal file
47
func_make_reference_fa.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
#error_reporting(E_ALL);
|
||||
require_once("config.inc.php");
|
||||
require_once("func_ansicht.php");
|
||||
require_once("bibellookup_2017.php");
|
||||
#require_once("func_htmlclean.php");
|
||||
echo "
|
||||
<script type='text/javascript' src='overlib/overlib.js'></script>
|
||||
";
|
||||
|
||||
#$bibellink = 'bibleserver';
|
||||
#$bibellink = 'lokal';
|
||||
$lid="";
|
||||
$db = dbconnect();
|
||||
|
||||
$db->query("SET NAMES 'utf8'");
|
||||
|
||||
$query = "SELECT reference, knkfa_id
|
||||
FROM knk_fa
|
||||
where knkfa_id != 745
|
||||
ORDER BY knkfa_id ASC";
|
||||
$result = $db->query($query);
|
||||
|
||||
|
||||
while ($row = $result->fetch_array()){
|
||||
|
||||
$text = str_replace(' "', ' \"', $row['reference']);
|
||||
$suchmuster = '/([0-9]{1,3})/';
|
||||
$text=preg_replace_callback($suchmuster, function($m) { return makeKNK_FA2($m[1]);}, $text);
|
||||
|
||||
$text= str_replace (array("'"), array("''"), $text);
|
||||
$text= str_replace (array("\''verse\''"), array("\\\''verse\\\''"), $text);
|
||||
|
||||
$text= str_replace (array("&\#39;"), array("&\#39;"), $text);
|
||||
|
||||
if( $row['reference'] != ''){
|
||||
#echo"UPDATE knk_fa SET reference_lokal='$text' WHERE knkfa_id='$row[knkfa_id]<br>'";
|
||||
|
||||
#Beides auf einmal, da keine Bibellinks vorkommen, au<61>er bei frage 745, dort aber keine internen Verweise auf KNK-FA
|
||||
$sql1 = $db->query("UPDATE knk_fa SET reference_lokal='$text' WHERE knkfa_id='$row[knkfa_id]'");
|
||||
$sql = $db->query ("UPDATE knk_fa SET reference_bibleserver='$text' WHERE knkfa_id='$row[knkfa_id]'");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
Reference in New Issue
Block a user