• 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

  • (Verkoop) Criminals

    Syntax 5 juli 2026 om 13:22
  • Het Grote Vibe Code Topic

    Syntax 30 juni 2026 om 11:54
  • Ictscripters Chat

    Jeffrey.Hoekman 26 juni 2026 om 16:21
  • Het oorspronkelijke Criminals Script

    Jeroen.G 24 juni 2026 om 09:21
  • StraatBaas is back, maar hoe?!

    Syntax 17 juni 2026 om 10:28
  • RPG game gebouwd met AI

    Frenzo.Webservice 11 juni 2026 om 19:44
  • PWYL source gezocht

    Syntax 29 mei 2026 om 14:03
  • Help testers nodig voor android app Urgent

    Servertjee 20 februari 2026 om 12:07

Marktplaats

  • 306 Nieuwe Domeinnamen Juni 2026

    shiga 1 juli 2026 om 13:39
  • 4-letter domein: Togi.nl

    evesi 17 juni 2026 om 17:08
  • 359 Nieuwe Domeinnamen Mei 2026

    shiga 1 juni 2026 om 12:45

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

  • 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

  • Quanscient ontvangt €10M om AI- en kwantum-native hardware engineering te bevorderen - Tech.eu

    ICTscripters 27 mei 2026 om 12:03
  • 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

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