get_charset_collate(); $table_name = $wpdb->prefix . 'Amazon_articulos_lite'; $sql = "CREATE TABLE $table_name ( idart mediumint(9) NOT NULL AUTO_INCREMENT, sku text NOT NULL, titulo text NOT NULL, caracteristicas text NOT NULL, precio_nor text NOT NULL, precio_desc text NOT NULL, descuento text NOT NULL, porcentaje text NOT NULL, url text NOT NULL, imagen text NOT NULL, prime text NOT NULL, UNIQUE KEY id (idart) ) $charset_collate;"; $wpdb->query($sql); } register_activation_hook( __FILE__, 'ADAL_create_db' ); //borra base de datos function ADAL_erase_db(){ global $wpdb; $table_name1 = $wpdb->prefix . 'Amazon_articulos_lite'; $sqld = "DROP TABLE IF EXISTS $table_name1"; $wpdb->query($sqld); } register_deactivation_hook( __FILE__, 'ADAL_erase_db' ); include(plugin_dir_path( __FILE__ ) . 'includes/general.php'); include(plugin_dir_path( __FILE__ ) . 'includes/func_art.php'); include(plugin_dir_path( __FILE__ ) . 'includes/ADAL_boton.php'); function ADAL_settings_page() { settings_fields( 'valores_ADAL' ); do_settings_sections( 'valores_ADAL' ); if (isset( $_POST['ADAL_core_nounce'] ) || wp_verify_nonce( $_POST['ADAL_core_nounce'], 'actualizar_ADAL_core' )) { if (isset($_POST['ADAL_AssociateTag'])) { update_option('ADAL_AssociateTag', $_POST['ADAL_AssociateTag']); } if (isset($_POST['ADAL_AWSAccessKeyId'])) { update_option('ADAL_AWSAccessKeyId', $_POST['ADAL_AWSAccessKeyId']); } if (isset($_POST['ADAL_AWSASecretKey'])) { update_option('ADAL_AWSASecretKey', $_POST['ADAL_AWSASecretKey']); } if (isset($_POST['ADAL_monedaTag'])) { update_option('ADAL_monedaTag', $_POST['ADAL_monedaTag']); } } $abr = array("au","us", "uk", "es", "mx", "br", "ca", "cn", "de", "fr", "in", "it", "jp"); $sitios = array("com.au","com", "co.uk", "es", "com.mx", "com.br", "ca", "cn", "de", "fr", "in", "it", "co.jp"); $pais_sitio = array("Australia","USA", "Gran Bretaña", "España", "México", "Brasil", "Canada", "China", "Dinamarca", "Francia", "India", "Italia", "Japon"); ?>