Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Announcements
Author Message
scott11
New Member
New Member


Joined: Jun 03, 2005
Posts: 23

PostPosted: Wed Jun 08, 2005 10:47 pm Reply with quote

Two files in the separate database (away from Nuke)1.config.inc and 2. config.php..... ewwwwwww I screwed up

Thank You Raven
 
View user's profile Send private message
scott11
PostPosted: Wed Jun 08, 2005 11:59 pm Reply with quote

Got it and it works like a charm RavensScripts

Nearly busted a nut trying to figure out what I did wrong AGAIN. Copy the copfig.inc and rename to config.ph Give 30 minutes to cry this one out Bang Head Crying or Very sad
 
tercius
New Member
New Member


Joined: Aug 24, 2005
Posts: 9

PostPosted: Wed Aug 24, 2005 1:27 pm Reply with quote

How do i sort this error out on Nuke Treasury 1.0

I have enabled what i should have but it seems like i get this all the time, what am i doing wrong?


Code:
Treasury Configuration Error


If you see this screen then an SQL error was encountered
You shoud see a message in RED below indicating what the error is

 
 
swing_day => 6
UPDATE `config` SET `value`='6' WHERE `name`='swing_day' AND `subtype`=''

dm_title => HELP KEEP OUR SERVERS ONLINE!
UPDATE `config` SET `value`='HELP KEEP OUR SERVERS ONLINE!' WHERE `name`='dm_title' AND `subtype`=''

dm_num_don => 10
UPDATE `config` SET `value`='10' WHERE `name`='dm_num_don' AND `subtype`=''

dm_show_date => 1
UPDATE `config` SET `value`='1' WHERE `name`='dm_show_date' AND `subtype`=''

dm_show_amt => 1
UPDATE `config` SET `value`='1' WHERE `name`='dm_show_amt' AND `subtype`=''

dm_button => https://www.paypal.com/en_US/i/btn/x-click-but21.gif
UPDATE `config` SET `value`='https://www.paypal.com/en_US/i/btn/x-click-but21.gif' WHERE `name`='dm_button' AND `subtype`=''

dm_img_width =>
UPDATE `config` SET `value`='' WHERE `name`='dm_img_width' AND `subtype`=''

dm_img_height =>
UPDATE `config` SET `value`='' WHERE `name`='dm_img_height' AND `subtype`=''


subtype = Jan
goal Jan => 160
UPDATE `config` SET `value`='160' WHERE `name`='goal' AND `subtype`='Jan'


subtype = Feb
goal Feb => 110
UPDATE `config` SET `value`='110' WHERE `name`='goal' AND `subtype`='Feb'


subtype = Mar
goal Mar => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Mar'


subtype = Apr
goal Apr => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Apr'


subtype = May
goal May => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='May'


subtype = Jun
goal Jun => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Jun'


subtype = Jul
goal Jul => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Jul'


subtype = Aug
goal Aug => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Aug'


subtype = Sep
goal Sep => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Sep'


subtype = Oct
goal Oct => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Oct'


subtype = Nov
goal Nov => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Nov'


subtype = Dec
goal Dec => 100
UPDATE `config` SET `value`='100' WHERE `name`='goal' AND `subtype`='Dec'

don_button_top => https://www.paypal.com/en_US/i/btn/x-click-but21.gif
UPDATE `config` SET `value`='https://www.paypal.com/en_US/i/btn/x-click-but21.gif' WHERE `name`='don_button_top' AND `subtype`=''

don_top_img_width =>
UPDATE `config` SET `value`='' WHERE `name`='don_top_img_width' AND `subtype`=''

don_top_img_height =>
UPDATE `config` SET `value`='' WHERE `name`='don_top_img_height' AND `subtype`=''

don_button_submit => https://www.paypal.com/en_US/i/btn/x-click-but04.gif
UPDATE `config` SET `value`='https://www.paypal.com/en_US/i/btn/x-click-but04.gif' WHERE `name`='don_button_submit' AND `subtype`=''

don_sub_img_width =>
UPDATE `config` SET `value`='' WHERE `name`='don_sub_img_width' AND `subtype`=''

don_sub_img_height =>
UPDATE `config` SET `value`='' WHERE `name`='don_sub_img_height' AND `subtype`=''

don_name_prompt => Do you want your username revealed with your donation?
UPDATE `config` SET `value`='Do you want your username revealed with your donation?' WHERE `name`='don_name_prompt' AND `subtype`=''

don_name_yes => Yes! - Tell the world I gave my hard-earned cash!
UPDATE `config` SET `value`='Yes! - Tell the world I gave my hard-earned cash!' WHERE `name`='don_name_yes' AND `subtype`=''

don_name_no => No - List my donation as Anonymous
UPDATE `config` SET `value`='No - List my donation as Anonymous' WHERE `name`='don_name_no' AND `subtype`=''

don_show_date => 1
UPDATE `config` SET `value`='1' WHERE `name`='don_show_date' AND `subtype`=''

don_show_amt => 1
UPDATE `config` SET `value`='1' WHERE `name`='don_show_amt' AND `subtype`=''


subtype = rawtext-txt
don_text rawtext text=> We are a non-profit organization completely supported by you, the members. Many organizations have web sites, servers and Internet bandwidth donated by it''s members. We pride ourselves on being run and owned as a community, and not by a few power-hungry members. This means that we need you to be a part of that community. We encourage every member to contribute to the community in any way that they can. Since we do not have our servers or bandwidth donated, we have pay our bills every month to keep things going. For those of you who can, we ask that you make a monetary contribution in whatever denomination you''d like. Every little bit counts.<br>
UPDATE `config` SET `value`='0', `text`='We are a non-profit organization completely supported by you, the members. Many organizations have web sites, servers and Internet bandwidth donated by it''s members. We pride ourselves on being run and owned as a community, and not by a few power-hungry members. This means that we need you to be a part of that community. We encourage every member to contribute to the community in any way that they can. Since we do not have our servers or bandwidth donated, we have pay our bills every month to keep things going. For those of you who can, we ask that you make a monetary contribution in whatever denomination you''d like. Every little bit counts.
' WHERE `name`='don_text' AND `subtype`='rawtext'

don_amt_checked => 1
UPDATE `config` SET `value`='1' WHERE `name`='don_amt_checked' AND `subtype`=''


subtype = 1
don_amount 1 => 10
UPDATE `config` SET `value`='10' WHERE `name`='don_amount' AND `subtype`='1'


subtype = 2
don_amount 2 => 15
UPDATE `config` SET `value`='15' WHERE `name`='don_amount' AND `subtype`='2'


subtype = 3
don_amount 3 => 20
UPDATE `config` SET `value`='20' WHERE `name`='don_amount' AND `subtype`='3'


subtype = 4
don_amount 4 => 30
UPDATE `config` SET `value`='30' WHERE `name`='don_amount' AND `subtype`='4'


subtype = 5
don_amount 5 =>
UPDATE `config` SET `value`='' WHERE `name`='don_amount' AND `subtype`='5'


subtype = 6
don_amount 6 => 0
UPDATE `config` SET `value`='0' WHERE `name`='don_amount' AND `subtype`='6'


subtype = 8
don_amount 8 => 0
UPDATE `config` SET `value`='0' WHERE `name`='don_amount' AND `subtype`='8'

receiver_email => Only registered users can see links on this board! Get registered or login!
UPDATE `config` SET `value`='eed@hddd.com' WHERE `name`='receiver_email' AND `subtype`=''

ty_url =>
UPDATE `config` SET `value`='' WHERE `name`='ty_url' AND `subtype`=''

pp_cancel_url =>
UPDATE `config` SET `value`='' WHERE `name`='pp_cancel_url' AND `subtype`=''

pp_itemname => Donation
UPDATE `config` SET `value`='Donation' WHERE `name`='pp_itemname' AND `subtype`=''

pp_item_num => 110
UPDATE `config` SET `value`='110' WHERE `name`='pp_item_num' AND `subtype`=''

pp_image_url =>
UPDATE `config` SET `value`='' WHERE `name`='pp_image_url' AND `subtype`=''

pp_get_addr => 0
UPDATE `config` SET `value`='0' WHERE `name`='pp_get_addr' AND `subtype`=''

ipn_dbg_lvl => 2
UPDATE `config` SET `value`='2' WHERE `name`='ipn_dbg_lvl' AND `subtype`=''

ipn_log_entries => 20
UPDATE `config` SET `value`='20' WHERE `name`='ipn_log_entries' AND `subtype`=''

 
 
 
 


Last edited by tercius on Wed Aug 24, 2005 2:19 pm; edited 2 times in total 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Wed Aug 24, 2005 1:29 pm Reply with quote

What is that that you posted?

What is the error you are receiving?
 
View user's profile Send private message
tercius
PostPosted: Wed Aug 24, 2005 2:07 pm Reply with quote

thats when i set up in the admin panel for Treasury and configure in the PayPal Configuration
 
Raven
PostPosted: Wed Aug 24, 2005 2:15 pm Reply with quote

But what is the error?
 
tercius
PostPosted: Wed Aug 24, 2005 2:17 pm Reply with quote

It says look for it but nothing is in red but it shows that....

Can u get me on msn Only registered users can see links on this board! Get registered or login!


So i can find the red error cos there is none
 
MarkyBear
Hangin' Around


Joined: Mar 27, 2005
Posts: 39

PostPosted: Thu Sep 22, 2005 2:18 am Reply with quote

kguske wrote:
Or, you use this Only registered users can see links on this board! Get registered or login! to make it part of your treasury admin function.


Where is this tweak?

This link here just takes me 'round and 'round!

I have 1.1, set it up right, placed the: Only registered users can see links on this board! Get registered or login! links in the config and paypal account.

It tesed fine with no errors, a payment went through but nothing registeres in the database or on the block!

I don't expect to get too many donations, so if I can have the tweak to manuelly enter them in, that would be of great help, thanks!
 
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Thu Sep 22, 2005 5:19 am Reply with quote

It was accessible from Only registered users can see links on this board! Get registered or login!, but seems to no longer be available due to an issue with Google Tap.

Here are the contents:
Code:
/************************************************************************/ 

/* NukeTreasury - MOD / Tweak to allow transaction maintenance          */
/* Copyright (c) 2005 by Kevin Guske (kguske)                           */
/*                       Posted at RavenPHPScripts.com                  */
/*                       See license below                              */
/************************************************************************/
/* 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.                             */
/************************************************************************/

This tweak allows the maintenance of transactions table records in the Nuke Treasury database that appear, if configured to do so, in the Donat-o-meter block.  A simple "Transactions" link is added to the Admin Treasury page that displays the Transaction Transaction Register, which has the ability to add, change or delete transaction table records much in the same way the main Treasury admin page maintains financial table records.

If you find this useful (or otherwise feel charitable, appreciative and / or blessed), please consider contributing, even small amounts, to:

http://ravenphpscripts.com - for the best PHP-Nuke support

        and / or

http://www.google.com/tsunami_relief.html - for the survivors of one of the worst disasters in history

        and / or

http://nuketreasury.sourceforge.net/donate.html - to the creator of Nuke Treasury


Here are the changes:
------------------------------------------------------------------------------------------------------
In /admin/case/case.treasury.php, before (line 27 in the version 1.0 distribution):

   case "FinRegAdd":


insert:

   case "TransAdd":
   case "TransEdit":
   case "TransDel":
   case "TransList":


to get:


switch($op) {

   case "TransAdd":
   case "TransEdit":
   case "TransDel":
   case "TransList":
   case "FinRegAdd":
   case "FinRegEdit":
   case "FinRegDel":
   case "ConfigUpdate":
   case "Treasury":
   case "UpdateGoals":
   case "Config":
   case "IpnRec":
       include ("admin/modules/treasury.php");
       break;

}

------------------------------------------------------------------------------------------------------
In /admin/modules/treasury.php, there are 3 additions (see below).   

IMPORTANT:  These changes use a configuration parameter, $ntprefix, which was added to the /modules/Donations/config.php to allow database sharing and table prefixes.  If you use the table names defined with the standard Nuke Treasury 1.0 distribution, you can add this line to your /modules/Donations/config.php:

$ntprefix = "";

If you added a prefix to the standard database tables, add something like the following to your /modules/Donations/config.php, but change the parameter string to match your database prefix:

$ntprefix = "nuke_nt_";  // assumes Nuke Treasury tables have names like nuke_nt_financial, nuke_nt_transactions, and nuke_nt_config

-----------------------------------------------------
1. In function Treasury, after (line 128 in the version 1.0 distribution):

    echo "<form action=\"admin.php?op=Config#AdminTop\" method=\"post\">";


insert:

    // BEG MOD - Maintain Transactions
    echo "<a href=\"admin.php?op=TransList\">Transactions</a>&nbsp;";
    // END MOD - Maintain Transactions


-----------------------------------------------------
2. At the bottom, after (lines 924-926 in the version 1.0 distribution):

    case "IpnRec":
        IpnRec();
        break;


insert:


    // BEG MOD - Maintain Transactions
    case "TransAdd":
        TransAdd();
        break;
       
    case "TransEdit":
        TransEdit();
        break;
       
    case "TransDel":
        TransDel();
        break;
       
       case "TransList":
        TransList();
        break;
    // END MOD - Maintain Transactions


-----------------------------------------------------
3. At the bottom, before (line 898 in the version 1.0 distribution):

 Switch($op)

insert the following 4 functions (quite a bit of code, just copy to the bottom):

// BEG MOD - Maintain Transactions
function TransList()
{
   global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
   include ("header.php");
    include("modules/Donations/config.php");
    if( !$ipnppd )
    {
        echo "<br><br>NukeTreasury FATAL ERROR: Unable to connect to SQL database.  Please check your settings in modules/Donations/config.php<br><br>";
        return;
    }       
    $currentPage = $HTTP_SERVER_VARS["PHP_SELF"];
    // Register paging
    $maxRows_Recordset1 = 10;
    $pageNum_Recordset1 = 0;
    if (isset($_POST['pageNum_Recordset1'])) {
     $pageNum_Recordset1 = $_POST['pageNum_Recordset1'];
    }
    $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

    mysql_select_db($database_ipnppd, $ipnppd);
    $query_Recordset1 = "SELECT id, payment_date, DATE_FORMAT(payment_date, '%d-%b-%Y') as fdate, txn_id, custom as name, option_selection1 as showname, mc_gross as gross, mc_fee as fee FROM " . $prefix . "_nt_transactions order by payment_date DESC";

    $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
    $Recordset1 = mysql_query($query_limit_Recordset1, $ipnppd) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);

    if (isset($_POST['totalRows_Recordset1'])) {
     $totalRows_Recordset1 = $_POST['totalRows_Recordset1'];
    } else {
     $all_Recordset1 = mysql_query($query_Recordset1);
     $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
    }
    $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
    $queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d#AdminTop", $totalRows_Recordset1);

    // Output the page
    OpenTable();
    echo "<center><font class=\"option\"><b>Treasury Transaction Register</b></font></center><br>";

    echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
    echo "<tr><td width=\"100%\">";
    echo "<form action=\"admin.php?op=Config#AdminTop\" method=\"post\">";
    echo "<a href=\"admin.php?op=Treasury#AdminTop\">Treasury Admin</a>&nbsp;&nbsp;";
    echo "<a href=\"admin.php\">PHP-Nuke Admin</a>&nbsp;&nbsp;";
    echo "<a href=\"admin.php?op=TransList\">Transactions</a>&nbsp;";
    echo "<input type=\"hidden\" name=\"op\" value=\"Config\"><input type=\"submit\" value=\"Config\"></form>";
    echo "</td></tr></table>";

    $currentPage = "admin.php?op=Treasury";
    echo "<center><table border=\"0\"><tr>";
    if( $pageNum_Recordset1 > 0 )
    {
        echo '<td><form action="admin.php#AdminTop" method="post">'
          . '<input type="hidden" name="op" value="TransList">'
          . '<input type="hidden" name="pageNum_Recordset1" value="0">'
          . '<input type="hidden" name="totalRows_Recordset1" value="' . $totalRows_Recordset1 . '">'
          . '<input type="submit" name="navig" value="|&lt;" title="Current"></form></td>';
        echo '<td><form action="admin.php#AdminTop" method="post">'
          . '<input type="hidden" name="op" value="TransList">'
          . '<input type="hidden" name="pageNum_Recordset1" value="' . max(0, $pageNum_Recordset1 - 1) . '">'
          . '<input type="hidden" name="totalRows_Recordset1" value="' . $totalRows_Recordset1 . '">'
          . '<input type="submit" name="navig" value="&lt;" title="Next newest"></form></td>';
    }
    if( $pageNum_Recordset1 < $totalPages_Recordset1 )
    {
        echo '<td><form action="admin.php#AdminTop" method="post">'
          . '<input type="hidden" name="op" value="TransList">'
          . '<input type="hidden" name="pageNum_Recordset1" value="' . min($totalPages_Recordset1, $pageNum_Recordset1 + 1) . '">'
          . '<input type="hidden" name="totalRows_Recordset1" value="' . $totalRows_Recordset1 . '">'
          . '<input type="submit" name="navig" value="&gt;" title="Next Oldest"></form></td>';
        echo '<td><form action="admin.php#AdminTop" method="post">'
          . '<input type="hidden" name="op" value="TransList">'
          . '<input type="hidden" name="pageNum_Recordset1" value="' . $totalPages_Recordset1 . '">'
          . '<input type="hidden" name="totalRows_Recordset1" value="' . $totalRows_Recordset1 . '">'
          . '<input type="submit" name="navig" value="&gt;|" title="Oldest"></form></td>';
    }
    echo "</tr></table></center>";
   
    echo "<table border=\"1\" width=\"100%\" align=\"center\"><tr>"
    ."<td bgcolor=\"$bgcolor2\" align=\"center\" width=\"4\"><b>&nbsp;</b></td>"
    ."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>Date</b></td>"
    ."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>Transaction ID</b></td>"
    ."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>Name</b></td>"
    ."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>Show<br>name?</b></td>"
    ."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>Gross</b></td>"
    ."<td bgcolor=\"$bgcolor2\" align=\"center\"><b>Fee</b></td></tr><tr>";
    echo ""
    ."<form action=\"admin.php\" method=\"post\" name=\"txnedit\"><td>"
    ."<input name=\"\" type=\"reset\" value=\"Reset\" onclick=\""
    ."document.txnedit.Submit.value = 'Add'; "
    ."document.txnedit.op.value = 'TransAdd'; "
    ."return true;\"><br>"
    ."<input type=\"hidden\" name=\"op\" value=\"TransAdd\"><input name=\"Submit\" type=\"submit\" value=\"Add\"></td>"
       ."<td align=\"left\" width=\"8\"><input name=\"id\" type=\"hidden\">"
       ."<input name=\"Date\" type=\"text\" size=\"11\" maxlength=\"11\"></td>"
       ."<td align=\"left\"><input name=\"TxnID\" type=\"text\" size=\"21\" maxlength=\"20\"></td>"
       ."<td align=\"left\"><input name=\"Name\" type=\"text\" size=\"21\" maxlength=\"20\"></td>"
       ."<td align=\"left\"><input name=\"ShowName\" type=\"text\" size=\"4\" maxlength=\"3\"></td>"
       ."<td align=\"right\"><input name=\"Gross\" type=\"text\" size=\"8\" style=\"text-align: right\"></td>"
       ."<td align=\"right\"><input name=\"Fee\" type=\"text\" size=\"8\" style=\"text-align: right\"></td></tr>";
    echo "</form></tr></tr>";

    $row=0;
do {
    $row += 1;
    echo "<tr>"
       ."<td align=\"center\">"
         ."<A HREF=\"javascript: void 0\" onclick=\""
           ."document.txnedit.id.value = '$row_Recordset1[id]'; "
           ."document.txnedit.Date.value = '$row_Recordset1[fdate]'; "
           ."document.txnedit.TxnID.value = '$row_Recordset1[txn_id]'; "
           ."document.txnedit.Name.value = '$row_Recordset1[name]'; "
            ."document.txnedit.ShowName.value = '$row_Recordset1[showname]'; "
            ."document.txnedit.Gross.value = '$row_Recordset1[gross]'; "
            ."document.txnedit.Fee.value = '$row_Recordset1[fee]'; "
            ."document.txnedit.Submit.value = 'Modify'; "
            ."document.txnedit.op.value = 'TransEdit'; "
           
         ."return false;\">"
         ."<img border=\"0\" width=\"12\" height=\"13\" src=\"images/admin/treasury_edit.png\"></a>&nbsp;"
        ."<a href=\"admin.php?op=TransDel&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>"

        ."<td align=\"left\">$row_Recordset1[fdate]</td>"
       ."<td align=\"left\" width=\"8\">$row_Recordset1[txn_id]</td>"
       ."<td align=\"left\">$row_Recordset1[name]</td>"
       ."<td align=\"left\">$row_Recordset1[showname]</td>"
       ."<td align=\"right\"><font ";
        $amt =  sprintf("%10.2f",$row_Recordset1[gross]);
        if( $amt < 0 )
            echo "color=\"#FF0000\"";
        echo ">\$$amt</font></td>";
       echo "<td align=\"right\"><font ";
        $amt =  sprintf("%10.2f",$row_Recordset1[fee]);
        if( $amt < 0 )
            echo "color=\"#FF0000\"";
        echo ">\$$amt</font></td></tr>";
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));

   echo "</table>";

   CloseTable();
   echo "<br>";

   include("footer.php");
    mysql_free_result($Recordset1);

}

function TransAdd()
{
   global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
   include ("header.php");
    include("modules/Donations/config.php");
    $PP_RECEIVER_EMAIL = $tr_config['receiver_email'];
    $PP_ITEMNAME = $tr_config['pp_itemname'];

    $ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());

   OpenTable();
   echo "<center><font class=\"title\"><b>Treasury Transaction Record Add</b></font></center>";
   CloseTable();
   echo "<br>";
   OpenTable();

    $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('0' .$_POST[Gross]))
        echo "Invalid Gross Amount field<br>";
    else
    if( !is_numeric('0' .$_POST[Fee]))
        echo "Invalid Fee Amount field<br>";
    else
    {
        echo "Fields passed validation!<br>";
        mysql_select_db($database_ipnppd, $ipnppd);
        $insert_Recordset = "INSERT INTO  `" . $prefix . "_nt_transactions` "
                             ."(`id`,`business`,`txn_id`,`item_name`, `quantity`, `custom`, `option_name1`, `option_selection1`, `payment_status`, `payment_date`, `txn_type`, `mc_gross`, `mc_fee`, `mc_currency`)"
                             ."VALUES "
                            ."(NULL, '$PP_RECEIVER_EMAIL','" . $_POST[TxnID] . "', '$PP_ITEMNAME', '1','" . $_POST[Name] ."', 'Reveal Name?','" . $_POST[ShowName] . "', 'Completed', '" . strftime("%Y-%m-%d", $nTime) . "', 'web_accept', '" . $_POST[Gross] . "', '" . $_POST[Fee] . "', 'USD')";
        $rvalue = mysql_query($insert_Recordset, $ipnppd) or die(mysql_error());
        CloseTable();
        Header("Location: admin.php?op=TransList");
    }
}   


function TransDel()
{
   global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
   include ("header.php");
    include("modules/Donations/config.php");

    $ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());

   OpenTable();
   echo "<center><font class=\"title\"><b>Treasury Transaction Record Delete</b></font></center>";

    mysql_select_db($database_ipnppd, $ipnppd);

    if( !(is_numeric($_GET[id]) && $_GET[id]>0))
    {
        echo "<br>Invalid record id specified, operation aborted<br>";
    } else
    {
        $del_Recordset = "DELETE FROM `" . $prefix . "_nt_transactions` WHERE `id`='$_GET[id]' LIMIT 1";
        $rvalue = mysql_query($del_Recordset, $ipnppd) or die(mysql_error());

        CloseTable();
        Header("Location: admin.php?op=TransList");
    }
}


function TransEdit()
{
   global $admin, $bgcolor2, $prefix, $dbi, $currentlang, $multilingual;
   include ("header.php");
    include("modules/Donations/config.php");

    $ipnppd = mysql_pconnect($hostname_ipnppd, $username_ipnppd, $password_ipnppd) or die(mysql_error());

   OpenTable();
   echo "<center><font class=\"title\"><b>Treasury Transaction Record Edit</b></font></center>";
   CloseTable();
   echo "<br>";
   OpenTable();

    $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('0' .$_POST[Gross]))
        echo "Invalid Gross Amount field<br>";
    else
    if( !is_numeric('0' .$_POST[Fee]))
        echo "Invalid Fee Amount field<br>";
    else
    {
        echo "Field passed validation!<br>";
        mysql_select_db($database_ipnppd, $ipnppd);
        $insert_Recordset = "UPDATE `" . $prefix . "_nt_transactions` SET payment_date='". strftime("%Y-%m-%d", $nTime) . "', custom='$_POST[Name]', txn_id='$_POST[TxnID]', "
                            ."option_selection1='$_POST[ShowName]', mc_gross='$_POST[Gross]', mc_fee='$_POST[Fee]' WHERE id='$_POST[id]' LIMIT 1";
        $rvalue = mysql_query($insert_Recordset, $ipnppd) or die(mysql_error());
        CloseTable();
        Header("Location: admin.php?op=TransList");
    }
}   
// END MOD - Maintain Transactions

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
Raven
PostPosted: Thu Sep 22, 2005 6:45 am Reply with quote

What should that link have read? GT's beginning to really tick me off Mad
 
kguske
PostPosted: Thu Sep 22, 2005 11:16 am Reply with quote

I think the link (http://www.ravenphpscripts.com/public/nt.html) was correct, just not how GT converted it.
 
Raven
PostPosted: Thu Sep 22, 2005 1:12 pm Reply with quote

I fixed it buy changing the extension from html to htm. I have not the foggiest where/why this is happening.
 
kguske
PostPosted: Thu Sep 22, 2005 1:29 pm Reply with quote

Well, that's pretty scary...but not a big deal in the grand scheme. Wink
 
Raven
PostPosted: Thu Sep 22, 2005 1:30 pm Reply with quote

I just don't have the time right now to go on a treasure hunt ROTFL
 
MarkyBear
PostPosted: Fri Sep 23, 2005 11:08 am Reply with quote

Thanks kguske!!!

And as always, thanks raven for this site and all the help it gives!!!

RavensScripts
 
MarkyBear
PostPosted: Fri Sep 23, 2005 5:32 pm Reply with quote

Ok, I had to do some editing with this to get it to work with my version of 1.1 for some reason and I did indeed get it to work...

But I have one problem, it keeps showing "Anonymous" on the block as the donater...

What do I enter into the; 'Transaction ID' and 'Show name?' fields?

Thanks again in advance for your time and help!
 
Raven
PostPosted: Fri Sep 23, 2005 6:03 pm Reply with quote

If the donator is not logged in when they make a donation, it will show anonymous.
 
MarkyBear
PostPosted: Fri Sep 23, 2005 6:23 pm Reply with quote

Raven wrote:
If the donator is not logged in when they make a donation, it will show anonymous.


Ahh, Ok, I get it! LOL

Was wondering if maybe I just needed more coffee!

So for 'Transaction ID' I put 110

and for 'Show name?' I put 'yes' or their User ID?

EDIT: Ok, I just tried entering a donation, while I was signed on under my test account, I used that name but it still showed up as 'anonymous'

One more thing too (sorry), I had the CZDB mod installed and it's always worked fine for me, but once I installed the treasury, it started acting up and I get the following error:

Code:
PHP Warning:  mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxxxx/xxxxxxx/public_html/includes/sql_layer.php on line 286


Line 286 reads:

$row = mysql_fetch_row($res);




and

Code:
PHP Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /xxxxx/xxxxxxxxx/public_html/admin/modules/backup.php on line 255


Line 255 Reads:

for ($i = 0; $i < mysql_num_rows($tables); $i++) {

 
Doulos
Life Cycles Becoming CPU Cycles


Joined: Jun 06, 2005
Posts: 633

PostPosted: Sun Nov 27, 2005 1:10 am Reply with quote

I hate to do this since it has been mentioned so many times. But I still can't make head nor tails of it.

* Nuke Treasury 1.1 installed easy.
* Configured it as instructed.
* Tested the ipn link -- everything OK.
* Receiving payments, getting conformation emails, money is in account.

* I check and double checked to ipn link and paypal email account and all is correct.

The problem is that I want to add donations that were made without going through the paypal block (i.e. cash) so they will be added to the database. When I enter them in and hit the "add" button, they show up in the list.... but what do I do to get them to show up in the stats part of the block? I tried hitting the "paypal ipn reconcile" button but that returns this: "There are no new IPN records to import!".

My head hurts from banging it on the top of my desk over this issue.

Any ideas?

Edit: I have heard folks talking about "editing the database" but I don't know how to do this.
 
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9456
Location: Arizona

PostPosted: Sun Nov 27, 2005 8:24 am Reply with quote

Ezekiel, Unfortunately, the "Add" you are referring to only enters additional transactions into the same table that has your IPN data from pay-pal. It is your financial "register" and is not connected with the treasury block. Unless someone has written an add-on admin function to also write to the "transactions" table, the only way to do it is to use a tool like phpmyadmin (should be in your host's control panel for your website). You would find the table names "transactions" and insert new records there using the phpmyadmin user interface.

The good news is that you probably already have records in that table that you could pattern your inserts after. BUT, be careful that if you edit a row to use as a "pattern", that you elect to insert the changed row rather than save it (which would replace what you already had).

Sorry, just don't know of a mod like this, but it sounds like it would be a very useful addition to the Nuke Treasury module.

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
dark10304
New Member
New Member


Joined: Jan 06, 2006
Posts: 7

PostPosted: Fri Jan 06, 2006 9:01 am Reply with quote

didnt want to post a new topic on this because im sure is im overlooking the thread... please bare with me a bit as i am faily new to all of this.. however i have tested donations and they work. as far as processing.. not sure yet if it logging properly but.... i am getting this and it is completly intermittant.

Code:
NukeTreasury FATAL ERROR: Unable to connect to SQL database. Please check your settings in modules/Donations/config.php


I have checked my db settings in config.php and they all look good.
it isnt a problem that the db name and the user name is the same? right?

the tables are on their own db.

and again this is intermittant and simply occurs when browsing the site...

any thoughts?
 
View user's profile Send private message
Raven
PostPosted: Fri Jan 06, 2006 9:10 am Reply with quote

If it is intermittant then it sounds like a hosting issue. It could mean the drive is going bad or it could mean your host connection is dropping.
 
dark10304
PostPosted: Fri Jan 06, 2006 9:28 am Reply with quote

well it only happens when treasury is enabled.. :S i dunno.. never experienced that event before today.. ill probably reinstall and see what happens. trust me i dont need more reason to be pissed at the host.. i am about to move anyways.. what a royal pain in the arse!

thanks for the quick response raven!
 
leachy12
New Member
New Member


Joined: Feb 06, 2006
Posts: 2

PostPosted: Tue Feb 07, 2006 12:37 pm Reply with quote

raven, could you take a look at my nuke treasury please?
if you accept i will pm my ftp / god admin details etc
Sorry -edit- my url is Only registered users can see links on this board! Get registered or login! and i only just installed phpnuke, thats why it looks noob-owned (i am to phpnuke) anyway, i get the following error while testing the ipn.
Warning: main(../config.php): failed to open stream: No such file or directory in /home/leachy/public_html/phpnuke/modules/Donations/ipn/ipnppd.php on line 25

Warning: main(../config.php): failed to open stream: No such file or directory in /home/leachy/public_html/phpnuke/modules/Donations/ipn/ipnppd.php on line 25

there was also an error at the bottom---
Connection to db - OK!
Opening connection and validating request with PayPal...
OK!
Selecting database...FAILED - err:
Executing test query...No Database Selected
Warning: main(): Failed opening '../config.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/leachy/public_html/phpnuke/modules/Donations/ipn/ipnppd.php on line 25
Debug mode activated


Last edited by leachy12 on Tue Feb 07, 2006 5:21 pm; edited 2 times in total 
View user's profile Send private message
Unit1
Worker
Worker


Joined: Oct 26, 2004
Posts: 134
Location: Boston

PostPosted: Tue Feb 07, 2006 1:08 pm Reply with quote

Hello all I just set up treasury and did the test on the IPN test link and every thing looks ok but for this at the bottom

Warning: strtotime() [function.strtotime]: Called with an empty time parameter. in /home/*****/public_html/modules/Donations/ipn/ipnppd.php on line 225

Any thoughts on what could be the problem and how to fix this

I put in the **** for the path
 
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Announcements

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©