Removed outdated code.
This commit is contained in:
parent
845f4464ca
commit
86e05332fd
1 changed files with 1 additions and 169 deletions
|
|
@ -43,174 +43,6 @@ sub _fileProperty {
|
|||
return $f->printRowsOnly;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _layoutStandard {
|
||||
my ($output, %data, $sth, $rows, $file, @column, $i, $seperator);
|
||||
tie %data, 'Tie::CPHash';
|
||||
$output = $_[0]->displayTitle;
|
||||
$output .= '<table width="100%" cellpadding="3" cellspacing="0" border="0"><tr><td class="content" valign="top">';
|
||||
$output .= $_[0]->description;
|
||||
$output .= '<b>'.WebGUI::International::get(10,$namespace).':</b> '.$_[0]->get("price").'<br>' if ($_[0]->get("price") ne "");
|
||||
$output .= '<b>'.WebGUI::International::get(11,$namespace).':</b> '.$_[0]->get("productNumber") if ($_[0]->get("productNumber") ne "");
|
||||
$output .= '<p>';
|
||||
if ($_[0]->get("brochure")) {
|
||||
$file = WebGUI::Attachment->new($_[0]->get("brochure"),$_[0]->get("wobjectId"));
|
||||
$output .= '<a href="'.$file->getURL.'"><img src="'.$file->getIcon.'" border=0 align="absmiddle">'.WebGUI::International::get(13,$namespace).'</a><br>';
|
||||
}
|
||||
if ($_[0]->get("manual")) {
|
||||
$file = WebGUI::Attachment->new($_[0]->get("manual"),$_[0]->get("wobjectId"));
|
||||
$output .= '<a href="'.$file->getURL.'"><img src="'.$file->getIcon.'" border=0 align="absmiddle">'.WebGUI::International::get(14,$namespace).'</a><br>';
|
||||
}
|
||||
if ($_[0]->get("warranty")) {
|
||||
$file = WebGUI::Attachment->new($_[0]->get("warranty"),$_[0]->get("wobjectId"));
|
||||
$output .= '<a href="'.$file->getURL.'"><img src="'.$file->getIcon.'" border=0 align="absmiddle">'.WebGUI::International::get(15,$namespace).'</a><br>';
|
||||
}
|
||||
$output .= '</td><td valign="top">';
|
||||
if ($_[0]->get("image1")) {
|
||||
$file = WebGUI::Attachment->new($_[0]->get("image1"),$_[0]->get("wobjectId"));
|
||||
$output .= '<a href="'.$file->getURL.'"><img src="'.$file->getThumbnail.'" border=0></a><p>';
|
||||
}
|
||||
if ($_[0]->get("image2")) {
|
||||
$file = WebGUI::Attachment->new($_[0]->get("image2"),$_[0]->get("wobjectId"));
|
||||
$output .= '<a href="'.$file->getURL.'"><img src="'.$file->getThumbnail.'" border=0></a><p>';
|
||||
}
|
||||
if ($_[0]->get("image3")) {
|
||||
$file = WebGUI::Attachment->new($_[0]->get("image3"),$_[0]->get("wobjectId"));
|
||||
$output .= '<a href="'.$file->getURL.'"><img src="'.$file->getThumbnail.'" border=0></a><p>';
|
||||
}
|
||||
$output .= '</td></tr></table>';
|
||||
$output .= '<table border="0" cellpadding="0" cellspacing="5">';
|
||||
$output .= '<tr>';
|
||||
$sth = WebGUI::SQL->read("select feature,productFeatureId from Product_feature where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber");
|
||||
$rows = $sth->rows;
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] = '<td valign="top" class="productFeature">';
|
||||
$column[$i] .= '<div class="productFeatureHeader">'.WebGUI::International::get(30,$namespace).'</div>';
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= '<a href="'.WebGUI::URL::page('func=editFeature&fid=new&wid='
|
||||
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(34,$namespace).'</a><p/>';
|
||||
}
|
||||
}
|
||||
while (%data = $sth->hash) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= deleteIcon('func=deleteFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId})
|
||||
.editIcon('func=editFeature&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId})
|
||||
.moveUpIcon('func=moveFeatureUp&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId})
|
||||
.moveDownIcon('func=moveFeatureDown&wid='.$_[0]->get("wobjectId").'&fid='.$data{productFeatureId});
|
||||
}
|
||||
$column[$i] .= '·'.$data{feature}.'<br>';
|
||||
}
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] .= '</td>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select benefit,productBenefitId from Product_benefit where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber");
|
||||
$rows = $sth->rows;
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] = '<td valign="top" class="productBenefit">';
|
||||
$column[$i] .= '<div class="productBenefitHeader">'.WebGUI::International::get(54,$namespace).'</div>';
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= '<a href="'.WebGUI::URL::page('func=editBenefit&fid=new&wid='
|
||||
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(55,$namespace).'</a><p/>';
|
||||
}
|
||||
}
|
||||
while (%data = $sth->hash) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= deleteIcon('func=deleteBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId})
|
||||
.editIcon('func=editBenefit&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId})
|
||||
.moveUpIcon('func=moveBenefitUp&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId})
|
||||
.moveDownIcon('func=moveBenefitDown&wid='.$_[0]->get("wobjectId").'&bid='.$data{productBenefitId});
|
||||
}
|
||||
$column[$i] .= '·'.$data{benefit}.'<br>';
|
||||
}
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] .= '</td>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select name,value,units,productSpecificationId from Product_specification
|
||||
where wobjectId=".$_[0]->get("wobjectId")." order by sequenceNumber");
|
||||
$rows = $sth->rows;
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] = '<td valign="top" class="productSpecification">';
|
||||
$column[$i] .= '<div class="productSpecificationHeader">'.WebGUI::International::get(31,$namespace).'</div>';
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= '<a href="'.WebGUI::URL::page('func=editSpecification&sid=new&wid='
|
||||
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(35,$namespace).'</a><p/>';
|
||||
}
|
||||
}
|
||||
while (%data = $sth->hash) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= deleteIcon('func=deleteSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId})
|
||||
.editIcon('func=editSpecification&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId})
|
||||
.moveUpIcon('func=moveSpecificationUp&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId})
|
||||
.moveDownIcon('func=moveSpecificationDown&wid='.$_[0]->get("wobjectId").'&sid='.$data{productSpecificationId});
|
||||
}
|
||||
$column[$i] .= '·<span class="productSpecificationLabel">'.$data{name}.':</span> '.$data{value}.' '.$data{units}.'<br>';
|
||||
}
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] .= '</td>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select wobject.title,page.urlizedTitle,Product_accessory.accessoryWobjectId from Product_accessory,wobject,page
|
||||
where Product_accessory.wobjectId=".$_[0]->get("wobjectId")."
|
||||
and Product_accessory.accessoryWobjectId=wobject.wobjectId and wobject.pageId=page.pageId order by Product_accessory.sequenceNumber");
|
||||
$rows = $sth->rows;
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] = '<td valign="top" class="productAccessory">';
|
||||
$column[$i] .= '<div class="productAccessoryHeader">'.WebGUI::International::get(32,$namespace).'</div>';
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= '<a href="'.WebGUI::URL::page('func=addAccessory&wid='
|
||||
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(36,$namespace).'</a><p/>';
|
||||
}
|
||||
}
|
||||
while (%data = $sth->hash) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= deleteIcon('func=deleteAccessory&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId})
|
||||
.moveUpIcon('func=moveAccessoryUp&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId})
|
||||
.moveDownIcon('func=moveAccessoryDown&wid='.$_[0]->get("wobjectId").'&aid='.$data{accessoryWobjectId});
|
||||
}
|
||||
$column[$i] .= '·<a href="'.WebGUI::URL::gateway($data{urlizedTitle}).'">'.$data{title}.'</a><br>';
|
||||
}
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] .= '</td>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$sth = WebGUI::SQL->read("select wobject.title,page.urlizedTitle,Product_related.relatedWobjectId from Product_related,wobject,page
|
||||
where Product_related.wobjectId=".$_[0]->get("wobjectId")."
|
||||
and Product_related.relatedWobjectId=wobject.wobjectId and wobject.pageId=page.pageId order by Product_related.sequenceNumber");
|
||||
$rows = $sth->rows;
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] = '<td valign="top" class="productRelated">';
|
||||
$column[$i] .= '<div class="productRelatedHeader">'.WebGUI::International::get(33,$namespace).'</div>';
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= '<a href="'.WebGUI::URL::page('func=addRelated&wid='
|
||||
.$_[0]->get("wobjectId")).'">'.WebGUI::International::get(37,$namespace).'</a><p/>';
|
||||
}
|
||||
}
|
||||
while (%data = $sth->hash) {
|
||||
if ($session{var}{adminOn}) {
|
||||
$column[$i] .= deleteIcon('func=deleteRelated&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId})
|
||||
.moveUpIcon('func=moveRelatedUp&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId})
|
||||
.moveDownIcon('func=moveRelatedDown&wid='.$_[0]->get("wobjectId").'&rid='.$data{relatedWobjectId});
|
||||
}
|
||||
$column[$i] .= '·<a href="'.WebGUI::URL::gateway($data{urlizedTitle}).'">'.$data{title}.'</a><br>';
|
||||
}
|
||||
if ($rows > 0 || $session{var}{adminOn}) {
|
||||
$column[$i] .= '</td>';
|
||||
$i++;
|
||||
}
|
||||
$sth->finish;
|
||||
$seperator = '<td class="productAttributeSeperator"><img src="'.$session{config}{extras}.'/spacer.gif" width="1" height="1"></td>';
|
||||
$output .= join($seperator,@column);
|
||||
$output .= '</tr>';
|
||||
$output .= '</table>';
|
||||
return $_[0]->processMacros($output);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _reorderAccessories {
|
||||
my ($sth, $i, $id);
|
||||
|
|
@ -1132,7 +964,7 @@ sub www_moveSpecificationUp {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_view {
|
||||
my ($output, %data, $sth, $rows, $file, $i, $segment, $template);
|
||||
my ($output, %data, $sth, $file, $segment, $template);
|
||||
tie %data, 'Tie::CPHash';
|
||||
$output = $_[0]->displayTitle;
|
||||
($template) = WebGUI::SQL->quickArray("select template from Product_template where productTemplateId=".$_[0]->get("productTemplateId"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue