(logout)
";
print "Account Details| Edit Profile
";
print "".$activetitle."";
print "
";
foreach ($_SESSION['_amember_products'] as $p){
print "- ".$p['title']."
";
}
print "
";
}else{// user is not logged-in
print "
Username:
Password:
";
}
echo $after_widget;
}
function widget_wpAmember_control(){
$options = get_option('widget_wpAmember');
if ( !is_array($options) )
$options = array('title'=>'Sidebar Title','amemberdir'=>__('amember','widgets'));
if ( $_POST['wpAmember-submit'] ){
$options['title'] = strip_tags(stripslashes($_POST['wpAmember-title']));
$options['amemberdir'] = strip_tags(stripslashes($_POST['wpAmember-amemberdir']));
$options['activetitle'] = strip_tags(stripslashes($_POST['wpAmember-activetitle']));
update_option('widget_wpAmember',$options);
}
$title = htmlspecialchars($options['title'],ENT_QUOTES);
$activetitle = htmlspecialchars($options['activetitle'],ENT_QUOTES);
$amemberdir = htmlspecialchars($options['amemberdir'],ENT_QUOTES);
echo '';
echo '';
echo '';
echo '';
}
register_sidebar_widget(array('wpAmember','widgets'),'widget_wpAmember');
register_widget_control(array('wpAmember','widgets'),'widget_wpAmember_control',300,100);
}
add_action('widgets_init','widget_wpAmember_init');
?>