Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Account Application

Move Services->Login to Account->Login
Move Services->Dashboard to Account->Partner
  • Loading branch information...
commit 543b9502d1bfa49fb509221540564c5ff4434fd6 1 parent 690ed2c
@haraldpdl authored
Showing with 2,070 additions and 674 deletions.
  1. +29 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Create.php
  2. +192 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Create/Process.php
  3. +29 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Login.php
  4. +88 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Login/Process.php
  5. +34 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Action/OkILoveYouByeBye.php
  6. +20 −33 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner.php
  7. +8 −8 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner/Edit.php
  8. +46 −37 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner/Edit/Process.php
  9. +9 −9 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner/View.php
  10. +27 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Verify.php
  11. +63 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Verify/Process.php
  12. +44 −0 osCommerce/OM/Custom/Site/Website/Application/Account/Controller.php
  13. +246 −0 osCommerce/OM/Custom/Site/Website/Application/Account/pages/create.html
  14. +66 −0 osCommerce/OM/Custom/Site/Website/Application/Account/pages/email_new_user_verify.html
  15. +34 −0 osCommerce/OM/Custom/Site/Website/Application/Account/pages/email_new_user_verify.txt
  16. +144 −0 osCommerce/OM/Custom/Site/Website/Application/Account/pages/login.html
  17. +50 −0 osCommerce/OM/Custom/Site/Website/Application/Account/pages/main.html
  18. +19 −17 osCommerce/OM/Custom/Site/Website/Application/Account/pages/partner.html
  19. +133 −96 osCommerce/OM/Custom/Site/Website/Application/Account/pages/partner_edit.html
  20. +3 −3 osCommerce/OM/Custom/Site/Website/Application/Account/pages/partner_empty.html
  21. +48 −0 osCommerce/OM/Custom/Site/Website/Application/Account/pages/partner_preview.html
  22. +115 −0 osCommerce/OM/Custom/Site/Website/Application/Account/pages/verify.html
  23. +0 −30 osCommerce/OM/Custom/Site/Website/Application/Services/Action/Login.php
  24. +0 −34 osCommerce/OM/Custom/Site/Website/Application/Services/Action/Login/Process.php
  25. +38 −45 osCommerce/OM/Custom/Site/Website/Application/Services/Controller.php
  26. +0 −44 osCommerce/OM/Custom/Site/Website/Application/Services/pages/login.html
  27. +1 −1  osCommerce/OM/Custom/Site/Website/Application/Services/pages/main.html
  28. +3 −3 osCommerce/OM/Custom/Site/Website/Application/_/Controller.php
  29. +38 −4 osCommerce/OM/Custom/Site/Website/Controller.php
  30. +106 −150 osCommerce/OM/Custom/Site/Website/Invision.php
  31. +24 −0 osCommerce/OM/Custom/Site/Website/Module/Template/Widget/account_sidebar_nav/Controller.php
  32. +24 −0 osCommerce/OM/Custom/Site/Website/Module/Template/Widget/account_sidebar_nav/pages/main.html
  33. +2 −8 osCommerce/OM/Custom/Site/Website/Module/Template/Widget/services_sidebar_nav/pages/main.html
  34. +4 −6 osCommerce/OM/Custom/Site/Website/Module/Template/Widget/us_sidebar_nav/pages/main.html
  35. +21 −0 osCommerce/OM/Custom/Site/Website/Session.php
  36. +30 −15 osCommerce/OM/Custom/Site/Website/Template/Amy/Content/base.html
  37. +10 −1 osCommerce/OM/Custom/Site/Website/languages/en_US.php
  38. +209 −0 osCommerce/OM/Custom/Site/Website/languages/en_US/Account.php
  39. +2 −75 osCommerce/OM/Custom/Site/Website/languages/en_US/Services.php
  40. +1 −0  public/external/jquery/hideShowPassword/hideShowPassword.min.js
  41. +24 −0 public/external/jquery/hideShowPassword/img/wink.svg
  42. +84 −0 public/external/jquery/jquery.boxfit.js
  43. BIN  public/sites/Website/images/account.png
  44. +1 −40 public/sites/Website/templates/default/stylesheets/general.css
  45. +1 −15 public/sites/Website/templates/default/stylesheets/general.less
View
29 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Create.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ class Create {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_Template = Registry::get('Template');
+
+ if ( isset($_SESSION[OSCOM::getSite()]['Account']) ) {
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', null, 'SSL'));
+ }
+
+ $OSCOM_Template->addHtmlHeaderTag('<script src="public/external/jquery/hideShowPassword/hideShowPassword.min.js"></script>');
+
+ $application->setPageContent('create.html');
+ $application->setPageTitle(OSCOM::getDef('create_html_title'));
+ }
+ }
+?>
View
192 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Create/Process.php
@@ -0,0 +1,192 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action\Create;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\HttpRequest;
+ use osCommerce\OM\Core\Mail;
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ use osCommerce\OM\Core\Site\Website\Invision;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_MessageStack = Registry::get('MessageStack');
+ $OSCOM_Template = Registry::get('Template');
+
+ $errors = [];
+
+ $public_token = isset($_POST['public_token']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['public_token'])) : '';
+ $username = isset($_POST['username']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['username'])) : '';
+ $email = isset($_POST['email']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['email'])) : '';
+ $password = isset($_POST['password']) ? str_replace(array("\r\n", "\n", "\r"), '', $_POST['password']) : '';
+ $agree_tos = isset($_POST['agree_tos']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['agree_tos'])) : '';
+
+ if ( $public_token !== md5($_SESSION[OSCOM::getSite()]['public_token']) ) {
+ $OSCOM_MessageStack->add('account', OSCOM::getDef('error_form_protect_general'), 'error');
+
+ return false;
+ }
+
+ if ( strlen($username) < 3 ) {
+ $errors[] = OSCOM::getDef('create_username_ms_error_short');
+ } elseif ( strlen($username) > 26 ) {
+ $errors[] = OSCOM::getDef('create_username_ms_error_long');
+ } elseif ( stripos($username, 'oscommerce') !== false ) {
+ $errors[] = OSCOM::getDef('create_username_ms_error_oscommerce');
+ }
+
+ if ( empty($email) ) {
+ $errors[] = OSCOM::getDef('create_email_address_ms_error_required');
+ } elseif ( !filter_var($email, FILTER_VALIDATE_EMAIL) ) {
+ $errors[] = OSCOM::getDef('create_email_address_ms_error_invalid');
+ }
+
+ if ( strlen($password) < 3 ) {
+ $errors[] = OSCOM::getDef('create_password_ms_error_short');
+ } elseif ( strlen($password) > 32 ) {
+ $errors[] = OSCOM::getDef('create_password_ms_error_long');
+ }
+
+ if ( $agree_tos != '1' ) {
+ $errors[] = OSCOM::getDef('create_tos_agree_ms_error_required');
+ }
+
+ if ( !isset($_SESSION[OSCOM::getSite()]['recaptcha_pass']) ) {
+ $recaptcha_error = true;
+
+ if ( isset($_POST['recaptcha_challenge_field']) && !empty($_POST['recaptcha_challenge_field']) && isset($_POST['recaptcha_response_field']) && !empty($_POST['recaptcha_response_field']) ) {
+ $params = [ 'privatekey' => OSCOM::getConfig('recaptcha_key_private'),
+ 'remoteip' => OSCOM::getIPAddress(),
+ 'challenge' => $_POST['recaptcha_challenge_field'],
+ 'response' => $_POST['recaptcha_response_field'] ];
+
+ $post_string = '';
+
+ foreach ( $params as $key => $value ) {
+ $post_string .= $key . '=' . urlencode(utf8_encode(trim($value))) . '&';
+ }
+
+ $post_string = substr($post_string, 0, -1);
+
+ $response = HttpRequest::getResponse( ['url' => 'http://www.google.com/recaptcha/api/verify',
+ 'parameters' => $post_string] );
+
+ if ( !empty($response) ) {
+ $result = explode("\n", $response, 2);
+
+ if ( isset($result[0]) && ($result[0] == 'true') ) {
+ $recaptcha_error = false;
+
+ $_SESSION[OSCOM::getSite()]['recaptcha_pass'] = true;
+ $OSCOM_Template->setValue('recaptcha_pass', true, true);
+ }
+ }
+ }
+
+ if ( $recaptcha_error === true ) {
+ $errors[] = OSCOM::getDef('create_security_check_ms_error_invalid');
+ }
+ }
+
+ if ( isset($_SESSION[OSCOM::getSite()]['recaptcha_pass']) ) {
+ if ( !isset($_SESSION[OSCOM::getSite()]['sfs_pass']) ) {
+ $sfs_error = true;
+
+ $params = [ 'ip' => OSCOM::getIPAddress(),
+ 'email' => $email,
+ 'f' => 'json' ];
+
+ $get_string = '';
+
+ foreach ( $params as $key => $value ) {
+ $get_string .= $key . '=' . urlencode(utf8_encode(trim($value))) . '&';
+ }
+
+ $get_string = substr($get_string, 0, -1);
+
+ $response = HttpRequest::getResponse( ['url' => 'http://www.stopforumspam.com/api?' . $get_string,
+ 'method' => 'get'] );
+
+ if ( !empty($response) ) {
+ $result = @json_decode($response, true);
+
+ if ( is_array($result) ) {
+ if ( isset($result['success']) && ($result['success'] === 1) && isset($result['email']['appears']) && ($result['email']['appears'] === 0) && isset($result['ip']['appears']) && ($result['ip']['appears'] === 0) ) {
+ $sfs_error = false;
+
+ $_SESSION[OSCOM::getSite()]['sfs_pass'] = true;
+ } else {
+ $_SESSION[OSCOM::getSite()]['sfs_pass'] = false;
+ }
+ }
+ }
+ }
+
+ if ( (isset($sfs_error) && ($sfs_error === true)) || (isset($_SESSION[OSCOM::getSite()]['sfs_pass']) && ($_SESSION[OSCOM::getSite()]['sfs_pass'] === false)) ) {
+ $errors[] = OSCOM::getDef('create_security_check_ms_error_spammer');
+ }
+ }
+
+ if ( isset($_SESSION[OSCOM::getSite()]['recaptcha_pass']) && isset($_SESSION[OSCOM::getSite()]['sfs_pass']) && ($_SESSION[OSCOM::getSite()]['sfs_pass'] === true) ) {
+ if ( Invision::checkMemberExists($username, 'username') ) {
+ $errors[] = OSCOM::getDef('create_username_ms_error_exists');
+ }
+
+ if ( Invision::checkMemberExists($email, 'email') ) {
+ $errors[] = OSCOM::getDef('create_email_address_ms_error_exists');
+ }
+
+ if ( empty($errors) ) {
+ $result = Invision::createUser($username, $email, $password);
+
+ if ( is_array($result) && isset($result['result']) && ($result['result'] === true) && isset($result['member'][0]['member_id']) && is_numeric($result['member'][0]['member_id']) && ($result['member'][0]['member_id'] > 0) && isset($result['validate_key']) && !empty($result['validate_key']) ) {
+ $result['member'][0]['validate_key'] = $result['validate_key'];
+
+ $OSCOM_Template->setValue('new_member_reg', $result['member'][0]);
+
+ $email_txt_file = $OSCOM_Template->getPageContentsFile('email_new_user_verify.txt');
+ $email_txt = file_exists($email_txt_file) ? $OSCOM_Template->parseContent(file_get_contents($email_txt_file)) : null;
+
+ $email_html_file = $OSCOM_Template->getPageContentsFile('email_new_user_verify.html');
+ $email_html = file_exists($email_html_file) ? $OSCOM_Template->parseContent(file_get_contents($email_html_file)) : null;
+
+ if ( !empty($email_txt) || !empty($email_html) ) {
+ $OSCOM_Mail = new Mail($result['member'][0]['name'], $result['member'][0]['email'], 'osCommerce', 'noreply@oscommerce.com', OSCOM::getDef('create_email_new_account_subject'));
+
+ if ( !empty($email_txt) ) {
+ $OSCOM_Mail->setBodyPlain($email_txt);
+ }
+
+ if ( !empty($email_html) ) {
+ $OSCOM_Mail->setBodyHTML($email_html);
+ }
+
+ $OSCOM_Mail->send();
+ }
+
+ unset($_SESSION[OSCOM::getSite()]['recaptcha_pass']);
+ unset($_SESSION[OSCOM::getSite()]['sfs_pass']);
+
+ $OSCOM_MessageStack->add('account', OSCOM::getDef('create_ms_success'), 'success');
+
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', 'Verify', 'SSL'));
+ } else {
+ $errors[] = OSCOM::getDef('create_ms_error_general');
+ }
+ }
+ }
+
+ foreach ( $errors as $e ) {
+ $OSCOM_MessageStack->add('account', $e, 'error');
+ }
+ }
+ }
+?>
View
29 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Login.php
@@ -0,0 +1,29 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ class Login {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_Template = Registry::get('Template');
+
+ if ( isset($_SESSION[OSCOM::getSite()]['Account']) ) {
+ OSCOM::redirect(OSCOM::getLink(null, null, null, 'SSL'));
+ }
+
+ $OSCOM_Template->addHtmlHeaderTag('<script src="public/external/jquery/hideShowPassword/hideShowPassword.min.js"></script>');
+
+ $application->setPageContent('login.html');
+ $application->setPageTitle(OSCOM::getDef('login_html_title'));
+ }
+ }
+?>
View
88 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Login/Process.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action\Login;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ use osCommerce\OM\Core\Site\Website\Invision;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_MessageStack = Registry::get('MessageStack');
+ $OSCOM_Session = Registry::get('Session');
+ $OSCOM_Template = Registry::get('Template');
+
+ $errors = [];
+
+ $public_token = isset($_POST['public_token']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['public_token'])) : '';
+ $username = isset($_POST['username']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['username'])) : '';
+ $password = isset($_POST['password']) ? str_replace(array("\r\n", "\n", "\r"), '', $_POST['password']) : '';
+
+ if ( $public_token !== md5($_SESSION[OSCOM::getSite()]['public_token']) ) {
+ $OSCOM_MessageStack->add('account', OSCOM::getDef('error_form_protect_general'), 'error');
+
+ return false;
+ }
+
+ if ( strlen($username) < 3 ) {
+ $errors[] = OSCOM::getDef('login_username_ms_error_short');
+ } elseif ( strlen($username) > 26 ) {
+ $errors[] = OSCOM::getDef('login_username_ms_error_long');
+ }
+
+ if ( strlen($password) < 3 ) {
+ $errors[] = OSCOM::getDef('login_password_ms_error_short');
+ } elseif ( strlen($password) > 32 ) {
+ $errors[] = OSCOM::getDef('login_password_ms_error_long');
+ }
+
+ if ( empty($errors) ) {
+ $user = Invision::canLogin($username, $password);
+
+ if ( is_array($user) && isset($user['id']) ) {
+ if ( ($user['verified'] === true) && ($user['banned'] === false) ) {
+ $_SESSION[OSCOM::getSite()]['Account'] = $user;
+
+ $OSCOM_Session->recreate();
+
+ if ( isset($_POST['remember_me']) && ($_POST['remember_me'] == '1') ) {
+ OSCOM::setCookie('member_id', $user['member_id'], time() + 31536000, null, null, false, true);
+ OSCOM::setCookie('pass_hash', $user['member_login_key'], time() + 604800, null, null, false, true);
+ } else {
+ OSCOM::setCookie('member_id', '', time() - 31536000, null, null, false, true);
+ OSCOM::setCookie('pass_hash', '', time() - 31536000, null, null, false, true);
+ }
+
+ $redirect_url = OSCOM::getLink(null, null, null, 'SSL');
+
+ if ( isset($_SESSION['login_redirect']) ) {
+ $redirect_url = $_SESSION['login_redirect'];
+
+ unset($_SESSION['login_redirect']);
+ }
+
+ OSCOM::redirect($redirect_url);
+ } elseif ( $user['verified'] === false ) {
+ $errors[] = OSCOM::getDef('login_ms_error_not_verified');
+ } else {
+ $errors[] = OSCOM::getDef('login_ms_error_banned');
+ }
+ } else {
+ $errors[] = OSCOM::getDef('login_ms_error_general');
+ }
+ }
+
+ foreach ( $errors as $e ) {
+ $OSCOM_MessageStack->add('account', $e, 'error');
+ }
+ }
+ }
+?>
View
34 osCommerce/OM/Custom/Site/Website/Application/Account/Action/OkILoveYouByeBye.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ class OkILoveYouByeBye {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_MessageStack = Registry::get('MessageStack');
+ $OSCOM_Session = Registry::get('Session');
+
+ unset($_SESSION[OSCOM::getSite()]['Account']);
+
+ $OSCOM_Session->recreate();
+
+ if ( isset($_COOKIE['member_id']) && isset($_COOKIE['pass_hash']) ) {
+ OSCOM::setCookie('member_id', '', time() - 31536000, null, null, false, true);
+ OSCOM::setCookie('pass_hash', '', time() - 31536000, null, null, false, true);
+ }
+
+ $OSCOM_MessageStack->add('account', OSCOM::getDef('logout_ms_success'), 'success');
+
+ OSCOM::redirect(OSCOM::getLink(null, null, 'Login', 'SSL'));
+ }
+ }
+?>
View
53 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner.php
@@ -1,60 +1,47 @@
<?php
/**
* osCommerce Website
- *
- * @copyright Copyright (c) 2013 osCommerce; http://www.oscommerce.com
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*/
- namespace osCommerce\OM\Core\Site\Website\Application\Services\Action;
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action;
use osCommerce\OM\Core\ApplicationAbstract;
use osCommerce\OM\Core\OSCOM;
use osCommerce\OM\Core\Registry;
- use osCommerce\OM\Core\Session;
- use osCommerce\OM\Core\Site\Website\Invision;
- use osCommerce\OM\Core\Site\Website\Partner;
+ use osCommerce\OM\Core\Site\Website\Partner as PartnerClass;
- class Dashboard {
+ class Partner {
public static function execute(ApplicationAbstract $application) {
$OSCOM_Template = Registry::get('Template');
- define('SERVICE_SESSION_FORCE_COOKIE_USAGE', 1);
- Registry::set('Session', Session::load());
+ if ( !isset($_SESSION[OSCOM::getSite()]['Account']) ) {
+ $req_actions = http_build_query(array_slice($_GET, array_search('Partner', array_keys($_GET))));
- $OSCOM_Session = Registry::get('Session');
- $OSCOM_Session->start();
+ $_SESSION['login_redirect'] = OSCOM::getLink(null, null, $req_actions, 'SSL');
- Registry::get('MessageStack')->loadFromSession();
-
- if ( !isset($_SESSION[OSCOM::getSite()]['Services']) ) {
- if ( isset($_COOKIE['member_id']) && is_numeric($_COOKIE['member_id']) && ($_COOKIE['member_id'] > 0) && isset($_COOKIE['pass_hash']) && (strlen($_COOKIE['pass_hash']) == 32) ) {
- $OSCOM_Invision = new Invision();
-
- if ( $OSCOM_Invision->autoLogin($_COOKIE['member_id'], $_COOKIE['pass_hash']) ) {
- if ( $OSCOM_Invision->hasAccess() ) {
- $_SESSION[OSCOM::getSite()]['Services'] = array('id' => $OSCOM_Invision->getUserData('id'),
- 'name' => $OSCOM_Invision->getUserData('name'));
- }
- }
- }
- }
-
- if ( !isset($_SESSION[OSCOM::getSite()]['Services']) ) {
- OSCOM::redirect(OSCOM::getLink(null, 'Services', 'Login'));
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', 'Login', 'SSL'));
}
- if ( Partner::hasCampaign($_SESSION[OSCOM::getSite()]['Services']['id']) ) {
- $OSCOM_Template->setValue('partner_campaigns', Partner::getCampaigns($_SESSION[OSCOM::getSite()]['Services']['id']));
+ if ( PartnerClass::hasCampaign($_SESSION[OSCOM::getSite()]['Account']['id']) ) {
+ $OSCOM_Template->setValue('partner_campaigns', PartnerClass::getCampaigns($_SESSION[OSCOM::getSite()]['Account']['id']));
$OSCOM_Template->setValue('partner_date_now', date('Y-m-d H:i:s'));
- $application->setPageContent('dashboard.html');
+ $application->setPageContent('partner.html');
} else {
- $application->setPageContent('dashboard_empty.html');
+ $application->setPageContent('partner_empty.html');
}
- $application->setPageTitle(OSCOM::getDef('dashboard_html_title'));
+ $application->setPageTitle(OSCOM::getDef('partner_html_title'));
+
+ if ( file_exists(OSCOM::getConfig('dir_fs_public', 'OSCOM') . 'sites/' . OSCOM::getSite() . '/images/services.jpg') ) {
+ $OSCOM_Template->setValue('highlights_image', 'images/services.jpg', true);
+ } else {
+ $OSCOM_Template->setValue('highlights_image', 'images/940x285.gif', true);
+ }
}
}
?>
View
16 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner/Edit.php
@@ -1,12 +1,12 @@
<?php
/**
* osCommerce Website
- *
- * @copyright Copyright (c) 2013 osCommerce; http://www.oscommerce.com
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*/
- namespace osCommerce\OM\Core\Site\Website\Application\Services\Action\Dashboard;
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action\Partner;
use osCommerce\OM\Core\ApplicationAbstract;
use osCommerce\OM\Core\OSCOM;
@@ -18,15 +18,15 @@ class Edit {
public static function execute(ApplicationAbstract $application) {
$OSCOM_Template = Registry::get('Template');
- if ( empty($_GET['Edit']) || !Partner::hasCampaign($_SESSION[OSCOM::getSite()]['Services']['id'], $_GET['Edit']) ) {
- Registry::get('MessageStack')->add('services', OSCOM::getDef('dashboard_error_campaign_not_available'), 'error');
+ if ( empty($_GET['Edit']) || !Partner::hasCampaign($_SESSION[OSCOM::getSite()]['Account']['id'], $_GET['Edit']) ) {
+ Registry::get('MessageStack')->add('partner', OSCOM::getDef('partner_error_campaign_not_available'), 'error');
- OSCOM::redirect(OSCOM::getLink(null, 'Services', 'Dashboard'));
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', 'Partner', 'SSL'));
}
- $OSCOM_Template->setValue('partner_campaign', Partner::getCampaign($_SESSION[OSCOM::getSite()]['Services']['id'], $_GET['Edit']));
+ $OSCOM_Template->setValue('partner_campaign', Partner::getCampaign($_SESSION[OSCOM::getSite()]['Account']['id'], $_GET['Edit']));
- $application->setPageContent('dashboard_edit.html');
+ $application->setPageContent('partner_edit.html');
}
}
?>
View
83 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner/Edit/Process.php
@@ -1,12 +1,12 @@
<?php
/**
* osCommerce Website
- *
- * @copyright Copyright (c) 2013 osCommerce; http://www.oscommerce.com
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*/
- namespace osCommerce\OM\Core\Site\Website\Application\Services\Action\Dashboard\Edit;
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action\Partner\Edit;
use osCommerce\OM\Core\ApplicationAbstract;
use osCommerce\OM\Core\OSCOM;
@@ -20,22 +20,30 @@ public static function execute(ApplicationAbstract $application) {
$OSCOM_MessageStack = Registry::get('MessageStack');
$OSCOM_Template = Registry::get('Template');
- $partner = $OSCOM_Template->getValue('partner_campaign');
-
$data = array();
$error = false;
+ $public_token = isset($_POST['public_token']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['public_token'])) : '';
+
+ if ( $public_token !== md5($_SESSION[OSCOM::getSite()]['public_token']) ) {
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('error_form_protect_general'), 'error');
+
+ return false;
+ }
+
+ $partner = $OSCOM_Template->getValue('partner_campaign');
+
if ( !isset($_POST['desc_short']) || empty($_POST['desc_short']) ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_desc_short_empty'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_desc_short_empty'));
} else {
$desc_short = trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['desc_short']));
if ( strlen($desc_short) > 450 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_desc_short_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_desc_short_length'));
} else {
$data['desc_short'] = $desc_short;
}
@@ -44,7 +52,7 @@ public static function execute(ApplicationAbstract $application) {
if ( !isset($_POST['desc_long']) || empty($_POST['desc_long']) ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_desc_long_empty'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_desc_long_empty'));
} else {
$desc_long = trim($_POST['desc_long']);
@@ -57,7 +65,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($address) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_address_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_address_length'));
} else {
$data['address'] = !empty($address) ? $address : null;
}
@@ -69,7 +77,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($telephone) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_telephone_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_telephone_length'));
} else {
$data['telephone'] = !empty($telephone) ? $telephone : null;
}
@@ -81,7 +89,7 @@ public static function execute(ApplicationAbstract $application) {
if ( !empty($email) && (filter_var($email, FILTER_VALIDATE_EMAIL) === false) || (strlen($email) > 255) ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_email_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_email_length'));
} else {
$data['email'] = !empty($email) ? $email : null;
}
@@ -93,7 +101,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($youtube_video_id) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_youtube_video_id_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_youtube_video_id_length'));
} else {
$curl = curl_init('https://gdata.youtube.com/feeds/api/videos/' . $youtube_video_id);
@@ -103,7 +111,8 @@ public static function execute(ApplicationAbstract $application) {
CURLOPT_NOBODY => true,
CURLOPT_FORBID_REUSE => true,
CURLOPT_FRESH_CONNECT => true,
- CURLOPT_FOLLOWLOCATION => false);
+ CURLOPT_FOLLOWLOCATION => false,
+ CURLOPT_RETURNTRANSFER => true);
curl_setopt_array($curl, $curl_options);
$result = curl_exec($curl);
@@ -114,14 +123,14 @@ public static function execute(ApplicationAbstract $application) {
if ( $http_code !== 200 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_youtube_video_id_invalid'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_youtube_video_id_invalid'));
} else {
$data['youtube_video_id'] = !empty($youtube_video_id) ? $youtube_video_id : null;
}
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_youtube_video_id_invalid'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_youtube_video_id_invalid'));
}
}
}
@@ -129,14 +138,14 @@ public static function execute(ApplicationAbstract $application) {
if ( !isset($_POST['public_url']) || empty($_POST['public_url']) ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_public_url_empty'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_public_url_empty'));
} else {
$public_url = trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['public_url']));
if ( strlen($public_url) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_public_url_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_public_url_length'));
} else {
$data['public_url'] = $public_url;
}
@@ -145,14 +154,14 @@ public static function execute(ApplicationAbstract $application) {
if ( !isset($_POST['url']) || empty($_POST['url']) ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_url_empty'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_url_empty'));
} else {
$url = trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['url']));
if ( strlen($url) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_url_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_url_length'));
} else {
$data['url'] = $url;
}
@@ -169,12 +178,12 @@ public static function execute(ApplicationAbstract $application) {
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_image_small_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_image_small_error'));
}
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_image_small_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_image_small_error'));
}
}
@@ -190,12 +199,12 @@ public static function execute(ApplicationAbstract $application) {
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_image_big_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_image_big_error'));
}
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_image_big_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_image_big_error'));
}
}
@@ -210,12 +219,12 @@ public static function execute(ApplicationAbstract $application) {
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_image_promo_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_image_promo_error'));
}
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_image_promo_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_image_promo_error'));
}
}
@@ -225,7 +234,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($image_promo_url) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_image_promo_url_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_image_promo_url_length'));
} else {
$data['image_promo_url'] = !empty($image_promo_url) ? $image_promo_url : null;
}
@@ -242,12 +251,12 @@ public static function execute(ApplicationAbstract $application) {
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_banner_image_en_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_banner_image_en_error'));
}
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_banner_image_en_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_banner_image_en_error'));
}
}
@@ -257,7 +266,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($banner_url_en) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_banner_url_en_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_banner_url_en_length'));
} else {
$data['banner_url_en'] = !empty($banner_url_en) ? $banner_url_en : null;
}
@@ -269,7 +278,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($status_update_en) > 200 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_status_update_en_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_status_update_en_length'));
} else {
$data['status_update_en'] = !empty($status_update_en) ? $status_update_en : null;
}
@@ -286,12 +295,12 @@ public static function execute(ApplicationAbstract $application) {
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_banner_image_de_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_banner_image_de_error'));
}
} else {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_banner_image_de_error'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_banner_image_de_error'));
}
}
@@ -301,7 +310,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($banner_url_de) > 255 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_banner_url_de_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_banner_url_de_length'));
} else {
$data['banner_url_de'] = !empty($banner_url_de) ? $banner_url_de : null;
}
@@ -314,7 +323,7 @@ public static function execute(ApplicationAbstract $application) {
if ( strlen($status_update_de) > 200 ) {
$error = true;
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_error_status_update_de_length'));
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_error_status_update_de_length'));
} else {
$data['status_update_de'] = !empty($status_update_de) ? $status_update_de : null;
}
@@ -353,11 +362,11 @@ public static function execute(ApplicationAbstract $application) {
}
}
- Partner::save($_SESSION[OSCOM::getSite()]['Services']['id'], $partner['code'], $data);
+ Partner::save($_SESSION[OSCOM::getSite()]['Account']['id'], $partner['code'], $data);
- $OSCOM_MessageStack->add('services', OSCOM::getDef('dashboard_success_save', array(':partner_link' => OSCOM::getLink(null, 'Services', 'Dashboard&View=' . $partner['code']))), 'success');
+ $OSCOM_MessageStack->add('partner', OSCOM::getDef('partner_success_save', array(':partner_link' => OSCOM::getLink(null, 'Account', 'Partner&View=' . $partner['code'], 'SSL'))), 'success');
- OSCOM::redirect(OSCOM::getLink(null, 'Services', 'Dashboard&Edit=' . $partner['code']));
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', 'Partner&Edit=' . $partner['code'], 'SSL'));
}
}
}
View
18 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Partner/View.php
@@ -1,12 +1,12 @@
<?php
/**
* osCommerce Website
- *
- * @copyright Copyright (c) 2013 osCommerce; http://www.oscommerce.com
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
* @license BSD License; http://www.oscommerce.com/bsdlicense.txt
*/
- namespace osCommerce\OM\Core\Site\Website\Application\Services\Action\Dashboard;
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action\Partner;
use osCommerce\OM\Core\ApplicationAbstract;
use osCommerce\OM\Core\HTML;
@@ -19,19 +19,19 @@ class View {
public static function execute(ApplicationAbstract $application) {
$OSCOM_Template = Registry::get('Template');
- if ( empty($_GET['View']) || !Partner::hasCampaign($_SESSION[OSCOM::getSite()]['Services']['id'], $_GET['View']) ) {
- Registry::get('MessageStack')->add('services', OSCOM::getDef('dashboard_error_campaign_not_available'), 'error');
+ if ( empty($_GET['View']) || !Partner::hasCampaign($_SESSION[OSCOM::getSite()]['Account']['id'], $_GET['View']) ) {
+ Registry::get('MessageStack')->add('partner', OSCOM::getDef('partner_error_campaign_not_available'), 'error');
- OSCOM::redirect(OSCOM::getLink(null, 'Services', 'Dashboard'));
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', 'Partner', 'SSL'));
}
- $application->setPageContent('info.html');
- $application->setPageTitle(OSCOM::getDef('partner_html_page_title', array(':partner_title' => Partner::get($_GET['View'], 'title'))));
-
$partner = Partner::get($_GET['View']);
$OSCOM_Template->setValue('partner', $partner);
$OSCOM_Template->setValue('partner_header', (empty($partner['image_big']) ? HTML::image(OSCOM::getPublicSiteLink($OSCOM_Template->getValue('highlights_image')), null, 940, 285) : '<a href="' . HTML::outputProtected($partner['url']) . '" target="_blank">' . HTML::image(OSCOM::getPublicSiteLink('images/partners/' . $partner['image_big']), null, 940, 285) . '</a>'));
+
+ $application->setPageContent('partner_preview.html');
+ $application->setPageTitle(OSCOM::getDef('partner_view_html_title', array(':partner_title' => $partner['title'])));
}
}
?>
View
27 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Verify.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ class Verify {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_Template = Registry::get('Template');
+
+ if ( isset($_SESSION[OSCOM::getSite()]['Account']) ) {
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', null, 'SSL'));
+ }
+
+ $application->setPageContent('verify.html');
+ $application->setPageTitle(OSCOM::getDef('verify_html_title'));
+ }
+ }
+?>
View
63 osCommerce/OM/Custom/Site/Website/Application/Account/Action/Verify/Process.php
@@ -0,0 +1,63 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account\Action\Verify;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ use osCommerce\OM\Core\Site\Website\Invision;
+
+ class Process {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_MessageStack = Registry::get('MessageStack');
+ $OSCOM_Template = Registry::get('Template');
+
+ $errors = [];
+
+ $public_token = isset($_POST['public_token']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['public_token'])) : '';
+ $user_id = isset($_POST['user_id']) ? trim(str_replace(array("\r\n", "\n", "\r"), '', $_POST['user_id'])) : '';
+ $key = isset($_POST['key']) ? preg_replace('/[^a-zA-Z0-9\-\_]/', '', $_POST['key']) : '';
+
+ if ( $public_token !== md5($_SESSION[OSCOM::getSite()]['public_token']) ) {
+ $OSCOM_MessageStack->add('account', OSCOM::getDef('error_form_protect_general'), 'error');
+
+ return false;
+ }
+
+ if ( !is_numeric($user_id) || ($user_id < 1) ) {
+ $errors[] = OSCOM::getDef('verify_user_id_ms_error_invalid');
+ }
+
+ if ( strlen($key) !== 32 ) {
+ $errors[] = OSCOM::getDef('verify_key_ms_error_invalid');
+ }
+
+ if ( empty($errors) ) {
+ $result = Invision::verifyUserKey($user_id, $key);
+
+ if ( is_array($result) && isset($result['result']) && ($result['result'] === true) ) {
+ $OSCOM_MessageStack->add('account', OSCOM::getDef('verify_ms_success'), 'success');
+
+ OSCOM::redirect(OSCOM::getLink(null, 'Account', 'Login', 'SSL'));
+ } else {
+ if ( isset($result['error']) && ($result['error'] == 'invalid_key') ) {
+ $errors[] = OSCOM::getDef('verify_ms_error_no_match');
+ } else {
+ $errors[] = OSCOM::getDef('verify_ms_error_general');
+ }
+ }
+ }
+
+ foreach ( $errors as $e ) {
+ $OSCOM_MessageStack->add('account', $e, 'error');
+ }
+ }
+ }
+?>
View
44 osCommerce/OM/Custom/Site/Website/Application/Account/Controller.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * osCommerce Website
+ *
+ * @copyright Copyright (c) 2014 osCommerce; http://www.oscommerce.com
+ * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
+ */
+
+ namespace osCommerce\OM\Core\Site\Website\Application\Account;
+
+ use osCommerce\OM\Core\OSCOM;
+ use osCommerce\OM\Core\Registry;
+
+ use osCommerce\OM\Core\Site\Website\Invision;
+
+ class Controller extends \osCommerce\OM\Core\Site\Website\ApplicationAbstract {
+ protected function initialize() {
+ $OSCOM_Template = Registry::get('Template');
+
+ $OSCOM_Template->addHtmlHeaderTag('<meta name="robots" content="noindex, nofollow" />');
+
+ $OSCOM_Template->setValue('recaptcha_pass', isset($_SESSION[OSCOM::getSite()]['recaptcha_pass']));
+
+ if ( isset($_SESSION[OSCOM::getSite()]['Account']) ) {
+ $OSCOM_Template->addHtmlHeaderTag('<link href="https://fonts.googleapis.com/css?family=Allura" rel="stylesheet" type="text/css" />');
+ $OSCOM_Template->addHtmlHeaderTag('<script src="public/external/jquery/jquery.boxfit.js"></script>');
+
+ $this->_page_contents = 'main.html';
+ $this->_page_title = OSCOM::getDef('account_html_title');
+ } else {
+ $this->_page_contents = 'login.html';
+ $this->_page_title = OSCOM::getDef('login_html_title');
+
+ $OSCOM_Template->setValue('recaptcha_key_public', OSCOM::getConfig('recaptcha_key_public'));
+ }
+
+ if ( file_exists(OSCOM::getConfig('dir_fs_public', 'OSCOM') . 'sites/' . OSCOM::getSite() . '/images/account.png') ) {
+ $OSCOM_Template->setValue('highlights_image', 'images/account.png');
+ } else {
+ $OSCOM_Template->setValue('highlights_image', 'images/940x285.gif');
+ }
+ }
+ }
+?>
View
246 osCommerce/OM/Custom/Site/Website/Application/Account/pages/create.html
@@ -0,0 +1,246 @@
+<div id="highlights">
+ <img src="{publiclink}{raw}highlights_image{raw}{publiclink}" width="940" height="285" />
+</div>
+
+<div class="row">
+ <div id="maincontainer" class="span9">
+ <div id="maincontent">
+ <h1>{lang}create_title{lang}</h1>
+
+ {lang}create_introduction{lang}
+
+ {widget}message_stack|account{widget}
+
+ <form id="formCreateAccount" name="create" action="{link}Account|Website|Create&Process|SSL{link}" method="post" class="form-horizontal">{formprotect}public_token{formprotect}
+ <div class="control-group">
+ <label class="control-label" for="inputUsername">{lang}create_username_title{lang}</label>
+
+ <div class="controls">
+ <input type="text" id="inputUsername" name="username" value="{post}username{post}" />
+ <span id="inputUsernameAlert" class="help-block hide label label-important"></span>
+ <span class="help-block"><span class="muted"><small>{lang}create_username_note{lang}</small></span></span>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="inputEmail">{lang}create_email_address_title{lang}</label>
+
+ <div class="controls">
+ <input type="text" id="inputEmail" name="email" value="{post}email{post}" />
+ <span id="inputEmailAlert" class="help-block hide label label-important"></span>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="inputPassword">{lang}create_password_title{lang}</label>
+
+ <div class="controls">
+ <input type="password" id="inputPassword" name="password" {iftrue in_ssl}value="{post}password{post}"{iftrue} />
+ <span id="inputPasswordAlert" class="help-block hide label label-important"></span>
+ <span class="help-block"><span class="muted"><small><span id="inputPasswordInfo">{lang}create_password_note{lang}</span><a href="#" onclick="$('#inputPassword').togglePassword(); return false;" id="inputPasswordShowHide">{lang}create_password_show_hide{lang}</a></small></span></span>
+ </div>
+ </div>
+
+{iffalse recaptcha_pass}
+ <div class="control-group">
+ <label class="control-label">{lang}create_security_check_title{lang}</label>
+
+ <div class="controls">
+<script>
+var RecaptchaOptions = {
+ theme: 'white'
+};
+</script>
+<script src="https://www.google.com/recaptcha/api/challenge?k={value}recaptcha_key_public{value}"></script>
+<noscript>
+ <iframe src="https://www.google.com/recaptcha/api/noscript?k={value}recaptcha_key_public{value}" height="300" width="500" frameborder="0"></iframe><br>
+ <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
+ <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
+</noscript>
+ </div>
+ </div>
+{iffalse}
+
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox" id="inputTOS" name="agree_tos" value="1" />
+ {lang}create_tos_agree_title{lang}
+ <span id="inputTOSAlert" class="help-block hidden label label-important"></span>
+ </label>
+
+<div id="tosPane" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="tosPaneLabel" aria-hidden="true">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+ <h3 id="tosPaneLabel">{lang}create_tos_title{lang}</h3>
+ </div>
+ <div class="modal-body">
+ {lang}create_tos_body{lang}
+ </div>
+ <div class="modal-footer">
+ <button class="btn" data-dismiss="modal" aria-hidden="true">{lang}create_tos_close{lang}</button>
+ </div>
+</div>
+
+ </div>
+ </div>
+
+ <div class="control-group">
+ <div class="controls">
+ <button type="submit" id="createButton" class="btn" data-processing-text="{lang addslashes}create_processing_button_title{lang}">{lang}create_button_title{lang}</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ {widget}account_sidebar_nav{widget}
+</div>
+
+<script>
+function checkUsername() {
+ $('#inputUsername').val($('#inputUsername').val().trim());
+
+ if ( $('#inputUsernameAlert').not(':hidden') ) {
+ $('#inputUsernameAlert').hide();
+ }
+
+ if ( $('#inputUsername').val() == '' ) {
+ $('#inputUsernameAlert').html('{lang addslashes}create_username_js_error_required{lang}').show();
+ } else if ( $('#inputUsername').val().length < 3 ) {
+ $('#inputUsernameAlert').html('{lang addslashes}create_username_js_error_short{lang}').show();
+ } else if ( $('#inputUsername').val().length > 26 ) {
+ $('#inputUsernameAlert').html('{lang addslashes}create_username_js_error_long{lang}').show();
+ } else if ( $('#inputUsername').val().match(/oscommerce/gi) !== null ) {
+ $('#inputUsernameAlert').html('{lang addslashes}create_username_js_error_oscommerce{lang}').show();
+ }
+
+ return $('#inputUsernameAlert').is(':hidden');
+}
+
+function checkEmailAddress() {
+ $('#inputEmail').val($('#inputEmail').val().trim());
+
+ if ( $('#inputEmailAlert').not(':hidden') ) {
+ $('#inputEmailAlert').hide();
+ }
+
+ if ( $('#inputEmail').val() == '' ) {
+ $('#inputEmailAlert').html('{lang addslashes}create_email_address_js_error_required{lang}').show();
+ } else if ( $('#inputEmail').val().match(/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/g) === null ) {
+ $('#inputEmailAlert').html('{lang addslashes}create_email_address_js_error_invalid{lang}').show();
+ }
+
+ return $('#inputEmailAlert').is(':hidden');
+}
+
+function checkPassword() {
+ if ( $('#inputPasswordAlert').not(':hidden') ) {
+ $('#inputPasswordAlert').hide();
+ }
+
+ if ( $('#inputPassword').val() == '' ) {
+ $('#inputPasswordAlert').html('{lang addslashes}create_password_js_error_required{lang}').show();
+ } else if ( $('#inputPassword').val().length < 3 ) {
+ $('#inputPasswordAlert').html('{lang addslashes}create_password_js_error_short{lang}').show();
+ } else if ( $('#inputPassword').val().length > 32 ) {
+ $('#inputPasswordAlert').html('{lang addslashes}create_password_js_error_long{lang}').show();
+ }
+
+ return $('#inputPasswordAlert').is(':hidden');
+}
+
+function showPasswordInfo() {
+ if ( $('#inputPassword').val().length > 2 ) {
+ if ( $('#inputPasswordInfo').not(':hidden') ) {
+ $('#inputPasswordInfo').hide();
+ }
+
+ if ( $('#inputPasswordShowHide').is(':hidden') ) {
+ $('#inputPasswordShowHide').show();
+ }
+ } else {
+ if ( $('#inputPasswordShowHide').not(':hidden') ) {
+ $('#inputPasswordShowHide').hide();
+ }
+
+ if ( $('#inputPasswordInfo').is(':hidden') ) {
+ $('#inputPasswordInfo').show();
+ }
+ }
+}
+
+function checkTOS() {
+ if ( $('#inputTOSAlert').not(':hidden') ) {
+ $('#inputTOSAlert').hide();
+ }
+
+ if ( !$('#inputTOS').is(':checked') ) {
+ $('#inputTOSAlert').html('{lang addslashes}create_tos_agree_js_error_required{lang}').show();
+ }
+
+ return $('#inputTOSAlert').is(':hidden');
+}
+
+function checkForm() {
+ var has_error = false;
+
+ if ( !checkUsername() ) {
+ has_error = true;
+ }
+
+ if ( !checkEmailAddress() ) {
+ has_error = true;
+ }
+
+ if ( !checkPassword() ) {
+ has_error = true;
+ }
+
+ if ( !checkTOS() ) {
+ has_error = true;
+ }
+
+ return !has_error;
+}
+
+$(function() {
+ showPasswordInfo();
+
+ if ( '{post}agree_tos{post}' == '1' ) {
+ $('#inputTOS').prop('checked', true);
+ }
+
+ $('#inputUsername').blur(function() {
+ checkUsername();
+ });
+
+ $('#inputEmail').blur(function() {
+ checkEmailAddress();
+ });
+
+ $('#inputPassword').blur(function() {
+ checkPassword();
+ });
+
+ $('#inputPassword').keyup(function() {
+ showPasswordInfo();
+ });
+
+ $('#inputTOS').change(function() {
+ checkTOS();
+ });
+
+ $('#formCreateAccount').submit(function() {
+ $('#createButton').button('processing');
+
+ var result = checkForm();
+
+ if ( result === false ) {
+ $('#createButton').button('reset');
+ }
+
+ return result;
+ });
+});
+</script>
View
66 osCommerce/OM/Custom/Site/Website/Application/Account/pages/email_new_user_verify.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+
+<style type="text/css">
+body { margin: 20px; background: #f7f7f5; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; color: #000000; line-height: 24px; }
+h1 { font-size: 28px; font-weight: bold; }
+h2 { font-size: 24px; font-weight: bold; }
+a:link, a:visited { color: #0029A3; text-decoration: none; }
+a:hover { color: #5D59ac; text-decoration: underline; }
+img { border: 0 }
+</style>
+
+</head>
+
+<body>
+
+<div style="background-color: #ffffff; border-radius: 5px; border: 1px solid #b3b6b0; padding: 20px;">
+ <div style="text-align: right;"><a href="http://www.oscommerce.com"><img src="http://www.oscommerce.com/public/sites/Website/images/oscommerce.png" alt="osCommerce Logo" width="280" /></a></div>
+
+ <h1>New User Registration at osCommerce</h1>
+
+ <p>{value}new_member_reg name{value},</p>
+
+ <p>thank you for creating an account at the osCommerce website! Please verify your e-mail address by following the instructions below.</p>
+
+ <p>If you did not sign up for an account at our website and have wrongly received this e-mail, please disregard and delete this e-mail. You are not in a mailing list and do not need to unsubscribe or take further action.</p>
+
+ <h2>Please Verify Your E-Mail Address</h2>
+
+ <p>Please verify your account registration with the following link:</p>
+
+ <div style="padding: 15px 0 15px 0;">
+ <span style="background-color: #258baa; border-radius: 5px; padding: 10px;">
+ <a href="{link}Account|Website|Verify&Process&id={raw}new_member_reg member_id{raw}&key={raw}new_member_reg validate_key{raw}|SSL{link}" style="color: #FFFFFF; font-size: 18px; letter-spacing: 0.5px; text-decoration: none; text-shadow: 1px 1px 1px #000000;">Verify Your Account</a>
+ </span>
+ </div>
+
+ <p>We look forward to having you in our community!</p>
+
+ <p>This e-mail can be safely deleted after your e-mail address has been verified.</p>
+
+ <p>If the above link does not work, a manual verification is available at:</p>
+
+ <p><a href="{link}Account|Website|Verify|SSL{link}">{link}Account|Website|Verify|SSL{link}</a></p>
+
+ <p>The following information is required for a manual verification:</p>
+
+ <p>
+ <strong>User ID:</strong> {value}new_member_reg member_id{value}<br />
+ <strong>Verification Key:</strong> {value}new_member_reg validate_key{value}
+ </p>
+
+ <p>Kind regards,</p>
+
+ <p>osCommerce</p>
+</div>
+
+<p><i>osCommerce, <a href="http://www.oscommerce.com">http://www.oscommerce.com</a><br />This is an automatically generated e-mail.</i></p>
+
+</body>
+
+</html>
View
34 osCommerce/OM/Custom/Site/Website/Application/Account/pages/email_new_user_verify.txt
@@ -0,0 +1,34 @@
+osCommerce
+
+New User Registration at osCommerce
+
+ {raw}new_member_reg name{raw},
+
+ thank you for creating an account at the osCommerce website! Please verify
+ your e-mail address by following the instructions below.
+
+ If you did not sign up for an account at our website and have wrongly
+ received this e-mail, please disregard and delete this e-mail. You are not in
+ a mailing list and do not need to unsubscribe or take further action.
+
+Please Verify Your E-Mail Address
+
+ Please verify your account registration with the following link:
+
+ {link}Account|Website|Verify|SSL{link}
+
+ The following information is required for a manual verification:
+
+ User ID: {raw}new_member_reg member_id{raw}
+ Verification Key: {raw}new_member_reg validate_key{raw}
+
+ We look forward to having you in our community!
+
+ This e-mail can be safely deleted after your e-mail address has been verified.
+
+ Kind regards,
+
+ osCommerce
+
+osCommerce, http://www.oscommerce.com
+This is an automatically generated e-mail.
View
144 osCommerce/OM/Custom/Site/Website/Application/Account/pages/login.html
@@ -0,0 +1,144 @@
+<div id="highlights">
+ <img src="{publiclink}{raw}highlights_image{raw}{publiclink}" width="940" height="285" />
+</div>
+
+<div class="row">
+ <div id="maincontainer" class="span9">
+ <div id="maincontent">
+ <h1>{lang}login_title{lang}</h1>
+
+ {lang}login_introduction{lang}
+
+ {widget}message_stack|account{widget}
+
+ <form id="formLogin" name="login" action="{link}Account|Website|Login&Process|SSL{link}" method="post" class="form-horizontal">{formprotect}public_token{formprotect}
+ <div class="control-group">
+ <label class="control-label" for="inputUsername">{lang}login_username_title{lang}</label>
+
+ <div class="controls">
+ <input type="text" id="inputUsername" name="username" value="{post}username{post}" />
+ <span id="inputUsernameAlert" class="help-block hide label label-important"></span>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="inputPassword">{lang}login_password_title{lang}</label>
+
+ <div class="controls">
+ <input type="password" id="inputPassword" name="password" {iftrue in_ssl}value="{post}password{post}"{iftrue} />
+ <span id="inputPasswordAlert" class="help-block hide label label-important"></span>
+ <span class="help-block"><span class="muted"><small><a href="#" onclick="$('#inputPassword').togglePassword(); return false;" id="inputPasswordShowHide">{lang}login_password_show_hide{lang}</a></small></span></span>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <div class="controls">
+ <label class="checkbox">
+ <input type="checkbox" id="inputRememberMe" name="remember_me" value="1" checked="checked" />
+ {lang}login_remember_me_title{lang}
+ </label>
+ <span class="help-block"><span class="muted"><small>{lang}login_remember_me_note{lang}</small></span></span>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <div class="controls">
+ <button type="submit" id="loginButton" class="btn" data-processing-text="{lang addslashes}login_processing_button_title{lang}">{lang}login_button_title{lang}</button>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ {widget}account_sidebar_nav{widget}
+</div>
+
+<script>
+function checkUsername() {
+ $('#inputUsername').val($('#inputUsername').val().trim());
+
+ if ( $('#inputUsernameAlert').not(':hidden') ) {
+ $('#inputUsernameAlert').hide();
+ }
+
+ if ( $('#inputUsername').val() == '' ) {
+ $('#inputUsernameAlert').html('{lang addslashes}login_username_js_error_required{lang}').show();
+ } else if ( $('#inputUsername').val().length < 3 ) {
+ $('#inputUsernameAlert').html('{lang addslashes}login_username_js_error_short{lang}').show();
+ } else if ( $('#inputUsername').val().length > 26 ) {
+ $('#inputUsernameAlert').html('{lang addslashes}login_username_js_error_long{lang}').show();
+ }
+
+ return $('#inputUsernameAlert').is(':hidden');
+}
+
+function checkPassword() {
+ if ( $('#inputPasswordAlert').not(':hidden') ) {
+ $('#inputPasswordAlert').hide();
+ }
+
+ if ( $('#inputPassword').val() == '' ) {
+ $('#inputPasswordAlert').html('{lang addslashes}login_password_js_error_required{lang}').show();
+ } else if ( $('#inputPassword').val().length < 3 ) {
+ $('#inputPasswordAlert').html('{lang addslashes}login_password_js_error_short{lang}').show();
+ } else if ( $('#inputPassword').val().length > 32 ) {
+ $('#inputPasswordAlert').html('{lang addslashes}login_password_js_error_long{lang}').show();
+ }
+
+ return $('#inputPasswordAlert').is(':hidden');
+}
+
+function showPasswordInfo() {
+ if ( $('#inputPassword').val().length > 2 ) {
+ if ( $('#inputPasswordShowHide').is(':hidden') ) {
+ $('#inputPasswordShowHide').show();
+ }
+ } else {
+ if ( $('#inputPasswordShowHide').not(':hidden') ) {
+ $('#inputPasswordShowHide').hide();
+ }
+ }
+}
+
+function checkForm() {
+ var has_error = false;
+
+ if ( !checkUsername() ) {
+ has_error = true;
+ }
+
+ if ( !checkPassword() ) {
+ has_error = true;
+ }
+
+ return !has_error;
+}
+
+$(function() {
+ showPasswordInfo();
+
+ $('#inputUsername').blur(function() {
+ checkUsername();
+ });
+
+ $('#inputPassword').blur(function() {
+ checkPassword();
+ });
+
+ $('#inputPassword').keyup(function() {
+ showPasswordInfo();
+ });
+
+ $('#formLogin').submit(function() {
+ $('#loginButton').button('processing');
+
+ var result = checkForm();
+
+ if ( result === false ) {
+ $('#loginButton').button('reset');
+ }
+
+ return result;
+ });
+});
+</script>
View
50 osCommerce/OM/Custom/Site/Website/Application/Account/pages/main.html
@@ -0,0 +1,50 @@
+<div id="highlights" style="width: 940px; height: 285px; background: url('{publiclink}{raw}highlights_image{raw}{publiclink}') no-repeat;">
+ <div id="hellokitty" style="display: none; font-family: Allura; transform: rotate(-3deg); text-align: center; padding-top: 60px;">
+ {value}user name{value}
+ </div>
+</div>
+
+<script>
+$(function() {
+ $('#hellokitty').show(); // no meow when js disabled
+ $('#highlights').boxfit();
+});
+</script>
+
+<div class="row">
+ <div id="maincontainer" class="span9">
+ <div id="maincontent">
+ <h1>{lang}account_title{lang}</h1>
+
+ {lang}account_introduction{lang}
+
+ {widget}message_stack|account{widget}
+
+ <ul class="thumbnails">
+ <li class="span4">
+ <h3 class="text-info">{lang}account_forum_title{lang}</h3>
+ <p>{lang}account_forum_desc{lang}</p>
+ <p><a class="btn" href="http://forums.oscommerce.com">{lang}account_forum_link{lang}</a></p>
+ </li>
+ <li class="span4">
+ <h3 class="text-info">{lang}account_add_ons_title{lang}</h3>
+ <p>{lang}account_add_ons_desc{lang}</p>
+ <p><a class="btn" href="http://addons.oscommerce.com">{lang}account_add_ons_link{lang}</a></p>
+ </li>
+ <li class="span4">
+ <h3 class="text-info">{lang}account_live_shops_title{lang}</h3>
+ <p>{lang}account_live_shops_desc{lang}</p>
+ <p><a class="btn" href="http://shops.oscommerce.com">{lang}account_live_shops_link{lang}</a></p>
+ </li>
+ <li class="span4">
+ <h3 class="text-info">{lang}account_partner_title{lang}</h3>
+ <p>{lang}account_partner_desc{lang}</p>
+ <p><a class="btn" href="{link}Account|Website|Partner|SSL{link}">{lang}account_partner_link{lang}</a></p>
+ </li>
+ </ul>
+
+ </div>
+ </div>
+
+ {widget}account_sidebar_nav{widget}
+</div>
View
36 osCommerce/OM/Custom/Site/Website/Application/Account/pages/partner.html
@@ -7,43 +7,45 @@
<div class="row">
<div id="maincontainer" class="span9">
<div id="maincontent">
- <h1>{lang}dashboard_title{lang}</h1>
+ <h1>{lang}partner_title{lang}</h1>
- {widget}message_stack|services{widget}
+ {widget}message_stack|partner{widget}
- <p>{lang}dashboard_introduction{lang}</p>
+ <p>{lang}partner_introduction{lang}</p>
{loop partner_campaigns}
<div id="partnerc_#code#">
<p class="pcdate label pull-right">%date_end%</p>
- <p><a href="{link}Services|Website|Dashboard&Edit=%code%{link}">#title#</a> <small>(in %category_title%)</small><br /><span class="pcdays muted"></span></p>
+ <p><a href="{link}Account|Website|Partner&Edit=%code%|SSL{link}">#title#</a> <small>(in %category_title%)</small><br /><span class="pcdays muted"></span></p>
</div>
{loop}
- <p align="center"><small class="text-success">{lang}cs_enquiry_additional_discount{lang}</small></p>
+ <p align="center"><small class="text-success">{lang}partner_multiple_discount_info{lang}</small></p>
<script>
-var partner_date_now = moment('{value}partner_date_now{value}');
+var partner_date_now = moment('{value addslashes}partner_date_now{value}');
-$('[id^=partnerc_]').each(function() {
- var runsUntil = moment($('.pcdate', this).text());
+$(function() {
+ $('[id^=partnerc_]').each(function() {
+ var runsUntil = moment($('.pcdate', this).text());
- $('.pcdate', this).text(runsUntil.format('Do MMM, YYYY'));
+ $('.pcdate', this).text(runsUntil.format('Do MMM, YYYY'));
- if ( runsUntil.isBefore(partner_date_now) ) {
- $('.pcdate', this).addClass('label-important');
+ if ( runsUntil.isBefore(partner_date_now) ) {
+ $('.pcdate', this).addClass('label-important');
- $('.pcdays', this).html('<small>(' + partner_date_now.diff(runsUntil, 'days') + ' days ago)</small>');
- } else {
- $('.pcdate', this).addClass('label-success');
+ $('.pcdays', this).html('<small>(' + partner_date_now.diff(runsUntil, 'days') + ' days ago)</small>');
+ } else {
+ $('.pcdate', this).addClass('label-success');
- $('.pcdays', this).html('<small>(' + runsUntil.diff(partner_date_now, 'days') + ' days remaining)</small>');
- }
+ $('.pcdays', this).html('<small>(' + runsUntil.diff(partner_date_now, 'days') + ' days remaining)</small>');
+ }
+ });
});
</script>
</div>
</div>
- {widget}services_sidebar_nav{widget}
+ {widget}account_sidebar_nav{widget}
</div>
View
229 osCommerce/OM/Custom/Site/Website/Application/Account/pages/partner_edit.html
@@ -5,45 +5,45 @@
<div class="row">
<div id="maincontainer" class="span12">
<div id="maincontent">
- <h1>{lang}dashboard_title{lang}</h1>
+ <h1>{lang}partner_title{lang}</h1>
- {widget}message_stack|services{widget}
+ {widget}message_stack|partner{widget}
<h3>{value}partner_campaign title{value} <small>(in {value}partner_campaign category_title{value})</small></h3>
- <form action="{link}Services|Website|Dashboard&Edit={raw}partner_campaign code{raw}&Process{link}" method="post" enctype="multipart/form-data" class="form-horizontal">
+ <form id="formPartnerEdit" action="{link}Account|Website|Partner&Edit={raw}partner_campaign code{raw}&Process{link}" method="post" enctype="multipart/form-data" class="form-horizontal">{formprotect}public_token{formprotect}
<fieldset>
- <legend>{lang}dashboard_partner_information_page{lang} <small class="pull-right text-error">{lang}dashboard_required_fields{lang}</small></legend>
+ <legend>{lang}partner_information_page{lang} <small class="pull-right text-error">{lang}partner_required_fields{lang}</small></legend>
<div class="control-group">
- <label class="control-label" for="inputDescShort"><strong>{lang}dashboard_field_desc_short_title{lang}</strong> <span class="text-error">*</span></label>
+ <label class="control-label" for="inputDescShort">{lang}partner_field_desc_short_title{lang} <span class="text-error">*</span></label>
<div class="controls">
<textarea id="inputDescShort" name="desc_short" rows="6" maxlength="450" class="span8">{post}desc_short|partner_campaign desc_short{post}</textarea>
- <span class="help-block"><small>{lang}dashboard_field_desc_short_desc{lang}</small></span>
+ <span class="help-block"><small>{lang}partner_field_desc_short_desc{lang}</small></span>
</div>
</div>
<div class="control-group">
- <label class="control-label" for="inputDescLong"><strong>{lang}dashboard_field_desc_long_title{lang}</strong> <span class="text-error">*</span></label>
+ <label class="control-label" for="inputDescLong">{lang}partner_field_desc_long_title{lang} <span class="text-error">*</span></label>
<div class="controls">
<textarea id="inputDescLong" name="desc_long" rows="15" class="span8">{post}desc_long|partner_campaign desc_long{post}</textarea>
- <span class="help-block"><small>{lang}dashboard_field_desc_long_desc{lang}</small></span>
+ <span class="help-block"><small>{lang}partner_field_desc_long_desc{lang}</small></span>
</div>
</div>
<div class="control-group">
- <label class="control-label" for="inputAddress"><strong>{lang}dashboard_field_address_title{lang}</strong></label>
+ <label class="control-label" for="inputAddress">{lang}partner_field_address_title{lang}</label>
<div class="controls">
<textarea id="inputAddress" name="address" rows="5" maxlength="255" class="span8">{post}address|partner_campaign address{post}</textarea>
- <span class="help-block"><small>{lang}dashboard_field_address_desc{lang}</small></span>
+ <span class="help-block"><small>{lang}partner_field_address_desc{lang}</small></span>
</div>
</div>
<div class="control-group">
- <label class="control-label" for="inputTelephone"><strong>{lang}dashboard_field_telephone_title{lang}</strong></label>
+ <label class="control-label" for="inputTelephone">{lang}partner_field_telephone_title{lang}</label>
<div class="controls">
<input type="text" id="inputTelephone" name="telephone" value="{post}telephone|partner_campaign telephone{post}" class="span8" />
@@ -51,7 +51,7 @@
</div>
<div class="control-group">
- <label class="control-label" for="inputEmail"><strong>{lang}dashboard_field_email_title{lang}</strong></label>
+ <label class="control-label" for="inputEmail">{lang}partner_field_email_title{lang}</label>
<div class="controls">
<input type="text" id="inputEmail" name="email" value="{post}email|partner_campaign email{post}" class="span8" />
@@ -59,7 +59,7 @@
</div>
<div class="control-group">
- <label class="control-label" for="inputYouTubeVideoID"><strong>{lang}dashboard_field_youtube_video_id_title{lang}</strong></label>
+ <label class="control-label" for="inputYouTubeVideoID">{lang}partner_field_youtube_video_id_title{lang}</label>
<div class="controls">
<input type="text" id="inputYouTubeVideoID" name="youtube_video_id" value="{post}youtube_video_id|partner_campaign youtube_video_id{post}" class="span8" />
@@ -67,49 +67,51 @@
</div>
<div class="control-group">
- <label class="control-label" for="inputPublicUrl"><strong>{lang}dashboard_field_public_url_title{lang}</strong> <span class="text-error">*</span></label>
+ <label class="control-label" for="inputPublicUrl">{lang}partner_field_public_url_title{lang} <span class="text-error">*</span></label>
<div class="controls">
<input type="text" id="inputPublicUrl" name="public_url" value="{post}public_url|partner_campaign public_url{post}" class="span8" />
- <span class="help-block"><small>{lang}dashboard_field_public_url_desc{lang}</small></span>
+ <span class="help-block"><small>{lang}partner_field_public_url_desc{lang}</small></span>
</div>
</div>
<div class="control-group">
- <label class="control-label" for="inputUrl"><strong>{lang}dashboard_field_url_title{lang}</strong> <span class="text-error">*</span></label>
+ <label class="control-label" for="inputUrl">{lang}partner_field_url_title{lang} <span class="text-error">*</span></label>
<div class="controls">
<input type="text" id="inputUrl" name="url" value="{post}url|partner_campaign url{post}" class="span8" />
- <span class="help-block"><small>{lang}dashboard_field_url_desc{lang}</small></span>
+ <span class="help-block"><small>{lang}partner_field_url_desc{lang}</small></span>
</div>
</div>
<div class="control-group">
- <label class="control-label" for="inputImageSmall"><strong>{lang}dashboard_field_image_small_title{lang}</strong></label>
+ <label class="control-label" for="inputImageSmall">{lang}partner_field_image_small_title{lang}</label>
<div class="controls">
- <input type="file" id="inputImageSmall" name="image_small" class="span6" />
+ <input type="file" id="inputImageSmall" name="image_small" class="span8" />
+ <span class="help-block"><small>
+ {lang}partner_field_image_small_desc{lang}
- {ifvalue partner_campaign image_small}
- <span class="span2 pull-right"><a href="{publiclink}images/partners/{raw}partner_campaign image_small{raw}{publiclink}" target="_blank"><small>{lang}dashboard_view_current_image{lang}</small></a></span>
- {ifvalue}
-
- <span class="help-block"><small>{lang}dashboard_field_image_small_desc{lang}</small></span>
+ {ifvalue partner_campaign image_small}
+ <a href="{publiclink}images/partners/{raw}partner_campaign image_small{raw}{publiclink}" target="_blank">{lang}partner_view_current_image{lang}</a>
+ {ifvalue}
+ </small></span>
</div>
</div>
<div class="partner_gold">
<div class="control-group">
- <label class="control-label" for="inputImageBig"><strong>{lang}dashboard_field_image_big_title{lang}</strong></label>
+ <label class="control-label" for="inputImageBig">{lang}partner_field_image_big_title{lang}</label>
<div class="controls">
- <input type="file" id="inputImageBig" name="image_big" class="span6" />
-
- {ifvalue partner_campaign image_big}
- <span class="span2 pull-right"><a href="{publiclink}images/partners/{raw}partner_campaign image_big{raw}{publiclink}" target="_blank"><small>{lang}dashboard_view_current_image{lang}</small></a></span>
- {ifvalue}
-
- <span class="help-block"><small>{lang}dashboard_field_image_big_desc{lang}</small></span>
+ <input type="file" id="inputImageBig" name="image_big" class="span8" />
+ <span class="help-block"><small>
+ {lang}partner_field_image_big_desc{lang}
+
+ {ifvalue partner_campaign image_big}
+ <a href="{publiclink}images/partners/{raw}partner_campaign image_big{raw}{publiclink}" target="_blank">{lang}partner_view_current_image{lang}</a>
+ {ifvalue}
+ </small></span>
</div>
</div>
</div>
@@ -117,24 +119,25 @@
<div class="partner_gold">
<fieldset>
- <legend>{lang}dashboard_promotion_banner{lang}</legend>
+ <legend>{lang}partner_promotion{lang}</legend>
<div class="control-group">
- <label class="control-label" for="inputImagePromo"><strong>{lang}dashboard_field_image_promo_title{lang}</strong></label>
+ <label class="control-label" for="inputImagePromo">{lang}partner_field_image_promo_title{lang}</label>
<div class="controls">
- <input type="file" id="inputImagePromo" name="image_promo" class="span6" />
-
- {ifvalue partner_campaign image_promo}
- <span class="span2 pull-right"><a href="{publiclink}images/partners/{raw}partner_campaign image_promo{raw}{publiclink}" target="_blank"><small>{lang}dashboard_view_current_image{lang}</small></a></span>
- {ifvalue}
-
- <span class="help-block"><small>{lang}dashboard_field_image_promo_desc{lang}</small></span>
+ <input type="file" id="inputImagePromo" name="image_promo" class="span8" />
+ <span class="help-block"><small>
+ {lang}partner_field_image_promo_desc{lang}
+
+ {ifvalue partner_campaign image_promo}
+ <a href="{publiclink}images/partners/{raw}partner_campaign image_promo{raw}{publiclink}" target="_blank">{lang}partner_view_current_image{lang}</a>
+ {ifvalue}
+ </small></span>
</div>
</div>
<div class="control-group">
- <label class="control-label" for="inputPromoUrl"><strong>{lang}dashboard_field_image_promo_url_title{lang}</strong></label>
+ <label class="control-label" for="inputPromoUrl">{lang}partner_field_image_promo_url_title{lang}</label>
<div class="controls">
<input type="text" id="inputPromoUrl" name="image_promo_url" value="{post}image_promo_url|partner_campaign image_promo_url{post}" class="span8" />
@@ -143,71 +146,99 @@
</fieldset>
<fieldset>
- <legend>{lang}dashboard_banner_english{lang}</legend>
+ <legend>{lang}partner_banner{lang}</legend>
+
+ <ul class="nav nav-tabs">
+ <li class="active"><a data-target="#inputBannerEnglish" data-toggle=