示例#1
0
 private function addTableHeader()
 {
     $arg_date = '&sort=date';
     if (Params::getParam('sort') == 'date') {
         if (Params::getParam('direction') == 'desc') {
             $arg_date .= '&direction=asc';
         }
     }
     $arg_item = '&sort=attached_to';
     if (Params::getParam('sort') == 'attached_to') {
         if (Params::getParam('direction') == 'desc') {
             $arg_item .= '&direction=asc';
         }
     }
     Rewrite::newInstance()->init();
     $page = (int) Params::getParam('iPage');
     if ($page == 0) {
         $page = 1;
     }
     Params::setParam('iPage', $page);
     $url_base = preg_replace('|&direction=([^&]*)|', '', preg_replace('|&sort=([^&]*)|', '', osc_base_url() . Rewrite::newInstance()->get_raw_request_uri()));
     $this->addColumn('bulkactions', '<input id="check_all" type="checkbox" />');
     $this->addColumn('file', __('File'));
     $this->addColumn('action', __('Action'));
     $this->addColumn('attached_to', '<a href="' . osc_esc_html($url_base . $arg_item) . '">' . __('Attached to') . '</a>');
     $this->addColumn('date', '<a href="' . osc_esc_html($url_base . $arg_date) . '">' . __('Date') . '</a>');
     $dummy =& $this;
     osc_run_hook("admin_media_table", $dummy);
 }
示例#2
0
function autocompleteCity()
{
    ?>
    <script type="text/javascript">
    $(function() {
                    function log( message ) {
                        $( "<div/>" ).text( message ).prependTo( "#log" );
                        $( "#log" ).attr( "scrollTop", 0 );
                    }

                    $( "#sCity" ).autocomplete({
                        source: "<?php 
    echo osc_base_url(true);
    ?>
?page=ajax&action=location",
                        minLength: 2,
                        select: function( event, ui ) {
                            $("#sRegion").attr("value", ui.item.region);
                            log( ui.item ?
                                "<?php 
    echo osc_esc_html(__('Selected', 'bender'));
    ?>
: " + ui.item.value + " aka " + ui.item.id :
                                "<?php 
    echo osc_esc_html(__('Nothing selected, input was', 'bender'));
    ?>
 " + this.value );
                        }
                    });
                });
    </script>
    <?php 
}
示例#3
0
 protected static function generic_input_checkbox($name, $value, $checked = false)
 {
     echo '<input id="' . $name . '" type="checkbox" name="' . $name . '" value="' . osc_esc_html(htmlentities($value, ENT_COMPAT, "UTF-8")) . '" ';
     if ($checked) {
         echo 'checked="checked" ';
     }
     echo '/>';
 }
示例#4
0
function printLocaleTitlePage($locales = null, $page = null)
{
    if ($locales == null) {
        $locales = osc_get_locales();
    }
    $aFieldsDescription = Session::newInstance()->_getForm("aFieldsDescription");
    $num_locales = count($locales);
    foreach ($locales as $locale) {
        $title = '';
        if (isset($page['locale'][$locale['pk_c_code']])) {
            $title = $page['locale'][$locale['pk_c_code']]['s_title'];
        }
        if (isset($aFieldsDescription[$locale['pk_c_code']]) && isset($aFieldsDescription[$locale['pk_c_code']]['s_title']) && $aFieldsDescription[$locale['pk_c_code']]['s_title'] != '') {
            $title = $aFieldsDescription[$locale['pk_c_code']]['s_title'];
        }
        $name = $locale['pk_c_code'] . '#s_title';
        echo '<div><label for="title">' . __('Title') . ' *</label>';
        echo '<div class="input-has-placeholder input-title-wide"><label for="title">' . __('Enter title here') . ' *</label>';
        echo '<input id="' . $name . '" type="text" name="' . $name . '" value="' . osc_esc_html(htmlentities($title, ENT_COMPAT, "UTF-8")) . '"  />';
        echo '</div>';
    }
}
示例#5
0
                </div>
                <div class="form-row">
                    <div class="form-label"><?php 
_e('E-mail user whenever');
?>
</div>
                    <div class="form-controls">
                        <div class="form-label-checkbox">
                            <label>
                                <input type="checkbox" <?php 
echo osc_notify_new_comment_user() ? 'checked="checked"' : '';
?>
 name="notify_new_comment_user" value="1" /> <?php 
_e("There's a new comment on his listing");
?>
                            </label>
                        </div>
                    </div>
                </div>
                <div class="form-actions">
                    <input type="submit" id="save_changes" value="<?php 
echo osc_esc_html(__('Save changes'));
?>
" class="btn btn-submit" />
                </div>
            </div>
        </fieldset>
    </form>
</div>
<?php 
osc_current_admin_theme_path('parts/footer.php');
示例#6
0
        <ul id="error_list"></ul>
        <form name="sendfriend" action="<?php 
echo osc_base_url(true);
?>
" method="post" >
            <input type="hidden" name="action" value="send_friend_post" />
            <input type="hidden" name="page" value="item" />
            <input type="hidden" name="id" value="<?php 
echo osc_item_id();
?>
" />
            <?php 
if (osc_is_web_user_logged_in()) {
    ?>
                            <input type="hidden" name="yourName" value="<?php 
    echo osc_esc_html(osc_logged_user_name());
    ?>
" />
                            <input type="hidden" name="yourEmail" value="<?php 
    echo osc_logged_user_email();
    ?>
" />
            <?php 
} else {
    ?>
            <div class="control-group">
                <label class="control-label" for="yourName"><?php 
    _e("Your name", 'bender');
    ?>
</label>
                <div class="controls ">
示例#7
0
            echo $size[1];
            ?>
" class="img-responsive"></a>
            <?php 
        }
        ?>
            <?php 
    }
    ?>
            <div class="info">
                <div class="detail_info">
                    <h4><a href="<?php 
    echo osc_item_url();
    ?>
" title="<?php 
    echo osc_esc_html(osc_item_title());
    ?>
"><?php 
    echo osc_item_title();
    ?>
</a><span><?php 
    _e('Premium', 'osclasswizards');
    ?>
</span></h4>
                    <div class="listing-attributes">
                        <?php 
    if (osc_price_enabled_at_items()) {
        ?>
                        <div class="currency-value">
                            <?php 
        echo osc_format_price(osc_item_price());
示例#8
0
?>
</div>
                    </div>

                    <div class="form-row">
                        <div class="form-controls"><?php 
printf(__('Spam listings deleted: %d', 'butler'), osc_get_preference('spam_listings', 'butler'));
?>
</div>
                    </div>

                    <div class="form-row">
                        <div class="form-controls"><?php 
printf(__('Inactivated users deleted: %d', 'butler'), osc_get_preference('activated_users', 'butler'));
?>
</div>
                    </div>

                    <div class="clear"></div>
                    <div class="form-actions">
                        <input type="submit" id="save_changes" value="<?php 
echo osc_esc_html(__('Run Butler now'));
?>
" class="btn btn-submit" />
                    </div>

                </div>
            </fieldset>
        </form>
    </div>
</div>
示例#9
0
                                    <?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']);
    ?>
"/>
                            <div class="control-group">
                                <label class="control-label" for="region"><?php 
    _e('Region', 'bender');
    ?>
</label>
                                <div class="controls">
                                  <?php 
    if (bender_default_location_show_as() == 'dropdown') {
        ItemForm::region_select($aRegions, osc_user());
    } else {
        ItemForm::region_text(osc_user());
    }
    ?>
示例#10
0
							<?php 
ItemForm::title_input('title', osc_locale_code(), osc_esc_html(flatter_item_title()));
?>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label" for="description[<?php 
echo osc_locale_code();
?>
]"><?php 
_e('Description', 'flatter');
?>
</label>
                        <div  class="col-sm-8">
                            <?php 
ItemForm::description_textarea('description', osc_locale_code(), osc_esc_html(flatter_item_description()));
?>
                        </div>
                    </div>
                    <?php 
if (osc_price_enabled_at_items()) {
    ?>
                    <div class="form-group price-group">
                        <label class="col-sm-3 control-label" for="price"><?php 
    _e('Price', 'flatter');
    ?>
</label>
                        <div class="col-sm-8" id="price">
                            <?php 
    ItemForm::price_input_text();
    ?>
示例#11
0
文件: index.php 项目: semul/Osclass
_e('OSClass is a free, open-source project, sustained by the community. Money received from donations will be used to further development and improve the project.');
?>
</p>
                                <div class="form-row">
                                    <div class="form-controls">
                                        <select name="amount" class="select-box-medium">
                                            <option value="50">50$</option>
                                            <option value="25">25$</option>
                                            <option value="10" selected>10$</option>
                                            <option value="5">5$</option>
                                            <option value=""><?php 
_e('Custom');
?>
</option>
                                        </select><input type="submit" class="btn btn-mini" name="submit" value="<?php 
echo osc_esc_html(__('Donate'));
?>
">
                                    </div>
                                </div>
                            </div>
                        </fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <div class="grid-row grid-50">
        <div class="row-wrapper">
            <div class="widget-box">
                <div class="widget-box-title"><h3><?php 
示例#12
0
文件: header.php 项目: naneri/Osclass
    _e('Your purchased items on Osclass Market will automatically appear on My Purchases tab.');
    ?>
            </p>
            <p>
                <input type="text" name="connect_user" id="connect_user" value="" placeholder="<?php 
    _e('Your market email');
    ?>
"/>
                <input type="password" name="connect_password" id="connect_password" value="" placeholder="<?php 
    _e('Your market password');
    ?>
"/>
            </p>
        </div>
        <div class="form-actions">
            <div class="wrapper">
                <a id="connect-cancel" class="btn" href="javascript:void(0);"><?php 
    _e('Cancel');
    ?>
</a>
                <a id="connect-submit" href="javascript:void(0);" class="btn" ><?php 
    echo osc_esc_html(__('Connect'));
    ?>
</a>
                <div class="clear"></div>
            </div>
        </div>
    </div>
</div>
<?php 
}
示例#13
0
echo osc_user_public_profile_url(osc_logged_user_id());
?>
"><?php 
_e('Public profile', 'pop');
?>
</a>
            </div>
        </div>
       <div class="user-menu box">
    <?php 
echo osc_private_user_menu(get_user_menu());
?>
           </div>
</div>
</div>
<div id="dialog-delete-account" title="<?php 
echo osc_esc_html(__('Delete account', 'pop'));
?>
">
<?php 
_e('Are you sure you want to delete your account?', 'pop');
?>
</div>
<script>
    $("#dialog-delete-account").dialog({
        autoOpen: false,
        modal: true,
        width: 350
    });
</script>
示例#14
0
    }
    ?>
  <div class="banner_none" id="form_vh_map">
    <form action="<?php 
    echo osc_base_url(true);
    ?>
" id="main_search" method="get" class="search nocsrf" >
      <div class="container">
        <input type="hidden" name="page" value="search"/>
        <div class="main-search">
          <div class="form-filters">
            <div class="row">
              <div class="col-md-4">
                <div class="cell">
                  <input type="text" name="sPattern" id="query" class="input-text" value="" placeholder="<?php 
    echo osc_esc_html(__(osc_get_preference('keyword_placeholder', 'osclasswizards_theme'), OSCLASSWIZARDS_THEME_FOLDER));
    ?>
" />
                </div>
              </div>
              <div class="col-md-3">
                <?php 
    if (osc_count_categories()) {
        ?>
                <div class="cell selector">
                  <?php 
        osc_categories_select('sCategory', null, __('Select a category', OSCLASSWIZARDS_THEME_FOLDER));
        ?>
                </div>
                <?php 
    }
示例#15
0
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this program. If not, see <http://www.gnu.org/licenses/>.
 */
$page = __get('page');
$locales = OSCLocale::newInstance()->listAllEnabled();
if (isset($page['pk_i_id'])) {
    $edit = true;
    $title = __('Edit page');
    $action_frm = 'edit_post';
    $btn_text = osc_esc_html(__('Save changes'));
} else {
    $edit = false;
    $title = __('Add page');
    $action_frm = 'add_post';
    $btn_text = osc_esc_html(__('Add page'));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
    <head>
        <?php 
osc_current_admin_theme_path('head.php');
?>
        <script type="text/javascript" src="<?php 
echo osc_current_admin_theme_js_url('tiny_mce/tiny_mce.js');
?>
"></script>
        <script type="text/javascript">
            tinyMCE.init({
                mode : "textareas",
示例#16
0
</a>
                </p>
                <p class="submit">
                    <input type="submit" name="submit" id="submit" value="<?php 
echo osc_esc_html(__('Log in'));
?>
" tabindex="100" />
                </p>
            </form>

        </div>
        <p id="backtoblog"><a href="<?php 
echo osc_base_url();
?>
" title="<?php 
echo osc_esc_html(sprintf(__('Back to %s'), osc_page_title()));
?>
">&larr; <?php 
printf(__('Back to %s'), osc_page_title());
?>
</a></p>
        <script type="text/javascript">
            $(function(){
                function placeholder(input_form) {
                    input_form.each(function(){
                        $(this).focus(function(){
                            $(this).prev().hide();
                        }).blur(function(){
                            if($(this).val() == '') {
                                $(this).prev().show();
                            }
示例#17
0
        </div>
        <div class="form-actions">
            <div class="wrapper">
            <a class="btn" href="javascript:void(0);" onclick="$('#dialog-user-delete').dialog('close');"><?php _e('Cancel'); ?></a>
            <input id="user-delete-submit" type="submit" value="<?php echo osc_esc_html( __('Delete') ); ?>" class="btn btn-red" />
            </div>
        </div>
    </div>
</form>
<div id="dialog-bulk-actions" title="<?php _e('Bulk actions'); ?>" class="has-form-actions hide">
    <div class="form-horizontal">
        <div class="form-row"></div>
        <div class="form-actions">
            <div class="wrapper">
                <a id="bulk-actions-cancel" class="btn" href="javascript:void(0);"><?php _e('Cancel'); ?></a>
                <a id="bulk-actions-submit" href="javascript:void(0);" class="btn btn-red" ><?php echo osc_esc_html( __('Delete') ); ?></a>
                <div class="clear"></div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
$(document).ready(function(){

    $('#countryName').attr( "autocomplete", "off" );
    $('#region').attr( "autocomplete", "off" );
    $('#city').attr( "autocomplete", "off" );

    $('#countryId').change(function(){
        $('#regionId').val('');
        $('#region').val('');
示例#18
0
"></a>
        <?php 
    }
    ?>
    <?php 
}
?>
    <div class="listing-detail">
        <div class="listing-cell">
            <div class="listing-data">
                <div class="listing-basicinfo">
                    <a href="<?php 
echo osc_premium_url();
?>
" class="title" title="<?php 
echo osc_esc_html(osc_premium_title());
?>
"><?php 
echo osc_premium_title();
?>
</a>
                    <div class="listing-attributes">
                        <span class="category"><?php 
echo osc_premium_category();
?>
</span> -
                        <span class="location"><?php 
echo osc_premium_city();
?>
 <?php 
if (osc_premium_region() != '') {
示例#19
0
文件: ban.php 项目: mylastof/os-class
            <input id="ban-delete-submit" type="submit" value="<?php 
echo osc_esc_html(__('Delete'));
?>
" class="btn btn-red" />
            </div>
        </div>
    </div>
</form>
<div id="dialog-bulk-actions" title="<?php 
_e('Bulk actions');
?>
" class="has-form-actions hide">
    <div class="form-horizontal">
        <div class="form-row"></div>
        <div class="form-actions">
            <div class="wrapper">
                <a id="bulk-actions-cancel" class="btn" href="javascript:void(0);"><?php 
_e('Cancel');
?>
</a>
                <a id="bulk-actions-submit" href="javascript:void(0);" class="btn btn-red" ><?php 
echo osc_esc_html(__('Delete'));
?>
</a>
                <div class="clear"></div>
            </div>
        </div>
    </div>
</div>
<?php 
osc_current_admin_theme_path('parts/footer.php');
示例#20
0
?>
              <div class="plugin-hooks">
                <?php 
if (osc_search_category_id()) {
    osc_run_hook('search_form', osc_search_category_id());
} else {
    osc_run_hook('search_form');
}
?>
              </div>
              <?php 
$aCategories = osc_search_category();
foreach ($aCategories as $cat_id) {
    ?>
              <input type="hidden" name="sCategory[]" value="<?php 
    echo osc_esc_html($cat_id);
    ?>
"/>
              <?php 
}
?>
              <div class="actions">
                <button type="submit" class="btn btn-success">
                <?php 
_e('Apply', OSCLASSWIZARDS_THEME_FOLDER);
?>
                </button>
              </div>
            </form>
          </div>
        </section>
示例#21
0
?>
                <!-- tools maintenance -->
                <div class="tools maintenance">
                    <p class="text">
                        <?php 
_e('While in maintenance mode, users can not access your website. Useful if you need to make some changes on your website. Use the following button to toggle ON/OFF maintenance mode.');
?>
                    </p>
                    <p class="text">
                        <?php 
printf(__('Maintenance mode is: <strong>%s</strong>'), $maintenance ? __('ON') : __('OFF'));
?>
                    </p>
                    <div class="action-nomargin">
                        <input type="button" value="<?php 
echo $maintenance ? osc_esc_html(__('Disable maintenance mode')) : osc_esc_html(__('Enable maintenance mode'));
?>
" onclick="window.location.href='<?php 
echo osc_admin_base_url(true);
?>
?page=tools&amp;action=maintenance&amp;mode=<?php 
echo $maintenance ? 'off' : 'on';
?>
';" >
                    </div>
                </div>
                <!-- /tools maintenance -->
            </div>
            <!-- /right container -->
        </div>
        <!-- /container -->
示例#22
0
?>
</option>
                                <option value="despam_all"><?php 
_e('Unmark as spam');
?>
</option>
                            </select> <input type="submit" id="bulk_apply" class="btn" value="<?php 
echo osc_esc_html(__('Apply'));
?>
">
                        </label>
                    </div>
                    <div id="add_item_button">
                        <input type="text" class="medium" name="pk_i_id" value="" />
                        <input type="button" name="findById" value="<?php 
echo osc_esc_html(__('Find by Item id'));
?>
" />
                        <a href="<?php 
echo osc_admin_base_url(true);
?>
?page=items&amp;action=post" class="btn" id="button_open"><?php 
_e('Add item');
?>
</a>
                    </div>
                    <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="datatables_list"></table>
                </form>
                <!-- /datatables items -->
            </div>
            <!-- /right container -->
示例#23
0
            }
        });
        $('input[name=sPattern]').keypress(function(){
            $('input[name=sPattern]').css('background','');
        })
    });
</script>

<form action="<?php 
echo osc_base_url(true);
?>
" method="get" class="search" onsubmit="javascript:return doSearch();">
    <input type="hidden" name="page" value="search" />
    <fieldset class="main">
        <input type="text" name="sPattern"  id="query" value="<?php 
echo osc_esc_html(osc_search_pattern() != '' ? osc_search_pattern() : $sQuery);
?>
" />
        <?php 
if (osc_count_categories()) {
    ?>
            <?php 
    osc_categories_select('sCategory', null, __('Select a category', 'modern'));
    ?>
        <?php 
}
?>
    	<button type="submit"><?php 
_e('Search', 'modern');
?>
</button>
示例#24
0
    <input type="hidden" name="action" value="delete" />
    <input type="hidden" name="webtheme" value="" />
    <div class="form-horizontal">
        <div class="form-row">
            <?php 
_e('This action can not be undone. Are you sure you want to delete the theme?');
?>
        </div>
        <div class="form-actions">
            <div class="wrapper">
            <a class="btn" href="javascript:void(0);" onclick="$('#dialog-delete-theme').dialog('close');"><?php 
_e('Cancel');
?>
</a>
            <input id="delete-theme-submit" type="submit" value="<?php 
echo osc_esc_html(__('Uninstall'));
?>
" class="btn btn-red" />
            </div>
        </div>
    </div>
</form>
<script type="text/javascript">
    $(function() {
        $( "#tabs" ).tabs({ active: -1 });

        $("#market_cancel").on("click", function(){
            $(".ui-dialog-content").dialog("close");
            return false;
        });
示例#25
0
                    <div class="row-wrapper">
                        <?php 
CategoryForm::multilanguage_name_description($locales, $category);
?>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
            <div class="form-vertical">
                    <div class="form-actions">
                        <input type="submit" class="btn btn-submit" value="<?php 
echo osc_esc_html(__('Save changes'));
?>
" />
                        <input type="button" class="btn btn-red" onclick="$('.iframe-category').remove();" value="<?php 
echo osc_esc_html(__('Cancel'));
?>
" />
                    </div>
            </div>
        </fieldset>
    </form>
</div>
<script type="text/javascript">
    $(document).ready(function() {
        $('.iframe-category form').submit(function() {
            $(".jsMessage").hide();
            $.ajax({
                type: 'POST',
                url: $(this).attr('action'),
                data: $(this).serialize(),
示例#26
0
<?php 
if (meta_description() != '') {
    ?>
    <meta name="description" content="<?php 
    echo osc_esc_html(meta_description());
    ?>
" />
<?php 
}
if (function_exists('meta_keywords')) {
    ?>
    <?php 
    if (meta_keywords() != '') {
        ?>
        <meta name="keywords" content="<?php 
        echo osc_esc_html(meta_keywords());
        ?>
" />
    <?php 
    }
}
if (osc_get_canonical() != '') {
    ?>
    <link rel="canonical" href="<?php 
    echo osc_get_canonical();
    ?>
"/>
<?php 
}
?>
    <meta http-equiv="Cache-Control" content="no-cache" />
示例#27
0
文件: add.php 项目: jmcclenon/Osclass
    ?>
" method="post" enctype="multipart/form-data">
                        <input type="hidden" name="action" value="add_post" />
                        <input type="hidden" name="page" value="appearance" />
                        <div class="form-row">
                            <div class="form-label"><?php 
    _e('Theme package (.zip)');
    ?>
</div>
                            <div class="form-controls">
                                <div class="form-label-checkbox"><input type="file" name="package" id="package" /></div>
                            </div>
                        </div>
                        <div class="form-actions">
                            <input type="submit" value="<?php 
    echo osc_esc_html(__('Upload'));
    ?>
" class="btn btn-submit" />
                        </div>
                    </form>
                <?php 
} else {
    ?>
                    <div class="flashmessage flashmessage-error">
                        <a class="btn ico btn-mini ico-close" href="#">×</a>
                        <p><?php 
    _e("Can't install a new theme");
    ?>
</p>
                    </div>
                    <p class="text">
示例#28
0
        <?php 
}
?>
        <p>
            <?php 
_e('You can recalculate your location stats. This is useful if you upgrade from versions older than Osclass 2.4');
?>
.
        </p>
        <form action="<?php 
echo osc_admin_base_url(true);
?>
" method="post">
            <input type="hidden" name="action" value="locations_post" />
            <input type="hidden" name="page" value="tools" />
            <fieldset>
                <div class="form-horizontal">
                    <div class="form-actions">
                        <input id="button_save" type="submit" value="<?php 
echo osc_esc_html(__('Calculate location stats'));
?>
" class="btn btn-submit" />
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    <!-- /settings form -->
</div>
<?php 
osc_current_admin_theme_path('parts/footer.php');
示例#29
0
文件: main.php 项目: abhi143u11/ads
// RESET CATEGORIES IF WE USED THEN IN THE HEADER
?>
                <?php 
osc_goto_first_category();
?>
                <?php 
if (osc_count_categories() >= 0) {
    ?>
                <?php 
    while (osc_has_categories()) {
        ?>
                    <div class="col-md-3 col-sm-4 col-xs-6 cating">
                        <div class="catsingle">
                            <div class="pull-left">
                                <i class="<?php 
        echo osc_esc_html(osc_get_preference('cat_icon_' . osc_category_id(), 'flatter_theme'));
        ?>
 fa-2x"></i>
                            </div>
                            <div class="category">
                                <a class="<?php 
        echo osc_category_slug();
        ?>
" href="<?php 
        echo osc_search_category_url();
        ?>
">
                                <h4><?php 
        echo osc_category_name();
        ?>
</h4>
示例#30
0
 public static function meta($field = null)
 {
     if ($field != null) {
         if (Session::newInstance()->_getForm('meta_' . $field['pk_i_id']) != "") {
             $field['s_value'] = Session::newInstance()->_getForm('meta_' . $field['pk_i_id']);
         }
         if ($field['e_type'] == "TEXTAREA") {
             echo '<label for="meta_' . $field['s_slug'] . '">' . $field['s_name'] . ': </label>';
             echo '<textarea id="meta_' . $field['s_slug'] . '" name="meta[' . $field['pk_i_id'] . ']" rows="10">' . (isset($field) && isset($field["s_value"]) ? $field["s_value"] : "") . '</textarea>';
         } else {
             if ($field['e_type'] == "DROPDOWN") {
                 echo '<label for="meta_' . $field['s_slug'] . '">' . $field['s_name'] . ': </label>';
                 if (isset($field) && isset($field['s_options'])) {
                     $options = explode(",", $field['s_options']);
                     if (count($options) > 0) {
                         echo '<select name="meta[' . $field['pk_i_id'] . ']" id="meta_' . $field['s_slug'] . '">';
                         foreach ($options as $option) {
                             echo '<option value="' . osc_esc_html($option) . '" ' . ($field['s_value'] == $option ? 'selected="selected"' : '') . '>' . $option . '</option>';
                         }
                         echo '</select>';
                     }
                 }
             } else {
                 if ($field['e_type'] == "RADIO") {
                     echo '<label for="meta_' . $field['s_slug'] . '">' . $field['s_name'] . ': </label>';
                     if (isset($field) && isset($field['s_options'])) {
                         $options = explode(",", $field['s_options']);
                         if (count($options) > 0) {
                             echo '<ul>';
                             foreach ($options as $key => $option) {
                                 echo '<li><input type="radio" name="meta[' . $field['pk_i_id'] . ']" id="meta_' . $field['s_slug'] . '_' . $key . '" value="' . osc_esc_html($option) . '" ' . ($field['s_value'] == $option ? 'checked="checked"' : '') . ' /><label for="meta_' . $field['s_slug'] . '_' . $key . '">' . $option . '</label></li>';
                             }
                             echo '</ul>';
                         }
                     }
                 } else {
                     if ($field['e_type'] == "CHECKBOX") {
                         echo '<input type="checkbox" name="meta[' . $field['pk_i_id'] . ']" id="meta_' . $field['s_slug'] . '" value="1" ' . (isset($field) && isset($field["s_value"]) && $field["s_value"] == 1 ? 'checked="checked"' : '') . ' />';
                         echo '<label for="meta_' . $field['s_slug'] . '">' . $field['s_name'] . ': </label>';
                     } else {
                         echo '<label for="meta_' . $field['s_slug'] . '">' . $field['s_name'] . ': </label>';
                         echo '<input id="meta_' . $field['s_slug'] . '" type="text" name="meta[' . $field['pk_i_id'] . ']" value="' . osc_esc_html(isset($field) && isset($field["s_value"]) ? $field["s_value"] : "") . '" ';
                         echo '/>';
                     }
                 }
             }
         }
     }
 }