One2xs Belsysteem

Gestart doorWouter6 reacties49 weergaven

7 berichten · pagina 1 van 1

Wouter

Lid · Topicstarter

Berichten
3.540
Reputatie
0
Punten
0,01
Lid sinds
Laatst gezien
Graag zou ik het One2xs Belsysteem inbouwen in mijn systeempje.
dit is het momentele belsysteem, maar het moet werken op het one2xs systeem.

[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]settings.php[/COLOR][COLOR= #007700]);[/COLOR] ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" type="text/css" href="images/style.css" />
    <title>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$head"[/COLOR][COLOR= #007700];[/COLOR] ?></title>
</head>
<body>
    <div id="content">
        
  <div class="header"> 
    <h1><a href="#">[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$head"[/COLOR][COLOR= #007700];[/COLOR] ?></a></h1>
        </div>

        <div class="subheader">
            <div class="subheader_right">
                [COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]menu.php[/COLOR][COLOR= #007700]);[/COLOR] ?>            </div>
            
    <div class="subheader_left"> <a href="#">[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$menuhead2"[/COLOR][COLOR= #007700];[/COLOR] ?></a> </div>
        </div>
                          
        <div class="right">
            
            
    <div class="info"> <a class="info" href="#nogo">Credits kopen</a> </div>
    <p>Sta jij tweede en kom je maar een paar credits tekort? Of wil je vlug credits om in de loterij te zetten ?<br />
Dit kan hier. Door naar een 0900 nummer te bellen </p>
    <p><br />
      <strong>0900 nummer</strong>(<a href="javascript:alert(Transactiekosten zijn kosten die je moet betalen voor het verwerken van je betaling door bedrijven. Deze kosten zitten al in de prijs verwerkt.)">?</a>)<br />
      <A onClick="JavaScript:window.open(http://www.eurobellen.nl/bel/?pid=66956[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$eb_id1"[/COLOR][COLOR= #007700];[/COLOR] ?>&returnurl=[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$siteurl"[/COLOR][COLOR= #007700];[/COLOR] ?>update_8.php, _blank,width=370,height=250,top=250,left=300);return false;" HREF=#>800 
      Credits - 1.30 euro</a><br />
      <br />
      <br />
      *Transactiekosten zijn al bij de bedragen geteld, deze hoef je dus niet 
      apart te betalen!<br />
    </p>
    </div>
        
        <div class="left">
            <h2>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$menu2content"[/COLOR][COLOR= #007700];[/COLOR] ?></h2>
            <p>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]menu2.php[/COLOR][COLOR= #007700]);[/COLOR] ?></p>                        
        </div>
        
        
  <div class="footer">
    <p>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]banner.php[/COLOR][COLOR= #007700]);[/COLOR] ?><br>[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL][COLOR= #DD0000]"$copy"[/COLOR][COLOR= #007700];[/COLOR] ?></p>
        </div>
    </div>
</body>
</html>


Als iemand gebelt heeft, krijgt hij 800 credits

bedankt bij voorbaat ...
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Kun je inhoud van update_8.php hier posten?
0
Wouter

Lid · Topicstarter

Berichten
3.540
Reputatie
0
Punten
0,01
Lid sinds
Laatst gezien
Lennard schreef:
Kun je inhoud van update_8.php hier posten?
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]settings.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$ebcheck[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.eurobellen.nl/bel/check.php?userid=$eb_user&ebpin="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]ebpin[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ebcheck[/COLOR][COLOR= #007700]!=[/COLOR][COLOR= #DD0000]"OK"[/COLOR][COLOR= #007700]) {[/COLOR]
   [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Pincode validatie mislukt ($ebcheck)"[/COLOR][COLOR= #007700];[/COLOR]
   [URL="http://www.php.net/exit"]exit[/URL][COLOR= #007700];
}[/COLOR]
?>
[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE `users` SET saldo=saldo+800 WHERE `id` = $memberid"[/COLOR][COLOR= #007700]);[/COLOR]
?>
<body bgcolor="#FFFFFF">
<div align="center">
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
  <p><font color="#66CC00" size="5" face="Verdana, Arial, Helvetica, sans-serif"><strong>Je 
    credits zijn toegevoegd!</strong></font></p>
</div>


alsjeblieft !
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Zoiets?
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]/*******
 * Voorbeeldscript voor de werking met de bel API voor one2xs
 * Meer informatie: http://www.one2xs.com/belapiinfo
 * Versie        1.0.0
 * Copyright    one2apps 2009
 * Datum        13 april 2009
 * Alle rechten voorbehouden.
 * Gebruik op eigen risico.
 * Misbruik wordt bestraft.
 ***
 * Dit is een voorbeeldscript; je bent vrij om je eigen draai aan het systeem te geven, op voorwaarde dat je je aan de regels houdt.
 * Succes ermee.
 **/[/COLOR]

[COLOR= #0000BB]$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]wouter[/COLOR][COLOR= #007700];[/COLOR]    [COLOR= #FF8000]// gebruikersnaam op one2xs voor wie gebeld moet worden[/COLOR]
[COLOR= #0000BB]$bedrag[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1.3[/COLOR][COLOR= #007700];[/COLOR]            [COLOR= #FF8000]// bedrag in euros; minimaal 0.25, maximaal 10.00; gebruik geen kommas[/COLOR]
[COLOR= #0000BB]$testmode[/COLOR] [COLOR= #007700]=[/COLOR] FALSE[COLOR= #007700];[/COLOR]        [COLOR= #FF8000]// testmodus aan? TRUE voor ja, FALSE voor nee. Bij TRUE krijg je geen punten bij je tegoed, maar kun je testen of je systeem goed werkt[/COLOR]
[COLOR= #0000BB]$land[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]nl[/COLOR][COLOR= #007700];[/COLOR]            [COLOR= #FF8000]// land waar de beller vandaan belt[/COLOR]

[URL="http://www.php.net/error_reporting"]error_reporting[/URL][COLOR= #007700]([/COLOR]E_ALL[COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL] [COLOR= #DD0000]api.cls.php[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL] [COLOR= #DD0000]settings.php[/COLOR][COLOR= #007700];

function[/COLOR] format[COLOR= #007700]([/COLOR][COLOR= #0000BB]$bedrag[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #FF8000]// functie om de bedragen (euros) netjes weer te geven (punten en kommas op de goede plek)[/COLOR]
[COLOR= #007700]{[/COLOR]
    
    [URL="http://www.php.net/return"]return[/URL] [URL="http://www.php.net/number_format"]number_format[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$bedrag[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000],[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000].[/COLOR][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]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]telnr[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]]))[/COLOR] [COLOR= #FF8000]// betaling voorbereiden als er geen telnr en code is opgegeven[/COLOR]
[COLOR= #007700]{[/COLOR]
    
    [COLOR= #0000BB]$api[/COLOR] [COLOR= #007700]= new[/COLOR] api[COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$land[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]init[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bedrag[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$testmode[/COLOR][COLOR= #007700]);[/COLOR][COLOR= #FF8000]// api instantie maken[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$api[/COLOR][COLOR= #007700]->[/COLOR]doTransaction[COLOR= #007700]() ===[/COLOR] TRUE[COLOR= #007700])
    {[/COLOR]
        
        [COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$api[/COLOR][COLOR= #007700]->[/COLOR]getMessages[COLOR= #007700]();[/COLOR] [COLOR= #FF8000]// berichten ophalen[/COLOR]
        ?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <link rel="stylesheet" type="text/css" href="images/style.css" />
            <title>[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$head[/COLOR][COLOR= #007700];[/COLOR] ?></title>
        </head>
        <body>
            <div id="content">
                
          <div class="header"> 
            <h1><a href="#">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$head[/COLOR][COLOR= #007700];[/COLOR] ?></a></h1>
                </div>
        
                <div class="subheader">
                    <div class="subheader_right">
                        [COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include_once"]include_once[/URL] [COLOR= #DD0000]menu.php[/COLOR][COLOR= #007700];[/COLOR] ?>            </div>
                    
            <div class="subheader_left"> <a href="#">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$menuhead2[/COLOR][COLOR= #007700];[/COLOR] ?></a> </div>
                </div>
                                  
                <div class="right">
                    
                    
            <div class="info"> <a class="info" href="#nogo">Credits kopen</a> </div>
             <p>Sta jij tweede en kom je maar een paar credits tekort? Of wil je vlug credits om in de loterij te zetten ?<br />
            Dit kan hier. Door naar een betaald nummer te bellen </p>
                <p><br />
                  <strong>betaald nummer</strong>(<a href="javascript:alert(Transactiekosten zijn kosten die je moet betalen voor het verwerken van je betaling door bedrijven. Deze kosten zitten al in de prijs verwerkt.)">?</a>)<br />
                  <br />
                    [COLOR= #0000BB]<?php[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Bel naar <strong>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]telnr[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</strong> en voer deze code in: <strong>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]</strong>.<br />[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Dit kost je &euro; [/COLOR][COLOR= #007700].[/COLOR]format[COLOR= #007700]([/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]per_eenheid[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000] per [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]per[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000] (totaal dus &euro; [/COLOR][COLOR= #007700].[/COLOR]format[COLOR= #007700]([/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bedrag[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]). [/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]extra[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]<br />[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je krijgt hiervoor 800 credits.<br />[/COLOR][COLOR= #007700];[/COLOR]
                    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="?telnr=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]telnr[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]&amp;code=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$content[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]">Klik hier als je gebeld hebt.</a>[/COLOR][COLOR= #007700];[/COLOR]
                    ?>
                  <br />
                  *Transactiekosten zijn al bij de bedragen geteld, deze hoef je dus niet 
                  apart te betalen!<br />
        [COLOR= #0000BB]<?php[/COLOR]
        [COLOR= #FF8000]// Je bent VERPLICHT om het servicenummer, de paycode, de prijs en de prijs per eenheid (bijvoorbeel 10 cent per minuut of 90 cent per gesprek) weer te geven
        // Zie http://www.one2xs.com/belapiinfo voor meer informatie.[/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]API fout.[/COLOR][COLOR= #007700];
        
    }
    
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    
    [COLOR= #0000BB]$api[/COLOR] [COLOR= #007700]= new[/COLOR] api[COLOR= #007700]([/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$land[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]volt[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$bedrag[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$testmode[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #FF8000]// verwerking van de betaling[/COLOR]
    [COLOR= #0000BB]$api[/COLOR][COLOR= #007700]->[/COLOR]addParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]nr[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]telnr[/COLOR][COLOR= #007700]]);[/COLOR]    [COLOR= #FF8000]// telnr waar naartoe gebeld is meegeven[/COLOR]
    [COLOR= #0000BB]$api[/COLOR][COLOR= #007700]->[/COLOR]addParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]code[/COLOR][COLOR= #007700]]);[/COLOR]    [COLOR= #FF8000]// evenals de belcode[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$api[/COLOR][COLOR= #007700]->[/COLOR]doTransaction[COLOR= #007700]() ===[/COLOR] TRUE[COLOR= #007700])
    {[/COLOR]
        
        [COLOR= #0000BB]$ret[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$api[/COLOR][COLOR= #007700]->[/COLOR]getMessages[COLOR= #007700]();[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ret[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]betaald[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700])
        {[/COLOR]
        
            ?>
            <body bgcolor="#FFFFFF">
            <div align="center">
              <p>&nbsp;</p>
              <p>&nbsp;</p>
              <p>&nbsp;</p>
              <p>&nbsp;</p>
              <p><font color="#66CC00" size="5" face="Verdana, Arial, Helvetica, sans-serif"><strong>Je 
                credits zijn toegevoegd!</strong></font></p>
            </div>
            [COLOR= #0000BB]<?php[/COLOR]
            [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"UPDATE users SET saldo = saldo + 800 WHERE id = "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$memberid[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);
        
        }[/COLOR]
        [URL="http://www.php.net/elseif"]elseif[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$ret[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]betaald[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]2[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$ret[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]betaald[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
        {[/COLOR]
            
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]De betaling is niet voltooid.[/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]Onbekende fout. Neem contact op met de beheerders voor meer informatie.[/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]API fout.[/COLOR][COLOR= #007700];
        
    }
    
}[/COLOR]
?>


Als je $testmode op regel 18 op TRUE zet kun je kijken of hij goed werkt.
0
Berichten
1.031
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik heb dit uitgetest en het werkt wink
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Ik zie het, nice. emo
0
Wouter

Lid · Topicstarter

Berichten
3.540
Reputatie
0
Punten
0,01
Lid sinds
Laatst gezien
Lennard schreef:
Ik zie het, nice. emo
Bedankt !
Echt waar ...
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