') ') Fork me on GitHub

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $10.00
Net Balance: $9.41
Left to go: $90.59

Donations
Dante7237  ($10)Dec-3

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

- 2 2.5 2.6 4 6 adslight Android AntiHarvesting AntiSpam API Apple Battlefield billige Bootstrap Captcha cell cent chronolabs Clicks content CĂN demo docek download Dresses evden eve facebook Fat floor for free Gateway giải Google Guide herre Home Honeypot Human HỘ IP iPhone jQuery Language Law Legal List log Loss module modules Monster new newbb news nhiệt NHÀ online PARK Payment phone PHP Prevention profile project Protector publisher Rapid RESIDENCE responsive review Rights rmcommon security Sentry Signatures Signed site Smartphone Smoking Solution Spam stem Studio tdmcreate template The Theme themes tháp web weight xoops Xortify XPayment ZendFramework

New Users

Registering user

# 137911

mydarkglobe

Welcome to XOOPS!




Bottom   Previous Topic   Next Topic  |  Register To Post



#1 Posted on: 2013/2/25 16:35 xdonations name
When someone makes a donation, and chooses to show their name, if they aren't a registered user it shows "Admin" in the donat-o-meter. What I want to do is replace that "custom" muser_id with the first_name from the donations_transactions table in the database. (Or first_name and last_name.)

I am not sure how I would hack that in donors.php and make it display in the donations_donatometer.html template.

(No registered users will be donating.)

Please help.

$query_Recordset1 "SELECT custom AS muser_id, option_selection1 as showname, DATE_FORMAT(payment_date, '%b %e') AS date, CONCAT('".$curr_sign."',SUM(mc_gross)) AS amt FROM ".$xoopsDB->prefix("donations_transactions")." WHERE (payment_date >= DATE_FORMAT(NOW(),'%Y-%m-".$swingd."')) GROUP BY txn_id ORDER BY payment_date DESC";     }else{         $query_Recordset1 "SELECT custom AS muser_id, option_selection1 as showname, DATE_FORMAT(payment_date, '%b-%e') AS date, CONCAT('".$curr_sign."',SUM(mc_gross)) AS amt FROM ".$xoopsDB->prefix("donations_transactions")." WHERE (payment_date < DATE_FORMAT(NOW(), '%Y-%m-".$swingd."')) AND payment_date > DATE_FORMAT(SUBDATE(NOW(),INTERVAL ".$swingd." DAY), '%Y-%m-".$swingd."') GROUP BY txn_id ORDER BY payment_date DESC";     }      $Recordset1 $xoopsDB->query($query_Recordset1);     $totalRows_Recordset1 $xoopsDB->getRowsNum($Recordset1);      $ROWS_DONATORS "";     // Fill out the donators table tag     while ($row_Recordset1 = $xoopsDB->fetchArray($Recordset1)) {         if ( $row_Recordset1['amt'] > $curr_sign.'0' ) {             $ROWS_DONATORS .= "<tr>";             $ROWS_DONATORS .= "<td style="font-weight: bold;">&nbsp; ";              $muser_id = $row_Recordset1['muser_id'];             if ( strcmp($row_Recordset1['showname'],"Yes") == 0 && ($userfoin = mgetusrinfo($muser_id))) {                 $ROWS_DONATORS .= "<a href='".XOOPS_URL."/userinfo.php?uid=".  $userfoin->getVar('uid')."'>".xdshorten($userfoin->getVar('uname'))."</a>n";


Top

preachur
Joined:
2006/2/3 22:37
From Colorado, U.S.A.
Group:
Registered Users
Posts: 525
(Show More) (Show Less)







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You can vote in polls.
You cannot attach files to posts.
You can post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]