another cms class and DB design posted

OK - been doing a little bit of work on the cms. Finally finished the validation class for user input. Took longer then I figured to get the methods the way I wanted them and then test it all. Didn't post the test script on the code snippet page since it was short and ugly. I will put it below though.

PHP:
  1. require_once('path/to/inc/Validate.class.php');
  2.  
  3.     error_reporting(E_ALL);
  4.  
  5.     $input0 = 'true blue';
  6.     $input1 = '';
  7.     $input2 = 0;
  8.     $input3 = '0';
  9.     $input4 = 1;
  10.     $input5 = array();
  11.     $input6 = array('kiss');
  12.     $input7 = TRUE;
  13.     $input8 = NULL;
  14.     $input9 = 'me';
  15.     $input10 = 'me1';
  16.     $input11 = 'smile_2';
  17.     $input12 = 'kick_@ss';
  18.     $input13 = '745';
  19.     $input14 = '4.25';
  20.     $input15 = 1.35;
  21.     $input16 = '2.';
  22.     $input17 = 5;
  23.     $input18 = time();
  24.     $input19 = 'me@domain.com';
  25.     $input20 = 'ujrfc{ujrf}.yhtf@ok34rfn.-024u.au';
  26.     $input21 = 'Joe Smith <joesmith @domain.com>';
  27.     $input22 = 'http://www.khankennels.com';
  28.     $input23 = 'ftp://www.khankennels.com';
  29.     $input24 = 'https://www.khankennels.com';
  30.     $input25 = 'www.khankennels.com';
  31.     $input26 = 'khankennels.com/code/codeIndex.php';
  32.     $input27 = '1234567890';
  33.     $input28 = '(123)4567890';
  34.     $input29 = '123.456.7890';
  35.     $input30 = '123 456 7890';
  36.        
  37.  
  38.     // testing the isNotEmpty method
  39.     for ($i=0; $i&lt;30 ; $i++)
  40.     {
  41.         $in = 'input'.$i;
  42.         echo (Validate::isNotEmpty($$in))?$i.' true<br />':$i.' false<br />';
  43.     }

I just changed the name of the method each time. Ugly isn't it :)

Anyway - I have created the basic database design in DBDesigner and posted the current design's data dictionary on the code Index page (if anyone wants to see it). I would appreciate any input on it. I haven't really looked at the PHPC design (have it somewhere on my computer) since this is for something a lot more basic.

Next - I think it will be time to make a few pages. One to accept new articles... don't think I'll let articles be deleted. The tutorials also says I need a new catagory page... don't see any reason to delete a category *shrug*. Need an index page also to pull the last 5 articles... Hmm. maybe a listing of all articles.

/me slaps herself. KISS - start at the beginning.

del.icio.us:another cms class and DB design posted  digg:another cms class and DB design posted  furl:another cms class and DB design posted  reddit:another cms class and DB design posted

Leave a Reply