prefix . "formularios"; $datos = $wpdb->get_row("SELECT receptor,asunto,copia FROM $table_name WHERE id=1 " ); if(empty($_POST['comment_post_ID'])) { echo '
'; } } function formularios_pimpam_instala(){ global $wpdb; $table_name= $wpdb->prefix . "formularios"; $sql = " CREATE TABLE $table_name( id mediumint( 9 ) NOT NULL AUTO_INCREMENT , receptor text NOT NULL , asunto text NOT NULL , copia text NOT NULL , PRIMARY KEY ( `id` ) ) ;"; $wpdb->query($sql); $sql = "INSERT INTO $table_name (receptor,asunto,copia) VALUES ('ejemplo@pimpamestudio.com','Asunto cualquiera','');"; $wpdb->query($sql); } function formularios_pimpam_desinstala(){ global $wpdb; $table_name = $wpdb->prefix . "formularios"; $sql = "DROP TABLE $table_name"; $wpdb->query($sql); } function formularios_pimpam_panel(){ global $wpdb; $table_name = $wpdb->prefix . "formularios"; if(isset($_POST['formularios_inserta'])){ $formulario=$_POST['formularios_inserta']; $asunto=$_POST['formulario_asunto']; $copia=$_POST['formulario_copia']; }else{ $formulario = $wpdb->get_var("SELECT receptor FROM $table_name WHERE id=1; " ); $asunto = $wpdb->get_var("SELECT asunto FROM $table_name WHERE id=1; " ); $copia = $wpdb->get_var("SELECT copia FROM $table_name WHERE id=1; " ); } if(empty($_POST['comment_post_ID'])) { // El formulario que esta en la pagina de configuracion del plugin echo '

'.__('Datos del Formulario','formularios_pimpamestudio').'


' .'
' .'
' .'' .'
' .'' .'
' .'' .'

' .'
'; } if(isset($_POST['formularios_inserta'])){ $sql = "UPDATE `".$table_name."` SET `receptor` = '{$_POST['formularios_inserta']}' WHERE `id`=1;"; $wpdb->query($sql); $sql = "UPDATE `".$table_name."` SET `asunto` = '{$_POST['formulario_asunto']}' WHERE `id`=1;"; $wpdb->query($sql); $sql = "UPDATE `".$table_name."` SET `copia` = '{$_POST['formulario_copia']}' WHERE `id`=1;"; $wpdb->query($sql); if(empty($_POST['comment_post_ID'])) { echo "

".__('Los cambios se han realizado con éxito.','formularios_pimpamestudio')."

"; } } } function formularios_pimpam_add_menu(){ if (function_exists('add_options_page')) { add_options_page('Formulario', 'Formulario', 10, basename(__FILE__), 'formularios_pimpam_panel'); } } function myscript() { ?> EL JEFE – Bodegas ANGOSTO

38,"h"=>135, "q"=>100); $lista = array(); $vinos = new WP_Query(); $vinos->query("post_type=vinos&showposts=-1"); while($vinos->have_posts()):$vinos->the_post(); $lista[]=get_the_ID(); endwhile; $mitad = (int)round(count($lista)/2); for($i=0; $i<$mitad; $i++){ ?>
<? echo get_the_title($lista[$i]); ?>
125,"h"=>447,"q"=>100); while(have_posts()):the_post(); ?>