* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009, 2010 by Mailer Developer Team *
} // END - if
// Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
// Check if admin has submitted form
if (isFormSent()) {
// Load his personal data
$result_main = SQL_QUERY_ESC("SELECT
- `id`, `gender`, `surname`, `family`, `email`, `remote_addr`, `sponsor_created`, `points_amount`, `points_used`, `refid`
+ `id`, `gender`, `surname`, `family`, `email`, `remote_addr`,
+ UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`,
+ `points_amount`, `points_used`,
+ (`points_amount` + `points_used`) AS `points`,
+ `refid`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE
// Load data
$content = SQL_FETCHARRAY($result_main);
- // Add total amount
- $content['points'] = ($content['points_amount'] - $content['points_used']);
-
// Check for open payments and close them
$result = SQL_QUERY_ESC("SELECT
- so.admin_id, so.pay_count, so.pay_ordered, so.pay_status,
- sp.pay_name, sp.pay_rate, sp.pay_currency
+ so.admin_id, so.pay_count,
+ UNIX_TIMESTAMP(so.pay_ordered) AS `pay_ordered`,
+ so.pay_status, sp.pay_name, sp.pay_rate, sp.pay_currency
FROM
`{?_MYSQL_PREFIX?}_sponsor_orders` AS so
LEFT JOIN
array(bigintval($content['refid'])), __FILE__, __LINE__);
// Whas that update fine?
- if (SQL_AFFECTEDROWS() == 1) {
+ if (!SQL_HASZEROAFFECTED()) {
// Load referal's data
$result = SQL_QUERY_ESC("SELECT
`id`, `gender`, `surname`, `family`, `email`,
// Begin listing of all pending sponsor accounts
$result = SQL_QUERY("SELECT
- `id`, `gender`, `surname`, `family`, `email`, `remote_addr`, `sponsor_created`
+ `id`, `gender`, `surname`, `family`, `email`, `remote_addr`,
+ UNIX_TIMESTAMP(`sponsor_created`) AS `sponsor_created`
FROM
`{?_MYSQL_PREFIX?}_sponsor_data`
WHERE