Parašė diadingo· 2009 Vas. 16 11:02:44
#1
Tai vip modas kurtas chipo atrodo, suristas su mokejimai.lt
Yra tokia problema viskas gerai viska siaip ne taip susitvarkiau, bet kai zmogus issiuncia zinute pvz issiunte
2009m. 01men. 20d. jam parasyta jog vip galios iki 2009m. 01men. 22d. bet po 22d. kad ir vasario 1d. jam virsuje raso: "vip iki: 2009m. 01men. 22d. " ir tas narys vis tiek gali naudotis tomis vip paslaugomis nors jam jau pasibaige, dar ydomus dalykas jei per vip admin panele uzdedu nariui vip pvz: 2 dienom tai jam panasiai tiek ir tegalioja, kai pasibaigia raso vip: uzsisakyk o ne data.
As nesu padares su sms prenumerata pas mane issiunti ir viskas nera ten START , tai va dar prisegu faila kuriame manau reikia keisti:
<?php
$your_mokejimai_pass = "xxx"; // prašome irašyti savo mokejimai.lt slapta˛odi
if ( TestTransaction( $_GET['transaction'], $your_mokejimai_pass, $_GET['id'] ) ){ //patikriname ar ˛inute gauta iš reikiamo serverio.
//vadinas atmetam 10 pirmu simboliu ir taip gaunam logina
// $_GET['sms'] // cia sms tekstas
//amount butu 100 reiskia 1 lt
//to Trumpasis numeris, kuriuo buvo siunciama ˛inute
//currency Valiuta, kuri buvo naudojama. Lietuvoje LTL
//(substr($_GET['sms'],strlen($_GET['keyword']))); //išsaugome ˛inute faile.
//idedam konfiga
include('config.php');
//jungiames i db
$db = mysql_connect($db_host, $db_user, $db_pass);
mysql_select_db($db_name);
//*** Cia surasom galimus raktazodzius juos taskiriant || operatoriumu ***///
if (
$_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
)
{
$nikas=substr($_GET['sms'],(strlen($_GET['key'])+1));
//paimam info apie tai kiek useris dabar turi kreditu
$nikas = mysql_real_escape_string($nikas);
$rezultatai = mysql_query("SELECT `user_id`, `vip_time` FROM `".$db_prefix."users` WHERE `user_name`='".$nikas."'");
$uid = @mysql_result($rezultatai, 0, "user_id");
$laik = @mysql_result($rezultatai, 0, "vip_time");
if (!$uid) {
AddToLog("n".$nikas." |n ".date("r")." |n".' $_GET: '.print_r($_GET, true)." |n".' $_POST: '.print_r($_POST, true)." | ".$_SERVER['REMOTE_ADDR']."n"); //iŪ³augome ß©nute faile.
exit("WAPPUSH vartotojas ".$nikas." sistemoje nerastas.");
}
$dabar = time();
$testi=0;
//*** Cia surasom pratesimo laikus priklausomai nuo raktazodziu ***//
if ($_GET['key']=='ERONA') { $testi = 2 * 24 * 60 * 60; }
if (
$_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
) { $testi = 2 * 24 * 60 * 60; }
if ($dabar > $laik) {
//tesiam nu sio momento
$iki = $dabar + $testi;
} else {
//tesiam nuo buvusio pratesimo
$iki = $laik + $testi;
}
//atnaujinam duombaze
$rezultatai = mysql_query("UPDATE `".$db_prefix."users` SET `vip_time`='".$iki."' WHERE `user_name`='".$nikas."'");
$data = date("Y-m-d, H:i:s", $iki);
echo " $nikas, Jusu VIP naryste pratesta iki $data";
}
else if ($_GET['key']=='STOP ERONA')
{
echo "Jusu VIP narystes prenumerata atsaukta.";
}
AddToLog("n".date("r")." |n".' $_GET: '.print_r($_GET, true)." |n".' $_POST: '.print_r($_POST, true)." | ".$_SERVER['REMOTE_ADDR']."n"); //išsaugome ˛inute faile.
} else {
exit ("zinute netikra"); //i faila kreipesi ne mokejimai.lt serveris, todel nieko daryti nereikia.
}
function AddToLog($str){ //funkcija sauganti gautas SMS ˛inutes i faila.
$fh = @fopen("sms_log.txt", 'a'); //sms_log.txt turi buti su irašymo i ji teisemis.
@fwrite($fh, date('r')."nt".$str."n");
@fclose($fh);
}
function TestTransaction( $transaction, $userPassword, $ordeID, $test = 0, $status = 1 ){
return ( $transaction == md5($userPassword.'|'.$_SERVER['REMOTE_ADDR'].'|'.$ordeID.'|'.$test.'|'.$status) );
}
?>
tiek daug tu key tam kad ten buvo atskiros salys, bet dar neturejau laiko pakeist todel palikau paprasta raktazodi, kazina ar del to gali but? siaip anksciau buvo sistema ant START raktazodis ir galiodavo 7d. bet nemanau kad tai turi itakos, gal kas izvelgiate kas siame kode negerai?
Parašė bruzgis· 2009 Vas. 16 12:02:44
#2
(
$_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
kam vienodus raktazodzius knisi i ifa??
if ($_GET['key']=='ERONA') { $testi = 2 * 24 * 60 * 60; }
Redagavo Enzo· 2009 Vas. 16 12:02:35
Parašė diadingo· 2009 Vas. 16 12:02:05
#3
chipass parašė:
(
$_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
|| $_GET['key']=='ERONA'
kam vienodus raktazodzius knisi i ifa??
if ($_GET['key']=='ERONA') { $testi = 2 * 24 * 60 * 60; }
nu skau buvo skirtingu saliu raktazodziai, bet ar del to gali buti? :)