Jump to content

Yepi1533005574

Members
  • Content count

    206
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by Yepi1533005574


  1. Hi Leute, mir ist aufgefallen, dass die Buttons zum bearbeiten und löschen der Banner verschwunden sind.
    Hat jemand nen Tipp warum ?

    <?php
    /*
      $Id$
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2010 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      $action = (isset($_GET['action']) ? $_GET['action'] : '');
    
      $banner_extension = tep_banner_image_extension();
    
      if (tep_not_null($action)) {
        switch ($action) {
          case 'setflag':
            if ( ($_GET['flag'] == '0') || ($_GET['flag'] == '1') ) {
              tep_set_banner_status($_GET['bID'], $_GET['flag']);
    
              $messageStack->add_session(SUCCESS_BANNER_STATUS_UPDATED, 'success');
            } else {
              $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error');
            }
    
            tep_redirect(tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $_GET['bID']));
            break;
          case 'insert':
          case 'update':
            if (isset($_POST['banners_id'])) $banners_id = tep_db_prepare_input($_POST['banners_id']);
            $banners_title = tep_db_prepare_input($_POST['banners_title']);
            $banners_url = tep_db_prepare_input($_POST['banners_url']);
            $new_banners_group = tep_db_prepare_input($_POST['new_banners_group']);
            $banners_group = (empty($new_banners_group)) ? tep_db_prepare_input($_POST['banners_group']) : $new_banners_group;
            $banners_html_text = tep_db_prepare_input($_POST['banners_html_text']);
            $banners_image_local = tep_db_prepare_input($_POST['banners_image_local']);
            $banners_image_target = tep_db_prepare_input($_POST['banners_image_target']);
            $db_image_location = '';
            $expires_date = tep_db_prepare_input($_POST['expires_date']);
            $expires_impressions = tep_db_prepare_input($_POST['expires_impressions']);
            $date_scheduled = tep_db_prepare_input($_POST['date_scheduled']);
    
            $banner_error = false;
            if (empty($banners_title)) {
              $messageStack->add(ERROR_BANNER_TITLE_REQUIRED, 'error');
              $banner_error = true;
            }
    
            if (empty($banners_group)) {
              $messageStack->add(ERROR_BANNER_GROUP_REQUIRED, 'error');
              $banner_error = true;
            }
    
            if (empty($banners_html_text)) {
              if (empty($banners_image_local)) {
                $banners_image = new upload('banners_image');
                $banners_image->set_destination(DIR_FS_CATALOG_IMAGES . $banners_image_target);
                if ( ($banners_image->parse() == false) || ($banners_image->save() == false) ) {
                  $banner_error = true;
                }
              }
            }
    
            if ($banner_error == false) {
              $db_image_location = (tep_not_null($banners_image_local)) ? $banners_image_local : $banners_image_target . $banners_image->filename;
              $sql_data_array = array('banners_title' => $banners_title,
                                      'banners_url' => $banners_url,
                                      'banners_image' => $db_image_location,
                                      'banners_group' => $banners_group,
                                      'banners_html_text' => $banners_html_text,
                                      'expires_date' => 'null',
                                      'expires_impressions' => 0,
                                      'date_scheduled' => 'null');
    
              if ($action == 'insert') {
                $insert_sql_data = array('date_added' => 'now()',
                                         'status' => '1');
    
                $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
    
                tep_db_perform(TABLE_BANNERS, $sql_data_array);
    
                $banners_id = tep_db_insert_id();
    
                $messageStack->add_session(SUCCESS_BANNER_INSERTED, 'success');
              } elseif ($action == 'update') {
                tep_db_perform(TABLE_BANNERS, $sql_data_array, 'update', "banners_id = '" . (int)$banners_id . "'");
    
                $messageStack->add_session(SUCCESS_BANNER_UPDATED, 'success');
              }
    
              if (tep_not_null($expires_date)) {
                $expires_date = substr($expires_date, 0, 4) . substr($expires_date, 5, 2) . substr($expires_date, 8, 2);
    
                tep_db_query("update " . TABLE_BANNERS . " set expires_date = '" . tep_db_input($expires_date) . "', expires_impressions = null where banners_id = '" . (int)$banners_id . "'");
              } elseif (tep_not_null($expires_impressions)) {
                tep_db_query("update " . TABLE_BANNERS . " set expires_impressions = '" . tep_db_input($expires_impressions) . "', expires_date = null where banners_id = '" . (int)$banners_id . "'");
              }
    
              if (tep_not_null($date_scheduled)) {
                $date_scheduled = substr($date_scheduled, 0, 4) . substr($date_scheduled, 5, 2) . substr($date_scheduled, 8, 2);
    
                tep_db_query("update " . TABLE_BANNERS . " set status = '0', date_scheduled = '" . tep_db_input($date_scheduled) . "' where banners_id = '" . (int)$banners_id . "'");
              }
    
              tep_redirect(tep_href_link('banner_manager.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'bID=' . $banners_id));
            } else {
              $action = 'new';
            }
            break;
          case 'deleteconfirm':
            $banners_id = tep_db_prepare_input($_GET['bID']);
    
            if (isset($_POST['delete_image']) && ($_POST['delete_image'] == 'on')) {
              $banner_query = tep_db_query("select banners_image from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'");
              $banner = tep_db_fetch_array($banner_query);
    
              if (is_file(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) {
                if (tep_is_writable(DIR_FS_CATALOG_IMAGES . $banner['banners_image'])) {
                  unlink(DIR_FS_CATALOG_IMAGES . $banner['banners_image']);
                } else {
                  $messageStack->add_session(ERROR_IMAGE_IS_NOT_WRITEABLE, 'error');
                }
              } else {
                $messageStack->add_session(ERROR_IMAGE_DOES_NOT_EXIST, 'error');
              }
            }
    
            tep_db_query("delete from " . TABLE_BANNERS . " where banners_id = '" . (int)$banners_id . "'");
            tep_db_query("delete from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$banners_id . "'");
    
            if (function_exists('imagecreate') && tep_not_null($banner_extension)) {
              if (is_file('images/graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) {
                if (tep_is_writable('images/graphs/banner_infobox-' . $banners_id . '.' . $banner_extension)) {
                  unlink('images/graphs/banner_infobox-' . $banners_id . '.' . $banner_extension);
                }
              }
    
              if (is_file('images/graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) {
                if (tep_is_writable('images/graphs/banner_yearly-' . $banners_id . '.' . $banner_extension)) {
                  unlink('images/graphs/banner_yearly-' . $banners_id . '.' . $banner_extension);
                }
              }
    
              if (is_file('images/graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) {
                if (tep_is_writable('images/graphs/banner_monthly-' . $banners_id . '.' . $banner_extension)) {
                  unlink('images/graphs/banner_monthly-' . $banners_id . '.' . $banner_extension);
                }
              }
    
              if (is_file('images/graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) {
                if (tep_is_writable('images/graphs/banner_daily-' . $banners_id . '.' . $banner_extension)) {
                  unlink('images/graphs/banner_daily-' . $banners_id . '.' . $banner_extension);
                }
              }
            }
    
            $messageStack->add_session(SUCCESS_BANNER_REMOVED, 'success');
    
            tep_redirect(tep_href_link('banner_manager.php', 'page=' . $_GET['page']));
            break;
        }
      }
    
    // check if the graphs directory exists
      $dir_ok = false;
      if (function_exists('imagecreate') && tep_not_null($banner_extension)) {
        if (is_dir('images/graphs')) {
          if (tep_is_writable('images/graphs')) {
            $dir_ok = true;
          } else {
            $messageStack->add(ERROR_GRAPHS_DIRECTORY_NOT_WRITEABLE, 'error');
          }
        } else {
          $messageStack->add(ERROR_GRAPHS_DIRECTORY_DOES_NOT_EXIST, 'error');
        }
      }
    
      require('includes/template_top.php');
    ?>
    
    <script type="text/javascript"><!--
    function popupImageWindow(url) {
      window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
    }
    //--></script>
    
        <table border="0" width="99%" cellspacing="0" cellpadding="2">
          <tr>
            <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
                <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
              </tr>
            </table></td>
          </tr>
    <?php
      if ($action == 'new') {
        $form_action = 'insert';
    
        $parameters = array('expires_date' => '',
                            'date_scheduled' => '',
                            'banners_title' => '',
                            'banners_url' => '',
                            'banners_group' => '',
                            'banners_image' => '',
                            'banners_html_text' => '',
                            'expires_impressions' => '');
    
        $bInfo = new objectInfo($parameters);
    
        if (isset($_GET['bID'])) {
          $form_action = 'update';
    
          $bID = tep_db_prepare_input($_GET['bID']);
    
          $banner_query = tep_db_query("select banners_title, banners_url, banners_image, banners_group, banners_html_text, status, date_format(date_scheduled, '%Y/%m/%d') as date_scheduled, date_format(expires_date, '%Y/%m/%d') as expires_date, expires_impressions, date_status_change from " . TABLE_BANNERS . " where banners_id = '" . (int)$bID . "'");
          $banner = tep_db_fetch_array($banner_query);
    
          $bInfo->objectInfo($banner);
        } elseif (tep_not_null($_POST)) {
          $bInfo->objectInfo($_POST);
        }
    
        $groups_array = array();
        $groups_query = tep_db_query("select distinct banners_group from " . TABLE_BANNERS . " order by banners_group");
        while ($groups = tep_db_fetch_array($groups_query)) {
          $groups_array[] = array('id' => $groups['banners_group'], 'text' => $groups['banners_group']);
        }
    ?>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr><?php echo tep_draw_form('new_banner', 'banner_manager.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'action=' . $form_action, 'post', 'enctype="multipart/form-data"'); if ($form_action == 'update') echo tep_draw_hidden_field('banners_id', $bID); ?>
            <td><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo TEXT_BANNERS_TITLE; ?></td>
                <td class="main"><?php echo tep_draw_input_field('banners_title', $bInfo->banners_title, '', true); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo TEXT_BANNERS_URL; ?></td>
                <td class="main"><?php echo tep_draw_input_field('banners_url', $bInfo->banners_url); ?></td>
              </tr>
              <tr>
                <td class="main" valign="top"><?php echo TEXT_BANNERS_GROUP; ?></td>
                <td class="main"><?php echo tep_draw_pull_down_menu('banners_group', $groups_array, $bInfo->banners_group) . TEXT_BANNERS_NEW_GROUP . '<br />' . tep_draw_input_field('new_banners_group', '', '', ((sizeof($groups_array) > 0) ? false : true)); ?></td>
              </tr>
              <tr>
                <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
              </tr>
              <tr>
                <td class="main" valign="top"><?php echo TEXT_BANNERS_IMAGE; ?></td>
                <td class="main"><?php echo tep_draw_file_field('banners_image') . ' ' . TEXT_BANNERS_IMAGE_LOCAL . '<br />' . DIR_FS_CATALOG_IMAGES . tep_draw_input_field('banners_image_local', (isset($bInfo->banners_image) ? $bInfo->banners_image : '')); ?></td>
              </tr>
              <tr>
                <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo TEXT_BANNERS_IMAGE_TARGET; ?></td>
                <td class="main"><?php echo DIR_FS_CATALOG_IMAGES . tep_draw_input_field('banners_image_target'); ?></td>
              </tr>
              <tr>
                <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
              </tr>
              <tr>
                <td valign="top" class="main"><?php echo TEXT_BANNERS_HTML_TEXT; ?></td>
                <td class="main"><?php echo tep_draw_textarea_field('banners_html_text', 'soft', '60', '5', $bInfo->banners_html_text); ?></td>
              </tr>
              <tr>
                <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
              </tr>
              <tr>
                <td class="main"><?php echo TEXT_BANNERS_SCHEDULED_AT; ?></td>
                <td class="main"><?php echo tep_draw_input_field('date_scheduled', $bInfo->date_scheduled, 'id="date_scheduled"') . ' <small>(YYYY-MM-DD)</small>'; ?></td>
              </tr>
              <tr>
                <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
              </tr>
              <tr>
                <td valign="top" class="main"><?php echo TEXT_BANNERS_EXPIRES_ON; ?></td>
                <td class="main"><?php echo tep_draw_input_field('expires_date', $bInfo->expires_date, 'id="expires_date"') . ' <small>(YYYY-MM-DD)</small>' . TEXT_BANNERS_OR_AT . '<br />' . tep_draw_input_field('expires_impressions', $bInfo->expires_impressions, 'maxlength="7" size="7"') . ' ' . TEXT_BANNERS_IMPRESSIONS; ?></td>
              </tr>
            </table>
    
    <script type="text/javascript">
    $('#date_scheduled').datepicker({
      dateFormat: 'yy-mm-dd'
    });
    $('#expires_date').datepicker({
      dateFormat: 'yy-mm-dd'
    });
    </script>
    
            </td>
          </tr>
          <tr>
            <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
          </tr>
          <tr>
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo TEXT_BANNERS_BANNER_NOTE . '<br />' . TEXT_BANNERS_INSERT_NOTE . '<br />' . TEXT_BANNERS_EXPIRCY_NOTE . '<br />' . TEXT_BANNERS_SCHEDULE_NOTE; ?></td>
                <td class="smallText" align="right" valign="top" nowrap><?php echo tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('banner_manager.php', (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . (isset($_GET['bID']) ? 'bID=' . $_GET['bID'] : ''))); ?></td>
              </tr>
            </table></td>
          </form></tr>
    <?php
      } else {
    ?>
          <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_BANNERS; ?></td>
                    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_GROUPS; ?></td>
                    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATISTICS; ?></td>
                    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_STATUS; ?></td>
                    <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
                  </tr>
    <?php
        $banners_query_raw = "select banners_id, banners_title, banners_image, banners_group, status, expires_date, expires_impressions, date_status_change, date_scheduled, date_added from " . TABLE_BANNERS . " order by banners_title, banners_group";
        $banners_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $banners_query_raw, $banners_query_numrows);
        $banners_query = tep_db_query($banners_query_raw);
        while ($banners = tep_db_fetch_array($banners_query)) {
          $info_query = tep_db_query("select sum(banners_shown) as banners_shown, sum(banners_clicked) as banners_clicked from " . TABLE_BANNERS_HISTORY . " where banners_id = '" . (int)$banners['banners_id'] . "'");
          $info = tep_db_fetch_array($info_query);
    
          if ((!isset($_GET['bID']) || (isset($_GET['bID']) && ($_GET['bID'] == $banners['banners_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) {
            $bInfo_array = array_merge($banners, $info);
            $bInfo = new objectInfo($bInfo_array);
          }
    
          $banners_shown = ($info['banners_shown'] != '') ? $info['banners_shown'] : '0';
          $banners_clicked = ($info['banners_clicked'] != '') ? $info['banners_clicked'] : '0';
    
          if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) {
            echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('banner_statistics.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id) . '\'">' . "\n";
          } else {
            echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $banners['banners_id']) . '\'">' . "\n";
          }
    ?>
                    <td class="dataTableContent"><?php echo '<a href="javascript:popupImageWindow(\'popup_image.php?banner=' . $banners['banners_id'] . '\')">' . tep_image('images/icon_popup.gif', 'View Banner') . '</a>&nbsp;' . $banners['banners_title']; ?></td>
                    <td class="dataTableContent" align="right"><?php echo $banners['banners_group']; ?></td>
                    <td class="dataTableContent" align="right"><?php echo $banners_shown . ' / ' . $banners_clicked; ?></td>
                    <td class="dataTableContent" align="right">
    <?php
          if ($banners['status'] == '1') {
            echo tep_image('images/icon_status_green.gif', 'Active', 10, 10) . '&nbsp;&nbsp;<a href="' . tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $banners['banners_id'] . '&action=setflag&flag=0') . '">' . tep_image('images/icon_status_red_light.gif', 'Set Inactive', 10, 10) . '</a>';
          } else {
            echo '<a href="' . tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $banners['banners_id'] . '&action=setflag&flag=1') . '">' . tep_image('images/icon_status_green_light.gif', 'Set Active', 10, 10) . '</a>&nbsp;&nbsp;' . tep_image('images/icon_status_red.gif', 'Inactive', 10, 10);
          }
    ?></td>
                    <td class="dataTableContent" align="right"><?php echo '<a href="' . tep_href_link('banner_statistics.php', 'page=' . $_GET['page'] . '&bID=' . $banners['banners_id']) . '">' . tep_image('images/icons/statistics.gif', ICON_STATISTICS) . '</a>&nbsp;'; if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) { echo tep_image('images/icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $banners['banners_id']) . '">' . tep_image('images/icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td>
                  </tr>
    <?php
        }
    ?>
                  <tr>
                    <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                      <tr>
                        <td class="smallText" valign="top"><?php echo $banners_split->display_count($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_BANNERS); ?></td>
                        <td class="smallText" align="right"><?php echo $banners_split->display_links($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></td>
                      </tr>
                      <tr>
                        <td class="smallText" align="right" colspan="2"><?php echo tep_draw_button(IMAGE_NEW_BANNER, 'plus', tep_href_link('banner_manager.php', 'action=new')); ?></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
    <?php
      $heading = array();
      $contents = array();
      switch ($action) {
        case 'delete':
          $heading[] = array('text' => '<strong>' . $bInfo->banners_title . '</strong>');
    
          $contents = array('form' => tep_draw_form('banners', 'banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=deleteconfirm'));
          $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
          $contents[] = array('text' => '<br /><strong>' . $bInfo->banners_title . '</strong>');
          if ($bInfo->banners_image) $contents[] = array('text' => '<br />' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);
          $contents[] = array('align' => 'center', 'text' => '<br />' . tep_draw_button(IMAGE_DELETE, 'trash', null, 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $_GET['bID'])));
          break;
        default:
          if (is_object($bInfo)) {
            $heading[] = array('text' => '<strong>' . $bInfo->banners_title . '</strong>');
    
            $contents[] = array('align' => 'center', 'text' => tep_draw_button(IMAGE_EDIT, 'document', tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=new')) . tep_draw_button(IMAGE_DELETE, 'trash', tep_href_link('banner_manager.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=delete')) . tep_draw_button(IMAGE_DETAILS, 'info', tep_href_link('banner_statistics.php', 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id)));
            $contents[] = array('text' => '<br />' . TEXT_BANNERS_DATE_ADDED . ' ' . tep_date_short($bInfo->date_added));
    
            if ( (function_exists('imagecreate')) && ($dir_ok) && ($banner_extension) ) {
              $banner_id = $bInfo->banners_id;
              $days = '3';
              include('includes/graphs/banner_infobox.php');
              $contents[] = array('align' => 'center', 'text' => '<br />' . tep_image('images/graphs/banner_infobox-' . $banner_id . '.' . $banner_extension));
            } else {
              include('includes/functions/html_graphs.php');
              $contents[] = array('align' => 'center', 'text' => '<br />' . tep_banner_graph_infoBox($bInfo->banners_id, '3'));
            }
    
            $contents[] = array('text' => tep_image('images/graph_hbar_blue.gif', 'Blue', '5', '5') . ' ' . TEXT_BANNERS_BANNER_VIEWS . '<br />' . tep_image('images/graph_hbar_red.gif', 'Red', '5', '5') . ' ' . TEXT_BANNERS_BANNER_CLICKS);
    
            if ($bInfo->date_scheduled) $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled)));
    
            if ($bInfo->expires_date) {
              $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date)));
            } elseif ($bInfo->expires_impressions) {
              $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));
            }
    
            if ($bInfo->date_status_change) $contents[] = array('text' => '<br />' . sprintf(TEXT_BANNERS_STATUS_CHANGE, tep_date_short($bInfo->date_status_change)));
          }
          break;
      }
    
      if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
        echo '            <td width="25%" valign="top">' . "\n";
    
        $box = new box;
        echo $box->infoBox($heading, $contents);
    
        echo '            </td>' . "\n";
      }
    ?>
              </tr>
            </table></td>
          </tr>
    <?php
      }
    ?>
        </table>
    
    <?php
      require('includes/template_bottom.php');
      require('includes/application_bottom.php');
    ?>

     


  2. auf jeden Fall, finder der die zwei Dateien auf deinem Server nicht warum auch immer.

    admin/includes/modules/newsletters/newsletter_products.php

    /admin/includes/languages/english/modules/newsletters/newsletter_products.php


  3. <?php
    /*
      $Id$
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2010 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_VIEWNEWS);
    
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_VIEWNEWS));
    
      require(DIR_WS_INCLUDES . 'template_top.php');
    ?>
    
    <h1><?php echo HEADING_TITLE; ?></h1>
    
    <div class="contentContainer">
      <div class="contentText">
        <?php
      $nID = (isset($HTTP_GET_VARS['nID']) ? tep_db_prepare_input($HTTP_GET_VARS['nID']) : 0);
      //newsletter products
      $newsletter_query = tep_db_query("select title, content, module, template from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'");
    	if (tep_db_num_rows($newsletter_query) == 1) {
        $newsletter = tep_db_fetch_array($newsletter_query);
        $newsletter_products_query = tep_db_query("select products_id from " . TABLE_NEWSLETTERS_TO_PRODUCTS . " where newsletters_id = '" . (int)$nID . "'");
        while ($newsletter_products = tep_db_fetch_array($newsletter_products_query)) {
    	    $news_products[] = $newsletter_products['products_id'];
        }      
        $newsletter['products'] = $news_products;
    	  if ($newsletter['module'] == 'newsletter_products') {
    //	  include('catalog/admin/includes/modules/newsletters/newsletter_products.php');
    	  include(DIR_FS_CATALOG . 'admin/includes/modules/newsletters/newsletter_products.php');
          include(DIR_FS_CATALOG . 'admin/includes/languages/english/modules/newsletters/newsletter_products.php');
          $module = new newsletter_products($newsletter['title'], $newsletter['content'], $newsletter['products'], $newsletter['template']);
          echo $module->html_content();
    	  } else {
          echo nl2br($newsletter['content']);
    	  }    
    	  //end newsletter products
    	} else {
    		echo TEXT_NOT_FOUND;
    	}
    	echo "\n";
    		?>
      </div>
    
      <div class="buttonSet">
        <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?></span>
      </div>
    </div>
    
    <?php
      require(DIR_WS_INCLUDES . 'template_bottom.php');
      require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>

    Versuchs mal damit


  4. define('TEXT_UNSUBSCRIBE', 'Hinweis: Sie erhalten diese E-Mail, weil Sie bei unsererm Shop ein Profil erstellt haben und angegeben haben, dass Sie unseren Newsletter abonnieren möchten. Wenn Sie solche E-Mails nicht mehr erhalten möchten, melden Sie sich einfach bei Ihrem Konto unter <a href="'. HTTPS_CATALOG_SERVER . DIR_WS_CATALOG . 'account_newsletters.php'/*. YOUR_UNSUBSCRIBE_LINK*/ .'" target="_blank">'. HTTPS_CATALOG_SERVER . DIR_WS_CATALOG . 'account_newsletters.php'/*. YOUR_UNSUBSCRIBE_LINK*/ .'</a> an. Dort deaktivieren Sie das Kontrollkästchen für Allgemeiner Newsletter und klicken auf die Weiter-Schaltfläche.');

    austauschen gegen

    define('TEXT_UNSUBSCRIBE', 'Hinweis: Sie erhalten diese E-Mail, weil Sie bei unsererm Shop ein Profil erstellt haben und angegeben haben, dass Sie unseren Newsletter abonnieren möchten. Wenn Sie solche E-Mails nicht mehr erhalten möchten, melden Sie sich einfach bei Ihrem Konto unter <a href="'. HTTPS_CATALOG_SERVER . DIR_WS_CATALOG . 'account_newsletters.php' . YOUR_UNSUBSCRIBE_LINK .'" target="_blank">'. HTTPS_CATALOG_SERVER . DIR_WS_CATALOG . 'account_newsletters.php' . YOUR_UNSUBSCRIBE_LINK .'</a> an. Dort deaktivieren Sie das Kontrollkästchen für Allgemeiner Newsletter und klicken auf die Weiter-Schaltfläche.');
    
    define('YOUR_UNSUBSCRIBE_LINK', 'Newsletter abbestellen');

     


  5. Warning: include(/homepages/XXXXXXX/htdocs/catalog/admin/includes/modules/newsletters/newsletter_products.php): failed to open stream: No such file or directory in /homepages/XXXXXXX/htdocs/catalog/view_newsletter.php on line 39

     

    Diese Meldung sagt aus, dass eine Datei nicht vorhanden ist, bzw der Pfad nicht richtig ist.

    Schau genauer ob alles auf dem Server geladen ist und ob der Pfad zu der "newsletter_products.php" richtig gesetzt ist.

    Die andere Sache ist die ob deine php Version diesen Code unterstützt


  6. Ich hab mir das angeschaut, da es allerdings aus der alten Software von mir stammt nutze ich es nicht mehr.
    Soweit ich aber sehen konnte habe ich die Mail umgebaut, so, dass ich den Link zum Newsletter rausgenommen habe da die Ansicht der Produkt Newsletter nicht funktioniert hat. Die Textnewstetter waren OK doch alles andere hat nur Fehler bei der Anzeige im Shop gebracht. 


  7. Das ist meine:

    <?php
    /*
      $Id$
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2010 osCommerce
    
      Released under the GNU General Public License
    */
    
      require('includes/application_top.php');
    
      require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_VIEWNEWS);
    
      $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_VIEWNEWS));
    
      require(DIR_WS_INCLUDES . 'template_top.php');
    ?>
    
    <h1><?php echo HEADING_TITLE; ?></h1>
    
    <div class="contentContainer">
      <div class="contentText">
        <?php
      $nID = (isset($HTTP_GET_VARS['nID']) ? tep_db_prepare_input($HTTP_GET_VARS['nID']) : 0);
      //newsletter products
      $newsletter_query = tep_db_query("select title, content, module, template from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int)$nID . "'");
    	if (tep_db_num_rows($newsletter_query) == 1) {
        $newsletter = tep_db_fetch_array($newsletter_query);
        $newsletter_products_query = tep_db_query("select products_id from " . TABLE_NEWSLETTERS_TO_PRODUCTS . " where newsletters_id = '" . (int)$nID . "'");
        while ($newsletter_products = tep_db_fetch_array($newsletter_products_query)) {
    	    $news_products[] = $newsletter_products['products_id'];
        }      
        $newsletter['products'] = $news_products;
    	  if ($newsletter['module'] == 'newsletter_products') {
    //	  include('catalog/admin/includes/modules/newsletters/newsletter_products.php');
    	  include(DIR_FS_CATALOG . 'admin/includes/modules/newsletters/newsletter_products.php');
          include(DIR_FS_CATALOG . 'admin/includes/languages/english/modules/newsletters/newsletter_products.php');
          $module = new newsletter_products($newsletter['title'], $newsletter['content'], $newsletter['products'], $newsletter['template']);
          echo $module->html_content();
    	  } else {
          echo nl2br($newsletter['content']);
    	  }    
    	  //end newsletter products
    	} else {
    		echo TEXT_NOT_FOUND;
    	}
    	echo "\n";
    		?>
      </div>
    
      <div class="buttonSet">
        <span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?></span>
      </div>
    </div>
    
    <?php
      require(DIR_WS_INCLUDES . 'template_bottom.php');
      require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>

     


  8. Ich weiss nicht welche osC-Version du nutzt aber schau mal in includes ob du die Datei filenames.php hast. Wenn nicht dann meinen redirect:

    if (!tep_session_is_registered('customer_id')) {
        $navigation->set_snapshot();
        tep_redirect(tep_href_link('login.php', '', 'SSL'));
      }

     

    ansonsten den von Ingo

    if (!tep_session_is_registered('customer_id')) {
        $navigation->set_snapshot();
        tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
      }


  9. Ja, danke Ingo :).

    Ich habe aber immernoch das Problem, dass die Buttons nicht reagieren.
    Etwas ist an der Abfrage falsch, da der Butto bei 0 in der spalte " administrator_group_btnaccess " nicht angezeigt werden darf und trotzdem erscheint dieser egal ob 1 oder 0.

    Ich komm da nicht weiter


  10. Hat keiner ne Idee ? damit funzt es auch nicht. Komme einfach nicht weiter.

    $administrator_btnaccess_query = tep_db_query("select administrator_group_id, administrator_group_name from " . TABLE_ADMINISTRATOR_GROUPS . " 
    where administrator_group_btnaccess > 0 order by administrator_group_name");
    
    if (tep_db_num_rows($administrator_btnaccess_query)) {
       while ($btnaccess = tep_db_fetch_array($administrator_btnaccess_query)) {
         $btnaccess_array[] = array('text' => $btnaccess['administrator_group_btnaccess']);
       } 
         
       echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) .  tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . '&nbsp;' . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('categories.php', 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : ''))); 
    }
    ?>

     

    Ich verstehe nicht warum diese Meldung ausgegeben wird ?

    Notice: Undefined index: administrator_group_btnaccess in /var/www/vhosts/xxx/categories.php on line 963

     

    hier der Code:

    $btnaccess_array[] = array('text' => $btnaccess['administrator_group_btnaccess']);


  11. Das ist richtig. Jeder Kunde der verlangt sein Account zu löschen muss nachweisen, dass auch er der ist für den er sich ausgibt.
    Die einfachste methode ist, dass er diese Aufvorderung mit der E.Mailadresse zuschickt mit der er sich registriert hat und diese dann auch bestätigen muss.

    Alles nicht der Rede wert.

    Sollte eine andere Person diese E-Mailadresse zu Löschug eines fremden Accounts nutzen so ist das nicht mehr dein Problem sondern der E-Mailprovider oder der Person die Ihre Daten wem auch immer zugänglich gemacht hat.


  12. Dieses Häckchen wird bei der Registrierung gesetzt. Somit wird das auch in der Registriermail schriftlich festgehalten.
    Ist das Häckchen an, so bekommt der Kunde alle Newsletter automatisch zugestellt. Loggt er sich ein und entfernt das Häckchen, so werden auch keine Newsletter mehr zugestellt.

    Wo ist das Problem ? 

    Wenn du aber einen externen Newsletter nutzt, dann musst du entsprechende Vorkehrungen treffen.


  13. Das hat mit dem neuen Gesetzt absolut nichts zu tun. Da kan DPD DHL und sonst jemand kommen und behaupten ohne Telefonnummer geht nichts. Leider. Telefonnummer ist ab Freitag kein Pflichtfeld mehr und das ist Fakt. Will der Kunde seine Ware per Versand, muss er freiwillig seine Telefonnummer hinterlassen. dazu gibt es if Abfragen nach Land und Telefonnummer und sobald z.B. ein Kunde aus Italien diese Angaben nicht hinterlegt hat bekommt er eine Fehlermeldung was den Versand angeht.

    Die Pflicht liegt in den Händen der Shopbetreiber.


  14. Also Leut, auf jeden Fall das Feld für die Telefonnummer muss von der Angabepflicht des Kunden raus.
    Ihr könnt den zwar behalten jedoch diese Angaben müssen deutlich als freiwillige Angaben deklariert werden.

    Was die Checkboxen angeht, bleiben diese bestehen. Der Kunde muss durch das Häckchen setzen bestätigen, dass er alles gelesen und verstanden hat dazu garantiert das Häckchen, dass der Kunde Freiwillig alle Handlungen vornimmt und den Bedingungen zustimmt.


  15. Leut, was läuft hier schief ?

    Möchte die Buttons in der categories.php für bestimmte Admins ausblenden.

    *********************

    DB:

    CREATE TABLE IF NOT EXISTS `administrator_groups` (
      `administrator_group_id` int(11) NOT NULL AUTO_INCREMENT,
      `administrator_group_name` varchar(100) NOT NULL,
      `administrator_group_btnaccess` varchar(1) NOT NULL,
      PRIMARY KEY (`administrator_group_id`)
    ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

    **********************

    INSERT INTO `administrator_groups` (`administrator_group_id`, `administrator_group_name`, `administrator_group_btnaccess`) VALUES
    (1, 'Hauptadmin', '1'),
    (2, 'Admin 01', '0');
     

    **************************************************

    categories.php

    $btnaccess_array = array(array('text' => TEXT_NONE));
    $administrator_btnaccess_query = "select administrator_group_id, administrator_group_name, administrator_group_btnaccess from " . TABLE_ADMINISTRATOR_GROUPS . " where 1 order by administrator_group_name";
        while ($btnaccess = tep_db_fetch_array($administrator_btnaccess_query)) {
          $btnaccess_array[] = array('text' => $btnaccess['administrator_group_btnaccess']);
        }

     

    <?php if ($btnaccess['administrator_group_btnaccess'] > '0') {
            echo tep_draw_hidden_field('products_date_added', (tep_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d'))) .  tep_draw_button(IMAGE_SAVE, 'disk', null, 'primary') . '&nbsp;' . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link('categories.php', 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : ''))); 
            }?>

×