Új hozzászólás Aktív témák

  • Kifli1986

    csendes tag

    Hali ebben tudna valaki segíteni?
    Meghívót kiküldés nem jön létre de még adatbázisba se viszi be. (phpmyadminban beveszi)
    Ki echozok mindent kiir pedig ami kell az adatbeküldéshez.

    <?php
    session_start();
    define('BNBTPHP',1);
    include("include/config.forum.php");
    include("include/functions.forum.php");
    loginolva();
    page_begin();
    if ($szint < 2) {
    echo "A meghívás csak tag rangtól érhető el.";
    }
    else
    {
    $res = mysql_fetch_row(mysql_query("SELECT `value` FROM settings WHERE `option`='signup'"));
    $mode = $res[0];
    if($mode == 'disabled') {
    $msql="SELECT seedbonus, uid, meghivo FROM xbt_users WHERE uid=$uid";
    $asd = mysql_query($msql) or die(mysql_error());
    $xbt_users=mysql_fetch_assoc($asd);
    section_begin('Meghívó', 1);
    echo '<p style="margin-bottom: 16px; color: red; font-weight: bold">A regisztráció zárt. Most sehogy nem lehet bejutni.</p>';

    echo '<center>Jelenleg '.$xbt_users['meghivo'].' meghívód van.</center>';

    section_end();
    }

    if($mode == 'enabled') {
    $msql="SELECT seedbonus, uid, meghivo FROM xbt_users WHERE uid=$uid";
    $asd = mysql_query($msql) or die(mysql_error());
    $xbt_users=mysql_fetch_assoc($asd);
    section_begin('Meghívó', 1);
    echo '<p style="margin-bottom: 12px; color: red; font-weight: bold">Mivel a regisztráció nyitott így felesleges a meghívás.</p>';

    echo '<center>Jelenleg '.$xbt_users['meghivo'].' meghívód van.</center>';
    section_end();
    }

    if($mode == 'invitation') {
    $HETNAP= 60*60*24*7;
    section_begin('Meghívó', 1);
    $result = mysql_query("SELECT * FROM xbt_users WHERE account_state<>'deleted';");
    $msql="SELECT seedbonus, uid, meghivo FROM xbt_users WHERE uid=$uid";
    $asd = mysql_query($msql) or die(mysql_error());
    $xbt_users=mysql_fetch_assoc($asd);
    $tettes = $row['uid'];
    $meghivo = 0 + $xbt_users['meghivo'];
    if (empty($_POST['email'])) {
    echo '<p style="margin-bottom: 12px; color: red; font-weight: bold">Figyelem! A meghívó felelősséggel tartozik a meghívottért, ezért CSAK olyannak küldj meghívót, akit ismersz és megbízol benne! Amennyiben az általad meghívott nem az oldal szabályainak megfelelően viselkedik, a következmények téged is érintenek!</p>';
    echo '<p style="margin-top: 12px; text-align: center">';
    $uid=mysql_fetch_row(mysql_query("SELECT uid FROM xbt_users WHERE name='".$nev."'"));
    $meghivok=mysql_fetch_row(mysql_query("SELECT meghivo FROM ext_user_data WHERE uid='".$uid[0]."'"));
    $my=mysql_query("select * from pending where inviter = '" . mysql_real_escape_string($nev) . "' ORDER BY stamp ASC");
    while($utolso = mysql_fetch_array($my)){
    $x=0;
    if (($utolso['stamp']< time()-$HETNAP) && ($utolso['used']='0')) {
    $tormail[$x]=$utolso['email'];
    $x++;
    bark($utolso['email']);
    mysql_query("DELETE FROM pending WHERE email='".$utolso['email']."' AND inviter='".$utolso['inviter']."' AND regkey='".$utolso['regkey']."' LIMIT 1");
    $ujmegh=$meghivok[0]+1;
    echo "|".$ujmegh;
    mysql_query("UPDATE ext_user_data SET invite='".$ujmegh."' WHERE uid='".$uid[0]."' LIMIT 1");
    }
    }
    $ujmegh=$meghivok[0];
    print_r($tormail);
    if ($tormail) foreach($tormail as $akt){
    mysql_query("DELETE FROM pending WHERE email='".$akt."' LIMIT 1");
    $ujmegh++;
    echo $ujmegh;
    }
    mysql_query("UPDATE ext_user_data SET meghivo='".$ujmegh."' WHERE uid='".$uid[0]."' LIMIT 1");
    $utolso = mysql_fetch_array(mysql_query("select * from pending where inviter = '" . mysql_real_escape_string($nev) . "' ORDER BY stamp DESC LIMIT 1"));
    if ($szint < 8) {
    $kuldhet = false;
    }
    else {
    $kuldhet = true;
    }
    if ($meghivok[0] > 0) {
    $kuldhet = true;
    }
    if ($kuldhet) {
    echo 'Jelenleg küldhetsz '.$xbt_users['meghivo'].' meghívót.<br>';
    } else {
    echo 'Jelenleg nem küldhetsz meghívót.<br>';
    }
    echo '<br>';
    if ($utolso) {
    echo 'Utolsó meghívód elküldve: ' . date('Y.m.d h:i:s', $utolso['stamp']) . '<br>';
    echo '<br>';
    $res = mysql_query("select * from pending where inviter = '" . mysql_real_escape_string($nev) . "' ORDER BY stamp DESC");
    if ($res) {
    echo 'Akiket idáig meghívtál:<br>';
    while ($row = mysql_fetch_array($res)) {
    echo date('Y.m.d h:i:s', $row['stamp']);
    echo ' - ';
    echo $row['email'];
    echo ' - ';
    if ($row['used'] > 0) {
    echo 'A meghívó fel lett használva.';
    } else {
    echo 'A meghívó még nem lett felhasználva.';
    }
    echo '<br>';
    }
    } else {
    echo 'Még nem hívtál meg senkit.<br>';
    }
    }
    echo '</p>';
    if ($kuldhet) {
    echo '<p style="margin-top: 20px; margin-bottom: 10px; font-weight: bold">Meghívás</p>';
    echo '<form action="" method="POST">';
    echo '<input type="hidden" name="elkeres" value="igen" />';
    echo '<p>Meghívott e-mail címe: <input type="text" name="email">';
    echo '<input type="submit" value="Meghívás">';
    echo '<input type="hidden" name="sitekey" value="'.$meghivok[0].'">';
    echo '<input type="hidden" name="siteid" value="'.$uid[0].'">';
    echo '</p>';
    echo '</form>';
    echo '<p style="margin-bottom: 12px; color: red; font-weight: bold"><br/>Figyelem! Az elrontott meghívókat nem áll módunkban kijavítani, legyetek figyelmesek!<br>NE használj freemailes, vipmailes, citromailes, gmailes címeket,<br>mivel nem biztos, hogy megkapod a regisztráló mailt.</p>';
    }
    }
    else
    {
    $uid=mysql_fetch_row(mysql_query("SELECT uid FROM xbt_users WHERE name='".$nev."'"));
    $meghivok=mysql_fetch_row(mysql_query("SELECT meghivo FROM ext_user_data WHERE uid='".$uid[0]."'"));

    if ($_POST["elkeres"] == "igen") {
    $email = mysql_real_escape_string($_POST['email']);
    $res1 = mysql_query("select count(*) from xbt_users where email = '" . $email . "'") or die(mysql_error());
    $row1 = mysql_fetch_row($res1);
    $res2 = mysql_query("select count(*) from deleted_users where email = '" . $email . "'") or die(mysql_error());
    $row2 = mysql_fetch_row($res2);

    if ($row1[0] != 0 || $row2[0] != 0) {
    echo('<p>' . htmlspecialchars($email) . ': ez az e-mail cím már létezik a rendszerben!</p><center><a href="invite.php"> <img src="themes/default/mehot.png"></a></center>');
    }

    $res = mysql_query("select count(*) from pending where email = '" . $email . "'") or die(mysql_error());
    $row = mysql_fetch_row($res);

    if ($row[0] != 0) {
    echo('<p>' . htmlspecialchars($email) . ': erre az e-mail címre épp ki van küldve meghívó!</p><center><a href="invite.php"> <img src="themes/default/mehot.png"></a></center>');
    }

    }
    else{

    $key = rand(1000000000,9999999999);
    $sql = "insert into pending (email, inviter, regkey, current_uploaded, stamp, used) VALUES (";
    $sql .= "'" . mysql_real_escape_string($_POST['email']) . "',";
    $sql .= "'" . mysql_real_escape_string($nev) . "',";
    $sql .= $key . ",";
    $sql .= $uploaded . ",";
    $sql .= time() . ",";
    $sql .= "0);";
    mysql_query("UPDATE xbt_users SET meghivo = meghivo-1 WHERE name = '$nev'");
    mysql_query($sql) or bark('<p>Adatbázis probléma!</p>');
    $ujmegh = $_POST['sitekey']-1;
    $msg = "\r\nContent-type: text/html; charset=ascii\r\n";
    $msg = 'Szia!' . "\n";
    $msg .= "\n";
    $msg .= $nev . ' meghívott téged az oldalra.' . "\n";
    $msg .= 'Ha úgy gondolod, hogy ez téves, kérlek tekintsd ezt az e-mailt tárgytalannak.' . "\n";
    $msg .= "\n";
    $msg .= 'Az oldalt úgy tudod használni, hogy az alábbi linket a böngésződ címsorába másolod. FIGYELEM! NE ITT KLIKKELJ RÁ! MÁSOLD A BÖNGÉSZŐDBE!' . "\n";
    $msg .= 'https://oldalam.hu/useinvite.php?id='.$key."\n";
    $msg .= '(Ha valamilyen okból nem menne, akkor ezt a fórumban jelezd.)' . "\n";
    $msg .= "\n";
    $msg .= 'Az oldal használata előtt kérjük, hogy olvasd el a Szabályok és a GYIK oldalakat, amelyeket itt találsz:' . "\n";
    $msg .= "\n";
    $msg .= 'Üdv: Team' . "\n";
    sitelog("INV", $_POST['email'], "Meghívás: {$_POST['email']} $nev által!");
    if (mail($_POST['email'], "Meghívás" , $msg, "From: admin@oldalam.hu")) {
    bark("<p>A meghívó elment!</p><br><center><a href=\"invite.php\"> <img src=\"themes/default/mehot.png\"></a></center>");
    } else {
    bark("<p>Hiba a meghívó küldése közben. Kontakolj az adminokkal!</p>");
    }
    }
    }
    ?>
    <table>
    <?php
    echo '<p style="margin-top: 12px; text-align: center">';
    if ($utolso) {
    echo 'Utolsó meghívód elküldve: ' . date('Y.m.d h:i:s', $utolso['stamp']) . '<br>';
    echo '<br>';
    $res = mysql_query("select * from pending where inviter = '" . mysql_real_escape_string($nev) . "' ORDER BY stamp DESC");
    if ($res) {
    echo 'Akiket idáig meghívtál:<br>';
    while ($row = mysql_fetch_array($res)) {
    echo date('Y.m.d h:i:s', $row['stamp']);
    echo ' - ';
    echo $row['email'];
    echo ' - ';
    if ($row['used'] > 0) {
    echo 'A meghívó fel lett használva.';
    } else {
    echo 'A meghívó még nem lett felhasználva.';
    }
    echo '<br>';
    }
    } else {
    echo 'Még nem hívtál meg senkit.<br>';
    }
    }
    ?>
    </table>
    <?php
    echo '</p>';
    section_begin('Kiküldött meghívók', 1);
    if ($tormail) foreach($tormail as $akt){
    mysql_query("DELETE FROM pending WHERE email='".$akt."' LIMIT 1");
    $ujmegh++;
    echo $ujmegh;
    }
    mysql_query("UPDATE ext_user_data SET meghivo='".$ujmegh."' WHERE uid='".$uid[0]."' LIMIT 1");
    $utolso = mysql_query("SELECT * from pending where inviter = '".$_POST['siteid']."' ORDER BY stamp DESC LIMIT 1");
    if ($szint < 8) {
    $kuldhet = false;
    }
    else {
    $kuldhet = true;
    }
    if ($meghivok[0] > 0) {
    $kuldhet = true;
    }
    echo '<br>';
    if ($utolso) {
    $res = mysql_query("select * from pending where inviter = '$uid[0]' ORDER BY stamp DESC");
    if ($res) {
    while ($row = mysql_fetch_array($res)) {
    echo date('Y.m.d h:i:s', $row['stamp']);
    echo ' - ';
    echo $row['email'];
    echo ' - ';
    if ($row['used'] > 0) {
    echo 'A meghívó fel lett használva.';
    } else {
    echo 'A meghívó még nem lett felhasználva.';
    }
    echo '<br>';
    }
    } else {
    echo 'Még nem hívtál meg senkit.<br>';
    }
    }
    echo '</p>';
    section_end();
    section_end();
    }
    }
    page_end();
    ?>

Új hozzászólás Aktív témák