IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

Système de jetons pour allopass


Sujet :

PHP & Base de données

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    6
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 6
    Par défaut Système de jetons pour allopass
    Bonjour je recherche a réaliser un petit systemes de jetons pour allopass , je vous présente les fichiers sources que je possède , j ai besoin de votre aide pour finir mon projet je coince un peux
    je bloque au niveau des membres pour leur ajouter des points
    je bloque aussi au niveau sql , rien ne s'affiche dans ma table pouvez vous me donner des conseils merci a bientôt devile

    ma base sql

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    CREATE TABLE `ma_table` (
    `id` int(11) NOT NULL auto_increment,
    `points` int(10) NOT NULL,
    KEY `id` (`id`)
    )
    Mon index.php

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    <?php
    include "include.php";
    session_start();
    if(isset($_GET['RECALL']))
     {
    $recall = htmlentities(@$_GET['RECALL']);
    $datas = htmlentities(@$_GET['DATAS']);
    if (trim($RECALL)=="") 
    {
    echo '<span style="text-align: center"><strong>Erreur</strong></span>';
    erreur($recall, $datas);
    exit;}
    $recall = urlencode($recall);
    $auth = urlencode('79394/206322/1315899');
    $r = @file('http://www.allopass.com/check/vf.php4?CODE=' . $recall . '&AUTH=' . $auth);
    if (ereg('ERR', $r[0]) || ereg('NOK', $r[0])) 
    {
    echo '<span style="text-align: center"><strong>Erreur</strong></span>';
    erreur($recall, $datas);
    exit;
    }
    $points = 1000;
    mysql_query(' UPDATE ma_table SET points=points+' . $points . ' WHERE id=' . $_SESSION['id']) or die(mysql_error());
    }
    ?>
    <center>
    <table border=0 cellpadding=0 cellspacing=0 width=300 bordercolor="Black">
    <tr>
    <td width=300 height=25 colspan=2 bgcolor="#000080" align="center" valign="top">
    <img src="http://www.allopass.com/img/acces_title.png" width=300 height=25 align="center" alt="Logo">
    </td>
    </tr>
    <tr>
    <td colspan=2 width=300 height=137 align="left">
    <img name="acces_top" src="http://www.allopass.com/show_top.php4?SITE_ID=168159&DOC_ID=461846" width=300 height=137 align="center">
    </td></tr><tr><td width=79 height=29 bgcolor="#FFFFFF" align="center" valign="top">
    <img src="http://www.allopass.com/img/acces_left.png" width=79 height=29 align="center">
    </td><td width=261 height=29 bgcolor="#FFFFFF" align="right">
    <a href="javascript:;" onClick="javascript:window.open('http://www.allopass.com/show_accessv2.php4?PALIER=4&SITE_ID=168159&DOC_ID=461846','phone','toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menuBar=0,width=300,height=162');">
    <img border = 0 src="http://www.allopass.com/img/flag_fr.png" width = 35 height = 29 alt=""></a><a href="javascript:;" onClick="javascript:window.open('https://secure.allopass.com/show_ccard.php4?LG=UK&SITE_ID=168159&DOC_ID=461846','ccard','toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,copyhistory=0,menuBar=0,width=550,height=575');">
    <img border = 0 src="http://www.allopass.com/img/flag_us.png" width = 35 height = 29 alt="United States">
    </A>
    </td>
    </tr><tr>
    <td bgcolor="#FFFFFF" colspan=2 width=300 valign="top" align="center">
    <font face="Arial,Helvetica" size = 1 color="#000000">
    <B>Entrez votre code d'accès - Enter your access code</B>
    <form name="APform" action="http://www.allopass.com/check/index.php4" method="post">
    <input type="hidden" name="SITE_ID" value="168159">
    <input type="hidden" name="DOC_ID" value="461846">
    <input type="hidden" name="RECALL" value="1">
    <input type="text" size=8 maxlength=10 value="" name="CODE0" style="BACKGROUND-COLOR: #E7E7E7; BORDER-BOTTOM: #000080 1px solid; BORDER-LEFT: #000080 1px solid; BORDER-RIGHT: #000080 1px solid; BORDER-TOP: #000080 1px solid; COLOR: #000080; CURSOR: text; FONT-FAMILY: Arial; FONT-SIZE: 10pt; FONT-WEIGHT:bold; LETTER-SPACING: normal; WIDTH:70; TEXT-ALIGN=center;">
    <BR><input type="button" name="APsub" value="" onClick=" this.form.submit(); this.form.APsub.disabled=true;" style="border:0px;margin:0px;padding:0px;width:48px; height:18px; background:url('http://www.allopass.com/img/bt_ok.png');">
    <BR></font><table border = 0 width = 300 cellpadding=0 cellspacing = 0
    </center>
    Mon fichier include.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <?
    $server = 'xxxxx';
    $database = 'xxxxx';
    $username = 'xxxxxx';
    $password = 'xxxxxx';
    $connection = mysql_connect($server, $username, $password);
    if (!$connection) {
        die('Could not connect to MySQL database, the server return the error: ' . mysql_error());
    }
    $db = @mysql_select_db($databas?>

  2. #2
    Nouveau membre du Club
    Profil pro
    Inscrit en
    Juillet 2007
    Messages
    6
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2007
    Messages : 6
    Par défaut
    Je viens créer une table pour faire un espace membre avec systeme de point mon code et t'il bon ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     CREATE TABLE membre(
    login text NOT NULL ,
    passe_md5 text NOT NULL ,
    points int( 10 ) NOT NULL PRIMARY KEY 
    )TYPE = MYISAM

Discussions similaires

  1. [MySQL] système de jetons allopass
    Par sunphp dans le forum PHP & Base de données
    Réponses: 2
    Dernier message: 31/05/2010, 18h27
  2. [MySQL] Système de votes (pour les membres) : cmt le créer ?
    Par yazerty dans le forum PHP & Base de données
    Réponses: 11
    Dernier message: 20/02/2006, 12h58
  3. [Système] Langage c pour une apli web ?
    Par cedre22 dans le forum Langage
    Réponses: 9
    Dernier message: 14/12/2005, 15h05
  4. Réponses: 5
    Dernier message: 29/11/2005, 17h35

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo