<?php
/************************************************************************
- * MXChange v0.2.1 Start: 04/11/2004 *
- * ================ Last change: 08/12/2004 *
+ * Mailer v0.2.1-FINAL Start: 04/11/2004 *
+ * =================== Last change: 08/12/2004 *
* *
* -------------------------------------------------------------------- *
* File : what-config_payouts.php *
// Add new payout type
$result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1",
array(postRequestElement('title')), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 0) {
+ if (SQL_NUMROWS($result) == '0') {
// Add now
SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_payout_types`
(type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url)
array(
postRequestElement('title'),
bigintval(postRequestElement('rate')),
- bigintval(postRequestElement('mpoi')),
+ bigintval(postRequestElement('min_points')),
postRequestElement('yacc'),
postRequestElement('ypass'),
postRequestElement('yurl'),
// Edit entries
foreach (postRequestElement('sel') as $id => $sel) {
- // Secure ID
+ // Secure id
$id = bigintval($id);
// Edit only if something is entered
array(
postRequestElement('title', $id),
convertCommaToDot(postRequestElement('rate', $id)),
- convertCommaToDot(postRequestElement('mpoi' , $id)),
+ convertCommaToDot(postRequestElement('min_points' , $id)),
postRequestElement('allow', $id),
),__FILE__, __LINE__, false));
}
// Load data
$result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1",
array(bigintval($id)), __FILE__, __LINE__);
- list($title, $rate, $mpoi, $allow) = SQL_FETCHROW($result);
+ list($title, $rate, $min_points, $allow) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Prepare data for the row template
'id' => $id,
'title' => $title,
'rate' => translateComma($rate),
- 'mpoi' => translateComma($mpoi),
+ 'min_points' => translateComma($min_points),
'allow' => addSelectionBox('yn', $allow, "allow[".$id."]"),
);
$display = false; //Suppress any other outputs
$OUT = ''; $SW = 2;
foreach (postRequestElement('sel') as $id => $sel) {
- // Secure ID number
+ // Secure id number
$id = bigintval($id);
// Load data
$result = SQL_QUERY_ESC("SELECT type, rate, min_points FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1",
array($id), __FILE__, __LINE__);
- list($title, $rate, $mpoi) = SQL_FETCHROW($result);
+ list($title, $rate, $min_points) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Prepare data for the row template
'id' => $id,
'title' => $title,
'rate' => translateComma($rate),
- 'mpoi' => translateComma($mpoi),
+ 'min_points' => translateComma($min_points),
);
// Load row template and switch color
$OUT = ''; $SW = 2;
while ($content = SQL_FETCHARRAY($result_type)) {
// Prepare data for the row template
- // @TODO Rewrite in template: mpoi->min_points,from->from_account
$content = array(
- 'sw' => $SW,
- 'id' => $content['id'],
- 'from' => $content['from_account'],
- 'type' => $content['type'],
- 'rate' => translateComma($content['rate']),
- 'mpoi' => translateComma($content['min_points']),
+ 'sw' => $SW,
+ 'id' => $content['id'],
+ 'from_account' => $content['from_account'],
+ 'type' => $content['type'],
+ 'rate' => translateComma($content['rate']),
+ 'min_points' => translateComma($content['min_points']),
);
// Load row template and switch color