当前位置: 首页>>代码示例>>PHP>>正文


PHP osc_recaptcha_items_enabled函数代码示例

本文整理汇总了PHP中osc_recaptcha_items_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_recaptcha_items_enabled函数的具体用法?PHP osc_recaptcha_items_enabled怎么用?PHP osc_recaptcha_items_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了osc_recaptcha_items_enabled函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

    ?>
</label>
                                </div>
                            </div>
                        </div>
                        <?php 
}
if ($edit) {
    ItemForm::plugin_edit_item();
} else {
    ItemForm::plugin_post_item();
}
?>
                        <div class="control-group">
                            <?php 
if (osc_recaptcha_items_enabled()) {
    ?>
                                <div class="controls">
                                    <?php 
    osc_show_recaptcha();
    ?>
                                </div>
                            <?php 
}
?>
                            <div class="controls">
                                <button type="submit" class="ui-button ui-button-middle ui-button-main"><?php 
if ($edit) {
    _e("Update", 'bender');
} else {
    _e("Publish", 'bender');
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:item-post.php

示例2: osc_logged_user_item_validation

                                    <div class="separate-top-medium">
                                        <label>
                                            <input type="checkbox" <?php 
echo osc_logged_user_item_validation() ? 'checked="checked"' : '';
?>
 name="logged_user_item_validation" value="1" />
                                            <?php 
_e("Logged in users don't need to validate their listings");
?>
                                        </label>
                                    </div>
                                </div>
                                <div class="separate-top-medium">
                                    <label>
                                        <input type="checkbox" <?php 
echo osc_recaptcha_items_enabled() == '0' ? '' : 'checked="checked"';
?>
 name="enabled_recaptcha_items" value="1" />
                                        <?php 
_e('Show reCAPTCHA in add/edit listing form');
?>
                                    </label>
                                    <div class="help-box"><?php 
_e('<strong>Remember</strong> that you must configure reCAPTCHA first');
?>
</div>
                                </div>
                            </div>
                        </div>
                        <div class="form-row">
                            <div class="form-label"> <?php 
开发者ID:mylastof,项目名称:os-class,代码行数:31,代码来源:settings.php

示例3: _e

    ?>
                                        </div>
                                    </div>
                                    <label for="showEmail" style="width: 250px;"><?php 
    _e('Show e-mail on the listing page', 'classified');
    ?>
</label>
                                </div>
                            <?php 
}
?>
                            <?php 
ItemForm::plugin_post_item();
?>
                            <?php 
if (osc_recaptcha_items_enabled() && !osc_is_web_user_logged_in()) {
    ?>
                            <div class="form-group control-group">
                                <div class="controls">
                                    <?php 
    osc_show_recaptcha();
    ?>
                                </div>
                            </div>
                            <?php 
}
?>
                        <div class="form-group control-group centered">
                            <?php 
if (nc_osc_premium_fee_enabled()) {
    ?>
开发者ID:jhalendra,项目名称:classmandu,代码行数:31,代码来源:item-post.php

示例4: doModel

 function doModel()
 {
     //calling the view...
     $locales = OSCLocale::newInstance()->listAllEnabled();
     $this->_exportVariableToView('locales', $locales);
     switch ($this->action) {
         case 'item_add':
             // post
             if (osc_reg_user_post() && $this->user == null) {
                 osc_add_flash_warning_message(_m('Only registered users are allowed to post listings'));
                 Session::newInstance()->_setReferer(osc_item_post_url());
                 $this->redirectTo(osc_user_login_url());
             }
             $countries = Country::newInstance()->listAll();
             $regions = array();
             if (isset($this->user['fk_c_country_code']) && $this->user['fk_c_country_code'] != '') {
                 $regions = Region::newInstance()->findByCountry($this->user['fk_c_country_code']);
             } else {
                 if (count($countries) > 0) {
                     $regions = Region::newInstance()->findByCountry($countries[0]['pk_c_code']);
                 }
             }
             $cities = array();
             if (isset($this->user['fk_i_region_id']) && $this->user['fk_i_region_id'] != '') {
                 $cities = City::newInstance()->findByRegion($this->user['fk_i_region_id']);
             } else {
                 if (count($regions) > 0) {
                     $cities = City::newInstance()->findByRegion($regions[0]['pk_i_id']);
                 }
             }
             $this->_exportVariableToView('countries', $countries);
             $this->_exportVariableToView('regions', $regions);
             $this->_exportVariableToView('cities', $cities);
             $form = count(Session::newInstance()->_getForm());
             $keepForm = count(Session::newInstance()->_getKeepForm());
             if ($form == 0 || $form == $keepForm) {
                 Session::newInstance()->_dropKeepForm();
             }
             if (Session::newInstance()->_getForm('countryId') != "") {
                 $countryId = Session::newInstance()->_getForm('countryId');
                 $regions = Region::newInstance()->findByCountry($countryId);
                 $this->_exportVariableToView('regions', $regions);
                 if (Session::newInstance()->_getForm('regionId') != "") {
                     $regionId = Session::newInstance()->_getForm('regionId');
                     $cities = City::newInstance()->findByRegion($regionId);
                     $this->_exportVariableToView('cities', $cities);
                 }
             }
             $this->_exportVariableToView('user', $this->user);
             osc_run_hook('post_item');
             $this->doView('item-post.php');
             break;
         case 'item_add_post':
             //post_item
             osc_csrf_check();
             if (osc_reg_user_post() && $this->user == null) {
                 osc_add_flash_warning_message(_m('Only registered users are allowed to post listings'));
                 $this->redirectTo(osc_base_url(true));
             }
             $mItems = new ItemActions(false);
             // prepare data for ADD ITEM
             $mItems->prepareData(true);
             // set all parameters into session
             foreach ($mItems->data as $key => $value) {
                 Session::newInstance()->_setForm($key, $value);
             }
             $meta = Params::getParam('meta');
             if (is_array($meta)) {
                 foreach ($meta as $key => $value) {
                     Session::newInstance()->_setForm('meta_' . $key, $value);
                     Session::newInstance()->_keepForm('meta_' . $key);
                 }
             }
             if (osc_recaptcha_items_enabled() && osc_recaptcha_private_key() != '') {
                 if (!osc_check_recaptcha()) {
                     osc_add_flash_error_message(_m('The Recaptcha code is wrong'));
                     $this->redirectTo(osc_item_post_url());
                     return false;
                     // BREAK THE PROCESS, THE RECAPTCHA IS WRONG
                 }
             }
             if (!osc_is_web_user_logged_in()) {
                 $user = User::newInstance()->findByEmail($mItems->data['contactEmail']);
                 // The user exists but it's not logged
                 if (isset($user['pk_i_id'])) {
                     foreach ($mItems->data as $key => $value) {
                         Session::newInstance()->_keepForm($key);
                     }
                     osc_add_flash_error_message(_m('A user with that email address already exists, if it is you, please log in'));
                     $this->redirectTo(osc_user_login_url());
                 }
             }
             $banned = osc_is_banned($mItems->data['contactEmail']);
             if ($banned == 1) {
                 osc_add_flash_error_message(_m('Your current email is not allowed'));
                 $this->redirectTo(osc_item_post_url());
             } else {
                 if ($banned == 2) {
                     osc_add_flash_error_message(_m('Your current IP is not allowed'));
                     $this->redirectTo(osc_item_post_url());
//.........这里部分代码省略.........
开发者ID:oanav,项目名称:closetshare,代码行数:101,代码来源:item.php

示例5: osc_admin_base_url

                    <div style="padding: 20px;">
                        <form action="<?php 
echo osc_admin_base_url(true);
?>
" method="post">
                            <input type="hidden" name="page" value="settings" />
                            <input type="hidden" name="action" value="items_post" />

                            <div style="float: left; width: 50%;">
                                <fieldset>
                                    <legend><?php 
_e('Settings');
?>
</legend>
                                    <input style="height: 20px; padding-left: 4px;padding-top: 4px;" type="checkbox" <?php 
echo osc_recaptcha_items_enabled() ? 'checked="true"' : '';
?>
 name="enabled_recaptcha_items" id="enabled_recaptcha_items" value="1" />
                                    <label for="enabled_recaptcha_items"><?php 
_e('Enable reCAPTCHA');
?>
</label>
                                    <br/>
                                    <input style="height: 20px; padding-left: 4px;padding-top: 4px;" type="checkbox" <?php 
echo osc_item_validation_enabled() ? 'checked="true"' : '';
?>
 name="enabled_item_validation" onclick="checkbox_change();" id="enabled_item_validation" value="1" />
                                    <label for="enabled_item_validation"><?php 
_e('Enable item validation by users');
?>
</label>
开发者ID:hashemgamal,项目名称:OSClass,代码行数:31,代码来源:items.php


注:本文中的osc_recaptcha_items_enabled函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。