I guess either no one knows or its to obvious what i haft to do so no one answers lol!
No but seriously I need help with this!
The thing is that i know that the ipn is correct (i can see the transaction messages in ipn history - paypal).
It seems like MySQL and treasury/config.inc.php isnt communicating.....Since in the database the goals are set, but does not show up in the html page! It shows up as $DM_GOAL but should show up as for example $100
There are about 500 version of treasury in the world....To know which one you are using is the first problem.
Second....
What version of RN are you using?
Third....
I have a feeling that the issue is with the OLD database connections....
Try this...
Look in mainfile.php and uncomment these two lines....
Code:
* The following two lines of code were moved and commented out in RN 2.30.00 to "test the waters" on
* finding out what old modules/blocks/hacks/etc. are still using this SQL layer that is so
* old it should be obsoleted. If you really need these back, uncomment them back. We will keep this
* code this way for one more major release as well as keep the includes/sql_layer.php script.
*/
@require_once(INCLUDE_PATH.'includes/sql_layer.php');
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
If that works what you really need to do is this....
Only registered users can see links on this board! Get registered or login to the forums!
This might be good; NukeTreasuryV1.1 is the one im having problems with!
And the problem is thay it seems like MySQL and treasury/config.inc.php isnt communicating.....Since in the database the goals are set, but does not show up in the html page! It shows up as $DM_GOAL but should show up as for example $100
The file that i think is causing this problem is treasury.php
Im guessing that it has something to do with either the gathering of data from MySQL or problems with ipnppd settings.
Heres the code for treasury.php
Code:
<?php
/************************************************************************/
/* NukeTreasury - Financial management for PHP-Nuke */
/* Copyright (c) 2004 by Dave Lawrence AKA Thrash */
/* thrash@fragnastika.com */
/* thrashn8r@hotmail.com */
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/* This program is distributed in the hope that it will be useful, but */
/* WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
/* General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 */
/* USA */
/* Upgraded and cleaned up by Telli http://codezwiz.com */
/************************************************************************/
if (!eregi("admin.php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }
$result = sql_query("select radminsuper from ".$prefix."_authors where aid='$aid'", $dbi);
list($radminsuper) = sql_fetch_row($result, $dbi);
function Treasury()
{
global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
if( !$ipnppd )
{
echo "<br><br>NukeTreasury FATAL ERROR: Unable to connect to SQL database. Please check your settings in modules/Donations/config.inc.php<br><br>";
return;
}
// Collect IPN reconcile data
// First, get the date of the last time we reconciled
$query_Recordset2 = 'SELECT `date` as recdate'
. ' FROM financial'
. ' WHERE name = \'PayPal IPN\''
. ' ORDER BY date DESC '
. ' LIMIT 1 ';
$Recordset2 = mysql_query($query_Recordset2, $ipnppd) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$recdate = $row_Recordset2[recdate];
// Get the date of the last donation
$query_Recordset2 = 'SELECT `payment_date` as curdate'
. ' FROM transactions'
. ' WHERE payment_status = \'Completed\' AND ( transactions.txn_type = \'send_money\' OR transactions.txn_type = \'web_accept\' )'
. ' ORDER BY payment_date DESC '
. ' LIMIT 1 ';
$Recordset2 = mysql_query($query_Recordset2, $ipnppd) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$curdate = $row_Recordset2[curdate];
// Collect the IPN transactions between recdate and curdate
$query_Recordset2 = 'SELECT custom, SUM( mc_gross ) AS gross, SUM( mc_gross - mc_fee ) AS net'
. ' FROM transactions '
. ' WHERE ( payment_Date > \'' . $recdate . '\' AND payment_date <= \'' . $curdate . '\' ) '
. ' GROUP BY txn_id ';
$Recordset2 = mysql_query($query_Recordset2, $ipnppd) or die(mysql_error());
// Iterate over the records skipping the ones that total out to zero(refunds)
$ipn_tot = 0;
$num_ipn = 0;
while( $row_Recordset2 = mysql_fetch_assoc($Recordset2) )
{
if( $row_Recordset2[gross] > 0 )
{
$ipn_tot += $row_Recordset2[net];
$num_ipn++;
}
}
// Get the register balance
$query_Recordset4 = "SELECT SUM(amount) as total FROM financial";
$Recordset4 = mysql_query($query_Recordset4, $ipnppd) or die(mysql_error());
$row_Recordset4 = mysql_fetch_assoc($Recordset4);
$total = $row_Recordset4[total];
echo "<tr><td width=\"100%\">";
echo "Number of new IPN records: $num_ipn - Totaling \$$ipn_tot";
echo "</td></tr>";
echo "<tr><td width=\"100%\">";
echo "<form action=\"admin.php?op=IpnRec#AdminTop\" method=\"post\">";
echo "<input type=\"hidden\" name=\"op\" value=\"IpnRec\">"
."<input type=\"submit\" value=\"PayPal IPN reconcile\" onClick=\"return confirm('This action will total up all recent PayPal IPN" . '\n' . "transactions and post them here in the register." . '\n\n' . "Are you sure you want to do this now?')\">"
."</form>";
echo "</td></tr></table>";
."return false;\">"
."<img border=\"0\" width=\"12\" height=\"13\" src=\"images/admin/treasury_edit.png\"></a> "
."<a href=\"admin.php?op=FinRegDel&id=$row_Recordset1[id]\">"
."<img border=\"0\" width=\"12\" height=\"13\" src=\"images/admin/treasury_drop.png\" onClick=\"return confirm('Are you sure you want to delete this record?" . '\n\n' . "Are you sure you want to do this now?')\""
."></a></td>"
function FinancialRegAdd()
{
global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());
function FinancialRegDel()
{
global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());
function FinancialRegEdit()
{
global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());
// echo "$_POST[Date] $_POST[Num] $_POST[Name] $_POST[Descr] $_POST[Amount]<br><br>";
$nTime = strtotime($_POST[Date]);
if($nTime == -1)
echo "Invalid Date format<br>";
else
if( strlen($_POST[Name]) == 0)
echo "The Name field cannot be blank<br>";
else
if( !is_numeric($_POST[Amount]))
echo "Invalid Amount field, do not use any characters other than -.0123456789<br>";
else
{
echo "Field passed validation!<br>";
function Config()
{
global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
?>
<script Language="JavaScript">
function isEmailAddr(email)
{
var result = false;
var theStr = new String(email);
var index = theStr.indexOf("@");
if (index > 0)
{
var pindex = theStr.indexOf(".",index);
if ((pindex > index+1) && (theStr.length > pindex+1))
result = true;
}
return result;
}
function validRequired(formField,fieldLabel)
{
var result = true;
if (formField.value == "")
{
alert('Please enter a value for the "' + fieldLabel +'" field.');
formField.focus();
result = false;
}
return result;
}
function allDigits(str)
{
return inValidCharSet(str,"0123456789");
}
function inValidCharSet(str,charset)
{
var result = true;
// Note: doesn't use regular expressions to avoid early Mac browser bugs
for (var i=0;i<str.length;i++)
if (charset.indexOf(str.substr(i,1))<0)
{
result = false;
break;
}
return result;
}
function validInt(formField,fieldLabel,required)
{
var result = true;
if (required && !validRequired(formField,fieldLabel))
result = false;
if (result)
{
// var num = parseInt(formField.value,10);
if (!allDigits(formField.value))
{
if(required)
{
alert('Please enter a number for the "' + fieldLabel +'" field.');
formField.focus();
result = false;
}
else if ( formField.value == "" )
{
return true;
}
else
{
alert('Please enter a number or a blank for the "' + fieldLabel +'" field.');
formField.focus();
result = false;
}
}
}
return result;
}
function validdateURL(formField, value, secure)
{
var match = /https/i.test(value);
if( value != "" && !/^http/i.test(value) )
{
alert('The URL must start with http://');
formField.focus();
return false;
}
if( secure && value != "" && !/^https/i.test(value) )
{
// alert('This should reside on a HTTPS server. Users will be warned about viewing secure and non-secure data on the same page');
return confirm('This URL does not begin with https://\nThis image should reside on an HTTPS server.\nIf you use this URL, users will receive a warning\nabout viewing secure and non-secure data on the same page.\n\n Are you sure you want to continue?');
}
return true;
}
function checkCancelledURL()
{
if( document.tr_configs.var_pp_image_url.value == "")
alert('There is no URL for a Cancelled payment. If you do not enter\na URL for cancelled payments PayPal will also use\nthis URL for cancelled payments.');
return true;
}
</script>
<?php
ShowTextBox("ipn_log_entries", "<b>Keep this many log entries</b>", "", "4", "");
global $nukeurl;
$desc = 'http://www.iforclan.net/Donation-stats/html/modules/Donations/ipn/ipnppd.php';
$desc = htmlentities($desc);
echo "<tr>"
."<td title =\"$desc\" bgcolor=\"$bgcolor2\" align=\"right\"><b>IPN link for PayPal</b></td>"
."<td title =\"$desc\" align=\"left\">
<a href=\"$nukeurl/modules/Donations/ipn/ipnppd.php?dbg=1\" target=\"_blank\"><b><i>Click here to test IPN</i></b></a></td>"
. "</td></tr>";
echo "</table><br>";
function UpdateDb($db,$nm, $sub, $val, $txt)
{
global $ilog;
$insert_Recordset = "UPDATE `config` SET `value`='$val', `text`='$txt' WHERE `name`='$nm' AND `subtype`='$sub'";
$ilog .= "$insert_Recordset<br><br>";
echo "$insert_Recordset<br><br><font color=\"#FF0000\"><b>";
$rvalue = mysql_query($insert_Recordset, $db) or die(mysql_error());
echo "</b></font>";
}
function UpdateDbShort($db,$nm, $sub, $val, $txt)
{
global $ilog;
$insert_Recordset = "UPDATE `config` SET `value`='$val' WHERE `name`='$nm' AND `subtype`='$sub'";
function ConfigUpdate()
{
global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>Treasury Configuration Error</b></font></center>";
echo "<br><font color=\"#0000FF\"><b>If you see this screen then an SQL error was encountered</b></br>"
. "You shoud see a message in <font color=\"#FF0000\">RED</font> below indicating what the error is</font><br><br>";
CloseTable();
// echo "<br>";
OpenTable();
$ERR = 1;
$ilog="";
$ilog .= "<br>";
foreach( $_POST as $option => $value )
{
/// Look for form variables
if( preg_match("/var_/",$option))
{
$varnm = preg_replace("/var_/","",$option);
// Check for subtype field
if( preg_match("/-(.*)/",$varnm,$subtype) )
{
echo "<br>subtype = $subtype[1] <br>";
$temp = $varnm;
$varnm = preg_replace("/-.*/","",$temp);
// Is this is a text field?
if( preg_match("/([^-]*)-txt/",$subtype[1], $subtype2) )
{
if (!get_magic_quotes_gpc()) {
$textarea = addslashes($value);
} else {
$textarea = $value;
}
if( $row_Recordset1['numrecs'] == 0 )
echo "There are no new IPN records to import! ";
else
{
$insert_set = "INSERT INTO `financial` (`date`,`num`,`name`,`descr`,`amount`) VALUES ('$curdate','','PayPal IPN','Auto-Reconcile','$row_Recordset1[ipn_total]')";
$rval = mysql_query($insert_set, $ipnppd) or die(mysql_error());
if($rval)
echo "<b>$row_Recordset1[numrecs]</b> IPN records have been imported for a total of $" . sprintf("%0.2f", $row_Recordset1[ipn_total]);
else
echo "<b> ERROR : There are $row_Recordset1[numrecs] to import, but there was an<br>"
."error encoutered during db record insertion into Financial table. Insertion<br>"
."FAILED";
}
Joined: Mar 11, 2007 Posts: 769 Location: North Carolina
Posted:
Wed Oct 07, 2009 1:17 pm
Try this....
Code:
<?php
/************************************************************************/
/* NukeTreasury - Financial management for PHP-Nuke */
/* Copyright (c) 2004 by Dave Lawrence AKA Thrash */
/*
Only registered users can see links on this board! Get registered or login to the forums!
*/
/*
Only registered users can see links on this board! Get registered or login to the forums!
*/
/* */
/* This program is free software; you can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* */
/* This program is distributed in the hope that it will be useful, but */
/* WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
/* General Public License for more details. */
/* */
/* You should have received a copy of the GNU General Public License */
/* along with this program; if not, write to the Free Software */
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 */
/* USA */
/* Upgraded and cleaned up by Telli http://codezwiz.com */
/************************************************************************/
if (!defined('ADMIN_FILE')) die ('Access Denied');
global $prefix, $db, $admin_file;
$result = $db->sql_query("select radminsuper from ".$prefix."_authors where aid='$aid'");
list($radminsuper) = $db->sql_fetchrow($result);
function Treasury()
{
global $admin, $bgcolor2, $prefix, $db, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
if( !$ipnppd )
{
echo "<br /><br />NukeTreasury FATAL ERROR: Unable to connect to SQL database. Please check your settings in modules/Donations/config.inc.php<br /><br />";
return;
}
// Collect IPN reconcile data
// First, get the date of the last time we reconciled
$query_Recordset2 = 'SELECT `date` as recdate'
. ' FROM financial'
. ' WHERE name = \'PayPal IPN\''
. ' ORDER BY date DESC '
. ' LIMIT 1 ';
$Recordset2 = mysql_query($query_Recordset2, $ipnppd) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$recdate = $row_Recordset2[recdate];
// Get the date of the last donation
$query_Recordset2 = 'SELECT `payment_date` as curdate'
. ' FROM transactions'
. ' WHERE payment_status = \'Completed\' AND ( transactions.txn_type = \'send_money\' OR transactions.txn_type = \'web_accept\' )'
. ' ORDER BY payment_date DESC '
. ' LIMIT 1 ';
$Recordset2 = mysql_query($query_Recordset2, $ipnppd) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$curdate = $row_Recordset2[curdate];
// Collect the IPN transactions between recdate and curdate
$query_Recordset2 = 'SELECT custom, SUM( mc_gross ) AS gross, SUM( mc_gross - mc_fee ) AS net'
. ' FROM transactions '
. ' WHERE ( payment_Date > \'' . $recdate . '\' AND payment_date <= \'' . $curdate . '\' ) '
. ' GROUP BY txn_id ';
$Recordset2 = mysql_query($query_Recordset2, $ipnppd) or die(mysql_error());
// Iterate over the records skipping the ones that total out to zero(refunds)
$ipn_tot = 0;
$num_ipn = 0;
while( $row_Recordset2 = mysql_fetch_assoc($Recordset2) )
{
if( $row_Recordset2[gross] > 0 )
{
$ipn_tot += $row_Recordset2[net];
$num_ipn++;
}
}
// Get the register balance
$query_Recordset4 = "SELECT SUM(amount) as total FROM financial";
$Recordset4 = mysql_query($query_Recordset4, $ipnppd) or die(mysql_error());
$row_Recordset4 = mysql_fetch_assoc($Recordset4);
$total = $row_Recordset4[total];
echo "<tr><td width=\"100%\">";
echo "Number of new IPN records: $num_ipn - Totaling \$$ipn_tot";
echo "</td></tr>";
echo "<tr><td width=\"100%\">";
echo "<form action=\"admin.php?op=IpnRec#AdminTop\" method=\"post\">";
echo "<input type=\"hidden\" name=\"op\" value=\"IpnRec\">"
."<input type=\"submit\" value=\"PayPal IPN reconcile\" onClick=\"return confirm('This action will total up all recent PayPal IPN" . '\n' . "transactions and post them here in the register." . '\n\n' . "Are you sure you want to do this now?')\">"
."</form>";
echo "</td></tr></table>";
."return false;\">"
."<img border=\"0\" width=\"12\" height=\"13\" src=\"images/admin/treasury_edit.png\"></a> "
."<a href=\"admin.php?op=FinRegDel&id=$row_Recordset1[id]\">"
."<img border=\"0\" width=\"12\" height=\"13\" src=\"images/admin/treasury_drop.png\" onClick=\"return confirm('Are you sure you want to delete this record?" . '\n\n' . "Are you sure you want to do this now?')\""
."></a></td>"
function FinancialRegAdd()
{
global $admin, $bgcolor2, $prefix, $db, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());
function FinancialRegDel()
{
global $admin, $bgcolor2, $prefix, $db, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());
function FinancialRegEdit()
{
global $admin, $bgcolor2, $prefix, $db, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
$ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());
function Config()
{
global $admin, $bgcolor2, $prefix, $db, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
?>
<script Language="JavaScript">
function isEmailAddr(email)
{
var result = false;
var theStr = new String(email);
var index = theStr.indexOf("@");
if (index > 0)
{
var pindex = theStr.indexOf(".",index);
if ((pindex > index+1) && (theStr.length > pindex+1))
result = true;
}
return result;
}
function validRequired(formField,fieldLabel)
{
var result = true;
if (formField.value == "")
{
alert('Please enter a value for the "' + fieldLabel +'" field.');
formField.focus();
result = false;
}
return result;
}
function allDigits(str)
{
return inValidCharSet(str,"0123456789");
}
function inValidCharSet(str,charset)
{
var result = true;
// Note: doesn't use regular expressions to avoid early Mac browser bugs
for (var i=0;i<str.length;i++)
if (charset.indexOf(str.substr(i,1))<0)
{
result = false;
break;
}
return result;
}
function validInt(formField,fieldLabel,required)
{
var result = true;
if (required && !validRequired(formField,fieldLabel))
result = false;
if (result)
{
// var num = parseInt(formField.value,10);
if (!allDigits(formField.value))
{
if(required)
{
alert('Please enter a number for the "' + fieldLabel +'" field.');
formField.focus();
result = false;
}
else if ( formField.value == "" )
{
return true;
}
else
{
alert('Please enter a number or a blank for the "' + fieldLabel +'" field.');
formField.focus();
result = false;
}
}
}
return result;
}
function validdateURL(formField, value, secure)
{
var match = /https/i.test(value);
if( value != "" && !/^http/i.test(value) )
{
alert('The URL must start with http://');
formField.focus();
return false;
}
if( secure && value != "" && !/^https/i.test(value) )
{
// alert('This should reside on a HTTPS server. Users will be warned about viewing secure and non-secure data on the same page');
return confirm('This URL does not begin with https://\nThis image should reside on an HTTPS server.\nIf you use this URL, users will receive a warning\nabout viewing secure and non-secure data on the same page.\n\n Are you sure you want to continue?');
}
return true;
}
function checkCancelledURL()
{
if( document.tr_configs.var_pp_image_url.value == "")
alert('There is no URL for a Cancelled payment. If you do not enter\na URL for cancelled payments PayPal will also use\nthis URL for cancelled payments.');
return true;
}
</script>
<?php
ShowTextBox("ipn_log_entries", "<b>Keep this many log entries</b>", "", "4", "");
global $nukeurl;
$desc = 'http://www.iforclan.net/Donation-stats/html/modules/Donations/ipn/ipnppd.php';
$desc = htmlentities($desc);
echo "<tr>"
."<td title =\"$desc\" bgcolor=\"$bgcolor2\" align=\"right\"><b>IPN link for PayPal</b></td>"
."<td title =\"$desc\" align=\"left\">
<a href=\"$nukeurl/modules/Donations/ipn/ipnppd.php?dbg=1\" target=\"_blank\"><b><i>Click here to test IPN</i></b></a></td>"
. "</td></tr>";
echo "</table><br />";
function UpdateDb($db,$nm, $sub, $val, $txt)
{
global $ilog;
$insert_Recordset = "UPDATE `config` SET `value`='$val', `text`='$txt' WHERE `name`='$nm' AND `subtype`='$sub'";
$ilog .= "$insert_Recordset<br /><br />";
echo "$insert_Recordset<br /><br /><font color=\"#FF0000\"><b>";
$rvalue = mysql_query($insert_Recordset, $db) or die(mysql_error());
echo "</b></font>";
}
function UpdateDbShort($db,$nm, $sub, $val, $txt)
{
global $ilog;
$insert_Recordset = "UPDATE `config` SET `value`='$val' WHERE `name`='$nm' AND `subtype`='$sub'";
function ConfigUpdate()
{
global $admin, $bgcolor2, $prefix, $db, $currentlang, $multilingual;
include ("header.php");
include("http://www.iforclan.net/Donation-stats/html/modules/Donations/config.inc.php");
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>Treasury Configuration Error</b></font></center>";
echo "<br /><font color=\"#0000FF\"><b>If you see this screen then an SQL error was encountered</b></br>"
. "You shoud see a message in <font color=\"#FF0000\">RED</font> below indicating what the error is</font><br /><br />";
CloseTable();
// echo "<br />";
OpenTable();
$ERR = 1;
$ilog="";
$ilog .= "<br />";
foreach( $_POST as $option => $value )
{
/// Look for form variables
if( preg_match("/var_/",$option))
{
$varnm = preg_replace("/var_/","",$option);
// Check for subtype field
if( preg_match("/-(.*)/",$varnm,$subtype) )
{
echo "<br />subtype = $subtype[1] <br />";
$temp = $varnm;
$varnm = preg_replace("/-.*/","",$temp);
// Is this is a text field?
if( preg_match("/([^-]*)-txt/",$subtype[1], $subtype2) )
{
if (!get_magic_quotes_gpc()) {
$textarea = addslashes($value);
} else {
$textarea = $value;
}
if( $row_Recordset1['numrecs'] == 0 )
echo "There are no new IPN records to import! ";
else
{
$insert_set = "INSERT INTO `financial` (`date`,`num`,`name`,`descr`,`amount`) VALUES ('$curdate','','PayPal IPN','Auto-Reconcile','$row_Recordset1[ipn_total]')";
$rval = mysql_query($insert_set, $ipnppd) or die(mysql_error());
if($rval)
echo "<b>$row_Recordset1[numrecs]</b> IPN records have been imported for a total of $" . sprintf("%0.2f", $row_Recordset1[ipn_total]);
else
echo "<b> ERROR : There are $row_Recordset1[numrecs] to import, but there was an<br />"
."error encoutered during db record insertion into Financial table. Insertion<br />"
."FAILED";
}
From looking at the site it does not appear to be a php nuke site akrantz are you trying to put in a php nuke modules on a html site? If so that is why you are having so much trouble with the Donations setup.
If you would like some help on setting up a nuke site for you and your clan I have done many of them for others. I will be more than willing to help do this for you I got work tomorrow but when I get home about 6 pm EST I will help you setup a nuke site with every thing you will need for you and your clan
yeah thats right im trying to setup a php module on a html site....
But should that really be a problem? I mean i use php for all our "forms" example;
Only registered users can see links on this board! Get registered or login to the forums!
Where the php works on processing the form and sends the email. This works really good (and is html and php combined).
When i downloaded nuketreasury my thought was to integrate it with the site, since the donatometer and donations.html are both written in html.
Basically what I done is that i have:
1. Unzipped the file and uploaded it to my server (the provider supports php nuke).
2. Changed the file name from NukeTreasury -> Donation-stats (easier for me to find it in the main catalog.
3. Therefore the dir for the files ->
Only registered users can see links on this board! Get registered or login to the forums!
name)/etc/etc/
4. In the php documents i have changed the original ref. from: (//modules/Donations/Donatometer.html to
Only registered users can see links on this board! Get registered or login to the forums!
(since that is where its actually located).
5. I still wonder if it´s something in one of the php files that is not correct refered, since it does not seem to collect the information from the db and displays $DM_GOAL etc instead of the value in the database.
I can agree this is totally FUBAR...
Yeah Unit1 everyone keeps telling me that we should switch completly and use php nuke! Two things is stopping me from do that right now:
1. Im so stubborn and as soon as i encounter a problem - i just simply wont to solve it (maybe sometimes i simply should know when to stop trying).
2. The real truth is that I dont know much at all about php scripting!!!Thats the real issue. I don´t understand the language. Ill give you a example! I downloaded php nuke 8.0 (I think it was 8.0) and uploaded it to the server (see;
Only registered users can see links on this board! Get registered or login to the forums!
Now i dont even know how to edit the darn thing....lol! you see my problem wiht getting a nuke site i wouldnt even know where to start....
Akrantz,
That is not going to work. The reason it is not working is becasue you are missing the database layer that comes with Nuke along with a bunch of other stuff.
My recommandation.
Delete 8.0 (Bad Idea)
Hire Unit1 to set you up with RN.
Once your site is up and running you can take it one step at a time. PHP and RN are really fun once you get the hang of it.
The reason im asking is because your saying "That is not going to work. The reason it is not working is becasue you are missing the database layer that comes with Nuke along with a bunch of other stuff." I just wanna be sure, cause then there is no idea for me to keep on trying...
If thats the case, well then i might consider switching to php instead.
Nuke Treasury requires some specific functions to work and those functions would be missing if you are not using phpNuke or some derivative of phpNuke.
Think of it as putting an jet engine in a car. The mounting brackets won't line up, it's the wrong sort of fuel, the wires are too short..........
It will not work without Nuke of some flavor. If you are going to use Nuke....You really should use RN. (If you do not want to get hacked)
To give you another example....
You are sitting a Light Bulb in the middle of the floor and expecting it to work without it being hooked up to the wireing in the house.....That's not going to work.
Joined: Aug 29, 2004 Posts: 8625 Location: Arizona
Posted:
Thu Oct 08, 2009 6:15 am
akrantz, hence the name NukeTreasury. Since PayPal has been around for a very long time, there has got to be just a ton of free PHP scripts out there that are more standalone. Yes, you could re-write NukeTreasury if you have the proper skillsets but you might find something else much closer to what you are after I suspect.
Joined: Dec 19, 2004 Posts: 2879 Location: Germany:Moderator German NukeSentinel Support
Posted:
Thu Oct 08, 2009 12:36 pm
I do have the same problem like you and I miss an image. However, I use RavenNuke and Nuke Treasury but I think it´s not really a problem if it doesn`t show all in donatometer.html because everything works like it should with this url: modules.php? name=Donations
Joined: Dec 19, 2004 Posts: 2879 Location: Germany:Moderator German NukeSentinel Support
Posted:
Thu Oct 08, 2009 12:58 pm
I use it in RavenNuke but I have checked the urls you posted above at my site and found out that I have the same issue but it works.
There are different donation scripts available maybe you will find an other one.
If you change your site just use RavenNuke.
akrantz my offer still stands I will setup the full nuke site for you and do any of the edits that will be needed
Sorry to all here but my sites are not a RN setup's. I have had my sites and the other ones that I am the webmaster at for a very long time with no problems at all with them because of a lot of time spent reading here and also on some of the other team members sites and implementing a lot of the security fixes to the site. I do understand that RN is one of the best nuke set up's out today but I am an old dog and tend to stay with what I know best in my old age
akrantz my time and support for the setup and code changes for the site would be free It will take a bit of time to do all the edits and some updating to the setup. But I would ask that if you want me to do this for you that when it is done and you are happy with the setup that if you can make a Donation to Ravens site as you can see they all here are great people and help so many others with their problems like they have done for me so many times in the past.
Or maybe if you want RN I am sure someone can help you or point you to someone with more experience with RN setup than I do. IMO if I was just starting out with a nuke setup I would go with the RN setup it is more up to date and you cannot beat the support that you will get here for a nuke setup
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum