My friend recently had me look at a script he purchased, because it wasn't working properly. After looking and looking and looking, I found nothing wrong with the code, so i uploaded it to my server ad it wrked perfectly.
We completely reinstalled it on his server, and once again it does no work. We're both using the same versions of PHP and I'm using an older version of MySQL (by .1 i think)
After testing and such, we found this to be the only real difference, which makes a ton of sense.
On my server, the date displays like this: 05/05/26 18:37:14
On his: 05/-0/5- 26: 2:0:
So obviously (to me) it looks like it's putting in a "-" and bumping everything over one. However in his database, the date is perfect.
Here is a snippet of code that deals with the date.
if ($msg == "") {
$query = "SELECT id FROM vbPTS_Searches WHERE userid = '".$row[id]."' AND date LIKE '".date("Ymd")."%';";
$result = @mysql_query($query);
$searchesmadetoday = @mysql_num_rows($result);
if ($searchesmadetoday >= $maxsearchperday) {
$msg = $mess_22;
}
if ($msg == "") {
$query = "SELECT id FROM vbPTS_Searches WHERE userid = '".$row[id]."' AND date LIKE '".date("Ymd")."%' AND searchterms = '".addslashes($keys)."';";
$result = @mysql_query($query);
$samesearches = @mysql_num_rows($result);
if ($samesearches >= $maxsearchtermperday) {
$msg = $mess_23;
}
if ($msg == "") {
$query = "SELECT date FROM vbPTS_Searches WHERE userid = '".$row[id]."' ORDER BY date DESC LIMIT 0,1;";
$result = @mysql_query($query);
$daterow = @mysql_fetch_array($result);
if ($daterow[date] > date("YmdHis", strtotime("-$secondsbetween seconds"))) {
$msg = $mess_24;
}
if ($msg == "") {
$query = "INSERT INTO vbPTS_Searches (searchterms , searchengine , ip , hostname , date , userid) VALUES ('".addslashes($keys)."', '".$serow[id]."', '".$_SERVER['REMOTE_ADDR']."', '".@gethostbyaddr($_SERVER['REMOTE_ADDR'])."', ".date("YmdHis").", '".$row[id]."');";
@mysql_query($query);
$query = "UPDATE vbPTS_Members SET balance = (balance+".$amountpersearch."), joindate = joindate WHERE id = '".$row[id]."' LIMIT 1;";
@mysql_query($query);
$query = "UPDATE vbPTS_Members SET refearnings = (refearnings+".(($amountpersearch/100)*$refpercentage)."), joindate = joindate WHERE id = '".$row[upline]."' LIMIT 1;";
@mysql_query($query);
}
}
}
Any additional information you might need, maybe as to what the scripts supposed to do? Let me know.
Thanks in advance for the help.