function vmn_doButton($caption, $userlevel, $redirect, $disabled, $name = "subscribe", $confirm = '')
{
    if (vmn_userAccess($userlevel)) {
        if ($redirect == '') {
            ?>
		  	<td align="center"><div align="center"><center><input <?php 
            if ($disabled) {
                echo 'disabled="disabled"';
            }
            ?>
 type="submit" class="button" name="<?php 
            echo $name;
            ?>
" value="<?php 
            echo $caption;
            ?>
" <?php 
            if (strlen($confirm)) {
                echo 'onclick="if(confirm(\'' . $confirm . ' ?\')) {document.userForm.submit();}else{return false;};"';
            }
            ?>
></center></div></td>
			<?php 
        } else {
            ?>
		  	<td align="center"><div align="center"><center><input <?php 
            if ($disabled) {
                echo 'disabled="disabled"';
            }
            ?>
 type="button" class="button" value="<?php 
            echo $caption;
            ?>
" onclick="window.location.href='<?php 
            echo $redirect;
            ?>
'"></center></div></td>
			<?php 
        }
    }
}
     	$database->query();
     }
     */
 /*
 else
 {
 	$database->setQuery( "TRUNCATE TABLE #__vemod_news_mailer_log" );
 	$database->query();
 }
 */
 case 2:
     //View Log
     if ($fromtemplate) {
         break;
     }
     if (!vmn_userAccess($previewusers) && !vmn_userAccess($mailusers)) {
         vmn_doPageTop(JTEXT::_('VMN_LOGIN'));
         echo $registertext;
         break;
     }
     if ($updatelog) {
         vmn_sendThrottledItems($now, $emailsettings, @$throttleinterval, @$throttlesize);
     }
     require JPATH_SITE . "/administrator/components/com_vemod_news_mailer/js.vemod_news_mailer.php";
     if ($resendfailed) {
         $cats = '';
         if (count(@$_POST['cid'])) {
             $catsarray = array();
             foreach ($_POST['cid'] as $logitem) {
                 $database->setQuery("SELECT id FROM #__vemod_news_mailer_log WHERE id={$logitem}");
                 $logid = $database->loadResult();