IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

EDI, CMS, Outils, Scripts et API PHP Discussion :

[osCommerce] Index avec oscommerce


Sujet :

EDI, CMS, Outils, Scripts et API PHP

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Août 2009
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 3
    Points : 2
    Points
    2
    Par défaut [osCommerce] Index avec oscommerce
    Voilà, quand je vais sur l'adresse de mon site je me retrouve avec le message d'erreur suivant :

    Warning: main(includes/application_top.php) [function.main]: failed to open stream: No such file or directory in /homez.232/lesbijouv/www/index.php on line 13

    Fatal error: main() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/local/lib/php') in /homez.232/lesbijouv/www/index.php on line 13
    Pour information, une personne m'avait dit de mettre mon "index.php" directement dans le dossier "www" plutôt que dans "catalog".

    Ci-dessous copier/coller de mon index.. j'espère que vous pourrez m'aider.. d'avance merci :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    <?php
    /*
      $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      <a href="http://www.oscommerce.com" target="_blank">http://www.oscommerce.com</a>
    
      Copyright (c) 2003 osCommerce
    
      Released under the GNU General Public License
    */
     
      require('includes/application_top.php');
     
    // the following cPath references come from application_top.php
      $category_depth = 'top';
      if (isset($cPath) && tep_not_null($cPath)) {
        $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
        $cateqories_products = tep_db_fetch_array($categories_products_query);
        if ($cateqories_products['total'] > 0) {
          $category_depth = 'products'; // display products
        } else {
          $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
          $category_parent = tep_db_fetch_array($category_parent_query);
          if ($category_parent['total'] > 0) {
            $category_depth = 'nested'; // navigate through the categories
          } else {
            $category_depth = 'products'; // category has no products, but display the 'no products' message
          }
        }
      }
     
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html <?php echo HTML_PARAMS; ?>>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
    <title><?php echo TITLE; ?></title>
    <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    </head>
    <body>
    <!-- header //-->
    <?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    <!-- header_eof //-->
     
    <!-- body //-->
    <table border="0" summary="" width="100%" cellspacing="3" cellpadding="3">
      <tr>
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" summary="" 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 //-->
    <?php
      if ($category_depth == 'nested') {
        $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
        $category = tep_db_fetch_array($category_query);
    ?>
        <td width="100%" valign="top"><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="pageHeading"><?php echo($category['categories_name']); ?></td>
                   <?php if (isset($HTTP_GET_VARS['manufacturers_id'])) {  
            $category_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
            $category = tep_db_fetch_array($category_query);
            if ($category['manufacturers_name'] != "") {echo $category['manufacturers_name'];} else { echo HEADING_TITLE;}
          } else {
            $category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
            $category = tep_db_fetch_array($category_query);
            if ($category['categories_name'] != "") {echo $category['categories_name'];} else { echo HEADING_TITLE;}
          }
    ?>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
    <?php
        if (isset($cPath) && strpos('_', $cPath)) {
    // check to see if there are deeper categories within the current category
          $category_links = array_reverse($cPath_array);
          for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
            $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
            $categories = tep_db_fetch_array($categories_query);
            if ($categories['total'] < 1) {
              // do nothing, go through the loop
            } else {
              $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
              break; // we've found the deepest category the customer is in
            }
          }
        } else {
          $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
        }
     
        $number_of_categories = tep_db_num_rows($categories_query);
     
        $rows = 0;
        while ($categories = tep_db_fetch_array($categories_query)) {
          $rows++;
          $cPath_new = tep_get_path($categories['categories_id']);
          $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
          echo '                <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
          if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
            echo '              </tr>' . "\n";
            echo '              <tr>' . "\n";
          }
        }
     
    // needed for the new products module shown below
        $new_products_category_id = $current_category_id;
    ?>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
              </tr>
              <tr>
                <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
    <?php
      } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
    // create column list
        $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                             'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                             'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                             'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                             'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                             'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                             'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                             'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);
     
        asort($define_list);
     
        $column_list = array();
        reset($define_list);
        while (list($key, $value) = each($define_list)) {
          if ($value > 0) $column_list[] = $key;
        }
     
        $select_column_list = '';
     
        for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
          switch ($column_list[$i]) {
            case 'PRODUCT_LIST_MODEL':
              $select_column_list .= 'p.products_model, ';
              break;
            case 'PRODUCT_LIST_NAME':
              $select_column_list .= 'pd.products_name, ';
              break;
            case 'PRODUCT_LIST_MANUFACTURER':
              $select_column_list .= 'm.manufacturers_name, ';
              break;
            case 'PRODUCT_LIST_QUANTITY':
              $select_column_list .= 'p.products_quantity, ';
              break;
            case 'PRODUCT_LIST_IMAGE':
              $select_column_list .= 'p.products_image, ';
              break;
            case 'PRODUCT_LIST_WEIGHT':
              $select_column_list .= 'p.products_weight, ';
              break;
          }
        }
     
    // show the products of a specified manufacturer
        if (isset($HTTP_GET_VARS['manufacturers_id'])) {
          if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
    // We are asked to show only a specific category
            $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
          } else {
    // We show them all
            $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
          }
        } else {
    // show the products in a given categorie
          if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
    // We are asked to show only specific catgeory
            $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
          } else {
    // We show them all
            $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
          }
        }
     
        if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
          for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
            if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
              $HTTP_GET_VARS['sort'] = $i+1 . 'a';
              $listing_sql .= " order by pd.products_name";
              break;
            }
          }
        } else {
          $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
          $sort_order = substr($HTTP_GET_VARS['sort'], 1);
     
          switch ($column_list[$sort_col-1]) {
            case 'PRODUCT_LIST_MODEL':
              $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
              break;
            case 'PRODUCT_LIST_NAME':
              $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
              break;
            case 'PRODUCT_LIST_MANUFACTURER':
              $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
              break;
            case 'PRODUCT_LIST_QUANTITY':
              $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
              break;
            case 'PRODUCT_LIST_IMAGE':
              $listing_sql .= " order by pd.products_name";
              break;
            case 'PRODUCT_LIST_WEIGHT':
              $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
              break;
            case 'PRODUCT_LIST_PRICE':
              $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
              break;
          }
        }
    ?>
        <td width="100%" valign="top"><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
    <?php
    // optional Product List Filter
        if (PRODUCT_LIST_FILTER > 0) {
          if (isset($HTTP_GET_VARS['manufacturers_id'])) {
            $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
          } else {
            $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
          }
          $filterlist_query = tep_db_query($filterlist_sql);
          if (tep_db_num_rows($filterlist_query) > 1) {
            echo '            <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . '&nbsp;';
            if (isset($HTTP_GET_VARS['manufacturers_id'])) {
              echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
              $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
            } else {
              echo tep_draw_hidden_field('cPath', $cPath);
              $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
            }
            echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
            while ($filterlist = tep_db_fetch_array($filterlist_query)) {
              $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
            }
            echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
            echo tep_hide_session_id() . '</form></td>' . "\n";
          }
        }
     
    // Get the right image for the top-right
        $image = DIR_WS_IMAGES . 'table_background_list.gif';
        if (isset($HTTP_GET_VARS['manufacturers_id'])) {
          $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
          $image = tep_db_fetch_array($image);
          $image = $image['manufacturers_image'];
        } elseif ($current_category_id) {
          $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
          $image = tep_db_fetch_array($image);
          $image = $image['categories_image'];
        }
    ?>
                <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
          </tr>
        </table></td>
    <?php
      } else { // default page
    ?>
        <td width="100%" valign="top"><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
                <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
          </tr>
          <tr>
            <td><table border="0" summary="" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="main"><?php echo tep_customer_greeting(); ?></td>
              </tr>
              <tr>
                <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo TEXT_MAIN; ?></td>
              </tr>
              <tr>
                <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
              </tr>
              <tr>
                <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
              </tr>
    <?php
        include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
    ?>
            </table></td>
          </tr>
        </table></td>
    <?php
      }
    ?>
    <!-- body_text_eof //-->
        <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" summary="" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
    <!-- right_navigation //-->
    <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
    <!-- right_navigation_eof //-->
        </table></td>
      </tr>
    </table>
    <!-- body_eof //-->
     
    <!-- footer //-->
    <?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    <!-- footer_eof //-->
    <br>
    </body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

  2. #2
    Expert éminent
    Avatar de 12monkeys
    Homme Profil pro
    Webmaster
    Inscrit en
    Novembre 2006
    Messages
    4 093
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Service public

    Informations forums :
    Inscription : Novembre 2006
    Messages : 4 093
    Points : 9 031
    Points
    9 031
    Par défaut
    Bonsoir

    En déplaçant le fichier index.php tu as cassé le chemin de ton include, modifie ce chemin pour l'adapter à sa nouvelle position...
    Vous souhaitez participer à la rubrique (X)HTML/CSS, contactez moi.
    débutez avec les CSS
    Pas de MP pour des questions techniques ! Mode d'emploi du forum ; Règles ; Pensez à la balise code ; Pas de SMS !
    Votez pour les messages qui vous ont aidés...

  3. #3
    Membre habitué
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    102
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 102
    Points : 142
    Points
    142
    Par défaut
    Salut,

    Cependant je te conseille vivement de ne pas casser l'architecture de osCommerce mais t'adapter !

    Je te conseille de laisser tout dans le répertoire racine "catalogue" et par une règle htaccess d'en changer l'accès à ton site de vente en ligne genre:
    ==> "tonsite.com/catalogue" par "tonsite.com"

    Cela évitera ce genre de problème que tu rencontres actuellement et les autres car toutes les pages font appel à "index.php"!

    Bon continuation

  4. #4
    Candidat au Club
    Profil pro
    Inscrit en
    Août 2009
    Messages
    3
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2009
    Messages : 3
    Points : 2
    Points
    2
    Par défaut
    Du coup j'ai remis le fichier index.php a son endroit initial pour ne pas modifier la matrice oscommerce, comme tu me l'as conseillé..

    Merci beaucoup déjà pour ce conseil.

    j'ai avancé sur mon souci... là peux être que tu vas pouvoir m'aider...


    Quand je vais sur la racine de mon site ( http://www.les-bijoux-et-produits-de...ny.fr/catalog/ ), je me retrouve avec l'erreur suivante :
    Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /homez.232/lesbijouv/www/catalog/includes/functions/database.php on line 19
    Connexion impossible à la Base de Données!


    Effectivement, ma base de données n'est pas accessible car en fait quand je vais sur ovh, dans phpmyadmin et sur la base que ovh m'a créé par défaut, soit lesbijouv la base est complètement vide... pas de tableaux etc... pourtant j'ai fais une recherche sur disque dur, j'ai une base sur mon ordi local qui s'appèle mabase.. sauf que je n'arrive pas à me connecter à l'administrateur d'easyphp, donc du coup je ne peux exporter "mabase" local pour l'importer sur le phpmyadmin de ovh...quand je me met sur easyphp, mysql administration, je ne peux me connecter car j'ai le message d'erreur suivant et je ne peux pas me connecter :

    "Objet non trouvé!
    Objet non trouvé!
    L'URL requise n'a pu etre trouvée sur ce serveur. Si vous avez tapé l'URL à la main, veuillez vérifier l'orthographe et réessayer.
    Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
    Error 404
    127.0.0.1
    08/12/09 19:27:01
    Apache/2.2.11 (Win32) PHP/5.2.8"


    et aussi des fois j'ai l'erreur :
    Accès interdit!
    Vous n'avez pas le droit d'accéder à l'objet demandé. Soit celui-ci est protégé, soit il ne peut être lu par le serveur.
    Si vous pensez qu'il s'agit d'une erreur du serveur, veuillez contacter le gestionnaire du site.
    Error 403
    127.0.0.1
    08/12/09 19:43:22
    Apache/2.2.11 (Win32) PHP/5.2.8



    Pour l'erreur au niveau de ma base, je te fais un copier coller ci-dessous du fichier concerné (pour info, j'ai vu sur des forums qu'il y a des codes de connection à mettre quelque part, dans un fichier, mais je ne sais quels codes ni où.. peut être que le souci vient de là et du coup ma base locale ne peut être connectée au réseau distant ?) .... on va y arriver lol :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    <?php
    /*
      $Id: database.php,v 1.21 2003/06/09 21:21:59 hpdl Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      <a href="http://www.oscommerce.com" target="_blank">http://www.oscommerce.com</a>
    
      Copyright (c) 2007 osCommerce
    
      Released under the GNU General Public License
    */
     
      function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {
        global $$link;
     
        if (USE_PCONNECT == 'true') {
          $$link = mysql_pconnect($server, $username, $password);
        } else {
          $$link = mysql_connect($server, $username, $password);
        }
     
        if ($$link) mysql_select_db($database);
     
        return $$link;
      }
     
      function tep_db_close($link = 'db_link') {
        global $$link;
     
        return mysql_close($$link);
      }
     
      function tep_db_error($query, $errno, $error) {
        die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>');
      }
     
      function tep_db_query($query, $link = 'db_link') {
        global $$link;
     
        if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
          error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
        }
     
        $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());
     
        if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {
           $result_error = mysql_error();
           error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);
        }
     
        return $result;
      }
     
      function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {
        reset($data);
        if ($action == 'insert') {
          $query = 'insert into ' . $table . ' (';
          while (list($columns, ) = each($data)) {
            $query .= $columns . ', ';
          }
          $query = substr($query, 0, -2) . ') values (';
          reset($data);
          while (list(, $value) = each($data)) {
            switch ((string)$value) {
              case 'now()':
                $query .= 'now(), ';
                break;
              case 'null':
                $query .= 'null, ';
                break;
              default:
                $query .= '\'' . tep_db_input($value) . '\', ';
                break;
            }
          }
          $query = substr($query, 0, -2) . ')';
        } elseif ($action == 'update') {
          $query = 'update ' . $table . ' set ';
          while (list($columns, $value) = each($data)) {
            switch ((string)$value) {
              case 'now()':
                $query .= $columns . ' = now(), ';
                break;
              case 'null':
                $query .= $columns .= ' = null, ';
                break;
              default:
                $query .= $columns . ' = \'' . tep_db_input($value) . '\', ';
                break;
            }
          }
          $query = substr($query, 0, -2) . ' where ' . $parameters;
        }
     
        return tep_db_query($query, $link);
      }
     
      function tep_db_fetch_array($db_query) {
        return mysql_fetch_array($db_query, MYSQL_ASSOC);
      }
     
      function tep_db_num_rows($db_query) {
        return mysql_num_rows($db_query);
      }
     
      function tep_db_data_seek($db_query, $row_number) {
        return mysql_data_seek($db_query, $row_number);
      }
     
      function tep_db_insert_id($link = 'db_link') {
        global $$link;
     
        return mysql_insert_id($$link);
      }
     
      function tep_db_free_result($db_query) {
        return mysql_free_result($db_query);
      }
     
      function tep_db_fetch_fields($db_query) {
        return mysql_fetch_field($db_query);
      }
     
      function tep_db_output($string) {
        return htmlspecialchars($string);
      }
     
      function tep_db_input($string, $link = 'db_link') {
        global $$link;
     
        if (function_exists('mysql_real_escape_string')) {
          return mysql_real_escape_string($string, $$link);
        } elseif (function_exists('mysql_escape_string')) {
          return mysql_escape_string($string);
        }
     
        return addslashes($string);
      }
     
      function tep_db_prepare_input($string) {
        if (is_string($string)) {
          return trim(tep_sanitize_string(stripslashes($string)));
        } elseif (is_array($string)) {
          reset($string);
          while (list($key, $value) = each($string)) {
            $string[$key] = tep_db_prepare_input($value);
          }
          return $string;
        } else {
          return $string;
        }
      }
    ?>

    Quand je me connecte directement sur l'adresse de mon site soit http://www.les-bijoux-et-produits-de...ine-thouny.fr/, je me retrouve avec cela :

    Index of /

    Icon Name Last modified Size Description[DIR] catalog/ 08-Aug-2009 18:52 -


    Tu vois cela a avancé..


    Qu'en penses tu ?

    Merci beaucoup d'avance

  5. #5
    Membre habitué
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    102
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2006
    Messages : 102
    Points : 142
    Points
    142
    Par défaut
    Bonjour Séverine,

    Je n'ai pas manipulé depuis quelques temps OsCommerce mais j'ai installé 2 sites sous OsCommerce il ya quelques mois donc ce n'est pas tout frais !

    Désolé

    Lorsque je les ai installé, c'était la version 2.0 mais j'ai pu voir que cela a changé encore donc l'installation, je ne l'ai pas testé !

    Cependant as-tu suivi à la lettre, l'installation qui t'ai expliqué sur leur forum?

    Je te conseilles (dans le cas où ce n'est pas déjà fait) d'expliquer tes soucis sur leur forum qui est réactif aussi !

    Mais dans tous les cas, tu as un problème de connexion à ta base de données !
    ça c'est évident !

    De plus, à l'install, OsCommerce t'installe une multitude de tables qu'il aura besoin pour fonctionner et là, en l'occurence c'est vide!

    Donc ton install n'est pas bonne car les login de connexion ne sont pas bons !

    Dans un premier temps, tournes-toi vers le fichier:
    catalog >> includes >> configure.php
    et vois les dernières lignes suivants:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
      define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers
      define('DB_SERVER_USERNAME', '');
      define('DB_SERVER_PASSWORD', '');
      define('DB_DATABASE', 'osCommerce');
    C'est l'emplacement où sont stockées tes accès à ta base de données donc si c'est vide, tu as 2 cas possibles :
    1- à l'installation, on ne t'a pas demandé tes logins
    2- le fichier "configure.php" est protégé en écriture, les droits (permissions) ne sont donnés donc tu dois renseigner manuellement les constantes citées au-dessus.

    Dans un second temps, assures-toi que tes logins (syntaxe) sont correctes !

    Bonne chance

  6. #6
    Futur Membre du Club
    Inscrit en
    Mars 2010
    Messages
    6
    Détails du profil
    Informations forums :
    Inscription : Mars 2010
    Messages : 6
    Points : 5
    Points
    5
    Par défaut Afficher/cacher contenu dans <div>
    Bonjour,
    J'aimerai bien faire un test avec PHP pour afficher/cacher un contenu du div, mais je n'arrive pas à faire la condition.
    Voici ce que j'aimerai faire: Si c'est la page index.php { afficher contenu div} sinon cacher contenu div.
    Je ne sais pas comment prendre la page index.php dans la condition IF.

    J'ai déjà fais ceci mais le contenu reste en permanence dans la page principal alors que le teste doit être :quand on est sur la page index.php le contenu div affiche sinon cacher le contenu.
    le code que j'ai fait est comme suit:
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    $_GET['main_page'] = 'index.php';
    if ($_GET['main_page'])
    {				  
    ?>
    <div>
    <tr>                 
     <td  align="center" valign="middle"><?php include (DIR_WS_MODULES . 'main_categories.php')?></td>
    </tr>
        </div>
    <?php  }   ?>

    Est-ce quelqu'un pourra m'aider svp

    Merci d'avance.

  7. #7
    Candidat au Club
    Homme Profil pro
    Webmaster
    Inscrit en
    Mars 2011
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Mars 2011
    Messages : 2
    Points : 2
    Points
    2
    Par défaut
    Bonjour mitiaa,

    Je suis dans le même cas que toi, je souhaite afficher une div uniquement lorsque je suis sur la page index mais elle apparait également lorsque je navigue à travers les catégories du site.

    As tu trouvé une solution ?

    Ou une personne peut elle nous renseigner ?

    Merci à vous !

  8. #8
    Candidat au Club
    Homme Profil pro
    Webmaster
    Inscrit en
    Mars 2011
    Messages
    2
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Boutique - Magasin

    Informations forums :
    Inscription : Mars 2011
    Messages : 2
    Points : 2
    Points
    2
    Par défaut Solution !!! :-)))
    Pour ceux que cela intéresse je viens de trouver la solution :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    <?php if (empty($_GET) && basename($PHP_SELF) == FILENAME_DEFAULT ) {
    ?>
     
    <div>VOTRE_CONTENU</div>
     
    <?php } else{ }?>

Discussions similaires

  1. [osCommerce] Débuter avec oscommerce
    Par coolanso dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 0
    Dernier message: 14/05/2014, 23h07
  2. Réussir son site e-commerce avec osCommerce
    Par vermine dans le forum Livres
    Réponses: 0
    Dernier message: 01/01/2008, 12h00
  3. Problème d'index avec load data file
    Par bruno782 dans le forum SQL Procédural
    Réponses: 2
    Dernier message: 09/03/2005, 12h11
  4. Index avec conditions
    Par marhnix dans le forum MS SQL Server
    Réponses: 4
    Dernier message: 29/03/2004, 10h48

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo