I have used jQuery to implement re-orderable (AJAX draggable) menu items in such a way as to allow only logged-in users to change the sort order of menu items. This has been written with a view to updating the weights in the menu table when a drag operation finishes, thus providing a much more convenient way to set menu item weights. This all works fine, so all I need to do now is to implement the back-end that updates the menu table.
However, I am not sure how to include the Drupal session libraries so I can test whether a user is logged-in in my AJAX/standalone PHP code. Obviously I want this to update the database only if a user is logged in (or perhaps, later on, a specific user). If someone can point me in the right direction, it will help me to finish draggable-reorderable menus in my current project, which of course I will be pleased to post for the benefit of the community.
Thanks in advance :)