'/', 'bibliothek' => 'bibliothek/', 'bilder' => 'Bilder/', 'dokumente' => 'Dokumente/', 'videos' => 'Videos/', 'xml' => 'XML/', 'version' => 'Ver35/'); $shop = 0; $installVerzeichnis=""; $UDAT= array('firma' => 'KAISER Metall & Idee GmbH & Co.KG', 'anrede' => '', 'strasse' => 'Schweinsohl 1', 'plz' => '59846', 'ort' => 'Sundern/Sauerland', 'telefon' => '0049-(0)2933-90 98 360', 'fax' => '0049-(0)2933-92 17 75', 'internet' => 'www.der-stehtisch.de', 'internet2' => 'www.der-stehtisch.com (unser Shop)', 'email' => 'info@der-stehtisch.de', 'ustidnr' => 'DE 12 59 15 198', 'hrb' => 'GmbH & Co.KG - HRA 2861', 'gf' => 'Geschäftsführer: Felix Lohmann', 'hrb2' => 'Verwaltungs-GmbH - HRB 1943', 'ag' => 'AG Arnsberg', 'bank1' => "", 'blz1' => "", 'konto1' => "", 'iban1' => "", 'bic1' =>""); $rss_title="der-stehtisch.de RSS"; $rss_description="der-stehtisch.de RSS"; $rss_copyright="der-stehtisch.de GmbH"; $val_bestellung_lieferant = "koenig@netracom.de"; $val_bestellung_lieferant = "koenig@netracom.de"; #$val_bestellung_from="shop@autoverwerter-gebauer.de"; $val_shop_name="Onlineshop"; $picture_check_in = "/extensions/email/images/md5.jpg"; $picture_check = "/extensions/email/images/md5/"; $val_shop_bestell_agblink ="index.php?css=agb&lang=de&id=258&root_id=2&sl=0"; $picture_dir="extensions/bibliothek/bilder/produkte/big/"; $picture_dir_small="extensions/bibliothek/bilder/produkte/small/"; $watermark_pic="../administration/extensions/shop/images/watermark.png"; $picture_immo_dir="../extensions/immobilien/bilder/big/"; $picture_immo_dir_small="../extensions/immobilien/bilder/small/"; $watermark_immo_pic="../administration/extensions/immobilien/images/watermark.png"; $big_width="400"; $big_height="auto"; $small_width="175"; $small_height="auto"; ?>"; return false; } $tmp = mysqli_query( $linkid, "SET NAMES 'utf8'" ); return $linkid; } function verz_arr($pfad) { $i=0; $verz=opendir ($pfad); while ($file=readdir($verz)) { if (filetype($pfad.$file)!="dir" && $file !="." && $file != "..") { $file_arr[$i] = $file; $i++; } } closedir($verz); return $file_arr; } function verz_select($sname,$sel_val,$pfad) { $i=0; $verz=opendir ($pfad); $s=""; closedir($verz); return $s; } function LandSelectBox($start_val,$js_func,$val_array,$val_class) { $s=''; return $s; } function KundenSelectBox($start_val,$js_func,$val_array,$val_class) { $s=''; return $s; } function delshoppingbasket($session) { global $user; global $ACTUALDB; $db=$ACTUALDB; $lk=connect(); $sql="DELETE FROM baskets WHERE sessid='$session'"; $result=send_sql($db,$sql); if (!$result) $err=true; if ($err) kwrite("#414F88",2,"Ahhh..."); } function settag($s) { $s=str_replace('"',""",$s); $s=str_replace("'","´",$s); return $s; } function settag_c($s) { $s=str_replace('"','"',$s); $s=str_replace("´","'",$s); return $s; } function setrss($s) { $s=str_replace('"',""",$s); $s=str_replace('<',"<",$s); $s=str_replace('>',">",$s); $s=str_replace('&',"&",$s); return $s; } function kwrite($color,$size,$text) { echo ''.$text.''; } function createdb($db, $lkid) { if (! $res=mysql_create_db($db, $lkid)) { echo mysql_error($lkid); exit; } return $res; } function send_sql($db, $sql) { if (! $res=mysql_db_query($db, $sql)) { echo mysql_error(); exit; } return $res; } function my_fgetcsv($filename, $sep) { $arr=file($filename); $erg=array(""); foreach ($arr as $elem) { $str=$elem; $buf=explode ($sep,$str); $erg=array_merge ($erg, $buf); } array_shift($erg); return $erg; } function my_csvout($rows,$cols,$arr,$width,$border,$cp,$cs,$color) { reset ($arr); $cellwd=100/$cols."%"; echo ""; for ($c=0;$c<$cols;$c++) { $elem=pos($arr); echo ""; next($arr); } for ($r=1;$r<$rows;$r++) { echo ""; for ($c=0;$c<$cols;$c++) { $elem=pos($arr); echo ""; next($arr); } echo ""; } echo "
$elem
$elem
"; } function tab_out($result) { global $MYBGCOLOR; global $MYBGCOLOR_TITLE; global $MYBGCOLOR_FIELDS; global $MYWIDTH; global $MYROWALIGN; global $MYROWVALIGN; global $MYELEMALIGN; global $MYELEMVALIGN; global $MYFONTROW; global $MYFONTCOLORROW; global $MYFONTCOLORELEMENT; global $MYFONTELEMENT; global $MYFONTSIZE_1; global $MYFONTSIZE_2; global $MYFONTSIZE_3; global $MYFONTSIZE_4; global $MYBORDER; global $MYCELLPADDING; global $MYCELLSPACING; $anz=mysql_num_fields($result); echo ""; echo ""; for ($i=0;$i<$anz;$i++){ $MYROWTITLE=mysql_field_name($result,$i); echo ""; } echo ""; echo ""; while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) { foreach ($row as $elem) { echo ""; } echo ""; } echo "
$MYROWTITLE
$elem
"; } // tab function message($val_alert,$val_message,$val_hyperlinkname,$val_hyperlink) { $template=implode("", file("admin_message.htt")); $template=str_replace("{val_alert}",$val_alert,$template); $template=str_replace("{val_message}",$val_message,$template); $template=str_replace("{val_hyperlinkname}",$val_hyperlinkname,$template); $template=str_replace("{val_hyperlink}",$val_hyperlink,$template); echo $template; } function resizeto($source,$dest,$width,$height) { if (file_exists('temp.gif')) unlink('temp.gif'); copy($source,'temp.gif'); $osize=getimagesize('temp.gif'); $wrelation=$osize[1]/$osize[0]; $hrelation=$osize[0]/$osize[1]; $oimage=imagecreatefromgif("temp.gif"); if (($height=="") || ($height=="auto")) $height=round($width*$wrelation); if (($width=="") || ($width=="auto")) $width=round($height*$hrelation); $newimagesmall=imagecreate($width,$height); imagecopyresized($newimagesmall,$oimage,0,0,0,0,$width,$height,$osize[0],$osize[1]); if (file_exists($dest)) unlink($dest); imageGif($newimagesmall,$dest); imagedestroy($oimage); imagedestroy($newimagesmall); } function resizejpgto($source,$dest,$width,$height) { if (file_exists('temp.jpg')) unlink('temp.jpg'); copy($source,'temp.jpg'); $osize=getimagesize('temp.jpg'); $wrelation=$osize[1]/$osize[0]; $hrelation=$osize[0]/$osize[1]; $oimage=imagecreatefromjpeg("temp.jpg"); if (($height=="") || ($height=="auto")) $height=round($width*$wrelation); if (($width=="") || ($width=="auto")) $width=round($height*$hrelation); $newimagesmall=imageCreateTrueColor($width,$height); imagecopyresized($newimagesmall,$oimage,0,0,0,0,$width,$height,$osize[0],$osize[1]); if (file_exists($dest)) unlink($dest); imageJPEG($newimagesmall,$dest); imagedestroy($oimage); imagedestroy($newimagesmall); } function resizegifto($source,$dest,$width,$height) { if (file_exists('temp.gif')) unlink('temp.gif'); copy($source,'temp.gif'); $osize=getimagesize('temp.gif'); $wrelation=$osize[1]/$osize[0]; $hrelation=$osize[0]/$osize[1]; $oimage=imagecreatefromgif("temp.gif"); if (($height=="") || ($height=="auto")) $height=round($width*$wrelation); if (($width=="") || ($width=="auto")) $width=round($height*$hrelation); $newimagesmall=imagecreate($width,$height); imagecopyresized($newimagesmall,$oimage,0,0,0,0,$width,$height,$osize[0],$osize[1]); if (file_exists($dest)) unlink($dest); imageGif($newimagesmall,$dest); imagedestroy($oimage); imagedestroy($newimagesmall); } function watermark($watermark_file,$input_file,$output_file,$dest_width,$dest_height,$pic_typ) { if (strtolower($pic_typ) == "jpg" || strtolower($pic_typ) == "pjpg" || strtolower($pic_typ) == "jpeg" || strtolower($pic_typ) == "pjpeg") { $src_size = getimagesize($input_file); $wrelation=$src_size[1]/$src_size[0]; $hrelation=$src_size[0]/$src_size[1]; if (($dest_height=="") || ($dest_height=="auto")) $dest_height=round($dest_width*$wrelation); if (($dest_width=="") || ($dest_width=="auto")) $dest_width=round($dest_height*$hrelation); $src_img = imagecreatefromjpeg($input_file); $image=imagecreatetruecolor($dest_width,$dest_height); if (function_exists("imageCopyResampled")) { imagecopyresampled($image,$src_img,0,0,0,0,$dest_width,$dest_height,$src_size[0],$src_size[1]); } else { imagecopyresized($image,$src_img,0,0,0,0,$dest_width,$dest_height,$src_size[0],$src_size[1]); } $burn_img = imagecreatefrompng($watermark_file); $logoW = ImageSX($burn_img); $logoH = ImageSY($burn_img); imagealphablending($image, true); // Falls das Logo keine Transparenz hat raus nehmen! if (function_exists("imageCopyResampled")) { imagecopyresampled($image, $burn_img, 0,0,0,0, $dest_width, $dest_height, $logoW, $logoH); } else { imagecopyresized($image, $burn_img, 0,0,0,0, $dest_width, $dest_height, $logoW, $logoH); } imageJPEG($image,$output_file,100); imagedestroy($image); imagedestroy($burn_img); } } function nm_check_valid_email($email) { if(eregi("^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}", $email)) { return true; } else { return false; } } function nm_email_check(){ global $picture_check_in,$picture_check; $image = imagecreatefromjpeg($_SERVER["DOCUMENT_ROOT"].$picture_check_in); for ($i=0;$i<=4;$i++) { $angel = rand(-20,20); $pos = $i*40+20; $size = rand(15,25); $y = 10+rand(0,10); $color = imagecolorallocate($image, rand(0,100),rand(50,150), rand(100,255)); imagestring($image,$size,$pos,$y,substr($_SESSION['shash'],$i,1),$color); } $handle=opendir($_SERVER["DOCUMENT_ROOT"].$picture_check); while($data=readdir($handle)) { if($data!="." && $data!="..") unlink($_SERVER["DOCUMENT_ROOT"].$picture_check.$data); } closedir($handle); imageJPEG($image,$_SERVER["DOCUMENT_ROOT"].$picture_check.$_SESSION['filehash'].".jpg",72); imagedestroy($image); } function mk_date($datum) { $date_parts = explode (".", $datum); switch ($date_parts[1]) { case "01": $date_parts[1] = "January"; break; case "02": $date_parts[1] = "February"; break; case "03": $date_parts[1] = "March"; break; case "04": $date_parts[1] = "April"; break; case "05": $date_parts[1] = "May"; break; case "06": $date_parts[1] = "June"; break; case "07": $date_parts[1] = "July"; break; case "08": $date_parts[1] = "August"; break; case "09": $date_parts[1] = "September"; break; case "10": $date_parts[1] = "October"; break; case "11": $date_parts[1] = "November"; break; case "12": $date_parts[1] = "December"; break; } $date_string=$date_parts[0]." ".$date_parts[1]." ".$date_parts[2]; if ($date_string != "") { if (($new_datum = strtotime($date_string)) === -1) { $new_datum = strtotime("now"); } else { $new_datum = strtotime($date_string); } } else { $new_datum = strtotime("now"); } return $new_datum; } function addzeros($number) { if (strpos($number,".",0)==false) $number=$number.".00"; else if (strpos($number,".",0)>=strlen($number)-2) $number=$number."0"; return $number; } function navi($query,$seitenzahl,$step,$startwert,$min_value,$max_value,$script,$param,$id,$seitentemplate) { // Navigationszeile erzeugen $tmp_template=implode("",file($seitentemplate)); if (isset($_GET['lang']))$lang=$_GET['lang']; if (isset($anzseiten)) ; else $anzseiten=10; if (isset($step)) ; else $step=10; if (isset($start)) ; else $start=1; if (isset($id)) ; else $id=1; if (isset($param)) ; else $param=""; if (isset($min_value)) ; else $min_value=0; if (isset($max_value)) ; else $max_value=10; $treffer_result = mysqli_query( $lk,$query ); $treffer = mysqli_num_rows( $treffer_result ); if ($min_value == 0) { $prev_min_value = $min_value; } else { $prev_min_value = $min_value - $step; } if (is_int($treffer / $step)){ $anz_seiten = floor($treffer / $step); } else { $anz_seiten = floor($treffer / $step) + 1; } $next_min_value = $min_value + $step; $next_max_value = $max_value; $prev_max_value = $max_value; $s_tmp=$tmp_template; $min_seite=0; $min = ($startwert-1)*$step; $anfang =$startwert-$seitenzahl; // Zurück Schalter erzeugen if ($anfang < 0) { $anfang=""; $s_tmp=str_replace("{seite}",$anfang,$s_tmp); $s_tmp=$s_tmp.$tmp_template; } else { $aktive_seite=($min/$seitenzahl)-$seitenzahl+1; $anfang='< '; $s_tmp=str_replace("{seite}",$anfang,$s_tmp); $s_tmp=$s_tmp.$tmp_template; } for ($i=$startwert;$i<=$seitenzahl+$startwert-1 && $i<=$anz_seiten;$i++) { if ($i==$id) { #$seite="[$i]"; $seite='['.$i.']'; $s_tmp=str_replace("{seite}",$seite,$s_tmp); $s_tmp=$s_tmp.$tmp_template; $min=$min+$step; } else { $seite='['.$i.']'; $s_tmp=str_replace("{seite}",$seite,$s_tmp); $s_tmp=$s_tmp.$tmp_template; $min=$min+$step; } } // Weiter Schalter erzeugen if ($min==0);$aktive_seite=($min/10)+1; if ($i>=$anz_seiten) { $ende=" "; $s_tmp=str_replace("{seite}",$ende,$s_tmp); } else { $ende=' >'; $s_tmp=str_replace("{seite}",$ende,$s_tmp); } return $s_tmp; } function treffer($query) { // gefundene Ergebnisse anzeigen #$lk=connect(); #global $ACTUALDB; #$db=$ACTUALDB; $treffer_result = mysqli_query( $lk,$query ); $treffer = mysqli_num_rows( $treffer_result ); return $treffer; } function createlistfromtable_formatted($sname,$table,$name,$value,$actualvalue,$fgroesse,$sortname,$sort_asc_desc) // Wert wird in $sname zurück gegeben { global $ACTUALDB; $db=$ACTUALDB; $lk=connect(); $sql = "SELECT ".$name.", ".$value." FROM ".$table." ORDER BY ".$sortname." ".$sort_asc_desc; $result = mysqli_query( $lk,$sql ); $s=""; return $s; } function max_wert($my_table,$my_col) { global $ACTUALDB; $db=$ACTUALDB; $lk=connect(); $sql = "SELECT MAX(".$my_col.") FROM ".$my_table; $result = mysqli_query( $lk,$sql ); $row = mysqli_fetch_row( $result ); if (!$row[0]) { $max_val = 1; } else { $max_val = $row[0]+1; } return $max_val; } function min_wert($my_table,$my_col) { global $ACTUALDB; $db=$ACTUALDB; $lk=connect(); $sql = "SELECT MIN(".$my_col.") FROM ".$my_table; $result = mysqli_query( $lk,$sql ); $row = mysqli_fetch_row( $result ); if (!$row[0]) { $min_val = 0; } else { $min_val = $row[0]; } return $min_val; } function __mk_format_field($myField,$myLaenge) { $tmp=""; for($i=0;$i<$myLaenge;$i++) { if($i>strlen($myField) && $i<=$myLaenge) $tmp.=" "; } $tmpaus = $myField.$tmp; return $tmpaus; } # rewrite rules function settag_rewrite($s) { $s=str_replace('ä',"ae",$s); $s=str_replace("ö","oe",$s); $s=str_replace("ü","ue",$s); $s=str_replace("Ö","Oe",$s); $s=str_replace("Ä","Ae",$s); $s=str_replace("Ü","Ue",$s); $s=str_replace("ß","ss",$s); $s=str_replace("?","",$s); $s=str_replace("!","",$s); $s=str_replace(" ","_",$s); $s=str_replace("/","",$s); $s=str_replace("'","",$s); $s=str_replace('"',"",$s); $s=str_replace(",","",$s); $s=str_replace(".","",$s); $s=str_replace("(","",$s); $s=str_replace(")","",$s); $s=str_replace("'","",$s); $s=str_replace('"',"",$s); $s=str_replace('*',"",$s); $s=str_replace('´',"",$s); $s=str_replace('`',"",$s); $s=str_replace('+',"",$s); $s=str_replace('-',"",$s); return $s; } function set_title($row_arr,$lang) { $row_arr['title'] = utf8_decode($row_arr['title']); $row_arr['title'] = settag_rewrite_url($row_arr['title']); if ($row_arr['css'] =="" OR !isset($row_arr['css'])){ $row_arr['css'] = "standard"; } if ($row_arr['root_id'] == 2) { $href_rew = strtolower("//".$_SERVER['SERVER_NAME']."/".$lang."/".$row_arr['title']); #$href_rew = $row_arr['title'].".".$lang; } else { $href_rew = strtolower("//".$_SERVER['SERVER_NAME']."/".$lang."/-".$row_arr['title']); } return $href_rew; } function set_title_news($row_arr,$lang) { global $installVerzeichnis; $installVerzeichnis != "" ? $instVerz = $installVerzeichnis."/" : $instVerz = ""; $row_arr['title'] = utf8_decode($row_arr['title']); $row_arr['title'] = settag_rewrite_url($row_arr['title']); if ($row_arr['css'] =="" OR !isset($row_arr['css'])){ $row_arr['css'] = "standard"; } $href_rew = strtolower("//".$_SERVER['SERVER_NAME']."/".$instVerz.$lang."/news/".$row_arr['title']); return $href_rew; } # ende rewrite function GetDirArray($sPath,$laenge) { global $verzeichnisbaum; //Load Directory Into Array $handle = opendir($sPath); while ($file = readdir($handle)) { $retVal[count($retVal)] = $file; } //Clean up and sort closedir($handle); sort($retVal); while (list($key, $val) = each($retVal)) { if ($val != "." && $val != "..") { #$path = str_replace("//","/",$sPath.$val); if(is_file($sPath."/".$val)){ } else{ $verzeichnisbaum .= "".substr($sPath."/".$val,$laenge)."
"; $verzeichnisbaum = str_replace("//","/",$verzeichnisbaum); } if (is_dir($sPath."/".$val)) { GetDirArray($sPath."/".$val."/",$laenge); } } } } function GetDirArray2($sPath,$laenge) { global $verzeichnisbaum2; //Load Directory Into Array $handle=opendir($sPath); while ($file = readdir($handle)) { $retVal[count($retVal)] = $file; } //Clean up and sort closedir($handle); sort($retVal); while (list($key, $val) = each($retVal)) { if ($val != "." && $val != "..") { #$path = str_replace("//","/",$sPath.$val); if(is_file($sPath."/".$val)){ } else{ $verzeichnisbaum2 .= "".substr($sPath."/".$val,$laenge)."
"; $verzeichnisbaum2 = str_replace("//","/",$verzeichnisbaum2); } if (is_dir($sPath."/".$val)) { GetDirArray2($sPath."/".$val."/",$laenge); } } } } function DivSelectBox($start_val,$js_func,$val_array,$val_class) { $s=''; return $s; } function console_log( $data ) { $output = ""; echo $output; } // Shop function AusfuehrungSelectBox($start_val,$js_func,$val_array,$val_class) { $s=''; return $s; } // SelectBox Lieferanten function SelectBoxLieferanten($name,$js_func,$val_array,$start_val,$css_class) { $s=''; return $s; } // SelectBox Obergruppe function SelectBoxObergruppe($name,$js_func,$val_array,$start_val,$css_class) { $s=''; return $s; } // SelectBox Untergruppe function SelectBoxUntergruppe($name,$js_func,$val_array,$start_val,$css_class) { $s=''; return $s; } ?>