• Login
  • Register
  • Zoek
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Filebase Entry
  • More Options

ICTscripters

Dé plek voor IT

Dé plek voor IT

Login

Geavanceerde opties
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Dé plek voor IT - ICTscripters
  2. Forum
  3. Games
  4. Criminals & Maffiagames
  5. Uitbreidingen en Overige
  6. Archief
  7. Criminolz

Forum

  • Het Grote Vibe Code Topic

    Jeroen.G 11 mei 2026 om 09:28
  • Ictscripters Chat

    AarClay 21 april 2026 om 11:34
  • PWYL source gezocht

    Syntax 25 maart 2026 om 11:44
  • Help testers nodig voor android app Urgent

    Servertjee 20 februari 2026 om 12:07
  • Partner Gezocht om meerdere NFT Collecties op Open Sea te Plaatsen

    Servertjee 20 februari 2026 om 12:06
  • Afspraken systeem met planbeperking

    Jeffrey.Hoekman 20 februari 2026 om 11:52
  • Developer Gezocht

    Servertjee 19 februari 2026 om 17:31
  • Na 15 jaar terug van weggeweest: iCriminals.nl is terug (BETA)!

    Servertjee 18 februari 2026 om 16:57

Marktplaats

  • 370 Nieuwe Domeinnamen April 2026

    shiga 1 mei 2026 om 12:06
  • Snel een website nodig?

    Syntax 10 april 2026 om 12:55
  • Sicarras.com - Moderne Mafia Text-Based RPG

    Syntax 5 april 2026 om 16:22

Vraag login script

  • diestro
  • 16 november 2009 om 12:04
  • Closed
  • diestro
    Professional
    Ontvangen Reacties
    7
    Berichten
    850
    • 16 november 2009 om 12:04
    • #1

    Hoe kan ik in het login script instellen dat als $user['taal'] == 1 hij gewoon naar index.php moet gaan

    maar als $user['taal'] == 2 hij naar en/index.php moet gaan?

    Dit is het script:

    PHP
    <?php
      $gets = explode("?", $_SERVER['REQUEST_URI']);
      if(!empty($gets[1])) {
        $gets = "?" . $gets[1];
      } else {
        $gets = "";
      }
      if(isset($_POST['submit']) && $_POST['submit'] == "Inloggen") {
        $match = mysql_query("SELECT id, activatiecode, vakantie, ban, FROM users WHERE login = '" . $_POST['login'] . "' AND pass = '" . $_POST['pass'] . "'");
    
    
        if(mysql_num_rows($match) > 0) {
          $user = mysql_fetch_assoc($match);
          if($user['activatiecode'] == 0 && $user['vakantie'] <= 0 && $user['ban'] == 0) {
            mysql_query("UPDATE users SET online = '" . get_global_date("Y-m-d H:i:s") . "' WHERE id = '" . $user['id'] . "'");
            $_SESSION['id'] = $user['id'];
            echo'<script type="text/javascript">window.location.href = "index.php' . $gets . '";</script>';
          }
        } else {
          $match = mysql_query("SELECT id, activatiecode, vakantie, ban FROM users WHERE login = '" . $_POST['login'] . "' AND pass_v2 = '" . md5($_POST['pass']) . "'");
          if(mysql_num_rows($match) > 0) {
              mysql_query("UPDATE users SET pass = '" . $_POST['pass'] . "', pass_v2 = '' WHERE login = '" . $_POST['login'] . "'");
              $user = mysql_fetch_assoc($match);
            if($user['activatiecode'] == 0 && $user['vakantie'] <= 0 && $user['ban'] == 0) {
              mysql_query("UPDATE users SET online = '" . get_global_date("Y-m-d H:i:s") . "' WHERE id = '" . $user['id'] . "'");
              $_SESSION['id'] = $user['id'];
              echo'
    		  <script type="text/javascript">window.location.href = "index.php' . $gets . '";</script>';
            }
          }
        }
    	
        if(!isset($user['activatiecode'])) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je hebt een verkeerde gebruikersnaam of wachtwoord ingevuld!</font></div><br />";
    	} elseif($user['ban'] != 0) {
    	  $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je account is verbannen! Voor vragen contact: [email protected]</font></div><br />";
    	} elseif($user['taal'] < 1) {
    	  $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal bestaat niet! Neem contact op met [email protected]!</font></div><br />";
    	} elseif($user['taal'] > 2) {
    	  $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal bestaat niet! Neem contact op met [email protected]!</font></div><br />";
        } elseif($user['vakantie'] > 0) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je account staat nog " . $user['vakantie'] . " dagen op vakantiestatus.</font></div><br />";
        } elseif($user['activatiecode'] != 0) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je account is nog niet geactiveerd.</font></div><br />";
        } elseif($user['taal'] > 2) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal klopt niet neem contact op met [email protected].</font></div><br />";
        } elseif($user['taal'] < 1) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal klopt niet neem contact op met [email protected].</font></div><br />";
    
    
          }
    
    
      }
    ?>
    Toon Meer

    Alvast bedankt

    JooFa - Webdesign Assen

  • Guest, wil je besparen op je domeinnamen? (ad)
  • Db-maffia
    Professional
    Berichten
    1.356
    • 16 november 2009 om 12:08
    • #2

    met een ifje misschien?

    PHP
    if ($_GET['taal'] == 2) 
    { 
    
    
    hier je funtie
    
    
    }
    else  
    {
    andere funcite 
    }
    Toon Meer

    Project Maffiadeluxe.nl

  • diestro
    Professional
    Ontvangen Reacties
    7
    Berichten
    850
    • 16 november 2009 om 12:09
    • #3

    Ja maar dan kreeg ik een foutmelding :S maar zal nog keer proberen ;)

    JooFa - Webdesign Assen

  • Db-maffia
    Professional
    Berichten
    1.356
    • 16 november 2009 om 12:10
    • #4

    neem aan dat als je je aanmeld je dan een taal moet kiezen ?

    Project Maffiadeluxe.nl

  • wit007
    ICT God
    Berichten
    172
    • 16 november 2009 om 14:49
    • #5
    PHP
    <?php
    if ($user['taal'] == 2) 
    { 
    header("Location: /en/index.php");
    }
    else  
    {
    header("Location: index.php");
    }
    ?>

    Zo bedoel je?

  • diestro
    Professional
    Ontvangen Reacties
    7
    Berichten
    850
    • 17 november 2009 om 19:19
    • #6

    Db-maffia: Nee dat staat al opgeslagen in database bij registreren ;)

    wit007 ja ik denk dat dat t is ;) Ik ga het proberen ;)

    Nieuwe reactie samengevoegd met originele reactie op 17.11.09 19:29:14:
    Het lukt nog steeds niet. Want ook al is taal 1 in onderstaand script blijft hij naar de engelse versie gaan :S

    PHP
    <?php
      $gets = explode("?", $_SERVER['REQUEST_URI']);
      if(!empty($gets[1])) {
        $gets = "?" . $gets[1];
      } else {
        $gets = "";
      }
      if(isset($_POST['submit']) && $_POST['submit'] == "Inloggen") {
      
        if ($user['taal'] == 1) 
    { 
    	$match = mysql_query("SELECT id, activatiecode, vakantie, ban, taal FROM users WHERE login = '" . $_POST['login'] . "' AND pass = '" . $_POST['pass'] . "'");
    	
        if(mysql_num_rows($match) > 0) {
          $user = mysql_fetch_assoc($match);
          if($user['activatiecode'] == 0 && $user['vakantie'] <= 0 && $user['ban'] == 0) {
            mysql_query("UPDATE users SET online = '" . get_global_date("Y-m-d H:i:s") . "' WHERE id = '" . $user['id'] . "'");
            $_SESSION['id'] = $user['id'];
            echo'<script type="text/javascript">window.location.href = "index.php' . $gets . '";</script>';
          }
        } else {
          $match = mysql_query("SELECT id, activatiecode, vakantie, ban, taal FROM users WHERE login = '" . $_POST['login'] . "' AND pass_v2 = '" . md5($_POST['pass']) . "'");
          if(mysql_num_rows($match) > 0) {
              mysql_query("UPDATE users SET pass = '" . $_POST['pass'] . "', pass_v2 = '' WHERE login = '" . $_POST['login'] . "'");
              $user = mysql_fetch_assoc($match);
            if($user['activatiecode'] == 0 && $user['vakantie'] <= 0 && $user['ban'] == 0) {
              mysql_query("UPDATE users SET online = '" . get_global_date("Y-m-d H:i:s") . "' WHERE id = '" . $user['id'] . "'");
              $_SESSION['id'] = $user['id'];
              echo'
    		  <script type="text/javascript">window.location.href = "index.php' . $gets . '";</script>';
            }
          }
        }
    	}
    	
    	 else
    { 
        $match = mysql_query("SELECT id, activatiecode, vakantie, ban, taal FROM users WHERE login = '" . $_POST['login'] . "' AND pass = '" . $_POST['pass'] . "'");
    
    
        if(mysql_num_rows($match) > 0) {
          $user = mysql_fetch_assoc($match);
          if($user['activatiecode'] == 0 && $user['vakantie'] <= 0 && $user['ban'] == 0) {
            mysql_query("UPDATE users SET online = '" . get_global_date("Y-m-d H:i:s") . "' WHERE id = '" . $user['id'] . "'");
            $_SESSION['id'] = $user['id'];
            echo'<script type="text/javascript">window.location.href = "en/index.php' . $gets . '";</script>';
          }
        } else {
          $match = mysql_query("SELECT id, activatiecode, vakantie, ban, taal FROM users WHERE login = '" . $_POST['login'] . "' AND pass_v2 = '" . md5($_POST['pass']) . "'");
          if(mysql_num_rows($match) > 0) {
              mysql_query("UPDATE users SET pass = '" . $_POST['pass'] . "', pass_v2 = '' WHERE login = '" . $_POST['login'] . "'");
              $user = mysql_fetch_assoc($match);
            if($user['activatiecode'] == 0 && $user['vakantie'] <= 0 && $user['ban'] == 0) {
              mysql_query("UPDATE users SET online = '" . get_global_date("Y-m-d H:i:s") . "' WHERE id = '" . $user['id'] . "'");
              $_SESSION['id'] = $user['id'];
              echo'
    		  <script type="text/javascript">window.location.href = "en/index.php' . $gets . '";</script>';
            }
          }
        }
    	}
    
    
        if(!isset($user['activatiecode'])) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je hebt een verkeerde gebruikersnaam of wachtwoord ingevuld!</font></div><br />";
    	} elseif($user['ban'] != 0) {
    	  $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je account is verbannen! Voor vragen contact: [email protected]</font></div><br />";
    	} elseif($user['taal'] < 1) {
    	  $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal bestaat niet! Neem contact op met [email protected]!</font></div><br />";
    	} elseif($user['taal'] > 2) {
    	  $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal bestaat niet! Neem contact op met [email protected]!</font></div><br />";
        } elseif($user['vakantie'] > 0) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je account staat nog " . $user['vakantie'] . " dagen op vakantiestatus.</font></div><br />";
        } elseif($user['activatiecode'] != 0) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je account is nog niet geactiveerd.</font></div><br />";
        } elseif($user['taal'] > 2) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal klopt niet neem contact op met [email protected].</font></div><br />";
        } elseif($user['taal'] < 1) {
          $fout = "<div class=\"dark\"><font color=\"red\" style=\"font-weight: bold\">Je taal klopt niet neem contact op met [email protected].</font></div><br />";
    
    
          }
    
    
      }
    ?>
    Toon Meer

    JooFa - Webdesign Assen

Participate now!

Heb je nog geen account? Registreer je nu en word deel van onze community!

Maak een account aan Login

ICT Nieuws

  • Datalek bij leverancier Canvas - Universiteit van Amsterdam

    ICTscripters 10 mei 2026 om 12:03
  • Data privacy in 2026: Hoe de naleving van GDPR verandert

    ICTscripters 8 mei 2026 om 12:16
  • Tech.eu - Europees Start-up, Financiering en Technologienieuws

    ICTscripters 7 mei 2026 om 12:15

Blogs

  • Functioneel ontwerp

    Dees 28 december 2014 om 12:38
  • Access Control List implementatie in PHP/MySQL - deel 1/2

    FangorN 28 december 2018 om 12:35
  • Access Control List implementatie in PHP/MySQL - deel 2/2

    FangorN 29 december 2018 om 12:37

Gebruikers die dit topic bekijken

  • 1 Gasten
  1. Marktplaats
  2. Design
  3. Voorwaarden
  4. Ons team
  5. Leden
  6. Geschiedenis
  7. Regels
  8. Links
  9. Privacy Policy
ICTscripters ©2005 - 2026 , goedkope hosting door DiMoWeb.com, BE0558.915.582
Sponsors: Beste kattenhotel provincie Antwerpen | Beste Zetes eid kaartlezer webshop
Style: Nexus by cls-design
Stylename
Nexus
Manufacturer
cls-design
Licence
Commercial styles
Help
Supportforum
Visit cls-design