コード例 #1
0
function custom_registration_function()
{
    global $wpdb, $eventtable, $usertable;
    //To get information about current logged in user
    $current_user = wp_get_current_user();
    $cuser = $current_user->user_login;
    $cuid = $current_user->ID;
    if (isset($_POST['submit'])) {
        global $title, $sdate, $stime, $tdate, $repeat, $recur, $venue, $users, $desc, $status;
        $title = $_POST['event_title'];
        $sdate = $_POST['start_date'];
        $tdate = $_POST['to_date'];
        $stime = $_POST['start_time'];
        $ttime = $_POST['to_time'];
        $repeat = $_POST['event_repeats'];
        $recur = $_POST['event_recur'];
        $venue = $_POST['venue'];
        $users = $_POST['traditional'];
        $desc = $_POST['desc'];
        $status = 0;
        //Start and end time converted in 24 hour formate
        $estime = date("H:i", strtotime($stime));
        $ettime = date("H:i", strtotime($ttime));
        //For calling registration_validation function
        registration_validation($title, $sdate, $stime, $tdate, $ttime, $repeat, $recur, $venue, $users, $desc);
        //After completing validation complete_registration is used to call another function to insert data in database if there is no error
        complete_registration($title, $sdate, $tdate, $stime, $ttime, $repeat, $recur, $venue, $users, $desc, $status);
    }
    registration_form($eve_title, $eve_sdate, $eve_tdate, $eve_stime, $eve_ttime, $repeat, $recur, $eve_venue, $eve_users, $desc);
}
コード例 #2
0
ファイル: center.php プロジェクト: ITw3/redaxscript
/**
 * routing
 *
 * @since 1.2.1
 * @deprecated 2.0.0
 *
 * @package Redaxscript
 * @category Center
 * @author Henry Ruhs
 */
function routing()
{
    /* check token */
    if ($_POST && $_POST['token'] != TOKEN) {
        notification(l('error_occurred'), l('token_incorrect'), l('home'), ROOT);
        return;
    }
    /* call default post */
    $post_list = array('comment', 'login', 'password_reset', 'registration', 'reminder', 'search');
    foreach ($post_list as $value) {
        if ($_POST[$value . '_post'] && function_exists($value . '_post')) {
            call_user_func($value . '_post');
            return;
        }
    }
    /* general routing */
    switch (FIRST_PARAMETER) {
        case 'admin':
            if (LOGGED_IN == TOKEN) {
                admin_routing();
            } else {
                notification(l('error_occurred'), l('access_no'), l('login'), 'login');
            }
            return;
        case 'login':
            login_form();
            return;
        case 'logout':
            if (LOGGED_IN == TOKEN) {
                logout();
            } else {
                notification(l('error_occurred'), l('access_no'), l('login'), 'login');
            }
            return;
        case 'password_reset':
            if (s('reminder') == 1 && FIRST_SUB_PARAMETER && THIRD_PARAMETER) {
                password_reset_form();
            } else {
                notification(l('error_occurred'), l('access_no'), l('home'), ROOT);
            }
            return;
        case 'registration':
            if (s('registration')) {
                registration_form();
            } else {
                notification(l('error_occurred'), l('access_no'), l('home'), ROOT);
            }
            return;
        case 'reminder':
            if (s('reminder') == 1) {
                reminder_form();
            } else {
                notification(l('error_occurred'), l('access_no'), l('home'), ROOT);
            }
            return;
        default:
            contents();
            return;
    }
}
コード例 #3
0
function custom_registration_function()
{
    registration_form($email);
    if (isset($_POST['submit'])) {
        registration_validation($_POST['email']);
        // sanitize user form input
        global $email;
        $email = sanitize_email($_POST['email']);
        // call @function complete_registration to create the user
        // only when no WP_error is found
        complete_registration($email);
    }
}
コード例 #4
0
ファイル: form-reg.php プロジェクト: Vasiliy28/MyJewelry
function custom_registration_function()
{
    if (isset($_POST['submit'])) {
        registration_validation($_POST['username'], $_POST['password'], $_POST['email']);
        // sanitize user form input
        global $username, $password, $email;
        $username = sanitize_user($_POST['username']);
        $password = esc_attr($_POST['password']);
        $email = sanitize_email($_POST['email']);
        // call @function complete_registration to create the user
        // only when no WP_error is found
        complete_registration($username, $password, $email);
    }
    registration_form($username, $password, $email);
}
コード例 #5
0
function custom_user_registration_function()
{
    global $display_form;
    $display_form = TRUE;
    if (isset($_POST['submit'])) {
        registration_validation($_POST['email']);
        // sanitize user form input
        global $password, $cpassword, $email;
        $username = sanitize_user($_POST['email']);
        $email = sanitize_email($_POST['email']);
        // call @function complete_registration to create the user
        // only when no WP_error is found
        complete_registration($username, $email);
    }
    registration_form($email, $display_form);
}
コード例 #6
0
function custom_registration_function()
{
    if (isset($_POST['submit'])) {
        registration_validation($_POST['username'], $_POST['password'], $_POST['email'], $_POST['address_1'], $_POST['fname'], $_POST['lname'], $_POST['city']);
        // sanitize user form input
        global $username, $password, $email, $address, $first_name, $last_name, $city;
        $username = sanitize_user($_POST['username']);
        $password = esc_attr($_POST['password']);
        $email = sanitize_email($_POST['email']);
        $address = esc_url($_POST['address_1']);
        $first_name = sanitize_text_field($_POST['fname']);
        $last_name = sanitize_text_field($_POST['lname']);
        $city = sanitize_text_field($_POST['city']);
        // call @function complete_registration to create the user
        // only when no WP_error is found
        complete_registration($username, $password, $email, $address, $first_name, $last_name, $city);
    }
    registration_form($username, $password, $email, $address, $first_name, $last_name, $city);
}
コード例 #7
0
ファイル: custom-registration.php プロジェクト: artre/study
function custom_registration_function()
{
    if (isset($_POST['submit'])) {
        registration_validation($_POST['username'], $_POST['password'], $_POST['email'], $_POST['website'], $_POST['fname'], $_POST['lname'], $_POST['nickname'], $_POST['bio']);
        // sanitize user form input
        global $username, $password, $email, $website, $first_name, $last_name, $nickname, $bio;
        $username = sanitize_user($_POST['username']);
        $password = esc_attr($_POST['password']);
        $email = sanitize_email($_POST['email']);
        $website = esc_url($_POST['website']);
        $first_name = sanitize_text_field($_POST['fname']);
        $last_name = sanitize_text_field($_POST['lname']);
        $nickname = sanitize_text_field($_POST['nickname']);
        $bio = esc_textarea($_POST['bio']);
        // call @function complete_registration to create the user
        // only when no WP_error is found
        complete_registration($username, $password, $email, $website, $first_name, $last_name, $nickname, $bio);
    }
    registration_form($username, $password, $email, $website, $first_name, $last_name, $nickname, $bio);
}
コード例 #8
0
ファイル: functions.php プロジェクト: emiisor/diffhelper
function custom_registration_function()
{
    if (isset($_POST['submit'])) {
        registration_validation($_POST['username'], $_POST['password'], $_POST['email'], $_POST['fname'], $_POST['lname'], $_POST['bio']);
        global $username, $password, $email, $first_name, $last_name, $bio;
        $username = sanitize_user($_POST['username']);
        $password = esc_attr($_POST['password']);
        $email = sanitize_email($_POST['email']);
        $first_name = sanitize_text_field($_POST['fname']);
        $last_name = sanitize_text_field($_POST['lname']);
        $bio = esc_textarea($_POST['bio']);
        complete_registration($username, $password, $email, $first_name, $last_name, $bio);
    }
    registration_form($username, $password, $email, $first_name, $last_name, $bio);
}
コード例 #9
0
ファイル: new_account.php プロジェクト: jeremy-cayrasso/dtc
                                $vat_rate = $company_invoicing["vat_rate"];
                            }
                        }
                        $payid = createCreditCardPaiementID($product["price_dollar"] + $product["setup_fee"], $reguser["id"], $product["name"] . " (login: "******"reqadm_login"] . ")", "yes", $product["id"], $vat_rate);
                        $q = "UPDATE {$pro_mysql_new_admin_table} SET paiement_id='{$payid}' WHERE id='" . $reguser["id"] . "';";
                        $r = mysql_query($q) or die("Cannot query \"{$q}\" ! line: " . __LINE__ . " file: " . __FILE__ . " sql said: " . mysql_error());
                        $return_url = $_SERVER["PHP_SELF"] . "?action=return_from_pay&regid={$payid}";
                        $paybutton = paynowButton($payid, $product["price_dollar"] + $product["setup_fee"], $product["name"] . " (login: "******"reqadm_login"] . ")", $return_url, $vat_rate, $secpayconf_use_paypal_recurring);
                    }
                    if ($print_form == "yes") {
                        $master_total = $product["price_dollar"] + $product["setup_fee"];
                        $form = $reguser["mesg"] . "<br><h4>" . _("Registration successful!") . "<!--Registration successfull!--></h4>\n<u>" . _("Product name:") . "</u> " . $product["name"] . "<br>\n<u>" . _("Product price:") . "</u> " . $product["price_dollar"] . " {$secpayconf_currency_letters}<br>\n<u>" . _("Setup fees:") . "</u> " . $product["setup_fee"] . " {$secpayconf_currency_letters}<br>\n<u>" . _("Product net price before VAT and payment gateway:") . "</u> " . $master_total . " {$secpayconf_currency_letters}<br><br><br>\n<b>" . _("Please now click on the following button to go for payment:") . "</b><br>\n<br>{$paybutton}";
                    }
                }
            }
        } else {
            if ($reguser["err"] == 1) {
                $form = registration_form();
            } else {
                $form = "<font color=\"red\">" . $reguser["mesg"] . "</font><br>" . registration_form();
            }
        }
        break;
}
$login_skined = skin($conf_skin, $form, _("Register a new account"));
$mypage = layout_login_and_languages($login_skined, $lang_sel);
if (function_exists("skin_NewAccountPage")) {
    skin_NewAccountPage($login_skined);
} else {
    echo anotherPage("Client:", "", "", makePreloads(), $anotherTopBanner, "", $mypage, anotherFooter(""));
}