{"id":13,"date":"2006-03-15T15:39:56","date_gmt":"2006-03-15T14:39:56","guid":{"rendered":"http:\/\/new.tom.scholten.nu\/weblog\/?page_id=13"},"modified":"2008-04-01T21:00:31","modified_gmt":"2008-04-01T20:00:31","slug":"scrollertxt","status":"publish","type":"page","link":"https:\/\/tom.scholten.nu\/weblog\/archief\/scrollertxt","title":{"rendered":"Scroller.txt"},"content":{"rendered":"<p>Place scroller.txt (writeable for you&#8217;re webserver)<br \/>\nand scroller.php in a directory, adjust HTML code<br \/>\nand you&#8217;re set to go<\/p>\n<p>Include in the file where you want the scroller to<br \/>\nappear the following IFRAME:<\/p>\n<p>\u00c2\u00a0<\/p>\n<p>File: Scroller.txt (9 lines)<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nklik op de scroller om jouw tekst toe te voegen<br \/>\n1<br \/>\n2<br \/>\n3<br \/>\n4<br \/>\n5<br \/>\n6<br \/>\n7<br \/>\n8<\/p>\n<p>File: Scroller.php<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<blockquote><p>\u00c2\u00a0<\/p>\n<p>#<br \/>\n# Scroller.php<br \/>\n# Copyright (c) 2003 by CoMPa Technology<br \/>\n#\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0 http:\/\/www.compa.nl<br \/>\n#<br \/>\n# Designed for http:\/\/www.wilhelmina.org<br \/>\n# and all others who like the functionality<br \/>\n#<\/p>\n<p># Start session (for keeping track and not letting<br \/>\n# users fill up the string<br \/>\nsession_start();<\/p>\n<p># Get variables<br \/>\n$act=$_GET[&#8216;act&#8217;];<br \/>\n$info=$_POST[&#8216;info&#8217;];<\/p>\n<p># What file to keep the text&#8217;s in<br \/>\n$file=&#8221;.\/scroller.txt&#8221;;<br \/>\n# What seperator to use (can be html text)<br \/>\n$sep=&#8221;<img alt=\"\" height=\"10\" \/>&#8220;;<\/p>\n<p>if ( $act == &#8220;&#8221; )<br \/>\n{<br \/>\nif (is_file($file)) {<br \/>\n$content=file($file);<br \/>\n$arraycount=count($content);<br \/>\nwhile ( $arraycount != 0 ) {<br \/>\n$scroller = $scroller2;<br \/>\n$arraycount&#8211;;<br \/>\n$line=preg_replace(&#8220;\/(&lt;.+?&gt;)\/&#8221;, &#8220;&#8221;, $content[$arraycount]);<br \/>\n$scroller2 = &#8220;$line $sep $scroller&#8221;;<br \/>\n}<br \/>\n$scroller = &#8220;$sep <span style=\"color: #0000ff;\"><em>$line<\/em><\/span> $sep $scroller <span style=\"color: #0000ff;\"><em>$line<\/em><\/span> $sep&#8221;;<\/p>\n<p>?&gt;<br \/>\n<!-- !DOCTYPE HTML PUBLIC \"-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/html4\/loose.dtd\" --><br \/>\n<!-- link rel=\"stylesheet\" type=\"text\/css\" xhref=\"inc\/w16.css\" --><br \/>\n<!-- link rel=\"stylesheet\" type=\"text\/css\" xhref=\"inc\/nomargin.css\" --><\/p>\n<p>\u00c2\u00a0<\/p>\n<p>}<br \/>\nexit;<br \/>\n}<\/p>\n<p>if ( $act == &#8220;edit&#8221; &amp;&amp; $_SESSION[&#8216;scroller_post&#8217;] != &#8220;true&#8221; )<br \/>\n{<br \/>\n?&gt;<\/p>\n<div>\n<form action=\"scroller.php?act=add\" method=\"POST\"> <span style=\"font-size: x-large;\">Jouw tekst:<\/span>\u00c2\u00a0\u00c2\u00a0\u00c2\u00a0<\/p>\n<p><input maxlength=\"40\" name=\"info\" size=\"30\" type=\"TEXT\" \/> <input type=\"SUBMIT\" value=\"Toevoegen\" \/> <\/form>\n<\/div>\n<p>} elseif ( $_SESSION[&#8216;scroller_post&#8217;] == &#8220;true&#8221; ) {<br \/>\n?&gt;<br \/>\n<script type=\"text\/javascript\"><!--\nalert('Je hebt al iets toegevoegd, voor discussies, ga naar het forum');\n\/\/ --><\/script><\/p>\n<p>}\u00c2\u00a0<\/p>\n<p>if ( $act == &#8220;add&#8221; )<br \/>\n{<br \/>\n$_SESSION[&#8216;scroller_post&#8217;]=&#8221;true&#8221;;<\/p>\n<p>if ($content=file($file)) {<br \/>\n# Leave first two intact, reroute all others<br \/>\n$i=1;<br \/>\nwhile ($i&lt;8) { $content[$i]=$content[$i+1]; $i++; }<br \/>\n# add new one<br \/>\n$content[8]=$info.&#8221;\\n&#8221;;<br \/>\n$file=fopen($file,&#8217;w&#8217;);<br \/>\n$i=0; $contentsize=9;<br \/>\nwhile ($i&lt;=$contentsize) {<br \/>\n$content[$i]=preg_replace(&#8220;\/(&lt;.+?&gt;)\/&#8221;, &#8220;&#8221;, $content[$i]);<br \/>\n$content[$i]=stripslashes($content[$i]);<br \/>\nfputs($file,$content[$i]);<br \/>\n$i++;<br \/>\n}<br \/>\nfclose($file);<br \/>\n}<br \/>\n?&gt;<br \/>\n}<br \/>\nexit;<br \/>\n?&gt;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Place scroller.txt (writeable for you&#8217;re webserver) and scroller.php in a directory, adjust HTML code and you&#8217;re set to go Include in the file where you<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":297,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-13","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/pages\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":0,"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/pages\/13\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/pages\/297"}],"wp:attachment":[{"href":"https:\/\/tom.scholten.nu\/weblog\/wp-json\/wp\/v2\/media?parent=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}