http://tools.arielbrailovsky.com/viralad/ * Author: Ariel Brailovsky * Desarrollo: Ariel Brailovsky, J.Laso, M.Santos * Author URI: http://tools.arielbrailovsy.com */ ?>
0) { for ($i=0; $i<=$count; $i++) $_path .= "../"; } function genSecurityKey($length = 20){ $security = ""; $possible = "12345678bcdefghijklmnopqrstuvwxy"; $i = 0; while ($i < $length) { $char = substr($possible, mt_rand(0, strlen($possible)-1), 1); if (!strstr($security, $char)) { $security .= $char; $i++; } } return $security; } // generar una clave única para esta sesión $security = genSecurityKey(); $ajustes = array( 'font_family' => 'Arial', 'font_size' => 11, 'font_color' => '#0f0f0f', 'bg_color' => '#f0f0f0', 'border_color'=> '#555555', 'text_align' => 'left', 'font_italic' => 0, 'font_bold' => 1, 'font_underline' => 0 ); $opciones = array(); // opciones del plugin $mi_request = $_REQUEST; // contiene los parametros GET/POST if (!defined("ABVAPATH")) define("ABVAPATH",".."); if (!defined("ABVAURL")) define("ABVAURL","../"); ?> 0) { for ($i=0; $i<=$count; $i++) $_path .= "../"; } $_path = __DIR__."/".$_path; //echo $_path.'wp-config.php'; //ob_start(); //include($_path.'wp-config.php'); //ob_end_clean(); // nombre de mis tablas $table_name_data = $wpdb->prefix.'abva_data'; $table_name_options = $wpdb->prefix.'abva_options'; //echo $table_name_data; /* =================================================== * Obtiene el array de datos * =================================================== */ /* function listAds($order='') { global $wpdb; global $table_name_data; global $table_name_options; // if($order=='') $ord = ''; else $ord = ' ORDER BY '.$order; $datos = $wpdb->get_results("SELECT * FROM ".$table_name_data.$ord); //print_r($datos); $result = array(); $idx = 0; foreach($datos as $dato) { //print_r ($dato); $sql = "SELECT * FROM ".$table_name_options." WHERE `id_ad`=".$dato->id; //print "