About This Blog

I'm Arthur Wiebe, a Bible believing born again believe it or not saved by the blood kind of young man who has a desire to live his life in integrity not slacking in what it important but what is not. Seeking the glory which is to come instead of the destruction which has already come.

Need you know much else? Well I like to work as well--especially working towards making technology work better for all of us.

6 March 2008 - 0:02Save Christian Radio!

I just want to help propagate the message to anyone possibly visiting this page from the US, I urge you to visit www.savechristianradio.com and contact your FCC rep and petition the FCC to halt this act of communism.

No Comments | Tags: Uncategorized

15 October 2007 - 20:56New Weblog

Hi there! To those who actually read my blog every now and then.

I’ve moved it over to a subdomain, blog.artooro.com and upgraded to Wordpress 2.3 at the same shot, not to mention using subversion as an installation and upgrade mechanism.

Not sure what I’ll do with the main domain yet but we’ll see what happens in the coming days and weeks.

No Comments | Tags: Uncategorized

10 October 2007 - 19:46Israel Installing Missile Defense in Civilian Aircraft

The Israeli security cabinet  approved a new aircraft missile defense system to be installed on all civilian aircraft. This decision comes after intelligence reports and the fact that Israel’s enemies having access to more advanced missile technology.

They’re the first nation to do so, and it’ll be interesting to see what progresses.

No Comments | Tags: Uncategorized

26 September 2007 - 20:45Music Download Services

In the past I’ve used iTunes for downloading certain songs, but now with Amazon’s new MP3 downloads service, with no DRM, at 256kbps–I’d say they’ve won my first choice.

No Comments | Tags: Uncategorized

16 September 2007 - 7:14I hope you’re Ready

Because the third world war is likely going to begin over the next few months.

2 Comments | Tags: Uncategorized

30 August 2007 - 19:06Where I’ve Been

Just came back from doing a roof a few hours north of here. The first entire roof I’ve done with Cedar shakes. It looks good.

Bala Cedar Cottage

The lake is no more than 30 ft. behind the cottage.

Lake Behind Cottage While we were there, I had an urge to get onto the water and float around. We went all the way to a nearby point and did some fishing on this thing.

Boat at Dock

We had a little fun on it. On the boat

No Comments | Tags: Uncategorized

23 March 2007 - 17:20Prepare your Tax Return Folks!

I just sent out my tax return (Canada) to the CRA via NETFILE using UFile to prepare the return.

So for those of you who still need to do it, and are wanting to use NETFILE, and you’re using an OS other than Windows such as Mac OS X (me) or Linux?
I highly recommend UFile.ca. For those with incomes under 25000 it’s free.

No Comments | Tags: Uncategorized

20 January 2007 - 11:58$PROJECT Updates

This $project I’m working on–which has yet to be named, is nigh completion. I expect a live testing site to appear here sometime before or on January 27. We’ll see how it all goes.

Here’s my current todo list:

  1. Complete articles section (search/index/view)
  2. Many CheckFields() uses the old buggy API and need to be upgraded.
  3. The home page needs to be written.
  4. Many administration pages need the delete function to be added.
  5. This project needs a name. Got one?
  6. Pre-beta rough testing and polishing.

For names I have “illumicore” and “can’t think of another one”. Can you think of any?

Well have a snowy day, I’m post again when something live is available.

No Comments | Tags: Illumicore, PHP, Uncategorized

18 January 2007 - 19:29Welcome to artooro.com

Welcome to my new web site, artooro.com. This site will replace my blog at blogger. We’ll see how long it lasts.

The current theme is temporary as I’m working on finishing a project right now, it may be March by the time something new appears here.

What is this project? Just to give you a little idea, it’s a web based content management system designed for churches. We’re going to be using it as soon as it’s ready, and then it will be polished for a release to the general public. It will be hosted on Google Code once it’s ready.
Features will include, news/update, events calendar, maps, contact form and information, audio podcasting, web playlist, and audio search; articles, and custom pages. This thing will be awesome for creating church web sites quickly and easily. Of course it will be tailored to our needs initially but as soon as the code is released, anybody can use it and submit code to make it better for everybody.

So I hope to make more use of artooro.com and this year progresses. Stay tuned!

No Comments | Tags: PHP, Uncategorized

14 January 2007 - 0:00Mahmoud Abbas, a Moderate?

Mahmoud Abbas, “Aim your rifles at Israel.”

For so long Abbas has been touted as a “moderate”, someone who wants peace but is OK with the idea of Israel staying on the map.
Since Abbas replaced Arafat I’ve been highly critical of the man. It my opinion, it were better a moderate were an extremest in a way, either on one side or the other. If you’re in between, you’ll either get shot or not accomplish anything. Abbas has not accomplished anything since he started his current post. Yet some say “strengthening him” will help the peace process. I hope you see differently now.

No Comments | Tags: Uncategorized

2 January 2007 - 0:00CheckFields Objected

As what usually happens when you first right some code, and then put it into real world use, you make some changes to make it more efficient and easier to use. The same thing happened with my CheckFields function posted earlier.

So here’s the code:

 ‘year’, ‘email’ => ‘email’, ‘date’ => ‘date’, ‘length=2, int, date’ => ‘month’, ‘passwordsmatch’ => ‘password, confirmpass’);

$input = array | example=($_POST || $_GET)*/

class CheckFields { public $lastError;

 public function __construct($reqs, $input) {  foreach ($reqs as $type => $id) {   $fields = explode(’, ‘, $id);   foreach ($fields as $field) {    if (!isset($input[$field]) || $input[$field] == ”) {     $this->_ret(false, 00, $id, ‘”‘ . ucfirst($id) . ‘” Must be completed in order to continue.’);     break(2);     //return array(false, $id . ‘ resulted in err00′);    }   }

   $types = explode(’, ‘, $type);   foreach ($types as $t) {    switch (preg_replace(’|(^.+)(\=.*)|’, ‘$1′, $t)) {     case ‘passwordsmatch’:      $fields = explode(’, ‘, $id);      if ($input[$fields[0]] != $input[$fields[1]]) {       $this->_ret(false, 06, $id, ‘”‘ . ucfirst($fields[0]) . ‘” must be the same as “‘ . ucfirst($fields[1]) . ‘”‘);       break(3);       //return array(false, $id . ‘ resulted in err06′);      }      break;     case ‘date’:      if (strtotime($input[$id]) === false) {       $this->_ret(false, 05, $id, ‘”‘ . ucfirst($id) . ‘” Is not a valid date.’);       break(3);       //return array(false, $id . ‘ resulted in err05′);      }      break;     case ‘email’:      if (!eregi(”^(.+)(@)(.+)(\.)(.+)$”, $input[$id])) {       $this->_ret(false, 04, $id, ‘”‘ . ucfirst($id) . ‘” Is not a valid email address.’);       break(3);       //return array(false, $id . ‘ resulted in err04′);      }      break;     case ‘length’:      // Make sure the field is the correct length      preg_match(’|(^.+)(\=)(.*$)|’, $t, $m);      if (strlen($input[$id]) != $m[3]) {       $this->_ret(false, 01, $id, ‘”‘ . ucfirst($id) . ‘” Is not the correct length.’);       break(3);       //return array(false, $id . ‘ resulted in err01′);      }      break;     case ‘int’:      if (!is_numeric($input[$id])) {       $this->_ret(false, 02, $id, ‘”‘ . ucfirst($id) . ‘” Must be a number and it is not.’);       break(3);       //return array(false, $id . ‘ resulted in err02′);      }      break;     case ‘text’:      if (!is_string($input[$id])) {       $this->_ret(false, 03, $id, ‘”‘ . ucfirst($id) . ‘” Must be text and it is not.’);       break(3);       //return array(false, $id . ‘ resulted in err03′);      }      break;     default:      trigger_error(’Invalid type provided to checkFields()’, E_USER_ERROR);    }   }  }  //return array(true, ‘err7 - Success’);  if (!isset($this->lastError)) {   $this->_ret(true, 07, NULL, ‘It was a success!’);  } }

 private function _ret($value, $code, $field_name, $description) {  $error = array(   ‘value’ => $value,   ‘code’ => $code,   ‘field’ => $field_name,   ‘description’ => $description  );  $this->lastError = $error; }

 public function __get($id) {  return $this->lastError[$id]; }}

The major revisions include:

  1. Is now object oriented.
  2. Does not return a value. To get information use $field_object->value/code/field/description or directly access the lastError array.
  3. Provides a description suitable to give straight to the client. The error information could be used to highlight fields which failed the requirements using ajax or another JavaScript technique.

So now the example I have earlier, redone would look like this:

$requirements = array(    ‘date’ =>  ‘date’,    ‘text’ => ‘name’,    ‘email’ => ‘email’,    ‘date, int, length=4′ => ‘yearofbirth’);$field_check = new CheckFields($requirements, $_POST);print_r($field_check->lastError);

No Comments | Tags: Uncategorized

23 December 2006 - 0:00PHP checkField() Function

I wrote a function in PHP that checks submitted form fields for certain requirements. It works by passing in an array of requirements and the array of submitted data such as $_POST or $_GET. The requirements array contains the fields types and names. For example to check for a date field, a name, an email address, and year of birth, you could do this:

$requirements = array(    ‘date’ =>  ‘date’,    ‘text’ => ‘name’,    ‘email’ => ‘email’,    ‘date, int, length=4′ => ‘yearofbirth’);$resultArray = checkFields($requirements, $_GET);

It allows you to mix certain types together (where it makes sense) and the function is easy to expand to include new types.
It returns an array. The first key is either true or false depending on how the input validated, and the second key contains an error code and description.

Now with no further delay, here’s the code:

/* $reqs = array( type => id ‘text’ => ‘name’, ‘int’ => ‘year’, ‘email’ => ‘email’, ‘date’ => ‘date’, ‘length=2, int, date’ => ‘month’, ‘passwordsmatch’ => ‘password, confirmpass’ ); $input = array | example=($_POST || $_GET)*/function checkFields($reqs, $input) { foreach ($reqs as $type => $id) { $fields = explode(’, ‘, $id); foreach ($fields as $field) { if (!isset($input[$field]) || $input[$field] == ”) { return array(false, $id . ‘ resulted in err00′); } } $types = explode(’, ‘, $type); foreach ($types as $t) { switch (preg_replace(’|(^.+)(\=.*)|’, ‘$1′, $t)) { case ‘passwordsmatch’: $fields = explode(’, ‘, $id); if ($input[$fields[0]] != $input[$fields[1]]) { return array(false, $id . ‘ resulted in err06′); } break; case ‘date’: if (strtotime($input[$id]) === false) { return array(false, $id . ‘ resulted in err05′); } break; case ‘email’: if (!eregi(”^(.+)(@)(.+)(\.)(.+)$”, $input[$id])) { return array(false, $id . ‘ resulted in err04′); } break; case ‘length’: // Make sure the field is the correct length preg_match(’|(^.+)(\=)(.*$)|’, $t, $m); if (strlen($input[$id]) != $m[3]) { return array(false, $id . ‘ resulted in err01′); } break; case ‘int’: if (!is_numeric($input[$id])) { return array(false, $id . ‘ resulted in err02′); } break; case ‘text’: if (!is_string($input[$id])) { return array(false, $id . ‘ resulted in err03′); } break; default: trigger_error(’Invalid type provided to checkFields()’, E_USER_ERROR); } } } return array(true, ‘err7 - Success’);}

Labels:

No Comments | Tags: Uncategorized