<?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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Programming Ideas, Logics, Tips and Tricks</title>
	<atom:link href="http://www.sajithmr.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sajithmr.me</link>
	<description></description>
	<lastBuildDate>Thu, 15 Jul 2010 10:34:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Facebook Graph API &#8211; The missing part</title>
		<link>http://www.sajithmr.me/facebook-graph-api-the-missing-part/</link>
		<comments>http://www.sajithmr.me/facebook-graph-api-the-missing-part/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 08:15:39 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[album]]></category>
		<category><![CDATA[albums]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[empty string]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[functions]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[graph api]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=840</guid>
		<description><![CDATA[As you all know recent changes in privacy issues made Facebook to change their basic API and added some security concerns. From my best practise, most of the old applications are safe, but you will be in trouble when you create new application. By default you cannot access user&#8217;s photos, profile pictures , albums etc. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-841" title="facebook_logo" src="http://www.sajithmr.me/wp-content/uploads/2010/07/facebook_logo.png" alt="facebook_logo" width="400" height="132" /></p>
<p>As you all know recent changes in privacy issues made Facebook to change their basic API and added some security concerns. From my best practise, most of the old applications are safe, but you will be in trouble when you create new application. By default you cannot access user&#8217;s photos, profile pictures , albums etc. If you continue with old REST API, you may face this problem. You will get an empty array or json string when you call <strong>photos.getAlbum</strong>s function.</p>
<p>If you test these functions from Facebook Console Tool:</p>
<p><a href="http://developers.facebook.com/docs/reference/rest/photos.getAlbums" target="_blank">http://developers.facebook.com/docs/reference/rest/photos.getAlbums</a></p>
<p>It returns real value when you select old applications and returns empty string [] if you select your newly created Facebook app.</p>
<p>To get all those support, you need to use new <a href="http://developers.facebook.com/docs/api" target="_blank">Graph API</a></p>
<p>But if you follow the same steps mentioned in that official document, you will still get this empty string problem. Because, in the basic authentication call, there is no permission type is mentioned. You can only see a basic message with Allow or Deny button.</p>
<p>According to that document, as the part of authentication, you need to call this url with your client id and redirect url and it returns an access_token after a #</p>
<pre style="margin-top: 18px; margin-right: 18px; margin-bottom: 18px; margin-left: 39px; padding-top: 7px; padding-right: 0px; padding-bottom: 7px; padding-left: 10px; outline-width: 0px; outline-style: initial; outline-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 3px; border-style: solid; border-color: #d8dfea; line-height: 18px; font-family: monospace; color: #006000; font-size: 13px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f2f2f2; overflow-x: auto; overflow-y: auto; background-position: initial initial; background-repeat: initial initial;">https://graph.facebook.com/oauth/authorize?
    client_id=...&amp;
    redirect_uri=http://www.example.com/oauth_redirect</pre>
<p>You need to use this access_token to request all other functions, eg:</p>
<pre style="margin-top: 18px; margin-right: 18px; margin-bottom: 18px; margin-left: 39px; padding-top: 7px; padding-right: 0px; padding-bottom: 7px; padding-left: 10px; outline-width: 0px; outline-style: initial; outline-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 3px; border-style: solid; border-color: #d8dfea; line-height: 18px; font-family: monospace; color: #006000; font-size: 13px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f2f2f2; overflow-x: auto; overflow-y: auto; background-position: initial initial; background-repeat: initial initial;">https://graph.facebook.com/me?access_token=...</pre>
<p>This call will work for most of the requests except photos or albums. So the mistake in these calls are the permission.</p>
<p><strong><span style="color: #ff6600;">Here is the correction:</span></strong></p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace; margin-top: 18px; margin-right: 18px; margin-bottom: 18px; margin-left: 39px; padding-top: 7px; padding-right: 0px; padding-bottom: 7px; padding-left: 10px; outline-width: 0px; outline-style: initial; outline-color: initial; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 3px; line-height: 18px; font-family: monospace; color: #006000; font-size: 13px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #f2f2f2; overflow-x: auto; overflow-y: auto; border-color: #d8dfea; border-style: solid;">https://graph.facebook.com/oauth/authorize?
    client_id=...&amp;
    redirect_uri=http://www.example.com/oauth_redirect&amp;perms=publish_stream,user_photos</pre>
<p>Here we pass perms parameter to set different permission and if you use the access_token after this request , you can access user photos and albums. You can see another permission popup with album and photo access.</p>
<p><a href="http://developers.facebook.com/docs/authentication/permissions" target="_blank">Here</a> is the list of such extended permissions in Facebook.</p>
<p>This is the problem when you use new Javascript SDK for graph API, or when you try to integrate these API in PHP or PERL or any other Server side scripting language from the scratch.</p>
<p>If you use new <a href="http://github.com/facebook/php-sdk/" target="_blank">Facebook PHP Graph SDK </a>, you cannot get these problems, but there is still another hidden problem if you continue testing code by the example provided by them.</p>
<p>It is my next POST . See you at there</p>
<p>Thanks</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/facebook-graph-api-the-missing-part/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Facebook Graph API for PHP</title>
		<link>http://www.sajithmr.me/facebook-graph-api-for-php/</link>
		<comments>http://www.sajithmr.me/facebook-graph-api-for-php/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 05:29:09 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[blank page]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[install curl]]></category>
		<category><![CDATA[install json]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[pear]]></category>
		<category><![CDATA[pecl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[solution]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=845</guid>
		<description><![CDATA[Like the old REST API, you don&#8217;t need to add 2-3 files for Facebook PHP SDK. The new graph api comes in a single file which is located at http://github.com/facebook/php-sdk/ Copy the facebook.php file in to your webroot and include this file in your php code. require_once(&#8216;facebook.php&#8217;); To work fully functional, you need CURL and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-848" title="php" src="http://www.sajithmr.me/wp-content/uploads/2010/07/php.png" alt="php" width="346" height="226" /></p>
<p>Like the old REST API, you don&#8217;t need to add 2-3 files for Facebook PHP SDK. The new graph api comes in a single file which is located at <a href="http://github.com/facebook/php-sdk/" target="_blank">http://github.com/facebook/php-sdk/</a></p>
<p>Copy the facebook.php file in to your webroot and include this file in your php code.</p>
<p>require_once(&#8216;facebook.php&#8217;);</p>
<p>To work fully functional, you need CURL and JSON installed in your server. To check this use phpinfo() function.</p>
<p>To make sure, these missing is the main problem, add  <span style="color: #00ccff;"><span style="color: #3366ff;">exit(&#8216;Curl error&#8217;)</span>;</span> just above the line   <span style="color: #3366ff;">throw new Exception(&#8216;Facebook needs the CURL PHP extension.&#8217;); <span style="color: #000000;">in facebook.php file.</span></span></p>
<p><span style="color: #3366ff;"><span style="color: #000000;">Same for JSON.</span></span></p>
<p>The Linux way of installing CURL is :</p>
<p><strong>sudo apt-get install curl libcurl3 libcurl3-dev php5-curl</strong></p>
<p>To install JSON in your linux machine, follow <a href="http://slaptijack.com/system-administration/lets-install-json-for-php-5/" target="_blank">these</a> steps:</p>
<ol>
<li><strong>pecl install json</strong></li>
<li>Add json.ini file in /etc/php.d/</li>
<li>edit json.ini (in VI) and add this line: xtension=json.so</li>
<li>Save the file and restart appache (/etc/init.d/httpd restart)  <em>or apache2 restart depends on your linux OS</em></li>
</ol>
<p>See the example.php file in php-sdk from Github, if you call getSession function, you only get a NULL string if you are not logged in proper way. So I recommend to redirect into login page if there is no session available.</p>
<p>Here is the change:</p>
<p>if (! $facebook-&gt;getSession()) {</p>
<p>header(&#8216;Location: &#8216;.$facebook-&gt;getLoginUrl());</p>
<p>}</p>
<p>Then try the rest of the part as per example.php , it will work</p>
<p>Good Luck</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/facebook-graph-api-for-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Session problem with cloud server</title>
		<link>http://www.sajithmr.me/php-session-problem-with-cloud-server/</link>
		<comments>http://www.sajithmr.me/php-session-problem-with-cloud-server/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 09:51:58 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[$_session]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[empty]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[refresh]]></category>
		<category><![CDATA[saving]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[session]]></category>
		<category><![CDATA[session not saving]]></category>
		<category><![CDATA[session_save_path]]></category>
		<category><![CDATA[session_start]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=838</guid>
		<description><![CDATA[There is a very strange issue with PHP session when you prefer session to save in files other than database (normal session). The problem is: some times you can access all the saved session values from $_SESSION and sometimes it returns a empty array. If you refresh 10 times, perhaps 4 times you will get [...]]]></description>
			<content:encoded><![CDATA[<p>There is a very strange issue with PHP session when you prefer session to save in files other than database (normal session).</p>
<p><strong>The problem</strong> is: some times you can access all the saved session values from $_SESSION and sometimes it returns a empty array.</p>
<p>If you refresh 10 times, perhaps 4 times you will get session and 6 times you will get it empty.</p>
<p>The problem is not due to domain level security or session expiry . It is due to session file location. If you run a phpinfo() function in any of your page, you can see there is a part of sessions. There you can see a session variable <strong>session_save_path </strong>and it will be pointing to /tmp/ or /etc/somefolder or /var some folder inside the linux file architecture.</p>
<p>Since at clouds, different servers server at different time, some server can see the exact saved files in that location and some server cannot. (Since /tmp etc directories are not shared among them)</p>
<p><strong>Solution</strong>:  Call the below php function and set session file path inside your web root . You need to call this function before your session_start() call</p>
<p>eg:</p>
<p><strong>session_save_path</strong>(&#8216;/mnt/stor1-wc2-dfw1/4675/5044/to/your/website/rootfolder/or/inner/directory<a style="color: #0000cc;" href="http://research.cicr.com.eg/web/content/'" target="_blank">&#8216;</a>);</p>
<p>For windows users as well, this is the solution. This problem occurs in ASP application as well.</p>
<p>Thanks</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/php-session-problem-with-cloud-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VARDUMP.IT &#8211; PHP remote debugging console</title>
		<link>http://www.sajithmr.me/vardump-it-php-remote-debugging-console/</link>
		<comments>http://www.sajithmr.me/vardump-it-php-remote-debugging-console/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 23:42:43 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[vardump]]></category>
		<category><![CDATA[var_dump]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=833</guid>
		<description><![CDATA[In PHP coding, we spend most of the time for debugging. Either we use echo, print_r or var_dump to check variable values or check whether a particular function is executing or not. These all things are outputting something to browser. This is not applicable in case of redirection, or image processing (GD) or sometimes with [...]]]></description>
			<content:encoded><![CDATA[<p><a href=" http://vardump.it" target="_blank"><img class="alignnone" src="http://vardump.it/images/logo.jpg" alt="" width="206" height="58" /></a></p>
<p>In PHP coding, we spend most of the time for debugging. Either we use echo, print_r or var_dump to check variable values or check whether a particular function is executing or not.</p>
<p>These all things are outputting something to browser. This is not applicable in case of redirection, or image processing (GD) or sometimes with callback url for Payment integrations.</p>
<p>header(Location: etc);may cause Warning : header is already sent , if you put an echo or debug and you cannot  see the output, since it redirects into some other page.</p>
<p>Here is your <strong><span style="color: #993300;">remote debugging console</span></strong> to solve these problems.<a href=" http://vardump.it" target="_blank"> http://vardump.it</a></p>
<p><img class="alignnone size-full wp-image-834" title="remote-console" src="http://www.sajithmr.me/wp-content/uploads/2010/06/remote-console.png" alt="remote-console" width="400" height="320" /></p>
<p>Copy the url from the site and use that url for your debugging purpose and <strong><span style="color: #ff6600;">keep the console open in another tab.</span></strong></p>
<p>eg:</p>
<p>&lt;?php</p>
<p>file_get_contents(&#8216;http://vardump.it/253522/inserted-into-database&#8217;);  // last part of this url is your debugging message</p>
<p>?&gt;</p>
<p>You can see these messages from your remote console http://vardump.it/253522 (last numbers are your unique key)</p>
<p>The debug url is formatted in this way: <span style="text-decoration: underline;"><strong>http://vardump.it/debug-id/your message here</strong></span></p>
<p>Email me for more details.</p>
<p>More features like watch, break etc are under development</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/vardump-it-php-remote-debugging-console/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multi-language support with PHP</title>
		<link>http://www.sajithmr.me/multi-language-support-with-php/</link>
		<comments>http://www.sajithmr.me/multi-language-support-with-php/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 10:28:08 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[arab]]></category>
		<category><![CDATA[engilsh]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[french]]></category>
		<category><![CDATA[hindi]]></category>
		<category><![CDATA[multi]]></category>
		<category><![CDATA[multi-language]]></category>
		<category><![CDATA[multi-langugage support]]></category>
		<category><![CDATA[support]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=725</guid>
		<description><![CDATA[If you aim to create a multi-language  website using PHP + Mysql , remember the following tips. You can use mysql database for this purpose rather than using separate language files as usual content management system does. You can create a table with following structure for this purpose.Table: muli-lang string_id: page_id: en: arb: fr: Here [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-728" title="multi-language-interface" src="http://www.sajithmr.me/wp-content/uploads/2010/06/multi-language-interface-300x197.jpg" alt="multi-language-interface" width="300" height="197" /></p>
<p>If you aim to create a multi-language  website using PHP + Mysql , remember the following tips.</p>
<ul>
<li>You can use mysql database for this purpose rather than using separate language files as usual content management system does.</li>
<li>You can create a table with following structure for this purpose.Table: muli-lang<br />
string_id:<br />
page_id:<br />
en:<br />
arb:<br />
fr:</li>
<li> Here string_id is the code for getting content  eg: welcome_message<br />
page_id is for saving in which page the content belongs to.  eg: home_page, login_page etc<br />
In field en, you have to enter the message in english,eg: Welcome to my website<br />
In arb field you can enter the corresponding translation in arab. eg: مرحبا بكم في موقعي</li>
<li>If you need to add more languages, it is just adding one more column to this table and put all translated values.</li>
<li>Write a class or functions in PHP to retrieve all the informations.<br />
eg: function get(language_id, page_id) returns corresponding message</li>
<li>Use session to save lang value. For example if you switch to french, set a variable lang= fr and use this variable to decide which column is to access from multi-lang table.eg: the sql will be , SELECT $lang FROM multi-lang WHERE string_id = &#8216;welcome_message&#8217;</li>
<li>For some string fragment like about_us, contact_us etc, it has global scope; then leave page_id as blank</li>
<li>To avoid multiple calling of functions to get translation, write a common function to get all translation for a particular page_id as array, and use this array all through the page. Thus you can avoid mysql query multiple times.<br />
eg: function get_all($page_id) returns array, say $Translate of all strings replacement. $Translate['login_message'], $Translate['login_error']</li>
<li>Additional things to remember:</li>
<li>Use this meta tab in html header<br />
<span style="color: #993300;">&lt;</span><em><span style="color: #993300;">meta</span></em><span style="color: #993300;"> http-equiv=&#8221;Content-Type&#8221; content=&#8221;text /</span><em><span style="color: #993300;">html</span></em><span style="color: #993300;">; charset=</span><em><span style="color: #993300;">UTF-8</span></em><span style="color: #993300;">&#8221; /&gt;</span><br />
to show all languages</li>
<li>Create my_sql table in UTF-8 format</li>
<li>Execute the following query before executing any retrieval queries. Otherwise you may get ????? for language like Arabic, Hindi, Chinese etc.<br />
<span style="color: #333399;">mysql_query(&#8220;SET CHARACTER SET &#8216;utf8&#8242;&#8221;, $link);</span></li>
</ul>
<p>I hope these information may help you when you develop a multi-langauge support website</p>
<p>Thank you<br />
Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/multi-language-support-with-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Management Lessons &#8211; Funny but interesting</title>
		<link>http://www.sajithmr.me/management-lessons-funny-but-interesting/</link>
		<comments>http://www.sajithmr.me/management-lessons-funny-but-interesting/#comments</comments>
		<pubDate>Fri, 21 May 2010 21:11:14 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=720</guid>
		<description><![CDATA[A very interesting presentation I got from  one of my friend last week. I found somebody uploaded that in slideshare. It is here. Remember, you can forward this ppt to your friends. Only friends ! Don&#8217;t forward to your company members or to your boss !  :)]]></description>
			<content:encoded><![CDATA[<p>A very interesting presentation I got from  one of my friend last week. I found somebody uploaded that in slideshare. It is here.</p>
<p>Remember, you can forward this ppt to your friends. Only friends ! <strong><span style="color: #993300;">Don&#8217;t forward to your company members</span></strong> or to your boss !  :)</p>
<div id="__ss_112077" style="width: 425px;"><object id="__sse112077" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=iim-a-managment4713&amp;stripped_title=iim-a-managment" /><param name="name" value="__sse112077" /><param name="allowfullscreen" value="true" /><embed id="__sse112077" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=iim-a-managment4713&amp;stripped_title=iim-a-managment" name="__sse112077" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/management-lessons-funny-but-interesting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick tips for https connection (Non secure content warning &#8211; IE)</title>
		<link>http://www.sajithmr.me/quick-tips-for-https-connection-non-secure-content-warning-ie/</link>
		<comments>http://www.sajithmr.me/quick-tips-for-https-connection-non-secure-content-warning-ie/#comments</comments>
		<pubDate>Mon, 17 May 2010 23:14:49 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[https warning]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[non-secure content]]></category>
		<category><![CDATA[protocol]]></category>
		<category><![CDATA[safety]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[warning]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=713</guid>
		<description><![CDATA[If you are using https pages or some of the pages (payment pages etc) in your website, keep the following in your mind. In some browsers especially IE shows warning of non-secured content in secured page. This cause user the feeling that the website is not secured. Use relative url always. Relative URL means those [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-714" title="browsers_dhtml" src="http://www.sajithmr.me/wp-content/uploads/2010/05/browsers_dhtml.jpg" alt="browsers_dhtml" width="270" height="250" /></p>
<p>If you are using https pages or some of the pages (payment pages etc) in your website, keep the following in your mind. In some browsers especially IE shows warning of non-secured content in secured page. This cause user the feeling that the website is not secured.</p>
<ol>
<li>Use relative url always. Relative URL means those without starting with http:// or https://, instead use relative url.</li>
<li>If you need to use full url, use dynamic base name in with your programming language.For example in PHP, define BASE_URL = http://www.yoursite.com and use this variable in every links and forms. Change the BASE_URL value between http and https depending upon the protocol ($_SERVER['HTTP_HOST'])</li>
<li>Check  inside javascript function whether it is calling any non-secured url. (For example, sometime you may use full url inside Javascript). Check using if condition to decide, which protocol to use, like what Google Analytic does.<br />
eg:  (&#8220;https:&#8221; == document.location.protocol) ? &#8220;https://ssl.&#8221; : &#8220;http://www.&#8221;);</li>
<li> Check if there is any flash content which tries to load data from non-secured url. There is a chance to load some xml configuration files using http protocol</li>
<li> Also change the codebase parameter value in object tag (flash or other media) whether it is pointing http or https url. There is a chance for this url in flash content.<br />
<span style="color: #ff6600;">codebase=&#8221;http://download.macromedia.com/pub/shockwave /cabs/flash/swflash.cab#version=9,0,115,0&#8243;<br />
<span style="color: #000000;">Change this url to https://downoad&#8230;<br />
</span><br />
</span></li>
<li><span style="color: #ff6600;"><span style="color: #000000;">If you are using facebook connect or such integration, check the javascript initialisation code.<br />
<span style="color: #008000;">FB.init(&#8220;78bc8ffb87c41eabb6395a2045c76021&#8243;, &#8220;/xd_receiver.htm</span>&#8220;);<br />
Inside the xd_receiver.htm file, the cross platform callback will be non secured url (http)<br />
Change this to xd_reciver_ssl.htm and use new code, which is available in Facebook documentation</p>
<p></span></span></li>
</ol>
<p>Tools like Fiddler can be used to check which url is non-secured. Firebug cannot show all non-secure connections. If the above steps do not solve your problem, try disabling javascript files one by one to point out which call is making the problem. Also try this by disabling Flash objects one by one.</p>
<p>Good luck guys</p>
<p>Cheers</p>
<p>Sajith</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/quick-tips-for-https-connection-non-secure-content-warning-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE6 Transparent PNG problem</title>
		<link>http://www.sajithmr.me/ie6-transparent-png-problem/</link>
		<comments>http://www.sajithmr.me/ie6-transparent-png-problem/#comments</comments>
		<pubDate>Fri, 14 May 2010 11:30:21 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=703</guid>
		<description><![CDATA[We all have faced this problem during HTML development. Internet Explorer 6 renders transparent PNG images in different way.  It puts some other color , it damages the design. One solution is create gif images for IE6 and mention those in separate style sheet file for IE6 &#60;!--[if IE 6]&#62; &#60;link rel="stylesheet" href="css/style-ie6.css" type="text/css" media="screen" [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-704" title="Internet_Explorer_7_Logo_red" src="http://www.sajithmr.me/wp-content/uploads/2010/05/Internet_Explorer_7_Logo_red.png" alt="Internet_Explorer_7_Logo_red" width="179" height="179" /></p>
<p>We all have faced this problem during HTML development. Internet Explorer 6 renders transparent PNG images in different way.  It puts some other color , it damages the design.</p>
<p>One solution is create gif images for IE6 and mention those in separate style sheet file for IE6</p>
<pre style="word-wrap: break-word; white-space: pre-wrap;"><span style="color: #ff6600;">&lt;!--[if IE 6]&gt;
&lt;link rel="stylesheet" href="css/style-ie6.css" type="text/css" media="screen"  /&gt;
&lt;![endif]--&gt;</span></pre>
<p>A simpel solution is IE PNG FIX  javascript library.</p>
<p>You can download that library from : <a href="http://www.twinhelix.com/css/iepngfix/" target="_blank">http://www.twinhelix.com/css/iepngfix/</a></p>
<p>You can see an online demo and usage here:</p>
<p><a href="http://www.twinhelix.com/css/iepngfix/demo/">http://www.twinhelix.com/css/iepngfix/demo/</a></p>
<p>Remember to add that htc file inside your style sheet or like this:</p>
<pre style="word-wrap: break-word; white-space: pre-wrap;">&lt;script&gt;

/** transparent png ie fix **/

<span style="color: #bf2e9d;">if</span> (document.all &amp;&amp; /MSIE (<span style="font: 11.0px Menlo; color: #2832cf;">5</span>\<span style="font: 11.0px Menlo; color: #2832cf;">.5</span>|<span style="font: 11.0px Menlo; color: #2832cf;">6</span>)/.test(navigator.userAgent) &amp;&amp; document.styleSheets &amp;&amp; document.styleSheets[<span style="font: 11.0px Menlo; color: #2832cf;">0</span>] &amp;&amp; document.styleSheets[<span style="font: 11.0px Menlo; color: #2832cf;">0</span>].addRule)

{

<span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span>document.styleSheets[</span>0<span style="font: 12.0px Menlo; color: #000000;">].addRule(</span>'.transparent'<span style="font: 12.0px Menlo; color: #000000;">, </span>'behavior: url(css/iepngfix.htc)'<span style="font: 12.0px Menlo; color: #000000;">);</span>

}

/****/

&lt;/script&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/ie6-transparent-png-problem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Flip</title>
		<link>http://www.sajithmr.me/jquery-flip/</link>
		<comments>http://www.sajithmr.me/jquery-flip/#comments</comments>
		<pubDate>Thu, 13 May 2010 10:24:39 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[html]]></category>
		<category><![CDATA[webworld]]></category>
		<category><![CDATA[animate]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[flip]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[simple]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=699</guid>
		<description><![CDATA[You can create iPhone style flip using jQuery. Visit: http://lab.smashup.it/flip/ for more details]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-700" title="javascript-techniques-55" src="http://www.sajithmr.me/wp-content/uploads/2010/05/javascript-techniques-55.jpg" alt="javascript-techniques-55" width="384" height="240" /></p>
<p>You can create iPhone style flip using jQuery.</p>
<p>Visit: <a href="http://lab.smashup.it/flip/" target="_blank">http://lab.smashup.it/flip/</a> for more details</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/jquery-flip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Algorithm for range of dates</title>
		<link>http://www.sajithmr.me/algorithm-for-range-of-dates/</link>
		<comments>http://www.sajithmr.me/algorithm-for-range-of-dates/#comments</comments>
		<pubDate>Wed, 12 May 2010 12:22:08 +0000</pubDate>
		<dc:creator>Sajith M.R</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[php source code]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[from date]]></category>
		<category><![CDATA[last 7 days]]></category>
		<category><![CDATA[last month]]></category>
		<category><![CDATA[last quarter]]></category>
		<category><![CDATA[last week]]></category>
		<category><![CDATA[php code]]></category>
		<category><![CDATA[range]]></category>
		<category><![CDATA[source code]]></category>
		<category><![CDATA[this month]]></category>
		<category><![CDATA[this quarter]]></category>
		<category><![CDATA[this week]]></category>
		<category><![CDATA[this year]]></category>
		<category><![CDATA[to date]]></category>
		<category><![CDATA[today]]></category>
		<category><![CDATA[yesterday]]></category>

		<guid isPermaLink="false">http://www.sajithmr.me/?p=691</guid>
		<description><![CDATA[Here is a php function which returns from and to date as an array for a range: &#60;?php function get_rangeof_dates($time_frame = &#8216;all_time&#8217;) { $from_date = &#8221;; $to_date = &#8221;; switch($time_frame) { case &#8216;all_time&#8217;:        $from_date = &#8217;1170-01-01 00:00:00&#8242;; $to_date = &#8217;2250-12-31 23:59:59&#8242;; break; case &#8216;today&#8217;: $from_date = date(&#8216;Y-m-d 00:00:00&#8242;); $to_date = date(&#8216;Y-m-d 23:59:59&#8242;); [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-709" title="calendar-icon" src="http://www.sajithmr.me/wp-content/uploads/2010/05/calendar-icon.png" alt="calendar-icon" width="256" height="256" /></p>
<p>Here is a php function which returns from and to date as an array for a range:</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #bf2e9d;">&lt;?php</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #bf2e9d;"><span style="color: #000000;"><span style="color: #bf2e9d;">function</span> get_rangeof_dates($time_frame = <span style="font: 11.0px Menlo; color: #2832cf;">&#8216;all_time&#8217;</span>)</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = <span style="font: 11.0px Menlo; color: #2832cf;">&#8221;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = <span style="font: 11.0px Menlo; color: #2832cf;">&#8221;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;">
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"><span style="white-space: normal;"><span style="color: #bf2e9d;">switch</span>($time_frame)</span></span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #2832cf;"><span style="color: #000000;"><span style="white-space: pre;"> </span></span><span style="color: #bf2e9d;">case</span><span style="color: #000000;"> </span><span style="font: 11.0px Menlo;">&#8216;all_time&#8217;</span><span style="color: #000000;">:        $from_date = </span><span style="font: 11.0px Menlo;">&#8217;1170-01-01 00:00:00&#8242;</span><span style="color: #000000;">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span>$to_date = </span>&#8217;2250-12-31 23:59:59&#8242;<span style="font: 12.0px Menlo; color: #000000;">;</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #2832cf;"><span style="color: #000000;"><span style="white-space: pre;"> </span></span><span style="color: #bf2e9d;">case</span><span style="color: #000000;"> </span><span style="font: 11.0px Menlo;">&#8216;today&#8217;</span><span style="color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;yesterday&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_week&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time() &#8211; (date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time()) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>, time() + ((<span style="font: 11.0px Menlo; color: #2832cf;">6</span> &#8211; date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time())) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span> ));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_week&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time() &#8211; (date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time()) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>, time() + (( <span style="font: 11.0px Menlo; color: #2832cf;">6</span> &#8211; date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;w&#8217;</span>, time()) ) * <span style="font: 11.0px Menlo; color: #2832cf;">60</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span> ) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">case</span> <span style="font: 11.0px Menlo; color: #2832cf;">&#8216;last_7_days&#8217;</span>:     $additonal_query = <span style="font: 11.0px Menlo; color: #d62b24;">&#8220;created_at &gt; &#8216;&#8221;</span>.date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d&#8217;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> )<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #d62b24;">&#8220;&#8216;&#8221;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">7</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_month&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, mktime( <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;m&#8221;</span>)  , <span style="font: 11.0px Menlo; color: #2832cf;">1</span> , date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y&#8221;</span>) ) );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_month&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-01 00:00:00&#8243;</span>, strtotime(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;-1 month&#8221;</span>, strtotime(date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-d&#8221;</span>))));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-d 23:59:59&#8243;</span>, strtotime(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;-1 day&#8221;</span>, strtotime(date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y-m-01&#8243;</span>))));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_30_days&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 00:00:00&#8242;</span>, time()- <span style="font: 11.0px Menlo; color: #2832cf;">30</span> * <span style="font: 11.0px Menlo; color: #2832cf;">24</span>* <span style="font: 11.0px Menlo; color: #2832cf;">60</span> * <span style="font: 11.0px Menlo; color: #2832cf;">60</span> );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-m-d 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_quarter&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$month = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;m&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$year = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">if</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">1</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">2</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">3</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-01-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-03-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">4</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">5</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">6</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-04-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-06-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">7</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">8</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">9</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-07-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-09-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">else</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-10-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-12-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_quarter&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$month = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;m&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$year = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y&#8217;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">if</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">1</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">2</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">3</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = ($year -<span style="font: 11.0px Menlo; color: #2832cf;">1</span>)<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-10-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = ($year-<span style="font: 11.0px Menlo; color: #2832cf;">1</span>)<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-12-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">4</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">5</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">6</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-01-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-03-31&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">elseif</span>($month == <span style="font: 11.0px Menlo; color: #2832cf;">7</span> || $month == <span style="font: 11.0px Menlo; color: #2832cf;">8</span>|| $month == <span style="font: 11.0px Menlo; color: #2832cf;">9</span> )</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-04-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-06-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">else</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>{</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-07-01&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = $year<span style="color: #bf2e9d;">.</span><span style="font: 11.0px Menlo; color: #2832cf;">&#8216;-09-30&#8242;</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;this_year&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-01-01 00:00:00&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-12-31 23:59:59&#8242;</span>);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #2832cf;"><span style="font: 12.0px Menlo; color: #000000;"><span style="white-space: pre;"> </span></span><span style="font: 12.0px Menlo; color: #bf2e9d;">case</span><span style="font: 12.0px Menlo; color: #000000;"> </span>&#8216;last_year&#8217;<span style="font: 12.0px Menlo; color: #000000;">:</span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$from_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-01-01 00:00:00&#8242;</span>, mktime( <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">01</span> , <span style="font: 11.0px Menlo; color: #2832cf;">01</span> , date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y&#8221;</span>) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">1</span> ));</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>$to_date = date(<span style="font: 11.0px Menlo; color: #2832cf;">&#8216;Y-12-31 23:59:59&#8242;</span>, mktime( <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">0</span>, <span style="font: 11.0px Menlo; color: #2832cf;">12</span> , <span style="font: 11.0px Menlo; color: #2832cf;">31</span> , date(<span style="font: 11.0px Menlo; color: #d62b24;">&#8220;Y&#8221;</span>) &#8211; <span style="font: 11.0px Menlo; color: #2832cf;">1</span> ) );</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">break</span>;</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span><span style="color: #bf2e9d;">return</span> <span style="color: #bf2e9d;">array</span>($from_date, $to_date);</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo;"><span style="white-space: pre;"> </span>}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; min-height: 14.0px;"><span style="white-space: pre;"> </span></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Menlo; color: #bf2e9d;"><span style="color: #000000;"><span style="white-space: pre;"> </span></span>?&gt;</p>
<div><span style="font-family: Menlo, 'Times New Roman', 'Bitstream Charter', Times, serif; color: #bf2e9d; font-size: small;"><span style="line-height: normal;"><br />
</span></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.sajithmr.me/algorithm-for-range-of-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
