if ($subject == '') { $error = 101; } if ($text == '') { $error = 102; } if ($error < 100) { $sql_createthread = "INSERT INTO $table[allianceforum_threads] (`alliance_id`, `subject`, `starter`, `date`) VALUES ('$alliance_id', '$subject', '$poster_id', '$date')"; mysql_query($sql_createthread); $thread_id = mysql_insert_id(); $sql_createpost = "INSERT INTO `$table[allianceforum_posts]` (`thread_id`, `alliance_id`, `poster_id`, `text`, `date`) VALUES ('$thread_id', '$alliance_id', '$poster_id', '$text', '$date')"; mysql_query($sql_createpost); } } if ($do == 'delthread') { $thread_id = secureData($_GET['thread_id']); if ((getAllianceCommander($playerdata['alliance_id']) != $playerdata['id']) && (getAllianceSubCommander($playerdata['alliance_id']) != $playerdata['id'])) { $error = 103; } else { $sql_delthread = "DELETE FROM $table[allianceforum_threads] WHERE `alliance_id` = '$playerdata[alliance_id]' AND `id` = '$thread_id'"; $sql_delposts = "DELETE FROM $table[allianceforum_posts] WHERE `alliance_id` = '$playerdata[alliance_id]' AND `thread_id` = '$thread_id'"; mysql_query($sql_delthread) or die(mysql_error()); mysql_query($sql_delposts) or die(mysql_error()); if (mysql_affected_rows() > 0) { $error = 1; } else { $error = 104; } } } switch($error) { case 1:
</td> </tr> <tr> <td width="150">Alliance tag:</td> <td width="250"><?php echo getAllianceTag($playerdata['id']); ?> </td> </tr> <tr> <td width="150">Alliance commander:</td> <td width="250"><?php echo getRulernameById(getAllianceCommander($alliance_id)); ?> of <?php echo getPlanetnameById(getAllianceCommander($alliance_id)); ?> </td> </tr> <tr> <td width="150">Alliance sub commander:</td> <td width="250"><? if (getAllianceSubCommander($alliance_id)) { ?><?php echo getRulernameById(getAllianceSubCommander($alliance_id)); ?> of <?php echo getPlanetnameById(getAllianceSubCommander($alliance_id)); ?> <? } else { echo '-'; } ?></td> </tr> <tr> <td width="150">Alliance start date:</td>