<?php
/*================================================================+\
|| # PHPRetro - An extendable virtual hotel site and management
|+==================================================================
|| # Copyright (C) 2009 Yifan Lu. All rights reserved.
|| # http://www.yifanlu.com
|| # Parts Copyright (C) 2009 Meth0d. All rights reserved.
|| # http://www.meth0d.org
|| # All images, scripts, and layouts
|| # Copyright (C) 2009 Sulake Ltd. All rights reserved.
|+==================================================================
|| # PHPRetro is provided "as is" and comes without
|| # warrenty of any kind. PHPRetro is free software!
|| # License: GNU Public License 3.0
|| # http://opensource.org/licenses/gpl-license.php
\+================================================================*/

$page['allow_guests'] = true;
require_once('./includes/core.php');
require_once('./includes/session.php');
$lang->addLocale("credits.credits");

$page['id'] = "jobs_create";
$page['name'] = 'Create Business';
$page['bodyid'] = "home";
$page['cat'] = "bussiness";

require_once('./templates/community_header.php');

$getCorpID = $input->FilterText($_GET['id']);
?>

<div id="container">
	<div id="content" style="position: relative" class="clearfix">
    <div id="column1" class="column">

    <div class="habblet-container ">

<?php
$getRank = mysql_query("SELECT * FROM jobs_ranks WHERE corp_id = '".$getCorpID."';");
$count = mysql_num_rows($getRank);
for ($i=1; $i<=$count; $i++)
{
  $getRankInfo = mysql_query("SELECT * FROM jobs_ranks WHERE corp_id = '".$getCorpID."' && job_rank = '".$i."'");
  $rankInfo = mysql_fetch_array($getRankInfo);
  $getUserInfo = mysql_query("SELECT * FROM users WHERE secure_id = '".$rankInfo['id']."'");
?>
  						<div class="cbb clearfix blue ">

							<h2 class="title"><?php echo $rankInfo['motto'].' ('.mysql_num_rows($getUserInfo).')'; ?>
							</h2>
<p class="credits-countries-select">
<?php
while($UserInfo = mysql_fetch_array($getUserInfo)){
  echo '<img src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$UserInfo['figure'].'&size=s&direction=2&head_direction=3&gesture=sml&size=m" align="left"><strong><a href="#">'.$UserInfo['name'].'</a></strong><br />'.$UserInfo['mission'].'<br /><br />Last visit: '.$UserInfo['lastvisit'].'<br /><br />';
}
?>
</p>
				                </div>
<?php
}
?>

				</div>
</div>
<div id="column2" class="column">
				<div class="habblet-container ">
						<div class="cbb clearfix blue ">
<?php
$getCorp = mysql_query("SELECT * FROM jobs_corps WHERE id = '".$getCorpID."'");
$corpInfo = mysql_fetch_array($getCorp);
$getOwner = mysql_query("SELECT * FROM users WHERE id = '".$corpInfo['owner']."'");
$owner = mysql_fetch_array($getOwner);
?>
							<h2 class="title"><?php echo $corpInfo['corp_name']; ?>
							</h2>
						<div id="purse-habblet">

<div class="box-content">
<?php echo '<strong>Balance</strong>: '.$corpInfo['corp_balance']; ?>
</div>
</div>


					</div>
						<div class="cbb clearfix blue ">
							<h2 class="title">Owner
							</h2>
						<div id="purse-habblet">

<div class="box-content">
<?php
echo '<img src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$owner['figure'].'&size=b&direction=2&head_direction=3&gesture=sml&size=m" align="left"><a href="#"><strong>'.$owner['name'].'</strong></a><br />'.$owner['mission'].'<br /><br /><strong>Last visit</strong>:<br />'.$owner['lastvisit'];
?>
</div>
</div>


					</div>
				</div


<?php require_once('./templates/community_footer.php'); ?>