table.' '. 'WHERE link_id = '.$id; $rs = $con->select($strReq); $l_label = $rs->f('label'); $l_href = $rs->f('href'); $l_title = $rs->f('title'); $l_lang = $rs->f('lang'); $l_rel = $rs->f('rel'); if (!$rs->isEmpty() && $action == 'edit_link') { $l_label = strip_tags(trim($_POST['l_label'])); $l_title = strip_tags(trim($_POST['l_title'])); $l_href = strip_tags(trim($_POST['l_href'])); $l_lang = strip_tags(trim($_POST['l_lang'])); if (!$l_label || !$l_href) { $err = __('You must provide at least a label and an URL'); } else { $rel = ''; if (isSet($_POST['identity'])) $rel .= 'me'; else { if (isSet($_POST['friendship'])) { if (in_array($_POST['friendship'], array('contact','acquaintance','friend'))) { $rel .= ' '.$_POST['friendship']; } } if (isSet($_POST['physical'])) { $rel .= ' met'; } if (isSet($_POST['professional'])) { $pros = array(); foreach ($_POST['professional'] as $pro) { if (in_array($pro, array('co-worker','colleague'))) { $pros[] = $pro; } } $rel .= ' '.implode(' ',$pros); } if (isSet($_POST['geographical'])) { if (in_array($_POST['geographical'],array('co-resident','neighbor'))) { $rel .= ' '.$_POST['geographical']; } } if (isSet($_POST['family'])) { if (in_array($_POST['family'],array('child','parent','sibling','spouse','kin'))) { $rel .= ' '.$_POST['family']; } } if (isSet($_POST['romantic'])) { $roms = array(); foreach ($_POST['romantic'] as $rom) { if (in_array($rom,array('muse','crush','date','sweetheart'))) { $roms[] = $rom; } } $rel .= ' '.implode(' ',$roms); } } if ($blogroll->updLink($id,$l_label,$l_href,$l_title,$l_lang, $rel) == false) { $err = $blogroll->con->error(); } else { header('Location: '.$url); exit; } } } # Affichage $mySubMenu->addItem( ''.__('Back').'',array($url),$icon,false); buffer::str('
'.__('Error(s)').' :
'. ''.$err.'
'. ''.__('No link').'
'); } else { buffer::str( '' ); } ?>