Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    Modificare form contatti di una pagina PHP

    Ciao, ragazzi, ho un piccolo problema che mi sta facendo impazzire. magari riuscite a darmi una mano... Allora ho una pagina in PHP con un form per la registrazione al sito.

    io vorrei semplicemente modificare le opzioni di alcuni campi.

    Ad esempio:

    Scegli valuta:
    --euro
    --chf
    --usd
    --zac
    --ron

    io vorrei eliminare o aggiungere opzioni.

    guardando il codice sorgente riesco a vedere le varie opzioni che vorrei cancellare. ma il codice php ovviamente non le fa vedere. come posso risolvere ?

    Grazie

  2. #2
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,335
    Ci vuole il sorgente php.
    Ridatemi i miei 1000 posts persi !!!!
    Non serve a nulla ottimizzare qualcosa che non funziona.
    Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr

  3. #3
    <?php
    ini_set( 'display_errors', 0 ); if(isescorttheme !== 1) { die(); }


    global $current_user;
    get_currentuserinfo();


    if(current_user_can('level_10')) { $admin_registers_independent_escort = "yes"; }


    if ($_POST['escort_post_id']) {
    $escort_post_id = (int)$_POST['escort_post_id'];


    $escort_post = get_post($escort_post_id);
    $escort_post_author = $escort_post->post_author;


    if ($escort_post_author != $current_user->ID && !current_user_can('level_10')) {
    $err .= _d('You are not allowed to edit this profile',560)."<br />";
    }
    }


    if ($_POST['agencyid']) {
    $agencyid = (int)$_POST['agencyid'];
    }




    if(!$escort_post_id && !$agencyid) {
    $user = preg_replace("/([^a-zA-Z0-9])/", "", $_POST['user']);
    if ($user) {
    if (strlen($user) < 4 || strlen($user) > 30) { $err .= _d('Your username must be between 4 and 30 characters',498)."<br />"; } else {
    if (username_exists($user)) { $err .= _d('This username already exists. Please select another one',499)."<br />"; }
    }
    } else {
    $err .= _d('The username field is empty',500)."<br />";
    }




    $pass = $_POST['pass'];
    if ($pass) {
    if (strlen($pass) < 6 || strlen($pass) > 30) {
    $err .= _d('Your password must be between 6 and 30 characters',464)."<br />";
    } else {
    if ( false !== strpos( stripslashes($pass), "\\" ) ) {
    $err .= _d('Passwords may not contain the character "\"',785)."<br />";
    }
    }
    } else {
    $err .= _d('The password field is empty',466)."<br />";
    }
    }


    if (!$agencyid) {
    $youremail = $_POST['youremail'];
    if (!$youremail) { $err .= _d('Please write your email address',501)."<br />"; } else {
    if ( !is_email($youremail) ) { $err .= _d('Your email address seems to be wrong',561)."<br />"; }
    if ( email_exists($youremail) && $youremail != $current_user->user_email ) {
    $err .= _d('The email address has been used by someone else already',502)."<br />";
    if ($escort_post_id) {
    $youremail = $current_user->user_email;
    }
    }//if email_exists()
    }//if !$youremail
    }//if !$$agencyid


    $yourname = substr(stripslashes(wp_strip_all_tags($_POST['yourname'], true)), 0, 200);
    if (!$yourname) { $err .= _d('Please write your name',562)."<br />"; }




    $phone = substr(wp_strip_all_tags($_POST['phone'], true), 0, 50);
    if (!$phone && ismand('phone', 'no')) { $err .= _d('Please write your phone number',96)."<br />"; }




    $website = substr(esc_url($_POST['website']), 0 , 200);
    if ($website) {
    if ( !is_url($website) ) { $err .= _d('Your website url seems to be wrong',505)."<br />"; }
    } elseif (ismand('website', 'no')) {
    $err .= _d('Please enter website url for your profile',1014)."<br />";
    }




    if ($_POST['country'] && $_POST['country'] > 1) {
    $country = (int)$_POST['country'];
    if (!term_exists( $country, "escorts-from" )) {
    $err .= _d('The country you selected doesn\'t exist in our database',61)."<br />"; unset($country, $city);
    } else {
    if ($_POST['city']) {
    $city = substr(strip_tags($_POST['city']), 0, 70);
    $city_id = term_exists( $city, "escorts-from", $country );
    if (!$city_id) {
    $arg = array('description' => _d('Escorts from',790).' '.$city, 'parent' => $country);
    wp_insert_term($city, "escorts-from", $arg);
    $city_id = term_exists( $city, "escorts-from", $country );
    }
    $city_id = $city_id['term_id'];
    } else {
    $err .= _d('You need to select your city',506)."<br />"; unset($city);
    }//if post[city]
    }//if term exists country
    } else {
    $err .= _d('You need to select a country',102)."<br />"; unset($country);
    }


    if ($_POST['gender']) {
    $gender = (int)$_POST['gender'];
    if (!$gender_a[$gender]) { $err .= _d('Please choose your gender',103)."<br />"; unset($gender); }
    } else {
    $err .= _d('Please choose your gender',103)."<br />";
    }


    if ($_POST['dateday'] && $_POST['datemonth'] && $_POST['dateyear']) {
    $dateday = (int)$_POST['dateday'];
    if ($dateday < 1 || $dateday > 31) {
    $err .= _d('The day from you date of birth is wrong',564)."<br />"; unset($dateday);
    }


    $datemonth = (int)$_POST['datemonth'];
    if ($datemonth < 1 || $datemonth > 12) {
    $err .= _d('The month from you date of birth is wrong',565)."<br />"; unset($datemonth);
    }


    $dateyear = (int)$_POST['dateyear'];
    if (strlen($dateyear) != "4") {
    $err .= _d('The year from you date of birth is wrong',566)."<br />"; unset($dateyear);
    }


    $age = floor((time() - strtotime($birthday))/31556926);
    if($age < 18) {
    $err .= _d('You must be at least 18 years old to register on this site',792)."<br />"; unset($dateyear);
    }
    } else {
    $err .= _d('Please write your date of birth',567)."<br />";
    }


    if ($_POST['skincolor']) {
    $skincolor = (int)$_POST['skincolor'];
    if (!$skincolor_a[$skincolor]) { $err .= _d('Choose your skin color',568)."<br />"; unset($skincolor); }
    } elseif (ismand('skincolor', 'no')) {
    $err .= _d('Choose your skin color',568)."<br />";
    }


    if ($_POST['haircolor']) {
    $haircolor = (int)$_POST['haircolor'];
    if (!$haircolor_a[$haircolor]) { $err .= _d('Choose your hair color',569)."<br />"; unset($haircolor); }
    } elseif (ismand('haircolor', 'no')) {
    $err .= _d('Choose your hair color',569)."<br />";
    }


    if ($_POST['hairlength']) {
    $hairlength = (int)$_POST['hairlength'];
    if (!$hairlength_a[$hairlength]) { $err .= _d('Choose your hair lenght',570)."<br />"; unset($hairlength); }
    } elseif (ismand('hairlength', 'no')) {
    $err .= _d('Choose your hair lenght',570)."<br />";
    }


    if ($_POST['bustsize']) {
    $bustsize = (int)$_POST['bustsize'];
    if (!$bustsize_a[$bustsize]) { $err .= _d('Choose your bust size',571)."<br />"; unset($bustsize); }
    } else {
    if($gender == "1" && ismand('bustsize', 'no')) {
    $err .= _d('Choose your bust size',571)."<br />";
    }
    }


    if ($_POST['height']) {
    $height = (int)$_POST['height'];
    if (!$height_a[$height]) { $err .= _d('Choose your height',572)."<br />"; unset($height); }
    } elseif (ismand('height', 'no')) {
    $err .= _d('Choose your height',572)."<br />";
    }


    if ($_POST['build']) {
    $build = (int)$_POST['build'];
    if (!$build_a[$build]) { $err .= _d('Chose your built type',573)."<br />"; unset($build); }
    } elseif (ismand('build', 'no')) {
    $err .= _d('Chose your built type',573)."<br />";
    }


    if ($_POST['looks']) {
    $looks = (int)$_POST['looks'];
    if (!$looks_a[$looks]) { $err .= _d('Choose your looks',574)."<br />"; unset($looks); }
    } elseif (ismand('looks', 'no')) {
    $err .= _d('Choose your looks',574)."<br />";
    }


    if ($_POST['smoker']) {
    $smoker = (int)$_POST['smoker'];
    if ($smoker != $_POST['smoker'] || !$smoker_a[$smoker]) { $err .= _d('Are you a smoker or a non smoker?',789)."<br />"; unset($smoker); }
    } elseif (ismand('smoker', 'no')) {
    $err .= _d('Are you a smoker or a non smoker?',789)."<br />";
    }


    $availability = $_POST['availability'];
    if ($availability && is_array($availability)) {
    foreach ($availability as $i => $one) {
    $one = preg_replace("/([^0-9])/", "", $one);
    if ($one != "1" && $one != "2") { unset($availability[$i]); }
    }
    } elseif (ismand('availability', 'no')) {
    $err .= _d('Please choose your availability',575)."<br />";
    }


    $aboutyou = substr(stripslashes(wp_strip_all_tags($_POST['aboutyou'])), 0, 5000);
    if (!$aboutyou && ismand('aboutyou', 'no')) { $err .= _d('You must write something about you.',576)."<br />"; }


    $education = substr(stripslashes(wp_strip_all_tags($_POST['education'])), 0, 300);
    if(ismand('education', 'no')) { $err .= _d('Please write an education',1015)."<br />"; }


    $sports = substr(stripslashes(wp_strip_all_tags($_POST['sports'])), 0, 300);
    if(ismand('sports', 'no')) { $err .= _d('Please write what sports you like',1016)."<br />"; }


    $hobbies = substr(stripslashes(wp_strip_all_tags($_POST['hobbies'])), 0, 300);
    if(ismand('hobbies', 'no')) { $err .= _d('Please write what hobbies you have',1017)."<br />"; }


    $zodiacsign = substr(stripslashes(wp_strip_all_tags($_POST['zodiacsign'])), 0, 300);
    if(ismand('zodiacsign', 'no')) { $err .= _d('Please write your zodiac sign',1018)."<br />"; }


    $sexualorientation = substr(stripslashes(wp_strip_all_tags($_POST['sexualorientation'])), 0, 300);
    if(ismand('sexualorientation', 'no')) { $err .= _d('Please write your sexual orientation',1019)."<br />"; }


    $occupation = substr(stripslashes(wp_strip_all_tags($_POST['occupation'])), 0, 300);
    if(ismand('occupation', 'no')) { $err .= _d('Please write your occupation',1020)."<br />"; }


    $language1 = substr(stripslashes(wp_strip_all_tags($_POST['language1'])), 0, 300);
    if ($language1) {
    if ($_POST['language1level']) {
    $language1level = (int)$_POST['language1level'];
    if (!$languagelevel_a[$language1level]) { $err .= _d('Please choose a language level for',577)." $language1<br />"; unset($language1level); }
    } else {
    $err .= _d('Please choose a language level for',577)." $language1<br />";
    }
    } else {
    unset($language1level);
    }


    $language2 = substr(stripslashes(wp_strip_all_tags($_POST['language2'])), 0, 300);
    if ($language2) {
    if ($_POST['language2level']) {
    $language2level = (int)$_POST['language2level'];
    if (!$languagelevel_a[$language2level]) { $err .= _d('Please choose a language level for',577)." $language2<br />"; unset($language2level); }
    } else {
    $err .= _d('Please choose a language level for',577)." $language2<br />";
    }
    } else {
    unset($language2level);
    }


    $language3 = substr(stripslashes(wp_strip_all_tags($_POST['language3'])), 0, 300);
    if ($language3) {
    if ($_POST['language3level']) {
    $language3level = (int)$_POST['language3level'];
    if (!$languagelevel_a[$language3level]) { $err .= _d('Please choose a language level for',577)." $language3<br />"; unset($language3level); }
    } else {
    $err .= _d('Please choose a language level for',577)." $language3<br />";
    }
    } else {
    unset($language3level);
    }
    if (!$language1 && !$language2 && !$language3 && ismand('language', 'no')) {
    $err .= _d('Please choose at least one language and conversation level',578)."<br />";
    }


    $rate1h = substr((int)$_POST['rate1h'], 0, 50);
    if (!$rate1h || $rate1h == "0") { unset($rate1h); }
    $rate2h = substr((int)$_POST['rate2h'], 0, 50);
    if (!$rate2h || $rate2h == "0") { unset($rate2h); }
    $rate3h = substr((int)$_POST['rate3h'], 0, 50);
    if (!$rate3h || $rate3h == "0") { unset($rate3h); }
    $rate6h = substr((int)$_POST['rate6h'], 0, 50);
    if (!$rate6h || $rate6h == "0") { unset($rate6h); }
    $rate12h = substr((int)$_POST['rate12h'], 0, 50);
    if (!$rate12h || $rate12h == "0") { unset($rate12h); }
    $rate24h = substr((int)$_POST['rate24h'], 0, 50);
    if (!$rate24h || $rate24h == "0") { unset($rate24h); }
    if (!$rate1h && !$rate2h && !$rate3h && !$rate6h && !$rate12h && !$rate24h && ismand('rates', 'no')) {
    $err .= _d('Please choose at least one rate price',580)."<br />";
    }


    $currency = (int)$_POST['currency'];
    if (($rate1h || $rate2h || $rate3h || $rate6h || $rate12h || $rate24h) && !$currency_a[$currency]) {
    $err .= _d('Please choose a currency',579)."<br />"; unset($currency);
    }




    $services = $_POST['services'];
    if ($services && is_array($services)) {
    foreach ($services as $i => $service) {
    $service = preg_replace("/([^0-9])/", "", $service);
    if (!$service && $service != "0") { unset($services[$i]); }
    }
    sort($services);


    if ( count($services) == 0 ) {
    $err .= _d('You have to select at least one service',581)."<br />";
    } else {
    foreach($services as $i => $service) {
    if (!$services_a[$service]) { unset($services[$i]); }
    }
    if ( count($services) == 0 ) {
    $err .= _d('You have to select at least one service',581)."<br />";
    }
    }//if count == 0
    } elseif (ismand('services', 'no')) {
    $err .= _d('You have to select at least one service',581)."<br />";
    }//if $services


    $extraservices = substr(wp_strip_all_tags($_POST['extraservices']), 0, 300);
    if(ismand('extraservices', 'no')) { $err .= _d('Please write what other extra services you offer',1021)."<br />"; }


    //spam/emails field must be empty to continue
    $emails = $_POST['emails'];
    if ($emails != "") { $err = ".<br />"; }

  4. #4
    if ( $err == "" ) {
    if ($escort_post_id || $agencyid) {
    $new_user_id = $current_user->ID;
    if ($admin_adding_escort == "yes") {
    $new_user_id = $agencyid;
    }
    } else {
    $new_user_id = wp_create_user( $user, $pass, $youremail );
    if(!$admin_registers_independent_escort) {
    //set an email hash so the user needs to validate his email in order to use the site
    //if the escort is adde by an admin don't add a hash
    $emailhash = md5($new_user_id.$user.$youremail);
    update_user_meta( $new_user_id, "emailhash", $emailhash );
    }
    }


    if (!$agencyid) {
    wp_update_user( array ('ID' => $new_user_id, 'nickname' => $yourname, 'display_name' => $yourname, 'user_url' => $website) );
    }


    if (!$escort_post_id && !$agencyid) {
    //adding the id in the database and the type of user it is, escort or agency, so we can check later what privileges they have
    add_option("escortid".$new_user_id, "escort", '', 'no');
    }




    if ($escort_post_id) {
    // Update post
    $post_escort = array(
    'ID' => $escort_post_id,
    'post_title' => $yourname,
    'post_content' => $aboutyou,
    'post_name' => $yourname
    );
    //update the post
    wp_update_post( $post_escort );
    $post_escort_id = $escort_post_id;
    } else {
    //since all the independent escorts need to validate their email we start with the draft status
    $post_status = "draft";
    if($agencyid) {
    //agencies don't need to validate anything when adding escorts so we change the status to publish
    $post_status = "publish";
    if(get_option("manactivagescprof") == "1") {
    //if the admin want's to manually activate escorts added by agencies we change the status to private
    $post_status = "private";
    }
    if(get_option("agescortregprice")) {
    //if there is a price for the adding of escorts by agencies then we change the status to private
    $post_status = "private";
    }
    }
    if(current_user_can('level_10')) {
    //if it's an admin adding the escort then we publish the escort
    $post_status = "publish";
    }
    // Create post object
    $post_escort = array(
    'post_title' => $yourname,
    'post_content' => $aboutyou,
    'post_name' => $yourname,
    'post_status' => $post_status,
    'post_author' => $new_user_id,
    'post_type' => 'escort',
    'ping_status' => 'closed'
    );
    // Insert the post into the database
    $post_escort_id = wp_insert_post( $post_escort );
    update_post_meta($post_escort_id, "ip", getenv('REMOTE_ADDR'));
    update_post_meta($post_escort_id, "hostname", gethostbyaddr($_SERVER['REMOTE_ADDR']));


    if(!current_user_can('level_10')) {
    if($agencyid) {
    if(get_option("manactivagescprof") == "1") {
    update_post_meta($post_escort_id, "notactive", "1"); //requires admin activation
    }
    if(get_option("agescortregprice")) {
    update_post_meta($post_escort_id, "needs_payment", "1");//requires payment
    }
    } else {
    if(get_option("manactivindescprof") == "1") {
    update_post_meta($post_escort_id, "notactive", "1"); //requires admin activation
    }
    if(get_option("indescregprice")) {
    update_post_meta($post_escort_id, "needs_payment", "1");//requires payment
    }
    }
    }//if not admin
    }
    wp_set_post_terms($post_escort_id, $city_id, 'escorts-from');
    update_post_meta($post_escort_id, "phone", $phone);
    update_post_meta($post_escort_id, "website", $website);
    update_post_meta($post_escort_id, "country", $country);
    update_post_meta($post_escort_id, "city", $city_id);
    update_post_meta($post_escort_id, "gender", $gender);
    update_post_meta($post_escort_id, "birthday", "$dateyear-$datemonth-$dateday");
    update_post_meta($post_escort_id, "skincolor", $skincolor);
    update_post_meta($post_escort_id, "haircolor", $haircolor);
    update_post_meta($post_escort_id, "hairlength", $hairlength);
    update_post_meta($post_escort_id, "bustsize", $bustsize);
    update_post_meta($post_escort_id, "height", $height);
    update_post_meta($post_escort_id, "build", $build);
    update_post_meta($post_escort_id, "looks", $looks);
    update_post_meta($post_escort_id, "smoker", $smoker);
    update_post_meta($post_escort_id, "availability", $availability);
    update_post_meta($post_escort_id, "education", $education);
    update_post_meta($post_escort_id, "sports", $sports);
    update_post_meta($post_escort_id, "hobbies", $hobbies);
    update_post_meta($post_escort_id, "zodiacsign", $zodiacsign);
    update_post_meta($post_escort_id, "sexualorientation", $sexualorientation);
    update_post_meta($post_escort_id, "occupation", $occupation);
    update_post_meta($post_escort_id, "language1", $language1);
    update_post_meta($post_escort_id, "language1level", $language1level);
    update_post_meta($post_escort_id, "language2", $language2);
    update_post_meta($post_escort_id, "language2level", $language2level);
    update_post_meta($post_escort_id, "language3", $language3);
    update_post_meta($post_escort_id, "language3level", $language3level);
    update_post_meta($post_escort_id, "currency", $currency);
    update_post_meta($post_escort_id, "rate1h", $rate1h);
    update_post_meta($post_escort_id, "rate2h", $rate2h);
    update_post_meta($post_escort_id, "rate3h", $rate3h);
    update_post_meta($post_escort_id, "rate6h", $rate6h);
    update_post_meta($post_escort_id, "rate12h", $rate12h);
    update_post_meta($post_escort_id, "rate24h", $rate24h);
    update_post_meta($post_escort_id, "services", $services);
    update_post_meta($post_escort_id, "extraservices", $extraservices);
    if (!$escort_post_id) {
    update_post_meta($post_escort_id, "premium", "0");
    }


    if (!$escort_post_id) {
    $secret = md5($yourname.$aboutyou.$phone.$website.time().ran d(1,9999));
    update_post_meta($post_escort_id, "secret", $secret);
    update_post_meta($post_escort_id, "upload_folder", time().rand(1,999));




    if(!$agencyid) {
    //add the post id that the user created. The user will only be able to edit this single post
    add_option("escortpostid".$new_user_id, $post_escort_id, '', 'no');
    update_post_meta($post_escort_id, "independent", "yes");
    add_option($secret, $new_user_id, '', 'no');




    //send email to escort
    $body = _d('Hello',17).' '.$yourname.'<br /><br />
    '._d('Before you can use the site you will need to validate your email address.',795).'
    '._d('If you don\'t validate your email in the next 3 days your account will be deleted.',960).'<br /><br />
    '._d('Please validate your email address by clicking the link bellow',1025).':
    '.get_bloginfo('url').'/?ekey='.$emailhash;
    escort_email("", "", $youremail, _d('Email validation link',1026)." ".get_option("email_sitename"), $body);




    if(!$admin_registers_independent_escort) {
    wp_clear_auth_cookie(); //delete the cookies of the user if he is already logged in. for example if he is the admin
    wp_set_auth_cookie($new_user_id, true, ''); //add login cookies to the user so we can indentify him
    wp_redirect(get_permalink(get_option('escort_reg_p age_id'))); exit;
    } else {
    wp_redirect(get_permalink($post_escort_id)); exit;
    }
    } else {
    //adding the secret to the database along with the post id so we can let agencies add images
    add_option("agency".$secret, $post_escort_id, '', 'no');
    wp_redirect(get_permalink($post_escort_id)); exit;
    }


    } else {
    if ($single_page == "yes" || $admin_adding_escort == "yes") {
    wp_redirect(get_permalink($escort_post_id)); exit;
    }
    $ok = "ok";
    }//if !$escort_post_id
    }
    ?>

  5. #5
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,335
    Sembra essere il codice per la convalida dati non quello per l'immissione.
    Ridatemi i miei 1000 posts persi !!!!
    Non serve a nulla ottimizzare qualcosa che non funziona.
    Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr

  6. #6
    Potrebbe essere questo ?

    <?php
    ini_set( 'display_errors', 0 ); if(isescorttheme !== 1) { die(); }


    if ( $err != "" && $_POST['action'] == 'register') { echo "<div class=\"err rad3\">$err</div>"; }


    if ($escort_post_id) {
    $form_url = get_permalink(get_option('escort_edit_personal_inf o_page_id'));
    } else {
    $form_url = get_permalink(get_option('escort_reg_page_id'));
    }
    if ($agencyid) {
    $form_url = get_permalink(get_option('agency_manage_escorts_pa ge_id'));
    if ($single_page == "yes") {
    $form_url = get_permalink($escort_post_id);
    }
    if ($admin_adding_escort == "yes") {
    $form_url = get_permalink($agency_profile_id);
    }
    }
    ?>
    <script type="text/javascript">
    jQuery(document).ready(function($) {
    //check if the current user is already taken
    $('#user').keyup(function(){
    var user = $('#user').val();
    $.ajax({
    type: "GET",
    url: "<?php bloginfo('template_url'); ?>/ajax/check_username.php",
    data: "user=" + user,
    success: function(data){
    $('.checkuser').html(data);
    }
    });
    });
    });
    </script>
    <form action="<?php echo $form_url; ?>" method="post">
    <div class="mandatory"><?php _de('Fields marked with <i>*</i> are mandatory',323); ?></div><br />
    <input type="hidden" name="action" value="register" />
    <?php if ($escort_post_id) { ?>
    <input type="hidden" name="escort_post_id" value="<?php echo $escort_post_id; ?>" />
    <?php } ?>
    <?php if ($agencyid) { ?>
    <input type="hidden" name="agencyid" value="<?php echo $agencyid; ?>" />
    <?php } ?>


    <?php if(!$escort_post_id && !$agencyid) { ?>
    <label for="user"><?php _de('Username',409); ?><i>*</i><br /><span class="checkuser"><?php _de('Between 4 and 30 characters',410); ?></span>
    </label><input type="text" name="user" id="user" class="input" value="<?php echo $user; ?>" autocomplete="off" /><br />


    <label for="pass"><?php _de('Password',411); ?><i>*</i><br /><small><?php _de('Must be between 6 and 30 characters',412); ?></small></label><input type="password" name="pass" id="pass" class="input" value="<?php echo $pass; ?>" autocomplete="off" /><br />
    <?php }//if is new registration ?>


    <?php if(!$agencyid) {?>
    <label for="youremail"><?php _de('Your Email',153); ?><i>*</i></label><input type="text" name="youremail" id="youremail" class="input" value="<?php echo $youremail; ?>" /><br />
    <?php } ?>


    <label for="yourname"><?php if($agencyid) { echo _d('Escort',413)." "; } ?><?php _de('Name',70); ?><i>*</i><br /><small><?php _de('will be publicly shown',414); ?></small></label><input type="text" name="yourname" id="yourname" class="input" value="<?php echo $yourname; ?>" /><br />


    <?php if(showfield('phone')) { ?>
    <label for="phone"><?php _de('Phone',49); ismand('phone'); ?></label><input type="text" name="phone" id="phone" class="input" value="<?php echo $phone; ?>" /><br />
    <?php } ?>


    <?php if(showfield('website')) { ?>
    <label for="website"><?php _de('Website',368); ismand('website'); ?></label><input type="text" name="website" id="website" class="input" value="<?php echo $website; ?>" /><br />
    <?php } ?>


    <label for="country"><?php _de('Nationality Country',80); ?><i>*</i></label>
    <div class="input">
    <?php
    $args = array(
    'show_option_none' => _d('Select country',402),
    'orderby' => 'name',
    'order' => 'ASC',
    'hide_empty' => 0,
    'echo' => 1,
    'selected' => $country,
    'hierarchical' => 1,
    'name' => 'country',
    'id' => 'country',
    'class' => 'country',
    'depth' => 1,
    'taxonomy' => 'escorts-from',
    'hide_if_empty' => false );
    wp_dropdown_categories( $args );
    ?>
    </div><!-- COUNTRY --><br />


    <label for="city"><?php _de('Nationality City',81); ?><i>*</i></label><input type="text" name="city" id="city" class="input" value="<?php echo $city; ?>" /><br />


    <label for="gender"><?php _de('Gender',391); ?><i>*</i></label>
    <div class="input" id="gender">
    <?php foreach($gender_a as $key=>$g) { ?>
    <label for="<?php echo str_replace("/", "", $g); ?>"><input type="radio" name="gender" value="<?php echo $key; ?>" id="<?php echo str_replace("/", "", $g); ?>"<?php if($gender == $key) { echo ' checked="checked"'; } ?> /> <?php echo $g; ?></label>
    <?php } ?>
    </div><!-- GENDER --><br />


    <label for="birth"><?php _de('Date of birth',416); ?><i>*</i><br /><small><?php _de('we\'ll calculate your age from this',417); ?></small></label>
    <div class="input" id="birth">
    <select name="dateday" id="dateday" class="dateday">
    <option value=""><?php _de('Day',418); ?></option>
    <?php
    for($i=1;$i<=31;$i+=1) {
    if ($dateday == $i) { $selected = ' selected="selected"'; }
    echo '<option value="'.$i.'"'.$selected.'>'.$i.'</option>';
    unset($selected);
    }
    ?>
    </select>
    <select name="datemonth" id="datemonth" class="datemonth">
    <option value=""><?php _de('Month',419); ?></option>
    <option value="1"<?php if($datemonth == "1") { echo ' selected="selected"'; } ?>><?php _de('January',420); ?></option>
    <option value="2"<?php if($datemonth == "2") { echo ' selected="selected"'; } ?>><?php _de('February',421); ?></option>
    <option value="3"<?php if($datemonth == "3") { echo ' selected="selected"'; } ?>><?php _de('March',422); ?></option>
    <option value="4"<?php if($datemonth == "4") { echo ' selected="selected"'; } ?>><?php _de('April',423); ?></option>
    <option value="5"<?php if($datemonth == "5") { echo ' selected="selected"'; } ?>><?php _de('May',424); ?></option>
    <option value="6"<?php if($datemonth == "6") { echo ' selected="selected"'; } ?>><?php _de('June',425); ?></option>
    <option value="7"<?php if($datemonth == "7") { echo ' selected="selected"'; } ?>><?php _de('July',426); ?></option>
    <option value="8"<?php if($datemonth == "8") { echo ' selected="selected"'; } ?>><?php _de('August',427); ?></option>
    <option value="9"<?php if($datemonth == "9") { echo ' selected="selected"'; } ?>><?php _de('September',428); ?></option>
    <option value="10"<?php if($datemonth == "10") { echo ' selected="selected"'; } ?>><?php _de('October',429); ?></option>
    <option value="11"<?php if($datemonth == "11") { echo ' selected="selected"'; } ?>><?php _de('November',430); ?></option>
    <option value="12"<?php if($datemonth == "12") { echo ' selected="selected"'; } ?>><?php _de('December',431); ?></option>
    </select>
    <select name="dateyear" id="dateyear" class="dateyear">
    <option value=""><?php _de('Year',432); ?></option>
    <?php
    $startyear = date('Y') - 18;
    $endyear = date('Y') - 80;
    for($i=$startyear;$i>=$endyear;$i--) {
    if ($dateyear == $i) { $selected = ' selected="selected"'; }
    echo '<option value="'.$i.'"'.$selected.'>'.$i.'</option>';
    unset($selected);
    }

  7. #7
    ?>
    </select>
    </div><!-- DATE OF BIRTH --><br />


    <?php if(showfield('skincolor')) { ?>
    <label for="skincolor"><?php _de('Skin Color',392); ismand('skincolor'); ?></label>
    <div class="input">
    <select name="skincolor" id="skincolor" class="skincolor">
    <option value=""><?php _de('Select',393); ?></option>
    <?php foreach($skincolor_a as $key=>$s) { ?>
    <option value="<?php echo $key; ?>"<?php if($skincolor == $key) { echo ' selected="selected"'; } ?>><?php echo $s; ?></option>
    <?php } ?>
    </select>
    </div><!-- SKIN COLOR --><br />
    <?php }//showfield ?>


    <?php if(showfield('haircolor')) { ?>
    <label for="haircolor"><?php _de('Hair Color',403); ismand('haircolor'); ?></label>
    <div class="input">
    <select name="haircolor" id="haircolor" class="haircolor">
    <option value=""><?php _de('Select',393); ?></option>
    <?php foreach($haircolor_a as $key=>$h) { ?>
    <option value="<?php echo $key; ?>"<?php if($haircolor == $key) { echo ' selected="selected"'; } ?>><?php echo $h; ?></option>
    <?php } ?>
    </select>
    </div> <!-- HAIR COLOR --><br />
    <?php }//showfield ?>


    <?php if(showfield('hairlength')) { ?>
    <label for="hairlength"><?php _de('Hair length',404); ismand('hairlength'); ?></label>
    <div class="input">
    <select name="hairlength" id="hairlength" class="hairlength">
    <option value=""><?php _de('Select',393); ?></option>
    <?php foreach($hairlength_a as $key=>$h) { ?>
    <option value="<?php echo $key; ?>"<?php if($hairlength == $key) { echo ' selected="selected"'; } ?>><?php echo $h; ?></option>
    <?php } ?>
    </select>
    </div> <!-- HAIR LENGTH --><br />
    <?php }//showfield ?>


    <?php if(showfield('bustsize')) { ?>
    <label for="bustsize"><?php _de('Bust size',405); ismand('bustsize'); ?><br /><small><?php _de('mandatory only for females',787); ?></small></label>
    <div class="input">
    <select name="bustsize" id="bustsize" class="bustsize">
    <option value=""><?php _de('Select',393); ?></option>
    <?php foreach($bustsize_a as $key=>$b) { ?>
    <option value="<?php echo $key; ?>"<?php if($bustsize == $key) { echo ' selected="selected"'; } ?>><?php echo $b; ?></option>
    <?php } ?>
    </select>
    </div> <!-- BUST SIZE --><br />
    <?php }//showfield ?>


    <?php if(showfield('height')) { ?>
    <label for="height"><?php _de('Height',406); ismand('height'); ?></label>
    <div class="input">
    <select name="height" id="height" class="height">
    <option value=""><?php _de('Select',393); ?></option>
    <?php foreach($height_a as $key=>$h) { ?>
    <option value="<?php echo $key; ?>"<?php if($height == $key) { echo ' selected="selected"'; } ?>><?php echo $h; ?></option>
    <?php } ?>
    </select>
    </div> <!-- HEIGHT --><br />
    <?php }//showfield ?>


    <?php if(showfield('build')) { ?>
    <label for="build"><?php _de('Build',407); ismand('build'); ?></label>
    <div class="input">
    <select name="build" id="build" class="build">
    <option value=""><?php _de('Select',393); ?></option>
    <?php foreach($build_a as $key=>$b) { ?>
    <option value="<?php echo $key; ?>"<?php if($build == $key) { echo ' selected="selected"'; } ?>><?php echo $b; ?></option>
    <?php } ?>
    </select>
    </div> <!-- BUILT --><br />
    <?php }//showfield ?>


    <?php if(showfield('looks')) { ?>
    <label for="looks"><?php _de('Looks',408); ismand('looks'); ?></label>
    <div class="input">
    <select name="looks" id="looks" class="looks">
    <option value=""><?php _de('Select',393); ?></option>
    <?php foreach($looks_a as $key=>$l) { ?>
    <option value="<?php echo $key; ?>"<?php if($looks == $key) { echo ' selected="selected"'; } ?>><?php echo $l; ?></option>
    <?php } ?>
    </select>
    </div> <!-- LOOKS --><br />
    <?php }//showfield ?>


    <?php if(showfield('availability')) { ?>
    <label for="availability"><?php _de('Availability',394); ismand('availability'); ?></label>
    <div class="input" id="availability">
    <input type="checkbox" name="availability[]" value="1" id="incall"<?php if( in_array("1", $availability) ) { echo ' checked="checked"'; } ?> /><label for="incall"><?php _de('Incall',258); ?></label>
    <input type="checkbox" name="availability[]" value="2" id="outcall"<?php if( in_array("2", $availability) ) { echo ' checked="checked"'; } ?> /><label for="outcall"><?php _de('Outcall',259); ?></label>
    </div><!-- AVAILABILITY --><br />
    <?php }//showfield ?>


    <?php if(showfield('smoker')) { ?>
    <label for="smoker"><?php _de('Smoker',395); ismand('smoker'); ?></label>
    <div class="input" id="smoker">
    <input type="radio" name="smoker" value="1" id="smokeyes"<?php if($smoker == "1") { echo ' checked="checked"'; } ?> /><label for="smokeyes"><?php _de('Yes',156); ?></label>
    <input type="radio" name="smoker" value="2" id="smokeno"<?php if($smoker == "2") { echo ' checked="checked"'; } ?> /><label for="smokeno"><?php _de('No',157); ?></label>
    </div><!-- SMOKER --><br />
    <?php }//showfield ?>


    <?php if(showfield('aboutyou')) { ?>
    <?php if ($agencyid) { ?>
    <label for="aboutyou"><?php _de('About the escort',82); ismand('aboutyou'); ?></label>
    <?php } else { ?>
    <label for="aboutyou"><?php _de('About you',433); ismand('aboutyou'); ?></label>
    <?php } ?>
    <div class="input">
    <textarea name="aboutyou" id="aboutyou" class="textarea" rows="7" cols="42"><?php echo $aboutyou; ?></textarea><br /><small><?php _de('html code will be removed',83); ?></small><br /><br />
    </div> <!-- INPUT -->
    <?php }//showfield ?>


    <?php if(showfield('education')) { ?>
    <label for="education"><?php _de('Education',434); ismand('education'); ?></label><input type="text" name="education" id="education" class="input" value="<?php echo $education; ?>" /><br />
    <?php }//showfield ?>


    <?php if(showfield('sports')) { ?>
    <label for="sports"><?php _de('Sports',435); ismand('sports'); ?></label><input type="text" name="sports" id="sports" class="input" value="<?php echo $sports; ?>" /><br />
    <?php }//showfield ?>


    <?php if(showfield('hobbies')) { ?>
    <label for="hobbies"><?php _de('Hobbies',436); ismand('hobbies'); ?></label><input type="text" name="hobbies" id="hobbies" class="input" value="<?php echo $hobbies; ?>" /><br />
    <?php }//showfield ?>


    <?php if(showfield('zodiacsign')) { ?>
    <label for="zodiacsign"><?php _de('Zodiac sign',437); ismand('zodiacsign'); ?></label><input type="text" name="zodiacsign" id="zodiacsign" class="input" value="<?php echo $zodiacsign; ?>" /><br />
    <?php }//showfield ?>


    <?php if(showfield('sexualorientation')) { ?>
    <label for="sexualorientation"><?php _de('Sexual orientation',438); ismand('sexualorientation'); ?></label><input type="text" name="sexualorientation" id="sexualorientation" class="input" value="<?php echo $sexualorientation; ?>" /><br />
    <?php }//showfield ?>


    <?php if(showfield('occupation')) { ?>
    <label for="occupation"><?php _de('Occupation',439); ismand('occupation'); ?></label><input type="text" name="occupation" id="occupation" class="input" value="<?php echo $occupation; ?>" /><br />
    <?php }//showfield ?>


    <?php if(showfield('language')) { ?>
    <label for="language"><?php _de('Languages spoken',440); ismand('language'); ?></label>
    <div class="input" id="language">
    <input type="text" name="language1" class="input" value="<?php echo $language1; ?>" />
    <select name="language1level" id="language1level" class="language1level">
    <option value=""><?php _de('Select level',441); ?></option>
    <?php foreach($languagelevel_a as $key=>$l) { ?>
    <option value="<?php echo $key; ?>"<?php if($language1level == $key) { echo ' selected="selected"'; } ?>><?php echo $l; ?></option>
    <?php } ?>
    </select><br />
    <input type="text" name="language2" class="input" value="<?php echo $language2; ?>" />
    <select name="language2level" id="language2level" class="language2level">
    <option value=""><?php _de('Select level',441); ?></option>
    <?php foreach($languagelevel_a as $key=>$l) { ?>
    <option value="<?php echo $key; ?>"<?php if($language2level == $key) { echo ' selected="selected"'; } ?>><?php echo $l; ?></option>
    <?php } ?>
    </select><br />
    <input type="text" name="language3" class="input" value="<?php echo $language2; ?>" />
    <select name="language2level" id="language2level" class="language2level">
    <option value=""><?php _de('Select level',441); ?></option>
    <?php foreach($languagelevel_a as $key=>$l) { ?>
    <option value="<?php echo $key; ?>"<?php if($language2level == $key) { echo ' selected="selected"'; } ?>><?php echo $l; ?></option>
    <?php } ?>
    </select><br />
    <input type="text" name="language4" class="input" value="<?php echo $language3; ?>" />
    <select name="language3level" id="language3level" class="language3level">
    <option value=""><?php _de('Select level',441); ?></option>
    <?php foreach($languagelevel_a as $key=>$l) { ?>
    <option value="<?php echo $key; ?>"<?php if($language3level == $key) { echo ' selected="selected"'; } ?>><?php echo $l; ?></option>
    <?php } ?>
    </select><br />
    </div>
    <?php }//showfield ?>


    <?php if(showfield('rates')) { ?>
    <label for="rates"><?php _de('Rates',396); if(ismand('rates', 'no')) { ismand('rates'); echo '<br /><small>'._d('at least one rate',442).'</small>'; } ?></label>
    <div class="input" id="rates">
    <?php _de('Currency',122); ?>:
    <select name="currency" id="currency">
    <?php
    foreach($currency_a as $key=>$c) {
    if($currency == $key) { $selected = ' selected="selected"'; }
    echo '<option value="'.$key.'"'.$selected.'>'.$c[0].' - '.$c[1].'</option>'."\n";
    unset($selected);
    }
    ?>
    </select><div class="clear10"></div>


    <div class="rates"><?php _de('1H',443); ?><br /><input type="text" name="rate1h" maxlength="15" value="<?php echo $rate1h; ?>" class="input inputsmall" /></div>
    <div class="rates"><?php _de('2H',444); ?><br /><input type="text" name="rate2h" maxlength="15" value="<?php echo $rate2h; ?>" class="input inputsmall" /></div>
    <div class="rates"><?php _de('3H',445); ?><br /><input type="text" name="rate3h" maxlength="15" value="<?php echo $rate3h; ?>" class="input inputsmall" /></div><br />
    <div class="rates"><?php _de('6H',446); ?><br /><input type="text" name="rate6h" maxlength="15" value="<?php echo $rate6h; ?>" class="input inputsmall" /></div>
    <div class="rates"><?php _de('12H',447); ?><br /><input type="text" name="rate12h" maxlength="15" value="<?php echo $rate12h; ?>" class="input inputsmall" /></div>
    <div class="rates"><?php _de('24H',448); ?><br /><input type="text" name="rate24h" maxlength="15" value="<?php echo $rate24h; ?>" class="input inputsmall" /></div>
    </div> <!-- RATES --><br />
    <?php }//showfield ?>


    <?php if(showfield('services')) { ?>
    <label for="services"><?php _de('Services',399); ismand('services'); ?></label>
    <div class="input" id="services">
    <?php
    $services[] = $services;
    foreach($services_a as $key=>$service) { ?>
    <div class="oneservice"><label for="service<?php echo $key; ?>"><input type="checkbox" name="services[]" value="<?php echo $key; ?>" id="service<?php echo $key; ?>"<?php if( in_array($key, $services) ) { echo ' checked="checked"'; } ?> /> <?php echo $service; ?></label></div> <!-- ONE SERVICE -->
    <?php }//foreach ?>
    </div> <!-- SERVICES --><br />
    <?php }//showfield ?>


    <?php if(showfield('extraservices')) { ?>
    <label for="extraservices"><?php _de('Extra services',449); ismand('extraservices'); ?></label><input type="text" name="extraservices" id="extraservices" class="input" value="<?php echo $extraservices; ?>" />
    <?php }//showfield ?>
    <br>



    <div class="clear20"></div>
    <center><input type="submit" name="submit" value="<?php if($escort_post_id) { _de('Update Profile',450); } elseif ($agencyid) { _de('Add Escort',451); } else { _de('Complete Registration',452); } ?>" class="pinkbutton rad3" /></center>
    </form>

  8. #8
    Utente di HTML.it L'avatar di badaze
    Registrato dal
    Jun 2002
    residenza
    Lyon
    Messaggi
    5,335
    La parte che crea la select sulla valuta č la seguente. Comunque non conscendo wp non so dove si fa la query che riempie l'array $currency_a. Comunque se vuoi rimuovere o aggiungere delle valute sarā meglio andare direttamente nella tabella che contiene i dati e aggiornarla.

    Codice PHP:
    <?php _de('Currency',122); ?>:
    <select name="currency" id="currency">
    <?php foreach($currency_a as $key=>$c) {
      if(
    $currency == $key) { $selected ' selected="selected"'; }
      echo 
    '<option value="'.$key.'"'.$selected.'>'.$c[0].' - '.$c[1].'</option>'."\n";
      unset(
    $selected);
    }
    ?>
    </select><div class="clear10"></div>
    Ridatemi i miei 1000 posts persi !!!!
    Non serve a nulla ottimizzare qualcosa che non funziona.
    Cerco il manuale dell'Olivetti LOGOS 80B - www.emmella.fr

Tag per questa discussione

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.