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


PHP WDWLibrary::ajax_search方法代码示例

本文整理汇总了PHP中WDWLibrary::ajax_search方法的典型用法代码示例。如果您正苦于以下问题:PHP WDWLibrary::ajax_search方法的具体用法?PHP WDWLibrary::ajax_search怎么用?PHP WDWLibrary::ajax_search使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WDWLibrary的用法示例。


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

示例1: image_display

    public function image_display($id)
    {
        global $WD_BWG_UPLOAD_DIR;
        $rows_data = $this->model->get_image_rows_data($id);
        $page_nav = $this->model->image_page_nav($id);
        $search_value = isset($_POST['search_value']) ? esc_html(stripslashes($_POST['search_value'])) : '';
        $asc_or_desc = isset($_POST['asc_or_desc']) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'asc';
        $image_order_by = isset($_POST['image_order_by']) ? esc_html(stripslashes($_POST['image_order_by'])) : 'order';
        $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
        $page_number = isset($_POST['page_number']) ? esc_html(stripslashes($_POST['page_number'])) : 1;
        $ids_string = '';
        ?>
      <div id="draganddrop" class="updated" style="display:none;"><strong><p>Changes made in this table should be saved.</p></strong></div>
      <a style="margin: 5px 0;" href="<?php 
        echo add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_image', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
        ?>
" class="button-primary thickbox thickbox-preview" id="content-add_media" title="Add Images" onclick="return false;" style="margin-bottom:5px;">
        Add Images
      </a>
      <div class="buttons_div">
        <span class="button-secondary non_selectable" onclick="spider_check_all_items()">
          <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
          <span style="vertical-align: middle;">Select All</span>
        </span>
        <input id="show_hide_weights"  class="button-secondary" type="button" onclick="spider_show_hide_weights();return false;" value="Hide order column" />
        <input class="button-primary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_set_watermark');
                                                             spider_ajax_save('galleries_form');
                                                             return false;" value="Set Watermark" />
        <input class="button-secondary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_recover_all');
                                                             spider_ajax_save('galleries_form');
                                                             return false;" value="Reset" />
        <input class="button-secondary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_publish_all');
                                                     spider_ajax_save('galleries_form');
                                                     return false;" value="Publish" />
        <input class="button-secondary" type="submit" onclick="spider_set_input_value('ajax_task', 'image_unpublish_all');
                                                     spider_ajax_save('galleries_form');
                                                     return false;" value="Unpublish" />
        <input class="button-secondary" type="submit" onclick="if (confirm('Do you want to delete selected items?')) {
                                                       spider_set_input_value('ajax_task', 'image_delete_all');
                                                       spider_ajax_save('galleries_form');
                                                       return false;
                                                     } else {
                                                       return false;
                                                     }" value="Delete" />
      </div>
      <div class="tablenav top">
        <?php 
        WDWLibrary::ajax_search('Filename', $search_value, 'galleries_form');
        WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form');
        ?>
      </div>

      <table id="images_table" class="wp-list-table widefat fixed pages">
        <thead>
          <th class="check-column table_small_col"></th>
          <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" onclick="spider_check_all(this)" style="margin:0;" /></th>
          <th class="table_small_col">#</th>
          <th class="table_extra_large_col">Thumbnail</th>
          <th class="table_extra_large_col <?php 
        if ($image_order_by == 'filename') {
            echo $order_class;
        }
        ?>
">
            <a onclick="spider_set_input_value('task', '');
                        spider_set_input_value('image_order_by', 'filename');
                        spider_set_input_value('asc_or_desc', '<?php 
        echo isset($_POST['asc_or_desc']) && isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) == 'filename' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
        ?>
');
                        spider_ajax_save('galleries_form');">
              <span>Filename</span><span class="sorting-indicator"></span>
            </a>
          </th>
          <th class="table_extra_large_col <?php 
        if ($image_order_by == 'alt') {
            echo $order_class;
        }
        ?>
">
            <a onclick="spider_set_input_value('task', '');
                        spider_set_input_value('image_order_by', 'alt');
                        spider_set_input_value('asc_or_desc', '<?php 
        echo isset($_POST['asc_or_desc']) && isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) == 'alt' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
        ?>
');
                        spider_ajax_save('galleries_form');">
              <span>Alt/Title</span><span class="sorting-indicator"></span>
            </a>
          </th>
          <th class="table_extra_large_col <?php 
        if ($image_order_by == 'description') {
            echo $order_class;
        }
        ?>
">
            <a onclick="spider_set_input_value('task', '');
                        spider_set_input_value('image_order_by', 'description');
                        spider_set_input_value('asc_or_desc', '<?php 
        echo isset($_POST['asc_or_desc']) && isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) == 'description' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
//.........这里部分代码省略.........
开发者ID:phuluang,项目名称:rosewellmusic,代码行数:101,代码来源:BWGViewGalleries_bwg.php

示例2: image_display

    public function image_display($id)
    {
        global $WD_BWG_UPLOAD_DIR;
        $rows_data = $this->model->get_image_rows_data($id);
        $page_nav = $this->model->image_page_nav($id);
        $option_row = $this->model->get_option_row_data();
        $search_value = isset($_POST['search_value']) ? esc_html(stripslashes($_POST['search_value'])) : '';
        $image_asc_or_desc = isset($_POST['image_asc_or_desc']) ? esc_html(stripslashes($_POST['image_asc_or_desc'])) : (isset($_COOKIE['bwg_image_asc_or_desc']) ? esc_html(stripslashes($_COOKIE['bwg_image_asc_or_desc'])) : 'asc');
        $image_order_by = isset($_POST['image_order_by']) ? esc_html(stripslashes($_POST['image_order_by'])) : (isset($_COOKIE['bwg_image_order_by']) ? esc_html(stripslashes($_COOKIE['bwg_image_order_by'])) : 'order');
        $order_class = 'manage-column column-title sorted ' . $image_asc_or_desc;
        $page_number = isset($_POST['page_number']) ? esc_html(stripslashes($_POST['page_number'])) : 1;
        $ids_string = '';
        $per_page = $this->model->per_page();
        $pager = 0;
        $gallery_row = $this->model->get_row_data($id);
        $gallery_type = $gallery_row->gallery_type == 'instagram' || $gallery_row->gallery_type == 'instagram_post' ? 'instagram' : '';
        $image_array = array('image_set_watermark' => __('Set Watermark', 'bwg_back'), 'image_get_resize' => __('Resize', 'bwg_back'), 'resize_image_thumb' => __('Recreate Thumbnail', 'bwg_back'), 'image_recover_all' => __('Reset', 'bwg_back'), 'image_publish_all' => __('Publish', 'bwg_back'), 'image_unpublish_all' => __('Unpublish', 'bwg_back'), 'image_desc' => __('Edit', 'bwg_back'), 'image_delete_all' => __('Delete', 'bwg_back'));
        ?>
    <div class="buttons_div_left">
      <?php 
        $query_url = add_query_arg(array('action' => 'addImages', 'width' => '700', 'height' => '550', 'extensions' => 'jpg,jpeg,png,gif', 'callback' => 'bwg_add_image'), admin_url('admin-ajax.php'));
        $query_url = wp_nonce_url($query_url, 'addImages', 'bwg_nonce');
        $query_url = add_query_arg(array('TB_iframe' => '1'), $query_url);
        ?>
      <a href="<?php 
        echo $query_url;
        ?>
" id="add_image_bwg" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-add thickbox thickbox-preview" id="content-add_media" title="<?php 
        _e("Add Images", 'bwg_back');
        ?>
" onclick="return false;" style="margin-bottom:5px; <?php 
        if ($gallery_type != '') {
            echo 'display:none';
        }
        ?>
" >
        <?php 
        _e('Add Images', 'bwg_back');
        ?>
      </a>
      <?php 
        $query_url = wp_nonce_url(admin_url('admin-ajax.php'), '', 'bwg_nonce');
        /*(re?)define ajax_url to add nonce only in admin*/
        ?>
      <script>
        var ajax_url = "<?php 
        echo $query_url;
        ?>
"
      </script>
        <input id="show_add_embed" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-media"  type="button" title="<?php 
        _e("Embed Media", 'bwg_back');
        ?>
" onclick="jQuery('.opacity_add_embed').show(); jQuery('#add_embed_help').hide(); return false;" value="<?php 
        _e("Embed Media", 'bwg_back');
        ?>
" />
        <input id="show_bulk_embed" class="wd-btn wd-btn-primary wd-btn-icon wd-btn-bulk_media spider_free_version_button" type="button" title="<?php 
        _e("Social Bulk Embed", 'bwg_back');
        ?>
" onclick="jQuery('.opacity_bulk_embed').show(); return false;" value="<?php 
        _e("Social Bulk Embed", 'bwg_back');
        ?>
" />
        <?php 
        WDWLibrary::ajax_search(__('Filename', 'bwg_back'), $search_value, 'galleries_form');
        ?>
    </div>
    <div class="tablenav top buttons_div_left bwg_buttons_div">
      <span class="wd-btn wd-btn-primary-gray bwg_check_all  non_selectable " onclick="spider_check_all_items()">
        <input type="checkbox" id="check_all_items" name="check_all_items" onclick="spider_check_all_items_checkbox()" style="margin: 0; vertical-align: middle;" />
        <span style="vertical-align: middle;"><?php 
        echo __('Select All', 'bwg_back');
        ?>
</span>
      </span>
      <select class="select_icon bulk_action_img">
        <option value=""><?php 
        _e('Bulk Actions', 'bwg_back');
        ?>
</option>
        <?php 
        foreach ($image_array as $key => $value) {
            ?>
        <option value="<?php 
            echo $key;
            ?>
"><?php 
            echo $value;
            ?>
</option>
          <?php 
        }
        ?>
      </select>
      <input class="wd-btn wd-btn-primary wd-btn-icon wd-btn-apply" type="button" title="<?php 
        _e("Apply", "bwg_back");
        ?>
" onclick="if (!bwg_bulk_actions('.bulk_action_img', '')) {return false;}" value="<?php 
        _e("Apply", "bwg_back");
//.........这里部分代码省略.........
开发者ID:benshez,项目名称:DreamWeddingCeremonies,代码行数:101,代码来源:BWGViewGalleries_bwg.php

示例3: image_display


//.........这里部分代码省略.........
              <td class="spider_free_version_label"><input type="text" id="popup_instagram_gallery_source" disabled="disabled" value="Bulk embed from Instagram is disabled in free version" size="64" /></td>
            </tr>
            <tr id='popup_tr_instagram_image_number' style='display:table-row'>
              <td class="spider_label_galleries"><label for="popup_instagram_image_number" class="spider_free_version_label">Number of Instagram recent posts to add to gallery: </label></td>
              <td><input type="number" disabled="disabled" id="popup_instagram_image_number" value="12" /></td>
            </tr>
            <tr id='popup_tr_instagram_post_gallery' style='display:table-row'>
              <td class="spider_label_galleries"><label class="spider_free_version_label">Instagram embed type: </label></td>
              <td class="spider_free_version_label">
                <input type="radio" disabled="disabled" class="inputbox" id="popup_instagram_post_gallery_0" checked="checked" value="0" >
                <label for="popup_instagram_post_gallery_0" class="spider_free_version_label">Content</label>&nbsp;
                <input type="radio" disabled="disabled" class="inputbox" id="popup_instagram_post_gallery_1" value="1" >
                <label for="popup_instagram_post_gallery_1" class="spider_free_version_label">Whole post</label>
              </td>
            <tr>
         </tbody>
       </table>
      

      </div>
      <div id="" class="opacity_resize_image bwg_resize_image">
        Resize images to: 
        <input type="text" name="image_width" id="image_width" value="1600" /> x 
        <input type="text" name="image_height" id="image_height" value="1200" /> px
        <input class="button-primary" type="button" onclick="spider_set_input_value('ajax_task', 'image_resize');
                                                             spider_ajax_save('galleries_form');
                                                             jQuery('.opacity_resize_image').hide();
                                                             return false;" value="Resize" />
        <input class="button-secondary" type="button" onclick="jQuery('.opacity_resize_image').hide(); return false;" value="Cancel" />
        <div class="spider_description">The maximum size of resized image.</div>
      </div>
      <div class="tablenav top">
        <?php 
        WDWLibrary::ajax_search('Filename', $search_value, 'galleries_form');
        WDWLibrary::ajax_html_page_nav($page_nav['total'], $page_nav['limit'], 'galleries_form', $per_page, $pager++);
        ?>
      </div>

      <table id="images_table" class="wp-list-table widefat fixed pages">
        <thead>
          <th class="check-column table_small_col"></th>
          <th class="manage-column column-cb check-column table_small_col"><input id="check_all" type="checkbox" onclick="spider_check_all(this)" style="margin:0;" /></th>
          <th class="table_small_col">#</th>
          <th class="table_extra_large_col">Thumbnail</th>
          <th class="table_extra_large_col <?php 
        if ($image_order_by == 'filename') {
            echo $order_class;
        }
        ?>
">
            <a onclick="spider_set_input_value('task', '');
                        spider_set_input_value('image_order_by', 'filename');
                        spider_set_input_value('asc_or_desc', '<?php 
        echo isset($_POST['asc_or_desc']) && isset($_POST['image_order_by']) && esc_html(stripslashes($_POST['image_order_by'])) == 'filename' && esc_html(stripslashes($_POST['asc_or_desc'])) == 'asc' ? 'desc' : 'asc';
        ?>
');
                        spider_ajax_save('galleries_form');">
              <span>Filename</span><span class="sorting-indicator"></span>
            </a>
          </th>
          <th class="table_extra_large_col <?php 
        if ($image_order_by == 'alt') {
            echo $order_class;
        }
        ?>
">
开发者ID:ssesto,项目名称:wordpress-pvc,代码行数:67,代码来源:BWGViewGalleries_bwg.php


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