<commit_before><?php
	$standalone=(strpos($_SERVER["PHP_SELF"], 'ergebnisse.php'));
/* access data in config file (data not inside repo) */
include_once( (($standalone)?'':'shop/').'dbconf.php' );

$dblink = mysql_connect( $dbhost, $dbuser, $dbpass ) or
	die( 'Keine Verbindung möglich: ' . mysql_error() );
mysql_select_db( $dbname );
$suche = (isset($_POST['suche'])) ? $_POST['suche'] : '' ;

$sql = 'SELECT bu.id AS id, barcode, titel, netto, au.name AS autor FROM 
						buecher AS bu JOIN autor AS au ON au.id = bu.autorid
						JOIN verlag AS ve ON ve.id = bu.verlagsid
						where (
							titel like \'%' . mysql_escape_string( $suche ) . '%\' or 
							au.name like \'%' . mysql_escape_string( $suche ) . '%\' or
							ve.name like \'%' . mysql_escape_string( $suche ) . '%\'
						)';
//echo $sql;
$result = mysql_query( $sql );
if( $result === FALSE ) {
	die( mysql_error() ); // TODO: better error handling
}
//~ <!--
	  //~ Self-PHP:<br>
	  //~ <input type="text" name="artikel[0]">
	  //~ <br>
	  //~ Referenz:<br>
	  //~ <input type="text" name="artikel[1]">
	  //~ <br>
	  //~ PHP-Kochbuch:<br>
	  //~ <input type="text" name="artikel[2]">
	  //~ <br><br>
	  //~ 
//~ 
//~ -->
echo( '<form action="'.((!isset($caller)||!in_array($caller,$callers))?'berechnung.php':'?show=berechnung').'" method="post">
<table border="1"><tr><th>Gewünschte Anzahl</th><th>ISBN</th><th>Preis</th><th>Titel</th><th>Autor</th></tr>' );
while ( $row = mysql_fetch_array( $result ) ) {
	echo( '<tr>'
	. '<td><input size="4" type="text" name="artikel['.$row['barcode'].']"></td><td>' . utf8_encode( $row['barcode'] ) . '</td>'
	. '<td>' . utf8_encode( $row['netto'] ) . '</td>'<commit_msg>fix: bestellen: undefines array artikel<commit_after><?php
	$standalone=(strpos($_SERVER["PHP_SELF"], 'ergebnisse.php'));
/* access data in config file (data not inside repo) */
include_once( (($standalone)?'':'shop/').'dbconf.php' );

$dblink = mysql_connect( $dbhost, $dbuser, $dbpass ) or
	die( 'Keine Verbindung möglich: ' . mysql_error() );
mysql_select_db( $dbname );
$suche = (isset($_POST['suche'])) ? $_POST['suche'] : '' ;

$sql = 'SELECT bu.id AS id, barcode, titel, netto, au.name AS autor FROM 
						buecher AS bu JOIN autor AS au ON au.id = bu.autorid
						JOIN verlag AS ve ON ve.id = bu.verlagsid
						where (
							titel like \'%' . mysql_escape_string( $suche ) . '%\' or 
							au.name like \'%' . mysql_escape_string( $suche ) . '%\' or
							ve.name like \'%' . mysql_escape_string( $suche ) . '%\'
						)';
//echo $sql;
$result = mysql_query( $sql );
if( $result === FALSE ) {
	die( mysql_error() ); // TODO: better error handling
}
//~ <!--
	  //~ Self-PHP:<br>
	  //~ <input type="text" name="artikel[0]">
	  //~ <br>
	  //~ Referenz:<br>
	  //~ <input type="text" name="artikel[1]">
	  //~ <br>
	  //~ PHP-Kochbuch:<br>
	  //~ <input type="text" name="artikel[2]">
	  //~ <br><br>
	  //~ 
//~ 
//~ -->
echo( '<form action="'.((!isset($caller)||!in_array($caller,$callers))?'berechnung.php':'?show=berechnung').'" method="post">
<table border="1"><tr><th>Gewünschte Anzahl</th><th>ISBN</th><th>Preis</th><th>Titel</th><th>Autor</th></tr>' );
while ( $row = mysql_fetch_array( $result ) ) {
	$anzahl=0;
	if( isset($_SESSION["artikel"][$row['barcode']]) ){
		$anzahl=$_SESSION["artikel"][$row['barcode']];
	}
	echo( '<tr>'
	. '<td><input size="4" type="text" name="artikel['.$row['barcode'].']" value='.$anzahl.' ></td><td>' . utf8_encode( $row['barcode'] ) . '</td>'
	. '<td>' . utf8_encode( $row['netto'] ) . '</td>'
{'fraction_non_alphanumeric': 0.25311438278595694, 'fraction_numerical': 0.004246885617214043, 'mean_word_length': 3.6856763925729443, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 69, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '191328', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1397, 'n_words': 263}