Ortnamnsregistret | Institutet för språk och folkminnen
0 && strlen($mesaj)>0) {
echo 'Welcome '. $nume. ' The message you`ve sent:
'. $mesaj. '
';
}
else {
echo 'Fill in all form fields';
}
}
*/
//#################################################
//$s = strip_tags($_POST['hiddenI']);
//echo $s;
$delimiter = '|\n';
//$jArray = explode(delimiter, $_POST['hiddenF']);
$jArray = explode(delimiter, $_POST['hiddenX']);
// $jArray = $_POST['hiddenF'];
//$pArray = new Array( $jArray );
//foreach ( $pArray as $getArray ) {
foreach ( $jArray as $getArray ) {
$getArray = $getArray;
echo $getArray;
}
//#################################################
// if data are received via POST
//if (isset($_POST['nume']) && isset($_POST['mesaj']))
//{
// get data into variables, deleting the html tags
// $xx1 = strip_tags($_POST['hiddenX']);
$xx1 = $_POST['hiddenX'];
// if the form fields are completed
//echo "'. $xx1. ' ";
echo $xx1;
//}
?>
'."\n".'var '.$arrayName.'=[];'."\n";
// check if $dataSource is a file or a result set
if(is_file($dataSource)){
// read data from file
$row=file($dataSource);
// build JavaScript array
for($i=0;$i{$tempOutput} ";
}
// $javascript.=trim($tempOutput)."\n".'";';
$javascript.=trim($tempOutput).'";'."\n";
// echo "{$tempOutput} ";
}
}
$javascript.=''."\n\n";
// return JavaScript code
return $javascript;
}
function SkapaArray() {
set_time_limit(0);
$db = @mysql_connect("loopback", "soresigv", "Dox.rint") or die("Connection impossible at this time.");
@mysql_select_db("ortnamndb") or die("Selection impossible at this time.");
$rubrik = $_POST['rubrik'];
$text = str_replace("\r","",$_POST['sok1']); //ny rad
$arrtext = explode("\n",$text); //skapa array med nyckelord
$sql1 = "SELECT DISTINCT alan,akod,aurv,akat,adok,aort,ahrd,alfk,asok,arub,alok,atol,abel,apub,alkp FROM ortnareg WHERE asok LIKE '$rubrik'";
foreach($arrtext as $keyword) {
//echo "%$keyword ";
//echo " AND asok NOT LIKE '$keyword' ";
$keyword = trim($keyword);
if ($keyword != "") {
$sql1 = $sql1 . " AND asok NOT LIKE '$keyword'";
}
}
$sql1 = $sql1 . " GROUP BY asok,alok ORDER BY asok,alok;";
//$sql1 = $sql1 . " LIMIT 0,30;";
//$sql1 = stripslashes(sql1);
//$sql1 = mysql_real_escape_string($sql1);
echo "$sql1 ";
//$sql = "SELECT * FROM ortnareg WHERE asok LIKE '%ik' AND asok NOT LIKE '%vik' AND asok NOT LIKE '%wik' LIMIT 0,30;";
//$sql = "SELECT DISTINCT alan,akod,aurv,akat,adok,aort,ahrd,alfk,asok,arub,alok,atol,abel,apub,alkp FROM ortnareg WHERE asok LIKE '%ik' AND asok NOT LIKE '%vik' AND asok NOT LIKE '%wik' GROUP BY asok,alok ORDER BY asok,alok;";
$result = mysql_query($sql1, $db);
if(!$result){
echo mysql_error();
exit;
}
$num_rows = mysql_num_rows($result);
//echo $num_rows;
echo createJavaScript($result,'namn');
// close the connection
mysql_free_result($result);
mysql_close();
}
//SkapaArray();
?>
Replace lyckades! ";
}else{
echo " Replace misslyckades! ";
}
mysql_close();
}
function SetJSarray($i){
$j = 0;
?>
";
echo "document.write('";
echo "";
echo "');";
echo "";
?>
Hejsan hoppsan! ";
?>