weeder
Members-
Posts
13 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
weeder's Achievements
Newbie (1/5)
0
Reputation
-
ok the above scipt uses phpmail() which isn't available and workes fine on phpmail() I only smtp mail on hosting and i tried to convert the above to work but what ever i try fails A few pointer if nothing else will help to get the above working using smtp and not phpmail()
-
My host has don't allow phpmail and need help converting this small script to smtp If anyone can help please // Config $modEnabled = true; $subMailConfig = array( // What email do you want the emails to appear from? 'from' => 'contact@mysite.com', // What name do you want the emails to appear from? e.g. MySite Staff 'from_name' => 'MySite', // What subject would you like to show? 'subject' => 'Submissions Accepted at MySite!', // The message you would like to send // {sname} = Site name of the submitter // {downloads} = List of inserted downloads // {surl} = Site URL of the submitter // {email} = Email of the submitter // The above tags are replaced automatically with their equivalents // Do not place whitespace before any lines after the first as the email will show it and look untidy 'message' => "{sname}, Your downloads were successfully submitted to MySite.com and have now been placed in the queue for further inspection before being listed publicly. Please allow upto 3 days for this process to be completed as we have a large amount of downloads to deal with. The following downloads were recieved: {downloads} If some downloads are missing, they were excluded automatically due to being invalid. If you see no downloads above then we recommend you re-submit as our system has faced problems during the submission process. MySite.com Staff" ); function subMail($inserted) { global $subMailConfig; $site = $inserted['details']; $items = $inserted['downloads']; $msgDownloads = ""; foreach($items as $item) $msgDownloads .= $item['title'].' ('.$item['url'].')'."\n"; $msg = str_replace( array( '{sname}', '{surl}', '{email}', '{downloads}' ), array( $site['sname'], $site['surl'], $site['email'], $msgDownloads ), $subMailConfig['message'] ); mail($site['email'],$subMailConfig['subject'],$msg,"From: ".$subMailConfig['from_name']." <".$subMailConfig['from'].">"); // Return the original array just for the hell of it return $inserted; } if($modEnabled) $core->attachDataHook("submitSuccess","subMail"); ?> Many thanks in advance
-
line 52 is if ($mods[$catlist->f("cat_id")]["storefront"] == 1){ $cattable .= " <img border=\"0\" src=\"Themes/DeepWater/custtemplate.gif\">";
-
I get this error Fatal error: Cannot use string offset as an array in /home/domain/public_html/NCADM/CatDetails.php on line 52 Server is on php5 can anyone help please, I am very green first part of code where i believe error is define("RelativePath", "."); include(RelativePath . "/Common.php"); include(RelativePath . "/Template.php"); include(RelativePath . "/Sorter.php"); include(RelativePath . "/Navigator.php"); //End Include Common Files //Include Page implementation @33-503267A8 include("./Header.php"); //End Include Page implementation $details = new clsDBNetConnect; $details->query("select * from category_details"); $mods = ""; while ($details->next_record()){ $mods[$details->f("cat_id")]["field"] = $details->f("field"); $mods[$details->f("cat_id")]["template"] = $details->f("template"); $mods[$details->f("cat_id")]["storefront"] = $details->f("storefront"); $mods[$details->f("cat_id")]["pricing"] = $details->f("pricing"); } $groups = ""; $details->query("select c.group_id, c.cat_id, g.title from groups_categories c, groups g where c.group_id = g.id"); while ($details->next_record()){ //print $details->f("cat_id"); if (isset($groups[$details->f("cat_id")])) $groups[$details->f("cat_id")] .= ", " . $details->f("title"); else $groups[$details->f("cat_id")] = $details->f("title"); } $cattable = " <table border=\"1\" cellspacing=\"1\" width=\"350\">\n"; $cattable .= " <tr>\n"; $cattable .= " <TD class=DeepWaterFieldCaptionTD align=\"middle\" width=\"175\"><font size=\"2\">Category Details</font></td>\n"; $cattable .= " <TD class=DeepWaterFieldCaptionTD align=\"middle\" width=\"75\"><font size=\"2\">Group</font><br>\n"; $cattable .= " <font size=\"2\">Membership</font></td>\n"; $cattable .= " </tr>\n";
-
Sloved $ct = mysql_query("SELECT `coun_flag` FROM `countries` WHERE `coun_id` = '{$ir['country']}'") or die (mysql_error()); $ct = mysql_fetch_object($ct); echo '<center><img src="' . $ct->coun_flag . '" width="50" height="50"></center><br />'; Thanks a lot for your help
-
ok users can go to different countries The datatable table is countries and there is a image url stored in coun_flag. The table that stores which country the user is in is the users database in column country. I am trying to get the image of which country they are in to show on a sidemenu. I think i have the mysql_fetch_object right but its the array thats got me. But being new on php I have tried all i can think of and now lost, I hope this helps, can't think of another way to explain
-
This the error
-
using mccodes I trying to add a country flag to another page depending on which country they are in. Here is where i am so far $ct= mysql_fetch_object(mysql_query("SELECT coun_flag FROM countries WHERE coun_id = '{$ct['country']}'")); echo "<center><img src='{$ir['coun_flag']}' width='50' height='50'><br /><br /> and get a error off this line echo "<center><img src='{$ir['coun_flag']}' width='50' height='50'><br /><br /> can anyone help many thanks in advance
-
Need help with a database query that will enable me to log duplicate ip's in database table name "user" and field where ip is stored is "lastip" I am trying to make a log file that wen run will tell me all "username" with the same ip I have search for hours to see if there is a thread here that can help but failed. Can anyone please help
-
Iam still green when it comes to php and have been trying to get this working but failed Can someone please help Its a donation system from the mccodes script and can't work out why its won't select and run the packs first file is this one <?php include "globals.php"; print <<<EOF <hr><h3>Donations</h3><hr> <br /> <hr><b><center>1st Offer: ($3.00 Pack)</b><ul> <li>250 Crystals</li> </ul><br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type=hidden name=cmd value=_xclick> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|1|{$userid}"> <input type="hidden" name="amount" value="3.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=crystals"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <center><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"><br /> </form> <hr><b><center>2nd Offer: ($3.00 Pack)</b><ul> <li>5 Will Potions (Fully restores your will)</li> </ul><br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type=hidden name=cmd value=_xclick> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|2|{$userid}"> <input type="hidden" name="amount" value="3.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=potions"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <center><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"><br /> </form> <br/> <hr>All packs below include NEW! 17% Energy every 5 mins instead of 8% and other great benefits</hr><br/> <hr><b><center>3rd Offer: ($3.00 Pack)</b><ul> <li>30 days being a respected member</li> <li>50 crystals and $10,000</li> </ul><br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type=hidden name=cmd value=_xclick> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|3|{$userid}"> <input type="hidden" name="amount" value="3.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=30day"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <center><input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"><br /> </form> <hr><b>4th Offer: ($6.00 Pack)</b><ul> <li>60 days being a respected member</li> <li>100 crystals and $40,000</li> </ul><br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|4|{$userid}"> <input type="hidden" name="amount" value="6.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=60day"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> <hr><b>5th Offer: ($9.00 Pack)</b><ul> <li>90 days being a respected member</li> <li>150 crystals and $65,000</li> </ul><br /> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="{$set['paypal']}"> <input type="hidden" name="item_name" value="{$domain}|DP|5|{$userid}"> <input type="hidden" name="amount" value="9.00"> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="return" value="http://{$domain}/donatordone.php?action=done&type=90day"> <input type="hidden" name="cancel_return" value="http://{$domain}/donatordone.php?action=cancel"> <input type="hidden" name="notify_url" value="http://{$domain}/ipn_donator.php"> <input type="hidden" name="cn" value="Your Player ID"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="tax" value="0"> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> </form> EOF; $h->endpage(); ?> then the file that does the work Ipn_donator include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; require 'global_func.php'; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // check the payment_status is Completed if($payment_status != "Completed") { fclose ($fp);die(""); } if($db->num_rows($db->query("SELECT * FROM dps_accepted WHERE dpTXN='{$txn_id}'")) > 0) { fclose ($fp);die(""); } // check that txn_id has not been previously processed // check that receiver_email is your Primary PayPal email if($receiver_email != $set['paypal']) { fclose ($fp);die(""); } // check that payment_amount/payment_currency are correct if($payment_currency != "USD") { fclose ($fp);die(""); } // parse for pack $packr=explode('|',$item_name); if(str_replace("www.","",$packr[0]) != str_replace("www.","",$_SERVER['HTTP_HOST'])) { fclose($fp); die(""); } if($packr[1] != "DP") { fclose($fp);die(""); } $pack=$packr[2]; if( $pack != 1 and $pack != 2 and $pack != 3 and $pack != 4 and $pack != 5) { fclose($fp);die(""); } if($pack == 1 && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 2 && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 3 && $payment_amount != "3.00") { fclose ($fp);die(""); } if($pack == 4 && $payment_amount != "6.00") { fclose ($fp);die(""); } if($pack == 5 && $payment_amount != "9.00") {fclose ($fp);die(""); } // grab IDs $buyer=$packr[3]; $for=$buyer; // all seems to be in order, credit it. if($pack==1) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.crystals=u.crystals+250 WHERE u.userid={$for}"); $d=0; $t="crystals"; } else if($pack==2) { $db->query("INSERT INTO inventory VALUES('',23,$userid,"5")"); $d=0; $t="potions"; } else if($pack==3) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.crystals=u.crystals+50 WHERE u.userid={$for}"); $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+10000 WHERE u.userid={$for}"); $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.donatordays=u.donatordays+30 WHERE u.userid={$for}"); $d=30; $t="threedollers"; } else if($pack==4) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+40000 WHERE u.userid={$for}"); $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.crystals=u.crystals+100 WHERE u.userid={$for}"); $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.donatordays=u.donatordays+60 WHERE u.userid={$for}"); $d=60; $t="sixdollars"; } else if($pack==5) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.money=u.money+65000 WHERE u.userid={$for}"); $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.crystals=u.crystals+150 WHERE u.userid={$for}"); $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET u.donatordays=u.donatordays+90 WHERE u.userid={$for}"); $d=90; $t="ninedollars"; } // process payment event_add($for, "Your \${$payment_amount} Pack {$pack} Donator Pack has been successfully credited to you.", $c); $db->query("INSERT INTO dps_accepted VALUES('', {$buyer}, {$for}, '$t', unix_timestamp(), '$txn_id')"); } else if (strcmp ($res, "INVALID") == 0) { } } fclose ($fp); } ?>
-
I am new to php and getting the hang of the basic stuff but this i have failed Have 3 radio buttons and looking to call a function print "<h3>Banks</h3><br /> <form action='bank.php' method='post'> <input type='radio' name='money' id='1' value='1' /> Money<br /> <input type='radio' name='crystal' id='2' /> Crystal<br /> <input type='radio' name='ruby' id='3' value='3' /> Ruby<br /> <input type='submit' value='bank' /></form>"; Need to call button 1 function money() button2 function crystal() button3 function ruby() All the functions are in the same file and all work ok I just can't get the radio buttons to call functions any help will be greatly apreceated
-
just switched to a server using php5 now i get a error when using a script Fatal error: Using $this when not in object context in The error is in line 19 [code]$output .= $this->ipsclass->compiled_templates['skin_perfect_store']->skin_feature_form_line($q,$a); [/code] can anybody help
-
I'm new into php and have a script that uses a blacklist and would like to convert it to a whitelist but i can't seem to get it work The code is two files the config file [quote]function blacklist($url) { $fil = @file("blacklist.txt"); $go = false; for ($i=0; $i<count($fil); $i++) { if (eregi(substr($fil[$i], 0, strlen($fil[$i])-3), $url)) { $go = true; break; } } if ($go) return true; else return false; } }[/quote] And then in the file that inserts the info into the dasbase [quote]if ($HTTP_POST_VARS && (!$HTTP_POST_VARS[sname] || !$HTTP_POST_VARS[surl] || !$HTTP_POST_VARS[title][0] || !$HTTP_POST_VARS[url][0] || !$HTTP_POST_VARS[type][0])) { include "wrong.html"; die(); } elseif ($HTTP_POST_VARS) { $c->open(); if ($c->blacklist($surl)) $dont = true; else $dont = false; if (!$dont) { for ($i=0; $i<count($HTTP_POST_VARS[title]); $i++) { if (!$title[$i] || !$url[$i] || !$type[$i] || $c->blacklist($url[$i])) break; else { $dato = $c->dato(); @mysql_query("INSERT INTO $c->mysql_tb_que (type, title, url, sname, surl, date, email) " ."VALUES ('$type[$i]','$title[$i]','$url[$i]','$sname','$surl','$dato','$email')"); } } include "thanks.html"; die(); $inc = true; } else $inc = false;[/quote] Can anybody give me some help on how to convert this to use a whitelist Many thanks in advance