Errore dopo degli aggiornamenti
Moderatore: mod Generali
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Errore dopo degli aggiornamenti
Mi esce questo errore dopo degli aggiornamenti quando premo in Admin la funzione product extra fields
Parse error: syntax error, unexpected T_REQUIRE in /web/htdocs/www.negozioidea.com/home/admin/product_extra_fields.php on line 1
Grazie per l'aiuto
Parse error: syntax error, unexpected T_REQUIRE in /web/htdocs/www.negozioidea.com/home/admin/product_extra_fields.php on line 1
Grazie per l'aiuto
Re: Errore dopo degli aggiornamenti
guarda il require alla linea 1 di quel file... c'è qualcosa che non va.
La funzione CERCA si trova sotto al logo Oscommerce italia in questa pagina. - I Love Marketing!
I miei preferiti: internet marketing blog - biancheria da letto - prodotti tipici piemonte - vini piemontesi - roero arneis
I miei preferiti: internet marketing blog - biancheria da letto - prodotti tipici piemonte - vini piemontesi - roero arneis
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
si ma non riesco a capire dove
posto il file l'errore è in questa linea ma dove?
require('includes/application_top.php');$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');// Has "Remove" button been pressed?if (isset($HTTP_POST_VARS['remove_x']) || isset($HTTP_POST_VARS['remove_y'])) $action='remove';if (tep_not_null($action)) { switch ($action) { case 'setflag': $sql_data_array = array('products_extra_fields_status' => tep_db_prepare_input($HTTP_GET_VARS['flag'])); tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $HTTP_GET_VARS['id']); tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); break; case 'add': $sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($HTTP_POST_VARS['field']['name']), 'languages_id' => tep_db_prepare_input ($HTTP_POST_VARS['field']['language']), 'products_extra_fields_order' => tep_db_prepare_input($HTTP_POST_VARS['field']['order'])); tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array
posto il file l'errore è in questa linea ma dove?
require('includes/application_top.php');$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');// Has "Remove" button been pressed?if (isset($HTTP_POST_VARS['remove_x']) || isset($HTTP_POST_VARS['remove_y'])) $action='remove';if (tep_not_null($action)) { switch ($action) { case 'setflag': $sql_data_array = array('products_extra_fields_status' => tep_db_prepare_input($HTTP_GET_VARS['flag'])); tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $HTTP_GET_VARS['id']); tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); break; case 'add': $sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($HTTP_POST_VARS['field']['name']), 'languages_id' => tep_db_prepare_input ($HTTP_POST_VARS['field']['language']), 'products_extra_fields_order' => tep_db_prepare_input($HTTP_POST_VARS['field']['order'])); tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
dimenticavo l'errore esce in admin quando premo la funzione product extra field
Re: Errore dopo degli aggiornamenti
il problema è che hai il file non formattato
prova con quello che ti ho passato
Codice: Seleziona tutto
require('includes/application_top.php');
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
// Has "Remove" button been pressed?
if (isset($HTTP_POST_VARS['remove_x']) || isset($HTTP_POST_VARS['remove_y'])) $action='remove';
if (tep_not_null($action)) {
switch ($action) {
case 'setflag': $sql_data_array = array('products_extra_fields_status' => tep_db_prepare_input($HTTP_GET_VARS['flag']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $HTTP_GET_VARS['id']);
tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS));
break;
case 'add': $sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($HTTP_POST_VARS['field']['name']), 'languages_id' => tep_db_prepare_input ($HTTP_POST_VARS['field']['language']), 'products_extra_fields_order' => tep_db_prepare_input($HTTP_POST_VARS['field']['order']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
adesso l'errore passa ad una altra linea....non formattato? Ma io dopo vari tentativi e dopo essermi arreso avevo reinstallato tutto da zero come posso averlo non formattato
qui di seguito tutto il file:
<?php
/* $Id: product_extra_field.php,v 2.0 2004/11/09 22:50:52 ChBu Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License * * v2.0: added languages support
*/
require('includes/application_top.php');
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
// Has "Remove" button been pressed?
if (isset($HTTP_POST_VARS['remove_x']) || isset($HTTP_POST_VARS['remove_y'])) $action='remove';
if (tep_not_null($action)) {
switch ($action) {
case 'setflag': $sql_data_array = array('products_extra_fields_status' => tep_db_prepare_input($HTTP_GET_VARS['flag']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $HTTP_GET_VARS['id']);
tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS));
break;
case 'add': $sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($HTTP_POST_VARS['field']['name']), 'languages_id' => tep_db_prepare_input ($HTTP_POST_VARS['field']['language']), 'products_extra_fields_order' => tep_db_prepare_input($HTTP_POST_VARS['field']['order']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'insert'); tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); break; case 'update': foreach ($HTTP_POST_VARS['field'] as $key=>$val) { $sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($val['name']), 'languages_id' => tep_db_prepare_input($val['language']), 'products_extra_fields_order' => tep_db_prepare_input($val['order'])); tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $key); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); break; case 'remove': //print_r($HTTP_POST_VARS['mark']); if ($HTTP_POST_VARS['mark']) { foreach ($HTTP_POST_VARS['mark'] as $key=>$val) { tep_db_query("DELETE FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " WHERE products_extra_fields_id=" . tep_db_input($key)); tep_db_query("DELETE FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_extra_fields_id=" . tep_db_input($key)); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); } break; }}
// Put languages information into an array for drop-down boxes $languages=tep_get_languages(); $values[0]=array ('id' =>'0', 'text' => TEXT_ALL_LANGUAGES); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $values[$i+1]=array ('id' =>$languages[$i]['id'], 'text' =>$languages[$i]['name']); } ?><!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();"><!-- 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 width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table> </td> </tr> <tr> <td width="100%"> <!-- <div style="font-family: verdana; font-weight: bold; font-size: 17px; margin-bottom: 8px; color: #727272;"> <?php echo SUBHEADING_TITLE; ?> </div> --> <br /> <?php //echo tep_draw_form("add_field", FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=add', 'post'); ?> <?php echo tep_draw_form('add_field', FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=add', 'post'); ?> <table border="0" width="400" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIELDS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDER; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LANGUAGE; ?></td> </tr> <tr> <td class="dataTableContent"> <?php echo tep_draw_input_field('field[name]', $field['name'], 'size=30', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_input_field('field[order]', $field['order'], 'size=5', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_pull_down_menu('field[language]', $values, '0', '');?> </td> <td class="dataTableHeadingContent" align="right"> <?php echo tep_image_submit('button_add_field.gif',IMAGE_ADD_FIELD)?> </td> </tr> </form> </table> <hr /> <br> <?php echo tep_draw_form('extra_fields', FILENAME_PRODUCTS_EXTRA_FIELDS,'action=update','post'); ?> <?php echo $action_message; ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" width="20"> </td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIELDS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDER; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LANGUAGE; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> </tr><?php$products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " ORDER BY products_extra_fields_order");while ($extra_fields = tep_db_fetch_array($products_extra_fields_query)) {?> <tr> <td width="20"> <?php echo tep_draw_checkbox_field('mark['.$extra_fields['products_extra_fields_id'].']', 1) ?> </td> <td class="dataTableContent"> <?php echo tep_draw_input_field('field['.$extra_fields['products_extra_fields_id'].'][name]', $extra_fields['products_extra_fields_name'], 'size=30', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_input_field('field['.$extra_fields['products_extra_fields_id'].'][order]', $extra_fields['products_extra_fields_order'], 'size=5', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_pull_down_menu('field['.$extra_fields['products_extra_fields_id'].'][language]', $values, $extra_fields['languages_id'], ''); ?> </td> <td class="dataTableContent" align="center"> <?php if ($extra_fields['products_extra_fields_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=setflag&flag=0&id=' . $extra_fields['products_extra_fields_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=setflag&flag=1&id=' . $extra_fields['products_extra_fields_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?> </td> </tr><?php } ?> <tr> <td colspan="4"> <?php echo tep_image_submit('button_update_fields.gif',IMAGE_UPDATE_FIELDS)?> <?php echo tep_image_submit('button_remove_fields.gif',IMAGE_REMOVE_FIELDS,'name="remove"')?> </td> </tr> </form> </table> </td> </tr> </table> </td> <!-- body_text_eof
//--> </tr></table><!-- body_eof
//--><!-- footer //--><?php require(DIR_WS_INCLUDES . 'footer.php'); ?><!-- footer_eof
//--></body></html><?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
qui di seguito tutto il file:
<?php
/* $Id: product_extra_field.php,v 2.0 2004/11/09 22:50:52 ChBu Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License * * v2.0: added languages support
*/
require('includes/application_top.php');
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
// Has "Remove" button been pressed?
if (isset($HTTP_POST_VARS['remove_x']) || isset($HTTP_POST_VARS['remove_y'])) $action='remove';
if (tep_not_null($action)) {
switch ($action) {
case 'setflag': $sql_data_array = array('products_extra_fields_status' => tep_db_prepare_input($HTTP_GET_VARS['flag']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $HTTP_GET_VARS['id']);
tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS));
break;
case 'add': $sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($HTTP_POST_VARS['field']['name']), 'languages_id' => tep_db_prepare_input ($HTTP_POST_VARS['field']['language']), 'products_extra_fields_order' => tep_db_prepare_input($HTTP_POST_VARS['field']['order']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'insert'); tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); break; case 'update': foreach ($HTTP_POST_VARS['field'] as $key=>$val) { $sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($val['name']), 'languages_id' => tep_db_prepare_input($val['language']), 'products_extra_fields_order' => tep_db_prepare_input($val['order'])); tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $key); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); break; case 'remove': //print_r($HTTP_POST_VARS['mark']); if ($HTTP_POST_VARS['mark']) { foreach ($HTTP_POST_VARS['mark'] as $key=>$val) { tep_db_query("DELETE FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " WHERE products_extra_fields_id=" . tep_db_input($key)); tep_db_query("DELETE FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_extra_fields_id=" . tep_db_input($key)); } tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS)); } break; }}
// Put languages information into an array for drop-down boxes $languages=tep_get_languages(); $values[0]=array ('id' =>'0', 'text' => TEXT_ALL_LANGUAGES); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $values[$i+1]=array ('id' =>$languages[$i]['id'], 'text' =>$languages[$i]['name']); } ?><!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();"><!-- 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 width="100%"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table> </td> </tr> <tr> <td width="100%"> <!-- <div style="font-family: verdana; font-weight: bold; font-size: 17px; margin-bottom: 8px; color: #727272;"> <?php echo SUBHEADING_TITLE; ?> </div> --> <br /> <?php //echo tep_draw_form("add_field", FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=add', 'post'); ?> <?php echo tep_draw_form('add_field', FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=add', 'post'); ?> <table border="0" width="400" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIELDS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDER; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LANGUAGE; ?></td> </tr> <tr> <td class="dataTableContent"> <?php echo tep_draw_input_field('field[name]', $field['name'], 'size=30', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_input_field('field[order]', $field['order'], 'size=5', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_pull_down_menu('field[language]', $values, '0', '');?> </td> <td class="dataTableHeadingContent" align="right"> <?php echo tep_image_submit('button_add_field.gif',IMAGE_ADD_FIELD)?> </td> </tr> </form> </table> <hr /> <br> <?php echo tep_draw_form('extra_fields', FILENAME_PRODUCTS_EXTRA_FIELDS,'action=update','post'); ?> <?php echo $action_message; ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" width="20"> </td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIELDS; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDER; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LANGUAGE; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> </tr><?php$products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " ORDER BY products_extra_fields_order");while ($extra_fields = tep_db_fetch_array($products_extra_fields_query)) {?> <tr> <td width="20"> <?php echo tep_draw_checkbox_field('mark['.$extra_fields['products_extra_fields_id'].']', 1) ?> </td> <td class="dataTableContent"> <?php echo tep_draw_input_field('field['.$extra_fields['products_extra_fields_id'].'][name]', $extra_fields['products_extra_fields_name'], 'size=30', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_input_field('field['.$extra_fields['products_extra_fields_id'].'][order]', $extra_fields['products_extra_fields_order'], 'size=5', false, 'text', true);?> </td> <td class="dataTableContent" align="center"> <?php echo tep_draw_pull_down_menu('field['.$extra_fields['products_extra_fields_id'].'][language]', $values, $extra_fields['languages_id'], ''); ?> </td> <td class="dataTableContent" align="center"> <?php if ($extra_fields['products_extra_fields_status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=setflag&flag=0&id=' . $extra_fields['products_extra_fields_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=setflag&flag=1&id=' . $extra_fields['products_extra_fields_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10); } ?> </td> </tr><?php } ?> <tr> <td colspan="4"> <?php echo tep_image_submit('button_update_fields.gif',IMAGE_UPDATE_FIELDS)?> <?php echo tep_image_submit('button_remove_fields.gif',IMAGE_REMOVE_FIELDS,'name="remove"')?> </td> </tr> </form> </table> </td> </tr> </table> </td> <!-- body_text_eof
//--> </tr></table><!-- body_eof
//--><!-- footer //--><?php require(DIR_WS_INCLUDES . 'footer.php'); ?><!-- footer_eof
//--></body></html><?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Re: Errore dopo degli aggiornamenti
Codice: Seleziona tutto
<?php
/* $Id: product_extra_field.php,v 2.0 2004/11/09 22:50:52 ChBu Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License * * v2.0: added languages support
*/
require('includes/application_top.php');
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
// Has "Remove" button been pressed?
if (isset($HTTP_POST_VARS['remove_x']) || isset($HTTP_POST_VARS['remove_y'])) $action='remove';
if (tep_not_null($action)) {
switch ($action) {
case 'setflag':
$sql_data_array = array('products_extra_fields_status' => tep_db_prepare_input($HTTP_GET_VARS['flag']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $HTTP_GET_VARS['id']);
tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS));
break;
case 'add':
$sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($HTTP_POST_VARS['field']['name']),
'languages_id' => tep_db_prepare_input ($HTTP_POST_VARS['field']['language']), 'products_extra_fields_order' => tep_db_prepare_input($HTTP_POST_VARS['field']['order']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'insert');
tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS));
break;
case 'update':
foreach ($HTTP_POST_VARS['field'] as $key=>$val) {
$sql_data_array = array('products_extra_fields_name' => tep_db_prepare_input($val['name']),
'languages_id' => tep_db_prepare_input($val['language']),
'products_extra_fields_order' => tep_db_prepare_input($val['order']));
tep_db_perform(TABLE_PRODUCTS_EXTRA_FIELDS, $sql_data_array, 'update', 'products_extra_fields_id=' . $key);
}
tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS));
break;
case 'remove':
//print_r
($HTTP_POST_VARS['mark']);
if ($HTTP_POST_VARS['mark']) {
foreach ($HTTP_POST_VARS['mark'] as $key=>$val) {
tep_db_query("DELETE FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " WHERE products_extra_fields_id=" . tep_db_input($key));
tep_db_query("DELETE FROM " . TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS . " WHERE products_extra_fields_id=" . tep_db_input($key));
}
tep_redirect(tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS));
}
break;
}
}
// Put languages information into an array for drop-down boxes
$languages=tep_get_languages();
$values[0]=array ('id' =>'0', 'text' => TEXT_ALL_LANGUAGES);
for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$values[$i+1]=array ('id' =>$languages[$i]['id'], 'text' =>$languages[$i]['name']);
}
?>
<!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();">
<!-- 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 width="100%">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<div style="font-family: verdana; font-weight: bold; font-size: 17px; margin-bottom: 8px; color: #727272;">
<?php echo SUBHEADING_TITLE; ?>
</div>
<br />
<?php //echo tep_draw_form("add_field", FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=add', 'post'); ?>
<?php echo tep_draw_form('add_field', FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=add', 'post'); ?>
<table border="0" width="400" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIELDS; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDER; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LANGUAGE; ?></td>
</tr>
<tr>
<td class="dataTableContent"> <?php echo tep_draw_input_field('field[name]', $field['name'], 'size=30', false, 'text', true);?> </td>
<td class="dataTableContent" align="center"> <?php echo tep_draw_input_field('field[order]', $field['order'], 'size=5', false, 'text', true);?> </td>
<td class="dataTableContent" align="center"> <?php echo tep_draw_pull_down_menu('field[language]', $values, '0', '');?> </td>
<td class="dataTableHeadingContent" align="right"> <?php echo tep_image_submit('button_add_field.gif',IMAGE_ADD_FIELD)?> </td>
</tr> </form>
</table>
<hr />
<br>
<?php echo tep_draw_form('extra_fields', FILENAME_PRODUCTS_EXTRA_FIELDS,'action=update','post'); ?>
<?php echo $action_message; ?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent" width="20"> </td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_FIELDS; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_ORDER; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_LANGUAGE; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td>
</tr>
<?php $products_extra_fields_query = tep_db_query("SELECT * FROM " . TABLE_PRODUCTS_EXTRA_FIELDS . " ORDER BY products_extra_fields_order");
while ($extra_fields = tep_db_fetch_array($products_extra_fields_query)) {
?>
<tr>
<td width="20"> <?php echo tep_draw_checkbox_field('mark['.$extra_fields['products_extra_fields_id'].']', 1) ?> </td>
<td class="dataTableContent"> <?php echo tep_draw_input_field('field['.$extra_fields['products_extra_fields_id'].'][name]', $extra_fields['products_extra_fields_name'], 'size=30', false, 'text', true);?> </td>
<td class="dataTableContent" align="center"> <?php echo tep_draw_input_field('field['.$extra_fields['products_extra_fields_id'].'][order]', $extra_fields['products_extra_fields_order'], 'size=5', false, 'text', true);?> </td>
<td class="dataTableContent" align="center"> <?php echo tep_draw_pull_down_menu('field['.$extra_fields['products_extra_fields_id'].'][language]', $values, $extra_fields['languages_id'], ''); ?> </td>
<td class="dataTableContent" align="center">
<?php if ($extra_fields['products_extra_fields_status'] == '1') {
echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . ' <a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=setflag&flag=0&id=' . $extra_fields['products_extra_fields_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
} else {
echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXTRA_FIELDS, 'action=setflag&flag=1&id=' . $extra_fields['products_extra_fields_id'], 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
} ?> </td>
</tr>
<?php } ?>
<tr>
<td colspan="4">
<?php echo tep_image_submit('button_update_fields.gif',IMAGE_UPDATE_FIELDS)?>
<?php echo tep_image_submit('button_remove_fields.gif',IMAGE_REMOVE_FIELDS,'name="remove"')?>
</td>
</tr> </form>
</table>
</td>
</tr>
</table>
</td> <!-- body_text_eof//-->
</tr>
</table><!-- body_eof//-->
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof//-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
grazie adesso funziona.
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
perfetto ho installato la contribution seo e tutto ok
ho installato la contribution prof_invoice e packingslip v0.2
e mi esce questo errore in area admin
1146 - Table 'Sql266320_1.TABLE_ADMINISTRATORS' doesn't exist
select id from TABLE_ADMINISTRATORS limit 1
[TEP STOP]
in area shop funziona tutto, rifatto il backup e tutto tornato ok ma dove ho sbagliato?
Forse dovrei postare la domanda nell'area della contribution?
ho installato la contribution prof_invoice e packingslip v0.2
e mi esce questo errore in area admin
1146 - Table 'Sql266320_1.TABLE_ADMINISTRATORS' doesn't exist
select id from TABLE_ADMINISTRATORS limit 1
[TEP STOP]
in area shop funziona tutto, rifatto il backup e tutto tornato ok ma dove ho sbagliato?
Forse dovrei postare la domanda nell'area della contribution?
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
scusate da solo ho capito l'errore, perchè copiavo il file database presente nel pacchetto ma nello stesso mancava la riga:
define('TABLE_ADMINISTRATORS', 'administrators');
almeno credo che sia questo il motivo, però è strano che nessuno l'ha postato.....speriamo bene....ora riprovo
scusate a tutti e grazie
define('TABLE_ADMINISTRATORS', 'administrators');
almeno credo che sia questo il motivo, però è strano che nessuno l'ha postato.....speriamo bene....ora riprovo
scusate a tutti e grazie
Re: Errore dopo degli aggiornamenti
quando installi le contributions non devi sostituire i file... ma devi apportare le modifiche a mano seguendo le istruzioni
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
mi accorgo passo dopo passo degli errori che sto facendo infatti adesso se premo su un qualsiasi ordine di prova esce:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, postmaster@negozioidea.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Cavoli che stupido ora riprovo tutto da capo almeno che qualcuno non abbia una idea
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, postmaster@negozioidea.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Cavoli che stupido ora riprovo tutto da capo almeno che qualcuno non abbia una idea
-
- membro Junior
- Messaggi: 33
- Iscritto il: 18/06/2009, 14:09
Re: Errore dopo degli aggiornamenti
leggendo sul forum vedo che questo errore è dovuto parecchio al file htaccess ma ho provato a ripristinarlo ma non cambia nulla