Per essere preciso ecco il codice dove devo intervenire e proprio alla fine vorrei che il "button" dopo avere eseguito le azioni esistenti eseguisse un redirect ad un'altra pagina del sito
<?php
/*
* @component AlphaUserPoints
* @copyright Copyright (C) 2008-2010 Bernard Gilly
* @license : GNU/GPL
* @Website :
http://www.alphaplug.com */
defined( '_JEXEC' ) or die( 'Restricted access' );
$new_total = "";
?>
<script type="text/javascript">
<!--
function validateForm( frm ) {
var valid = document.formvalidator.isValid(frm);
if (valid == false) {
// do field validation
if (frm.numpoints.invalid) {
alert( "<?php echo JText::_( 'AUP_NUMPOINTS' );?>" );
} else if (frm.username2points.invalid) {
alert( "<?php echo JText::_( 'AUP_USERNAME', true ); ?>" );
}
return false;
} else {
frm.submit();
}
}
// -->
</script>
<?php if ( $this->params->get( 'show_page_title', 1 ) ) { ?>
<div class="componentheading<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<?php echo $this->params->get( 'page_title' ); ?>
</div>
<?php } ?>
<?php
if ( $this->params->def( 'limitdonationpoints', 0 ) ) {
$percent = $this->params->get( 'limitdonationpoints' );
// limit the number of points a user can be redistribute to another user
$new_total = $this->currenttotalpoints - intval( ($this->currenttotalpoints*$percent)/100 );
echo JText::_( 'AUP_THE_NUMBER_OF_POINTS_TO_DONATE_IS_L
IMITED' ) . " " . $new_total . " " . JText::_( 'AUP_POINTS' );;
} else echo JText::_('AUP_DONATEPOINTSTOFRIEND') ;
?>
<form action="<?php echo JRoute::_( 'index.php' );?>" method="post" name="sendPointsForm" id="sendPointsForm" class="form-validate">
<table class="contentpaneopen<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<tr>
<td width="180">
<?php echo JText::_( 'AUP_NUMPOINTS' ); ?>
</td>
<td>
<input class="inputbox required" type="text" name="numpoints" id="numpoints" size="10" maxlength="255" value="" /> /
<?php
if ( $this->params->get( 'limitdonationpoints' ) ) {
echo $new_total . " " . JText::_( 'AUP_POINTS' );
echo "
(" . sprintf(JText::_( 'AUP_YOURCURRENTTOTALPOINTS' ), $this->currenttotalpoints ) . ")";
$this->currenttotalpoints = $new_total;
} else {
echo $this->currenttotalpoints . " " . JText::_( 'AUP_POINTS' );
}
?>
</td>
</tr>
<tr>
<td>
<?php echo JText::_( 'AUP_USERNAMEOFYOURFRIEND' ); ?>:
</td>
<td>
<input class="inputbox required" type="text" name="username2points" id="username2points" size="30" maxlength="255" value="" /> <span
id="statusUSR"></span>
</td>
</tr>
</table>
<button class="button validate" type="submit"><?php echo JText::_('AUP_SEND'); ?></button>
<input type="hidden" name="option" value="com_alphauserpoints" />
<input type="hidden" name="view" value="user2userpoints" />
<input type="hidden" name="referreid" value="<?php echo $this->referreid; ?>" />
<input type="hidden" name="userid" value="<?php echo $this->userID; ?>" />
<input type="hidden" name="currenttotalpoints" value="<?php echo $this->currenttotalpoints; ?>" />
<input type="hidden" name="menuid" value="<?php echo $this->menuid; ?>" />
<input type="hidden" name="task" value="sendpoints" />
</form>
Grazie.
Piero.