<?php
if ( !eregi( "modules.php", $_SERVER['PHP_SELF'] ) ) {
die(_accessdirectly);
}
$query = "select * from ".$prefix."_character_characters where charid = '$id'";
$result = sql_query($query, $dbi);
$num = sql_num_rows($result);
if(!$num)
die (_nocharacter);
$line = sql_fetch_array($result);
if($userid != $line['userid'])
die("Access Denied");
$strings = array_merge($pre['string'],$during['string'],$post['string']);
$digits = array_merge($pre['digits'],$during['digits'],$post['digits']);
include("modules/$module_name/includes/checkvars.php");
foreach ($all as $a){
${$a} = $line[$a];
}
include("modules/$module_name/includes/checkvars.php");
echo"<div align=center>
<p> <a href=\"modules.php?name=$module_name&mode=pub&hash=$pubhash\" target=\"_blank\">"._pub_url_this."</a> "._pub_url_sentence."
<center><table width=\"600\" border=\"0\">
<td width=25%>"._charname.":</td>
<td width=25%> $charname</td>
<td width=25%>"._virtue.":</td>
<td width=25% align=right>".constant("_".$virtue)." </td>
<tr>
<td width=25%>"._embraced.":</td>
<td width=25%> $embraced</td>
<td width=25%>"._vice.":</td>
<td width=25% align=right>".constant("_".$vice)." </td>
<tr>
<td width=25%>"._concept.":</td>
<td width=25%> $concept</td>
<td width=25%>"._clan.":</td>
<td width=25% align=right>".constant("_".$clan)." </td></tr>
<tr>
<td width=25%>"._age.":</td>
<td width=25%> $age</td>
<td width=25%>"._gender.":</td>
<td width=25% align=right>".constant("_".$gender)." </td></tr>
<tr>
<td width=25%>"._bloodline.":</td>
<td width=25%> $bloodline</td>
<td width=25%>"._covenant."</td>
<td width=25% align=right>".constant("_".$covenant)." </td></tr>
</table>
</div>"
;
echo"<div align=center><table width=\"600\" border=\"0\">"
. " <tr>"
. " <td width=\"25%\" valign=\"bottom\"><table width=\"100%\" border=\"0\" cellspacing=\"7\">"
. " <tr>"
. " <th>"._power."</th>"
. " </tr>"
. " <tr>"
. " <th>"._finesse."</th>"
. " </tr>"
. " <tr>"
. " <th>"._resistance."</th>"
. " </tr>"
. " </table></td>";
foreach ($stats as $headerkey => $column) {
echo " <td width=\"25%\"><table width=\"100%\" border=\"1\">"
. " <tr><th>$headerkey</th></tr>";
foreach($column as $rowkey => $row )
{
echo" <tr>"
. " <td><table width=\"100%\" border=\"0\">"
. " <tr>"
. " <td>$row</td>"
. " <td align=right>".${$rowkey}." </td>"
. " </tr>"
. " </table></td>"
. " </tr>";
}
echo " </table></td>";
}
echo " </tr>"
. "</table>"
."";
echo"<table width=\"600\" border=\"0\">"
. " <tr>";
foreach($skills as $headerkey => $column)
{
echo " <td width=\"33%\"><table width=\"100%\" border=\"1\">"
. " <tr>"
. " <th>$headerkey</th>"
. " </tr>";
foreach($column as $rowkey => $row )
{
echo " <tr>"
. " <td><table width=\"100%\" >"
. " <tr>"
. " <td>$row</td>"
. " <td align=\"right\">".${$rowkey}." </td>"
. " </tr>"
. " </table></td>"
. " </tr>";
}
echo " </table></td>";
}
echo " </tr>"
. "</table>"
."</div>";
echo "
<div align=center valign=top><table width=\"600\">
<tr>";
$numextras = 0;
foreach($extra as $key => $values)
{
echo "<td valign=top width=33%>
<table width=100% valign=top border=\"1\">
<tr><th>$key</th></tr>
";
$numextras++;
//echo $values['name']."<br>";
$query = "SELECT * FROM ".$prefix."_character_".$values['name']."s WHERE charid='$id'";
//echo $query."<br>";
$result = sql_query($query, $dbi);
$objectnum = sql_num_rows($result);
//$objectnum = 0;
for($m = 0; $m < $objectnum; $m++) {
$line = sql_fetch_array($result);
$objectlist[$m][$values['name']] = $line[$values['name2'].'id'];
if($values['hasdots'])
$objectlist[$m]['dots'] = $line['dots'];
if($values['hasvalue'])
$objectlist[$m]['value'] = $line['value'];
}
for($m = 0; $m < $objectnum; $m++) {
//echo $values['name']."<br>";
echo "<tr><td><table width=100%><tr><td> ".get_value($objectlist[$m][$values['name']],$values['name'],$values['name']."table")." "
.$objectlist[$m]['dots'];
if($objectlist[$m]['value'] != "")
echo " (".$objectlist[$m]['value'].")";
echo"<input type=\"hidden\" name=\"".$values['name']."$m\" value=\"".$objectlist[$m][$values['name']]."\">";
if($values['hasdots'])
echo" <input type=\"hidden\" name=\"".$values['name']."dots$m\" value=\"".$objectlist[$m]['dots']."\">";
if($values['hasvalue'])
echo" <input type=\"hidden\" name=\"".$values['name']."value"."$m\" value=\"".$objectlist[$m]['value']."\"></td>";
echo" <td align=right> <input type=\"hidden\" name=\"".$values['name']."num\" value=\"$objectnum\"></td>"
."</tr></table></td></tr>";
}
echo "
</table>
</td>";
unset ($objectlist);
unset ($objectnum);
if($numextras %3 == 0)
echo "</tr><tr>";
}
echo "</tr></table></center>";
echo "<div align = center>
<table width=300 border=1>
<tr>
<td>"._size.": $size</td>
<td>"._health.": $health</td></tr>
<tr>
<td>"._speed.": $speed</td>
<td>"._willpower.": ".$willpowertemp."/".$willpower."</td></tr>
<tr>
<td>"._init.": $init</td>";
if($vampire){
echo "<td>"._humanity.": $humanity </td>";}
else{
echo "<td>"._morality.": $humanity </td>";}
echo "
</tr>
<tr>
<td>"._defense.": $defense</td>
<td>"._potency.": $potency</td></tr>
<tr>
<td>"._vitae.": $currentvitae/$maxvitae</td>
<td>"._unspentxp.": $xp</td></tr>
<tr><td>"._neededxp." ".($potency+1).": $vxp</td></tr>
</table></div>";
echo "<div align=left><br>"._equipment.":<br>
$equipment<br>
<br>
"._owned.":<br>
$owned<br>
<br>
"._description.":<br>
$description
<br><br>
"._details.":<br>
$details
<br><br>
"._background.":<br>
$background
<br><br>
"._experience.":<br>
$experience
<br><br>
</div>";
?>