MUCHAS GRACIAS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Ahora crea la frase, pero no te redirecciona , dejo el código aca
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en" lang="en">
<head>
<?php
include_once('modules/init.php');
echo TS_head();
$newurl = strpos($_SERVER["REQUEST_URI"], 'like.php');
$newurlq = mysql_real_escape_string(strip_tags($_GET['id']));
if ( $newurl !== false ) { header("Location: /".$newurlq.".htm"); }
$colname_banned_ips = $_SERVER['REMOTE_ADDR'];
$query_banned_ips = sprintf("SELECT ip FROM ".$prefix_db."banned_ips WHERE ip = %s", GetSQLValueString($colname_banned_ips, "text"));
$banned_ips = mysql_query($query_banned_ips, $db) or die(mysql_error());
$row_banned_ips = mysql_fetch_assoc($banned_ips);
$totalRows_banned_ips = mysql_num_rows($banned_ips);
if ( $row_banned_ips['ip'] !== NULL )
{ die("$setting[banned_msg]");
} else {
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING']))
{
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$sql = sprintf("SELECT MAX(incr) AS incr FROM MeGusta_data WHERE ip='$ip'");
$datos=mysql_query($sql);
$ultimoid=mysql_fetch_array($datos);
$id = $ultimoid["incr"];
$sql = sprintf("SELECT * FROM `MeGusta_data` WHERE incr='$id'");
$datos=mysql_query($sql);
$fechag=mysql_fetch_array($datos);
$fecha2 = $fechag["fecha"];
$fecha1 = date('Y-m-d H:i:s');
$segdif = (strtotime($fecha1)-strtotime($fecha2));
if ((isset($_POST["lri_insert"])) && ($_POST["lri_insert"] == "form1") && ($segdif > 50))
{
if('$iduser' == 0) {
mysql_query("UPDATE usuarios SET frases=frases+1 WHERE id='$iduser'");
}
$fechatiempo2 = date('Y-m-d H:i:s');
$insertSQL = sprintf("INSERT INTO ".$prefix_db."data (id, ip, text, fecha, idby) VALUES ('$now', '$ip', %s, '$fechatiempo2', '$iduser')", GetSQLValueString($_POST['text'], "text"));
$Result1 = mysql_query($insertSQL, $db) or die(mysql_error());
if ( $setting['url_type'] == "epoch" ) {
$insertGoTo = "/".$now.".htm";
}
if ( $setting['url_type'] == "incremental" ) {
$proc_like_submit = mysql_query("SELECT incr FROM ".$prefix_db."data ORDER BY incr DESC", $db) or die(mysql_error());
$row_plikesubmit = mysql_fetch_assoc($proc_like_submit);
$insertGoTo = "/".$row_plikesubmit[incr].".htm";
}
header(sprintf("Location: %s", $insertGoTo));
$colname_like_single = $_GET['id'];
if ( $setting['url_type'] == "epoch" ) {
$query_like_single = sprintf("SELECT * FROM ".$prefix_db."data WHERE id = %s", GetSQLValueString($colname_like_single, "text"));
}
if ( $setting['url_type'] == "incremental" ) {
$query_like_single = sprintf("SELECT * FROM ".$prefix_db."data WHERE incr = %s", GetSQLValueString($colname_like_single, "text"));
}
$like_single = mysql_query($query_like_single, $db) or die(mysql_error());
$row_like_single = mysql_fetch_assoc($like_single);
$totalRows_like_single = mysql_num_rows($like_single);
$likes_newest = mysql_query( "SELECT * FROM " . $prefix_db . "data ORDER BY id DESC LIMIT $setting[items_on_fp]", $db ) or die( mysql_error() );
$row_likes_newest = mysql_fetch_assoc( $likes_newest );
?>
Ese es el código esencial de like.php