'netracom gmbh', 'anrede' => 'Herr König', 'strasse' => 'Annabergstr. 29a', 'plz' => '45721', 'ort' => 'Haltern am See', 'telefon' => '+49 (0) 2364 508 999 0', 'fax' => '+49 (0) 2364 508 999 50', 'internet' => 'www.netracom.de', 'email' => 'info@netracom.de', 'ustidnr' => 'DE 207 172 185', 'hrb' => 'HRB 7965', 'ag' => 'AG Gelsenkirchen', 'bank1' => "Stadtsparkasse Dortmund", 'blz1' => "440 501 99", 'konto1' => "401 011 560", 'iban1' => "DE62440501990401011560", 'bic1' =>"DORTDE33"); $rss_title="netraMANAGE RSS"; $rss_description="netraMANAGE"; $rss_copyright="netracom gmbh"; $val_bestellung_lieferant = "koenig@netracom.de"; $val_bestellung_from="shop@netracom.de"; $val_shop_name="netracom 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/shop/bilder/big/"; $picture_dir_small="../extensions/shop/bilder/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"; ?>"; exit; } $tmp = mysql_query("SET NAMES 'utf8'",$linkid); 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 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 $lk=connect(); global $ACTUALDB; $db=$ACTUALDB; $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=send_sql($db,$query); $treffer = mysql_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; // Zurck 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=send_sql($db,$query); $treffer = mysql_num_rows($treffer_result); return $treffer; } function createlistfromtable_formatted($sname,$table,$name,$value,$actualvalue,$fgroesse,$sortname,$sort_asc_desc) // Wert wird in $sname zurck gegeben { global $ACTUALDB; $db=$ACTUALDB; $lk=connect(); $sql="SELECT ".$name.", ".$value." FROM ".$table." ORDER BY ".$sortname." ".$sort_asc_desc; $result=send_sql($db,$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=send_sql($db,$sql); $row=mysql_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=send_sql($db,$sql); $row=mysql_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; } ?>