"; // DB gegevens $db1 = "lindeman_nl"; $dbhost = "localhost"; $dbuser = "lindeman_sid"; $dbpass = "druk321"; // E-mail voor webmaster bij database-probleem $webmaster = "info@sterkindrukwerk.nl"; $debug = "1"; // DB error $dberror = ' Website niet beschikbaar wegens onderhoud
De website is momenteel niet beschikbaar vanwege onverwacht onderhoud.
Onze excuses voor het ongemak. Probeer het later nogmaals.
Indien het probleem zich blijft voordoen, kunt u contact opnemen
met de webmaster: '.$webmaster.'
'; // als je dit include, wordt er gelijk een connectie gemaakt $db_conn = @mysqli_connect($dbhost, $dbuser, $dbpass) or die ($dberror); $db = mysqli_connect($dbhost, $dbuser, $dbpass,$db1); if (mysqli_connect_errno()) { $db_error = 1; } function mysqli_result($result,$row,$field=0) { global $db; if ($result===false) return false; if ($row>=mysqli_num_rows($result)) return false; if (is_string($field) && !(strpos($field,".")===false)) { $t_field=explode(".",$field); $field=-1; $t_fields=mysqli_fetch_fields($result); for ($id=0;$idtable==$t_field[0] && $t_fields[$id]->name==$t_field[1]) { $field=$id; break; } } if ($field==-1) return false; } mysqli_data_seek($result,$row); $line=mysqli_fetch_array($result); return isset($line[$field])?$line[$field]:false; } // doe een database query, incl error afhandeling function sql_doe_query($query) { global $db, $db_conn, $debug; // Doet de query en maakt een token aan $token = mysqli_query($db, $query); if ($token) { return $token; } else { show_error(mysqli_error()); if ($debug=="1") { echo "

$query"; } return 0; } } // aantal teruggekregen records function sql_get_aantal($token) { global $db; return mysqli_num_rows($token); } // haal een row op (gebruik los en in while-loop) function sql_get_row($token) { global $db; // Krijgt het token van sql_doe_query $array_with_row = mysqli_fetch_array($token); return $array_with_row; } // bij een auto_increment, haal het ID op dat net aangemaakt is function sql_get_last_id($token) { global $db; return mysqli_insert_id(); } function show_error($tekst) { echo '

Error '.$tekst.':
'; } // DBMYSQL - EINDE // FUNCTIONS - START // Copyright in footer website $copyright = date("Y"); // http://www.webcheatsheet.com/PHP/get_current_page_url.php // Huidige pagina URL function curPageURL() { $isHTTPS = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on"); $port = (isset($_SERVER["SERVER_PORT"]) && ((!$isHTTPS && $_SERVER["SERVER_PORT"] != "80") || ($isHTTPS && $_SERVER["SERVER_PORT"] != "443"))); $port = ($port) ? ':'.$_SERVER["SERVER_PORT"] : ''; $url = ($isHTTPS ? 'https://' : 'http://').$_SERVER["SERVER_NAME"].$port.$_SERVER["REQUEST_URI"]; return $url; } // http://www.webcheatsheet.com/PHP/get_current_page_url.php // Huidige pagina-naam function curPageName() { return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1); } //http://www.askbee.net/articles/php/SQL_Injection/sql_injection.html function sql_quote( $value ) { if( get_magic_quotes_gpc() ) { $value = stripslashes( $value ); } //check if this function exists if( function_exists( "mysqli_real_escape_string" ) ) { $value = mysqli_real_escape_string( $value ); } //for PHP version < 4.3.0 use addslashes else { $value = addslashes( $value ); } return $value; } function login_check() { // Sessie starten ongeacht wat session_start(); // Volledige URL pakken voor redirect $_SESSION['rp_full_url'] = curPageURL(); $_SESSION['rp_page_name'] = curPageName(); /* $username = sql_quote($_SESSION["user"]); $password = sql_quote($_SESSION["pass"]); */ $username = $_SESSION["user"]; $password = $_SESSION["pass"]; $q_login = "SELECT login_username, login_password, login_user_id, login_access, login_admin FROM login WHERE login_access = '1' AND login_username='{$username}' AND login_password = '{$password}'"; $t_login = sql_doe_query($q_login); $aantal = sql_get_aantal($t_login); if ($aantal != "1") { header("location: login.php"); }else{ $_SESSION['rp_full_url'] = ""; $_SESSION['rp_page_name'] = ""; } } function navigatie($input="") { if ($input == "") { $input = 'drukwerk'; } if ($input == 'drukwerk') { // DRUKWERK $q_navigatie = ("SELECT * FROM drukwerk WHERE drukwerk_active = '1' ORDER BY drukwerk_sortorder, drukwerk_name"); $t_navigatie = sql_doe_query($q_navigatie); $nav .= ' '; while ($ur_navigatie = sql_get_row($t_navigatie)) { $length_offset = '24'; $naam = substr(strip_tags($ur_navigatie['drukwerk_name']), 0, $length_offset).'
'.substr(strip_tags($ur_navigatie['drukwerk_name']), $length_offset, $length_offset); // Witregel-check if ($ur_navigatie['drukwerk_whitespace'] == '1') { $nav .= ' '; } $nav .= ' '; } $nav .= '
 
'.$naam.'
'; } if ($input == 'webontwerp') { $nav .= 'Webontwerp'; } if ($input == 'promotioneleartikelen') { // PROMO-ARTIKELEN $q_navigatie = ("SELECT * FROM promo_categories WHERE pc_active = '1' ORDER BY pc_sortorder, pc_name"); $t_navigatie = sql_doe_query($q_navigatie); $nav .= ' '; while ($ur_navigatie = sql_get_row($t_navigatie)) { $length_offset = '24'; $naam = substr(strip_tags($ur_navigatie['pc_name']), 0, $length_offset).'
'.substr(strip_tags($ur_navigatie['pc_name']), $length_offset, $length_offset); // Witregel-check if ($ur_navigatie['pc_whitespace'] == '1') { $nav .= ' '; } $nav .= ' '; } $nav .= '
 
'.$naam.'
'; } return $nav; } function item_type($input) { $q_folder = "SELECT * FROM items_type WHERE items_type_id = '{$input}'"; $t_folder = sql_doe_query($q_folder); $ur_folder = sql_get_row($t_folder); return $ur_folder['item_type_name_code']; } function betaalmethode($input) { switch ($input){ case 1 : return 'Vooruit'; break; case 2 : return 'Contant'; break; case 3 : return 'iDeal'; break; default: return 'Kies een betaalmethode'; } } function verzendmethode($input) { switch ($input){ case 1 : return 'Post'; break; case 2 : return 'Afhalen'; break; default: return 'Kies een verzendmethode'; } } // Willekeurige letter-combinatie maken voor tijdelijke wachtwoord function generateCode($length=8) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPRQSTUVWXYZ0123456789"; $code = ""; $clen = strlen($chars) - 1; //a variable with the fixed length of chars correct for the fence post issue while (strlen($code) < $length) { $code .= $chars[mt_rand(0,$clen)]; //mt_rand's range is inclusive - this is why we need 0 to n-1 } return $code; } function address($input) { $q_cust_addr = "SELECT * FROM customer_address WHERE customer_address_id = '{$input}'"; $t_cust_addr = sql_doe_query($q_cust_addr); $ur_cust_addr = sql_get_row($t_cust_addr); $address = $ur_cust_addr['street'].' '.$ur_cust_addr['number'].',
'.$ur_cust_addr['postalcode'].', '.$ur_cust_addr['place']; return $address; } function order_status($input) { $secure_input = sql_quote($input); switch ($secure_input){ case 0 : return 'OPEN'; break; case 1 : return 'Voltooid'; break; case 88 : return 'Geannuleerd'; break; case 99 : return 'iDeal-ERROR'; break; default: return 'CHECK'; } } // FUNCTIONS - EINDE // MAILFUNCTION - START ################################### # # MAILFUNCTION # # Barry Jonas (c) 2009 # I'm from Holland, where you from? # ################################### function multipart_mail($to, $from, $reply_to, $subject, $content) { // MAILCONFIG $to = ($to != "") ? $to : "FALSE"; // Primary receipiant address $from = ($from != "") ? $from : "FALSE" ; // FROM WHO SHALL IT COME? -> E.G. WEBSITE $reply_to = ($reply_to != "") ? $reply_to : $to; // Reply-to can also be different form the 'to'-address $subject = ($subject != "") ? $subject : 'FALSE'; // Check for a subject $content = ($content != "") ? $content : 'FALSE'; // Check if there is any input at all if ($to == 'FALSE' || $from == 'FALSE' || $subject == 'FALSE' || $content == 'FALSE') { $error_to = ($to == 'FALSE') ? ' To-address' : ''; $error_from = ($from == 'FALSE') ? ' From-address' : ''; $error_subject = ($subject == 'FALSE') ? ' Subject' : ''; $erro_content = ($content == 'FALSE') ? ' Content' : ''; return "Error: Didn't find {$error_to}{$error_from}{$error_subject}{$error_content}"; // Display what wasn't filled in exit(); } // -------------------- // Make input secure to use -> TEST IF THIS IS NEEDED FOR THE SERVER THE SCRIPT RUNS ON!!!!! // Check must be done first. Or else it will add to much slashes /* if ($to != $reply_to) { $reply_to = addslashes(htmlspecialchars($reply_to)); } $from = addslashes(htmlspecialchars($from)); $to = addslashes(htmlspecialchars($to)); */ // -------------------- // CONTENT HTML $html_header = " "; $content = str_replace('=', '=3D', $content); $html_body = $content; // Content $html_footer = " "; $content_html = $html_header.$html_body.$html_footer; // -------------------- // CONTENT TEXT $content_text = $content; // Content $content_text = strip_tags($content_text); // No HTML inside plaintext $content_text = wordwrap($content_text, 70); // No wider than 70 chars // -------------------- ################################ # ACTUAL E-MAIL ################################ // BOUNDARY-CREATION $boundary = md5(time()); // HEADERS $headers = "From: {$from}"."\r\n"; $headers .= "Reply-To: {$reply_to}"."\r\n"; $headers .= "MIME-Version: 1.0"."\r\n"; $headers .= "Content-Type: multipart/alternative; boundary=\"{$boundary}\""."\r\n"; // TEKST-CONTENT $message = "--{$boundary}"."\n"; $message .= "Content-type: text/plain; charset=iso-8859-1"."\n"; $message .= "Content-Transfer-Encoding: 8bit"."\n"; $message .= "Content-description: Plain text message-part"."\n"; $message .= $content_text."\n"; // HTML-CONTENT $message .= "--{$boundary}"."\n"; $message .= "Content-type: text/html; charset=iso-8859-1"."\n"; $message .= "Content-Transfer-Encoding: quoted-printable"."\n"; $message .= "Content-description: HTML message-part"."\n"; $message .= $content_html."\n"; // CLOSE MAIL $message .= "--{$boundary}--"."\n"; ################################ // SEND MAIL AND CONTROL-STRUCTURE $mail_sent = mail($to, $subject, $message, $headers); $output = ($mail_sent) ? "Verzonden ".date("H:i")."" : "Niet verzonden"; return $output; } // MAILFUNCTION - EINDE // WINKELWAGENTJE - START $q_prod_cart = "SELECT * FROM orders LEFT JOIN orders_products ON orders.order_id = orders_products.order_id WHERE orders.order_id = '{$_SESSION['order_id']}' AND order_status = '0' AND products_status <> '99'"; $t_prod_cart = sql_doe_query($q_prod_cart); $aantal_cart = sql_get_aantal($t_prod_cart); if ($aantal_cart > '0') { $afreken_button = "\"afrekenen\""; }else{ $afreken_button = ""; } $winkelwagentje .= "
\"mijn
U heeft {$aantal_cart} product(en) in
uw winkelmandje.
{$afreken_button}
"; // WINKELWAGENTJE - EINDE // BANNER - START // BANNER-LINKS // BOX-1 $q_box1 = "SELECT * FROM acties AS a WHERE actie_box = '1'"; $t_box1 = sql_doe_query($q_box1); $ur_box1 = sql_get_row($t_box1); $box1_link = ($ur_box1['actie_link'] != "") ? $ur_box1['actie_link'] : "actie.php?show={$ur_box1['actie_id']}"; $box1 = ' '.$ur_box1['actie_title'].''; // BOX-2 $q_box2 = "SELECT * FROM acties AS a WHERE actie_box = '2'"; $t_box2 = sql_doe_query($q_box2); $ur_box2 = sql_get_row($t_box2); $box2_link = ($ur_box2['actie_link'] != "") ? $ur_box2['actie_link'] : "actie.php?show={$ur_box2['actie_id']}"; //$box2_link = $ur_box2['actie_link']; $box2 = ' '.$ur_box2['actie_title'].''; // BOX-3 $q_box3 = "SELECT * FROM acties AS a WHERE actie_box = '3'"; $t_box3 = sql_doe_query($q_box3); $ur_box3 = sql_get_row($t_box3); $box3_link = ($ur_box3['actie_link'] != "") ? $ur_box3['actie_link'] : "actie.php?show={$ur_box3['actie_id']}"; //$box3_link = $ur_box3['actie_link']; $box3 = ' '.$ur_box3['actie_title'].''; // BOX-4 $q_box4 = "SELECT * FROM acties WHERE actie_box = '4'"; $t_box4 = sql_doe_query($q_box4); $ur_box4 = sql_get_row($t_box4); $box4_link = ($ur_box4['actie_link'] != "") ? $ur_box4['actie_link'] : "actie.php?show={$ur_box4['actie_id']}"; //$box4_link = $ur_box4['actie_link']; $box4 = ' '.$ur_box4['actie_title'].''; // BANNER - EINDE ?> '; ?>
Fatal error: Uncaught Error: Call to undefined function navigatie() in /home/lindeman/domains/sterkindrukwerk.nl/public_html/index.php:64 Stack trace: #0 {main} thrown in /home/lindeman/domains/sterkindrukwerk.nl/public_html/index.php on line 64