working on it ...

Filters

Explore Public Snippets

Sort by

Found 454 snippets

    public by olivedev modified Nov 15, 2018  22  0  3  0

    Creating Pagination in Laravel

    View file for Laravel Pagination (https://www.cloudways.com/blog/vue-pagination-in-laravel/ ) using vuejs
    <<!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Users Data</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="{{ asset('css/app.css') }}" rel="stylesheet" />
    </head>
    <body>
    <div class="container">
    <table class="table table-striped">
    <thead>
    <tr>
    <th>ID</th>
    <th>Name</th>
    <th>Email</th>
    </tr>
    </thead>
    <tbody>
    @foreach($employees as $emp)
    <tr>
    <td>{{ $emp->id }}</td>
    <td>{{ $emp->name }}</td>
    <td>{{ $emp->email }}</td>
    </tr>
    @endforeach
    </tbody>
    </table>
    </div>
    </body>
    </html>

    public by azazqadir modified Apr 11, 2018  658  1  5  0

    Using WooCommerce Rest API for Custom Dashboard

    Using WooCommerce Rest API (https://www.cloudways.com/blog/custom-dashboard-using-woocommerce-php-rest-api/ ) to create a Custom Dashboard
    <div class="container">
    
                                      <h2 class="sub-header">Customers List</h2>
    
                                      <div class='table-responsive'>
    
                                          <table id='myTable' class='table table-striped table-bordered'>
    
                                              <thead>
    
                                                  <tr>
    
                                                      <th>Email</th>
    
                                                      <th>Name</th>
    
                                                      <th>Billing Address</th>
    
                                                      <th>Total Orders</th>
    
                                                      <th>Total spent</th>
    
                                                      <th>Avatar</th>
    
                                                      <th>Actions</th>
    
                                                  </tr>
    
                                              </thead>
    
                                              <tbody>
    
                                                  <?php
    
                      foreach($customers as $customer){
    
    
    
                      echo "<tr><td>" . $customer["email"]."</td>
    
                                <td>" . $customer["first_name"].$customer["last_name"]."</td>
    
                                <td>" . $customer["billing"]["address_1"]."</td>
    
                                <td>" . $customer["orders_count"]."</td>
    
                                <td>" . $customer["total_spent"]."</td>
    
                                <td><img height='50px' width='50px' src='".$customer["avatar_url"]."'></td>
    
                                 <td><a class='open-AddBookDialog btn btn-primary' data-target='#myModal' data-id=".$customer['id']." data-toggle='modal'>Update</a>
    
                                 <a class='open-deleteDialog btn btn-danger' data-target='#myModal1' data-id=".$customer['id']." data-toggle='modal'>Delete</a></td></tr>";
    
                      }
    
    
    
                      ?>
    
                                              </tbody>
    
                                          </table>
    
                                      </div>
    
      </div>												

    public by klskrtz modified Jul 28, 2017  526  1  5  0

    KDDE Extranet

        <style>
    .flex, .flex > div[class*='col-'] {  
        display: -webkit-box;
        display: -moz-box;
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
        flex-wrap:wrap;
    /*     flex:1 0 auto; */
    }
    
    </style>
    
    <div class="row flex">
      <div class="col-sm-6 col-md-4">
        <div class="thumbnail">
          <img src="http://via.placeholder.com/350x250">
          <div class="caption">
            <h3>TIPP Provision</h3>
            <p>Wir unterstützen Sie und Ihre Kunden</p>
            <p><a href="#" class="btn btn-default" role="button">Weiterlesen</a></p>
          </div>
        </div>
      </div>
      <div class="col-sm-6 col-md-4">
        <div class="thumbnail">
          <img src="http://via.placeholder.com/350x250">
          <div class="caption">
            <h3>KYOCERA Hotdeal</h3>
            <p>Erhalten Sie jetzt den ECOSYS M2540dn für 399,00 €. 
    </p>
            <p><a href="#" class="btn btn-default" role="button">Zum Deal</a></p>
          </div>
        </div>
      </div>
      <div class="col-sm-6 col-md-4">
        <div class="thumbnail">
          <img src="http://via.placeholder.com/350x250">
          <div class="caption">
            <h3>Scan Extension Kit (A)</h3>
            <p>Scannen direkt in gängige Office-Formate.</p>
            <p><a href="#" class="btn btn-default" role="button">Weiterlesen</a></p>
          </div>
        </div>
      </div>
    </div>

    public by imagaza modified Nov 22, 2016  748792  2  3  0

    urunListShow.php

    <!-- product -->
    <div class="urunListShow">
    	<div class="product_icons">{%func-data_icon_bedava_kargo_pic%} {%func-data_icon_yeni_pic%} {%func-data_icon_indirimde_pic%} {%func-data_icon_hizlik_kargo_pic%} {%func-data_sorunuzFix%} {%func-data_piyasaFixNew%}</div>
    	<div class="image">{%func-data_icon_tukendi%}<a href="{%URUN_DETAY_LINK%}" title="{%DB_NAME%}"><img src="include/reimage.php?src=images/urunler/{%DB_RESIM%}&h=180&w=212&zc=2" alt="{%DB_NAME%}" /></a>
    	</div>
    	<div class="name"><a href="{%URUN_DETAY_LINK%}" title="{%DB_NAME%}">{%URUN_BASLIK_KISA_59%}</a>
    	</div>
    	<div class="discount sorfix{%DB_ID%}" id="pfix_{%DB_ID%}"> %{%PIYASA_INDIRIM_ORANI%} <span>indirim</span>
    	</div>
    	<div class="siteprice" id="fiyat{%DB_ID%}">{%URUN_FIYAT_KDV_DAHIL_YTL%} <i class="fa fa-try"></i>
    	</div>
    	<div class="otherprice" id="piyasafiyat{%DB_ID%}">{%URUN_PIYASAFIYAT_KDV_DAHIL_YTL%} <i class="fa fa-try"></i>
    	</div>
    </div>
    <!-- //product -->

    public by bieltelles modified Nov 6, 2016  1288  0  5  0

    html

    insere código html puro
    <html>
    	<head>
    		<title></title>
    		<meta charset="utf-8"/>
    		<link href="" rel="stylesheet" type="text/css">
    
    	</head>
    	<body>
    		
    	</body>
    </html>
    

    public by John93 modified Oct 28, 2016  2904  0  4  0

    HTML form view product sostoyanie

    <?php 
        $sostoyanies = get_terms("sostoyanie_producta", "orderby=name&hide_empty=0&parent=0");
        foreach ($sostoyanies as $sost) {
          if ($sostoyanie->name == $sost->name) {
            $chk = 'checked';
          } else {
            $chk = '';
          }
          $option_sostoyanie .= "<p><label for='".$sost->slug."'><input type='radio' id='".$sost->slug."' name='crsites_sostoyanie' value='".$sost->term_id."' ".$chk."> ".$sost->name."</label></p>";
        }
      ?>
      <label for="crsites_sostoyanie" class="form-label"><?php _e( 'Состояние', 'dokan' ); ?></label>
      <?php echo $option_sostoyanie; ?>

    public by arsnie modified Aug 15, 2016  1455  1  3  0

    Divi Meta Box

    Divi Meta Box for custom post type
    // Divi Meta Box for custom post type
    
    add_action( 'add_meta_boxes', 'divi_add_post_meta_box' );
    
    function divi_add_post_meta_box() {
        add_meta_box( 'et_settings_meta_box', esc_html__( 'Divi Post Settings', 'Divi' ), 'et_single_settings_meta_box', 'ai1ec_event', 'side', 'high' );
    }
    
    if ( ! function_exists( 'et_single_settings_meta_box' ) ) :
    function et_single_settings_meta_box( $post ) {
    	$post_id = get_the_ID();
    
    	wp_nonce_field( basename( __FILE__ ), 'et_settings_nonce' );
    
    	$page_layout = get_post_meta( $post_id, '_et_pb_page_layout', true );
    
    	$side_nav = get_post_meta( $post_id, '_et_pb_side_nav', true );
    
    	$project_nav = get_post_meta( $post_id, '_et_pb_project_nav', true );
    
    	$post_hide_nav = get_post_meta( $post_id, '_et_pb_post_hide_nav', true );
    	$post_hide_nav = $post_hide_nav && 'off' === $post_hide_nav ? 'default' : $post_hide_nav;
    
    	$show_title = get_post_meta( $post_id, '_et_pb_show_title', true );
    
    	$page_layouts = array(
    		'et_right_sidebar'   => esc_html__( 'Right Sidebar', 'Divi' ),
    		'et_left_sidebar'    => esc_html__( 'Left Sidebar', 'Divi' ),
    		'et_full_width_page' => esc_html__( 'Full Width', 'Divi' ),
    	);
    
    	$layouts = array(
    		'light' => esc_html__( 'Light', 'Divi' ),
    		'dark'  => esc_html__( 'Dark', 'Divi' ),
    	);
    	$post_bg_color  = ( $bg_color = get_post_meta( $post_id, '_et_post_bg_color', true ) ) && '' !== $bg_color
    		? $bg_color
    		: '#ffffff';
    	$post_use_bg_color = get_post_meta( $post_id, '_et_post_use_bg_color', true )
    		? true
    		: false;
    	$post_bg_layout = ( $layout = get_post_meta( $post_id, '_et_post_bg_layout', true ) ) && '' !== $layout
    		? $layout
    		: 'light'; ?>
    
    	<p class="et_pb_page_settings et_pb_page_layout_settings">
    		<label for="et_pb_page_layout" style="display: block; font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Page Layout', 'Divi' ); ?>: </label>
    
    		<select id="et_pb_page_layout" name="et_pb_page_layout">
    		<?php
    		foreach ( $page_layouts as $layout_value => $layout_name ) {
    			printf( '<option value="%2$s"%3$s>%1$s</option>',
    				esc_html( $layout_name ),
    				esc_attr( $layout_value ),
    				selected( $layout_value, $page_layout, false )
    			);
    		} ?>
    		</select>
    	</p>
    	<p class="et_pb_page_settings et_pb_side_nav_settings" style="display: none;">
    		<label for="et_pb_side_nav" style="display: block; font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Dot Navigation', 'Divi' ); ?>: </label>
    
    		<select id="et_pb_side_nav" name="et_pb_side_nav">
    			<option value="off" <?php selected( 'off', $side_nav ); ?>><?php esc_html_e( 'Off', 'Divi' ); ?></option>
    			<option value="on" <?php selected( 'on', $side_nav ); ?>><?php esc_html_e( 'On', 'Divi' ); ?></option>
    		</select>
    	</p>
    	<p class="et_pb_page_settings">
    		<label for="et_pb_post_hide_nav" style="display: block; font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Hide Nav Before Scroll', 'Divi' ); ?>: </label>
    
    		<select id="et_pb_post_hide_nav" name="et_pb_post_hide_nav">
    			<option value="default" <?php selected( 'default', $post_hide_nav ); ?>><?php esc_html_e( 'Default', 'Divi' ); ?></option>
    			<option value="no" <?php selected( 'no', $post_hide_nav ); ?>><?php esc_html_e( 'Off', 'Divi' ); ?></option>
    			<option value="on" <?php selected( 'on', $post_hide_nav ); ?>><?php esc_html_e( 'On', 'Divi' ); ?></option>
    		</select>
    	</p>
    
    <?php if ( 'custom_post_type_slug' === $post->post_type) : ?>
    <p class="et_pb_page_settings et_pb_single_title" style="display: none;">
    <label for="et_single_title" style="display: block; font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Post Title', 'Divi' ); ?>: </label>
    
    <select id="et_single_title" name="et_single_title">
    <option value="on" <?php selected( 'on', $show_title ); ?>><?php esc_html_e( 'Show', 'Divi' ); ?></option>
    <option value="off" <?php selected( 'off', $show_title ); ?>><?php esc_html_e( 'Hide', 'Divi' ); ?></option>
    </select>
    </p>
    <?php endif; ?>
    
    
    <?php if ( 'post' === $post->post_type ) : ?>
    	<p class="et_pb_page_settings et_pb_single_title" style="display: none;">
    		<label for="et_single_title" style="display: block; font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Post Title', 'Divi' ); ?>: </label>
    
    		<select id="et_single_title" name="et_single_title">
    			<option value="on" <?php selected( 'on', $show_title ); ?>><?php esc_html_e( 'Show', 'Divi' ); ?></option>
    			<option value="off" <?php selected( 'off', $show_title ); ?>><?php esc_html_e( 'Hide', 'Divi' ); ?></option>
    		</select>
    	</p>
    
    	<p class="et_divi_quote_settings et_divi_audio_settings et_divi_link_settings et_divi_format_setting et_pb_page_settings">
    		<label for="et_post_use_bg_color" style="display: block; font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Use Background Color', 'Divi' ); ?></label>
    		<input name="et_post_use_bg_color" type="checkbox" id="et_post_use_bg_color" <?php checked( $post_use_bg_color ); ?> />
    	</p>
    
    	<p class="et_post_bg_color_setting et_divi_format_setting et_pb_page_settings">
    		<input id="et_post_bg_color" name="et_post_bg_color" class="color-picker-hex" type="text" maxlength="7" placeholder="<?php esc_attr_e( 'Hex Value', 'Divi' ); ?>" value="<?php echo esc_attr( $post_bg_color ); ?>" data-default-color="#ffffff" />
    	</p>
    
    	<p class="et_divi_quote_settings et_divi_audio_settings et_divi_link_settings et_divi_format_setting">
    		<label for="et_post_bg_layout" style="font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Text Color', 'Divi' ); ?>: </label>
    		<select id="et_post_bg_layout" name="et_post_bg_layout">
    	<?php
    		foreach ( $layouts as $layout_name => $layout_title )
    			printf( '<option value="%s"%s>%s</option>',
    				esc_attr( $layout_name ),
    				selected( $layout_name, $post_bg_layout, false ),
    				esc_html( $layout_title )
    			);
    	?>
    		</select>
    	</p>
    <?php endif;
    
    if ( 'project' === $post->post_type ) : ?>
    	<p class="et_pb_page_settings et_pb_project_nav" style="display: none;">
    		<label for="et_project_nav" style="display: block; font-weight: bold; margin-bottom: 5px;"><?php esc_html_e( 'Project Navigation', 'Divi' ); ?>: </label>
    
    		<select id="et_project_nav" name="et_project_nav">
    			<option value="off" <?php selected( 'off', $project_nav ); ?>><?php esc_html_e( 'Hide', 'Divi' ); ?></option>
    			<option value="on" <?php selected( 'on', $project_nav ); ?>><?php esc_html_e( 'Show', 'Divi' ); ?></option>
    		</select>
    	</p>
    <?php endif;
    }
    endif;
    
    // Add Page Layout to CPT Meta Box
    function divi_override_js() {
        wp_enqueue_script( 'custom_script', get_stylesheet_directory_uri() .'/custom_script.js', array( 'jquery'), '1', true );
    }
    add_action('admin_enqueue_scripts','divi_override_js',1);            

    public by vss modified Apr 15, 2016  2408  1  4  1

    Hidden filed - old style

    Так лучше уже не делать, поскольку для невидимых полей не нужны обвязки форма для валидации введенных данных и прочее
    $form->field($cart, 'Goods_idGoods', ['value' => 'test'])->hiddenInput()->label(false)
    
    //нужно длеать вот так
    <?= Html::activeHiddenInput($cart, 'Goods_idGoods', ['value' => $model->idGoods])?>

    public by elenka modified Jan 22, 2015  237461  4  7  0

    add WooCommerce settins tab

    <?php
    
    if ( !class_exists('Woo_Settings ') ):
    
    /**
     * 
     * @version 1.0
     * @access public
     */
    class Woo_Settings {
    
      public static function init() {
        add_filter( 'woocommerce_settings_tabs_array', __CLASS__ . '::add_settings_tab', 70);
        add_action( 'woocommerce_settings_tabs_settings_orders_page', __CLASS__ . '::settings_tab' );
      }
    
      /**
      * Add a new settings tab to the WooCommerce settings tabs array.
      */
      public static function add_settings_tab( $settings_tabs ) {
        $settings_tabs['settings_orders_page'] = __( 'Orders Page', 'linen' );
        return $settings_tabs;
      }
      /**
      * Uses the WooCommerce admin fields API to output settings via the @see woocommerce_admin_fields() function.
      *
      * @uses woocommerce_admin_fields()
      * @uses self::get_settings()
      */
      public static function settings_tab() {
        woocommerce_admin_fields( self::get_settings() );
      }
    
      /**
      * Get all the settings for this plugin for @see woocommerce_admin_fields() function.
      *
      * @return array Array of settings for @see woocommerce_admin_fields() function.
      */
      public static function get_settings() {
    
        $settings[] = array( 'title' => __( 'Orders Page', 'linen' ), 'type' => 'title', 'desc' => '', 'id' => 'wc_order_customiser_orders_page' );
        $settings[] = array(
          'title'    => __( 'Table Type', 'linen' ),
          'id'       => 'wc_order_customiser_table_type',
          'default'  => 'static',
          'type'     => 'radio',
          'options'  => array(
            'static'  => __( 'Static', 'linen' ),
            'dynamic' => __( 'Dynamic', 'linen' ),
          ),
          'autoload' => true
        );
        $settings[] = array( 'type' => 'sectionend', 'id' => 'wc_order_customiser_orders_page' );
    
        $settings[] = array( 'title' => __( 'Position & Size', 'linen' ), 'type' => 'title', 'desc' => '', 'id' => 'wc_order_customiser_position_n_size' );
        $settings[] = array(
          'title'    => __( 'Table Type', 'linen' ),
          'id'       => 'wc_order_customiser_table_type',
          'default'  => 'static',
          'type'     => 'radio',
          'options'  => array(
            'static'  => __( 'Static', 'linen' ),
            'dynamic' => __( 'Dynamic', 'linen' ),
          ),
          'autoload' => true
        );
        $settings[] = array( 'type' => 'sectionend', 'id' => 'wc_order_customiser_position_n_size' );
    
        return apply_filters( 'wc_settings_tab_orders_page', $settings );
      }
    
      /**
      * Uses the WooCommerce options API to save settings via the @see woocommerce_update_options() function.
      *
      * @uses woocommerce_update_options()
      * @uses self::get_settings()
      */
      public static function update_settings() {
        woocommerce_update_options( self::get_settings() );
      }
    
    	
    }
    Woo_Settings::init();
    endif;
    ?>                        

    public by raminhos modified Jan 16, 2015  2306  0  5  0

    msg_success

    function msg_success($txt, $s){
    ?>
    <div class="space-<?=$s?>"></div>
    <div class="alert alert-success">
        <button type="button" class="close" data-dismiss="alert">
            <i class="icon-remove"></i>
        </button>
        <i class="icon-ok"></i> <strong>Sucesso!!! </strong> <?=$txt?>
    </div>
    <?
    }
    • Public Snippets
    • Channels Snippets