check(1); include dirname(__FILE__).'/inc/connexion.php'; $list_url = (!empty($_POST['list_url'])) ? $_POST['list_url'] : ''; $tb_content = (!empty($_POST['tb_content'])) ? util::cutString($_POST['tb_content'],255) : ''; $is_editable = false; $ping_res = array(); $post_id = (!empty($_REQUEST['post_id'])) ? $_REQUEST['post_id'] : ''; # Vérifications d'usage if ($post_id != '') { $post = $blog->getPostByID($post_id); if (!$post->isEmpty()) { # Post éditable que par un admin ou son créateur if ($post->f('user_id') == $_SESSION['sess_user_id'] || $_SESSION['sess_user_level'] >= 9) { $is_editable = true; } } } # Création des trackback if ($is_editable && $list_url != '') { $list_url = str_replace("\r",'',$list_url); $turi = array_unique(explode("\n",$list_url)); foreach ($turi as $uri) { if ($blog->postTbPingURL($post_id,$uri,dc_blog_name,$tb_content) !== false) { $ping_res[$uri]['status'] = true; } else { $ping_error = $blog->error(); $ping_res[$uri]['status'] = false; $ping_res[$uri]['error'] = $ping_error[0][1]; $blog->resetError(); } } } # Sous menu $mySubMenu->addItem( __('Back to entry'),'poster.php?post_id='.$post_id, 'images/ico_retour.png',false); openPage(__('Pings')); ?>
'.__('Error(s)').' :
'. ''.__('No entry').'
'; } else { $chapo = $post->f('post_chapo'); $content = $post->f('post_content'); if ($tb_content == '') { $tb_content = util::cutString(strip_tags($post->f('post_content')),252).'...'; } echo ''. __('Auto discovery of ping URLs').'
'; } echo ''; if (!empty($_POST['list_url'])) { echo ''.$img.' '.$k.'
'.
''.((!$v['status']) ? $v['error'] : 'Ping OK').'';
'
'.__('No ping yet').'
'; } else { echo '