<?php
/* Include Files ***************************/
require_once('../db-config.php');
require_once('../inc/lib-compat-class.php');
require_once('../inc/lib-db-class.php');
require_once('../inc/lib-login-class.php');
/*******************************************/
global $rSdb;

$user	= new userManagement();
if(  !$user->_logged_in  )
	die(__('Access denied.','recipeshelf'));

if( ! check_ajax_referer('list-thought', false) )
	die('0|'.__('Security Alert: Direct access not permitted!','recipeshelf'));

$sql        = "SELECT id, object FROM {$rSdb->DBobjects} WHERE type='5' AND uid='{$user->_user_id}'";
$thoughts   = $rSdb->fetchArr( $sql );

if( count($thoughts)==0 ){

	echo '0|<ul class="rounded"><li>'.__('No ideas yet...','recipeshelf').'</li></ul>';

}else{
	echo '1|';
	echo '<ul>';
   	foreach( $thoughts as $t )
        echo '<li value="'.$t->id.'"><a href="#" class="remove-thought" title="'.__('Remove','recipeshelf').'">'.esc_html($t->object).'</a></li>';
	echo '</ul>';
}
?>