= 0) && ($toassign <= 100) && ($testtotal <= 100)) { $totalassigned = $totalassigned+$toassign; @mysql_query("Update ".$prefix."msites set assign=$toassign where memid=$userid and id=$siteid"); } } } #################### //Begin main page #################### echo("

Auto Assign


"); if ($minauto > 0) { echo("

You must auto-assign at least ".$minauto."% of your credits.

"); } $countsites = mysql_result(mysql_query("Select COUNT(*) from ".$prefix."msites where memid=$userid"),0); if ($countsites >= 1) { $totalassigned = mysql_result(mysql_query("Select SUM(assign) from ".$prefix."msites where memid=$userid"),0); } echo("

".$totalassigned."% of your credits are currently auto-assigned

"); if ($_GET['surfreturn'] == 1) { echo("

You do not have enough credits auto-assigned.

"); } $getsites = @mysql_query("Select * from ".$prefix."msites where memid=$userid order by url asc"); $numsites = mysql_num_rows($getsites); echo(""); for ($i = 0; $i < mysql_num_rows($getsites); $i++) { $siteid = mysql_result($getsites, $i, "id"); $siteurl = mysql_result($getsites, $i, "url"); $nowassigned = mysql_result($getsites, $i, "assign"); echo(""); } if (mysql_num_rows($getsites) > 0) { echo(""); } echo("
URL Auto
Assigned
%


"); include $theme_dir."/footer.php"; exit; ?>