<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>

<channel>
	<title>RotSystems</title>
	<atom:link href="http://www.rotsystems.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.rotsystems.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sat, 02 Aug 2008 02:30:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>C# String Formating</title>
		<link>http://www.rotsystems.com/uncategorized/c-string-formating</link>
		<comments>http://www.rotsystems.com/uncategorized/c-string-formating#comments</comments>
		<pubDate>Sat, 02 Aug 2008 02:30:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rotsystems.com/?p=17</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>String formating is pretty easy task in C# or ASP.NET</p>
<p>To format date you use:<br />
{0:d}</p>
<p>To format numers to contains semicolon as thousand separator you use:<br />
{0:n}</p>
<p>The easiet way to format a string is to use String.Format method.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rotsystems.com/uncategorized/c-string-formating/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to strip html tags from text in PHP</title>
		<link>http://www.rotsystems.com/uncategorized/how-to-strip-html-tags-from-text-in-php</link>
		<comments>http://www.rotsystems.com/uncategorized/how-to-strip-html-tags-from-text-in-php#comments</comments>
		<pubDate>Sat, 02 Aug 2008 02:27:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.rotsystems.com/uncategorized/how-to-strip-html-tags-from-text-in-php</guid>
		<description><![CDATA[Recently I faced small problem when working for one of my clients. He stores html tags in database:
&#60;font color=&#34;00ff00&#34;&#62;Some text&#60;/font&#62;
&#160;
I need quick and dirty solution, so I decided to use php function strip_tags()
This function removes all html text leaving only text, this was exactly what I need.
The final code look like this:
   $text [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I faced small problem when working for one of my clients. He stores html tags in database:</p>
<p>&lt;font color=&quot;00ff00&quot;&gt;Some text&lt;/font&gt;</p>
<p>&#160;</p>
<p>I need quick and dirty solution, so I decided to use php function <strong>strip_tags()</strong></p>
<p>This function removes all html text leaving only text, this was exactly what I need.</p>
<p>The final code look like this:</p>
<p>  <code> $text = strip_tags('<font color="#00ff00">Text</font>&#8216;); </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rotsystems.com/uncategorized/how-to-strip-html-tags-from-text-in-php/feed</wfw:commentRss>
		</item>
		<item>
		<title>Printing in JavaScript</title>
		<link>http://www.rotsystems.com/articles/printing-in-javascript</link>
		<comments>http://www.rotsystems.com/articles/printing-in-javascript#comments</comments>
		<pubDate>Wed, 14 May 2008 00:31:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[javascript print]]></category>

		<guid isPermaLink="false">http://www.rotsystems.com/?p=13</guid>
		<description><![CDATA[Have you ever been asked by customer to create Print button, or &#8220;Print Article&#8221; feature. I am sure it happened to you, and if not learning something new is always a good thing.
JavaScript does not offer to many way to print, actually there is only one method available to you, it is:

window.print();

JavaScript print function performs [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever been asked by customer to create Print button, or &#8220;Print Article&#8221; feature. I am sure it happened to you, and if not learning something new is always a good thing.<br />
JavaScript does not offer to many way to print, actually there is only one method available to you, it is:<br />
<code><br />
window.print();<br />
</code><br />
JavaScript print function performs the same operation as &#8220;Print&#8221; function of your browser. You can think that this function is useless, but it is not. It can help you creating more user friendly applications. Below example shows how to print a webpage on button click.<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></span>Print Example 1<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body&gt;</span></span>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent nec 
orci. Cras pellentesque velit a libero. Phasellus est justo, mollis ut, 
euismod et, consequat a, odio. Maecenas elit neque, tincidunt sed, 
dignissim vel, molestie eu, justo. Vivamus neque. Suspendisse mollis magna 
quis tortor. Sed malesuada nisl id velit. Vestibulum vel neque. Nam 
vestibulum. Donec ultrices dui et dui. In neque. Vivamus ut augue. 
Aenean lobortis magna ac massa. Suspendisse lacinia. Morbi vulputate 
pharetra felis. Vestibulum faucibus. Integer mattis elementum metus.
 Nulla adipiscing dapibus erat. Proin dignissim pharetra dolor. 
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;br</span><span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;input</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;button&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Print&quot;</span> <span style="color: #000066;">onclick</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;window.print();&quot;</span> <span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>  
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></pre></div></div>

<p></code><br />
You can check live demo <a href="http://www.rotsystems.com/examples/exampleprint1.htm" target="_blank">here.</a><br />
Another handy example of using this function is for web pages that server articles. Many times you want to give users the ability to print the article but without any advertisements or graphics, this can be easily accomplished by creating link like this<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;exampleprint2.htm&quot;</span> <span style="color: #000066;">target</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;_blank&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Print this article<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a&gt;</span></span></pre></div></div>

<p></code> target=&#8221;_blank&#8221; will open web page in new window. The webpage with article invokes window.print(); in onload event of tag.<br />
<code></p>

<div class="wp_syntax"><div class="code"><pre class="html4strict"><span style="color: #00bbdd;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;html&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;head&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;title&gt;</span></span>Print Example 2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/title&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/head&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;body</span> <span style="color: #000066;">onload</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;window.print();&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent nec 
orci. Cras pellentesque velit a libero. Phasellus est justo, mollis ut, 
euismod et, consequat a, odio. Maecenas elit neque, tincidunt sed, 
dignissim vel, molestie eu, justo. Vivamus neque. Suspendisse mollis magna 
quis tortor. Sed malesuada nisl id velit. Vestibulum vel neque. Nam 
vestibulum. Donec ultrices dui et dui. In neque. Vivamus ut augue. 
Aenean lobortis magna ac massa. Suspendisse lacinia. Morbi vulputate 
pharetra felis. Vestibulum faucibus. Integer mattis elementum metus.
 Nulla adipiscing dapibus erat. Proin dignissim pharetra dolor. 
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;br</span><span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/body&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/html&gt;</span></span></pre></div></div>

<p></code><br />
You can check live demo <a href="http://www.rotsystems.com/examples/exampleprint2.htm" target="_blank">here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rotsystems.com/articles/printing-in-javascript/feed</wfw:commentRss>
		</item>
		<item>
		<title>Modal Popup in Ajax Control Toolkit display onload</title>
		<link>http://www.rotsystems.com/uncategorized/modal-popup-in-ajax-control-toolkit-display-onload</link>
		<comments>http://www.rotsystems.com/uncategorized/modal-popup-in-ajax-control-toolkit-display-onload#comments</comments>
		<pubDate>Sat, 03 May 2008 00:47:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[ASP.NET]]></category>

		<category><![CDATA[Articles]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Ajax Control Toolkit]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[Modal Popup Extender]]></category>

		<category><![CDATA[VB.NET]]></category>

		<guid isPermaLink="false">http://www.rotsystems.com/?p=11</guid>
		<description><![CDATA[There is a small bug in AjaxControlToolkit when you will add Modal Popup Control Extender,
it is being shown for one second when page is being load. It is not a big issue, but it can be very annoying.
Below file shows the proeblem and the resolution. Resolution is very simple, you just need to add
style=&#8221;display:none&#8221; to [...]]]></description>
			<content:encoded><![CDATA[<p>There is a small bug in AjaxControlToolkit when you will add Modal Popup Control Extender,</p>
<p>it is being shown for one second when page is being load. It is not a big issue, but it can be very annoying.</p>
<p>Below file shows the proeblem and the resolution. Resolution is very simple, you just need to add<br />
style=&#8221;display:none&#8221; to ModalPanel control.</p>
<p> </p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #008000;">&lt;</span>asp<span style="color: #008000;">:</span>Panel runat<span style="color: #008000;">=</span><span style="color: #666666;">&quot;server&quot;</span> ID<span style="color: #008000;">=</span><span style="color: #666666;">&quot;ModalPanel&quot;</span> CssClass<span style="color: #008000;">=</span><span style="color: #666666;">&quot;modalPopup&quot;</span><span style="color: #008000;">&gt;</span>
        <span style="color: #008000;">&lt;</span>asp<span style="color: #008000;">:</span>Label runat<span style="color: #008000;">=</span><span style="color: #666666;">&quot;server&quot;</span> ID<span style="color: #008000;">=</span><span style="color: #666666;">&quot;ModalLabel&quot;</span> Text<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Modal Panel Label&quot;</span> <span style="color: #008000;">/&gt;</span>
        <span style="color: #008000;">&lt;</span>br <span style="color: #008000;">/&gt;&lt;</span>br <span style="color: #008000;">/&gt;</span>
        <span style="color: #008000;">&lt;</span>asp<span style="color: #008000;">:</span>Button runat<span style="color: #008000;">=</span><span style="color: #666666;">&quot;server&quot;</span> ID<span style="color: #008000;">=</span><span style="color: #666666;">&quot;OkButton&quot;</span> Text<span style="color: #008000;">=</span><span style="color: #666666;">&quot;Ok&quot;</span> <span style="color: #008000;">/&gt;</span>
    <span style="color: #008000;">&lt;/</span>asp<span style="color: #008000;">:</span>Panel<span style="color: #008000;">&gt;</span>
    <span style="color: #008000;">&lt;</span>cc1<span style="color: #008000;">:</span>ModalPopupExtender ID<span style="color: #008000;">=</span><span style="color: #666666;">&quot;ModalPopupExtender1&quot;</span> runat<span style="color: #008000;">=</span><span style="color: #666666;">&quot;server&quot;</span>
        PopupControlID<span style="color: #008000;">=</span><span style="color: #666666;">&quot;ModalPanel&quot;</span> DropShadow<span style="color: #008000;">=</span><span style="color: #666666;">&quot;true&quot;</span> TargetControlID<span style="color: #008000;">=</span><span style="color: #666666;">&quot;ShowButton&quot;</span>
        OkControlID<span style="color: #008000;">=</span><span style="color: #666666;">&quot;OkButton&quot;</span> BackgroundCssClass<span style="color: #008000;">=</span><span style="color: #666666;">&quot;modalBackground&quot;</span> <span style="color: #008000;">&gt;</span>
    <span style="color: #008000;">&lt;/</span>cc1<span style="color: #008000;">:</span>ModalPopupExtender<span style="color: #008000;">&gt;</span></pre></div></div>

<p>
<div id="video1" class="flashvideo">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript">
var s1 = new SWFObject("http://www.rotsystems.com/wp-content/plugins/flash-video-player/mediaplayer.swf","n1","320","260","7");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addVariable("javascriptid","n1");
s1.addVariable("height","260");
s1.addVariable("width","320");
s1.addVariable("searchbar","false");
s1.addVariable("screencolor","0x000000");
s1.addVariable("overstretch","true");
s1.addVariable("showeq","false");
s1.addVariable("showicons","true");
s1.addVariable("shownavigation","true");
s1.addVariable("showstop","false");
s1.addVariable("showndigits","true");
s1.addVariable("showdownload","false");
s1.addVariable("usefullscreen","true");
s1.addVariable("autoscroll","false");
s1.addVariable("displayheight","240");
s1.addVariable("thumbsinplaylist","true");
s1.addVariable("autostart","false");
s1.addVariable("bufferlength","3");
s1.addVariable("repeat","false");
s1.addVariable("rotatetime","5");
s1.addVariable("shuffle","false");
s1.addVariable("smoothing","true");
s1.addVariable("volume","80");
s1.addVariable("enablejs","true");
s1.addVariable("linkfromdisplay","false");
s1.addVariable("linktarget","_self");
s1.addVariable("searchlink","http://search.longtail.tv/?q=");
s1.addVariable("file","http://www.rotsystems.com/wp-content/uploads/2008/05/modalpopup.swf");
s1.write("video1");
</script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rotsystems.com/uncategorized/modal-popup-in-ajax-control-toolkit-display-onload/feed</wfw:commentRss>
		</item>
		<item>
		<title>How to get Query String in PHP?</title>
		<link>http://www.rotsystems.com/articles/php/how-to-get-query-string-in-php</link>
		<comments>http://www.rotsystems.com/articles/php/how-to-get-query-string-in-php#comments</comments>
		<pubDate>Wed, 30 Apr 2008 23:32:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[PHP querystring tutorial]]></category>

		<guid isPermaLink="false">http://www.rotsystems.com/?p=4</guid>
		<description><![CDATA[Recently I was implementing a very basic paging system in PHP. The system also supported search functionality, where search parameter was passed in query string, URL was looking like this:
contactlist.php?searchText=some_search_text&#38;pageno=2
contactlist.php or
contactlist.php?pageno=3
The requirement was quite easy I need to append page number to current query string. For those who do not know what is a query [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was implementing a very basic paging system in PHP. The system also supported search functionality, where search parameter was passed in query string, URL was looking like this:</p>
<p>contactlist.php?searchText=some_search_text&amp;pageno=2</p>
<p>contactlist.php or</p>
<p>contactlist.php?pageno=3</p>
<p>The requirement was quite easy I need to append page number to current query string. For those who do not know what is a query string, a small explanation. Query string is used to pass variables. Let&#8217;s look at this url:</p>
<p>contactlist.php?searchText=some_search_text&amp;pageno=2</p>
<p>contactlist.php is a script name</p>
<p> Everything that comes after &#8220;?&#8221; is a query string, so in this example it will be searchText=some_search_text&amp;pageno=2. searchText and pageno are variables and some_search_text and 2 are values. Query string has this form variable1=value&amp;variable2=value, where each variable is separated by ampersand character (&#8221;&amp;&#8221;). </p>
<p>In PHP we can access query string using superglobal variableRecently I was implementing a very basic paging system in PHP. The system also supported search functionality, where search parameter was passed in query string, URL was looking like this:</p>
<p>contactlist.php?searchText=some_search_text&amp;pageno=2</p>
<p>contactlist.php or</p>
<p>contactlist.php?pageno=3</p>
<p>The requirement was quite easy I need to append page number to current query string. For those who do not know what is a query string, a small explanation. Query string is used to pass variables. Let&#8217;s look at this url:</p>
<p>contactlist.php?searchText=some_search_text&amp;pageno=2</p>
<p>contactlist.php is a script name</p>
<p>SERVER, which is an array that contains many useful information. To access query string, use below code:</p>
<p>Recently I was implementing a very basic paging system in PHP. The system also supported search functionality, where search parameter was passed in query string, URL was looking like this:</p>
<p>contactlist.php?searchText=some_search_text&amp;pageno=2</p>
<p>contactlist.php or</p>
<p>contactlist.php?pageno=3</p>
<p>The requirement was quite easy I need to append page number to current query string. For those who do not know what is a query string, a small explanation. Query string is used to pass variables. Let&#8217;s look at this url:</p>
<p>contactlist.php?searchText=some_search_text&amp;pageno=2</p>
<p>contactlist.php is a script name</p>
<p>Everything that comes after “?” is a query string, so in this example it will be searchText=some_search_text&amp;pageno=2. searchText and pageno are variables and some_search_text and 2 are values. Query string has this form variable1=value&amp;variable2=value, where each variable is separated by ampersand character (“&amp;”).</p>
<p>In PHP we can access query string using superglobal variable $_SERVER, which is an array that contains many useful information. To access query string, use below code:</p>
<p>$_SERVER['QUERY_STRING']</p>
<p>We should be very careful when appending new variables to query string, because as I showed above, some time query string can be empty and sometimes it can already contains some variables, because of this before appending new variable, we should check if we have to append ampersand character (“&amp;”) before or not. This can be done by simple if statement presented below. Below code example also uses $_SERVER["PHP_SELF"], which returns script name</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
   <span style="color: #000033;">$self</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;PHP_SELF&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000033;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;QUERY_STRING&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000033;">$finalurl</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$self</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;?&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000033;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;QUERY_STRING&quot;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">.</span> 
      <span style="color: #0000ff;">&quot;&amp;myvariable=myvalue&quot;</span><span style="color: #339933;">;</span>   
&nbsp;
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000033;">$finalurl</span> <span style="color: #339933;">=</span> <span style="color: #000033;">$self</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;?&quot;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;myvariable=myvalue&quot;</span><span style="color: #339933;">;</span>  
&nbsp;
  <span style="color: #009900;">&#125;</span> 
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p> </p>
<p>I hope this simple example will help some one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rotsystems.com/articles/php/how-to-get-query-string-in-php/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
