#1 (permalink)  
Alt 27.02.2005, 21:31
tmj tmj ist offline
 
Registriert seit: 25.01.2005
Beiträge: 205
Standard

Hallo!

Ich versuche gerade den PC-Konfigurator f?r OsCommerce auf xtCommerce umzuschreiben. Leider komme ich momentan nicht weiter.

Wenn ich im Adminbereich auf den link f?r view_prod klicke ersheint folgende sql Fehlermeldung:

Zitat:

1146 - Table 'xtcommerce.table_ccc_systems' doesn't exist

select c.*, cd.* from TABLE_CCC_SYSTEMS c, TABLE_CCC_SYSTEMS_DESCRIPTION cd where c.sys_id = cd.sys_id and cd.language_id = '2'order by sort_order asc

[XT SQL Error]
Zuerst dachte ich, die Tabelle w?rde nicht existieren wie es aus der Meldung ersichtlich ist. Doch bei Kontrolle habe ich fest gestellt, dass die Tabelle existiert.

Hier mal ein Eintrag der Sicherung:

Zitat:

#Tabellenstruktur f?r Tabelle `ccc_systems`
#

CREATE TABLE `ccc_systems` (
? `sys_id` int(11) NOT NULL auto_increment,
? `sort_order` int(11) NOT NULL default '0',
? `status` tinyint(2) NOT NULL default '1',
? KEY `sys_id` (`sys_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=6 ;

#
#Daten f?r Tabelle `ccc_systems`
#

INSERT INTO `ccc_systems` VALUES (5, 1, 1);
INSERT INTO `ccc_systems` VALUES (2, 2, 1);
Und hier der Inhalt, der betreffenden view_prod.php im adminbereich. Allerdings habe ich noch nicht alle Dateien angepasst:

Code:
<?php
/*
 ?Custom Computer Creator 
 ?Version 9.3
 ?7/10/2004
 ?view_prod.php
 ?Designed And Coded By: Stephen Walker
 ?
 ?You Are Free To Edit This File However You Would Like
 ?Custom Computer Creator Is Coded For A Base In OsCommerce Shopping Cart
 ?Released under the GNU General Public License
*/

 ?require('includes/application_top.php');
 ?$languages = xtc_get_languages();
 ?$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
 ?if ($_GET['cPath'] != ''){
 ?$cPath = $HTTP_GET_VARS['cPath'];
 ? ? $cPath_array = explode('_', $HTTP_GET_VARS['cPath']); //Added For $cPath_array Bug
 ?}


 xtc_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', (($categories_name[$languages[$i]['id']]) ? stripslashes($categories_name[$languages[$i]['id']]) : xtc_get_categories_name($cInfo->categories_id, $languages[$i]['id'])));
 //xtc_draw_input_field('categories_name[' . $languages[$i]['id'] . ']')

 ?//require(DIR_WS_LANGUAGES . $language . '/admin/modules/ccc/' . FILENAME_CCC_VIEW_PROD);
 ? if (xtc_not_null($action)) {
 ? ?switch ($action) {
 ? ? ?case 'setflag':
 ? ? xtc_db_query('update '.TABLE_CCC_PROD.' set default_prod = "0" where default_prod = "1" and cat_id = "'.$cPath_array[2].'" and fsb_id = "'.$cPath_array[1].'" limit 1');
 ? ? xtc_db_query('update '.TABLE_CCC_PROD.' set default_prod = "1" where default_prod = "0" and cat_id = "'.$cPath_array[2].'" and fsb_id = "'.$cPath_array[1].'" and product_id = "'.$HTTP_GET_VARS['sID'].'" limit 1');
 ? ? ? ? ? xtc_redirect(xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '&sID=' . $HTTP_GET_VARS['sID']));
 ? ? ?break;
 ? ? ?case 'insert_sys':
 ? ? ?case 'update_sys':
 ? ? ? ? ? $insert_array = array('status' => $_POST['status'],
 ? ? ? ? ? ? ? ? ? ? ? ? ? 'sort_order' => $_POST['sort_order']);
 ? if ($action == 'insert_sys'){
 ? ? ? ? xtc_db_perform(TABLE_CCC_SYSTEMS, $insert_array);
 ? $system_id = xtc_db_insert_id();
 ? }elseif ($action == 'update_sys'){
 ? ? ? ? xtc_db_perform(TABLE_CCC_SYSTEMS, $insert_array, 'update', 'sys_id="'.$HTTP_GET_VARS['sID'].'"');
 ? $system_id = $HTTP_GET_VARS['sID'];
 ? }
 ? ? ?for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
 ? ?$sys_description_array = $HTTP_POST_VARS['sys_description'];
 ? ?$sys_name_array = $HTTP_POST_VARS['sys_name'];
 ? ?$language_id = (int)$languages[$i]['id'];
 ? ?$sys_description = xtc_db_prepare_input($sys_description_array[$language_id]);
 ? ?$sys_name = xtc_db_prepare_input($sys_name_array[$language_id]);

 ? ? ? ? ?$update_array = array('sys_id' => $system_id,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'sys_name' => $sys_name,
 ? ? ? ? ? ? ? ? ? ? ? ? ?'sys_description' => $sys_description,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'language_id' => (int)$languages[$i]['id']);
 ? ? ? ? ?if ($action == 'insert_sys') {
 ? ? ? ? ? ?xtc_db_perform(TABLE_CCC_SYSTEMS_DESCRIPTION, $update_array);
 ? ? ? ? ?} elseif ($action == 'update_sys') {
 ? ? ? ? ? ?xtc_db_perform(TABLE_CCC_SYSTEMS_DESCRIPTION, $update_array, 'update', "sys_id = '" . (int)$system_id . "' and language_id = '" . $language_id . "'");
 ? ? ? ? ?}
 ?}
 ? break;
 ? case 'delete_sys_confirm':
 ? ?$system_info_query = xtc_db_query('select fsb_id, sys_id from '.TABLE_CCC_FSB.' where sys_id = "'.$HTTP_POST_VARS['sys_id'].'"');
 ? ?while ($system_info = xtc_db_fetch_array($system_info_query)){
 ? ? ? ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_PROD.' where fsb_id = "'. $system_info['fsb_id'].'"');
 ? ?$cat_info_query = xtc_db_query('select cat_id from '.TABLE_CCC_CAT.' where sys_id = "'.$system_info['sys_id'].'" and fsb_id = "'.$system_info['fsb_id'].'"');
 ? ?while ($cat_info = xtc_db_fetch_array($cat_info_query)){
 ? ? ? ? ? ? ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_CAT.' where cat_id = "'.$cat_info['cat_id'].'"');
 ? ? ? ? ? ? ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_CAT_DESCRIPTION.' where cat_id = "'.$cat_info['cat_id'].'"');
 ? ?}
 ? ?$fsb_info_query = xtc_db_query('select sys_id, fsb_id from '.TABLE_CCC_FSB.' where sys_id = "'.$HTTP_POST_VARS['sys_id'].'"');
 ? ?while ($fsb_info = xtc_db_fetch_array($fsb_info_query)){
 ? ? ? ? ? ? ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_FSB.' where sys_id = "'.$fsb_info['sys_id'].'"');
 ? ? ? ? ? ? ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_FSB_DESCRIPTION.' where fsb_id = "'.$fsb_info['fsb_id'].'"');
 ? ?}
 ? ?}
 ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_SYSTEMS.' where sys_id = "'.$HTTP_POST_VARS['sys_id'].'"');
 ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_SYSTEMS_DESCRIPTION.' where sys_id = "'.$HTTP_POST_VARS['sys_id'] .'"');
 ? break;

 ? ? ?case 'insert_fsb':
 ? ? ?case 'update_fsb':
 ? ? ? ? ? $insert_array = array('status' => $HTTP_POST_VARS['status'],
 ? ? ? ? ? ? ? ? ? ? ? ? ? 'sort_order' => $HTTP_POST_VARS['sort_order'],
 ? ? ? ? ? ? ? ? ? ? ? ? ? 'sys_id' => $HTTP_POST_VARS['sys_id']);
 ? if ($action == 'insert_fsb'){
 ? ? ? ? xtc_db_perform(TABLE_CCC_FSB, $insert_array);
 ? $fsb_id = xtc_db_insert_id();
 ? }elseif ($action == 'update_fsb'){
 ? ? ? ? xtc_db_perform(TABLE_CCC_FSB, $insert_array, 'update', 'fsb_id="'.$HTTP_GET_VARS['sID'].'"');
 ? $fsb_id = $HTTP_GET_VARS['sID'];
 ? }
 ? ? ?for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
 ? ?$fsb_description_array = $HTTP_POST_VARS['fsb_description'];
 ? ?$fsb_name_array = $HTTP_POST_VARS['fsb_name'];
 ? ?$language_id = (int)$languages[$i]['id'];
 ? ?$fsb_description = xtc_db_prepare_input($fsb_description_array[$language_id]);
 ? ?$fsb_name = xtc_db_prepare_input($fsb_name_array[$language_id]);

 ? ? ? ? ?$update_array = array('fsb_id' => $fsb_id,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'fsb_name' => $fsb_name,
 ? ? ? ? ? ? ? ? ? ? ? ? ?'fsb_description' => $fsb_description,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'language_id' => (int)$languages[$i]['id']);
 ? ? ? ? ?if ($action == 'insert_fsb') {
 ? ? ? ? ? ?xtc_db_perform(TABLE_CCC_FSB_DESCRIPTION, $update_array);
 ? ? ? ? ?} elseif ($action == 'update_fsb') {
 ? ? ? ? ? ?xtc_db_perform(TABLE_CCC_FSB_DESCRIPTION, $update_array, 'update', "fsb_id = '" . (int)$fsb_id . "' and language_id = '" . $language_id . "'");
 ? ? ? ? ?}
 ?}
 ? break;
 ? ? ?case 'delete_fsb_confirm':
 ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_FSB.' where fsb_id = "'.$HTTP_POST_VARS['fsb_id'].'"');
 ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_FSB_DESCRIPTION.' where fsb_id = "'.$HTTP_POST_VARS['fsb_id'].'"');
 ? ?$cat_info_query = xtc_db_query('select cat_id from '.TABLE_CCC_CAT.' where fsb_id = "'.$HTTP_POST_VARS['fsb_id'].'"');
 ? ?while ($cat_info = xtc_db_fetch_array($cat_info_query)){
 ? ? ? ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_CAT.' where cat_id = "'.$cat_info['cat_id'].'"');
 ? ? ? ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_CAT_DESCRIPTION.' where cat_id = "'.$cat_info['cat_id'].'"');
 ? ?}
 ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_PROD.' where fsb_id = "'.$HTTP_POST_VARS['fsb_id'].'"');
 ? break;

 ? ? ?case 'insert_category':
 ? ? ?case 'update_category':
 ? ?$update_array = array('sys_id' => $HTTP_POST_VARS['sys_id'], 
 ? ? ? ? ? ? ? ? ? ? ? ? ?'status' => $HTTP_POST_VARS['status'],
 ? ? ? ? ? ? ? ? ? ? ? ? ?'cat_req' => $HTTP_POST_VARS['cat_req'], 
 ? ? ? ? ? ? ? ? ? ? ? 'sort_order' => $HTTP_POST_VARS['sort_order']);


 ? ?if ($action == 'update_category'){
// ? ? ? ? ? ? xtc_db_perform(TABLE_CCC_CAT, $update_array, 'update', 'cat_id = "' . $HTTP_GET_VARS['sID'] . '" and sys_id = "'.$HTTP_POST_VARS['sys_id'].'"');
 ? ?$cat_id = $HTTP_GET_VARS['sID'];
 ? ? ? if (is_array($HTTP_POST_VARS['fsb'])){
 ? ?$fsb_array = $HTTP_POST_VARS['fsb'];
 ? ?for($i=0, $n=sizeof($fsb_array);$i<$n;$i++){
 ? ? ? ? ?xtc_db_query('delete from '.TABLE_CCC_CAT.' where cat_id = "'.$cat_id.'" and fsb_id = "'.$fsb_array[$i].'"');
 ? ?	$fsb = xtc_db_query('select sys_id, fsb_id from '.TABLE_CCC_FSB.' where fsb_id = "'.$fsb_array[$i].'"');
 ? ?	$fsb = xtc_db_fetch_array($fsb);
 ? ? ? ? ? ? ? ? ? ? ? $update_array['cat_id'] = $cat_id;
 ? ? ? ? ? ? ? ? $update_array['fsb_id'] = $fsb_array[$i];
 ? ? ? ? ? ? ? ? $update_array['sys_id'] = $fsb['sys_id'];
 ? ? ? ? ? ? ? ? ? ? ? xtc_db_perform(TABLE_CCC_CAT, $update_array);
 ? ?}
 ? ?}
 ? ? ? }else{
 ? ? ? if (is_array($HTTP_POST_VARS['fsb'])){
 ? ?$fsb_array = $HTTP_POST_VARS['fsb'];
 ? ?for($i=0, $n=sizeof($fsb_array);$i<$n;$i++){
 ? ?	$fsb = xtc_db_query('select sys_id, fsb_id from '.TABLE_CCC_FSB.' where fsb_id = "'.$fsb_array[$i].'"');
 ? ?	$fsb = xtc_db_fetch_array($fsb);
 ? ? ? if (isset($cat_id)){
 ? ? ? ? ? ? ? ? ? ? ?$update_array['cat_id'] = $cat_id;
 ? ? ? }
 ? ? ? ? ? ? $update_array['fsb_id'] = $fsb['fsb_id'];
 ? ? ? ? ? ? $update_array['sys_id'] = $fsb['sys_id'];
 ? ? ? ? ? ? ? ? ? xtc_db_perform(TABLE_CCC_CAT, $update_array);
 ? ? ? if (!$cat_id){
 ? ? ? ? ?$cat_id = xtc_db_insert_id();
 ? ? ? }
 ? ?}
 ? ?}
 ? ? ? }
 ? ? ?for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
 ? ?$cat_description_array = $HTTP_POST_VARS['cat_description'];
 ? ?$cat_name_array = $HTTP_POST_VARS['cat_name'];
 ? ?$language_id = (int)$languages[$i]['id'];
 ? ?$cat_description = xtc_db_prepare_input($cat_description_array[$language_id]);
 ? ?$cat_name = xtc_db_prepare_input($cat_name_array[$language_id]);

 ? ? ? ? ?$update_array = array('cat_id' => $cat_id,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'cat_name' => $cat_name,
 ? ? ? ? ? ? ? ? ? ? ? ? ?'cat_description' => $cat_description,
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?'language_id' => (int)$languages[$i]['id']);
 ? ? ? ? ?if ($action == 'insert_category') {
 ? ? ? ? ? ? xtc_db_perform(TABLE_CCC_CAT_DESCRIPTION, $update_array);
 ? ? ? ? ?} elseif ($action == 'update_category') {
 ? ? ? ? ? ? xtc_db_perform(TABLE_CCC_CAT_DESCRIPTION, $update_array, 'update', "cat_id = '" . (int)$cat_id . "' and language_id = '" . $language_id . "'");
 ? ? ? ? ?}
 ? }
 ? break;
 ? ? ?case 'delete_category_confirm':
 ? ? ? ? ? ?xtc_db_query('delete from ' . TABLE_CCC_CAT . ' where cat_id = "' . $HTTP_POST_VARS['cat_id'] . '"');
 ? ? ? ? ? ?xtc_db_query('delete from ' . TABLE_CCC_CAT_DESCRIPTION . ' where cat_id = "' . $HTTP_POST_VARS['cat_id'] . '"');
 ? ? ? ? ? ?xtc_db_query('delete from ' . TABLE_CCC_PROD . ' where cat_id = "' . $HTTP_POST_VARS['cat_id'] . '"');
 ? break;

 ? case 'new_product_confirm':
 ? ?if ($_POST['all_prod'] != 'all'){
 ? ? ? $products = $HTTP_POST_VARS['products'];
 ? ? ? for ($i=0, $n=sizeof($products);$i<$n;$i++){
 ? ? ? ? ? ? ? ? $product_query = xtc_db_query('select products_id from ' . TABLE_PRODUCTS . ' where products_id = "'.$products[$i].'"');
 ? ? ? ? ? ? ? ? while($product = xtc_db_fetch_array($product_query)){
 ? ? ? ? ? ? ? ?$update_array = array('osc_prod_id' => xtc_db_prepare_input($product['products_id']),
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'cat_id' => $cPath_array[2],
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'fsb_id' => $cPath_array[1],
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'sort_order' => $sort_order);
 ? ? ? ? ? ? ? ?xtc_db_perform(TABLE_CCC_PROD, $update_array);
 ? ? ? ? ? }
 ? ?}
 ? ? ? }else{
 ? ? ? ? ? $product_query = xtc_db_query('select p.products_id from ' . TABLE_PRODUCTS . ' p, ' . TABLE_PRODUCTS_TO_CATEGORIES . ' p2c where p2c.categories_id = "' . $HTTP_POST_VARS['categories_id'] . '" and p2c.products_id = p.products_id');
 ? ? ? ?$sort_order_fix = '0';
 ? ? while($product = xtc_db_fetch_array($product_query)){
 ? ? ? ? ?$sort_order_fix++;
 ? ? ? ? ?$update_array = array();
 ? ? ? ? ?$update_array = array('osc_prod_id' => xtc_db_prepare_input($product['products_id']),
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'cat_id' => $cPath_array[2],
 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'fsb_id' => $cPath_array[1],
 ? ? ? ? ? ? ? ? ? ? ? 'sort_order' => $sort_order_fix
 ? ?	); ? ?
 ? ? ? ? ?xtc_db_perform(TABLE_CCC_PROD, $update_array);
 ? ? }
 ? ? ? }
 ? break;
 ? ? ?case 'delete_product_confirm':
 ? ? ? ? ? ?xtc_db_query('delete from ' . TABLE_CCC_PROD . ' where product_id = "' . $HTTP_GET_VARS['sID'] . '"');
 ? break;
 ? ?}
 ?}
?>
<!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; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">
<div id="spiffycalendar" class="text"></div>
<!#header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!#header_eof //-->

<!#body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 ?<tr>
 ? ?<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!#left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!#left_navigation_eof //-->
 ? ?</table></td>
<!#body_text //-->
 ? ?<td width="100%" valign="top">
 ? ?<table border="0" width="100%" cellspacing="0" cellpadding="2">
 ? ? ?<tr>
 ? ? ? ?<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
 ? ? ? ? ?<tr>
 ? ? ? ? ? ?<td class="pageHeading"></td>
 ? ? ? ? ? ?<td class="pageHeading" align="right"><?php echo xtc_draw_separator('pixel_trans.gif', 1, HEADING_IMAGE_HEIGHT); ?></td>
 ? ? ? ? ? ?<td align="right"><table border="0" width="100%" cellspacing="0" cellpadding="0">
 ? ? ? ? ? ? ?<tr>
 ? ? ? ? ? ? ? ?<td class="smallText" align="right">
<?php
 ? ?echo xtc_draw_form('search', FILENAME_CCC, '', 'get');
 ? ?echo 'Search: ' . xtc_draw_input_field('search');
 ? ?echo '</form>';
?>
 ? ? ? ? ? ? ? ?</td>
 ? ? ? ? ? ? ?</tr>
 ? ? ? ? ? ?</table></td>
 ? ? ? ? ?</tr>
 ? ? ? ?</table></td>
 ? ? ?</tr>
 ? ? ?<tr>
 ? ? ? ?<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
 ? ? ? ? ?<tr>
 ? ? ? ? ? ?<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 ? ? ? ? ? ? ?<tr class="dataTableHeadingRow">
 ? ? ? ? ? ? ? ?<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CATEGORIES_PRODUCTS;?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableHeadingContent" align="center"><?php echo ((sizeof($cPath_array) == 3) ? TABLE_HEADING_DEFAULT : TABLE_HEADING_STATUS);?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_SORT_ORDER;?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION;?></td>
 ? ? ? ? ? ? ?</tr>
<?php
 ? ?$categories_count = 0;
 ? ?$rows = 0;
if (sizeof($cPath_array) == 1){
 ? ?if (isset($HTTP_GET_VARS['search'])) {
 ? ? ?$search = xtc_db_prepare_input($HTTP_GET_VARS['search']);
 ? ? ?$fsb_query = xtc_db_query("select * from ".TABLE_CCC_FSB." f, ".TABLE_CCC_FSB_DESCRIPTION." fd where fd.fsb_name like '%" . xtc_db_input($search) . "%' order by sort_order asc");
 ? ?} else {
 ? ? ?$fsb_query = xtc_db_query('select f.*, fd.* from '.TABLE_CCC_FSB.' f, '.TABLE_CCC_FSB_DESCRIPTION.' fd where f.sys_id = "'.$cPath.'" and fd.fsb_id = f.fsb_id and fd.language_id = "'.(int)$languages_id.'" order by f.sort_order asc');
	}
 ? ? while($fsb = xtc_db_fetch_array($fsb_query)){
 ? ? $fsb_count++;
 ? ? ?$rows++;

// Get parent_id for subcategories if search
 ? ? ?if (isset($HTTP_GET_VARS['search'])) $cPath = $cPath . '_' . $fsb['fsb_id'];

 ? ? ?if ((!isset($HTTP_GET_VARS['sID']) || (isset($HTTP_GET_VARS['sID']) && ($HTTP_GET_VARS['sID'] == $fsb['fsb_id']))) && !isset($fsbInfo)) {
 ? ? ? ?$fsb_childs = array('childs_count' => xtc_childs_in_category_count($fsb['fsb_id']));
 ? ? ? ?$fsb_products = array('products_count' => xtc_products_in_category_count($fsb['fsb_id']));

 ? ? ? ?$fsbInfo_array = array_merge($fsb, $fsb_childs, $fsb_products);
 ? ? ? ?$fsbInfo = new objectInfo($fsbInfo_array);
 ? ? ?}

 ? ? ?if ((isset($fsbInfo) && is_object($fsbInfo) && ($fsb['fsb_id'] == $fsbInfo->fsb_id)) || ($_GET['sID'] == $fsb['fsb_id'])) {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '_' . $fsbInfo->fsb_id) . '\'">' . "\n";
 ? ? ?} else {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '&sID=' . $fsb['fsb_id']) . '\'">' . "\n";
 ? ? ?}
?>
 ? ? ? ? ? ? ? ?<td class="dataTableContent"><?php echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '_' . $fsb['fsb_id']) . '">' . xtc_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a><b>' . $fsb['fsb_name'] . '</b>'; ?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center"><?php echo (($fsb['status'] == '1') ? TEXT_ENABLED : TEXT_DISABLED );?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center"><?php echo $fsb['sort_order'];?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="right"><?php if (isset($fsbInfo) && is_object($fsbInfo) && ($fsb['fsb_id'] == $fsbInfo->fsb_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '_' . $fsb['fsb_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?></td>
 ? ? ? ? ? ? ?</tr>
<?php
 ? ?}
}elseif (sizeof($cPath_array) == 2){
 ? ?$cat_count = 0;
 ? ?if (isset($HTTP_GET_VARS['search'])) {
 ? ? ?$cat_query = xtc_db_query("select c.*, cd.* from " . TABLE_CCC_CAT . " c, " . TABLE_CCC_CAT_DESCRIPTION . " cd where cd.cat_name like '%" . xtc_db_input($search) . "%' and cd.cat_id = c.cat_id and cd.language_id = '".(int)$languages_id."' order by cat_name");
 ? ?} else {
 ? ? ?$cat_query = xtc_db_query('select c.*, cd.* from ' . TABLE_CCC_CAT . ' c, ' . TABLE_CCC_CAT_DESCRIPTION . ' cd where cd.cat_id = c.cat_id and cd.language_id = "'.(int)$languages_id.'" and c.fsb_id = "'.$cPath_array[1].'" order by sort_order asc');
 ? ?}
 ? ?$test = 0;
	while($cat = xtc_db_fetch_array($cat_query)){
 ? ? ?$cat_count++;
 ? ? ?$rows++;

// Get categories_id for product if search
 ? ? ?if (isset($HTTP_GET_VARS['search'])) $cPath = $cPath . '_' . $cat['cat_id'];

 ? ? ?if ((!isset($HTTP_GET_VARS['sID']) && !isset($catInfo) || (isset($HTTP_GET_VARS['sID'])) && ($HTTP_GET_VARS['sID'] == $cat['cat_id']) && !isset($catInfo))) {
 ? ? ? ?$catInfo = new objectInfo($cat);
 ? ? ?}

 ? ? ?if (isset($catInfo) && is_object($catInfo) && ($cat['cat_id'] == $catInfo->cat_id) ?|| ($_GET['sID'] == $cat['cat_id'])) {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '_' . $catInfo->cat_id) . '\'">' . "\n";
 ? ? ?} else {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '&sID=' . $cat['cat_id']) . '\'">' . "\n";
 ? ? ?}
?>
 ? ? ? ? ? ? ? ?<td class="dataTableContent"><?php echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '_' . $cat['cat_id']) . '">' . xtc_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a><b>' . $cat['cat_name']; ?></b></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center"><?php echo (($cat['status'] == '1') ? TEXT_ENABLED : TEXT_DISABLED );?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center"><?php echo $cat['sort_order'];?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="right"><?php if (isset($catInfo) && is_object($catInfo) && ($cat['cat_id'] == $catInfo->cat_id)) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '_' . $cat['cat_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?></td>
 ? ? ? ? ? ? ?</tr>
<?php
 ? ? ?$test = $test+1;
 ? ?}
echo '<input type="hidden" name="total" value="'.$test.'">';
}elseif (sizeof($cPath_array) == 3){
 ? ?$products_count = 0;
 ? ?if (isset($HTTP_GET_VARS['search'])) {
 ? ? ? $product_query = xtc_db_query('select cp.sort_order, cp.default_cat, cp.default_fsb, pd.products_name, cp.products_id, cp.osc_prid, cp.category from ccc_products cp, products_description pd where FIND_IN_SET("'.$cPath_array[2].'", cp.default_cat) and pd.products_id = cp.osc_prid and pd.language_id = "'. (int)$languages_id .'" order by cp.sort_order asc');
 ? ?} else {
 ? ? ? $product_query = xtc_db_query('select c.*, pd.products_name, pd.products_id from '.TABLE_CCC_PROD.' c, '.TABLE_PRODUCTS_DESCRIPTION.' pd where c.cat_id = "'.$cPath_array[2].'" and c.fsb_id = "'.$cPath_array[1].'" and pd.products_id = c.osc_prod_id and pd.language_id = "'.(int)$languages_id.'" order by sort_order asc');
 ? ?}
 ? ?$test = 0;
 ? ?while($product = xtc_db_fetch_array($product_query)){
 ? ? ?$products_count++;
 ? ? ?$rows++;
// Get categories_id for product if search
 ? ? ?if (isset($HTTP_GET_VARS['search'])) $cPath = $product['product_id'];

 ? ? ?if ((!isset($HTTP_GET_VARS['sID']) && !isset($prodInfo) || (isset($HTTP_GET_VARS['sID'])) && ($HTTP_GET_VARS['sID'] == $product['product_id']) && !isset($prodInfo))) {
 ? $product_info_query = xtc_db_query('select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price from products_description pd, products p where p.products_id = "'.$product['osc_prod_id'].'" and p.products_id = pd.products_id and pd.language_id = "'.(int)$languages_id.'"');
 ? $product_info = xtc_db_fetch_array($product_info_query);
 ? $products = array_merge($product, $product_info);
 ? ? ? ? $prodInfo = new objectInfo($products);
 ? ? ?}

 ? ? ?if (isset($prodInfo) && is_object($prodInfo) && ($product['osc_prod_id'] == $prodInfo->products_id) || ($_GET['sID'] == $product['product_id'])) {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
 ? ? ?} else {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '&sID=' . $product['product_id']) . '\'">' . "\n";
 ? ? ?}
?>
 ? ? ? ? ? ? ? ?<td class="dataTableContent"><?php echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '&sID=' . $product['product_id']) . '">' . xtc_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>' . $product['products_name']; ?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center">
 ? ?<?php 
 ? ? ?if ($product['default_prod'] == '1') {
 ? ? ? ?echo xtc_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10);
 ? ? ?} else {
 ? ? ? ?echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '&sID=' . $product['product_id'] . '&action=setflag&flag=true') . '">' . xtc_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>';
 ? ? ?}
 ? ??>
 ? ?</td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center"><?php echo $product['sort_order'];?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="right"><?php if (isset($prodInfo) && is_object($prodInfo) && ($product['product_id'] == $prodInfo->product_id)) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $cPath . '&sID=' . $product['product_id']) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?></td>
 ? ? ? ? ? ? ?</tr>
<?php
 ? ? ?$test = $test+1;
 ? ?}
}else{
 ? ?if (isset($HTTP_GET_VARS['search'])) {
 ? ? ?$search = xtc_db_prepare_input($HTTP_GET_VARS['search']);
 ? ? ?$sys_query = xtc_db_query("select c.*, cd.* from " . TABLE_CCC_SYSTEMS . " c, " . TABLE_CCC_SYSTEMS_DESCRIPTION . " cd where sys_name like '%" . xtc_db_input($search) . "%' order by sort_order asc");
 ? ?} else {
 ? ? ?$sys_query = xtc_db_query("select c.*, cd.* from " . TABLE_CCC_SYSTEMS . " c, " . TABLE_CCC_SYSTEMS_DESCRIPTION . " cd where c.sys_id = cd.sys_id and cd.language_id = '".(int)$languages_id."'order by sort_order asc");
 ? ?}
 ? ?while ($sys = xtc_db_fetch_array($sys_query)) {
// Get parent_id for subcategories if search
 ? ? ?if (isset($HTTP_GET_VARS['search'])) $cPath = $sys['sys_id'];

 ? ? ?if ((!isset($HTTP_GET_VARS['sID']) || (isset($HTTP_GET_VARS['sID']) && ($HTTP_GET_VARS['sID'] == $sys['sys_id']))) && !isset($sysInfo)) {

 ? ? ? ?$sysInfo = new objectInfo($sys);
 ? ? ?}

 ? ? ?if (isset($sysInfo) && is_object($sysInfo) && ($sys['sys_id'] == $sysInfo->sys_id) || ($_GET['sID'] == $sys['sys_id'])) {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $sys['sys_id']) . '\'">' . "\n";
 ? ? ?} else {
 ? ? ? ?echo ' ? ? ? ? ? ? ?<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'sID=' . $sys['sys_id']) . '\'">' . "\n";
 ? ? ?}
?>
 ? ? ? ? ? ? ? ?<td class="dataTableContent"><?php echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, xtc_get_path($sys['sys_id'])) . '">' . xtc_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a><b>' . $sys['sys_name'] . '</b>'; ?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center"><?php echo (($sys['status'] == '1') ? TEXT_ENABLED : TEXT_DISABLED );?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="center"><?php echo $sys['sort_order'];?></td>
 ? ? ? ? ? ? ? ?<td class="dataTableContent" align="right"><?php if (isset($sysInfo) && is_object($sysInfo) && ($sys['sys_id'] == $sysInfo->sys_id) ) { echo xtc_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, xtc_get_path($sys['sys_id'])) . '">' . xtc_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?></td>
 ? ? ? ? ? ? ?</tr>
<?php
 ? ?}
}
 ? ?$cPath_back = '';
 ? ?if (sizeof($cPath_array) > 0) {
 ? ? ?for ($i=0, $n=sizeof($cPath_array)-1; $i<$n; $i++) {
 ? ? ? ?if (empty($cPath_back)) {
 ? ? ? ? ?$cPath_back .= $cPath_array[$i];
 ? ? ? ?} else {
 ? ? ? ? ?$cPath_back .= '_' . $cPath_array[$i];
 ? ? ? ?}
 ? ? ?}
 ? ?}

 ? ?$cPath_back = (xtc_not_null($cPath_back)) ? 'cPath=' . $cPath_back . '&' : '';
?>
 ? ? ? ? ? ? ?<tr>
 ? ? ? ? ? ? ? ?<td colspan="4"><table border="0" width="100%" cellspacing="0" cellpadding="2">
 ? ? ? ? ? ? ? ? ?<tr>
 ? ? ? ? ? ? ? ? ? ?<td class="smallText"></td>
 ? ? ? ? ? ? ? ? ? ?<td align="right" class="smallText">
 ? ?	<?php if (sizeof($cPath_array) > 0) {
 ? ? ? ? ? ? ? echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, $cPath_back . 'sID=' . $current_category_id) . '">' . xtc_image_button('button_back.gif', IMAGE_BACK) . '</a>';
 ? ? ? ? }elseif ($system != ''){
 ? ? ? ? ? ? ? echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, $cPath_back . 'sID='.$_GET['system']) . '">' . xtc_image_button('button_back.gif', IMAGE_BACK) . '</a>';
 ? ? ? ? }
 ? ? ? ? ? if (!isset($HTTP_GET_VARS['search'])) {
 ? ? ? ?if (sizeof($cPath_array) == 1)echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $_GET['cPath'] . '&sID=' . $fsbInfo->fsb_if . '&action=new_fsb') . '">' . xtc_image_button('button_insert.gif', IMAGE_NEW_FSB) . '</a>';
 ? ? ? ?if (sizeof($cPath_array) == 2)echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $_GET['cPath'] . '&sID=' . $catInfo->ccc_id . '&action=new_cat') . '">' . xtc_image_button('button_new_category.gif', IMAGE_NEW_CATEGORY) . '</a>';
 ? ? ? ?if (sizeof($cPath_array) == 3)echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $_GET['cPath'] . '&sID=' . $_GET['sID'] . '&action=new_product') . '">' . xtc_image_button('button_new_product.gif', IMAGE_NEW_PRODUCT) . '</a>';
 ? ? ? ?if (sizeof($cPath_array) == 0)echo '<a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'cPath=' . $_GET['cPath'] . '&sID=' . $_GET['sID'] . '&action=new_sys') . '">' . xtc_image_button('button_insert.gif', 'New System Type') . '</a>';
 ? ? ? ? }
 ? ? ? ? ?>
 ? ? ? ?</td>
 ? ? ? ? ? ? ? ? ?</tr>
 ? ? ? ? ? ? ? ?</table></td>
 ? ? ? ? ? ? ?</tr>
 ? ? ? ? ? ?</table></td>
<?php
 ? ?$heading = array();
 ? ?$contents = array();
 ? ?switch ($action) {
 ? ? ?case 'edit_sys':
 ? ? ?case 'new_sys':
 ?$form_action = (($action == 'edit_sys') ? 'update_sys' : 'insert_sys');
 ? ? $intro = (($action == 'edit_sys') ? TEXT_EDIT_SYSTEM_INTRO : TEXT_ADD_SYSTEM_INTRO);
 ?$header = (($action == 'edit_sys') ? TEXT_EDIT_SYSTEM : TEXT_ADD_SYSTEM);
 ? ? ? ?$heading[] = array('text' => '<b>'.$header.'</b>');
 ? ? ? ?$contents = array('form' => xtc_draw_form('sys', FILENAME_CCC_VIEW_PROD, 'sID='.$_GET['sID'].'&action=' . $form_action) . xtc_draw_hidden_field('sys_id', $sysInfo->sys_id));
 ? ? ? ?$contents[] = array('text' => $intro);
 ? ? ? for ($i=0, $n=sizeof($languages);$i<$n;$i++){
 ?$language_image = xtc_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '';
 ?if ($action == 'edit_sys'){
 ? ? $system_language = xtc_db_query('select * from '.TABLE_CCC_SYSTEMS_DESCRIPTION.' where language_id = "'.$languages[$i]['id'].'" and sys_id = "'.$HTTP_GET_VARS['sID'].'"');
 ? ? ? ?$system_language = xtc_db_fetch_array($system_language);
 ?}
 ? ? ? ?$contents[] = array('text' => '<br><b>'.$language_image . TEXT_SYSTEM_NAME.'</b>');
 ? ? ? ?$contents[] = array('text' => xtc_draw_input_field('sys_name['.$languages[$i]['id'].']', $system_language['sys_name']));
 ? ? ? ?$contents[] = array('text' => '<br><b>'.$language_image . TEXT_SYSTEM_DESCRIPTION.'</b>');
 ? ? ? ?$contents[] = array('text' => xtc_draw_textarea_field('sys_description['.$languages[$i]['id'].']', 'soft', '40', '10', $system_language['sys_description']));
 ? ?}
 ? ? ? ?$contents[] = array('text' => '<br><b>'.TEXT_SORT_ORDER.'</b><br>'.xtc_draw_input_field('sort_order', $sysInfo->sort_order));
 ? ? ? ?$contents[] = array('text' => xtc_draw_radio_field('status', '1', (($sysInfo->status == '1') ? true : false)) . TEXT_ENABLED . '<br>' . xtc_draw_radio_field('status', '0', (($sysInfo->status == '0') ? true : false)) . TEXT_DISABLED);
 ? ? ? ?$contents[] = array('align' => 'center', 'text' => '<br>' . xtc_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'sID='.$_GET['sID']) . '">' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
 ? ? ? ?break;
 ? ? ?case 'delete_sys':
 ? ? ? ?$heading[] = array('text' => '<b>'.TEXT_DELETE_SYSTEM.'</b>');
 ? ? ? ?$contents = array('form' => xtc_draw_form('sys', FILENAME_CCC_VIEW_PROD, 'sID='.$_GET['sID'].'&action=delete_sys_confirm') . xtc_draw_hidden_field('sys_id', $sysInfo->sys_id));
 ? ? ? ?$contents[] = array('text' => TEXT_DELETE_SYSTEM_INTRO);
 ? ? ? ?$contents[] = array('text' => '<br><b>' . $sysInfo->sys_name . '</b>');
 ? ? ? ?$contents[] = array('align' => 'center', 'text' => '<br>' . xtc_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . xtc_href_link(FILENAME_CCC_VIEW_PROD, 'sID='.$_GET['sID']) . '">' . xtc_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
 ? ? ? ?break;

 ? case 'edit_fsb':
 ? ? ?case 'new_fsb':
 ?$form_action = (($action == 'edit_fsb') ? 'update_fsb' : 'insert_fsb');
 ? ? $intro = (($action == 'edit_fsb') ? TEXT_EDIT_FSB_INTRO : TEXT_ADD_FSB_INTRO);
 ?$header = (($action == 'edit_fsb') ? TEXT_EDIT_FSB : TEXT_ADD_FSB);
 ? ? ? ?$heading[] = array('text' => '<b>'.$header.'</b>');
 ? ? ? ?$contents = array('form' => xtc_draw_form('fsb', FILENAME_CCC_VIEW_PROD, 'action='.$form_action.'&sID=' . $_GET['sID'] . '&cPath=' . $_GET['cPath'], 'post', 'enctype="multipart/form-data"') . xtc_draw_hidden_field('sys_id', $cPath));
 ? ? ? ?$contents[] = array('text' => $intro);
 ? ? ? for ($i=0, $n=sizeof($languages);$i<$n;$i++){
 ?$language_image = xtc_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '';
 ?if ($action == 'edit_fsb'){
 ? ? $fsb_language = xtc_db_query('select * from '.TABLE_CCC_FSB_DESCRIPTION.' where language_id = "'.$languages[$i]['id'].'" and fsb_id = "'.$HTTP_GET_VARS['sID'].'"');
 ? ? ? ?$fsb_language = xtc_db_fetch_array($fsb_language);
 ?}
 ? ? ? ?$contents[] = array('text' => '<b>'.$language_image . TEXT_FSB_NAME.'</b><br>' . xtc_draw_input_field('fsb_name['.$languages[$i]['id'].']', $fsb_language['fsb_name']));
 ? ? ? ?$contents[] = array('text' => '<b>'.$language_image . TEXT_FSB_DESCRIPTION.'</b><br>' . xtc_draw_textarea_field('fsb_description['.$languages[$i]['id'].']', 'soft', '40', '10', $fsb_language['fsb_description']));
 ? ?}
 ? ? ? ?$contents[] = array('text' => xtc_draw_radio_field('status', '1', (($fsbInfo->status == '1') ? true : false)) . TEXT_ENABLED . '<br>' . xtc_draw_radio_field('status', '0', (($fsbInfo->status == '0') ? true : false)) . TEXT_DISABLED);
 ? ? ? ?$contents[] = array('text' => '<b>'.TEXT_SORT_ORDER.'</b><br>' . xtc_draw_input_field('sort_order', $fsbInfo->sort_order, 'size="2"'));
 ? ? ? ?$contents
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 27.02.2005, 21:44
HHGAG
Gast
 
Beiträge: n/a
Standard

sicher das die Datenbank xtcommerce hei?t =)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 27.02.2005, 21:53
tmj tmj ist offline
 
Registriert seit: 25.01.2005
Beiträge: 205
Standard

Ja die Datenbank hei?t xtcommerce. Da ich noch am umschreiben bin teste ich es auf meinem lokalen Rechner.

Habe den Fehler aber soeben behoben: War ein wenig doof und habe den Teil der application_top die f?r Tabellen zust?ndig sind. Nach Eintrag der Tabellen ist die Fehlermeldung weg.

So nun noch die languagedatei f?r den adminbereich anpassen dann m?sste der adminbereich erstmal fertig sein. Es gibt aber noch viel zu tun
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #4 (permalink)  
Alt 27.02.2005, 22:48
tmj tmj ist offline
 
Registriert seit: 25.01.2005
Beiträge: 205
Standard

hm nun h?ng ich in der Bearbeitung und komme leider nicht weiter.

In der includes/header.php soll folgendes hinzugef?gt werden:

Code:
//CCC DEFINES
define('HEADER_TITLE_CUSTOM_BUILD', 'Custom Computer Creator');
if (tep_session_is_registered('ccc_prod_id')){
$edit_params = 'edit=1';
$link_file = FILENAME_CCC_BUILD;
}else{
$link_file = FILENAME_CCC;
$edit_params = '';
}
Folgendes soll ersetzt werden

Code:
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
  <td class="headerNavigation"> <?php echo $breadcrumb->trail(' ? '); ?></td>
  <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a> | '; } echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a> | <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a> | <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CHECKOUT . '</a>'; ?> </td>
 </tr>
</table>
mit

Code:
<table border="0" width="100%" cellspacing="0" cellpadding="1">
 <tr class="headerNavigation">
  <td class="headerNavigation"> <?php echo $breadcrumb->trail(' ? '); ?></td>
  <td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a> | '; } echo '<a href="' . tep_href_link($link_file, $edit_params, 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CUSTOM_BUILD . '</a> | <a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a> | <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '" class="headerNavigation">' . HEADER_TITLE_CART_CONTENTS . '</a> | <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="headerNavigation">' . HEADER_TITLE_CHECKOUT . '</a>'; ?> </td>
 </tr>
</table>
letzteres k?nnte ab Zeile 353 der xtcommerce header.php geh?ren. Doch wie schreibe ich das um da xtCommerce ja mitsmarty tags arbeitet. Die Stelle HEADER_TITLE_CUSTOM_BUILD geh?rt zu ccc also dem PC-Konfigurator. Hat jemand eine Idee, wie ich dies umschreiben kann?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #5 (permalink)  
Alt 27.02.2005, 23:04
HHGAG
Gast
 
Beiträge: n/a
Standard

Naja, wenn das so einfach w?re nach der Anleitung das zu portieren, w?re es bestimmt schon x-mal portiert worden =)

Aber da sind man ja wieviel noch von osc geblieben is ^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #6 (permalink)  
Alt 28.02.2005, 00:39
tmj tmj ist offline
 
Registriert seit: 25.01.2005
Beiträge: 205
Standard

Eine Frage habe ich noch:

Wie binde ich das Modul in das Template ein? Gibt es da eine Anleitung?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #7 (permalink)  
Alt 28.02.2005, 00:56
HHGAG
Gast
 
Beiträge: n/a
Standard

Du musst alle echo Anweisungen in Smarty assigns ?ndern, eine genauere Anleitung wirst Du wohl hier bekommen:

http://smarty.php.net/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #8 (permalink)  
Alt 28.02.2005, 12:29
tmj tmj ist offline
 
Registriert seit: 25.01.2005
Beiträge: 205
Standard

Schade leider sind meine php-kenntnisse zu wenig, um ein Modul umzuschreiben. Ich komme mit den Smarty tags nicht klar.

Ich scheitere wohl an der Templateeinbindung. Das modul wird oben schon angezeigt nur halt nicht da wo es sein soll.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #9 (permalink)  
Alt 02.03.2005, 01:32
tmj tmj ist offline
 
Registriert seit: 25.01.2005
Beiträge: 205
Standard

Eine Frage habe ich noch zum Thema smarty:

Wie spreche ich Eintr?ge aus der german.php per smarty tags an?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
osc, pckonfigurator

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 18:36 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand