コード例 #1
0
ファイル: Process.php プロジェクト: tiansiyuan/oscommerce2
 public function execute()
 {
     global $login_customer_id;
     $OSCOM_Db = Registry::get('Db');
     if (is_int($login_customer_id) && $login_customer_id > 0) {
         if (SESSION_RECREATE == 'True') {
             tep_session_recreate();
         }
         $Qcustomer = $OSCOM_Db->prepare('select c.customers_firstname, c.customers_default_address_id, ab.entry_country_id, ab.entry_zone_id from :table_customers c left join :table_address_book ab on (c.customers_id = ab.customers_id and c.customers_default_address_id = ab.address_book_id) where c.customers_id = :customers_id');
         $Qcustomer->bindInt(':customers_id', $login_customer_id);
         $Qcustomer->execute();
         $_SESSION['customer_id'] = $login_customer_id;
         $_SESSION['customer_default_address_id'] = $Qcustomer->valueInt('customers_default_address_id');
         $_SESSION['customer_first_name'] = $Qcustomer->value('customers_firstname');
         $_SESSION['customer_country_id'] = $Qcustomer->valueInt('entry_country_id');
         $_SESSION['customer_zone_id'] = $Qcustomer->valueInt('entry_zone_id');
         $Qupdate = $OSCOM_Db->prepare('update :table_customers_info set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1, password_reset_key = null, password_reset_date = null where customers_info_id = :customers_info_id');
         $Qupdate->bindInt(':customers_info_id', $_SESSION['customer_id']);
         $Qupdate->execute();
         // reset session token
         $_SESSION['sessiontoken'] = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());
         // restore cart contents
         $_SESSION['cart']->restore_contents();
         if (count($_SESSION['navigation']->snapshot) > 0) {
             $origin_href = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())), $_SESSION['navigation']->snapshot['mode']);
             $_SESSION['navigation']->clear_snapshot();
             HTTP::redirect($origin_href);
         }
         OSCOM::redirect('index.php');
     }
 }
コード例 #2
0
ファイル: autologin.php プロジェクト: rongandat/scalaprj
function tep_doautologin()
{
    global $HTTP_COOKIE_VARS, $cart, $cart_cs, $cart_fv, $cart_pr, $customer_id, $customer_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id;
    global $navigation;
    if (isset($HTTP_COOKIE_VARS['osC_AutoCookieLogin'])) {
        $ip_address = tep_get_ip_address();
        $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where md5(CONCAT(customers_id,customers_email_address,customers_password,'" . $ip_address . "'))= '" . $HTTP_COOKIE_VARS['osC_AutoCookieLogin'] . "'");
        if (tep_db_num_rows($check_customer_query)) {
            $check_customer = tep_db_fetch_array($check_customer_query);
            if (SESSION_RECREATE == 'True') {
                tep_session_recreate();
            }
            $check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $check_customer['customers_id'] . "' and address_book_id = '" . (int) $check_customer['customers_default_address_id'] . "'");
            $check_country = tep_db_fetch_array($check_country_query);
            $customer_id = $check_customer['customers_id'];
            $customer_default_address_id = $check_customer['customers_default_address_id'];
            $customer_first_name = $check_customer['customers_firstname'];
            $customer_country_id = $check_country['entry_country_id'];
            $customer_zone_id = $check_country['entry_zone_id'];
            if (!tep_session_is_registered('customer_id')) {
                tep_session_register('customer_id');
            }
            if (!tep_session_is_registered('customer_default_address_id')) {
                tep_session_register('customer_default_address_id');
            }
            if (!tep_session_is_registered('customer_first_name')) {
                tep_session_register('customer_first_name');
            }
            if (!tep_session_is_registered('customer_country_id')) {
                tep_session_register('customer_country_id');
            }
            if (!tep_session_is_registered('customer_zone_id')) {
                tep_session_register('customer_zone_id');
            }
            tep_autologincookie(true);
            // Save cookie
            tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int) $customer_id . "'");
            $cart->restore_contents();
            // restore cart contents
            $cart_cs->restore_contents();
            $cart_fv->restore_contents();
            $cart_pr->restore_contents();
            if (sizeof($navigation->snapshot) > 0) {
                $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
                $navigation->clear_snapshot();
                tep_redirect($origin_href);
            } else {
                //			    tep_redirect(tep_href_link(FILENAME_DEFAULT));
                tep_redirect(substr(tep_href_link(getenv('REQUEST_URI')), strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)));
            }
        }
    }
}
コード例 #3
0
ファイル: login.php プロジェクト: itnovator/oscommerce_cvs
        if (!tep_validate_password($_POST['password'], $Qcheck->value('customers_password'))) {
            $error = true;
        } else {
            if (SERVICE_SESSION_REGENERATE_ID == 'True') {
                $osC_Session->recreate();
            }
            $osC_Customer->setCustomerData($Qcheck->valueInt('customers_id'));
            $Qupdate = $osC_Database->query('update :table_customers_info set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = :customers_info_id');
            $Qupdate->bindTable(':table_customers_info', TABLE_CUSTOMERS_INFO);
            $Qupdate->bindInt(':customers_info_id', $osC_Customer->id);
            $Qupdate->execute();
            // restore cart contents
            $cart->restore_contents();
            $navigation->remove_current_page();
            if (sizeof($navigation->snapshot) > 0) {
                $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array($osC_Session->name)), $navigation->snapshot['mode']);
                $navigation->clear_snapshot();
                tep_redirect($origin_href);
            } else {
                tep_redirect(tep_href_link(FILENAME_DEFAULT));
            }
        }
    }
}
if ($error == true) {
    $messageStack->add('login', TEXT_LOGIN_ERROR);
}
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL'));
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
コード例 #4
0
  <div class="row">
    <div class="col-sm-6 text-right pull-right"><?php 
        echo HTML::hiddenField('action', 'update') . HTML::hiddenField('edit', $_GET['edit']) . HTML::button(IMAGE_BUTTON_UPDATE, 'glyphicon glyphicon-refresh', null, 'primary', null, 'btn-success');
        ?>
</div>
    <div class="col-sm-6"><?php 
        echo HTML::button(IMAGE_BUTTON_BACK, 'glyphicon glyphicon-chevron-left', OSCOM::link('address_book.php', '', 'SSL'));
        ?>
</div>
  </div>

<?php 
    } else {
        if (sizeof($_SESSION['navigation']->snapshot) > 0) {
            $back_link = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())), $_SESSION['navigation']->snapshot['mode']);
        } else {
            $back_link = OSCOM::link('address_book.php', '', 'SSL');
        }
        ?>

  <div class="row">
    <div class="col-sm-6 text-right pull-right"><?php 
        echo HTML::hiddenField('action', 'process') . HTML::button(IMAGE_BUTTON_CONTINUE, 'glyphicon glyphicon-chevron-right', null, null, null, 'btn-success');
        ?>
</div>
    <div class="col-sm-6"><?php 
        echo HTML::button(IMAGE_BUTTON_BACK, 'glyphicon glyphicon-chevron-left', $back_link);
        ?>
</div>
  </div>
コード例 #5
0
ファイル: gv_send.php プロジェクト: eosc/EosC-2.3
            <td class="main"><?php 
    echo ENTRY_MESSAGE;
    ?>
<br><?php 
    echo tep_draw_textarea_field('message', 'soft', 50, 15, stripslashes($_POST['message']));
    ?>
</td>
          </tr>
        </table>
        <table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
<?php 
    $back = sizeof($navigation->path) - 2;
    ?>
            <td class="main"><?php 
    echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';
    ?>
</td>
            <td class="main" align="right"><?php 
    echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
    ?>
</td>
          </tr>
        </table></form></td>
      </tr>
<?php 
}
?>
    </table></td>
<!-- body_text_eof //-->
    <td width="<?php 
コード例 #6
0
<?php

/**
 * $Id: terms_of_revoke.php 106 2006-01-21 16:15:18Z Michael $
 * xosC - eCommerce for xoops
 * @package xosC
 * @author Michael Hammelmann
 * @version 1
 * Copyright (c) 2003 osCommerce
 * Released under the GNU General Public License
 * adapted 2005 for xoops 2.0.x by FlinkUX e.K. <http://www.flinkux.de>
 * (c) 2005  Michael Hammelmann <*****@*****.**>
**/
include "includes/application_top.php";
$xoopsOption['template_main'] = 'terms_of_revoke.html';
include XOOPS_ROOT_PATH . '/header.php';
$xoopsTpl->assign("xoops_module_header", '<link rel="stylesheet" type="text/css" media="screen" href="' . XOOPS_URL . '/modules/osC/templates/stylesheet.css" />');
require DIR_WS_LANGUAGES . $language . '/' . FILENAME_TERMS_OF_REVOKE;
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_TERMS_OF_REVOKE));
include "includes/header.php";
$back = count($navigation->path) - 2;
if ($back < 0) {
    $back = 0;
}
$xoopsTpl->assign("nav_link", tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']));
$xoopsTpl->assign("img_continue", tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING));
include_once XOOPS_ROOT_PATH . '/footer.php';
include "includes/application_bottom.php";
コード例 #7
0
 ?>
     <tr>
             <td height="10"></td>
     </tr>
     <tr>
             <td>
                     <table cellpadding="5" cellspacing="5" width="100%">
                             <tr>
                             <?php 
 /*<td><input type="submit" value="<?php echo Translate('Winkelwagen bijwerken'); ?>" class="formbutton button-a" /></td>*/
 ?>
                             <td>
                             <?php 
 $back = sizeof($navigation->path) - 2;
 if (isset($navigation->path[$back])) {
     echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '" class="button-a">';
     echo '<span>' . Translate('Verder winkelen') . '</span>';
     echo '</a>';
 }
 ?>
                             </td>
                             <?php 
 if (CanShop() == 'true') {
     ?>
                 <?php 
     /* - ORIGINAL 
        if (USE_CHECKOUT=='false') {
                $button_label = Translate('Bestelling bevestigen');
                $button_href = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
        } else {
                $button_label = Translate('Afrekenen');
コード例 #8
0
 function debug()
 {
     for ($i = 0, $n = sizeof($this->path); $i < $n; $i++) {
         echo $this->path[$i]['page'] . '?';
         while (list($key, $value) = each($this->path[$i]['get'])) {
             echo $key . '=' . $value . '&';
         }
         if (sizeof($this->path[$i]['post']) > 0) {
             echo '<br />';
             while (list($key, $value) = each($this->path[$i]['post'])) {
                 echo '&nbsp;&nbsp;<strong>' . $key . '=' . $value . '</strong><br />';
             }
         }
         echo '<br />';
     }
     if (sizeof($this->snapshot) > 0) {
         echo '<br /><br />';
         echo $this->snapshot['mode'] . ' ' . $this->snapshot['page'] . '?' . tep_array_to_string($this->snapshot['get'], array(tep_session_name())) . '<br />';
     }
 }
コード例 #9
0
ファイル: shopping_cart.php プロジェクト: validoc/Pikmas
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td width="10"><?php 
    echo tep_draw_separator('pixel_trans.gif', '10', '1');
    ?>
</td>
                <td><?php 
    echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART);
    ?>
</td>
<?php 
    $back = sizeof($navigation->path) - 2;
    if (isset($navigation->path[$back])) {
        ?>
                <td><?php 
        echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>';
        ?>
</td>
<?php 
    }
    ?>
                <td align="right"><?php 
    echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>';
    ?>
</td>
                <td width="10"><?php 
    echo tep_draw_separator('pixel_trans.gif', '10', '1');
    ?>
</td>
              </tr>
            </table></td>
コード例 #10
0
    ?>
</span>
  </div>
</div>
<?php 
}
?>

  <br />

  <div class="buttonSet row">
    <div class="col-xs-6">
      <?php 
$back = sizeof($_SESSION['navigation']->path) - 2;
if (isset($_SESSION['navigation']->path[$back])) {
    echo HTML::button(OSCOM::getDef('image_button_back'), 'fa fa-angle-left', OSCOM::link($_SESSION['navigation']->path[$back]['page'], tep_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action'))));
}
?>
&nbsp;
    </div>
    <div class="col-xs-6 text-right"><?php 
echo HTML::button(OSCOM::getDef('image_button_write_review'), 'fa fa-commenting', OSCOM::link('product_reviews_write.php', tep_get_all_get_params()), null, null, 'btn-success btn-reviews btn-buy');
?>
</div>
  </div>
</div>

</div>

<?php 
require $oscTemplate->getFile('template_bottom.php');
コード例 #11
0
  <p><?php 
echo sprintf(TEXT_DISPLAY_NUMBER_OF_WHOS_ONLINE, $Qwho->numberOfRows());
?>
</p>
</div>

<?php 
if (isset($wInfo)) {
    $osC_IP_Locator = new osC_IP_Locator();
    $last_page_url = $wInfo->last_page['page'];
    if (isset($wInfo->last_page['get']['osCsid'])) {
        unset($wInfo->last_page['get']['osCsid']);
    }
    if (sizeof($wInfo->last_page['get']) > 0) {
        $last_page_url .= '?' . tep_array_to_string($wInfo->last_page['get']);
    }
    ?>

<div id="infoBox_wInfo" <?php 
    if ($action != 'wInfo') {
        echo 'style="display: none;"';
    }
    ?>
>
  <div class="infoBoxHeading"><?php 
    echo tep_image('templates/' . $template . '/images/icons/16x16/info.png', IMAGE_ICON_INFO, '16', '16') . ' ' . $wInfo->full_name;
    ?>
</div>
  <div class="infoBoxContent">
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
コード例 #12
0
<?php

/**
 * osCommerce Online Merchant
 *
 * @copyright (c) 2016 osCommerce; https://www.oscommerce.com
 * @license MIT; https://www.oscommerce.com/license/mit.txt
 */
use OSC\OM\HTML;
use OSC\OM\OSCOM;
require 'includes/application_top.php';
$OSCOM_Language->loadDefinitions('create_account_success');
$breadcrumb->add(OSCOM::getDef('navbar_title_1'));
$breadcrumb->add(OSCOM::getDef('navbar_title_2'));
if (sizeof($_SESSION['navigation']->snapshot) > 0) {
    $origin_href = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())));
    $_SESSION['navigation']->clear_snapshot();
} else {
    $origin_href = OSCOM::link('index.php');
}
require $oscTemplate->getFile('template_top.php');
?>

<div class="page-header">
  <h1><?php 
echo OSCOM::getDef('heading_title');
?>
</h1>
</div>

<div class="contentContainer">
コード例 #13
0
  <div class="row">
    <div class="col-sm-6 text-right pull-right"><?php 
        echo tep_draw_hidden_field('action', 'update') . tep_draw_hidden_field('edit', $_GET['edit']) . tep_draw_button(IMAGE_BUTTON_UPDATE, 'glyphicon glyphicon-refresh', null, 'primary', null, 'btn-success');
        ?>
</div>
    <div class="col-sm-6"><?php 
        echo tep_draw_button(IMAGE_BUTTON_BACK, 'glyphicon glyphicon-chevron-left', tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'));
        ?>
</div>
  </div>

<?php 
    } else {
        if (sizeof($navigation->snapshot) > 0) {
            $back_link = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(session_name())), $navigation->snapshot['mode']);
        } else {
            $back_link = tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL');
        }
        ?>

  <div class="row">
    <div class="col-sm-6 text-right pull-right"><?php 
        echo tep_draw_hidden_field('action', 'process') . tep_draw_button(IMAGE_BUTTON_CONTINUE, 'glyphicon glyphicon-chevron-right', null, null, null, 'btn-success');
        ?>
</div>
    <div class="col-sm-6"><?php 
        echo tep_draw_button(IMAGE_BUTTON_BACK, 'glyphicon glyphicon-chevron-left', $back_link);
        ?>
</div>
  </div>
コード例 #14
0
 function debug()
 {
     global $osC_Session;
     for ($i = 0, $n = sizeof($this->path); $i < $n; $i++) {
         echo $this->path[$i]['page'] . '?';
         while (list($key, $value) = each($this->path[$i]['get'])) {
             echo $key . '=' . $value . '&';
         }
         if (sizeof($this->path[$i]['post']) > 0) {
             echo '<br>';
             while (list($key, $value) = each($this->path[$i]['post'])) {
                 echo '&nbsp;&nbsp;<b>' . $key . '=' . $value . '</b><br>';
             }
         }
         echo '<br>';
     }
     if (sizeof($this->snapshot) > 0) {
         echo '<br><br>';
         echo $this->snapshot['mode'] . ' ' . $this->snapshot['page'] . '?' . tep_array_to_string($this->snapshot['get'], array($osC_Session->name)) . '<br>';
     }
 }
コード例 #15
0
echo $page['pages_description'];
if (basename(SCRIPT_FILENAME) == FILENAME_SHOPPING_CART) {
    $available_products_types_array = array();
    $available_products_types_query = tep_db_query("select products_types_path from " . TABLE_PRODUCTS_TYPES . " where products_types_id in ('" . implode("', '", $active_products_types_array) . "') and language_id = '" . (int) $languages_id . "'");
    while ($available_products_types = tep_db_fetch_array($available_products_types_query)) {
        $available_products_types_array[] = $available_products_types['products_types_path'];
    }
    $back = '';
    $navigation_path = $navigation->path;
    for ($i = sizeof($navigation_path) - 1; $i >= 0; $i--) {
        $navigation_page = preg_replace('/^' . preg_quote(DIR_WS_CATALOG, '/') . '/', '', $navigation_path[$i]['page']);
        list($navigation_section) = explode('/', $navigation_page);
        $navigation_page_ext = substr($navigation_page, strrpos($navigation_page, '.') + 1);
        if ((in_array($navigation_section, $available_products_types_array) || basename($navigation_path[$i]['page']) == FILENAME_ADVANCED_SEARCH_RESULT) && basename($navigation_path[$i]['page']) != FILENAME_LOADER && $navigation_page_ext != 'rss') {
            $back = ($navigation_path[$i]['mode'] == 'SSL' ? HTTPS_SERVER : HTTP_SERVER) . $navigation_path[$i]['page'] . (tep_not_null(tep_array_to_string($navigation_path[$i]['get'])) ? '?' . tep_array_to_string($navigation_path[$i]['get']) : '');
            break;
        }
    }
    if (empty($back)) {
        $back = tep_href_link(FILENAME_CATEGORIES);
    }
}
echo '<ul class="search_results">' . "\n";
echo '<li id="show_list_1" class=" ' . ($HTTP_GET_VARS['type'] == 'postpone' || $HTTP_GET_VARS['type'] == 'foreign' ? 'show_list_inactive' : 'show_list_active') . '" style="width: 135px;"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '#" onclick="showResultPage(1); return false;">' . SHOPPING_CART_TITLE . ' (' . $cart->count_contents() . ')</a></li>' . "\n";
echo '<li id="show_list_2" class="' . ($postpone_cart->count_contents() > 0 ? $HTTP_GET_VARS['type'] == 'postpone' ? 'show_list_active' : 'show_list_inactive' : 'show_list_desactive') . '" style="width: 135px;">' . ($postpone_cart->count_contents() > 0 ? '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'type=postpone') . '" onclick="showResultPage(2); return false;">' . POSTPONE_CART_TITLE . ' (' . $postpone_cart->count_contents() . ')</a>' : POSTPONE_CART_TITLE) . '</li>' . "\n";
if (in_array(DOMAIN_ZONE, array('ru'))) {
    echo '<li id="show_list_3" class="' . ($foreign_cart->count_contents() > 0 ? $HTTP_GET_VARS['type'] == 'foreign' ? 'show_list_active' : 'show_list_inactive' : 'show_list_desactive') . '" style="width: 135px;">' . ($foreign_cart->count_contents() > 0 ? '<a href="' . tep_href_link(FILENAME_SHOPPING_CART, 'type=foreign') . '" onclick="showResultPage(3); return false;">' . FOREIGN_CART_TITLE . ' (' . $foreign_cart->count_contents() . ')</a>' : FOREIGN_CART_TITLE) . '</li>' . "\n";
}
echo '</ul>' . "\n";
echo '<div id="show_results_list_1" class="advanced-search" style="display: ' . ($cart->count_contents() > 0 && $HTTP_GET_VARS['type'] != 'postpone' && $HTTP_GET_VARS['type'] != 'foreign' ? 'block' : '') . ';"><br />' . "\n";
コード例 #16
0
ファイル: login.php プロジェクト: CristianCCIT/shop4office
                    }
                    $auth->login($get_forum_username['username_clean'], $_POST['password'], $remember, 1, 0);
                }
                /*FORUM*/
                // navigation history
                $extra_link_data = '';
                if (isset($_GET['language'])) {
                    $extra_link_data = 'language=' . $_GET['language'];
                }
                if (sizeof($navigation->snapshot) > 0 && !strstr($navigation->snapshot['page'], 'login.php')) {
                    $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())) . '&' . $extra_link_data, $navigation->snapshot['mode']);
                    tep_redirect($origin_href);
                } else {
                    if (sizeof($navigation->path) > 0 && !strstr($navigation->path[$last]['page'], 'login.php')) {
                        $last = sizeof($navigation->path) - 1;
                        $origin_href = tep_href_link($navigation->path[$last]['page'], tep_array_to_string($navigation->path[$last]['get'], array(tep_session_name())) . '&' . $extra_link_data, $navigation->path[$last]['mode']);
                        tep_redirect($origin_href);
                    } else {
                        if (strstr($_SERVER['HTTP_REFERER'], 'logoff.php')) {
                            tep_redirect(tep_href_link(FILENAME_DEFAULT, $extra_link_data));
                        } else {
                            tep_redirect(tep_href_link(FILENAME_DEFAULT, $extra_link_data));
                        }
                    }
                }
            }
        }
    }
}
if ($error == true) {
    $messageStack->add('login', Translate('Fout: er kon niet ingelogd worden met het ingegeven e-mailadres en wachtwoord. Gelieve opnieuw te proberen'));
コード例 #17
0
<?php

require 'includes/application_top.php';
$content = FILENAME_CREATE_ACCOUNT_SUCCESS;
$page_query = tep_db_query("select pages_id, pages_name, pages_additional_description, pages_description from " . TABLE_PAGES . " where pages_filename = '" . tep_db_input(basename($content)) . "' and language_id = '" . (int) $languages_id . "'");
$page = tep_db_fetch_array($page_query);
define('ADDITIONAL_DESCRIPTION', $page['pages_additional_description']);
$translation_query = tep_db_query("select pages_translation_key, pages_translation_value from " . TABLE_PAGES_TRANSLATION . " where pages_filename = '" . tep_db_input(basename($content)) . "' and language_id = '" . (int) $languages_id . "'");
while ($translation = tep_db_fetch_array($translation_query)) {
    define($translation['pages_translation_key'], $translation['pages_translation_value']);
}
if (is_object($navigation)) {
    if (sizeof($navigation->snapshot) > 0) {
        $origin_href = ($navigation->snapshot['mode'] == 'SSL' ? HTTPS_SERVER : HTTP_SERVER) . $navigation->snapshot['page'] . (tep_not_null(tep_array_to_string($navigation->snapshot['get'])) ? '?' . tep_array_to_string($navigation->snapshot['get']) : '');
        $navigation->clear_snapshot();
    } else {
        $origin_href = tep_href_link(FILENAME_DEFAULT);
    }
}
$create_account_page_query = tep_db_query("select pages_name from " . TABLE_PAGES . " where pages_filename = '" . tep_db_input(FILENAME_CREATE_ACCOUNT) . "' and language_id = '" . (int) $languages_id . "'");
$create_account_page = tep_db_fetch_array($create_account_page_query);
$breadcrumb->add($create_account_page['pages_name'], tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
$breadcrumb->add($page['pages_name'], tep_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'SSL'));
if (isset($HTTP_GET_VARS['email']) && isset($HTTP_GET_VARS['key'])) {
    $email_address = tep_sanitize_string(urldecode($HTTP_GET_VARS['email']));
    $customer_check_query = tep_db_query("select * from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
    if (tep_db_num_rows($customer_check_query) > 0) {
        $customer_check = tep_db_fetch_array($customer_check_query);
        if ($customer_check['customers_email_address_confirmed'] == '1') {
            $messageStack->add('header', ENTRY_REGISTRATION_ALREADY_VERIFIED, 'success');
        } else {
コード例 #18
0
    ?>
</span>
  </div>
</div>
<?php 
}
?>

  <br />

  <div class="buttonSet row">
    <div class="col-xs-6">
      <?php 
$back = sizeof($navigation->path) - 2;
if (isset($navigation->path[$back])) {
    echo tep_draw_button(IMAGE_BUTTON_BACK, 'glyphicon glyphicon-chevron-left', tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']));
}
?>
&nbsp;
    </div>
    <div class="col-xs-6 text-right"><?php 
echo tep_draw_button(IMAGE_BUTTON_WRITE_REVIEW, 'glyphicon glyphicon-comment', tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, tep_get_all_get_params()), 'primary', NULL, 'btn-success');
?>
</div>
  </div>
</div>

</div>

<?php 
require DIR_WS_INCLUDES . 'template_bottom.php';
コード例 #19
0
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td width="10"><?php 
    echo tep_draw_separator('pixel_trans.gif', '10', '1');
    ?>
</td>
                <td class="smallText"><?php 
    echo tep_draw_button(IMAGE_BUTTON_UPDATE_CART, 'refresh');
    ?>
</td>
<?php 
    $back = sizeof($navigation->path) - 2;
    if (isset($navigation->path[$back])) {
        ?>
                <td class="smallText"><?php 
        echo tep_draw_button(IMAGE_BUTTON_CONTINUE_SHOPPING, 'triangle-1-w', tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']));
        ?>
</td>
<?php 
    }
    ?>
                <td align="right" class="smallText"><?php 
    echo tep_draw_button(IMAGE_BUTTON_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'), 'primary');
    ?>
</td>
                <td width="10"><?php 
    echo tep_draw_separator('pixel_trans.gif', '10', '1');
    ?>
</td>
              </tr>
            </table></td>
コード例 #20
0
ファイル: login.php プロジェクト: rongandat/ookcart-project
         $mss_flag = false;
         if ($user_info['verification_status'] == 1 && $current_ip != $user_info['verification_ip']) {
             $mss_flag = true;
         }
         if ($mss_flag) {
             $verification_key = tep_create_random_value(10, 'digits');
             $signup_data_array['verification_key'] = $verification_key;
             db_perform(_TABLE_USERS, $signup_data_array, 'update', " user_id='" . $user_info['user_id'] . "' ");
             $email_info = get_email_template('VERIFYCATION_KEY');
             $msg_subject = $email_info['emailtemplate_subject'];
             $msg_content = str_replace(array('[firstname]', '[verification_key]'), array($user_info['firstname'], $verification_key), $email_info['emailtemplate_content']);
             $msg_content = html_entity_decode($msg_content);
             tep_mail($user_info['firstname'] . ' ' . $user_info['lastname'], $user_info['email'], $msg_subject, $msg_content, SITE_NAME, SITE_CONTACT_EMAIL);
         }
         if (sizeof($navigation->snapshot) > 0) {
             $origin_href = get_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
             $navigation->clear_snapshot();
             tep_redirect($origin_href, '', 'SSL');
         } else {
             tep_redirect(get_href_link(PAGE_LOGIN_CONFIRM, '', 'SSL'));
         }
     }
 } else {
     $validator->addError(ERROR_FIELD_LOGIN, ERROR_INVALID_ACCOUNT);
 }
 if (count($validator->errors) == 0) {
     // create new user
 } else {
     postAssign($smarty);
     $smarty->assign('validerrors', $validator->errors);
 }
コード例 #21
0
ファイル: gv_send.php プロジェクト: CristianCCIT/shop4office
					<td colspan="3" height="5"></td>
				</tr>
				<tr>
					<td></td>
					<td colspan="2">
						<table cellspacing="0" cellpadding="0" border="0" width="100">
							<tr>
								<td style="padding-right:5px;">
								<?php 
    $back = sizeof($navigation->path) - 2;
    if (isset($navigation->path[$back]['page']) && $navigation->path[$back]['page'] != '') {
        $link = $navigation->path[$back]['page'];
    } else {
        $link = FILENAME_DEFAULT;
    }
    echo '<a href="' . tep_href_link($link, tep_array_to_string($navigation->path[$back]['get'], array('action'))) . '" class="button-a">' . Translate('Terug') . '</a>';
    ?>
								</td>
								<td>
									<input type="submit" class="button-a" value="<?php 
    echo Translate('Verzend');
    ?>
" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			</form>
		</td>