<?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'] = "myjob";
$page['name'] = 'My Job';
$page['bodyid'] = "home";
$page['cat'] = "bussiness";
require_once('./templates/community_header.php');
?>


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

				<div class="habblet-container ">
						<div class="cbb clearfix green ">

							<h2 class="title"><span style="float: left;">My Job</span>
							</h2>
<div class="box-content">
<?php
$getinfo = mysql_query("SELECT * FROM users WHERE name = '$user->name'");
$info = mysql_fetch_array($getinfo);
if($info['corp_id'] == 0 || $info['job_rank'] == 0) {
   echo 'Sorry, but you do not have a job.';
}else{
      $getmoreinfo = mysql_query("SELECT * FROM jobs_ranks WHERE corp_id = '".$info['corp_id']."' && job_rank = '$info[job_rank]'");
      $moreinfo = mysql_fetch_array($getmoreinfo);
      $getevenmoreinfo = mysql_query("SELECT * FROM jobs_corps WHERE id = '$moreinfo[corp_id]'");
      $s = mysql_fetch_array($getevenmoreinfo);
      echo '<strong>'.$moreinfo['motto'].'</strong><br />Employer: <a href="'.PATH.'/jobs_info?id='.$s['id'].'">'.$s['corp_name'].'</a><br />Salary: '.$moreinfo['pay'].'<br /><br /><strong>Work room(s):</strong><br />';
      $get_rooms = mysql_query("SELECT * FROM jobs_rooms WHERE rank_id = '".$info['secure_id']."'");
      if($moreinfo['global'] == 1)
      {
          echo 'You can work in any room.';
      }
      else
      {
          while ($get_rooms_info = mysql_fetch_array($get_rooms)) {
              echo $get_rooms_info['room_id'].'<br />';
          }
      }
}
?>
</div>
</div>

<div class="habblet-container ">
						<div class="cbb clearfix green ">

							<h2 class="title"><span style="float: left;">Corporation Details</span>
							</h2>
<div class="box-content">




Badge: <br>
Balance:  <br>
Stock Value: <br>

</div>
</div>
</div>

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

							<h2 class="title"><span style="float: left;">Recent Activity</span>
							</h2>
<div class="box-content">
<table>
<tr colspan="3 width="200">
<td><b>Target</b></td>
<td><b>Master</b></td>
<td><b>Action</b></td>
</tr>

</table>





						<script type="text/javascript">
L10N.put("credits.navi.read_more", "Read more");
L10N.put("credits.navi.close_fulltext", "Close instructions");
PaymentMethodHabblet.init();
</script>


					</div>
</div>

				</div>


				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>

<div class="habblet-container ">
						
					</div>
				</div>


</div>
</div>


				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>




<script type="text/javascript">
HabboView.run();
</script>
<?php require_once('./templates/community_footer.php'); ?>
