<?php
/* 
* Theme: PREMIUMPRESS CORE FRAMEWORK FILE
* Url: www.premiumpress.com
* Author: Mark Fail
*
* THIS FILE WILL BE UPDATED WITH EVERY UPDATE
* IF YOU WANT TO MODIFY THIS FILE, CREATE A CHILD THEME
*
* http://codex.wordpress.org/Child_Themes
*/
if (!defined('THEME_VERSION')) {	header('HTTP/1.0 403 Forbidden'); exit; }
 
global $post, $userdata, $CORE; 


ob_start();
?>
<a name="toplisting"></a>
 

<div id="Tabs">
	
    <?php if($userdata->ID){ ?>
    
    <script> function refreshcar(){ jQuery(window).trigger('resize'); }	 </script>
    
    <ul class="nav nav-tabs" role="tablist">
    
        <li role="presentation" class="active"><a href="#t1" onclick="refreshcar();" aria-controls="home" role="tab" data-toggle="tab"><?php echo $CORE->_e(array('single','34')); ?></a></li>
        
        <li role="presentation" class="wftab"><a href="#t3" aria-controls="profile" role="tab" data-toggle="tab"><?php echo $CORE->_e(array('mjob','14')); ?></a></li>   
    
    </ul>
    
    <?php } ?>

 
    <div class="tab-content">
    
    <div role="tabpanel" class="tab-pane active" id="t1">
 
    
        <div class="panel panel-default"> 
        
        <span class="big">[STICKER]</span> 
        
        <div class="panel-body">
        
        	<div class="wrap">
                
            	<h1>[TITLE-NOLINK]</h1> 
					
                <span class="pull-right hidden-sm hidden-xs">[FAVS]</span>

                [TIMESINCE text_before="Posted "]

   			<hr style="margin-top:10px;" />
    
            <ul class="list-inline">
            
            	<li class="pull-right">[D_SOCIAL] </li> 
                   
            	<li>[RATING style=feedback readonly=1 results=1 text="Feedback"]</li>
                
            </ul>
    
    		<hr />
    
   			[IMAGES]
    
    		<hr  style="margin-bottom:10px;" />
    
 			[INFOBAR]
    
    		<hr />
     
  			[BUYBAR]
  
  			[D_FEEDBACK pid="<?php echo $post->ID; ?>"]
            
    </div>
    
 
 
 
    <div class="wrap" style="margin-top:20px;">
    
       <h2><?php echo $CORE->_e(array('mjob','24')); ?></h2>
    
    <hr />
    [CONTENT]
    </div>

   
</div>
</div>


</div>

<?php if($userdata->ID){ ?>

<div role="tabpanel" class="tab-pane" id="t3">

    <div class="panel panel-default"> 
    <div class="panel-body">
     
        <h2><?php echo $CORE->_e(array('mjob','14')); ?></h2>
        
        <hr />
        <div class="wrap">
        [WORKFLOW]
        </div>
        
    </div>
    </div>

</div>

<?php } ?>

</div>
</div>
 

 
<div class="clearfix"></div>


<?php if(isset($_GET['bbid']) && is_numeric($_GET['bbid']) ){ ?>
<script>
jQuery(document).ready(function() {
	jQuery('#Tabs a[href="#t3"]').tab('show');
	jQuery('#b<?php echo $_GET['bbid']; ?>').collapse('show');
});
</script>
<?php } ?>
<?php if(isset($_GET['wf'])){ ?>
<script>
jQuery(document).ready(function() {
	jQuery('#Tabs a[href="#t3"]').tab('show');
	jQuery('#b1').collapse('show');
});
</script>
<?php } ?>

<?php $SavedContent = ob_get_clean(); 
echo hook_item_cleanup($CORE->ITEM_CONTENT($post, hook_content_single_listing($SavedContent)));

?>