Ejemplo n.º 1
0
    $data['source_id'] = 1;
    $data['date_created'] = $db->now();
    //echo '<pre>$data|';print_r($data);echo '|</pre>';
    $new_id = $db->insert('ad_reference', $data);
}
if ($new_id) {
    header('location:ad.promo-edit.php?ad_id=' . $new_id);
    die;
}
if ($_GET['update_wonderful']) {
    $wonderful_third_data = get_third_login('projectwonderful', $db);
    if ($wonderful_third_data && $wonderful_third_data['active'] == 1) {
        @($file_data = $fileops->read_file($wonderful_file_path . $wonderful_third_data['user_info']));
        if ($file_data) {
            $file_data = str_replace('pw:', '', $file_data);
            $fileops->set_file('../assets/data/projectwonderful.xml');
            $fileops->set_contents($file_data);
            $fileops->save_file();
        }
    }
}
/*****
 * ! Display logic
 */
// Get all ads.
$ad_list = get_ads(null, $db);
$current_theme = get_site_theme($milieu_list['tone_id']['value'], $db);
///////// Read PW data.
// Get the login ID, if any.
$wonderful_third_data ? $wonderful_third_data : ($wonderful_third_data = get_third_login('projectwonderful', $db));
if ($wonderful_third_data && $wonderful_third_data['active'] == 1) {