2017-10-27 3 views
0

안녕하세요 저는 Osclass 스크립트를 사용하고 있으며 내 항목 게시 페이지의 게시 버튼에 문제가 있습니다!로그인 한 사용자와 로그 아웃 한 사용자를위한 버튼 게시

See image publish button

리스팅 위치 : 게시 버튼은 등록되지 않은 사용자를 위해 숨길 필요하고, 등록 된 사용자 나타납니다.

로그 아웃 할 때이 코드를 숨기려면 어떻게 변경합니까?

<?php if(!osc_is_web_user_logged_in()) { ?> 

게시자 정보 : 등록되지 않은 사용자는 게시 단추가 필요하고 등록 된 사용자는 숨길 필요가 있습니다. 이것을 위해 나는이 코드를 사용하고 이것이 위대한 작품처럼 보입니다!

<?php if(!osc_is_web_user_logged_in()) { ?> 
<fieldset> 
    <h2> 
    <strong><?php _e("Publisher Information", 'ctg_housing'); ?></strong> 
    </h2> 
    <div class="item-post-user-name item-post-columns"> 
    <label class="control-label" for="contactName"> 
     <span class="required_fields">*</span> 
     <?php _e('Name', 'ctg_housing'); ?> 
    </label> 
    <?php ItemForm::contact_name_text(); ?> 
    </div> 
    <div class="item-post-user-email item-post-columns"> 
    <label class="control-label" for="contactEmail"> 
     <span class="required_fields">*</span> 
     <?php _e('E-mail', 'ctg_housing'); ?> 
    </label> 
    <?php ItemForm::contact_email_text(); ?> 
    </div> 
    <div class="clearfix"></div> 
    <div id="submit-button" class="item-post-button text-center"> 
    <button type="submit" class="small button_radius"> 
     <?php if($edit) { _e("Update Listing", 'ctg_housing'); } else { _e("Publish Listing", 'ctg_housing'); } ?> 
    </button> 
    </div> 
</fieldset> 
<?php } ?> 

감사

답변

0

여기에 대답을 해결!

 <?php if(osc_is_web_user_logged_in()) { ?> 
 
     <fieldset> 
 
      <h2> 
 
      <strong><?php _e('Listing Location', 'ctg_housing'); ?></strong> 
 
      </h2> 
 
      <?php $aCountries = Country::newInstance()->listAll(); ?> 
 
      <?php $TwoCountry = false ; if(count($aCountries) > 1) { $TwoCountry = true ; ?> 
 
      <div class="item-post-country"> 
 
      <label class="control-label" for="country"> 
 
       <span class="required_fields">* </span> 
 
       <?php _e('Country', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::country_select(osc_get_countries()); ?> 
 
      </div> 
 
      <?php } else { ?> 
 
      <input type="hidden" name="countryId" id="countryId" value="<?php echo ctg_country_id(); ?>" /> 
 
      <?php } ?> 
 
      <div class="item-post-province"> 
 
      <label class="control-label" for="region"> 
 
       <span class="required_fields">* </span> 
 
       <?php _e('Province', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::region_select(osc_get_regions()); ?> 
 
      </div> 
 
      <div class="item-post-region"> 
 
      <label class="control-label" for="city"> 
 
       <span class="required_fields">* </span> 
 
       <?php _e('Region', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::city_select(osc_get_cities()); ?> 
 
      </div> 
 
      <div class="clearfix"></div> 
 
      <div id="submit-button" class="item-post-button text-center"> 
 
      <button type="submit" class="small button_radius"> 
 
       <?php if($edit) { _e("Update Listing", 'ctg_housing'); } else { _e("Publish Listing", 'ctg_housing'); } ?> 
 
      </button> 
 
      </div> 
 
     </fieldset> 
 
     <?php } else { ?> 
 
     <fieldset> 
 
      <h2> 
 
      <strong><?php _e('Listing Location', 'ctg_housing'); ?></strong> 
 
      </h2> 
 
      <?php $aCountries = Country::newInstance()->listAll(); ?> 
 
      <?php $TwoCountry = false ; if(count($aCountries) > 1) { $TwoCountry = true ; ?> 
 
      <div class="item-post-country"> 
 
      <label class="control-label" for="country"> 
 
       <span class="required_fields">* </span> 
 
       <?php _e('Country', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::country_select(osc_get_countries()); ?> 
 
      </div> 
 
      <?php } else { ?> 
 
      <input type="hidden" name="countryId" id="countryId" value="<?php echo ctg_country_id(); ?>" /> 
 
      <?php } ?> 
 
      <div class="item-post-province"> 
 
      <label class="control-label" for="region"> 
 
       <span class="required_fields">* </span> 
 
       <?php _e('Province', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::region_select(osc_get_regions()); ?> 
 
      </div> 
 
      <div class="item-post-region"> 
 
      <label class="control-label" for="city"> 
 
       <span class="required_fields">* </span> 
 
       <?php _e('Region', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::city_select(osc_get_cities()); ?> 
 
      </div> 
 
     </fieldset> 
 
     <fieldset> 
 
      <h2> 
 
      <strong><?php _e("Publisher Information", 'ctg_housing'); ?></strong> 
 
      </h2> 
 
      <div class="item-post-user-name item-post-columns"> 
 
      <label class="control-label" for="contactName"> 
 
       <span class="required_fields">*</span> 
 
       <?php _e('Name', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::contact_name_text(); ?> 
 
      </div> 
 
      <div class="item-post-user-email item-post-columns"> 
 
      <label class="control-label" for="contactEmail"> 
 
       <span class="required_fields">*</span> 
 
       <?php _e('E-mail', 'ctg_housing'); ?> 
 
      </label> 
 
      <?php ItemForm::contact_email_text(); ?> 
 
      </div> 
 
      <div class="clearfix"></div> 
 
      <div id="submit-button" class="item-post-button text-center"> 
 
      <button type="submit" class="small button_radius"> 
 
       <?php if($edit) { _e("Update Listing", 'ctg_housing'); } else { _e("Publish Listing", 'ctg_housing'); } ?> 
 
      </button> 
 
      </div> 
 
     </fieldset> 
 
     <?php } ?>

관련 문제