Пример #1
0
/**
 * Gets number of comments validated of current user
 *
 * @return int
 */
function osc_user_comments_validated()
{
    return osc_user_field("i_comments");
}
Пример #2
0
</label>
                                <div class="controls">
                                    <?php 
    ItemForm::country_select(osc_get_countries(), osc_user());
    ?>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="regionId"><?php 
    _e('Region', 'bender');
    ?>
</label>
                                <div class="controls">
                                    <?php 
    if (bender_default_location_show_as() == 'dropdown') {
        ItemForm::region_select(osc_get_regions(osc_user_field('fk_c_country_code')), osc_user());
    } else {
        ItemForm::region_text(osc_user());
    }
    ?>
                                </div>
                            </div>
                            <?php 
} else {
    $aCountries = osc_get_countries();
    $aRegions = osc_get_regions($aCountries[0]['pk_c_code']);
    ?>
                            <input type="hidden" id="countryId" name="countryId" value="<?php 
    echo osc_esc_html($aCountries[0]['pk_c_code']);
    ?>
"/>
    function user_info_js()
    {
        $location = Rewrite::newInstance()->get_location();
        $section = Rewrite::newInstance()->get_section();
        if ($location === 'user' && in_array($section, array('dashboard', 'profile', 'alerts', 'change_email', 'change_username', 'change_password', 'items'))) {
            $user = User::newInstance()->findByPrimaryKey(Session::newInstance()->_get('userId'));
            View::newInstance()->_exportVariableToView('user', $user);
            ?>
            <script type="text/javascript">
                var pop = window.pop || {};
                pop.user = {};
                pop.user.id = '<?php 
            echo osc_user_id();
            ?>
';
                pop.user.secret = '<?php 
            echo osc_user_field("s_secret");
            ?>
';
            </script>
            <?php 
        }
    }
Пример #4
0
                                    </div>
                                </form>
                            </div>
</div>
                      </div>
                      <div class="tab-pane" id="deleteprofile">
                      	<div class="delete-profile">
                            <p><?php 
_e('Are you sure you want to delete your account?', 'flatter');
?>
</p>
                            <a class="btn btn-danger" onclick="javascript:return confirm('<?php 
echo osc_esc_js(__('Are you sure you want to continue?', 'flatter'));
?>
')" href="<?php 
echo osc_base_url() . '?page=user&action=delete&id=' . osc_logged_user_id() . '&secret=' . osc_user_field("s_secret");
?>
" class="opt_delete_account"><?php 
_e('Delete', 'flatter');
?>
</a>
                        </div>
                      </div>
                    </div>
                	
                </div>
            </div>
            
            <div class="col-sm-3 visible-xs" style="margin-top:15px;">
            	<?php 
osc_run_hook('before-main');
Пример #5
0
function osc_user_longitude()
{
    return osc_user_field("d_coord_long");
}
Пример #6
0
?>
</label>
                                <div class="input">
                                    <select name="b_company" id="b_company">
                                        <option value="0" <?php 
if (!osc_user_field("b_company")) {
    echo 'selected="selected"';
}
 ;
?>
 ><?php 
_e('User', 'twitter');
?>
</option>
                                        <option value="1" <?php 
if (osc_user_field("b_company")) {
    echo 'selected="selected"';
}
?>
><?php 
_e('Company', 'twitter');
?>
</option>
                                    </select>
                                </div>
                            </div>
                            <div class="clearfix">
                                <label for="s_phone_mobile"><?php 
_e('Mobile phone', 'twitter');
?>
</label>
Пример #7
0
?>
</a>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label for="user_type" class="col-sm-3 control-label">User Type</label>
                                        <div class="col-sm-9">
                                            <select class="form-control" id="b_company" name="b_company">
                                                <option value="0" <?php 
if (osc_user_field('b_company') === "0") {
    echo "selected";
}
?>
>User</option>
                                                <option value="1" <?php 
if (osc_user_field('b_company') === "1") {
    echo "selected";
}
?>
>Company</option>
                                            </select>
                                        </div>
                                    </div> 
                                    <div class="form-group">
                                        <label for="phoneMobile" class="col-sm-3 control-label">Cell Phone</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="s_phone_mobile" name="s_phone_mobile" value="<?php 
echo osc_user_phone_mobile();
?>
">
                                            <i class="fa fa-mobile i-custom"></i>