printf("%1.2f", $dbt->f("stotal"));
        } else {
            echo "no sales";
        }
        ?>
	</td>
    <td width="31%">
	<?php 
        if ($dbt->f("stotal")) {
            printf("%1.2f", $dbt->f("stotal") * ($db->f("rate") * 0.01));
        } else {
            echo "none";
        }
        ?>
	</td>
    <td width="11%"><a href="<?php 
        $sess->purl(SECUREURL . "?page={$modulename}.affiliate_form&affiliate_id=" . $db->f("affiliate_id"));
        ?>
">go</a></td>
  </tr>
  <?php 
    }
    ?>
 
</table>
<?php 
    search_footer('affiliate', "affiliate_list", $limitstart, $num_rows, $keyword);
}
?>

        echo $db->f("username");
        echo "</a>";
        ?>
    </td>
    <td width="50%"><?php 
        echo $db->f("first_name") . " ";
        echo $db->f("middle_name") . " ";
        echo $db->f("last_name");
        ?>
    </td>
    <td width="27%"><?php 
        //$url = SECUREURL . "?page=$modulename/shopper_by_group_list&perms=";
        //$url .= $db->f("perms");
        //echo "<A HREF=" . $sess->url($url) . ">";
        echo $db->f("shopper_group_name");
        //echo "</A>";
        ?>
    </td>
  </tr>
  <?php 
    }
    ?>
 
</table>

<?php 
    search_footer($modulename, "shopper_add", $limitstart, $num_rows, $keyword);
}
?>