Address Management'; if ($err != '') $pg .= "$err

"; $pg .= makeForm('addrmgt'); $pg .= "\n"; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; # new row template for '+' $pg .= ''; $pg .= ''; $pg .= ''; $pg .= ''; $pg .= "\n"; $ans = userSettings($user); $offset = 0; $count = 0; if ($ans['STATUS'] == 'ok') { $count = $ans['rows']; for ($i = 0; $i < $count; $i++) { if ((($offset) % 2) == 0) $row = 'even'; else $row = 'odd'; $pg .= ""; $addr = $ans['addr:'.$i]; $pg .= ''; $ratio = intval($ans['ratio:'.$i]); $pg .= ''; $pg .= ''; $pg .= "\n"; $offset++; } if ((($offset++) % 2) == 0) $row = 'even'; else $row = 'odd'; $pg .= ""; $pg .= ''; if ((($offset++) % 2) == 0) $row = 'even'; else $row = 'odd'; $pg .= ""; $pg .= ''; if ((($offset++) % 2) == 0) $row = 'even'; else $row = 'odd'; $pg .= ""; $pg .= ''; $pg .= "'; } $pg .= "
AddressRatio%
'; $pg .= ""; $pg .= ''; $pg .= ""; $pg .= ''; $pg .= "0.00%"; $pg .= '
'; $pg .= ""; $pg .= ''; $pg .= ""; $pg .= ''; $pg .= "%"; $pg .= '
'; $pg .= ""; $pg .= '
'; $pg .= 'Password: '; $pg .= ' 
'; $pg .= '*2nd Authentication: '; $pg .= '
"; $pg .= 'You must enter your password to save changes
'; $pg .= "*Leave blank if you haven't enabled it
"; $pg .= 'A ratio of 0, will remove the address from the payouts
\n"; $pg .= ""; return $pg; } # function doaddrmgt($data, $user) { $err = ''; $OK = getparam('OK', false); $count = getparam('rows', false); $pass = getparam('pass', false); $twofa = getparam('2fa', false); if ($OK == 'Save' && !nuem($count) && !nuem($pass)) { if ($count > 0 && $count < 1000) { $addrarr = array(); for ($i = 0; $i < $count; $i++) { $addr = getparam('addr:'.$i, false); $ratio = getparam('ratio:'.$i, false); if (!nuem($addr) && !nuem($ratio)) $addrarr[] = array('addr' => $addr, 'ratio' => $ratio); } $ans = userSettings($user, null, $addrarr, $pass, $twofa); if ($ans['STATUS'] != 'ok') $err = $ans['ERROR']; } } $pg = addrmgtuser($data, $user, $err); return $pg; } # function show_addrmgt($info, $page, $menu, $name, $user) { gopage($info, NULL, 'doaddrmgt', $page, $menu, $name, $user); } # ?>