\n"; print "\n"; print "\tПосещения: \n"; while ($get_info=mysql_fetch_row($result)){ foreach ($get_info as $field) print "\t$field\n"; } print "\n"; print "\n"; print "\n"; } function list_query($sql){ echo $sql; $result=mysql_query($sql) or die("Query failed: " . mysql_error()); print "\n"; while ($get_info=mysql_fetch_row($result)){ foreach ($get_info as $field) print ""; } print "
$field
\n"; } function select($sql){ $result = mysql_query($sql) or die("Query failed: " . mysql_error()); print ""; while ($row = mysql_fetch_array($result)) { $tablerow=""; $tablerow.=""; $tablerow.=""; $tablerow.=""; $tablerow.=""; $tablerow.=""; print $tablerow; } print "
".$row['PDFID']."".$row['NAME']."".$row['PATH']."".$row['INFO']."
"; } function dataset(){ $mtable = "club_group"; $cn="center"; $sql = "SELECT * FROM $mtable"; $theresult = mysql_query($sql) or die("Query failed: " . mysql_error()); $thenumber = mysql_numrows($theresult); $j=0; print "
"; while ($thenumber > $j) { $http = mysql_result($theresult,$j,"ghttp"); $group = mysql_result($theresult,$j,"name"); print "

$group

"; $j++; } } function datasource($sql){ $result = mysql_query($sql) or die("Query failed: " . mysql_error()); return $result; } function adminmenuselect($sql) { $result = mysql_query($sql) or die("Query failed: " . mysql_error()); $thenumber = mysql_num_rows($result); $i=0; while ($thenumber > $i) { $cust = mysql_result($result,$i,"MENUCUSTOM"); $name = mysql_result($result,$i,"MENUNAME"); $http = mysql_result($result,$i,"HTTP"); if ($cust==""){ echo " •  $name
"; }else{ echo " •  $cust
"; } $i++; } echo " • "; } function qet_value($value){ $sql="SELECT VALUE FROM Z_SETTINGS WHERE NAME=\"$value\""; $result=mysql_query($sql) or die("Query failed: " . mysql_error()); while ($get_info=mysql_fetch_row($result)){ foreach ($get_info as $field) $value=$field; } return $value; } function convert_blob($b){ $i=0; $l=(strlen($b)-1); $str=""; //echo "
len=$l
"; while ($i<=$l){ //echo "
cod=".ord($b{$i})."
"; if (ord($b{$i})==10){ //echo "
Enter
"; $str.="
"; //$str.="
"; }else{ //echo "
chr=".$b{$i}."
"; $str.=$b{$i}; } $i++; } //$str.="<>" //echo $str; return $str; } function get_label($label){ $lang=qet_value('DEF_LANG'); $sql="SELECT * FROM LABEL,CUSTOM_LABEL WHERE LABEL_FK=LABEL_ID AND LANG_FK='$lang' AND LABEL_NAME='$label'"; $result = mysql_query($sql) or die("Query failed: " . mysql_error()); while ($row = mysql_fetch_array($result)) { //$label=$row['LABEL_NAME']; $cust=$row['CUSTOM_LABEL_NAME']; if (($cust<>"")&&($lang>=0)){ $label=$cust; } } return $label; } function get_message($msg){ $lang=qet_value('DEF_LANG'); if ($lang>=0){ $sql="SELECT MESSAGE,CUSTOM_MESSAGE FROM CUSTOM_MESSAGE,MESSAGE WHERE MESSAGE_FK=MESSAGE_ID AND MESSAGE_NAME= '$msg' AND LANG_FK='$lang' "; }else{ $sql="SELECT MESSAGE FROM MESSAGE WHERE MESSAGE_NAME= '$msg'"; } //echo "$sql
"; $result = mysql_query($sql) or die("Query failed: " . mysql_error()); $numrow= mysql_num_rows($result); //echo "numrow=$numrow"; while ($row = mysql_fetch_array($result)) { $cust=$row['CUSTOM_MESSAGE']; $message=$row['MESSAGE']; if ($cust<>""){ $message=$cust; } } return $message; } function get_url(){ $p=$_GET['p']; $a=$_GET['a']; $t=$_GET['t']; $s=$_GET['s']; $m=$_GET['m']; $to=$_GET['to']; $so=$_GET['so']; $mo=$_GET['mo']; $id=$_GET['id']; if (isset($_GET['go'])) $p=$_GET['go']; if (isset($_GET['in'])) $a=$_GET['in']; $url="index.php?p=$p&a=$a&t=$t&s=$s&m=$m&to=$to&so=$so&mo=$mo&id=$id"; return $url; } ?> time()) and (!$login)){ $query = mysql_query("select pass,Kunde,messstellen,nr from kunden where user = '$user'"); $result = mysql_num_rows($query); if ($result < 1) { $login = false; } else { list ($pass,$Kunde,$messstellen,$nr) = mysql_fetch_row($query); if ($hash == md5($user.$pass.$loginzeit)){ $login = true; } else $login = false; }} //mysql_select_db($db) or die ("Unable to select the database");Unable to select the database - direkt