hi,
i have this code:
<ul class="nav">
<?php if( osc_users_enabled() ) { ?>
<?php if( osc_is_web_user_logged_in() ) { ?>
<?php if( osc_users_enabled() || ( !osc_users_enabled() && !osc_reg_user_post() )) { ?>
<li><a class="publish-btn" href="<?php echo osc_item_post_url() ; ?> <?php _e("New AD", 'theme');?></a></li>
<?php } ?>
<li class="dropdown profilepic">
<a class="dropdown-toggle" data-toggle="dropdown" href="">
<?php echo osc_logged_user_name(); ?></a>
<ul class="dropdown-menu">
<li><a href="<?php echo osc_user_dashboard_url(); ?>"><?php _e('My account', 'theme'); ?></a></li>
<li><a href="<?php echo osc_user_list_items_url(); ?>"><?php _e('My ads', 'theme'); ?></a></li>
<li><a href="<?php echo osc_user_logout_url(); ?>"><?php _e('Logout', 'theme'); ?></a></li>
</ul>
</li>
<?php } else { ?>
<li><a href="<?php echo osc_user_login_url(); ?>"><?php _e('Log in', 'theme') ; ?></a></li>
<?php } ?>
<?php } ?>
</ul>
what i whant to do is:
this line of code (whit New AD button)
<li><a class="publish-btn" href="<?php echo osc_item_post_url() ; ?>"> <?php _e("New AD", 'theme');?></a></li>
show only if account is company
i think something like this:
$user = User::newInstance()->fiindByPrimaryKey($id);
if($user['b_company']==1) {
//IT IS A COMPANY
} else {
// IT IS A PRIVATE USER
}
but i don't know how to use it in my code.
thanks