Questo e' il codice completo:
Ma c'e' qualcosa che non funziona..codice:<?php if(isset($_POST["action"]) and $_POST["action"] == "go") { $filename="file.xls"; header ("Content-type:application/vnd.ms-excel"); header ("Content-Disposition: attachment; filename=$filename"); } ?> <?php defined('_JEXEC') or die('Restricted access'
); $mainframe = JFactory::getApplication(); $pathway = & $mainframe->getPathWay(); $pathway->addItem($this->data->dmname); JFactory::getDocument()->setTitle( _DML_TPL_TITLE_DETAILS . ' | ' . $this->data->dmname ); ?> <div id="dm_details" class="<?php echo @$this->theme->conf->style ? 'dm_dark' : 'dm_light'; ?>"> <h1 class="dm_title"><?php echo _DML_TPL_DETAILSFOR ?><em> <?php echo htmlspecialchars($this->data->dmname) ?></em></h1> <?php if ($this->data->dmthumbnail) : ?><img src="<?php echo $this->paths->thumb ?>" alt="<?php echo htmlspecialchars($this->data->dmname)?>" /><?php endif; ?> <table summary="<?php echo htmlspecialchars($this->data->dmname)?>" cellspacing="0" > <col id="prop" /> <col id="val" /> <thead> <tr> <td><?php echo _DML_PROPERTY?></td><td><?php echo _DML_VALUE?></td> </tr> </thead> <tbody> <?php if($this->theme->conf->details_name) : ?> <tr> <td><strong><?php echo _DML_TPL_NAME ?>:</strong></td><td><?php echo htmlspecialchars($this->data->dmname) ?></td> </tr> <?php endif; if($this->theme->conf->details_name) : ?> <tr> <td><strong><?php echo _DML_TPL_AFF ?>:</strong></td><td><?php echo $this->data->dmaff ?></td> </tr> <?php endif; if($this->theme->conf->details_name) : ?> <tr> <td><strong><?php echo _DML_TPL_IC ?>:</strong></td><td><?php echo $this->data->dmic ?></td> </tr> <?php endif; if($this->theme->conf->details_name) : ?> <tr> <td><strong><?php echo _DML_TPL_AGG ?>:</strong></td><td><?php echo $this->data->dmagg ?></td> </tr> <?php endif; if($this->theme->conf->details_downloads) : ?> <tr> <td><strong><?php echo _DML_TPL_LASTUP ?>:</strong></td> <td> <?php $this->plugin('dateformat', $this->data->dmlastupdateon , _DML_TPL_DATEFORMAT_LONG); ?> </td> </tr> <?php endif; ?> </tbody> </table> <div class="clr"></div> </div> <?php if(JRequest::getString('tmpl') != 'component') :?> <div class="dm_taskbar <?php echo @$this->theme->conf->style ? 'dm_dark' : 'dm_light'; ?>"> <ul> <?php unset($this->buttons
['details']); $this->doc = &$this; include $this->loadTemplate('documents'.DS.'tasks.tpl.php'); ?> <li><a href="javascript: history.go(-1);"><?php echo _DML_TPL_BACK ?></a></li> </ul> </div> <?php endif; ?> <div class="clr"></div> </table> </body></html> <form action="?"> <input type="hidden" value="go" name="action"> <input type="submit" value="Scarica
in formato xls"> </form>


Rispondi quotando