0) { for ($count = $ib; $row = mysql_fetch_row($result, MYSQL_NUM); ++$count) { if ($bthere == "" && firstgo) { $firstgo=false; $morestr='
'; } else { $firstgo=false; $morestr.='
'; } } } } catch (Exception $e) { die('Could not connect: ' . mysql_error()); } return $morestr; } function insertposting($cont) { global $dbname, $link; $pusername=""; if ( isset( $_POST['ucolumn'] ) ) { $pusername=urldecode($_POST['username']); } $temail=""; if ( isset( $_POST['email'] ) ) { $temail=urldecode($_POST['email']); } $pstatus="moderating"; try { if (!$link) $link = db_connect(); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname); $result = mysql_query("insert into posting values (NULL,'".$cont."', '".$pusername."', '".$temail."', '".$pstatus."')"); } catch (Exception $e) { die('Could not connect: ' . mysql_error()); } } function updateposting($cont) { global $dbname, $link; try { if (!$link) $link = db_connect(); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db($dbname); $result = mysql_query("update posting set pstatus='published' where content='".urlencode(str_replace("Agree to Moderation of ","",$cont))."' or content='".str_replace("Agree to Moderation of ","",$cont)."')"); } catch (Exception $e) { die('Could not connect: ' . mysql_error()); } } for ($j=0; $j<200; $j++) { if (isset($_POST['b' . $j])) { $fx=urlencode(str_replace("Agree to Moderation of ","",urldecode($_POST['b' . $j]))) . ".aml"; if (file_exists($fx)) { unlink($fx); $qw=@file_get_contents("what_we_have_in_common.html"); file_put_contents("what_we_have_in_common.html", str_replace("Agree to Moderation of ","",urldecode($_POST['b' . $j])) . "\n" . $qw); } else if (str_replace(".aml", "", $fx) != "") { $qw=@file_get_contents("what_we_have_in_common.html"); file_put_contents("what_we_have_in_common.html", str_replace("Agree to Moderation of ","",urldecode($_POST['b' . $j])) . "\n" . $qw); updateposting(urldecode($_POST['b' . $j])); } } } $nextpage="next.php"; $nextval="Next Page"; $logpage="login.php"; if (!file_exists("loginpage.name")) { $loginpage=@file_get_contents("loginpage.name"); if (strpos($loginpage, ".php") !== false) $logpage=$loginpage; } if (!isset($_SESSION['login']) && !isset($_POST['login'])) { header("Location: " . $logpage . str_replace("?&", "?", ("?" . str_replace("backto=", "lastone=", $_SERVER['QUERY_STRING']) . "&backto=" . $_SERVER['PHP_SELF']))); exit; } $_SESSION['login']=true; $backbuttonhtml=""; $backbuttonhtml=""; $i=0; foreach (glob("*.aml") as $filename) { if (substr($filename, 1, 1) == ":") { // Windows $parts=explode("\\", $filename); } else { $parts=explode("/", $filename); } $thisfile=urldecode(str_replace(".aml", "", $parts[-1 + sizeof($parts)])); if ($backbuttonhtml == "") { $backbuttonhtml='
'; } else { $backbuttonhtml.='
'; } $i++; } if ($backbuttonhtml == "") { $backbuttonhtml='




'; } else { $backbuttonhtml.='





'; } $i++; $backbuttonhtml.=moderatepostings($backbuttonhtml, $i); if (strpos($_SERVER['HTTP_REFERER'], $logpage) === false && strpos($_SERVER['HTTP_REFERER'], $nextpage) === false && strlen($_SERVER['HTTP_REFERER']) > 0) { $backpage=$_SERVER['HTTP_REFERER']; $backvals=explode("/", $backpage); $backval= strtoupper(substr($backvals[sizeof($backvals) - 1],0,1)) . str_replace(".php", " Page", substr($backvals[sizeof($backvals) - 1],1)); } ?>


Logout