Exemplo n.º 1
0
 $user_profile = $site->get_profile();
 if ($site->loggedin) {
     set_current_user_id($user_profile['user_id']);
 } else {
     echo 0;
     //No login
     exit;
 }
 if (!is_current_favorite($_POST['type'], $_POST['id_element'])) {
     if (get_current_favorite_count($_POST['type']) >= 6) {
         echo 6;
         //Limit exceded
         exit;
     }
     if ($_POST['type'] == 'country') {
         $_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']);
Exemplo n.º 2
0
 * Version: 1.3.1                                                                        *
 *****************************************************************************************/
require_once 'system/initiater.php';
$site->restricted_page('login.php');
set_current_page('account');
/**** FAVORITES ****/
$user_profile = $site->get_profile();
if (!empty($user_profile)) {
    set_current_user_id($user_profile['user_id']);
}
$_favorites = get_current_favorite_array();
$_country_favorites = array();
$_twitter_favorites = array();
$_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;