$query0 = "SELECT name,item FROM " . $prefix . "owned_adoptables WHERE aid='$id' LIMIT 1";
$result0 = mysql_query($query0);
$num0 = mysql_numrows($result0);
switch (true) {
//**************************************************
// Adoptable Exists
//**************************************************
case ($num0 > 0):
// <editor-fold defaultstate="collapsed" desc="Adoptable Exists">
$row0 = mysql_fetch_assoc($result0);
$name = $row0["name"];
$item = $row0["item"];
$image = "";
if ($item != "yes") {
$image = getcurrentimage($id);
} else {
$image = getcurrentitemimage($id);
}
$article_title = "Signing New Contract with " . $name . "<br /><br />";
$article_content = " You are signing a contract with " . $name . ". Doing so will require a signing bonus of 200 Gold Pieces. When you're ready to sign a contract with this Companion, click on the <i>Sign Contract</i> button below.<br /><br />
<center><a href='levelup.php=" . $id . "'><img src='" . $image . "' border='0'></a></center><br />
<form name='form1' method='post' action='doabandon.php'>
<p><input name='aid' type='hidden' id='aid' value='" . $id . "'>
<input name='name' type='hidden' id='name' value='" . $name . "'></p>
<p><input type='submit' name='submit' value='Sign Contract'></p></form>";
$_SESSION['abandon']=1;
// </editor-fold>
break;