|
Thanks but i don't have default_nonetabs.php there
i just found default.php
here is the code I don't understand where to change
can you show me please?
<?php
/**
* $Id: default.php 10967 2008-09-26 00:01:51Z ian $
*/
defined( '_JEXEC' ) or die( 'Restricted access' );
$introtext = $this->params->get('introtext','');
$headertext = $this->params->get('headertext','');
$usecents = (int) $this->params->get('usecents','');
$countdig = ($usecents == 1 ? "2" : "0" );
$sym = trim($this->curr->symbol);
if ($this->curr->symplace) {
$currmask = $sym.($this->curr->usespace == 1 ? " " : "" ).($usecents == 1 ? "%01.2f" : "%d" );
$currmaskjs = "'".$sym."'+".($this->curr->usespace == 1 ? "' '+" : "" )."%s";
}
else {
$currmask = ($usecents == 1 ? "%01.2f" : "%d" ).($this->curr->usespace == 1 ? " " : "" ).$sym;
$currmaskjs = "%s".($this->curr->usespace == 1 ? "+' '" : "" )."+'".$sym."'";
}
$doc =& JFactory::getDocument();
$doc->addStyleSheet( "components/com_ipricecalc/views/category/tmpl/ipricecalc.css" );
?>
<script language="javascript" type="text/javascript">
function form_hasValue(object, obj_type, optional_1, optional_2, optional_3) {
switch (obj_type) {
case "TEXT":
if (object.value.length < 5) {return false;}
return true;
case "PASSWORD":
if (object.value.length == 0) {return false;}
return true;
case "EMAIL":
if (object.value.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1) {return false;}
return true;
case "TEXTAREA":
if (object.value.length < 1) {return false;}
return true;
case "SELECT":
for (i=0; i < object.length; i++) {
if (object.options[i].selected && object.options[object.selectedIndex].value != 0 ) {return true;}
}
return false;
case "SINGLE_VALUE_RADIO":
if (object.checked) {return true;}
return false;
case "SINGLE_VALUE_CHECKBOX":
if (object.checked) {return true;}
return false;
case "RADIO":
for (i=0; i < object.length; i++) {
if (object[i].checked) {return true;}
}
return false;
case "CHECKBOX":
for (i=0; i < object.length; i++) {
if (object[i].checked) {return true;}
}
return false;
case "EURO_DATE":
var firstSlash, secondSlash, month, day, year;
if (object.value.search(/^\d{1,2}\/\d{1,2}\/\d{1,4}$/) == -1) {return false;}
var firstSlash = object.value.indexOf('/');
var month = object.value.substring(0, firstSlash);
if (!((month >= 1) && (month <= 12))) {return false;}
var secondSlash = object.value.indexOf('/', firstSlash + 1);
var year = object.value.substring(secondSlash+1,object.value.length);
if (!((year >= 1900) && (year <= 2100))) {return false;}
var day = object.value.substring(firstSlash+1, secondSlash);
if (!form_checkDayOfMonth(year,month,day)) {return false;}
return true;
case "CREDIT_DATE":
var firstSlash, month, year;
if (object.value.length == 0) {return false;}
if (object.value.search(/^\d{1,2}\/\d{1,2}$/) == -1) {return false;}
var firstSlash = object.value.indexOf('/');
var month = object.value.substring(0, firstSlash);
if (!((month >= 1) && (month <= 12))) {return false;}
var year = object.value.substring(firstSlash+1,object.value.length);
if (!((year >= 0) && (year <= 99))) {return false;}
return true;
case "INTEGER":
if (object.value.length == 0) {return false;}
else {
if (object.value.search(/^\d+$/) == -1) {return false;}
}
return true;
case "NUMBER":
if (object.value.search(/^\-?\+?\d*\.?\d+$/) == -1) {return false;}
return true;
case "PHONE_NUMBER":
if (object.value.search(/^[ \+\-\(\)\d]{5,}$/) == -1) {return false;}
return true;
case "CREDITCARDNUMBER":
if (object.value.search(/^[\d| ]+$/) == -1) {return false;}
return true;
case "SELECTNOTZERO":
for (i=0; i < object.length; i++) {
if (object.options[i].selected) {
if(object.options[i].value != 0) {return true;}
}
}
return false;
case "NUMDATE":
if (object.value.search(/^\-?\+?\d*\.?\d+$/) == -1) {return false;}
if (object.value.length != 6) {return false;}
if(object.value.substring(0,2) > 31) {return false;}
if(object.value.substring(2,4) > 12) {return false;}
return true;
case "NUMTIME":
if (object.value.search(/^\-?\+?\d*\.?\d+$/) == -1) {return false;}
if (object.value.length != 4) {return false;}
if(object.value.substring(0,2) > 24) {return false;}
if(object.value.substring(2,4) > 60) {return false;}
return true;
}
}
function checkHaveValues (checkList) {
loopLength = checkList.length / 3;
for (x=0;x<loopLength;x++) {
message = checkList[(x*3)];
checkItem = checkList[(x*3)+1];
type = checkList[(x*3)+2];
if (!form_hasValue(checkItem,type)) {
alert(message);
if (checkItem.type == "TEXT" || checkItem.type == "PASSWORD") {
checkItem.focus();
}
return false;
}
}
return true;
}
function validate(formName) {
if (!checkHaveValues(new Array(
"<?php echo JText::_('Contact person needed');?>",formName.fio,"TEXT",
"<?php echo JText::_('Phone number needed');?>",formName.phone,"TEXT",
"<?php echo JText::_('Correct e-mail needed');?>",formName.email,"EMAIL")))
{return false;}
else {
formName.submit();
return true;
}
}
function show_desc(iid) {
if (iid.style.display == '') iid.style.display='none'; else iid.style.display='';
};
function check_event(){
var sum_ = new Array();
var price_list=new Array(), i_list=new Array(), i_box_list=new Array(); i_radio_list=new Array();
<?php
// echo ('var cnt_ = '.$this->catcount.'; ');
$i = -1;
$curcatnum = -1;
$itemnum = -1;
$curcat = '';
foreach ($this->items as $item) {
$i++;
$itemnum++;
if ($curcat != $item->category) {
$curcatnum++;
$itemnum = 0;
$curcat = $item->category;
echo ('price_list['.$curcatnum.'] = new Array(); i_list['.$curcatnum.'] = new Array(); i_box_list['.$curcatnum.'] = new Array(); i_radio_list['.$curcatnum.'] = new Array(); ');
};
echo (" price_list[".$curcatnum."][".$itemnum."] = ".$item->cost."; ");
echo (" i_list[".$curcatnum."][".$itemnum."] = document.getElementById('i_".$i."'); ");
echo (" i_box_list[".$curcatnum."][".$itemnum."] = document.getElementById('i_box_".$i."'); ");
echo (" i_radio_list[".$curcatnum."][".$itemnum."] = document.getElementById('i_radio_".$i."'); ");
}
?>
var j;
for (var i = 0; i < i_list.length; i++){
sum_[i]=0;
for (j = 0; j < i_list[i].length; j++){
if(i_box_list[i][j].checked || i_list[i][j].value != '0' || i_radio_list[i][j].checked){
if(i_list[i][j].style.visibility == 'hidden'){
sum_[i] = sum_[i] + price_list[i][j];
}else{
sum_[i] = sum_[i] + price_list[i][j] * i_list[i][j].value;
};
};
};
};
var SUM=0;
for(i=0; i<i_list.length;i++) {
SUM = SUM + sum_[i];
document.getElementById('results_'+i).innerHTML = <?php echo sprintf($currmaskjs,'sum_[i].toFixed('.$countdig.')')?>;
}
document.getElementById('results_bottom').innerHTML = <?php echo sprintf($currmaskjs,'SUM.toFixed('.$countdig.')')?>;
};
</script>
<?php
if ($headertext) { ?>
<table class="contentpaneopen"><tr><td class="contentheading" width="100%"><?php echo $headertext;?></td></tr></table>
<?php
}
if ($introtext) { ?>
<table class="contentpaneopen"><tr><td valign="top"><?php echo $introtext;?></td></tr></table>
<?php
}
?>
<form action="" name="calc_form" method="POST" onsubmit="return validate(this);">
<table width="100%" border=0 align=center cellPadding=3 cellSpacing=0 VALIGN="TOP">
<?php
$i = -1;
$curcatnum = -1;
$itemnum = -1;
$curcat = '';
$headerHTML = '<tr class="tablzag3"><td colspan="2" class="tablzag3">'.JText::_('Articolo').'</td><td align=center class="tablzag3">'.JText::_('').'</td><td align=center class="tablzag3">'.JText::_('Prezzo').'</td></tr>';
foreach ($this->items as $item) :
$i++;
$itemnum++;
if ($curcat != $item->category) {
$curcatnum++;
$itemnum = 0;
if ($curcatnum>0) { ?>
<tr>
<td colspan=3 align=right valign="middle" class="tablitogo" ><?php echo JText::_('Subtotale').' "'.$curcat.'"' ?> : </td>
<td align="right" valign="middle" class="tablitogo" ><span id="results_<?php echo ($curcatnum-1);?>" ><?php echo sprintf($currmask,0)?></span></td>
</tr>
<tr>
<td colspan=4 align=right class="tabldelim"></td>
</tr>
<?php
}
$curcat = $item->category;
echo $headerHTML;
};
?>
<!-- echo ('<tr><td colspan=4 class="tablzag2" >'.$item->category.'</td></tr>'); -->
<tr valign="middle">
<td width="30%" align="left" class="tablchet">
<div align="left"><a href="javascript:show_desc(document.getElementById('d_<?php echo $item->id;?>'));" class="tablchet" ><span class="tablcheta"><?php echo $item->name;?></span></a></div>
</td>
<td align="left" class="tablchet">
<div align="right"><?php echo $item->shortdesc ?></div>
</td>
<td width="10%" align="center" >
<input type="text" maxlength="5" <?php if ($item->showcount==1) echo 'onchange="check_event()" style="width: 30px; text-align: right" value="0"';
else echo 'style="visibility: hidden; position: absolute" value="0"'; ?>
id="i_<?php echo ($i);?>" name="i_<?php echo ($i);?>" />
<center >
<input type="radio" <?php if ($item->showcount!=2) echo ' style="visibility: hidden; position: absolute;"'; else echo 'onclick="check_event()"';?>
id="i_radio_<?php echo ($i);?>" name="i_radio_<?php echo ($item->radiogroup);?>" value="<?php echo ($item->id);?>" onclick="check_event()" />
<input type="checkbox" <?php if ($item->showcount!=0) echo ' style="visibility: hidden; position: absolute;"'; else echo 'onclick="check_event()"';?>
id="i_box_<?php echo ($i);?>" name="i_box_<?php echo ($i);?>" />
</Center>
</td>
<td width="15%" align="right">
<nobr class="tablchet"><?php echo sprintf($currmask,$item->cost);?></nobr>
<input type="hidden" name="itemid_<?php echo ($i);?>" value="<?php echo $item->id?>" />
</td>
</tr>
<tr>
<td colspan=4 align=left class="tabldiv" >
<div align="justify" class="tabldiv" id="d_<?php echo $item->id;?>" style="display: none;" name="d_<?php echo $item->id;?>"><?php echo $item->description?></div>
</td>
</tr>
<?php endforeach;
if ($curcatnum>-1) : ?>
<tr>
<td colspan=3 align=right valign="middle" class="tablitogo" ><?php echo JText::_('Subtotale').' "'.$curcat?>" : </td>
<td align="right" valign="middle" class="tablitogo" ><span id="results_<?php echo ($curcatnum);?>" ><?php echo sprintf($currmask,0)?></span></td>
</tr>
<?php endif; ?>
<tr><td colspan=4 align=right class="tabldelim" ></td></tr>
<tr>
<td colspan="3" align="right" class="tablitogo"><?php echo JText::_('Totale');?></td>
<td align="right" class="tablitogo"><span class="textwarn" id="results_bottom"><?php echo sprintf($currmask,0)?></span></td>
</tr>
</table>
<br />
<center><input type="button" class="button" onclick="document.getElementById('order_dat').style.display=''; style.display='none'" value="<?php echo JText::_('Procedi');?>">
</center>
<!-- <?php //echo JText::_('Preorder');?>"> -->
<br>
<div style="display: none;" id="order_dat" name="order_dat">
<table cellSpacing=0 cellPadding=0 width="100%" border=0 align=center>
<tr >
<td colspan=4 class="tablzag2"><?php echo JText::_('Modulo contatti');?></td>
<!-- <?php //echo JText::_('Contact info');?> -->
</tr>
<tr><td colspan=4>
<table cellpadding=0 cellspacing=0 width=100% border=0>
<tr class="tablchet" >
<td align=right class="tablchet"> </td>
<td colspan=3 class="tablchet"> </td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Nome');?><span class="textwarn">*</span>:</td>
<td colspan=3 class="tablchet"><input name="fio" maxlength="90" type=text value="<?php echo $this->username ;?>" class="form" ></td>
<!-- <?php //echo JText::_('Contact person');?> -->
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Azienda');?></td>
<td colspan=3 class="tablchet"><input name="firm" maxlength="90" type=text class="form" value=""></td>
<!-- <?php //echo JText::_('Company name');?> -->
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Telefono');?><span class="textwarn">*</span>:</td>
<td colspan=3 class="tablchet"><input name="phone" maxlength="60" type=text class="form" value="" ></td>
<!-- <?php //echo JText::_('PHONE NUMBER');?> -->
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet" ><?php echo JText::_('E-Mail');?><span class="textwarn">*</span>:</td>
<td colspan=3 class="tablchet" ><input name="email" type=text maxlength="60" value="<?php echo $this->useremail ;?>" class="form"></td>
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Messaggio');?></td>
<td colspan=3 class="tablchet" ><textarea name="comments" cols="50" rows=5 class="textarea" ></textarea></td>
<!-- <?php //echo JText::_('Comments');?> -->
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"><?php echo JText::_('Mandami una copia');?></td>
<td colspan=3 class="tablchet" ><input name="copyemail" type="checkbox" CHECKED ></td>
<!-- <?php //echo JText::_('Send copy');?> -->
</tr>
<tr class="tablchet" >
<td align=right colspan=4 class="tablchet"><span class="textwarn">*</span><?php echo JText::_('Obbligatorio');?></td>
<!-- <?php //echo JText::_('Mandatory');?> -->
</tr>
<tr class="tablchet" >
<td align=right width=200px class="tablchet"> </td>
<td colspan=3 class="tablchet" >
<?php
if ($this->params->get('usecaptcha') == 1 ) {
$dispatcher = &JDispatcher::getInstance();
// Captcha Extention patch rev. 4.5.0 Stable
echo '<p>';
$dispatcher->trigger( 'onCaptchaView', array( '', 0, '', '<br />' ) );
echo '</p>';
}
?>
<input name="bt1" type="button" class="button" onclick="javascript:this.form.submit();" value="<?php echo JText::_('Invia ordine');?>">
<!-- <?php //echo JText::_('Send order');?> -->
</td>
</tr>
</table>
</td></tr>
</table>
</div>
<input type="hidden" name="countitems" value="<?php echo count($this->items)?>" />
<input type="hidden" name="curr" value="<?php echo $this->curr->currcode?>" />
<input type="hidden" name="option" value="com_ipricecalc" />
<input type="hidden" name="view" value="category" />
<input type="hidden" name="task" value="submit" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
thanks
|