$_check = get_current_favorite_country_data($_POST['id_element']); if (empty($_check)) { echo 1; //No data exit; } } elseif ($_POST['type'] == 'page') { $_check = get_current_favorite_page_data($_POST['id_element']); if (empty($_check)) { echo 1; //No data exit; } } else { reconnect_db('owloo_twitter'); $_check = get_current_favorite_twitter_data($_POST['id_element']); if (empty($_check)) { echo 1; //No data exit; } reconnect_db('owloo_owloo'); } if (add_current_favorite($_POST['type'], $_POST['id_element'])) { echo 2; } else { echo 3; } //Add error exit; } else {
$_fb_page_favorites = array(); foreach ($_favorites['country'] as $value) { $_aux_data = get_current_favorite_country_data($value); if (!empty($_aux_data)) { $_country_favorites[] = $_aux_data; } } foreach ($_favorites['page'] as $value) { $_aux_data = get_current_favorite_page_data($value); if (!empty($_aux_data)) { $_fb_page_favorites[] = $_aux_data; } } reconnect_db('owloo_twitter'); foreach ($_favorites['twitter'] as $value) { $_aux_data = get_current_favorite_twitter_data($value); if (!empty($_aux_data)) { $_twitter_favorites[] = $_aux_data; } } /**** FIN FAVORITES ****/ //Upload the avatar if the user click "Upload Avatar" $site->process_uploadavatar(); //Update the settings or profile if either forms where submitted. $site->process_settings(); $site->process_profile(); $site->socialAuthLink(); $site->socialAuthUnLink(); //Mensajes $mensajes = $site->retrive_pmlist_dav(true); //Datos del usuario