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 "
KEY=$key
SQL=$sql
"; $filas= $wpdb->get_results($sql); $ajustes = array(); foreach($filas as $fila){ $clave = $fila->param; $ajustes[$clave] = $fila->value; } foreach ($dato as $k=>$e) $result[$idx][$k]=$e; $result[$idx]['ajustes'] = $ajustes; unset($ajustes); $idx++; } //print_r($result); return $result; } */ if ('POST' == $_SERVER['REQUEST_METHOD']) { if (('Guardar' == $_POST['abva_accion']) && ($abva_idcb = $_POST['abva_idcb'])) update_option('abva_idcb',$abva_idcb); if ( "SI" == $_REQUEST['abva_chart']) update_option('abva_chart', 'SI'); else update_option('abva_chart', 'NO'); }else{ $abva_idcb = get_option('abva_idcb'); if (!$abva_idcb) update_option('abva_idcb',"?"); } function FontSelector ($def='',$name='abva[font_family]',$id='abva_font_family'){ $fuentes = array ( 'Arial', 'Comic Sans MS', 'Courier New', 'Georgia', 'Impact', 'Sans Serif', 'Tahoma', 'Times New Roman', 'Verdana' ); $html = '"; return $html; } function estadistica(){ global $wpdb; $table_name_data = $wpdb->prefix.'abva_data'; $views = array(); $clicks = array(); $rotulo = array(); $i=0; $sql = " SELECT `text`, `impressions`, `total_clicks` FROM `".$table_name_data."` WHERE active = 1" ; $result = $wpdb->get_results($sql); $max = 0; foreach($result as $rs) { $texto = preg_replace('/.*$/i','',html_entity_decode($rs->text)); // esto deja el texto en una sola linea $rotulo[$i] = preg_replace('/\<\/?\w*\/?\>/i','',$texto); //html_entity_decode($rs->text)); $views [$i] = $rs->impressions; $clicks[$i] = $rs->total_clicks; if ($rs->impressions > $max) $max = $rs->impressions; if ($rs->total_clicks > $max) $max = $rs->total_clicks; $i++; } $i--; $chd1 = ""; $chd2 = ""; $chx1 = ""; for ($j=0; $j<=$i; $j++){ $chd1 .= $views[$j].(($j<$i)? ",":""); $chd2 .= $clicks[$j].(($j<$i)? ",":""); $chx1 .= "|".$rotulo[$j]; } $i++; $max = floor($max * 1.15); $ancho = 700; $sep = 3; $hueco = floor ( ($ancho-40) / $i ) ; $barra = floor(($hueco - $sep) / 2); if ($barra > 100) { $barra = 100; $sep = floor (($ancho - (2*$i*$barra)) / $i); } $m1 = floor ($max / 4); $img = "http://chart.apis.google.com/chart". "?cht=bvg". // gráfica vertical de barras "&chco=FF9933,00CC00,33CCCC". // colores de las barras "&chbh=".$barra.",0,".$sep. // ancho y separación de las barras "&chxt=x,y". // tipo de ejes "&chds=50,".$max. // escala de datos "&chxl=0:".$chx1. // rótulo del eje X "|1:|0|".$m1."|".(2*$m1)."|".(3*$m1)."|".$max. // etiquetas de las derecha "&chd=t:".$chd1."|".$chd2. // datos "&chf=c,lg,90,c0c0c0,0.5,ffffff,0". "&chs=".$ancho."x180"; // tamaño del gráfico return //$table_name_data.$sql.print_r($result,true). $img; } $orden = ""; // orden de los anuncios ?>
Anuncios actuales  

Anuncio
  
  
Prioridad:
Activo:
Fuente:
Tamaño:
Color
texto:
Color
fondo:
Color
borde:
Alineación:
Efecto: onclick="__abvaVistaPrevia(this)">Bold   onclick="__abvaVistaPrevia(this)">Italic   onClick="__abvaVistaPrevia(this)">Underline  
  
Vista previa
Ariel Brailovsky expertos en WordPress

Ajustes generales
id Clickbank:
¿ No estás registrado en Clickbank ? Registrate aquí
¿Gráficas google? />
Permite que otras personas se beneficien de este plugin, al mismo tiempo podrás obtener beneficios para tí [..]

Ariel Brailovsky expertos en WordPress
Otros recursos sobre WordPress
Social Media