Marc Fraser | A Blog about all things A blog about all things personal, web related.

26Oct/092

Smoking outside public places

I hate smoking. It is a horrible habit, and one that I've never once partaken, if I may add.

Basically, my gripe is nowadays when you want to enter a public building (a shopping center for example) you walk in with a headache, choking for breath, all the side effects of inhaling the smoke from others cigarettes - otherwise known as 'passive smoking'.  Throw into the equation the putrid smell of cigarette smoke, it's horrible.

Obviously it is the smokers choice of whether to smoke or not, this doesn't bother me.  I'd rather people never smoked, but I guess someone has to prop up the public purse.  However, what really bothers me is that some people who choose to partake are so ignorant.

What I ask the smokers is that they refrain from standing at entrances/exits of public places; for the non-smokers it is horrible - for reasons defined above.

There are the people who stand at doorways smoking, but then there are the intensely ignorant people who think it is OK to blow the smoke into your face, or the people who don't at least try to exhale the smoke in a direction which is clear; which at the front of busy shopping centers cannot be done!

Basically what I ask people to do is smoke in the designated smoking areas.  By the way, I do not want to tar all smokers with the same brush, some already do this.

Also, the Government could do with bringing in legislation in which states something akin to  "Smoking 30-meters from a public building is not permitted"; this is if they haven't already - I had a look through the law, but nothing stood out at a quick glance.

Scottish legislation: http://www.opsi.gov.uk/legislation/scotland/acts2005/asp_20050013_en_2#pt1.

Sorry for the very unstructured rant!  This has been a pet-hate of mine for a while, however it was only aggravated today by a terribly ignorant individual.

24Oct/090

Twitter

I've re-signed up to Twitter.

Please follow me (@marc_fraser): https://twitter.com/marc_fraser.

Thanks

Marc

24Oct/090

New Mobile Phone

After 6 months of the iPhone 3G, an upgrade is due!

I was so impressed with the iPhone 3G, that I've decided to get the latest version - the iPhone 3GS. It should arrive on Wednesday; how it is getting here I don't yet know. If its Royal Mail, I'll be lucky to see it before Christmas!

I'll post my initial impressions when I receive it.

Tagged as: , , , No Comments
10Oct/092

PHP Include

(from Full Article)

The include command can save you a lot of time as you can create a header, place it in a file and just include that file on every page and the header will be shown. This will also mean that you do not need to edit every page every time you need to edit your header!

Basically the PHP Include command takes the file name and inserts the contents of the file into the script.

To illustrate this, I will use an example:

  1. Create a HTML file called Menu.html and insert the following code into it:
<ul>

<li>Home</li>

<li>Articles</li>

<li>Tutorial</li>

</ul>
  1. Now create a menu_example.php PHP file (in the same directory as Menu.html) and insert:
<?php

include(‘Menu.html’);

?>
  1. Navigate to menu_example.php in your browser and run it – you should see:
Shows the menu that is being included.
Menu Included.
Tagged as: 2 Comments
10Oct/090

PHP IF Statement

(from Full Article)

In PHP IF statements are extensively used.  It allows you to show the user data depending on certain conditions. The best way to describe it is with the use of an example: You want to build a dashboard with items you do not want all employees to see, this is where IF statements come in handy – you can check that they are a certain person or a member of a certain group and if this is true the employee can see the item, if it is false (the employee isn’t in the necessary group) then the employee shouldn’t see the items.

We will use Comparison Operators in the example below;

<?php

$isManagement = false;

if($isManagement == true) {

// Show the data that you wish only management to see.

} else {

// You are not management and so cannot see this data.

}

?>

The above example uses comments to show how the if statement works in terms of the example farther above. $isManagement will come from the employees record.

Within the IF() statement we are comparing to see if $isManagement is true, within the first parenthesis ({}) is where the PHP code will go if the result is true. The else statement is included to catch all other occurrences apart from the true occurrences. Please see the PHP Manual for another example.

Bad Behavior has blocked 120 access attempts in the last 7 days.