function row_wrapper($row_ID, $row) { $section_class = array('map-section'); if (isset($row['options']['custom_container_class']) && !empty($row['options']['custom_container_class'])) { $section_class[] = $row['options']['custom_container_class']; } $row_html = sprintf(' <div id="%1$s" class="%2$s"> <section class="featured_section footer map"> <div class="container"> <div class="%3$s"> %4$s </div> </div> </section> </div>', $row_ID, spyropress_clean_cssclass($section_class), get_row_class(true), builder_render_frontend_columns($row['columns'])); return $row_html; }
/** * Returns classic grid element for given product category * * @param object $product_cat Product category object * @param string $archive_template * @return string */ function get_grid_category_theme($product_cat, $archive_template) { if ($archive_template == 'grid') { $image_id = get_product_category_image_id($product_cat->term_id); $category_image = wp_get_attachment_image_src($image_id, 'classic-grid-listing'); if ($category_image) { $img_class['alt'] = $product_cat->name; $img_class['class'] = 'classic-grid-image'; $image = wp_get_attachment_image($image_id, 'classic-grid-listing', false, $img_class); } else { $url = default_product_thumbnail_url(); $image = '<img src="' . $url . '" class="classic-grid-image" alt="' . $product_cat->name . '" >'; } $classic_grid_settings = get_classic_grid_settings(); $row_class = get_row_class($classic_grid_settings); $return = '<div class="archive-listing category-' . $product_cat->term_id . ' classic-grid ' . $row_class . '">'; $return .= '<a href="' . get_term_link($product_cat) . '">'; //$return .= '<div style="background-image:url(\'' . $url . '\');" class="classic-grid-element"></div>'; $return .= '<div class="classic-grid-image-wrapper"><div class="pseudo"></div><div class="image">' . $image . '</div></div>'; $return .= '<h3 class="product-name">' . $product_cat->name . '</h3></a></div>'; return $return; } }
function get_grid_category_theme($product_cat, $archive_template) { if ($archive_template == 'grid') { if (!($url = wp_get_attachment_url(get_product_category_image_id($product_cat->term_id)))) { $url = default_product_thumbnail_url(); } $default_classic_grid_settings = array('entries' => 3); $classic_grid_settings = get_option('classic_grid_settings', $default_classic_grid_settings); $row_class = get_row_class($classic_grid_settings); $return = '<div class="archive-listing classic-grid ' . $row_class . '">'; $return .= '<a href="' . get_term_link($product_cat) . '">'; $return .= '<div style="background-image:url(\'' . $url . '\');" class="classic-grid-element"></div>'; $return .= '<h3 class="product-name">' . $product_cat->name . '</h3></a></div>'; return $return; } }
<?php if (empty($features)) { return; } if ($title) { echo '<h2' . spyropress_build_atts(array('animation' => $animation), 'data-appear-') . '>' . $title . '</h2>'; } $atts = array('callback' => array($this, 'generate_box_item'), 'row_class' => get_row_class(true) . ' featured-boxes', 'columns' => $columns, 'box_class' => ''); echo spyropress_column_generator($atts, $features);
break; case 'f': $action = 'Borrar Factura'; break; case 'e': $action = 'Modificación'; break; case 'pe': case 'pi': $action = ($action == 'pe' ? 'Editar' : 'Ingreso') . ' Proveedor'; $factura = 'NIT > ' . $factura; break; } ?> <tr class="<?php echo get_row_class($row, $i); ?> "> <td width="1%" nowrap><?php echo $i + 1; ?> </td> <td><?php echo $row['username']; ?> </td> <td><?php echo $f_date; ?> </td> <td><?php
<div class="<?php get_row_class(); ?> center"> <span class="sun"></span> <span class="cloud"></span> <?php $counter = 0; foreach ($concepts as $concept) { $class = 'col-md-2'; $animation = ''; if (0 == $counter) { $class .= ' col-md-offset-1'; } else { $animation = ' data-appear-animation-delay="' . 200 * $counter . '"'; } echo ' <div class="' . $class . '"> <div class="process-image" data-appear-animation="bounceIn"' . $animation . '> <img src="' . $concept['img'] . '" alt="" /> <strong>' . $concept['title'] . '</strong> </div> </div>'; $counter++; } if (!empty($works)) { $js = ' // Circle Slider if($("#fcSlideshow").get(0)) { $("#fcSlideshow").flipshow();
/** * Define the row wrapper html */ function spyropress_row_wrapper($row_ID, $row) { extract($row['options']); $section_class = array(); $parallax = $video = $mp4 = $ogg = ''; // CssClass if (isset($custom_container_class) && !empty($custom_container_class)) { $section_class[] = $custom_container_class; } if (isset($container_skin) && !empty($container_skin)) { $section_class[] = $container_skin; if ('parallax' == $container_skin) { $parallax = ' data-stellar-background-ratio="0.5" style="background-image: url(' . $parallax_bg . ');"'; } if ('video_section' == $container_skin) { if ($video_mp4) { $mp4 = 'mp4: ' . $video_mp4 . ', '; } if ($video_ogg) { $ogg = 'ogv: ' . $video_ogg . ', '; } if ($video_poster) { $poster = 'poster: ' . $video_poster; } if ($video_mp4 || $video_ogg) { $parallax = ' data-video-path="' . $mp4 . $ogg . $poster . '" data-plugin-video-background data-plugin-options=\'{"posterType": "' . end(explode('.', $video_poster)) . '", "position": "50% 50%" }\''; } } } $row_html = sprintf(' <div id="%1$s" class="%2$s"%5$s> <div class="container"> <div class="%3$s"> %4$s </div> </div> %6$s </div>', $row_ID, spyropress_clean_cssclass($section_class), get_row_class(true), builder_render_frontend_columns($row['columns']), $parallax, $video); return $row_html; }
function build_results_table($data) { global $user, $config; ?> <script type="text/javascript"> <!-- function cdf() { if (confirm('Realmente desea borrar esta factura?')) { return true; } return false; } --> </script> <table width="100%" cellpadding="5" cellspacing="0" border="1" bordercolor="#999999" class="table-collapse ajax-results" align="center"> <tr class="subtitle"> <td align="center"><strong>Exención</strong></td> <td align="center"><strong>Fecha de Exención</strong></td> <td align="center"><strong>Fecha de Factura</strong></td> <td align="center"><strong>NIT</strong></td> <td align="center"><strong>Proveedor</strong></td> <td align="center"><strong>Descripción</strong></td> <td align="center"><strong>Serie</strong></td> <td align="center"><strong>Factura</strong></td> <td align="center"><strong>Total</strong></td> <td align="center"><strong>Exento</strong></td> <td align="center"><strong>IVA</strong></td> <td align="center"><strong>Impreso</strong></td> <?php if ($user->auth['auth_delete']) { ?> <td align="center"><strong>Borrar factura</strong></td><?php } ?> </tr> <?php $nulled = array(); foreach ($data as $i => $row) { parse_nulled2($row); if ($row['c_null']) { if (isset($nulled[$row['c_exe']])) { continue; } $nulled[$row['c_exe']] = true; } $c_date = $row['c_date'] ? date('d M Y', $row['c_date']) : '-'; $f_date = $row['f_date'] ? date('d M Y', $row['f_date']) : '-'; ?> <tr class="<?php echo get_row_class($row, $i); ?> "> <td><?php echo $row['c_exe']; ?> </td> <td><?php echo $c_date; ?> </td> <td><?php echo $f_date; ?> </td> <td><?php echo $row['p_nit']; ?> </td> <td><?php echo $row['p_name']; ?> </td> <td><?php echo $row['c_text']; ?> </td> <td><?php echo $row['f_serie']; ?> </td> <td><?php echo $row['f_fact']; ?> </td> <td>Q<?php echo number_format($row['f_total'], 2); ?> </td> <td>Q<?php echo get_net($row['f_total']); ?> </td> <td>Q<?php echo get_iva($row['f_total']); ?> </td> <td style="color: #FFFFFF;" bgcolor="#<?php echo !$row['c_np'] ? '990000' : '339933'; ?> "><?php echo $row['c_np'] ? 'Si' : 'No'; ?> </td> <?php if ($user->auth['auth_delete'] && $row['f_fact']) { ?> <td align="center"><a onClick="return cdf();" href="<?php echo s_link('delete', $row['f_id']); ?> "><img src="<?php echo rp(); ?> scripts/cross.png" border="0" alt="Borrar factura" title="Borrar factura" /></a></td><?php } ?> </tr> <?php } ?> </table> <?php }
/** * Query Generator * Generate query and loop through it, with column logic enabled. */ function spyropress_query_generator($atts, $content = null) { // default setting $default = array('callback' => '', 'row' => 1, 'row_container' => 'div', 'row_class' => get_row_class(true), 'column_class' => '', 'columns' => 1, 'pagination' => false); $atts = wp_parse_args($atts, $default); $output = ''; $counter = $column_counter = 0; $columns = $atts['columns']; $callback = $atts['callback']; $close = false; // Add Pagination if ($atts['limit']) { $atts['posts_per_page'] = $atts['limit']; unset($atts['limit']); if ($atts['pagination']) { $atts['paged'] = get_page_query(); } } // set column cssClass $colclass = array(); $colclass[] = get_column_class($columns); $colclass[] = $atts['column_class']; // if is archive merge wp_query if (is_archive() || is_search()) { global $wp_query; if (!empty($wp_query->query)) { $atts = array_merge($wp_query->query, $atts); } } // init wp_query $posts = new WP_Query($atts); if ($posts->have_posts()) { while ($posts->have_posts()) { $posts->the_post(); $counter++; // if has column defined if ($columns) { $column_counter++; $colclass_fl = array(); if ($column_counter == 1) { if ($atts['row']) { $output .= '<' . $atts['row_container'] . ' class="' . $atts['row_class'] . '">'; $close = true; } $colclass_fl[] = get_first_column_class(); } if ($column_counter == $columns) { $colclass_fl[] = get_last_column_class(); } $atts['column_class'] = spyropress_clean_cssclass(array_merge($colclass, $colclass_fl)); // get the item using the defined callback function if ($callback) { $output .= call_user_func_array($callback, array(get_the_ID(), $atts, $counter, $column_counter)); } if ($column_counter == $columns) { $column_counter = 0; if ($atts['row']) { $output .= '</' . $atts['row_container'] . '>'; $close = false; } } } else { if ($callback) { $output .= call_user_func_array($callback, array(get_the_ID(), $atts, $counter, $column_counter)); } } } // close last unclosed row if (isset($atts['row']) && $atts['row'] && $close) { $output .= '</' . $atts['row_container'] . '>'; } wp_reset_query(); // get pagination for query if enabled $pagination = ''; if ($atts['pagination']) { $pagination = wp_pagenavi(array('query' => $posts, 'echo' => false)); } return array('content' => $output, 'pagination' => $pagination); } else { wp_reset_query(); return; } }