<?php include_once "header.php"; ?> <?php $numEntries = getIndexNum(); $cookie = $_COOKIE['mindof']; $storedcookie = getCookie(); $twitter_update = gettwitterCheck(); $twitter_email = gettwitterEmail(); if (checkCookie()) { showUpdateForm(); } if (checkCookie() && stripslashes($_POST['checksubmit'])) { $update = strip_tags($_POST['update']); addEntry($update); if ($twitter_update == 1 && strlen($twitter_email) > 0) { $twit_update = stripslashes($_POST['update']); updateTwitter($update); } echo " <img src=\"icon_accept.gif\" border=\"0\" /> mindof updated. "; } showEntriesIndex($numEntries); echo "<a href=\"" . $siteUrl . "archive.php?pagenum=2\" class=\"box\">older »</a>"; ?> <?php include_once "footer.php"; ?>
function showTwitterform() { $twitterCheck = gettwitterCheck(); if ($twitterCheck == 1) { $checked = "checked"; $content = ''; } else { $checked = ""; $content = '<a href="./redirect.php"><img src="./images/lighter.png" alt="Sign in with Twitter"/></a><br />'; } echo "<form action=\""; echo $_SERVER['PHP_SELF']; echo "\""; echo " method=\"post\">"; echo "user: <input type=\"text\" name=\"user\"><br />"; echo "pass: <input type=\"password\" name=\"pass\"><br />"; echo "update twitter also: <input type=\"checkbox\" name=\"twitterCheck\" value=\"1\" " . $checked . "><br />"; print_r($content); echo "<input type=\"hidden\" name=\"checksubmit\" value=\"1\">"; echo "<input type=\"submit\" name=\"submit\" value=\"update\">"; echo "</form>"; }