/** * Создаёт заказ по данным из mysql * * @param array $data данные из mysql * * @return &array объект заказа */ function &unserializeFromMysql(array $data) { $Order =& construct(); setId($Order, $data['id']); setPrice($Order, $data['price']); setText($Order, $data['text']); return $Order; }
<?php extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'color_scheme' => ''), $atts)); $animated = $css_animation ? 'animate' : ''; $css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : ''; $class = setClass(array('md-tabs md-tours', $animated, $css_animation, $class, $color_scheme)); $id = setId($id); $output = '<div' . $class . $id . $css_animation_delay . '>'; $output .= '<ul class="nav nav-tabs">'; $GLOBALS['tabs'] = 'nav'; $output .= wpb_js_remove_wpautop($content); $output .= '</ul>'; $GLOBALS['tabs'] = 'content'; $output .= '<div class="tab-content">'; $output .= wpb_js_remove_wpautop($content, true); $output .= '</div>'; $output .= '</div>'; echo $output;
function useId($freeId) { $lastId = sql_value("SELECT MAX(`id`) FROM `sys_trans`", 0); if ($lastId + 1 == $freeId) { return; } setId($lastId, $freeId); }
function __construct($idT, $nombreT, $precioT) { setId($idT); setNombre($nombreT); setPrecio($precioT); }
/** * Создаёт исполнителя по данным из mysql * * @param array $data данные из mysql * * @return &array объект исполнителя */ function &unserializeFromMysql(array $data) { $Executor =& construct(); setId($Executor, $data['id']); setFio($Executor, $data['fio']); setSalary($Executor, $data['salary']); setLogin($Executor, $data['login']); return $Executor; }
$output .= '</div>'; } if ($bgtype == 'bg-slider') { $output .= '<div class="section-slider">'; $images = explode(',', $slider_images); $output .= '<div class="flexslider" data-slideshow="true" data-disable-keyboard="true" data-effect="fade" data-navigation="false" data-pagination="false"><ul class="slides">'; foreach ($images as $image) { $image_big = wp_get_attachment_image_src($image, 'full'); $alt = get_post_meta($image, '_wp_attachment_image_alt', true) ? get_post_meta($image, '_wp_attachment_image_alt', true) : ''; $output .= '<li><img src="' . $image_big[0] . '" alt="' . esc_attr($alt) . '" /></li>'; } $output .= '</ul></div>'; $output .= '</div>'; } if ($bgtype == 'bg-map') { $map_id = setId('map_' . uniqid()); $output .= '<div class="section-map">'; $output .= '<div class="md-map" id="' . $map_id . '"'; $output .= ' data-map-type="' . $map_type . '"'; if ($map_latitude) { $output .= ' data-map-lat="' . $map_latitude . '"'; } if ($map_longitude) { $output .= ' data-map-lon="' . $map_longitude . '"'; } if ($map_zoom) { $output .= ' data-map-zoom="' . $map_zoom . '"'; } if ($map_pin) { $map_pin = wp_get_attachment_image_src($map_pin, 'full'); $output .= ' data-map-pin="' . $map_pin[0] . '"';
<?php extract(shortcode_atts(array('class' => '', 'id' => '', 'css_animation' => '', 'css_animation_delay' => '', 'map_type' => '', 'map_latitude' => '', 'map_longitude' => '', 'map_zoom' => '', 'map_pin' => '', 'map_title' => '', 'map_info' => '', 'map_height' => '', 'map_scroll' => '', 'map_drag' => '', 'map_zoom_control' => '', 'map_disable_doubleclick' => '', 'map_streetview' => ''), $atts)); $animated = $css_animation ? 'animate' : ''; $css_animation_delay = $css_animation ? ' data-delay="' . $css_animation_delay . '"' : ''; $class = setClass(array('md-map', $animated, $css_animation, $class)); $id = setId($id, 'map_' . uniqid()); $map_height = ' style="height:' . $map_height . 'px"'; $map_pin = $map_pin ? wp_get_attachment_image_src($map_pin, 'full') : ''; $output = '<div' . $class . $id . $css_animation_delay . $map_height; $output .= ' data-map-type="' . $map_type . '"'; if ($map_latitude) { $output .= ' data-map-lat="' . $map_latitude . '"'; } if ($map_longitude) { $output .= ' data-map-lon="' . $map_longitude . '"'; } if ($map_zoom) { $output .= ' data-map-zoom="' . $map_zoom . '"'; } if ($map_pin) { $output .= ' data-map-pin="' . $map_pin[0] . '"'; } if ($map_title) { $output .= ' data-map-title="' . $map_title . '"'; } if ($map_info) { $output .= ' data-map-info="' . $map_info . '"'; } $output .= ' data-map-scroll="' . $map_scroll . '"'; $output .= ' data-map-drag="' . $map_drag . '"';