Ciao a tutti è la prima volta che scrivo in questo post, ho un problema in php che non riesco a risolevere...
Allora vi spiego ho una pagina php dalla quale posso scaricare dei files tramite l'apposito pulsante, vi posto il codice:
class remositoryDownloadAgreeHTML extends remositoryUserHTML {
function downloadAgreeHTML( &$file ) {
$formurl = remositoryRepository::RemositoryBasicFunctionURL ('finishdown', $file->id);
$file->showCMSPathway();
// $this->pathwayHTML($file->getContainer());
$chk = $this->repository->makeCheck($file->id,'finishdown');
$licence = $file->licenseagree ? $file->license : $this->repository->Default_Licence;
?>
<script type='text/javascript'>
function enabledl () {
document.forms['agreeform'].elements['remositorydlbutton'].disabled=false
}
</script>
<h2><?php echo _DOWN_LICENSE_AGREE; ?></h2>
<form id='agreeform' method='post' action='<?php echo $formurl; ?>'>
<p>
<?php echo $licence; ?>
</p>
<div id='remositorylicenseagree'>
<input name='agreecheck' type='checkbox' onclick='enabledl()' /><strong><?php echo _DOWN_LICENSE_CHECKBOX; ?></strong>
<input class="button" id='remositorydlbutton' type="submit" value="<?php echo _DOWNLOAD; ?>" onClick="" />
<input type="hidden" name="da" value="<?php echo $chk; ?>" />
</div>
</form>
<script type='text/javascript'>
document.forms['agreeform'].elements['remositorydlbutton'].disabled=true
</script>
<?php
}
}
?>
Vorrei che quando venga clicato il pulsante si esegua questo script:
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
require_once ($api_AUP);
AlphaUserPointsHelper::newpoints( 'plgaup_downfile','','','Dawnload appunti' );
}
Ho provato a fare diverse ricerche sul web e diverse prove ma non sono riuscito a risolver eil problema...forse qualcuno può aiutarmi, magari postando il codice..grazie mille saluti a tutti
Allora vi spiego ho una pagina php dalla quale posso scaricare dei files tramite l'apposito pulsante, vi posto il codice:
class remositoryDownloadAgreeHTML extends remositoryUserHTML {
function downloadAgreeHTML( &$file ) {
$formurl = remositoryRepository::RemositoryBasicFunctionURL ('finishdown', $file->id);
$file->showCMSPathway();
// $this->pathwayHTML($file->getContainer());
$chk = $this->repository->makeCheck($file->id,'finishdown');
$licence = $file->licenseagree ? $file->license : $this->repository->Default_Licence;
?>
<script type='text/javascript'>
function enabledl () {
document.forms['agreeform'].elements['remositorydlbutton'].disabled=false
}
</script>
<h2><?php echo _DOWN_LICENSE_AGREE; ?></h2>
<form id='agreeform' method='post' action='<?php echo $formurl; ?>'>
<p>
<?php echo $licence; ?>
</p>
<div id='remositorylicenseagree'>
<input name='agreecheck' type='checkbox' onclick='enabledl()' /><strong><?php echo _DOWN_LICENSE_CHECKBOX; ?></strong>
<input class="button" id='remositorydlbutton' type="submit" value="<?php echo _DOWNLOAD; ?>" onClick="" />
<input type="hidden" name="da" value="<?php echo $chk; ?>" />
</div>
</form>
<script type='text/javascript'>
document.forms['agreeform'].elements['remositorydlbutton'].disabled=true
</script>
<?php
}
}
?>
Vorrei che quando venga clicato il pulsante si esegua questo script:
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
require_once ($api_AUP);
AlphaUserPointsHelper::newpoints( 'plgaup_downfile','','','Dawnload appunti' );
}
Ho provato a fare diverse ricerche sul web e diverse prove ma non sono riuscito a risolver eil problema...forse qualcuno può aiutarmi, magari postando il codice..grazie mille saluti a tutti