$this->output .= $this->html->photo_page($cur_photo, $cur_type, $url_photo, $show_size, $this->md5_check);
if ($p_max)
{
$this->output = str_replace( "<!--IPB.UPLOAD-->", $this->html->photo_page_upload($p_max * 1024), $this->output );
}
$size_html = $ibforums->vars['disable_ipbsize'] ? $this->html->photo_page_mansize() : $this->html->photo_page_autosize();
$this->output = str_replace( "<!--IPB.SIZE-->", $size_html, $this->output );
}
function rpg_statistics(){
global $ibforums, $DB, $std, $print;
$DB->query("SELECT * FROM ibf_members WHERE id='".$ibforums->member['id']."'");
$member = $DB->fetch_row();
// buy items, meh whats the point, oooh wait, you can equip them to increase stats, lets go baby!
$DB->query("select * from ibf_members where id='{$ibforums->member['id']}'");
$member=$DB->fetch_row();
//-- summon end
// HP Bar
$hp = $member['hp'];
$hpm= $member['hpm'];
$hpa= $hp/$hpm;
$hpa= $hpa*100;
$member['hpd']=$hpa;
// MP Bar
$mp = $member['mp'];
$mpm= $member['mpm'];
$mpa= $mp/$mpm;
$mpa= $mpa*100;
$member['mpd']=$mpa;
// DEF Bar
$def= $member['def'];
$defm=$hpm;
$defa=$def/$defm;
$defa=$defa*100;
$member['defd']=$defa;
// STR Bar
$str= $member['str'];
$strm=$hpm;
$stra=$str/$strm;
$stra=$stra*100;
$member['strd']=$stra;
if($member['strd'] > 100){
$member['strd']=100;
}
if($member['defd'] > 100){
$member['defd']=100;
}
if($member['inclan'] != ""){
$member['clanner'] = "<a href='{$ibforums->base_url}act=RPG&CODE=ViewClan&clan={$member['inclan']}'>{$member['inclan']}</a>";
}
else
{
$member['clanner'] = "Not in a clan";
}
//@@ avatar max
$DB->query("SELECT * FROM ibf_rpgoptions where id='1'");
$rpgoptions=$DB->fetch_row();
//@@ avatar max end
// ok, lets paste the data
$this->output .= $this->html->rpgstats($member);
$this->page_title = $ibforums->lang['t_welcome'];
$this->nav = array( "<a href='".$this->base_url."&act=UserCP&CODE=00'>".$ibforums->lang['t_title']."</a>",
"RPG Profile",
);
}
// we need a rpg profile page? coming up!
function rpg_profile(){
global $ibforums, $DB, $std, $print;
// Lets get your stats
$DB->query("SELECT * FROM ibf_members WHERE id='".$ibforums->member['id']."'");
$member = $DB->fetch_row();
$DB->query("SELECT * FROM ibf_races ORDER BY id");
$races="";
while($graces = $DB->fetch_row()){
$races.="<option value='{$graces['race']}'>{$graces['race']}</option>";
}
$DB->query("SELECT * FROM ibf_rpgelements ORDER BY id");
$elements="";
while($gelm = $DB->fetch_row()){
$elements.="<option value='{$gelm['element']}'>{$gelm['element']}</option>";
}
//-- we would like to summon - because im a lazy ass and cbf attacking
$summonx="";
$summonx.="<option value='' mp=''>None</option>";
$DB->query("SELECT * FROM ibf_infernosummon");
while($summon = $DB->fetch_row()){
if($summon['lvl'] <= $member['level']){
$summonx.="<option value='{$summon['id']}' mp='{$summon['mp']}'>{$summon['name']}</option>";
}}
//-- summon end
//@@ avatar max
$DB->query("SELECT * FROM ibf_rpgoptions where id='1'");
$rpgoptions=$DB->fetch_row();
//@@ avatar max end
// ok, lets paste the data
$this->output .= $this->html->RPGProfile($member,$races,$elements,$summonx,$rpg options);