Files
Testing/include/analytics/rec_blogroll.php

59 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php header('Content-type: application/json');
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
include(PATHTOINCLUDES."base.php");
$args = array(
'blr_uid' => FILTER_VALIDATE_INT,
'blr_uname' =>FILTER_SANITIZE_STRING,
'blr_url' =>FILTER_SANITIZE_STRING
);
$sanitizeinputs = filter_input_array(INPUT_POST, $args);
$em="";
$theuid=$_POST['blr_uid'];
$theurl=$_POST['blr_url'];
$theuname=$_POST['blr_uname'];
$sql=sprintf("INSERT INTO `cp_blogroll_rec` (`cp_blogroll_rec`.`user_id`,`cp_blogroll_rec`.`user_name`,`cp_blogroll_rec`.`blog_url`)
VALUES (%s, %s, %s)",
GetSQLValueString($theuid, "int"),
GetSQLValueString($theuname, "text"),
GetSQLValueString($theurl, "text"));
$query=$database->database_query($sql) or $em=$em.$database->database_error();
$arr = array ('error'=>$em);
echo json_encode($arr);
$trec=$theurl;
mail("phil@b8world.com", "Blogroll Recommendation", $trec);
mail("bateworld@gmail.com", "Blogroll Recommendation", $trec);
mail("bwcreative@gmail.com", "Blogroll Recommendation", $trec);
mail("bateworldhelp@gmail.com", "Blogroll Recommendation", $trec);
if(!isset($_SESSION["blr_nosub"])){$_SESSION["blr_nosub"]=0;}
$_SESSION["blr_nosub"]=$_SESSION["blr_nosub"] + 1;
?>