';
$output .= '| ' . $row['itemid'] .' | ';
$output .= '' . $row['name'] . ' | ';
$output .= '';
// if this field is empty, its not for anyone specific
if(empty($row['owner'])){
$output .= "Everyone";
}else{
$output .= $row['owner'];
}
$output .= ' | ';
$output .= '' . $row['quantity'] .' | ';
$output .= '';
if($row['reoccuring'] == 1){
$output .= "yes";
}else{
$output .= "no";
}
$output .= ' | ';
$output .= '';
if($row['purchased'] == 1){
$output .= "yes";
}else{
$output .= "no";
}
$output .= ' | ';
$output .= 'Edit - ';
// need to add slashes as we're dealing with javascript here
$output .= 'Delete | ';
$output .= '
';
}
$output .= '';
return $output;
}
function DeleteItem(){
// in the query we convert it to an integer to prevent any injection
if(mysql_query("delete from thelist where itemid='".(int)$_GET['itemid']."'")){
$output = '