Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove border from image on custom computer configurator


kapssite

Recommended Posts

Posted

I am not sure if this is even the correct file to edit. Basically I have a custom computer configurator (CCC) installed. When you go to build a PC, it brings you to build.php. In the screenshot below, you will see the thick black border around the image. I want to get rid of that border completely so only the image is displayed. Any ideas?

 

ccc.JPG

 

 

This is the code for build.php.

 

<?php
/*
 $Id: build.php,v 1.4 2005/06/17 16:52:52 stephen Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2005 SNJ Computers

 Released under the GNU General Public License
*/
 require('includes/application_top.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CCC);
 define('DROP_DOWN_REQUIRED', '<small><i><font color="red">??'.TEXT_REQUIRED.'</font></i></small>');
 if ($_GET['edit'] != '' && $_GET['products_id'] != ''){
 $system_query = tep_db_query('select products_systype, products_fsb, products_included, products_base_id from ccc_system_edit where products_id = "'.$_GET['products_id'].'" limit 1');
 $system = tep_db_fetch_array($system_query);
 $fsb = $system['products_fsb'];
 $systype = $system['products_systype'];
 $selected = unserialize($system['products_included']);
 if ($system['products_base_id'] > 0){
	$product_info_query = tep_db_query('select products_price, products_id from '.TABLE_PRODUCTS.' where products_id ="'.$system['products_base_id'].'"');
	$product_info = tep_db_fetch_array($product_info_query);
 }
 }else{
 $fsb = $_GET['fsb'];
 $systype = $_GET['systype'];
 }
 if ($_GET['edit'] == '' && $_GET['products_id'] != ''){
 $system_query = tep_db_query('select products_systype, products_fsb from ccc_systems_to_products where products_id = "'.(int)$_GET['products_id'].'"');
 if (tep_db_num_rows($system_query) > 0){
	$system = tep_db_fetch_array($system_query);

	$fsb = $system['products_fsb'];
	$systype = $system['products_systype'];
	$_GET['ccc_pics'] = CCC_POND;

	$product_info_query = tep_db_query("select p.*, pd.* from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
	$product_info = tep_db_fetch_array($product_info_query);
 }else{
	tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO));
 }
 }
 $ccc_speeds_query = tep_db_query('select f.*, fd.* from '.TABLE_CCC_FSB.' f, '.TABLE_CCC_FSB_DESCRIPTION.' fd where f.fsb_id = fd.fsb_id and sys_id = "'.$systype.'" and f.status = "1" order by sort_order asc');
 $ccc_speeds = tep_db_fetch_array($ccc_speeds_query);
 $sysname = $ccc_speeds['fsb_name'];
 $title = $currencies->currencies[$currency]['title'];
 $symbol_left = $currencies->currencies[$currency]['symbol_left'];
 $symbol_right = $currencies->currencies[$currency]['symbol_right'];
 $decimal_point = $currencies->currencies[$currency]['decimal_point'];
 $thousands_point = $currencies->currencies[$currency]['thousands_point'];
 $decimal_places = $currencies->currencies[$currency]['decimal_places'];
 $currency_value = $currencies->currencies[$currency]['value'];
 $tax_rate = tep_get_tax_rate(CCC_TAX_CLASS);
 require(DIR_WS_FUNCTIONS . 'custom_computer.php');

 $form = '<form name="builds" action="'.tep_href_link(FILENAME_CCC_CHECKOUT, tep_get_all_get_params()).'" onSubmit="return myfunction();" method="post">';
 if (CCC_CURRENT_PRODUCTS_SHOW == 'true'){
 $parts_in_system = '<b>'.TEXT_PARTS_IN_SYSTEM.'</b><div id="sysdesc" style="height:100%;width:100%"></div>';
 }
 $text_subtotal = TEXT_SUBTOTAL;
 $submit_button = '<input type="submit" value="'.TEXT_SUBMIT_FORM.'">';
 $reset_button = '<input type="reset" value="'.TEXT_RESET_FORM.'" onClick="form_reset(this.form)">';
 $text_subject_to_change = TEXT_SUBJECT_TO_CHANGE;
 $hidden_fields = tep_draw_hidden_field('fsb', $fsb) .
			   tep_draw_hidden_field('systype', $systype);

 $i = 0;
 $build_list = array();
 $ccc_count_query = tep_db_query('select c.*, cd.* from '.TABLE_CCC_CAT.' c, '.TABLE_CCC_CAT_DESCRIPTION.' cd where c.cat_id = cd.cat_id and fsb_id = "'.$fsb.'" and cd.language_id = "'.(int)$languages_id.'" and c.status = "1" order by sort_order asc');
 $javascript_echo = 'var Computers = [';
 while($count = tep_db_fetch_array($ccc_count_query)){
$cat_name = $count['cat_name'];
$selection_name = 'ccc_part['. $count['cat_id'] . ']';
$drop_menu = tep_get_parts_list($selection_name, $count['cat_id'], $fsb, $systype, $selected[$count['cat_id']], $count['cat_type'], $count['cat_changable']);
if ($count['cat_type'] == '2'){
   $links = '(?<div style="display:inline" id="link_'.$selection_name.'"></div>?)?';
   $ccc_onload .= 'showimage_drop(\''.$selection_name.'\', \'init\');';
}else{
   $links = '<div style="display:inline" id="link_'.$selection_name.'"></div>';
   $ccc_onload .= 'showimage_checkbox(\''.$selection_name.'\', \'init\');';
}
if ($_GET['ccc_pics'] == 'true'){
   $image = '<div id="image_'.$selection_name.'"></div>';
}
$javascript_echo .= '["'.$cat_name.'", "'.$selection_name.'"],';
 $help_decide = '???<input type="button" value="' . TEXT_HELP_DECIDE . '" onmouseover="this.style.cursor=\'hand\'" onclick="java script:ccc_popup(\'ccc_more_info.php?cat_id='.$count['cat_id'].'\')">';
$build_list[] = array('cat_name'		=> $cat_name,
					  'drop_menu'	   => $drop_menu,
					  'text_subtotal'   => $text_subtotal,
					  'links'		   => $links,
					  'cat_description' => $cat_description,
					  'image'		   => $image,
					  'help_decide'	 => $help_decide
					  );
 }
 $javascript_echo .= '];';
 include('ccc_java_common.php');
?>
<div id="prepage" style="position:absolute; font-family:arial; font-size:16; left:0px; top:0px; background-color:white; layer-background-color:white; height:100%; width:100%;display:none">
<table width="100%" height="100%">
<tr>
 <td align="center" valign="middle" class="pageHeading"><b>Please Wait While We Put Your System Together.....</b></td>
</tr>
</table>
</div>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?>
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<!-- body_text //-->
<script>
function waitPreloadPage() { //DOM
if (document.getElementById){
document.getElementById('prepage').style.display='none';
}else{
if (document.layers){ //NS4
document.prepage.display = 'none';
}
else { //IE4
document.all.prepage.style.display = 'none';
}
}
}
</script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<table width="100%" height="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
 <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
 </table></td>
<!-- body_text //-->
 <td width="100%" align="center" valign="top"><table width="100%" border="0" cellpadding="2" cellspacing="0">
  <tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
   <tr>
	<td class="pageHeading"><?php echo HEADER_TITLE_CUSTOM_BUILD; ?></td>
	<!--<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>//-->
   </tr>
  </table></td>
 </tr>
 <tr>
  <td valign="top"><?php echo $form;?><table border="0" width="100%" cellspacing="0" cellpadding="3">
   <tr>
	<td valign="bottom" width="100%"><table border="0" cellpadding="0" cellspacing="0" width="100%">
<?php
 if (isset($product_info)){
?>
	 <tr>
	  <td><table border="0" cellpadding="2" cellspacing="0" width="100%">
	   <tr>
		<td class="main"><?php echo $product_info['products_description'];?></td>
		<td class="main" valign="top">
<?php
 if(tep_not_null($product_info['products_image'])){
?>
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<?php
 }
?>
		</td>
	   </tr>
	  </table></td>
	 </tr>
<?php
 }
?>
	 <tr>
	  <td align="right" valign="top" width="100%"><table border="0" cellpadding="2" cellspacing="0" width="100%">
	   <tr>
		<td class="smalltext" valign="top" width="100%">
<?php if (CCC_CURRENT_PRODUCTS_SHOW == 'true'){ ?>
		<div style="width:100%;height:100px;overflow-x:none;overflow-y:scroll;border: 2px inset;padding-left:3px"><?php echo $parts_in_system;?></div>
<?php } ?>
		</td>
		<td valign="bottom" align="right"><table cellpadding="0" cellspacing="0" border="0">
<?php if (CCC_SUBTOTAL_SHOW == 'true'){ ?>
		 <tr>
		  <td class="main" align="right" valign="top"><?php echo '<b>SubTotal:</b>?';?></td>
		  <td class="main" align="right" valign="top"><div id="SubTotal_Top" style="display:inline">0.00</div></td>
		 </tr>
<?php } ?>

<?php if (CCC_BASE_PRICE_SHOW == 'true' && $product_info['products_id'] > 0){ ?>
		 <tr>
		  <td class="main" align="right" valign="top"><?php echo '<b>Base Price:</b>?';?></td>
		  <td class="main" align="right" valign="top"><div id="Base_Top" style="display:inline">0.00</div></td>
		 </tr>
<?php } ?>

<?php if (CCC_BUILD_PRICE_SHOW == 'true'){ ?>
		 <tr>
		  <td class="main" align="right" valign="top"><?php echo '<b>Build Price:</b>?';?></td>
		  <td class="main" align="right" valign="top"><div id="Build_Top" style="display:inline">0.00</div></td>
		 </tr>
<?php } ?>

<?php if (CCC_COMMISSION_SHOW == 'true'){ ?>
		 <tr>
		  <td class="main" align="right" valign="top"><?php echo '<b>Commission:</b>?';?></td>
		  <td class="main" align="right" valign="top"><div id="Commission_Top" style="display:inline">0.00</div></td>
		 </tr>
<?php } ?>

<?php if (CCC_TAXES_SHOW == 'true' && $tax_rate > 0 && DISPLAY_PRICE_WITH_TAX == 'true'){ ?>
		 <tr>
		  <td class="main" align="right" valign="top"><?php echo '<b>Tax:</b>?';?></td>
		  <td class="main" align="right" valign="top"><div id="Taxes_Top" style="display:inline">0.00</div></td>
		 </tr>
<?php } ?>

<?php if (CCC_TOTAL_SHOW == 'true'){ ?>
		 <tr>
		  <td class="main" align="right" valign="top"><?php echo '<b>' . 'Total:' . '</b>?';?></td>
		  <td class="main" align="right" valign="top"><div id="Total_Top" style="display:inline">0.00</div></td>
		 </tr>
<?php } ?>

		 <tr>
		  <td class="main" align="center" valign="top" colspan="2"><?php echo $submit_button . $reset_button;?></td>
		 </tr>
		</table></td>
	   </tr>
	  </table></td>
	 </tr>
	</table></td>
   </tr>
   <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10');?></td>
   </tr>
   <tr>
	<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" width="100%">
<!-- BEGIN list -->
<?php
 for ($i=0;$i<sizeof($build_list);$i++){
?>
	 <tr>
	  <td class="main" width="100%" valign="top"><table cellpadding="0" cellspacing="0" border="0" width="100%">
	   <tr>
		<td width="100%" valign="top"><table cellpadding="0" cellspacing="0" border="0" width="100%">
		 <tr>
		  <td class="infoBoxHeading">??<font style="font-size:12px"><?php echo $build_list[$i]['cat_name'];?></font></td>
		 </tr>
		</table></td>
	   </tr>
	   <tr>
		<td valign="top"><table cellpadding="0" cellspacing="1" border="0" width="100%" class="infoBox">
		 <tr>
		  <td width="100%" valign="top" class="InfoBoxContents"><table cellpadding="3" cellspacing="3" border="0" width="100%">
		   <tr>
			<td class="main" colspan="2"><?php echo $build_list[$i]['help_decide'] . '?' . $build_list[$i]['links'];?></td>
		   </tr>
		   <tr>
			<td class="infoBoxContents" width="100%" colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '8');?></td>
		   </tr>
		   <tr>
			<td><table cellpadding="2" cellspacing="0" border="0" width="100%">
			 <tr>
			  <td class="main" width="135" align="center" valign="top"><?php echo $build_list[$i]['image'];?></td>
			  <td class="infoBoxContents" valign="top"><table cellpadding="0" cellspacing="0" border="0" width="100%">
			   <tr>
				<td class="main"><?php echo $build_list[$i]['drop_menu'];?></td>
			   </tr>
			  </table></td>
			 </tr>
			</table></td>
		   </tr>
		   <tr>
			<td class="infoBoxContents" width="100%" colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '8');?></td>
		   </tr>
		  </table></td>
		 </tr>
		</table></td>
	   </tr>
	  </table></td>
	 </tr>
	 <tr>
	  <td width="100%"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5');?></td>
	 </tr>
<?php
 }
?>
<!-- END list -->
	</table></td>
   </tr>
   <tr>
	<td width="100%"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10');?></td>
   </tr>
   <tr>
	<td valign="bottom" align="right"><table cellpadding="0" cellspacing="0" border="0">

<?php if (CCC_SUBTOTAL_SHOW == 'true'){ ?>
	 <tr>
	  <td class="main" align="right" valign="top"><?php echo '<b>SubTotal:</b>?';?></td>
	  <td class="main" align="right" valign="top"><div id="SubTotal_Bottom" style="display:inline">0.00</div></td>
	 </tr>
<?php } ?>

<?php if ($product_info['products_id'] > 0){ ?>
	 <tr>
	  <td class="main" align="right" valign="top"><?php echo '<b>Base Price:</b>?';?></td>
	  <td class="main" align="right" valign="top"><div id="Base_Bottom" style="display:inline">0.00</div></td>
	 </tr>
<?php } ?>

<?php if (CCC_BUILD_PRICE_SHOW == 'true'){ ?>
	 <tr>
	  <td class="main" align="right" valign="top"><?php echo '<b>Build Price:</b>?';?></td>
	  <td class="main" align="right" valign="top"><div id="Build_Bottom" style="display:inline">0.00</div></td>
	 </tr>
<?php } ?>

<?php if (CCC_COMMISSION_SHOW == 'true'){ ?>
	 <tr>
	  <td class="main" align="right" valign="top"><?php echo '<b>Commission:</b>?';?></td>
	  <td class="main" align="right" valign="top"><div id="Commission_Bottom" style="display:inline">0.00</div></td>
	 </tr>
<?php } ?>

<?php if (CCC_TAXES_SHOW == 'true' && $tax_rate > 0 && DISPLAY_PRICE_WITH_TAX == 'true'){ ?>
	 <tr>
	  <td class="main" align="right" valign="top"><?php echo '<b>Tax:</b>?';?></td>
	  <td class="main" align="right" valign="top"><div id="Taxes_Bottom" style="display:inline">0.00</div></td>
	 </tr>
<?php } ?>

<?php if (CCC_TOTAL_SHOW == 'true'){ ?>
	 <tr>
	  <td class="main" align="right" valign="top"><?php echo '<b>' . 'Total:' . '</b>?';?></td>
	  <td class="main" align="right" valign="top"><div id="Total_Bottom" style="display:inline">0.00</div></td>
	 </tr>
<?php } ?>

	 <tr>
	  <td class="main" align="center" valign="top" colspan="2"><?php echo $submit_button . $reset_button;?></td>
	 </tr>
	</table></td>
   </tr>
  </table></td>
 </tr>
 <tr>
  <td class="main" align="center"><?php echo $hidden_fields;?></td>
 </tr>
 <tr>
  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
 </tr>
 <tr>
  <td class="smalltext"><?php echo TEXT_HELP_GENERAL; ?></td>
 </tr>
</table></form></td>
  </tr>
 </table></td>
 <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
 </table></td>
<script>
form_reset(document.builds);
waitPreloadPage();
</script>
</tr>
</table>
<!-- body_eof //-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php
require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Posted

Whats the url for your website so I can see the souce code of the build.php page?

Posted

Alright, here is the line that displays the images.

 

<td class="main" width="135" align="center" valign="top"><?php echo $build_list[$i]['image'];?></td>

 

So, where do I change the way the image is displayed?

Posted

In your file : http://www.itwebexperts.com/computer/ccc_javascript.js

 

You will see

 

function buildImage(imageName, separator){ if (imageName == 'images/'){ imageName = 'images/no_image.gif'; } var link = '<img src="'+imageName+'" border="2" onmouseover="this.style.cursor=\'hand\'" onclick="java script:ccc_popup(\'ccc_image.php?image='+imageName+'\')">' + separator; return link; }

 

Edit border="2"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...