Safe Redirect

Safe redirect:

<?php

function Redirect($Str_Location, $Bln_Replace = 1, $Int_HRC = NULL)
{
        if(!headers_sent())
        {
            header('location: ' . urldecode($Str_Location), $Bln_Replace, $Int_HRC);
            exit;
        }

    exit('<meta http-equiv="refresh" content="0; url=' . urldecode($Str_Location) . '"/>'); # | exit('<script>document.location.href=' . urldecode($Str_Location) . ';</script>');
    return;
}

?>

Get the name of the directory which contains the current script

To get full path to the script currently being read:

dirname(__FILE__)

To get just the current directory name:

basename(dirname(__FILE__))

Links to cover


http://developer.ebay.com/DevZone/finding/HowTo/PHP_SearchInterm_NV_XML/PHP_SearchInterm_NV_XML.html

Prompt Usage

Prompt usage snippet

			var track_number = prompt("Please enter tracking number:");
			if(track_number)
			{
				$(this).data('track_number', track_number);
				//$(this).closest('tr').children().eq(4).append('<div style="color:red; display:block;text-align: center;">[' + track_number + ']</div>');
			}
			else
			{
				/* do something else */
			}

Code snippet to include JQuery UI framework from Google libs

<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
</head>

Using clear rule in css

.clearfix:after { content: "."; visibility: hidden; display: block; height: 0; clear: both; }

Usage

<div class='.clearfix'>
	Some content
</div>

Bonus:

In css :

.clear { clear: both; }
<br class='clear' />

Remove text from text input when get focus

<input type='text' style='margin:0 10px;background-color:#F3FAAA;width:250px;height:16px;vertical-align: text-bottom;;' name='search_text' id='search_field' value='Ex.: Dell Latitude D620 enter D620 only' onfocus='$(this).val(\"\").css(\"color\", \"#000000\")'
	onblur='($(this).val() == \"\") ? $(this).val(\"Ex.: Dell Latitude D620 enter D620 only\").css(\"color\", \"#9B9B9B\") :  $(this)' />

Right way to use clear behavior for floated elements

Right way to use clear behavior for floated elements

.clear_fix {
    clear: both;
    content: ".";
    display: block;
    height: 0;
    visibility: hidden;
}

List of Resources With Free WordPress Themes

List of websites with free wordpress themes

  • http://w9y.ru/wordpress/templ/itteh/
  • http://wordpressthemesbase.com/view/1020.html

List of websites with nice design

List of websites with nice design

http://w9y.ru/wordpress/templ/healthwp/