Jump to content

X-Men1533006319

Members
  • Content count

    16
  • Joined

  • Last visited


Reputation Activity

  1. Like
    X-Men1533006319 reacted to IngoPhisto in Newsletter   
    Okay. Aber was genau, ist an den Fehlermeldungen so schwer zu verstehen? ("No such file or Directory")
    Es werden zwei fehlende Dateien angemahnt. In einer davon muss wahrscheinlich die Klasse Newsletter_products zu finden sein.
  2. Like
    X-Men1533006319 reacted to Yepi1533005574 in Newsletter   
    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'); ?>  
  3. Like
    X-Men1533006319 reacted to Yepi1533005574 in Newsletter   
    Hi @X-Men1533006319,
    Schauu mal hier rein:
    https://apps.oscommerce.com/JvOkG&newslettter-products-for-oscommerce-2-3
    Ich glaube das habe ich mitinstalliert. Deswegen die Fehlermeldung.
    Bau es ein und es sollte laufen.
  4. Like
    X-Men1533006319 reacted to Yepi1533005574 in Newsletter   
    hier das Modul:
    <?php
    /*
      $Id: newsletter_products.php,v 2.0 2007/05/17 scottyb Exp $
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
      Copyright (c) 2002 osCommerce
      Released under the GNU General Public License
      //newsletter products
    */
      class newsletter_products {
        function newsletter_products($title, $content, $products, $template) {
          $this->title = $title;
          $this->content = $content;
          $this->products = $products;
          $this->template = $template;
        }
        
        function choose_products() {
          global $HTTP_GET_VARS, $languages_id;
            
          //first let's get the products that have been added to newsletter
          if ($HTTP_GET_VARS['nID']) {
              $newsletter_products_query = tep_db_query("select products_id from " . TABLE_NEWSLETTERS_TO_PRODUCTS . " where newsletters_id ='" . (int)$HTTP_GET_VARS['nID'] . "'");
              $newsletter_products_string = '';
              while($newsletter_products = tep_db_fetch_array($newsletter_products_query)){
                  $newsletter_products_string .= $newsletter_products['products_id'] . ', ';
              }
              $newsletter_products_string = trim($newsletter_products_string, ', ');
          //$newsletter_products_string = tep_db_result($newsletter_products_query, 0, $newsletter_products_query['products']);
              $current_products_query = "select pd.products_id, pd.products_name, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.language_id = '" . (int)$languages_id . "' and pd.products_id = p.products_id and p.products_status = '1'";
              if($newsletter_products_string) $current_products_query .= " and pd.products_id in (" . $newsletter_products_string . ")";
            $current_products_query .= " order by pd.products_name";
            $current_products_query = tep_db_query($current_products_query);
          }   
          
          if($newsletter_products_string){
              $current_products_array = array();
              while ($current_products = tep_db_fetch_array($current_products_query)){
                  $current_products_array[] = array('id' => $current_products['products_id'],
                                                    'text' => $current_products['products_name'] . ' - ' . $current_products['products_model']);
              }
          }
          
          $products_query = "select pd.products_id, pd.products_name, p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.language_id = '" . (int)$languages_id . "' and pd.products_id = p.products_id and p.products_status = '1'";
          if ($newsletter_products_string) $products_query .= " and pd.products_id not in(" . $newsletter_products_string . ")";
          $products_query .= " order by pd.products_name";
          
          $products_array = array();
          $products_query = tep_db_query($products_query);
          
          while ($products = tep_db_fetch_array($products_query)) {
            $products_array[] = array('id' => $products['products_id'],
                                      'text' => $products['products_name'] . ' - ' . $products['products_model']);
          }
    $choose_products_string = '<script language="javascript"><!--
    function mover(move) {
      if (move == \'remove\') {
        for (x=0; x<(document.newsletter.products.length); x++) {
          if (document.newsletter.products.options[x].selected) {
            with(document.newsletter.elements[\'chosen[]\']) {
              options[options.length] = new Option(document.newsletter.products.options[x].text,document.newsletter.products.options[x].value);
            }
            document.newsletter.products.options[x] = null;
            x = -1;
          }
        }
      }
      if (move == \'add\') {
        for (x=0; x<(document.newsletter.elements[\'chosen[]\'].length); x++) {
          if (document.newsletter.elements[\'chosen[]\'].options[x].selected) {
            with(document.newsletter.products) {
              options[options.length] = new Option(document.newsletter.elements[\'chosen[]\'].options[x].text,document.newsletter.elements[\'chosen[]\'].options[x].value);
            }
            document.newsletter.elements[\'chosen[]\'].options[x] = null;
            x = -1;
          }
        }
      }
      return true;
    }
    function selectAll(FormName, SelectBox) {
      temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";
      Source = eval(temp);
      for (x=0; x<(Source.length); x++) {
        Source.options[x].selected = "true";
      }
    }
    //--></script>';
          $choose_products_string .= '<table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" .
                                     '  <tr>' . "\n" .
                                     '    <td align="center" class="main"><strong>' . TEXT_PRODUCTS . '</strong><br />' . tep_draw_pull_down_menu('products', $products_array, '', 'size="20" style="width: 32em;" multiple') . '</td>' . "\n" .
                                     '    <td align="center" class="main">&nbsp;<br /><br /><input type="button" value="' . BUTTON_SELECT . '" style="width: 8em;" onClick="mover(\'remove\');"><br /><br /><input type="button" value="' . BUTTON_UNSELECT . '" style="width: 8em;" onClick="mover(\'add\');"></td>' . "\n" .
                                     '    <td align="center" class="main"><strong>' . TEXT_SELECTED_PRODUCTS . '</strong><br />' . tep_draw_pull_down_menu('chosen[]', $current_products_array, '', 'size="20" style="width: 25em;" multiple') . '</td>' . "\n" .
                                     '  </tr>' . "\n" .
                                     '</table>';
          return $choose_products_string;
        }
        
        function productInfo(){
            global $languages_id;
            $this->productInfo = array();
            $p_string = '';
            for($i=0, $n=sizeof($this->products); $i<$n; $i++){
                $p_string .= $this->products[$i] . ', ';
            }
            $p_string = trim($p_string, ', ');
            
            $product_query = tep_db_query("select p.products_id, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, if(s.status, s.specials_new_products_price, NULL) as specials_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join (select * from (select products_id, specials_new_products_price, expires_date, status from " . TABLE_SPECIALS . " where status = 1 order by products_id, specials_new_products_price, expires_date) as t group by products_id) as s on pd.products_id = s.products_id where pd.products_id = p.products_id and p.products_id in(" . $p_string . ") and pd.language_id=" . (int)$languages_id . " order by products_name");
            
            //$this->productsInfo = array();
            while($product = tep_db_fetch_array($product_query)){
                $this->productsInfo[] = array('products_id' => $product['products_id'],
                                              'products_name' => $product['products_name'],
                                              'products_image' => $product['products_image'],
                                              'products_price' => $product['products_price'],
                                              'specials_price' => $product['specials_price'],
                                              'products_tax_class_id' => $product['products_tax_class_id']);
            }
        }    
        function html_content() {    
            global $currencies, $languages_id;        
            //create HTML string containing links & pics
            
            //define product columns here
            define('COLS', 2);
            $width = intval(100/COLS);
            $html_content = '<table border="0" width="100%" cellpadding="" cellspacing="3"><tr>';
            
            $col = 0;        
            $this->productInfo();
            
            //change html body styles here
            $cssPrice = 'color: #000000;';
            $cssSale = 'color: #ff0000;';
            $cssMarkdown = 'color: #000000; text-decoration: line-through';
            $cssLink = 'color: #ff0000; text-decoration: none';
            
            for ($i=0, $n=sizeof($this->productsInfo); $i<$n; $i++) {
                if ($col > COLS-1) {
                    $html_content .= '</tr><tr><td align="center" width="' . $width . '%"><a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->productsInfo[$i]['products_id']) . '" target="_blank" style="' . $cssLink . '">' . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $this->productsInfo[$i]['products_name'] . '</a><br />';
                    $price = ($this->productsInfo[$i]['specials_price']) ? '<span style="'. $cssMarkdown . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>&nbsp;&nbsp;<span style="' . $cssSale . '">' . $currencies->display_price($this->productsInfo[$i]['specials_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>' : '<span style="' . $cssPrice . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>';
                    $html_content .= $price . '</td>';
                    $col = 0;
                } else {
                    $html_content .= '<td align="center" width="' . $width . '%"><a href="' . tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->productsInfo[$i]['products_id']) . '" target="_blank" style="' . $cssLink . '">' . tep_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $this->productsInfo[$i]['products_image'], $this->productsInfo[$i]['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . $this->productsInfo[$i]['products_name'] . '</a><br />';
                    $price = ($this->productsInfo[$i]['specials_price']) ? '<span style="' . $cssMarkdown . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>&nbsp;&nbsp;<span style="' . $cssSale . '">' . $currencies->display_price($this->productsInfo[$i]['specials_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>' : '<span style="' . $cssPrice . '">' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . '</span>';
                    $html_content .= $price . '</td>';
                }
                $col++;
            }
            
            //uncomment & create your unsubscribe link in your includes/languages/YOUR LANGUAGE/modules/newsletters/newsletter_products.php
            $html_content .= '</tr><tr><td colspan="' . COLS . '">' . TEXT_UNSUBSCRIBE . '</td></tr></table>';
            
            if(tep_not_null($this->template)){
                //HTML page from template
                //$content = join('', file(DIR_WS_TEMPLATES . $this->template));
                $content = file_get_contents(DIR_WS_TEMPLATES . $this->template);
                //remove all line breaks and spaces in template to ensure no spaces resulting from email class
                $content = str_replace("\n", '', $content);
                $content = str_replace("\r", '', $content);
                //$content = str_replace('> ', '>', $content);
                $content = addslashes($content);
                $email_title = $this->title;
                $email_message = nl2br($this->content);
                $text_content = $this->content;
                eval ("\$content = \"$content\";");
                $html_content = $content;
            }
            
            return $html_content;
        }
        
        function text_content(){
            global $currencies, $languages_id;
        
            $text_content = $this->content . "\r\n\r\n";
            //var_dump($this->productsInfo);
            for($i=0, $n=sizeof($this->productsInfo); $i<$n; $i++){
                $text_content .= $this->productsInfo[$i]['products_name'] . ' ';
                $price = ($this->productsInfo[$i]['specials_price']) ? 'Sale Price: ' . $currencies->display_price($this->productsInfo[$i]['specials_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) . ' Down from: ' . $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id'])) : $currencies->display_price($this->productsInfo[$i]['products_price'], tep_get_tax_rate($this->productsInfo[$i]['products_tax_class_id']));
                $text_content .= $price . "\n";
                $text_content .= tep_catalog_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $this->productsInfo[$i]['products_id']) . "\r\r";
            }
            
            //uncomment & create your unsubscribe link in your includes/languages/YOUR LANGUAGE/modules/newsletters/newsletter_products.php
            $text_content .= "\r\r" . TEXT_UNSUBSCRIBE;
            
            return strip_tags(str_replace(array('<p>', '</p>', '<br>', '<br />', '<br/>', '<ul>', '<li>', '</ul>'), "\n", $text_content));
        }
        
        function confirm() {
          global $HTTP_GET_VARS;
          $mail_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
          $mail = tep_db_fetch_array($mail_query);
          $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td class="main" style="font-weight: bold; color: red">' . sprintf(TEXT_COUNT_CUSTOMERS, $mail['count']) . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td class="main" style="font-weight: bold">' . $this->title . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                              '  <tr>' . "\n" .
                            '    <td class="main">' . $this->text_content() . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td class="main">' . $this->html_content() . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '  <tr>' . "\n" .
                            '    <td class="smallText" align="right">' . tep_draw_button(IMAGE_SEND, 'mail-closed', tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID'] . '&action=confirm_send'), 'primary') . tep_draw_button(IMAGE_CANCEL, 'close', tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID'])) . '</td>' . "\n" .
                            '  </tr>' . "\n" .
                            '</table>';
          return $confirm_string;
        }
        
        function send($newsletter_id) {
          $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
          //create id for current mailing
          $messageId = "Message-Id: <" . time() . "@" . $_SERVER['SERVER_NAME'] . ">";
          
          $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer', $messageId));
          
          //$mimemessage->add_text($this->content);
          //$text = $this->text_content();
          
          $mimemessage->add_html($this->html_content(), $this->text_content(), HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES);
          $mimemessage->build_message();
          while ($mail = tep_db_fetch_array($mail_query)) {
           $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title, 'Return-Path: ' . EMAIL_FROM);
          }
          $newsletter_id = tep_db_prepare_input($newsletter_id);
          tep_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . tep_db_input($newsletter_id) . "'");
        }
      }
    ?>
     
  5. Like
    X-Men1533006319 reacted to Yepi1533005574 in neues Kontaktformular   
    Hallo Frank, ich schau mir das heut Abend mal an und sobald ich etwas Zeit habe poste ich es hier rein.
    Sollte aber nicht viel zu ändern sein. Einfach um die entsprechenden Datensätze erweitern und es sollte laufen.
    LG.
  6. Like
    X-Men1533006319 reacted to Yepi1533005574 in neues Kontaktformular   
    Die neue contact_us.php. mit Action Recorder.
    Hier ist jedoch irgendwo ein Fehler mit der Anordnung der Platzhalter da bei der Warnmeldung werden die Boxen verschoben.
    Solltest du den Fehler finden poste es bitte hier rein.
    <?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_CONTACT_US); $error = false; if (isset($_GET['action']) && ($_GET['action'] == 'send') && isset($_POST['formid']) && ($_POST['formid'] == $sessiontoken)) { $name = tep_db_prepare_input($_POST['name']); $address = tep_db_prepare_input($_POST['address']); $telefon = tep_db_prepare_input($_POST['telefon']); $email_address = tep_db_prepare_input($_POST['email']); $enquiry = tep_db_prepare_input($_POST['enquiry']); $mobile = $_POST['mobile']; $betreff = TEXT_WHAT . ' ' . $name; $text = ENTRY_NAME . ' ' . $name . "\n\n" . ENTRY_ADDRESS . ' ' . $address . "\n\n" . ENTRY_TELEFON . ' ' . $telefon . "\n\n" . ENTRY_EMAIL . ' ' . $email_address . "\n\n" . ENTRY_MOBILE . ' ' . $mobile . "\n\n" . ENTRY_ENQUIRY . "\n" . $enquiry; if (strlen($enquiry) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_ENQUIRY_CHECK_ERROR); } if (CONTACT_MOBILE_DISPLAY == 'true') { if (strlen($mobile) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_MOBILE_CHECK_ERROR); }else{ } } if (strlen($name) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_NAME_CHECK_ERROR); } if (CONTACT_ADRESSE_DISPLAY == 'true') { if (strlen($address) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_ADDRESS_CHECK_ERROR); }else{ } } if (strlen($email_address) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_EMAIL_ERROR); } if (CONTACT_TELEFON_DISPLAY == 'true') { if (strlen($telefon) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_TELEFON_ERROR); }else{ } } if (CONTACT_CHECKPRIVACY_DISPLAY == 'true') { if(!($_POST['terms_accept'])){ $error = true; $messageStack->add('anfrage', ENTRY_PRIVACY_CHECK_ERROR); }else{ } } $actionRecorder = new actionRecorder('ar_contact_us', (tep_session_is_registered('customer_id') ? $customer_id : null), $name); if (!$actionRecorder->canPerform()) { $error = true; $actionRecorder->record(false); $messageStack->add('anfrage', sprintf(ERROR_ACTION_RECORDER, (defined('MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES') ? (int)MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES : 15))); } if ($error == false) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $betreff, $text, $name, $address, $email_address, $mobile); $actionRecorder->record(); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } } $account = array();$name = '';$email = '';$telefon = ''; if (tep_session_is_registered('customer_id')) { $account_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_id, c.customers_default_address_id, c.customers_email_address, ab.entry_street_address, ab.entry_postcode, ab.entry_city" . " FROM " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab " . " WHERE c.customers_id = '" . (int)$customer_id . "'" . " AND ab.address_book_id = c.customers_default_address_id"); $account = tep_db_fetch_array($account_query); $name = $account['customers_firstname'].' '.$account['customers_lastname'] ; $email = $account['customers_email_address'] ; $telefon = $account['customers_telephone'] ; $address = $account['entry_street_address'] . ',' . $account['entry_postcode'] . " " . $account['entry_city']; } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); require(DIR_WS_INCLUDES . 'template_top.php'); ?> <div class="ui-widget infoBoxContainer"> <div class="ui-widget-proddesc infoBoxHeading"> <h1><?php echo HEADING_TITLE; ?></h1> <?php if ($messageStack->size('anfrage') > 0) { echo $messageStack->output('anfrage'); } if (isset($_GET['action']) && ($_GET['action'] == 'success')) { ?> <div class="contentContainer"> <div class="contentText"> <?php echo TEXT_SUCCESS; ?> </div> </div> </div> </div> <?php } else { ?> <?php echo tep_draw_form('anfrage_form', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'post', '', true); ?> <div class="contentContainer"> <div class="contentText"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <b><?php echo TEXT_TO; ?></b><br> <b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br> <b><?php echo STORE_OWNER_EMAIL_ADDRESS; ?></b><br> <br><hr><br> <b><?php echo TEXT_1; ?></b><br> </td> </tr> <tr> <td class="fieldValue"><?php echo tep_draw_textarea_field('enquiry', 'soft', '60', '5'); ?><br><?php echo ENTRY_ENQUIRY; ?><br> </td> </tr> <tr height="8"> <td class="fieldKey" height="8"></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_NAME; ?><br> <?php echo (isset($account['customers_lastname']) ? $name . tep_draw_hidden_field('name',$name) : tep_draw_input_field('name', $name, 'size="45"')); ?></td> </tr> <tr height="8"> <td class="fieldKey" height="8"></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_EMAIL; ?><br> <?php echo (isset($account['email']) ? $email . tep_draw_hidden_field('email',$email) : tep_draw_input_field('email', $email, 'size="45"')); ?></td> </tr> <tr height="8"> <td class="fieldValue" height="8"></td> </tr> <td class="fieldValue"><?php if (CONTACT_ADRESSE_DISPLAY == 'true') { ?><?php echo ENTRY_ADDRESS; ?><br> <?php echo (isset($account['entry_street_address']) ? $address . tep_draw_hidden_field('address',$address) : tep_draw_input_field('address', $address, 'size="45"')); ?> <?php }else{}?></td> <tr height="8"> <td height="8"></td> </tr> <tr> <td class="fieldKey"> <?php if (CONTACT_TELEFON_DISPLAY == 'true') { ?> <?php echo ENTRY_TELEFON; ?><br> <?php echo (isset($account['telefon']) ? $telefon . tep_draw_hidden_field('telefon',$telefon) : tep_draw_input_field('telefon', $telefon, 'size="45"')); ?> <?php }else{}?></td> </tr> <tr height="8"> <td class="fieldKey" height="8"></td> </tr> <td class="fieldKey"><?php if (CONTACT_MOBILE_DISPLAY == 'true') { ?><?php echo ENTRY_MOBILE; ?><br> <?php echo tep_draw_input_field('mobile', $mobile, 'size="45"'); ?> <?php }else{}?></td> <tr> <td> </td > </tr> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <!-- SOF TERMS ACCEPTANCE --> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if (CONTACT_CHECKPRIVACY_DISPLAY == 'true') { ?> <div class="ui-widget-futured-header infoBoxHeading"> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="privacyBox"> <tr class="infoBoxContents"> <td> <table border="0" cellspacing="2" cellpadding="2" align="left"> <tr> <td class="main" style='text-align:left;' bgcolor="#ff0000"><input type='checkbox' name='terms_accept'></td> <td class="main" style="text-align:left;" width="8"></td> <td class="main" style='text-align:left;'><?php echo TERMS_COND; ?></td> </tr> </table></div><?php }else{}?> </td> </tr> </table> </td> </tr> <tr height="8"> <td height="8"></td> </tr> <!-- EOF TERMS ACCEPTANCE --></td></tr> </table> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_button(IMAGE_BUTTON_SEND_QUESTION, 'triangle-1-e', null, 'primary'); ?></td> </tr> </table> </div> </div> </form> </div> </div> <?php } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>  
  7. Like
    X-Men1533006319 reacted to Yepi1533005574 in neues Kontaktformular   
    Sprachdatei nicht vergessen.
    define('ERROR_ACTION_RECORDER', 'Fehler: Es wurde bereits eine Anfrage gesendet. Versuchen Sie es in %s Minuten noch einmal.');
     
  8. Like
    X-Men1533006319 reacted to Yepi1533005574 in neues Kontaktformular   
    Falls jemand Interesse hat hier ein neues Kontaktformular.
    Dieser kann über die Administration gesteuert werden An/Aus.. Adresse, Telefonnummer, Mobilnummer, Checkbox für Datenschutz.

    Viel Spass damit.
    *****************************************************
    SQL:
    INSERT INTO configuration_group (configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible) VALUES ('25','Kontaktformular', 'Emailoptionen Kontaktformular', '25', '1');
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Eingabefeld Telefonnummer', 'CONTACT_TELEFON_DISPLAY', 'true', 'Möchten Sie, dass das Eingabefeld für Telefonnummer zum Absenden benötigt wird ? true = ja, false = nein', '25', '1', now(), now());
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Eingabefeld Mobilnummer', 'CONTACT_MOBILE_DISPLAY', 'true', 'Möchten Sie, dass das Eingabefeld für Mobilnummer zum Absenden benötigt wird ? true = ja, false = nein', '25', '2', now(), now());
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Eingabefeld Anschrift', 'CONTACT_ADRESSE_DISPLAY', 'true', 'Möchten Sie, dass das Eingabefeld für Anschrift zum Absenden benötigt wird ? true = ja, false = nein', '25', '3', now(), now());
    INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added) VALUES ('Datenschutz Checkbox', 'CONTACT_CHECKPRIVACY_DISPLAY', 'true', 'Möchten Sie, dass die Datenschutz Checkbox zum Absenden benötigt wird ? true = ja, false = nein', '25', '4', now(), now());
     
     
    ***************************************
    catalog/contact_us.php
    <?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_CONTACT_US); $error = false; if (isset($_GET['action']) && ($_GET['action'] == 'send') && isset($_POST['formid']) && ($_POST['formid'] == $sessiontoken)) { $name = tep_db_prepare_input($_POST['name']); $address = tep_db_prepare_input($_POST['address']); $telefon = tep_db_prepare_input($_POST['telefon']); $email_address = tep_db_prepare_input($_POST['email']); $enquiry = tep_db_prepare_input($_POST['enquiry']); $mobile = $_POST['mobile']; $betreff = TEXT_WHAT . ' ' . $name; $text = ENTRY_NAME . ' ' . $name . "\n\n" . ENTRY_ADDRESS . ' ' . $address . "\n\n" . ENTRY_TELEFON . ' ' . $telefon . "\n\n" . ENTRY_EMAIL . ' ' . $email_address . "\n\n" . ENTRY_MOBILE . ' ' . $mobile . "\n\n" . ENTRY_ENQUIRY . "\n" . $enquiry; if (strlen($enquiry) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_ENQUIRY_CHECK_ERROR); } if (CONTACT_MOBILE_DISPLAY == 'true') { if (strlen($mobile) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_MOBILE_CHECK_ERROR); }else{ } } if (strlen($name) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_NAME_CHECK_ERROR); } if (CONTACT_ADRESSE_DISPLAY == 'true') { if (strlen($address) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_ADDRESS_CHECK_ERROR); }else{ } } if (strlen($email_address) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_EMAIL_ERROR); } if (CONTACT_TELEFON_DISPLAY == 'true') { if (strlen($telefon) < 1) { $error = true; $messageStack->add('anfrage', ENTRY_TELEFON_ERROR); }else{ } } if (CONTACT_CHECKPRIVACY_DISPLAY == 'true') { if(!($_POST['terms_accept'])){ $error = true; $messageStack->add('anfrage', ENTRY_PRIVACY_CHECK_ERROR); }else{ } } if ($error == false) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $betreff, $text, $name, $address, $email_address, $mobile); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } } $account = array();$name = '';$email = '';$telefon = ''; if (tep_session_is_registered('customer_id')) { $account_query = tep_db_query("select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_id, c.customers_default_address_id, c.customers_email_address, ab.entry_street_address, ab.entry_postcode, ab.entry_city" . " FROM " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab " . " WHERE c.customers_id = '" . (int)$customer_id . "'" . " AND ab.address_book_id = c.customers_default_address_id"); $account = tep_db_fetch_array($account_query); $name = $account['customers_firstname'].' '.$account['customers_lastname'] ; $email = $account['customers_email_address'] ; $telefon = $account['customers_telephone'] ; $address = $account['entry_street_address'] . ',' . $account['entry_postcode'] . " " . $account['entry_city']; } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); require(DIR_WS_INCLUDES . 'template_top.php'); ?> <div class="ui-widget infoBoxContainer"> <div class="ui-widget-proddesc infoBoxHeading"> <h1><?php echo HEADING_TITLE; ?></h1> <?php if ($messageStack->size('anfrage') > 0) { echo $messageStack->output('anfrage'); } if (isset($_GET['action']) && ($_GET['action'] == 'success')) { ?> <div class="contentContainer"> <div class="contentText"> <?php echo TEXT_SUCCESS; ?> </div> </div> </div> </div> <?php } else { ?> <?php echo tep_draw_form('anfrage_form', tep_href_link(FILENAME_CONTACT_US, 'action=send'), 'post', '', true); ?> <div class="contentContainer"> <div class="contentText"> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"> <b><?php echo TEXT_TO; ?></b><br> <b><?php echo nl2br(STORE_NAME_ADDRESS); ?></b><br><br> <b><?php echo STORE_OWNER_EMAIL_ADDRESS; ?></b><br> <br><hr><br> <b><?php echo TEXT_1; ?></b><br> </td> </tr> <tr> <td class="fieldValue"><?php echo tep_draw_textarea_field('enquiry', 'soft', '60', '5'); ?><br><?php echo ENTRY_ENQUIRY; ?><br> </td> </tr> <tr height="8"> <td class="fieldKey" height="8"></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_NAME; ?><br> <?php echo (isset($account['customers_lastname']) ? $name . tep_draw_hidden_field('name',$name) : tep_draw_input_field('name', $name, 'size="45"')); ?></td> </tr> <tr height="8"> <td class="fieldKey" height="8"></td> </tr> <tr> <td class="fieldKey"><?php echo ENTRY_EMAIL; ?><br> <?php echo (isset($account['email']) ? $email . tep_draw_hidden_field('email',$email) : tep_draw_input_field('email', $email, 'size="45"')); ?></td> </tr> <tr height="8"> <td class="fieldValue" height="8"></td> </tr> <td class="fieldValue"><?php if (CONTACT_ADRESSE_DISPLAY == 'true') { ?><?php echo ENTRY_ADDRESS; ?><br> <?php echo (isset($account['entry_street_address']) ? $address . tep_draw_hidden_field('address',$address) : tep_draw_input_field('address', $address, 'size="45"')); ?> <?php }else{}?></td> <tr height="8"> <td height="8"></td> </tr> <tr> <td class="fieldKey"> <?php if (CONTACT_TELEFON_DISPLAY == 'true') { ?> <?php echo ENTRY_TELEFON; ?><br> <?php echo (isset($account['telefon']) ? $telefon . tep_draw_hidden_field('telefon',$telefon) : tep_draw_input_field('telefon', $telefon, 'size="45"')); ?> <?php }else{}?></td> </tr> <tr height="8"> <td class="fieldKey" height="8"></td> </tr> <td class="fieldKey"><?php if (CONTACT_MOBILE_DISPLAY == 'true') { ?><?php echo ENTRY_MOBILE; ?><br> <?php echo tep_draw_input_field('mobile', $mobile, 'size="45"'); ?> <?php }else{}?></td> <tr> <td> </td > </tr> <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <!-- SOF TERMS ACCEPTANCE --> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if (CONTACT_CHECKPRIVACY_DISPLAY == 'true') { ?> <div class="ui-widget-futured-header infoBoxHeading"> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="privacyBox"> <tr class="infoBoxContents"> <td> <table border="0" cellspacing="2" cellpadding="2" align="left"> <tr> <td class="main" style='text-align:left;' bgcolor="#ff0000"><input type='checkbox' name='terms_accept'></td> <td class="main" style="text-align:left;" width="8"></td> <td class="main" style='text-align:left;'><?php echo TERMS_COND; ?></td> </tr> </table></div><?php }else{}?> </td> </tr> </table> </td> </tr> <tr height="8"> <td height="8"></td> </tr> <!-- EOF TERMS ACCEPTANCE --></td></tr> </table> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_button(IMAGE_BUTTON_SEND_QUESTION, 'triangle-1-e', null, 'primary'); ?></td> </tr> </table> </div> <div class="buttonSet"> </div> </div> </form> <div class="noprint"> </div> </div> </div> <?php } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>  
    ****************************************
    catalog/includes/languages/german/contact_us.php
    <?php /* $Id: widerruf.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE', 'Kontaktformular'); define('HEADING_TITLE', 'Kontaktformular'); define('TEXT_WHAT', 'Kontaktanfrage von '); define('TEXT_TO', 'An:'); define('TEXT_1', '<strong><font size="2">Ihre Nachricht hier:</font></strong>'); define('ENTRY_ENQUIRY', 'Schildern Sie uns Ihr Anliegen.'); define('ENTRY_NAME', 'Vorname, Name:'); define('ENTRY_ADDRESS', 'Anschrift:'); define('ENTRY_EMAIL', 'E-Mailadresse:'); define('ENTRY_TELEFON', 'Telefonnummer:'); define('ENTRY_MOBILE', 'Mobilnummer:'); define('TEXT_SUCCESS', 'Vielen Dank f&uuml;r die Benutzung unseres Kontaktformulars. Wir werden Ihr Anliegen bearbeiten und uns bei Ihnen melden.'); define('ENTRY_ENQUIRY_CHECK_ERROR', 'Bitte schildern Sie uns Ihr Anliegen.'); define('ENTRY_MOBILE_CHECK_ERROR', 'Bitte geben Sie Ihre Mobilnummer ein.'); define('ENTRY_NAME_CHECK_ERROR', 'Bitte geben Sie Ihren vollständigen Namen ein.'); define('ENTRY_ADDRESS_CHECK_ERROR', 'Bitte geben Sie Ihre Anschrift ein.'); define('ENTRY_EMAIL_ERROR', 'Bitte geben Sie Ihre E-Mailadresse ein.'); define('ENTRY_TELEFON_ERROR', 'Bitte geben Sie Ihre Telefonnummer ein.'); //terms acceptance define('TERMS_COND', '<td style="color:black;">Bestätigen Sie den <a style="color:blue;" href="extra_info_pages.php?pages_id=7"><b>Datenschutz</b></a> verstanden zu haben. </td>'); define('ENTRY_PRIVACY_CHECK_ERROR', 'Bitte bestätigen Sie die Datenschutz-Checkbox !'); //terms acceptance ?>  
  9. Like
    X-Men1533006319 reacted to mcmannehan in Login mit PayPal funktioniert nicht mehr?   
    Welche PHP Version und welche MySQL Version läuft auf dem Server?
    Prüfe ob die Varaiablen, die von Paypal kommen, noch die selben sind.
    Prüfe das $_POST['xxxxx'] verwendet wird und nicht $HTTP_POST_VARS['xxxxx'].
    Sieht so aus, als ob Dein Provider Server Änderungen gemacht hat.
    Paypal hat vieles geändert. Es sollte das neuste Paypal add-on verwendet werden:
    https://apps.oscommerce.com/NCd2s&log-in-with-paypal
    oder
    https://apps.oscommerce.com/fZMiN&paypal-app
×