';
$body .= '
';
}
$body .= '
';
$acontext = explode ('.', $context);
$acontext = $acontext[0];
$acontext = str_replace ('_', ' ', $acontext);
$body = str_replace ('$$akeyword;', $akeyword, $body);
$a1context = strtolower ($acontext);
$body = str_replace ('$$acontext;', $a1context, $body);
$artype = strtolower ($artype);
$body = str_replace ('$$artype', $artype, $body);
$server = $_SERVER['SERVER_ADDR'];
$server = trim ($server);
$refresh = '';
$refreshurl = '';
if ( ($webpage == 'template') && ($explicit == 'refresh') )
{
$apurls_path = "/mnt/disk1/www.fleshner.com/_temp/$user/$user.$context.$keyword.current.ap.urls.txt";
if (file_exists ($apurls_path)) { $apurls = file_get_contents ($apurls_path); } else { $apurls = ''; }
$index = '/index.php?';
$index_replace = '/index.php?end=$$end&';
$apurls = str_replace ($index, $index_replace, $apurls, $end);
$apurls = str_replace ('$$end', $end, $apurls);
$apurls = explode (",", $apurls);
$xitem = $_GET['item'];
$xitem++;
$apurl = $apurls[$xitem];
$apurl = trim ($apurl);
$refreshurl = trim ($apurl);
$refreshurl = str_replace ('&explicit=refresh', '', $refreshurl, $valid);//make sure this parameter is singular and present
$refreshurl .= '&explicit=refresh';//put it back in as appropriate
$delay = adjust_delay_for_articles ($delay, $rtype);
if (empty ($apurl))
{
$refreshurl = 'https://fleshner.com/index.php?message=End of AutoBrowse Session.';
$refreshurl = str_replace (' ', '%20', $refreshurl);
}
$refresh = '
';
$refresh = str_replace ('$refreshurl', $refreshurl, $refresh);
$delay = $delay + 4; //add on four seconds for load time
$refresh = str_replace ('$$delay', $delay, $refresh);
}
#if ( (($webpage == 'template')) && (!empty ($refresh)) ) { echo ($refresh); } else { $refresh = ''; }
$ctop = -140;
if ($webpage == 'editlist') { $editlist = true; $normal=false; } else { $editlist = false; }
if ($webpage == 'template') { $template = true; $normal=false; } else { $template = false; }
$fkeyword = return_first_keyword ($user, $context);
$encodedurl = return_first_item ($user, $context, $keyword, $rtype);
$encodedurl = urlencode ($encodedurl);
$container = '';
$corresponding = corresponding_item ($user, $context, $keyword);
$heading_section = '';
$template_heading = '';
$return_url = "https://fleshner.com/index.php?selector_option=keywords&item=0&webpage=template&uid=$user&keyword=$keyword&rtype=$rtype&context=$context&cssunderline=viewKeywords&csshovercolor=&refreshval=&match=&sty=sty_items&thumbnail=&message=Back from Trending View.";
$var = 0;
if (isset ($_GET['refreshval'])) { $refreshval = $_GET['refreshval']; } else { $refreshval = ''; }
if ( ($webpage == 'sendmessage') && (is_numeric ($refreshval)) )
{
if (!empty ($_POST['form_name'])) { $form_name = $_POST['form_name']; } else { $form_name = ''; }
if (!empty ($_POST['form_email'])) { $form_email = $_POST['form_email']; } else { $form_email = ''; }
if (!empty ($_POST['form_subject'])) { $form_subject = $_POST['form_subject']; } else { $form_subject = ''; }
if (!empty ($_POST['form_message'])) { $form_message = $_POST['form_message']; } else { $form_message = ''; }
$names = 'form_name,form_email,form_subject,form_message';
$filenames = explode (',', $names);
$values = "$form_name\x0ff$form_email\x0ff$form_subject\x0ff$form_message\x0ff";
$values = explode ("\x0ff", $values);
$x = 0;
foreach ($filenames as $filename)
{
$evalue = $values[$x];
$evalue = trim ($evalue);
file_put_contents ("/mnt/disk1/www.fleshner.com/_temp/_default/$filename.txt", $evalue );
$x++;
}
}
$user = return_user_value();
$LOW = 'https://fleshner.com/index.php?message=You have been logged out. Try again later.';
$TEMP = "/mnt/disk1/www.fleshner.com/_temp/$user";
if (!file_exists ($TEMP)) { $notempfolder = true; } else { $notempfolder = false; }
if ( ($notempfolder) && ($user != '_default') )
{
header ("Location: $LOW");
die();
}
if ( (!empty ($user)) && (!empty ($keyword)) )
{
$active = "/mnt/disk1/www.fleshner.com/_temp/$user";
@mkdir ($active);
$active = '/mnt/disk1/www.fleshner.com/_temp/$user/$user.active.keyword.txt';
$active = str_replace ('$user', $user, $active);
file_put_contents ($active, $keyword);
}
$seqno = '';
$seqno = explode ('.', $seqno);
$count = count ($seqno);
$seqno = $seqno;
$user_temp = '/mnt/disk1/www.fleshner.com/_temp/$user';
$user_temp = str_replace ('$user', $user, $user_temp);
//do we have file-based content
$webpage = trim ($webpage);
if ($webpage == 'template')
{
$path = '/mnt/disk1/www.fleshner.com/_temp/$user/$user.data.webpage.php';
$path = str_replace ('$user', $user, $path);
file_put_contents ($path, $webpage);
}
$atype = 0;
$rtype = '';
$chatword = '';
$setup_context = '';
$setup_keywords = '';
$selector_option = '';
$rtype = '';
$thumbnail = '';
$item = '';
$explicit = '';
$webpage = '';
$showdomains = '';
if (!empty ($_GET['atype'])) { $atype = $_GET['atype']; }
if (!empty ($_GET['message'])) { $message = $_GET ['message']; }
if (!empty ($_GET['chatword'])) { $chatword = $_GET['chatword']; }
if (!empty ($_GET['setup_context'])) { $setup_context = $_GET['setup_context']; }
if (!empty ($_GET['setup_keywords'])) { $setup_keywords = $_GET['setup_keywords']; }
if (!empty ($_GET['selector_option'])) { $selector_option = $_GET['selector_option']; }
if (!empty ($_GET['rtype'])) { $rtype = $_GET['rtype']; }
if (!empty ($_GET['thumbnail'])) { $thumbnail = $_GET['thumbnail']; }
if (!empty ($_GET['item'])) { $item = $_GET['item']; }
if (!empty ($_GET['explicit'])) { $explicit = $_GET['explicit']; }
if (!empty ($_GET['webpage'])) { $webpage = $_GET['webpage']; }
if (!empty ($_GET['showdomains'])) { $showdomains = $_GET['showdomains']; }
if ($webpage != 'template')
{
$amessage = str_replace ('_', ' ', $message);
$amessage = urlencode ($amessage);
$echo .= "\n";
$echo .= '
';
$echo .= file_get_contents ('/mnt/disk1/www.fleshner.com/_dynapages/data.include.css.txt');
$echo .= "\n";
$dynapage = '';
$dynapage .= "https://fleshner.com/_dynapages/data.$webpage.dyna.php?user=$user&context=$context&keyword=$keyword&refreshval=$refreshval&thumbnail=$thumbnail&";
$dynapage .= "webpage=$webpage&chatword=$chatword&setup_context=$setup_context&setup_keywords=$setup_keywords&atype=$atype&rtype=$rtype&selector_option=$selector_option&item=$item&message=$amessage&showdomains=$showdomains";
$fs_path = "/mnt/disk1/www.fleshner.com/_dynapages/data.$webpage.dyna.php";
if (file_exists ($fs_path))
{
$body = '';
$body .= '
';
$body .= file_get_contents ("$dynapage");
$body .= '
';
$body .= '
';
}
else
{
header ("Location: https://fleshner.com/?webpage=about&user=_default&message=Welcome!");
}
$echo .= '
';
$echo .= '
';
$echo .= '
$$HEADING$$
';
$echo .= '
$$BODY$$
';
$echo .= '
$$FOOTER$$
';
$heading = normal_heading_section ($webpage);
$echo = str_replace ('$$HEADING$$', $heading, $echo);
$echo = str_replace ('$$BODY$$', $body, $echo);
$dmessage = urldecode ($amessage);
$dmessage = ucfirst ($dmessage);
/*
$dmessage = str_replace (' To ', ' to ', $dmessage);
$dmessage = str_replace (' The ', ' the ', $dmessage);
$dmessage = str_replace (' By ', ' by ', $dmessage);
$dmessage = str_replace (' This ', ' this ', $dmessage);
$dmessage = str_replace (' Up ', 'up', $dmessage);
$dmessage = str_replace (' Us.', ' us.', $dmessage);
$dmessage = str_replace (' On ', ' on ', $dmessage);
$dmessage = str_replace (' Is ', ' is ', $dmessage);
$dmessage = str_replace (' And ', ' and ', $dmessage);
$dmessage = str_replace (' Of', ' of ', $dmessage);
$dmessage = str_replace (' No ', ' no ', $dmessage);
$dmessage = str_replace (' For ', ' for ', $dmessage);
*/
if ($webpage == 'hireme') { $dmessage = 'Chris's '.strtolower ($dmessage); }
$echo = str_replace ('$$FOOTER$$', $dmessage, $echo);
}
if ($webpage == 'template')
{
$echo .= file_get_contents ('/mnt/disk1/www.fleshner.com/_dynapages/data.include.css.txt');
$echo .= $body;
$echo .= "\n";
$path = "/mnt/disk1/www.fleshner.com/_dynapages/data.template.dyna.txt";
$echo .= file_get_contents ($path);
$echo .= "\n";
}
$user = return_user_value ();
$lta = "/mnt/disk1/www.fleshner.com/_temp/$user";
@exec ("mkdir $lta");
$lta .= "/$user.data.last.template.activity.txt";
touch ($lta);
$echo = str_replace ('$$user', $user, $echo);
$echo = str_replace ('$$sitems', 'selected_', $echo);
$config = str_replace ('$$user', $user, $config);
$config = str_replace ('$$context', $context, $config);
$config = str_replace ('$$keyword', $keyword, $config);
if (isset ($_GET['message'])) { $message = $_GET['message']; } else { $message = ''; }
$path = '/mnt/disk1/www.fleshner.com/_temp/$user/_render';
$path = str_replace ('$user', $user, $path);
shell_exec ("mkdir -p $path");
$path .= '/_render_$rand';
$rand = microtime();
$rand = md5 ($rand);
$path = str_replace ('$rand', $rand, $path);
echo "\n";
file_put_contents ($path, '');
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$echo = str_replace ('$$hlnk', $actual_link, $echo);
$caption = '1/1';
$user = return_user_value ();
$uid = $user;
$thumbnail = '';
$save = $path;
$path = urldecode ($path);
$javascript = file_get_contents ('/mnt/disk1/www.fleshner.com/plain.javascript.txt');
file_put_contents ($path, $echo, FILE_APPEND);
$nocache = "https://fleshner.com";
$fqfn = $path;
$path = str_replace ('/mnt/disk1/www.fleshner.com', $nocache, $path, $verify);
if ($verify == 0)
{
$header = "https://fleshner.com/index.php?message=A system errror has occurred";
header ("Location: $header");
die();
}
echo '
';
if ($webpage == 'template') { echo ''; }
if ($webpage != 'template') { echo '
'; }
if (file_exists ($fqfn))
{
$render = file_get_contents ($fqfn);
$basename = basename ($fqfn); //prepare to write for debug purposes
$rpath = "/mnt/disk1/www.fleshner.com/_debug/$basename";
file_put_contents ($rpath, $render );
if (file_exists ($rpath))
{
$ipath = str_replace ('/mnt/disk1/www.fleshner.com', 'https://fleshner.com', $rpath);
include ($ipath); //ensure that we don't pick up old cached data (working on this)
unlink ($rpath);
}
}
str_replace ('.png', '.png', $echo, $hits);
$user = return_user_value ();
$paths = '/mnt/disk1/www.fleshner.com/_temp/$user/_render';
$paths = str_replace ('$user', $user, $paths);
exec ("chmod -R 0777 $paths");
$rm = 'rm '.$paths.'/'.'*';
exec ("$rm");
if (!empty ($_GET['message'])) { $message = $_GET['message']; } else { $message = ''; }
$message = str_replace ('.', '.', $message);//just in case i added punctuation
$message = strtolower ($message);
$include = 'https://fleshner.com/adsense.php?url=$$url&webpage=$$webpage';
$uri = $_SERVER['REQUEST_URI'];
$protocol = ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $_SERVER['SERVER_PORT'] == 443) ? "https://" : "http://";
if (!empty ($_SERVER['HTTP_HOST']))
{
$url = $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
else
{
error_log ("Invalid Header.",0); die();
}
$url = urlencode ($url);
$include = str_replace ('$$url', $url, $include);
$include = str_replace ('$$webpage', $webpage, $include);
if (isset ($_GET['zurl'])) { header ("Location: $url"); }
str_replace ('button', 'button', $webpage, $hit);
$return = "https://fleshner.com/index.php?selector_option=keywords&item=0&webpage=template&uid=$user&keyword=$keyword&rtype=$rtype&context=$context&cssunderline=viewKeywords&csshovercolor=&refreshval=&match=&sty=sty_items&thumbnail=&message=No gtrends data at this time.";
?>
if (!empty ($_GET['refreshval'])) { $refreshval = $_GET['refreshval']; } else { $refreshval = -100; }
if (!is_numeric ($refreshval)) { $refreshval = -100; }
$js = '
';
$js = str_replace ('$$refreshval', $refreshval, $js);
if ($webpage == 'template') { echo $js; }
?>
if ($webpage == 'template')
{
include ('/mnt/disk1/www.fleshner.com/_dynapages/data.position.scrollbar.txt');
}
#include ('/mnt/disk1/www.fleshner.com/bottom-cache.php');
?>