FundacionLQDVI_WebCongresos/www/components/com_sql2excel/views/pre/tmpl/default.php

123 lines
3.2 KiB
PHP
Raw Normal View History

<?php
/*
* @component SQL 2 Excel Component
* @copyright Copyright (C) Joomla-R-Us, joomla-r-us.com
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3
*/
defined('_JEXEC') or die('Restricted access');
?>
<h1><?php echo $this->wbtitle; ?></h1>
<?php echo $this->wbParmsHTML; ?>
<div id="ajaxtabs-container">
<table class="ajax-tabs">
<tr class="ajax-tabs-top">
<?php
$i=1;
foreach ($this->worksheets as $ws ) {
if ( $i == 1 ) {
$id = ' id="sheet1" ';
$ws1ID = $ws->id;
} else {
$id='';
}
echo '<td ' . $id . ' style="" onClick="UpdateTab(this,' . $ws->id . ');" onMouseOver = "selTab(this,1);" onMouseOut = "selTab(this,0);"><b>&nbsp;' . str_replace(' ', '&nbsp;', $ws->sheetname) . '&nbsp;</b></td> ';
$i++;
}
?>
<td style="width:100%;"></td>
</tr>
<tr>
<?php
$cspan = count($this->worksheets) + 1;
echo '<td colspan="' . $cspan . '" id="ajax-tabs-content"></td>';
?>
</tr>
</table>
</div>
<p>
<br>
<form type="post" action="index.php" onSubmit="return updateParms();">
<center>
<?php echo $this->wbRefresh; ?><?php
if ( $this->show_dl_button == 1 ) {
echo '<input type="submit" value="&nbsp;&nbsp;' . $this->downloadlabel . '&nbsp;&nbsp;">';
}
?>
</center>
<input type="hidden" name="option" value="com_sql2excel">
<input type="hidden" name="controller" value="download">
<input type="hidden" name="task" value="dl">
<input type="hidden" name="id" value="<?php echo $this->wb_id; ?>">
<?php echo $this->wbHiddenParms; ?>
</form>
<br>
</p>
<script type="text/javascript">
var nrWBParms=<?php echo $this->nrWbParms; ?>;
// data load
function UpdateTab( tab, request, refresh )
{
var checkMulti=0;
<?php echo $this->wbValidate; ?>
currTabH = tab;
currWS = request;
var id_name = 'ajax-tabs-content';
var loading = '<img style="position:relative;top:3px;"' + 'src="<?php echo JURI::base(); ?>components/com_sql2excel/assets/images/loading_01.gif"> <?php echo JText::_( 'Loading...'); ?>';
var caching = true;
if ( refresh == 1 ) { caching = false; }
var template = '%code%';
<?php echo $this->wbParmVars; ?>
selTab( tab, 2 );
var poststr = "option=com_sql2excel" +
"&controller=preview&task=ws" + '<?php echo $this->wbParmVarsAdd; ?>&wbid=<?php echo $this->wb_id; ?>&id=' + request;
sql2excel_ajax('<?php echo JURI::base(); ?>index.php',poststr, loading);
}
function updateParms() {
var checkMulti=1;
<?php echo $this->wbValidate; ?>
for (i=1;i<=nrWBParms;i++) {
var parmH=document.getElementById('parm'+i);
var pVal = ""
if ( parmH.length==undefined ) {
pVal=parmH.value;
} else {
var ticks=0;
<?php echo $this->wbMultiTicks; ?>
pVal=formatSelected(getSelected(parmH),ticks);
}
var formParmH=document.getElementById('wbparm'+i);
formParmH.value=pVal;
}
return true;
}
var tab1H = document.getElementById('sheet1');
var currTabH=tab1H;
var currWS=<?php echo $ws1ID; ?>;
</script>
<script type="text/javascript" defer>
setTimeout ( "UpdateTab(tab1H,<?php echo $ws1ID; ?>)", 100 );
</script>