Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 13:35

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[HELP] Donation PHP Script

Discussion on [HELP] Donation PHP Script within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
[HELP] Donation PHP Script

PHP Code:
<?php
    
<div style="text-align: center;">

                        
    if(isset(
$_POST['psc_sbm']))
    {
    
        if (
preg_match('/[^a-zA-Z0-9]/',$_POST['account']))
    {
    die (
' <font color="red">Dein Benutzername enthält unerlaubte Zeichen</font> ');
    }
    if (empty(
$_POST['account']))
    {    
    die (
' <font color="red">Bitte gebe einen Benutzer namen ein</font> ');
    }
        if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin1']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
        if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin2']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
        if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin3']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
        if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin4']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
    if (empty(
$_POST['pin1']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    if (empty(
$_POST['pin2']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    if (empty(
$_POST['pin3']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    if (empty(
$_POST['pin4']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    if (empty(
$_POST['email']))
    {
    die (
' <font color="red">Bitte gebe eine E-Mail adresse ein</font> ');
    }
    if(
strlen($_POST['pin1']) < 4)
    {
    die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
    if(
strlen($_POST['pin2']) < 4)
    {
    die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
    if(
strlen($_POST['pin3']) < 4)
    {
    die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
    if(
strlen($_POST['pin4']) < 4)
    {
    die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
        
$text $_POST['account'];  // Dateiinhalt
        
$text1 $_POST['email'];
        
$text2 $_POST['pin1'];
        
$text3 $_POST['pin2'];
        
$text4 $_POST['pin3'];
        
$text5 $_POST['pin4'];
        
$text6 $_POST['pw'];
        
$dateiname "donate.txt"// Name der Datei
        // Datei öffnen,
        // wenn nicht vorhanden dann wird die Datei erstellt.
        
$handler fOpen($dateiname "a+");
        
// Dateiinhalt in die Datei schreiben
        
fWrite($handler "Account:" );
        
fWrite($handler $text );
        
fWrite($handler " " );
        
fWrite($handler "E-Mail:" );
        
fWrite($handler $text1 );
        
fWrite($handler " " );
        
fWrite($handler "Pin:" );
        
fWrite($handler $text2 );
        
fWrite($handler " " );
        
fWrite($handler $text3 );
        
fWrite($handler " " );
        
fWrite($handler $text4 );
        
fWrite($handler " " );
        
fWrite($handler $text5 );
        
fWrite($handler " " );
        
fWrite($handler "PW:" );
        
fWrite($handler $text6 );
        
fWrite($handler "           " );
    
        
fClose($handler); // Datei schließen
    
    
echo '  <font color="green">Deine PaysafeCard wird ueberprueft und du erhaeltst innerhalb der naechsten 24H deine dPoints und eine bestaetigungs E-Mail.</font>  ';
    
    }else{
        
    
        <
img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
        <
form action="" method="post">
            
Lightning Points<br/>
            <
select name="worth" style="background: url('img/input_txtmid.png'); width: 170px; height: 22px;">
                <
option value="10,00">1000 dPoints E10,00</option>
                <
option value="25,00">2500 dPoints E25,00</option>
                <
option value="50,00">5250 dPoints E50,00</option>
                <
option value="100,00">11000 dPoints E100,00</option>
            </
select><br/><br/>
            
            
            
<
b>
echo 
'Account Name' :</b
            <
input type="text" maxlength="30" name="account" style="background: url('img/input_txtmid.png'); width: 120px;" />
            <
br/><br/>
             echo 
'E-Mail Adresse' :</b
            <
input type="text" maxlength="45" name="email" style="background: url('img/input_txtmid.png'); width: 120px;" />
            <
br/><br/>
            <
b> echo 'PaysafeCard PIN' :</b
            <
input type="text" maxlength="4" name="pin1" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <
input type="text" maxlength="4" name="pin2" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <
input type="text" maxlength="4" name="pin3" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <
input type="text" maxlength="4" name="pin4" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <
br/><br/>
            <
b>*  echo 'Paysafecard Password' :</b>
            <
input type="text" name="pw" />
            <
br/><br/>

            <
input type="submit" name="psc_sbm" value="<?php echo 'Donate' ?>" />
        </
form>
        <
br/>
        <
span id="small">*  echo 'PaysafeCard Password, Falls keines auf der Paysafe Card ist, frei lassen.' </span>
    </
div>
    <
br style="clear: both;" />
        
        }
?>
das ist mein script
die fehler abfrage hat super funktioniert, solange wie hinter echo ' <font color="green">Deine PaysafeCard wird ueberprueft und du erhaeltst innerhalb der naechsten 24H deine dPoints und eine bestaetigungs E-Mail.</font> ';
ein ?> war
aber soblad ich daraus eine if else abfrage mache damit ich die eingabe fenster kriege sagt er mir immer das das < von paysafecard bild
(<img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;")
falsch ist.
wo liegt mein fehler?
Jopsi332 is offline  
Old 09/15/2011, 02:32   #2
 
elite*gold: 0
Join Date: Oct 2007
Posts: 491
Received Thanks: 732
PHP Code:
[...]



        }else{
echo 
'<img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
        <form action="" method="post">
            Lightning Points<br/>
            <select name="worth" style="background: url(\'img/input_txtmid.png\'); width: 170px; height: 22px;">
                <option value="10,00">1000 dPoints E10,00</option>
                <option value="25,00">2500 dPoints E25,00</option>
                <option value="50,00">5250 dPoints E50,00</option>
                <option value="100,00">11000 dPoints E100,00</option>
            </select><br/><br/>
            
            
            
<b>'
;



[...] 

Einfach echo'n, dann sollte es funktionieren - meine ich zumindest, habe das Skript gerade aber nur überflogen.
Marv!n is offline  
Old 09/15/2011, 05:57   #3



 
Sedrika's Avatar
 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,174
Received Thanks: 14,475
zudem hast du immer if gemacht, das erste mal if, danach "else if" und am ende "else".
Sedrika is offline  
Thanks
2 Users
Old 09/15/2011, 09:31   #4
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
@werde das mit if und else if und dem echo sofort ausprobieren danke

Das mit else if hat wunderbar geklappt das mit echo brauchte ich gar nicht mehr machen.
Super !
Danke!
Jopsi332 is offline  
Old 09/15/2011, 09:45   #5



 
Sedrika's Avatar
 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,174
Received Thanks: 14,475
Quote:
Originally Posted by Jopsi332 View Post
@werde das mit if und else if und dem echo sofort ausprobieren danke

Das mit else if hat wunderbar geklappt das mit echo brauchte ich gar nicht mehr machen.
Super !
Danke!
Schön das es funktioniert, damit denke ich ist auch nichts mehr zu machen

#Closerequest
Sedrika is offline  
Old 09/15/2011, 10:48   #6
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
PHP Code:
    if(!$conn)
    {
    die(
"Connection failed!<br>");
    }
        
$select mssql_select_db("ACCOUNT_DBF",$conn);

        if(!
$select)
        {
        die(
"Can't select Database!<br>");
        }
        if(
exist($username) != '0')
        {
mssql_query("USE [Donate_DBF]
SET NOCOUNT ON
INSERT INTO Donate (Account, Email, Pin1, Pin2, Pin3, Pin4, Password)
VALUES ('
$_POST['account']', $_POST['email'], $_POST['pin1'], $_POST['pin2'], $_POST['pin3'], $_POST['pin4'], $_POST['pw'])");
        }else{
        echo 
'Dein Donate konnte nicht eingetragen werden'}

    
    echo 
'  <font color="green">Deine PaysafeCard wird ueberprueft und du erhaeltst innerhalb der naechsten 24H deine dPoints und eine bestaetigungs E-Mail.</font>  ';
    } 
so wollte das jetz für mssql umändern aber jetz bekomme ihc immer
den error :
PHP Code:
Parse errorsyntax errorunexpected T_ENCAPSED_AND_WHITESPACEexpecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\donate.php on line 267 
hab alles überpüft die $_POST sind alle richtig und die insert into sind auhc alle richtig (groß und kleinschreibung habe ich natürlich beachtet)
Jopsi332 is offline  
Old 09/15/2011, 10:55   #7



 
Sedrika's Avatar
 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,174
Received Thanks: 14,475
Soviel ich sehen konnte, fehlt dir nach echo ein ;.


echo 'Dein Donate konnte nicht eingetragen werden'}
zu
echo 'Dein Donate konnte nicht eingetragen werden';}
Sedrika is offline  
Old 09/15/2011, 10:59   #8
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
nein er sagt mir ja das diese zeile falsch sein soll
PHP Code:
VALUES ('$_POST['account']'$_POST['email'], $_POST['pin1'], $_POST['pin2'], $_POST['pin3'], $_POST['pin4'], $_POST['pw'])"); 
wobei ich aber kein fehler sehen kann.
und die mssql daten habe ihc auch im script drinne
also die abfrage ob er mit mssql verbinden konnte ging.
aber nach dem einfügen des set into scriptes kam halt der fehler das die ganzen values falsch sind :C

habs jetz so geändert mit ' ' zwischen denn $_POST

also so
PHP Code:
VALUES ('$_POST['account']''$_POST['email']''$_POST['pin1']''$_POST['pin2']''$_POST['pin3']''$_POST['pin4']''$_POST['pw']')"); 
aber immer noch der selbe fehler ;(
Jopsi332 is offline  
Old 09/15/2011, 11:03   #9



 
Sedrika's Avatar
 
elite*gold: 18
The Black Market: 103/0/0
Join Date: Sep 2009
Posts: 20,174
Received Thanks: 14,475
VALUES ('$_POST['account']', $_POST['email'], $_POST['pin1'], $_POST['pin2'], $_POST['pin3'], $_POST['pin4'], $_POST['pw'])");

zu

VALUES ('$_POST['account']', $_POST['email'], $_POST['pin1'], $_POST['pin2'], $_POST['pin3'], $_POST['pin4'], $_POST['pw'])');
Sedrika is offline  
Old 09/15/2011, 11:09   #10
 
elite*gold: 4
Join Date: Mar 2010
Posts: 3,148
Received Thanks: 1,535
nein dann geht der script nicht mehr
die "
die du zu ' geändert hast brauhe ich da der anfangs " bei mssql_query("USE [Donate_DBF] ist

e:
ihc kann nicht mal das so setzen $user = $_POST['account']
selbst dabei sagt er mir nen error o.o

edit 2 :
habs jetz so hinbekommen :
PHP Code:
<?php
$server 
"VPS158195\SQLEXPRESS";
$user "";
$pass"";
$username $_POST['account'];
$password $_POST['pw'];
$pin1 $_POST['pin1'];
$pin2 $_POST['pin2'];
$pin3 $_POST['pin3'];
$pin4 $_POST['pin4'];
$email $_POST['email'];


        if(isset(
$_POST['psc_sbm']))
        {
        if (
preg_match('/[^a-zA-Z0-9]/',$_POST['account']))
    {
    die (
' <font color="red">Dein Benutzername enthält unerlaubte Zeichen</font> ');
    }
    else if (empty(
$_POST['account']))
    {    
    die (
' <font color="red">Bitte gebe einen Benutzer namen ein</font> ');
    }
         else if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin1']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
    else if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin2']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
        else if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin3']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
        else if (
preg_match('/[^a-zA-Z0-9]/',$_POST['pin4']))
    {
    die (
' <font color="red">Dein Pin enthält unerlaubte Zeichen</font> ');
    }
    else if (empty(
$_POST['pin1']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    else if (empty(
$_POST['pin2']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    else if (empty(
$_POST['pin3']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    else if (empty(
$_POST['pin4']))
    {
    die (
' <font color="red">Bitte gebe eine Pin ein</font> ');
    }
    else if (empty(
$_POST['email']))
    {
    die (
' <font color="red">Bitte gebe eine E-Mail adresse ein</font> ');
    }
    else if(
strlen($_POST['pin1']) < 4)
    {
    die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
    else if(
strlen($_POST['pin2']) < 4)
    {
    die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
    else if(
strlen($_POST['pin3']) < 4)
    {
     die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
    else if(
strlen($_POST['pin4']) < 4)
    {
    die (
' <font color="red">Bitte gebe eine richtige Pin ein</font> ');
    }
        
$conn mssql_connect($server,$user,$pass);

    if(!
$conn)
    {
    die(
"Connection failed!<br>");
    }
        
$select mssql_select_db("ACCOUNT_DBF",$conn);

        if(!
$select)
        {
        die(
"Can't select Database!<br>");
        }
        
mssql_query("USE [Donate_DBF]
SET NOCOUNT ON
INSERT INTO Donate (Account, Email, Pin1, Pin2, Pin3, Pin4, Password)
VALUES ('
$username', '$email', '$pin1', '$pin2', '$pin3', '$pin4', '$_password')");
        

    
    echo 
'  <font color="green">Deine PaysafeCard wird ueberprueft und du erhaeltst innerhalb der naechsten 24H deine dPoints und eine bestaetigungs E-Mail.</font>  ';
    } 
        

    
?>

    <div style="text-align: center;">
                <img src="img/psc.png" style="margin-top: 5px; margin-bottom: 8px;" />
        <form action="" method="post">
    

            <br>Lightning Points<br/>
            <select name="worth" style="background: url('img/input_txtmid.png'); width: 170px; height: 22px;">
                <option value="10,00">1000 dPoints E10,00</option>
                <option value="25,00">2500 dPoints E25,00</option>
                <option value="50,00">5250 dPoints E50,00</option>
                <option value="100,00">11000 dPoints E100,00</option>
            </select><br/><br/>
            
            
            
<b> <?php echo 'Account Name' ?>:</b> 
            <input type="text" maxlength="30" name="account" style="background: url('img/input_txtmid.png'); width: 120px;" />
            <br/><br/>
             <?php echo 'E-Mail Adresse'?> :</b> 
            <input type="text" maxlength="45" name="email" style="background: url('img/input_txtmid.png'); width: 120px;" />
            <br/><br/>
            <b><?php echo 'PaysafeCard PIN' ?>:</b> 
            <input type="text" maxlength="4" name="pin1" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <input type="text" maxlength="4" name="pin2" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <input type="text" maxlength="4" name="pin3" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <input type="text" maxlength="4" name="pin4" style="background: url('img/input_txtsmall.png'); width: 28px;" />
            <br/><br/>
            <b>*<?php  echo 'Paysafecard Password'?> :</b>
            <input type="text" name="pw" />
            <br/><br/>

            <input type="submit" name="psc_sbm" value="<?php echo 'Donate' ?>" />
        </form>
        <br/>
        <span  id="small">* <?php echo 'PaysafeCard Password, Falls keines auf der Paysafe Card ist, frei lassen.'?> </span> 
    </div>
    <br style="clear: both;" />
Jopsi332 is offline  
Reply


Similar Threads Similar Threads
donation script for mssql
02/01/2011 - Dekaron Private Server - 4 Replies
I'm sorry to wakeup a dead horse but I'm looking for a donation script for mssql. Will janvier123 mysql donation_mysql.rar work on mssql?
[Help] me plz in Donation
11/10/2010 - EO PServer Hosting - 3 Replies
how i can Dele all characters from donation http://img254.imageshack.us/img254/5111/4858779.j pg
[RELEASE][On Request] Donation Script
01/28/2010 - Dekaron Private Server - 8 Replies
Some one asked for a donation script, but i totally forgot who a donation script for Dekaron here it is ... Viewing donation_mysql.rar - DKundergroud.org File Database Just edit all files to your needs its a basic page, no css, no layout, clean and simple (like zombe script's :D )
hi all.help about donation
01/10/2010 - EO PServer Hosting - 0 Replies
how to setup donation like game jin online/eudemon that use card to topup



All times are GMT +1. The time now is 13:35.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.