Location: PHPKode > projects > VampMan: V:tR Character Manager > vampman-1.0.2/phpnuke/modules/charactersheet/preview.php
<?php
if ( !eregi( "modules.php", $_SERVER['PHP_SELF'] ) ) {
   die(_accessdirectly);
}

$form_error = false;
$form_warning = false;
$giant = false;
$dwarf = false;
$size = 5;
$speed = 5;

$strings = array_merge($pre['string'],$during['string']);
$digits = array_merge($pre['digits'],$during['digits']);

include("modules/$module_name/includes/checkvars.php");




echo"<div align=center><form action=\"modules.php?name=$module_name\" method=\"post\">
<center><table width=\"600\" border=\"0\">
<td width=25%>"._charname.":</td>
<td width=25%> <input type=\"hidden\" name=\"charname\" value=\"$charname\">$charname</td>
<td width=25%>"._virtue.":</td>
<td width=25% align=right>$virtue <input type=\"hidden\" name=\"virtue\" value=\"$virtue\"> </td>
<tr>
<td width=25%>"._embraced.":</td>
<td width=25%> <input type=\"hidden\" name=\"embraced\" value=\"$embraced\">$embraced</td>
<td width=25%>"._vice.":</td>
<td width=25% align=right>$vice <input type=\"hidden\" name=\"vice\" value=\"$vice\"> </td>
<tr>
<td width=25%>"._concept.":</td>
<td width=25%> <input type=\"hidden\" name=\"concept\" value=\"$concept\">$concept</td>
<td width=25%>"._clan.":</td>
<td width=25% align=right>$clan <input type=\"hidden\" name=\"clan\" value=\"$clan\"> </td></tr>
<tr>
<td width=25%>"._age.":</td>
<td width=25%> <input type=\"hidden\" name=\"age\" value=\"$age\">$age</td>
<td width=25%>"._gender.":</td>
<td width=25% align=right>$gender <input type=\"hidden\" name=\"gender\" value=\"$gender\"> </td></tr>
<tr>
<td width=25%>"._bloodline.":</td>
<td width=25%> <input type=\"hidden\" name=\"bloodline\" value=\"$bloodline\">$bloodline</td>
<td width=25%>"._covenant."</td>
<td width=25% align=right>$covenant <input type=\"hidden\" name=\"covenant\" value=\"$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}." <input type=\"hidden\" name=\"$rowkey\" value=\"".${$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}." <input type=\"hidden\" name=\"$rowkey\" value=\"".${$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++;

$objectnum = ${$values['name']."num"};

if($objectnum == "")
 $objectnum = 0;



for($m = 0; $m < $objectnum; $m++) {
$objectname = $values['name'].$m;

$objectlist[$m][$values['name']] = ${$objectname};
if($values['hasdots'])
{
	$objectdotname = $values['name'].'dots'.$m;
	$objectlist[$m]['dots'] = ${$objectdotname};
}

if($values['hasvalue'])
{
	$objectvaluename = $values['name'].'value'.$m;
	$objectlist[$m]['value'] = ${$objectvaluename};
}


$temp = get_value($objectlist[$m][$values['name']],$values['name'],$values['name']."table");
if($temp == "Giant")
{	$giant = true;
	$size++;

}

if($temp == "Dwarf")
{
       	$dwarf = true;
		$size--;
}

if($temp == "Blood Potency")
	$potencymerit = $objectlist[$m]['dots'];

}







for($m = 0; $m < $objectnum; $m++) {
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>";

if($clan != "Mortal" && $clan != "Ghoul" && $clan != "")
{
	$vampire = true;
}

if($vampire)
{
	$potency = 1;}

else {
	$potency = 0;
}

$potency += $potencymerit;
echo "<div align = center>

<table width=300 border=1>
<tr>
<td>"._size.": $size</td>
<td>"._health.": ".($size + $stam)."</td></tr>
<tr>
<td>"._speed.": ".($str + $dex + $speed)."</td>
<td>"._willpower.": ".($res + $comp)."</td></tr>
<tr>
<td>"._init.": ".($dex + $comp)."</td>";

if($vampire){
	echo "<td>"._humanity.": 7 </td>";}
else{
	echo "<td>"._morality.": 7 </td>";}

echo "
</tr>
<tr>
<td>"._defense.": ";
if($wits < $dex)
	echo $wits;
else
	echo $dex;


echo "</td>
<td>"._potency.": $potency</td></tr>
</table></div>";

echo "<div align=left><br>"._equipment.":<br>
<input type=hidden name = equipment value = \"$equipment\">
$equipment<br>
<br>
"._owned.":<br>
<input type=hidden name = owned value = \"$owned\">
$owned<br>
<br>
"._description.":<br>
<input type=hidden name=description value=\"$description\">
$description
<br><br>
"._details.":<br>
<input type=hidden name=details value=\"$details\">
$details
<br><br>
"._background.":<br>
<input type=hidden name=background value=\"$background\">
$background
<br><br>
"._experience.":<br>
<input type=hidden name=experience value=\"$experience\">
$experience
<br><br>
</div>";

echo "<div align=left>"._error.": <br>";
if($charname == ""){

	echo _error_name." <br>";
	$form_error = true;
}
if($virtue == "")
{
	echo _error_virtue." <br>";
	$form_error = true;
}
if($vice == "")
{
	echo _error_vice." <br>";
	$form_error = true;
}

if($clan == "")
{
	echo _error_clan." <br>";
	$form_error = true;
}

if($covenant == "")
{
	echo _error_covenant."<br>";
	$form_error = true;
}
if($gender == "")
{
	echo _error_gender."<br>";
	$form_error = true;
}

if($vampire && $embraced="")
{
	echo _error_embraced."<br>";
	$form_error = true;
}

if($age == "")
{
	echo _error_age."<br>";
	$form_error = true;
}

if($dwarf  && $giant)
{
	echo _error_giantdwarf."<br>";
	$form_error = true;
}
if($clan == "Mortal" && $disciplinenum > 0)
{
	echo _error_mortaldisc."<br>";
	$form_error = true;
}
if(!$form_error){
echo _none."<br>";
}

echo _warning.":<br>";

if($meritnum < 1)
{
	echo _warning_merits."<br>";
}

if($disciplinenum < 1 && $clan != "Mortal")
{
	echo _warning_disc."<br>";
}
echo "
</div>
<p><input type=\"submit\" name=\"submit\" value=\""._edit."\">";

if(!$form_error)
{
echo"
<input type=\"submit\" name=\"submit\" value=\""._submit."\"></form></div></p>

<br>
";}

?>
Return current item: VampMan: V:tR Character Manager