1.2.1 Enable/Disable user registration WeBid 1.2.* ONLY

Enable/Disable user registration

  1. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    Shaman submitted a new resource:

    Enable/Disable user registration - Enable/Disable user registration

    Read more about this resource...
     
    Last edited by a moderator: Nov 19, 2016
  2. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    I get this in my register.php page:
    [​IMG]
     
  3. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    Ru: Видимо вы не добавили в свой (если я не ошибся... Хорватский?) файл перевода значения $MSG...
    En: Apparently you not have added to your (if I'm not mistaken... Croatian?) the translation file values $MSG...
    Očito niste dodali u svoj (ako sam pogriješio... Hrvatski?) datoteku za prijevod značenja $MSG...

    View errors in admin panel. I'm sure a lot of them and all are associated with translation. To test, turn on the output in English. And if you have correctly added error should not be.

    En: As for any error of class {L_.......} this error indicates the absence in the translation file the value of the variable $MSG [.....]
    Ru: Что касается любой ошибки класса {L_.......} данная ошибка говорит об отсутствии в файле перевода значения переменной $MSG[.....]
     
    Last edited: Nov 20, 2016
  4. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    This is Serbian
    I have added to both English and Serbian
    [​IMG]
    This is output of my error log:
    Unknown error type: [8] Undefined index: HTTPS on /home/ebuvljak/public_html/header.php line 29
    Unknown error type: [8] Undefined index: any_country on /home/ebuvljak/public_html/adsearch.php line 314
    Unknown error type: [2] fopen(uploaded/1/o_1as3d5eic1hmp1ppu1i7l1d0k1j8ua.jpg): failed to open stream: No such file or directory on /home/ebuvljak/public_html/getthumb.php line 55
    Unknown error type: [8] Undefined variable: ERR_716 on /home/ebuvljak/public_html/getthumb.php line 57
    Unknown error type: [2] fopen(uploaded/1/o_1ap3tblpm193mp4a1rkklkrdiba.jpg): failed to open stream: No such file or directory on /home/ebuvljak/public_html/getthumb.php line 55
    Unknown error type: [2] fopen(uploaded/2/o_1asak66mv1flqglkc6511do1eloa.png): failed to open stream: No such file or directory on /home/ebuvljak/public_html/getthumb.php line 55
    Unknown error type: [8] Undefined index: q on /home/ebuvljak/public_html/search.php line 20
    Unknown error type: [8] Undefined index: id on /home/ebuvljak/public_html/search.php line 21
    Unknown error type: [8] Undefined index: reg_25_0151 on /home/ebuvljak/public_html/admin/usersettings.php line 34
    Unknown error type: [8] Undefined index: reg_25_0152 on /home/ebuvljak/public_html/admin/usersettings.php line 34
    Unknown error type: [8] Undefined index: prune_unactivated_users on /home/ebuvljak/public_html/admin/usersettings.php line 38
    Unknown error type: [8] Undefined index: prune_unactivated_users_explain on /home/ebuvljak/public_html/admin/usersettings.php line 38
    Unknown error type: [8] Undefined index: prune_unactivated_users_days on /home/ebuvljak/public_html/admin/usersettings.php line 39
    Unknown error type: [8] Undefined index: prune_unactivated_users_days_explain on /home/ebuvljak/public_html/admin/usersettings.php line 39
     
  5. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    Can I see your usersettings.php and register.php.
    And I apologize for the error in the determination of your language!
    You can send your file with a private message if you don't want to show it to everyone.
     
  6. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    usersettings.php

    <?php
    /***************************************************************************
    * copyright : (C) 2008 - 2016 WeBid
    * site : http://www.webidsupport.com/
    ***************************************************************************/

    /***************************************************************************
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version. Although none of the code may be
    * sold. If you have been sold this script, get a refund.
    ***************************************************************************/

    define('InAdmin', 1);
    $current_page = 'settings';
    include '../common.php';
    include INCLUDE_PATH . 'functions_admin.php';
    include 'loggedin.inc.php';

    if (isset($_POST['action']) && $_POST['action'] == 'update')
    {
    $system->writesetting("RegOnOff",ynbool($_POST['RegOnOff']), 'str');
    $system->writesetting("usersauth", $_POST['usersauth'], 'str');
    $system->writesetting("activationtype", $_POST['usersconf'], 'int');
    $system->writesetting("prune_unactivated_users", $_POST['prune_unactivated_users'], 'bool');
    $system->writesetting("prune_unactivated_users_days", $_POST['prune_unactivated_users_days'], 'int');
    $system->writesetting("bidding_visable_to_guest", $_POST['bidding_visable_to_guest'], 'bool');
    $system->writesetting("email_admin_on_signup", $_POST['email_admin_on_signup'], 'bool');
    $system->writesetting("user_request_seller_permission", $_POST['user_request_seller_permission'], 'bool');

    $template->assign_block_vars('alerts', array('TYPE' => 'success', 'MESSAGE' => $MSG['895']));
    }
    loadblock($MSG['reg_25_0151'], $MSG['reg_25_0152'], 'yesnostacked', 'RegOnOff', $system->SETTINGS['RegOnOff'], array($MSG['2__0066'], $MSG['2__0067']));
    loadblock($MSG['25_0151'], $MSG['25_0152'], 'yesnostacked', 'usersauth', $system->SETTINGS['usersauth'], array($MSG['2__0066'], $MSG['2__0067']));
    loadblock($MSG['25_0151_a'], $MSG['25_0152_a'], 'select3num', 'usersconf', $system->SETTINGS['activationtype'], array($MSG['25_0152_b'], $MSG['25_0152_c'], $MSG['25_0152_d']));

    loadblock($MSG['prune_unactivated_users'], $MSG['prune_unactivated_users_explain'], 'bool', 'prune_unactivated_users', $system->SETTINGS['prune_unactivated_users'], array($MSG['759'], $MSG['760']));
    loadblock($MSG['prune_unactivated_users_days'], $MSG['prune_unactivated_users_days_explain'], 'days', 'prune_unactivated_users_days', $system->SETTINGS['prune_unactivated_users_days'], array($MSG['377']));

    loadblock($MSG['bidding_visable_to_guest'], $MSG['bidding_visable_to_guest_explain'], 'bool', 'bidding_visable_to_guest', $system->SETTINGS['bidding_visable_to_guest'], array($MSG['759'], $MSG['760']));
    loadblock($MSG['email_admin_on_signup'], $MSG['email_admin_on_signup_explain'], 'bool', 'email_admin_on_signup', $system->SETTINGS['email_admin_on_signup'], array($MSG['759'], $MSG['760']));
    loadblock($MSG['user_request_seller_permission'], $MSG['user_request_seller_permission_explain'], 'bool', 'user_request_seller_permission', $system->SETTINGS['user_request_seller_permission'], array($MSG['759'], $MSG['760']));

    $template->assign_vars(array(
    'SITEURL' => $system->SETTINGS['siteurl'],
    'TYPENAME' => $MSG['25_0008'],
    'PAGENAME' => $MSG['894']
    ));

    include 'header.php';
    $template->set_filenames(array(
    'body' => 'adminpages.tpl'
    ));
    $template->display('body');
    include 'footer.php';
    ?>
     
  7. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    register.php

    <?php
    /***************************************************************************
    * copyright : (C) 2008 - 2016 WeBid
    * site : http://www.webidsupport.com/
    ***************************************************************************/

    /***************************************************************************
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation; either version 2 of the License, or
    * (at your option) any later version. Although none of the code may be
    * sold. If you have been sold this script, get a refund.
    ***************************************************************************/

    include 'common.php';
    include INCLUDE_PATH . 'config/timezones.php';
    include INCLUDE_PATH . 'config/gateways.php';

    // check recaptcha is enabled
    if ($system->SETTINGS['spam_register'] == 2)
    {
    include PACKAGE_PATH . 'recaptcha/recaptcha.php';
    }
    elseif ($system->SETTINGS['spam_register'] == 1)
    {
    include PACKAGE_PATH . 'captcha/securimage.php';
    }

    function CheckAge($day, $month, $year) // check if the users > 18
    {
    $NOW_year = date('Y');
    $NOW_month = date('m');
    $NOW_day = date('d');

    if (($NOW_year - $year) > 18)
    {
    return 1;
    }
    elseif ((($NOW_year - $year) == 18) && ($NOW_month > $month))
    {
    return 1;
    }
    elseif ((($NOW_year - $year) == 18) && ($NOW_month == $month) && ($NOW_day >= $day))
    {
    return 1;
    }
    else
    {
    return 0;
    }
    }

    function get_hash()
    {
    $string = '0123456789abcdefghijklmnopqrstuvyxz';
    $hash = '';
    for ($i = 0; $i < 5; $i++)
    {
    $rand = rand(0, (34 - $i));
    $hash .= $string[$rand];
    $string = str_replace($string[$rand], '', $string);
    }
    return $hash;
    }

    function generateSelect($name, $options, $selectsetting)
    {
    $html = '<select name="' . $name . '">';
    foreach ($options as $option => $value)
    {
    if ($selectsetting == $option)
    {
    $html .= '<option value=' . $option . ' selected>' . $value . '</option>';
    }
    else
    {
    $html .= '<option value=' . $option . '>' . $value . '</option>';
    }
    }
    $html .= '</select>';
    return $html;
    }

    function checkMissing ($missing)
    {
    foreach ($missing as $value)
    {
    if ($value)
    {
    return true;
    }
    }
    return false;
    }

    function checkEmail($email)
    {
    global $system;
    if ($system->SETTINGS['spam_blocked_email_enabled'])
    {
    $exploded_email = explode('@', $email);
    $email_domain = trim(array_pop($exploded_email));
    $blocked_emails = explode("\n", $system->SETTINGS['spam_blocked_email_domains']);

    return !contains($email_domain, $blocked_emails);
    }
    return true;
    }

    function contains($str, array $arr)
    {
    foreach($arr as $a)
    {
    if (stripos($str, $a) !== false)
    {
    return true;
    }
    }

    return false;
    }

    $first = true;
    unset($ERR);

    if (empty($_POST['action']))
    {
    $action = 'first';
    }

    $query = "SELECT * FROM " . $DBPrefix . "payment_options WHERE is_gateway = 1";
    $db->direct_query($query);
    $gateway_data = $db->fetchAll();

    // Retrieve users signup settings
    $MANDATORY_FIELDS = unserialize($system->SETTINGS['mandatory_fields']);
    $DISPLAYED_FIELDS = unserialize($system->SETTINGS['displayed_feilds']);

    $spam_html = '';

    if ($system->SETTINGS['spam_register'] == 1)
    {
    $resp = new Securimage();
    $spam_html = $resp->getCaptchaHtml();
    }

    // missing check bools
    $missing = array();
    $missing['birthday'] = $missing['address'] = $missing['city'] = $missing['prov'] = $missing['country'] = $missing['zip'] = $missing['tel'] = $missing['paypal'] = $missing['authnet'] = $missing['worldpay'] = $missing['toocheckout'] = $missing['moneybookers'] = $missing['name'] = $missing['nick'] = $missing['password'] = $missing['repeat_password'] = $missing['email'] = false;
    if (isset($_POST['action']) && $_POST['action'] == 'first')
    {
    if (!isset($_POST['terms_check']))
    {
    $ERR = $ERR_078;
    }
    if (empty($_POST['TPL_name']))
    {
    $missing['name'] = true;
    }
    if (empty($_POST['TPL_nick']))
    {
    $missing['nick'] = true;
    }
    if (empty($_POST['TPL_password']))
    {
    $missing['password'] = true;
    }
    if (empty($_POST['TPL_repeat_password']))
    {
    $missing['repeat_password'] = true;
    }
    if (empty($_POST['TPL_email']))
    {
    $missing['email'] = true;
    }
    if (empty($_POST['TPL_address']) && $MANDATORY_FIELDS['address'] == 'y')
    {
    $missing['address'] = true;
    }
    if (empty($_POST['TPL_city']) && $MANDATORY_FIELDS['city'] == 'y')
    {
    $missing['city'] = true;
    }
    if (empty($_POST['TPL_prov']) && $MANDATORY_FIELDS['prov'] == 'y')
    {
    $missing['prov'] = true;
    }
    if (empty($_POST['TPL_country']) && $MANDATORY_FIELDS['country'] == 'y')
    {
    $missing['country'] = true;
    }
    if (empty($_POST['TPL_zip']) && $MANDATORY_FIELDS['zip'] == 'y')
    {
    $missing['zip'] = true;
    }
    if (empty($_POST['TPL_phone']) && $MANDATORY_FIELDS['tel'] == 'y')
    {
    $missing['tel'] = true;
    }
    if ((empty($_POST['TPL_day']) || empty($_POST['TPL_month']) || empty($_POST['TPL_year'])) && $MANDATORY_FIELDS['birthdate'] == 'y')
    {
    $missing['birthday'] = true;
    }
    foreach ($gateway_data as $gateway)
    {
    if ($gateway['gateway_required'] == 1 && isset($_POST[$gateway['name']]['address']) && empty($_POST[$gateway['name']]['address']))
    {
    $missing[$gateway['name']] = true;
    }
    }
    if (checkMissing($missing))
    {
    $ERR = $ERR_047;
    }
    if ($system->SETTINGS['wordsfilter'] == 'y')
    {
    if (empty($system->filter($_POST['TPL_nick'])))
    {
    $ERR = $MSG['wordfilter_banned_username']; // User name altered by word filter
    }
    }
    if (!isset($ERR))
    {
    $birth_day = (isset($_POST['TPL_day'])) ? $_POST['TPL_day'] : '';
    $birth_month = (isset($_POST['TPL_month'])) ? $_POST['TPL_month'] : '';
    $birth_year = (isset($_POST['TPL_year'])) ? $_POST['TPL_year'] : '';
    $DATE = $birth_year . $birth_month . $birth_day;

    if ($system->SETTINGS['spam_register'] == 2)
    {
    $recaptcha_response = (isset($_POST['g-recaptcha-response'])) ? $_POST['g-recaptcha-response'] : '';
    $resp = recaptcha_check_answer($system->SETTINGS['recaptcha_private'], $recaptcha_response);
    }

    if ($system->SETTINGS['spam_register'] == 2 && !$resp)
    {
    $ERR = $MSG['752'];
    }
    elseif ($system->SETTINGS['spam_register'] == 1 && !$resp->check($_POST['captcha_code']))
    {
    $ERR = $MSG['752'];
    }
    elseif (strlen($_POST['TPL_nick']) < 6)
    {
    $ERR = $ERR_107;
    }
    elseif (strlen ($_POST['TPL_password']) < 6)
    {
    $ERR = $ERR_108;
    }
    elseif ($_POST['TPL_password'] != $_POST['TPL_repeat_password'])
    {
    $ERR = $ERR_109;
    }
    elseif (strlen($_POST['TPL_email']) < 5)
    {
    $ERR = $ERR_110;
    }
    elseif (!preg_match('/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i', $_POST['TPL_email']))
    {
    $ERR = $ERR_008;
    }
    elseif (!checkEmail($_POST['TPL_email']))
    {
    $ERR = $MSG['spam_blocked_email_domains_register_error'];
    }
    elseif (!CheckAge($birth_day, $birth_month, $birth_year) && $MANDATORY_FIELDS['birthdate'] == 'y')
    {
    $ERR = $ERR_113;
    }
    elseif (!empty($birth_month) && !empty($birth_day) && !empty($birth_year) && !checkdate($birth_month, $birth_day, $birth_year))
    {
    $ERR = $ERR_117;
    }
    else
    {
    // check username is unique
    $query = "SELECT nick FROM " . $DBPrefix . "users WHERE nick = :name";
    $params = array();
    $params[] = array(':name', $system->cleanvars($_POST['TPL_nick']), 'str');
    $db->query($query, $params);
    if ($db->numrows() > 0)
    {
    $ERR = $ERR_111; // Selected user already exists
    }
    // check email is unique
    $query = "SELECT email FROM " . $DBPrefix . "users WHERE email = :email";
    $params = array();
    $params[] = array(':email', $system->cleanvars($_POST['TPL_email']), 'str');
    $db->query($query, $params);
    if ($db->numrows() > 0)
    {
    $ERR = $ERR_115; // E-mail already used
    }

    if (!isset($ERR))
    {
    $TPL_nick_hidden = $_POST['TPL_nick'];
    $TPL_password_hidden = $_POST['TPL_password'];
    $TPL_name_hidden = $_POST['TPL_name'];
    $TPL_email_hidden = $_POST['TPL_email'];
    $SUSPENDED = ($system->SETTINGS['activationtype'] == 2) ? 0 : 8;
    $SUSPENDED = ($system->SETTINGS['activationtype'] == 0) ? 10 : $SUSPENDED;

    $query = "SELECT value FROM " . $DBPrefix . "fees WHERE type = 'signup_fee'";
    $db->direct_query($query);
    $signup_fee = $db->result('value');
    if ($system->SETTINGS['fee_type'] == 2 && $signup_fee > 0)
    {
    $SUSPENDED = 9;
    $query = "UPDATE " . $DBPrefix . "counters SET inactiveusers = inactiveusers + 1";
    $db->direct_query($query);
    }
    elseif ($system->SETTINGS['activationtype'] == 1 || $system->SETTINGS['activationtype'] == 0)
    {
    $query = "UPDATE " . $DBPrefix . "counters SET inactiveusers = inactiveusers + 1";
    $db->direct_query($query);
    }
    else
    {
    $query = "UPDATE " . $DBPrefix . "counters SET users = users + 1";
    $db->direct_query($query);
    }
    $balance = ($system->SETTINGS['fee_type'] == 2) ? 0 : ($system->SETTINGS['fee_signup_bonus'] - $signup_fee);

    $query = "SELECT id FROM " . $DBPrefix . "groups WHERE auto_join = 1";
    $db->direct_query($query);
    $groups = array();
    while ($row = $db->fetch())
    {
    $groups[] = $row['id'];
    }
    $hash = get_hash();
    // prepare to hash the password
    include PACKAGE_PATH . 'PasswordHash.php';
    $phpass = new PasswordHash(8, false);
    $query = "INSERT INTO " . $DBPrefix . "users
    (nick, password, hash, name, address, city, prov, country, zip, phone, nletter, email, reg_date, birthdate,
    suspended, language, groups, balance, timezone)
    VALUES
    :)nick, :password, :hash, :name, :address, :city, :prov, :country, :zip, :phone, :nletter, :email, :reg_date, :birthdate,
    :suspended, :language, :groups, :balance, :timezone)";
    $params = array(
    array(':nick', $system->cleanvars($TPL_nick_hidden), 'str'),
    array(':password', $phpass->HashPassword($TPL_password_hidden), 'str'),
    array(':hash', $hash, 'str'),
    array(':name', $system->cleanvars($TPL_name_hidden), 'str'),
    array(':address', $system->cleanvars((isset($_POST['TPL_address'])) ? $_POST['TPL_address'] : ''), 'str'),
    array(':city', $system->cleanvars((isset($_POST['TPL_city'])) ? $_POST['TPL_city'] : ''), 'str'),
    array(':prov', $system->cleanvars((isset($_POST['TPL_prov'])) ? $_POST['TPL_prov'] : ''), 'str'),
    array(':country', $system->cleanvars((isset($_POST['TPL_country'])) ? $_POST['TPL_country'] : ''), 'str'),
    array(':zip', $system->cleanvars((isset($_POST['TPL_zip'])) ? $_POST['TPL_zip'] : ''), 'str'),
    array(':phone', $system->cleanvars((isset($_POST['TPL_phone'])) ? $_POST['TPL_phone'] : ''), 'str'),
    array(':nletter', $_POST['TPL_nletter'], 'int'),
    array(':email', $system->cleanvars($_POST['TPL_email']), 'str'),
    array(':reg_date', time(), 'int'),
    array(':birthdate', ((!empty($DATE)) ? $DATE : 0), 'str'),
    array(':suspended', $SUSPENDED, 'int'),
    array(':language', $language, 'str'),
    array(':groups', implode(',', $groups), 'str'),
    array(':balance', $balance, 'float'),
    array(':timezone', $_POST['TPL_timezone'], 'str'),
    );
    $db->query($query, $params);
    $TPL_id_hidden = $db->lastInsertId();
    $query = "INSERT INTO " . $DBPrefix . "usersips VALUES
    (NULL, :id_hidden, :remote_addr, 'first', 'accept')";
    $params = array();
    $params[] = array(':id_hidden', $TPL_id_hidden, 'int');
    $params[] = array(':remote_addr', $_SERVER['REMOTE_ADDR'], 'str');
    $db->query($query, $params);
    foreach ($gateway_data as $gateway)
    {
    if (isset($_POST[$gateway['name']]['address']) && empty($_POST[$gateway['name']]['address']))
    {
    $query = "INSERT INTO " . $DBPrefix . "usergateways (gateway_id, user_id, address, password) VALUES :)gateway_id, :user_id, :address, :password)";
    $params = array(
    array(':user_id', $TPL_id_hidden, 'int'),
    array(':gateway_id', $gateway['id'], 'int'),
    array(':address', ((isset($_POST[$gateway['name']]['address'])) ? $system->cleanvars($_POST[$gateway['name']]['address']) : ''), 'str'),
    array(':password', ((isset($_POST[$gateway['name']]['password'])) ? $system->cleanvars($_POST[$gateway['name']]['password']) : ''), 'str'),
    );
    }
    }

    $_SESSION['language'] = $language;
    $first = false;

    if (defined('TrackUserIPs'))
    {
    // log registration IP
    $system->log('user', 'Registered User', $TPL_id_hidden);
    }

    // send emails
    if ($system->SETTINGS['activationtype'] == 0)
    {
    include INCLUDE_PATH . 'email/user_needapproval.php';
    $TPL_message = $MSG['016_a'];
    }
    elseif ($system->SETTINGS['activationtype'] == 1)
    {
    include INCLUDE_PATH . 'email/user_confirmation.php';
    $TPL_message = sprintf($MSG['016'], $TPL_email_hidden, $system->SETTINGS['sitename']);
    }
    else
    {
    $USER = array('name' => $TPL_name_hidden, 'email' => $_POST['TPL_email']);
    include INCLUDE_PATH . 'email/user_approved.php';
    $TPL_message = $MSG['016_b'];
    }

    if ($system->SETTINGS['fee_type'] == 2 && $signup_fee > 0)
    {
    $_SESSION['signup_id'] = $TPL_id_hidden;
    header('location: pay.php?a=3');
    exit;
    }

    $template->assign_vars(array(
    'L_HEADER' => sprintf($MSG['859'], $TPL_name_hidden),
    'L_MESSAGE' => $TPL_message
    ));
    }
    }
    }
    }

    $query = "SELECT value FROM " . $DBPrefix . "fees WHERE type = 'signup_fee'";
    $db->direct_query($query);
    $signup_fee = $db->result('value');

    $country_dropdown = '';

    $selcountry = isset($_POST['TPL_country']) ? $_POST['TPL_country'] : '';

    $query = "SELECT country_id, country FROM " . $DBPrefix . "countries";
    $db->direct_query($query);
    $countries = $db->fetchall();

    foreach($countries as $country)
    {
    $country_dropdown .= '<option value="' . $country['country'] . '"';
    if ($country['country'] == $selcountry)
    {
    $country_dropdown .= ' selected';
    }
    elseif ($system->SETTINGS['defaultcountry'] == $country['country'])
    {
    $country_dropdown .= ' selected';
    }
    $country_dropdown .= '>' . $country['country'] . '</option>' . "\n";
    }

    $dobclass = ($missing['birthday']) ? ' class="missing"' : '';
    $dobmonth = '<select name="TPL_month"' . $dobclass . '>
    <option value="00"></option>
    <option value="01"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '01') ? ' selected' : '') . '>' . $MSG['MON_001E'] . '</option>
    <option value="02"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '02') ? ' selected' : '') . '>' . $MSG['MON_002E'] . '</option>
    <option value="03"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '03') ? ' selected' : '') . '>' . $MSG['MON_003E'] . '</option>
    <option value="04"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '04') ? ' selected' : '') . '>' . $MSG['MON_004E'] . '</option>
    <option value="05"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '05') ? ' selected' : '') . '>' . $MSG['MON_005E'] . '</option>
    <option value="06"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '06') ? ' selected' : '') . '>' . $MSG['MON_006E'] . '</option>
    <option value="07"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '07') ? ' selected' : '') . '>' . $MSG['MON_007E'] . '</option>
    <option value="08"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '08') ? ' selected' : '') . '>' . $MSG['MON_008E'] . '</option>
    <option value="09"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '09') ? ' selected' : '') . '>' . $MSG['MON_009E'] . '</option>
    <option value="10"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '10') ? ' selected' : '') . '>' . $MSG['MON_010E'] . '</option>
    <option value="11"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '11') ? ' selected' : '') . '>' . $MSG['MON_011E'] . '</option>
    <option value="12"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '12') ? ' selected' : '') . '>' . $MSG['MON_012E'] . '</option>
    </select>';
    $dobday = '<select name="TPL_day"' . $dobclass . '>
    <option value=""></option>';
    for ($i = 1; $i <= 31; $i++)
    {
    $j = (strlen($i) == 1) ? '0' . $i : $i;
    $dobday .= '<option value="' . $j . '"' . ((isset($_POST['TPL_day']) && $_POST['TPL_day'] == $j) ? ' selected' : '') . '>' . $j . '</option>';
    }
    $dobday .= '</select>';

    $selectsetting = (isset($_POST['TPL_timezone'])) ? $_POST['TPL_timezone'] : $system->SETTINGS['timezone'];
    $time_correction = generateSelect('TPL_timezone', $timezones, $selectsetting);

    foreach ($gateway_data as $gateway)
    {
    if ($gateway['gateway_active'])
    {
    $template->assign_block_vars('gateways', array(
    'GATEWAY_ID' => $gateway['id'],
    'NAME' => $gateway['displayname'],
    'PLAIN_NAME' => $gateway['name'],
    'MISSING' => ($missing[$gateway['name']]) ? 1 : 0,
    'REQUIRED' => ($gateway['gateway_required'] == 1) ? 'checked' : '',
    'ADDRESS' => isset($_POST[$gateway['name']]['address']) ? $_POST[$gateway['name']]['address'] : '',
    'PASSWORD' => isset($_POST[$gateway['name']]['password']) ? $_POST[$gateway['name']]['password'] : '',
    'ADDRESS_NAME' => isset($address_string[$gateway['name']]) ? $address_string[$gateway['name']] : $gateway['name'],
    'PASSWORD_NAME' => isset($password_string[$gateway['name']]) ? $password_string[$gateway['name']] : '',
    'ERROR_STRING' => $error_string[$gateway['name']],

    'B_PASSWORD' => isset($password_string[$gateway['name']])
    ));
    }
    }

    $template->assign_vars(array(
    'ERROR' => (isset($ERR)) ? $ERR : '',
    'L_COUNTRIES' => $country_dropdown,
    'L_DATEFORMAT' => ($system->SETTINGS['datesformat'] == 'USA') ? $dobmonth . ' ' . $dobday : $dobday . ' ' . $dobmonth,
    'TIMEZONE' => $time_correction,
    'TERMSTEXT' => $system->SETTINGS['termstext'],

    'B_ADMINAPROVE' => ($system->SETTINGS['activationtype'] == 0),
    'B_NLETTER' => ($system->SETTINGS['newsletter'] == 1),
    'B_FIRST' => $first,
    'B_FEES' => ($signup_fee > 0),

    'CAPTCHATYPE' => $system->SETTINGS['spam_register'],
    'CAPCHA' => ($system->SETTINGS['spam_register'] == 2) ? recaptcha_get_html($system->SETTINGS['recaptcha_public']) : $spam_html,
    'BIRTHDATE' => ($DISPLAYED_FIELDS['birthdate_regshow'] == 'y'),
    'ADDRESS' => ($DISPLAYED_FIELDS['address_regshow'] == 'y'),
    'CITY' => ($DISPLAYED_FIELDS['city_regshow'] == 'y'),
    'PROV' => ($DISPLAYED_FIELDS['prov_regshow'] == 'y'),
    'COUNTRY' => ($DISPLAYED_FIELDS['country_regshow'] == 'y'),
    'ZIP' => ($DISPLAYED_FIELDS['zip_regshow'] == 'y'),
    'TEL' => ($DISPLAYED_FIELDS['tel_regshow'] == 'y'),
    'REQUIRED' => array(
    ($MANDATORY_FIELDS['birthdate'] == 'y') ? ' *' : '',
    ($MANDATORY_FIELDS['address'] == 'y') ? ' *' : '',
    ($MANDATORY_FIELDS['city'] == 'y') ? ' *' : '',
    ($MANDATORY_FIELDS['prov'] == 'y') ? ' *' : '',
    ($MANDATORY_FIELDS['country'] == 'y') ? ' *' : '',
    ($MANDATORY_FIELDS['zip'] == 'y') ? ' *' : '',
    ($MANDATORY_FIELDS['tel'] == 'y') ? ' *' : ''
    ),
    'MISSING0' => ($missing['name']) ? 1 : 0,
    'MISSING1' => ($missing['nick']) ? 1 : 0,
    'MISSING2' => ($missing['password']) ? 1 : 0,
    'MISSING3' => ($missing['repeat_password']) ? 1 : 0,
    'MISSING4' => ($missing['email']) ? 1 : 0,
    'MISSING5' => ($missing['birthday']) ? 1 : 0,
    'MISSING6' => ($missing['address']) ? 1 : 0,
    'MISSING7' => ($missing['city']) ? 1 : 0,
    'MISSING8' => ($missing['prov']) ? 1 : 0,
    'MISSING9' => ($missing['country']) ? 1 : 0,
    'MISSING10' => ($missing['zip']) ? 1 : 0,
    'MISSING11' => ($missing['tel']) ? 1 : 0,
    'FEES'=> $system->print_money($signup_fee),
    'REGONOFF' => ($system->SETTINGS['RegOnOff'] == 'y'),

    'V_YNEWSL' => ((isset($_POST['TPL_nletter']) && $_POST['TPL_nletter'] == 1) || !isset($_POST['TPL_nletter'])) ? 'checked=true' : '',
    'V_NNEWSL' => (isset($_POST['TPL_nletter']) && $_POST['TPL_nletter'] == 2) ? 'checked=true' : '',
    'V_YNAME' => (isset($_POST['TPL_name'])) ? $_POST['TPL_name'] : '',
    'V_UNAME' => (isset($_POST['TPL_nick'])) ? $_POST['TPL_nick'] : '',
    'V_EMAIL' => (isset($_POST['TPL_email'])) ? $_POST['TPL_email'] : '',
    'V_YEAR' => (isset($_POST['TPL_year'])) ? $_POST['TPL_year'] : '',
    'V_ADDRE' => (isset($_POST['TPL_address'])) ? $_POST['TPL_address'] : '',
    'V_CITY' => (isset($_POST['TPL_city'])) ? $_POST['TPL_city'] : '',
    'V_PROV' => (isset($_POST['TPL_prov'])) ? $_POST['TPL_prov'] : '',
    'V_POSTCODE' => (isset($_POST['TPL_zip'])) ? $_POST['TPL_zip'] : '',
    'V_PHONE' => (isset($_POST['TPL_phone'])) ? $_POST['TPL_phone'] : ''
    ));

    include 'header.php';
    $template->set_filenames(array(
    'body' => 'register.tpl'
    ));
    $template->display('body');
    include 'footer.php';
     
  8. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    See. You have an error in lines 34, 38,39.
    34 - this is my string, 38,39 - standard string.
    It means you have an error in your file messages.inc.php. Attach it completely your messages.inc.php in zip format.
     
  9. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
  10. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    save your file and replace mine.
     

    Attached Files:

  11. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    sorry... remove the zip... it is not archive...
     
  12. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    I have solved 38 and 39 line
     
  13. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    and not solved line 34?
     
  14. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    I dont get error for line 34.
    But i still see this in register.php

    { L_HEADER }
    { L_MESSAGE }

    In the meantime here are some tips to get you started with Ebuvljak.

    • Have photos ready when listing an item to sell, reduce the filesize to save time when uploading.
    • Featured auctions are much more likely to sell, your auction will be randomly featured on the Ebuvljak Home page.
     
  15. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    Can you delete my website link from this post, i didnt know that i can upload zip file
     
  16. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    I have no rights of a moderator/administrator. I can't delete, edit and perform other actions with messages to the user.
     
  17. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    No problem, this plugin works ok, just doesnt show notification.
    You have integrated payment plugins ?
     
  18. Shaman

    Shaman Active Member

    Joined:
    Feb 8, 2016
    Messages:
    166
    Likes Received:
    33
    The thing is that I tested the plugin on 3 sites. And I wonder why you have it is not working. I see that you have a lot of mistakes in the translation file. Perhaps this is due to him.

    Plugins payment systems, this script does not exist! This is due to the fact that the processing of the payment systems in 1 file. It is well to understand API for the connection of new payment system. There is a procedure to connect payment systems. See here
    If you understand Russian, that is an example of a connection in Russian language
     
    Last edited: Nov 20, 2016
  19. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    I will try to see all files that i edited and try again from beggining.

    Yes i understand Russian a litle that i tought in school, it is similar to Serbial Cirylic.
    I want to create plugin with Fortumo Payment, i have it for my osclass site.
    Your tutorial is verry good written, but i dont know how to integrate fortumo API.
    My other colleague creates new responsive template for webid.
    I hope somebody will help me to do this.
     
  20. Srdjan Sajin

    Srdjan Sajin Member

    Joined:
    Jun 22, 2015
    Messages:
    53
    Likes Received:
    1
    Is this is how need to be in register.tpl

    <div class="row">
    <div class="col-md-12">
    <!-- IF REGONOFF --><!-- IF B_FIRST -->
    <!-- IF ERROR ne '' -->
    <div class="alert alert-danger">
    {ERROR}
    </div>
    <!-- ENDIF -->
    <!-- ELSE -->
    <div class="alert alert-danger">
    {L_RegOff}
    </div>
    <!-- ENDIF -->
    <form name="registration" action="{SITEURL}register.php" method="post">
    <div class="col-md-7 well">
    <legend>{L_001}</legend>
    <input type="hidden" name="csrftoken" value="{_CSRFTOKEN}">
    <div class="form-group col-lg-6 <!-- IF MISSING0 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_name">{L_002} *</label>
    <input type="text" class="form-control" name="TPL_name" <!-- IF MISSING0 eq 1 -->id="inputError1"<!-- ENDIF --> value="{V_YNAME}" autofocus>
    <!-- IF MISSING0 eq 1 --><div class="error-box missing">{L_937}</div><!-- ENDIF -->
    </div>
    <div class="form-group col-lg-6 <!-- IF MISSING1 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_nick">{L_003} *</label>
    <input type="text" name="TPL_nick" class="form-control" value="{V_UNAME}" <!-- IF MISSING1 eq 1 -->id="inputError1"<!-- ENDIF --> placeholder="{L_050}">
    <!-- IF MISSING1 eq 1 --><div class="error-box missing">{L_938}</div><!-- ENDIF -->
    </div>
    <div class="col-lg-12"></div>
    <div class="form-group col-lg-6 <!-- IF MISSING2 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_password">{L_004} *</label>
    <input type="password" name="TPL_password" class="form-control" <!-- IF MISSING2 eq 1 -->id="inputError1"<!-- ENDIF --> placeholder="{L_050}">
    <!-- IF MISSING2 eq 1 --><div class="error-box missing">{L_939}</div><!-- ENDIF -->
    </div>
    <div class="form-group col-lg-6 <!-- IF MISSING3 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_repeat_password">{L_005} *</label>
    <input type="password" name="TPL_repeat_password" class="form-control" <!-- IF MISSING3 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF MISSING3 eq 1 --><div class="error-box missing">{L_940}</div><!-- ENDIF -->
    </div>
    <div class="col-lg-12"></div>
    <div class="form-group col-lg-12 <!-- IF MISSING4 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_email">{L_006} *</label>
    <input type="email" name="TPL_email" class="form-control" value="{V_EMAIL}" <!-- IF MISSING4 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF MISSING4 eq 1 --><div class="error-box missing">{L_941}</div><!-- ENDIF -->
    </div>
    <!-- IF BIRTHDATE -->
    <div class="form-group col-lg-12 <!-- IF MISSING5 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_year">{L_252}{REQUIRED(0)}</label>
    <fieldset class="row">
    <div class="register-date col-md-8">{L_DATEFORMAT}</div> <div class="register-date col-md-4"><input type="text" name="TPL_year" class="form-control" value="{V_YEAR}" <!-- IF MISSING5 eq 1 -->id="inputError1"<!-- ENDIF -->></div>
    </fieldset>
    <!-- IF MISSING5 eq 1 --><div class="error-box missing">{L_948}</div><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    <div class="col-lg-12"></div>
    <!-- IF ADDRESS -->
    <div class="form-group col-lg-6 <!-- IF MISSING6 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_address">{L_009}{REQUIRED(1)}</label>
    <input type="text" name="TPL_address" class="form-control" value="{V_ADDRE}" <!-- IF MISSING6 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF MISSING6 eq 1 --><div class="error-box missing">{L_942}</div><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    <!-- IF CITY -->
    <div class="form-group col-lg-6 <!-- IF MISSING7 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_city">{L_010}{REQUIRED(2)}</label>
    <input type="text" name="TPL_city" class="form-control" value="{V_CITY}" <!-- IF MISSING7 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF MISSING7 eq 1 --><div class="error-box missing">{L_943}</div><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    <div class="col-lg-12"></div>

    <!-- IF PROV -->
    <div class="form-group col-lg-6 <!-- IF MISSING8 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_prov">{L_011}{REQUIRED(3)}</label>
    <input type="text" name="TPL_prov" class="form-control" value="{V_PROV}" <!-- IF MISSING8 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF MISSING8 eq 1 --><div class="error-box missing">{L_944}</div><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    <!-- IF COUNTRY -->
    <div class="form-group col-lg-6 <!-- IF MISSING9 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_country">{L_014}{REQUIRED(4)}</label>
    <select name="TPL_country" class="form-control" <!-- IF MISSING9 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <option value="">{L_251}</option>
    {L_COUNTRIES}
    </select>
    <!-- IF MISSING9 eq 1 --><div class="error-box missing">{L_945}</div><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    <div class="col-lg-12"></div>
    <!-- IF ZIP -->
    <div class="form-group col-lg-6 <!-- IF MISSING10 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_zip">{L_012}{REQUIRED(5)}</label>
    <input type="text" name="TPL_zip" class="form-control" value="{V_POSTCODE}" <!-- IF MISSING10 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF MISSING10 eq 1 --><div class="error-box missing">{L_946}</div><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    <!-- IF TEL -->
    <div class="form-group col-lg-6 <!-- IF MISSING11 eq 1 -->has-error<!-- ENDIF -->">
    <label for="TPL_phone">{L_013}{REQUIRED(6)}</label>
    <input type="text" name="TPL_phone" class="form-control" value="{V_PHONE}" <!-- IF MISSING11 eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF MISSING11 eq 1 --><div class="error-box missing">{L_947}</div><!-- ENDIF -->
    </div>
    <!-- ENDIF -->
    <div class="col-lg-12"></div>
    <div class="form-group col-lg-12">
    <label>{L_346}</label>
    <div class="timezone">
    {TIMEZONE}
    </div>
    </div>
    <!-- IF B_NLETTER -->
    <div class="form-group col-lg-12">
    <div class="alert alert-info" role="alert">
    <label>{L_608}</label>
    <label class="checkbox-inline"><input type="radio" name="TPL_nletter" value="1" {V_YNEWSL}>{L_030}</label>
    <label class="checkbox-inline"><input type="radio" name="TPL_nletter" value="2" {V_NNEWSL}>{L_029}</label>
    </div>
    </div>
    <!-- ENDIF -->
    </div>
    <div class="col-md-4 col-md-offset-1 well">
    <legend>{L_719}</legend>

    <!-- BEGIN gateways -->
    <div class="form-group <!-- IF gateways.MISSING eq 1 -->has-error<!-- ENDIF --> col-lg-12">
    <label for="TPL_pp_email">{gateways.ADDRESS_NAME}{gateways.REQUIRED}</label>
    <input type="hidden" name="{gateways.PLAIN_NAME}[id]" value="{gateways.GATEWAY_ID}">
    <input type="text" name="{gateways.PLAIN_NAME}[address]" class="form-control" value="{gateways.ADDRESS}" <!-- IF gateways.MISSING eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- IF gateways.MISSING eq 1 --><div class="error-box missing">{gateways.ERROR_STRING}</div><!-- ENDIF -->
    <!-- IF gateways.B_PASSWORD -->
    <label for="TPL_authnet_pass">{gateways.PASSWORD_NAME}{gateways.REQUIRED}</label>
    <input type="text" name="{gateways.PLAIN_NAME}[password]" class="form-control" value="{gateways.PASS}" <!-- IF gateways.MISSING eq 1 -->id="inputError1"<!-- ENDIF -->>
    <!-- ELSE -->
    <input type="hidden" name="{gateways.PLAIN_NAME}[password]" value="">
    <!-- ENDIF -->
    </div>
    <!-- END gateways -->
    <div class="form-group col-lg-12">
    <div class="capchabox">{CAPCHA}</div>
    </div>
    <div class="form-group col-lg-12">
    <div class="checkbox">
    <label>
    <input type="checkbox" name="terms_check" id="terms_check"> {L_858}
    </label>
    </div>
    <br><br>
    <div class="text-center">
    <input type="hidden" name="action" value="first">
    <input type="submit" name="" value="{L_235}" class="btn btn-primary">
    <input type="reset" name="" value="{L_035}" class="btn btn-default">
    </div>
    </div>
    </div>
    </form>
    <!-- ELSE -->
    <div class="well">
    <h2>{L_HEADER}</h2>
    <p>{L_MESSAGE}</p>
    <p>{L_860}</p>
    </div>
    <!-- ENDIF -->
    </div>
    </div>
     

Share This Page