// they have given us a valid sid lets check to see if they have paid
$id=$sucsDB->Execute($query,$attribs);
$id=$id->fields['id'];
if(!$id){
$mode="error";
$smarty->assign("error_text","An error occurred generating a signup ID. Report the following message to the admins:<br /><pre>".$sucsDB->ErrorMsg()."</pre>");
}else{
$smarty->assign('slipid',$id);
$smarty->assign('slippass',$pass);
$smarty->assign('sid',$_REQUEST['sid']);
}
// make sure the user/admin/exec isn't an idiot
// check if they are already signed up and tell them so
$tmpresult=$sucsDB->Execute("SELECT * FROM members WHERE sid=?",array($_REQUEST['sid']));
$smarty->assign("error_text","An error occurred generating a signup ID. Report the following message to the admins:<br /><pre>".$sucsDB->ErrorMsg()."</pre>");
}else{
$smarty->assign('slipid',$id);
$smarty->assign('slippass',$pass);
$smarty->assign('sid',$_REQUEST['sid']);
}
}else{
$mode='error';
$smarty->assign("error_text","Student does not appear to have paid. Extract fees");