Script

Gestart doorSmiegles32 reacties234 weergaven

33 berichten · pagina 2 van 3

Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dit vind ik persoonlijk netter:

[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]//eerst controleren of de gebruiker is ingelogd en of deze al vip is (geen idee hoe jij dit controleer, dus zelf eventueel de 1e if verbeteren)[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]) ==[/COLOR] [COLOR= #0000BB]3[/COLOR][COLOR= #007700])
{[/COLOR]
  [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je bent al vip[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]klik[/COLOR][COLOR= #007700]]))
    {[/COLOR]
          [COLOR= #0000BB]$queryToevoeg[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT 
                                            * 
                                        FROM
                                            leden_leden 
                                        WHERE 
                                            uId = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
          [COLOR= #0000BB]$rowToevoeg[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$queryToevoeg[/COLOR][COLOR= #007700]);[/COLOR]
          [COLOR= #0000BB]$creditshDB[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$rowToevoeg[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uCredits[/COLOR][COLOR= #007700]];[/COLOR]
          [COLOR= #0000BB]$credituDB[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$creditshDB[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]100[/COLOR][COLOR= #007700];[/COLOR]
            
          [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$creditshDB[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]100[/COLOR][COLOR= #007700])
          {[/COLOR]
              [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE 
                                leden_leden 
                            SET 
                                uCredits="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$credituDB[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]" 
                            WHERE
                                uId="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE
                                leden_leden 
                            SET 
                                uRang = 3
                            WHERE 
                                uId = "[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/mysql_real_escape_string"]mysql_real_escape_string[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]uId[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]
                 [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Succesvol vip gekocht![/COLOR][COLOR= #007700];
          }[/COLOR]
          [URL="http://www.php.net/else"]else[/URL]
          [COLOR= #007700]{[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je heb niet genoeg credits![/COLOR][COLOR= #007700];
          }
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
        ?>
        koop VIP!
        <form method="post" action="">
            <input type="submit" name="klik" value="koop" class="entere" />
        </form>
        [COLOR= #0000BB]<?php[/COLOR]
    [COLOR= #007700]}
}[/COLOR]
?>
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
En met dreamweaver is het ook makkelijker bewerken emoDoe ik ookyummie
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nielsie schreef:
En met dreamweaver is het ook makkelijker bewerken emoDoe ik ookyummie
Doe mij maar Notepad ++ biggrin
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
shahiem weet je ook hoe je deze var
$datetime = date(d-m-y | H:i, time() + 3600);
x 60 x 24 x de post?
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Smiegles schreef:
x 60 x 24 x de post?
Hoe bedoel je? smile
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
nou

$datetime = date(d-m-y | H:i, time() + 3600);


is een var waar + 3600 voor 1 minuut staat.
ik wil dat x 60 x 24 doen en dan x een geposte post heb jij een idee hoe je die +en doet?
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Geen flauw idee, snap het niet helemaal.
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
wat snap je er niet aan ?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Smiegles schreef:
nou

$datetime = date(d-m-y | H:i, time() + 3600);
is een var waar + 3600 voor 1 minuut staat.
ik wil dat x 60 x 24 doen en dan x een geposte post heb jij een idee hoe je die +en doet?

Die 3600 is 1 uur = 60 minuten = 3600 seconden
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
luuk hoe doen ik het dan x 24 x een getal dat ik gepost heb?
0
Berichten
3.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Ik haat het als mensen formulieren in een echo zettenemo
Waarom zou je het niet doen, op het punt na (ook mijn reden waarom ik het niet doe) dat de html mark-up niet zichtbaar is?
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
k dacht dat die wel zichtbaar was yummie
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik snap nog steeds niet goed wat je nou eigenlijk wil emo
0
Smiegles

Lid · Topicstarter

Berichten
4.912
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ik wil de tijd die het Nu is + 3600 < = is 1 uur en dan x 24 <= dan word het 1 dag
en dan x de input die ik er dan inbouw dus een post
Heb je een idee?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
$datetime = date(d-m-y | H:i, time() + 60 * 60 * 24); dag
$datetime = date(d-m-y | H:i, time() + 60 * 60 * $_POST[uren]); bepaald aantal uren
Zoiets?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren