Jump to content

nomanoma

Members
  • Posts

    33
  • Joined

  • Last visited

    Never

Everything posted by nomanoma

  1. hi, I try to login through a form but when I click the button it does nothing in firefox7 and chrome. It works fine in IE. here's the code: $a=""; $b=""; if ($_POST) { $a=trim($_POST["id"]); $b=trim($_POST["password"]); $a=str_replace("'","",$a); $b=str_replace("'","",$b); $a=str_replace("\"","",$a); $b=str_replace("\"","",$b); } if ($a=="" || $b=="") { if ($_SESSION["id_session"]=="" || $_SESSION["password_session"]=="") { ?> <form action=members.php method=post> <br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr> <tr><td>Member's ID</td><td><input type=text name=id></td></tr> <tr><td>Password</td><td><input type=password name=password></td></tr> <tr><td> </td><td> <a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr> <tr><td colspan=2 align=center><input type=submit value="Log In"></td></tr> </table></form> <? } else { middle(); } } else { $check=0; $id=$_POST["id"]; $rs = mysql_query("select * from members where ID='$id'"); if ($rs) { $arr=mysql_fetch_array($rs); $n2=$arr['Password']; if ($n2==$b) { $check=1; $_SESSION["id_session"]=$arr[0]; $_SESSION["password_session"]=$arr[9]; middle(); } } if ($check==0) { print "<h2>Invalid User Id or Password</h2>"; ?> <form action=members.php method=post> <br><br><Center><table><tr><td colspan=2 align=center><h3>Members Login Area</h3></td></tr> <tr><td>Member's ID</td><td><input type=text name=id></td></tr> <tr><td>Password</td><td><input type=password name=password></td></tr> <tr><td> </td><td> <a href="forgot.php" onclick="doexit=false;"><font face="Verdana,Arial,Helvetica" size="1" color="#000000"><b>Forgot Your Password?</b></font></a></td></tr> <tr><td colspan=2 align=center><input type=submit value="Log In"></td></tr> </table></form> <? } } thanks
  2. can please post the whole login.php page?
  3. well, thank u so much again. of course i'll do my best to help around here. and if u ever need anything u can pm me
  4. wow thank u ) u r awesome. i can't believe i was that stupid how can i repay you???
  5. yes, i put the limit only when i couldn't display it right. but it should display at least 10.
  6. if it's not set it will change the clickable hyperlink attached to the banner with a different one that is for non-members. i really appreciate ur help. i used ur edited code but it's still not showing beside each other. it's still going over each other. let me know if u need another snapshot of how it looks now.
  7. the only problem i have is that it displays the buttons over each other and not on the same row. i'm attaching a snapshot. [attachment deleted by admin]
  8. ok can u please tell me how to display the banners side by side and not over each other ?
  9. hi: i'm trying to make a scrolling banner ads script. the thing is i want the banners to be shown in one row beside each other. what i've done makes the banners show under each other. i can't use just html and make a tabel with cells and add the banner links because i have to get the urls from a database like this: $res_banners = @mysql_query("SELECT * FROM scbuttons where status=1 and max>shown ORDER BY RAND() LIMIT 10"); i appreciate any help. here's the complete code i'm using: <?php $res_banners = @mysql_query("SELECT * FROM scbuttons where status=1 and max>shown ORDER BY RAND() LIMIT 1"); while($banners = @mysql_fetch_array($res_banners)) { mysql_query("update scbuttons set shown=shown+1, show_views=show_views+1 where id=".$banners['id']); if ($banners[bannerurl] != "" ) { ?> <? if( session_is_registered("ulogin") ) { ?> <center><table style="width:800; height: 170px;" cellspacing="0" cellpadding="0" bordercolor=#000000 border="1" bgcolor=#FFFFFF><tr><td> <marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();"><a href="<? echo "$domain/scbuttonclick1.php?id=".$banners['id']; ?>" target="_blank"><img src="<? echo $banners['bannerurl']; ?>" style="float:left;" border="0"></a></marquee> <? } else { ?> <marquee behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();"><a href="<? echo "$domain/scbuttonclick.php?id=".$banners['id']; ?>" target="_blank"><img src="<? echo $banners['bannerurl']; ?>" style="float:left;" border="0"></a></marquee> <? } } } ?> </tr></td></table></center>
  10. ok, i replaced eval with echo for this part: $OOO0O0O00=__FILE__;$O00O00O00=__LINE__;$OO00O0000=16680;eval((base64_decode('JE8wMDBPME8wMD1mb3BlbigkT09PME8wTzAwLCdyYicpO3doaWxlKC0tJE8wME8wME8wMClmZ2V0cygkTzAwME8wTzAwLDEwMjQpO2ZnZXRzKCRPMDAwTzBPMDAsNDA5Nik7JE9PMDBPMDBPMD0oYmFzZTY0X2RlY29kZShzdHJ0cihmcmVhZCgkTzAwME8wTzAwLDg4MCksJ1ZoY1h3N3NVUEw2M29kU0VZTnYrV1ova1RNbHl1MjlPNHFDRlJBRFFwMGJuNUphMXhCdGpLZmVtSGlHSWd6OHI9JywnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLycpKSk7ZXZhbCgkT08wME8wME8wKTs=')));return;?> and i got what you say you got: $O000O0O00=fopen($OOO0O0O00,'rb');while(--$O00O00O00)fgets($O000O0O00,1024);fgets($O000O0O00,4096);$OO00O00O0=(base64_decode(strtr(fread($O000O0O00,880),'VhcXw7sUPL63odSEYNv+WZ/kTMlyu29O4qCFRADQp0bn5Ja1xBtjKfemHiGIgz8r=','ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/')));eval($OO00O00O0); but anything more than this gives me unicode, i know i must be missing something. all i'm intersted in is to know how to decode it, i don't care about the original php code. so can you tell me step by step what to do next. thank you
  11. no, i'm adding the encoded code in the string as in this: $str = 'JE8wMDBPME8wMD1mb3BlbigkT09PME8';
  12. i'm the owner of that domain the code is licensed to (rockintextads.com) and the encoded code is pretty much the same as the php code i gave you except that it has a inverse tick box option anyway here's what i use: <?php $str = ''; echo base64_decode($str); ?> maybe it's too simple for it. would you please let me know what you used? thanks
  13. i'm attaching the encoded value in a php file. (post.php) the decoded should be something like this php file i'm also attaching (decoded.php) [attachment deleted by admin]
  14. normally when i decode something like this, the output eventually will be the original php code (with english characters, not unicode characters)
  15. hi: i have trouble decoding some base64 encode, when i decode it, the output is always in Unicode like this: ¨Å»pÝ×+ÑCw =žÍbGÝí`í`3ý†KûûvøÖKüÖK;ä{tÛöÛ«ÑÐå1§«�Žç™+§ p.s. i tried various character sets i.e. utf-7, utf-8, etc... and the output still in Unicode. can anyone help, please? if you need the code i can provide it as a php file upon request. thanks
  16. hi: i run advertising sites that send email ads to its members. i want to add a code to make a footer ads appear in these emails. footer ads are composed of 2 lines, title and a link. the member chooses the title and places the link and it's saved in my database. i need to show those ads (one in each email randomly). here's the script for sending the email ads: <?php include "../header.php"; include "../config.php"; include "../style.php"; //pick a random number and make sure it is not allready in the database.... do { $random = rand(10000, 1000000); $query = "select * from links where number=".$random; $result = mysql_query ($query) or die ("Query failed"); $numrows = @ mysql_num_rows($result); } while (numrows == 1); //get the next ad to send out.... $query3 = "select * from solos where approved=1 and sent=0 limit 1"; $result3 = mysql_query ($query3) or die ("Query failed"); $numrows2 = @ mysql_num_rows($result3); if ($numrows2 == 0) { echo "<p>No soloads to send.</p>"; exit; } //end if ($numrows == 0) $line3 = mysql_fetch_array($result3); $subject = $line3["subject"]; $adbody = $line3["adbody"]; $id = $line3["id"]; //update the links table with the new random number. $query2 = "insert into links set number=".$random.", adid=".$id; $result2 = mysql_query ($query2) or die ("Query failed"); //set the 'sent' in the database to 1 $query5 = "update solos set sent=1 where id=".$id; $result5 = mysql_query ($query5) or die ("Query failed"); //set the 'datesent' $query6 = "update solos set datesent='".time()."' where id=".$id; $result6 = mysql_query ($query6) or die ("Query failed 6"); $query1 = "SELECT * FROM pages WHERE name='Solo footer ad'"; $result1 = mysql_query ($query1); $line1 = mysql_fetch_array($result1); $htmlcode = $line1["htmlcode"]; if($htmlcode) $htmlcode = "<br>$htmlcode<br><br>"; //get all members details.... $query4 = "select * from members where status=1 and verified=1 and vacation=0"; $result4 = mysql_query ($query4) or die ("Query failed"); while ($line4 = mysql_fetch_array($result4)) { $email = $line4["subscribed_email"]; $memtypeq = $line4["memtype"]; $useridq = $line4["userid"]; $nameq = $line4["name"]; $passwordq = $line4["pword"]; //now we've got all we need, so blast the ad out! $Subject = "(Solo) ".$subject; $Message = $adbody; $Message .= "<br><br>--------------------------------------------------------------<br><br>"; if ($memtypeq == "JV Member") { $Message .= "Click the link to receive ".$jvclickearn." credits<br><br>"; } elseif($memtypeq=="SUPER JV") { $Message .= "Click the link to receive ".$superjvclickearn." credits<br><br>"; } else { $Message .= "Click the link to receive ".$proclickearn." credits<br><br>"; } $Message .= "<br><br>"; $Message .= "<br><br>"; $Message .= "<a href=\"".$domain."/clicks.php?userid=".$useridq."&seed=".$random."&id=".$id."\">".$domain."/clicks.php?userid=".$useridq."&seed=".$random."&id=".$id."</a>"; $Message .= ".<br><br>"; $Message .= "--------------------------------------------------------------<br>$htmlcode<br>"; $Message .= "This is a solo ad advertisement from a member of ".$sitename.". You are receiving this because you are a member of '$sitename'.<br>"; $Message .= "You can opt out of receiving emails only by deleting your account, click here to delete your account.<br><br><a href=\"$domain/delete.php?userid=$useridq&code=".md5($passwordq)."\">$domain/delete.php?userid=$useridq&code=".md5($passwordq)."</a>.<br><br>"; $Message .= "$adminname, $sitename, $adminaddress<br>"; $headers = "From: $sitename<$adminemail>\n"; $headers .= "Reply-To: <$adminemail>\n"; $headers .= "X-Sender: <$adminemail>\n"; $headers .= "X-Mailer: PHP4\n"; $headers .= "X-Priority: 3\n"; $headers .= "Return-Path: <$adminemail>\nContent-type: text/html; charset=iso-8859-1\n"; $nameq = trim($nameq); $firstnameq = substr($nameq , 0, strpos($nameq, " ")); $Message = str_replace("~userid~",$useridq,$Message); $Message = str_replace("~fname~",$firstnameq,$Message); $Subject = str_replace("~userid~",$useridq,$Subject); $Subject = str_replace("~fname~",$firstnameq,$Subject); @mail($email, $Subject, wordwrap(stripslashes($Message)),$headers, "-f$adminemail"); $counter=$counter+1; } // end while ($line4 = mysql_fetch_array($result)) echo "<p><b><center>email successfully posted to ".$counter." members.</p></b></center>"; mysql_close($dblink); include "../footer.php"; ?> i want to insert the new code inside that script but all i get is errors. here's what i tried: $navquery = "SELECT * FROM footerads WHERE added=1 AND approved=1 ORDER BY rand()"; $navresult = mysql_query ($navquery) or die ("Query failed"); while ($line = mysql_fetch_array($navresult)) { $id = $line["id"]; $subject = $line["subject"]; $adbody = $line["adbody"]; $url = $line["url"]; if($id) $id = "<br>$id<br><br>"; if($url) $url = "<br>$url<br><br>"; if($subject) $subject = "<br>$subject<br><br>"; if($adbody) $adbody = "<br>$adbody<br><br>"; and in the end of the script where the execution is: $Message .= "Member Footer ads. Buy One Now<br><br>"; $Message .= "<br>$id<br><br>"; $Message .= "<br>$subject<br><br>"; $Message .= "<br>$adbody<br><br>"; $Message .= "<br>$url<br><br>"; $Message .= "--------------------------------------------------------------"; i appreciate your help. thank you
  17. hi: i keep getting this error when i try to connect to a certain sever Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110 in /home/public_html/Connect/Mightyadz.php on line 12 Could not connect to database both servers mine and the one i'm trying to connect to have whitelisted our ips and are added in the allow list. how can this be solved? thanks
  18. luca you are confused. "Let's say your script on site A tryes to connect to host B's mysql server: n your script you'll write "host B" as mysqlhostname." that's exactly what i did but what i get is the wrong host (different that the one i'm wrote on the script). of course i made the right users and of course i gave access to that user and allowed the ips to my remote mysql and firewall. so whatever you said before doesn't apply to this problem.
  19. no it's not. i'm sure of the username and password. the problem is it says 'famousad_nomanom'@'tweety.zoothost.com' where this is not my host. this is the other site that is trying to connect to my site host. i don't know why this is happening. i'm using this code: <?php $MySqlHostname = "174.120.1.53"; //the name of your host - if its local leave it as is. $MySqlUsername = "famousad_nomanom"; //the username to your database. $MySqlPassword = "pass"; //the password to your database. $MySqlDatabase = "famousad_twilight"; //the name of your database. // do not edit below this line!! /////////////////////////////////////////////////////////////////////// $dblink=MYSQL_CONNECT($MySqlHostname, $MySqlUsername, $MySqlPassword) or die("Could not connect to database"); @mysql_select_db("$MySqlDatabase") or die( "Could not select database"); ?> i don't know why it uses her host ip and not the one i wrote. on the other hand i'm using same connect files (with their usernames and pass and host ips) and it's working on my sites only. help please.
  20. i allowed all ips on all hosts firewall. now i can get my sites to connect to theirs. the problem now is that they can't connect to mine. i get another error: Warning: mysql_connect() [function.mysql-connect]: Access denied user 'famousad_nomanom'@'tweety.zoothost.com' in /home/rockinex/public_html/Connect/Twilightadz.php on line 12 Could not connect to database help
  21. ok bear with me please. i'm making separate connect files to each site i want to connect to. in each connect file i'm using the original user and password assigned to each database (on their host) for example: site B: ip: B, userB, PasswordB, dbnameB site C: ip: C, userC, PasswordC, dbnameC are you saying that i need to make only 1 user and password and assign it to all sites?
  22. - Mysql server on host B must have a remote user defined that matches Host A address what does that mean? how can i do that exactly?
  23. for luca: i added my server ip to their allowed hosts list and vice versa that's what i meant.
  24. i contacted my host and made them enable remote access. and i added the ips to the other sites i'm trying to connect to at their remote mysql. what else can i do? am i supposed to use different ips than those of the shared hosting ip servers?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.