', "-->\n", $echo); $config = file_get_contents ('/mnt/disk1/www.fleshner.com/_config/dynamic_url_functions.txt'); $config .= "\n"; $config .= file_get_contents ('/mnt/disk1/www.fleshner.com/_config/dynamic_url_declarations.txt'); $config .= "\n"; ?> fleshner.com 180) { $reset = str_replace ($timeout, '', $reset);} $reset = str_replace ('_default', '', $reset); $reset = str_replace (',', '', $reset); file_put_contents ($sessions, $reset); } } if ($webpage == 'template') { $begin_here = check_where_to_begin ($user, $context, $keyword); } $user = return_user_value (); $seconds_path = "/mnt/disk1/www.fleshner.com/_temp/$user/data.refresh.seconds.txt"; $play_path = "/mnt/disk1/www.fleshner.com/_temp/$user/data.refresh.play.txt"; $dtin = "/mnt/disk1/www.fleshner.com/_temp/$user/data.toggle.inputform.txt"; $dtui = "/mnt/disk1/www.fleshner.com/_temp/$user/data.toggle.url.items.txt"; $path = "/mnt/disk1/www.fleshner.com/_temp/$user/$user.current.autoplay.item.txt"; if ( $webpage == 'sample') { $message = 'Error'; } $user = return_user_value (); if (isset ($_GET['error'])) { $error = $_GET['error']; } else { $error = 'false'; } if (isset ($_GET['kwbdl'])) { $kwbdl = $_GET['kwbdl']; } else { $kwbdl = ''; } if (isset ($_GET['keyword'])) { $keyword = $_GET['keyword']; } else { $keyword = ''; } if (isset ($_GET['context'])) { $context = $_GET['context']; } else { $context = ''; } if (isset ($_GET['rtype'])) { $rtype = $_GET['rtype']; } else { $rtype = ''; } if (isset ($_GET['item'])) { $item = $_GET['item']; } else { $item = 0; } $match = 'Item $item'; $match = md5 ($match); $match = strtoupper ($match); if (!empty ($user)) { $temps = "/mnt/disk1/www.fleshner.com/_temp/$user*"; $temps = glob ($temps); foreach ($temps as $temp) { $folder = basename ($temp); str_replace ('kwb_', '', $temp, $hit); $len = strlen ($folder); if ( ($hit == 0) || ($len != 16) ) { #exec ("chmod -r 0777 $temp"); exec ("rm -r $temp"); } else { @mkdir ("/mnt/disk1/www.fleshner.com/_temp/$user"); @mkdir ("/mnt/disk1/www.fleshner.com/_temp/$user/_uploads"); @mkdir ("/mnt/disk1/www.fleshner.com/_temp/$user/_keywords"); } } } $count = count_items ($user, $context, $keyword, $rtype); $count--; if (isset ($_GET['auto'])) { $auto = $_GET['auto']; } else { $auto = ''; } if (!is_numeric ($auto)) { $abctoggle = '/mnt/disk1/www.fleshner.com/_temp/$$user/abctoggle.txt'; $abctoggle = str_replace ('$$user', $user, $abctoggle); if (file_exists ($abctoggle)) { unlink ($abctoggle); } } if (isset ($_GET['context'])) { $context = $_GET['context']; } else { $context = ''; } if (isset ($_GET['rtype'])) { $rtype = $_GET['rtype']; } else { $rtype = ''; } if (isset ($_GET['item'])) { $item = $_GET['item']; } else { $item = 0; } if (isset ($_GET['selector_option'])) { $selector_option = $_GET['selector_option']; } if (isset ($_GET['abc'])) { $abc = $_GET['abc']; } else { $abc = ''; } if (isset ($_GET['message'])) { $message = $_GET['message']; } else { $message = ''; } if (!empty ($abc)) //more of an indicator that we are running in item mode (the actual indexes are stored elsewhere) - see the paths below { $path = "/mnt/disk1/www.fleshner.com/_temp/$user/_slideindex/_$abc"; exec ("mkdir -p $path"); $path = "/mnt/disk1/www.fleshner.com/_temp/$user/_slideindex/_$abc/index.txt"; $section = ''; if ($abc == 'contexts') { $section = return_all_contexts ($user); } if ($abc == 'keywords') { $section = return_all_keywords ($context, $user); } if ($abc == 'items') { $section = return_all_items ($user, $context, $keyword, $rtype); } $section = explode (',', $section); $section = array_filter ($section); if (file_exists ($path)) { $lookahead = file_get_contents ($path); } else { $lookahead = 0; } if (!empty ($abc)) { $lookahead++; } if (isset ($section[$lookahead])) { file_put_contents ($path, $lookahead); } else { $lookahead = 0; file_put_contents ($path, $lookahead); } } str_replace ('button', 'button', $webpage, $jqrelated); str_replace ('button', '', $webpage, $button); if ($button > 0) { $button = true; } else { $button = false; } $xoffset = 0; $akeyword = str_replace ('_', ' ', $keyword); $body = ''; $body .= ''; $body .= '
'; if ($webpage == 'template') { $body .= '
'; $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."; ?> $(document).ready(function(){ if (jQuery) { var target = document.getElementById("context"); target.scrollIntoView({ behavior: \'smooth\', block: \'nearest\', inline: \'start\' }) } else { // jQuery is not loaded alert("JQuery Error"); } }); '; $js = str_replace ('$$refreshval', $refreshval, $js); if ($webpage == 'template') { echo $js; } ?>