Page 20 of 27

Posted: Thu Oct 12, 2006 2:11 am
by Benjamin
The server was running fine but for some reason astions wasn't available. I'll look into why this happened. If an issue such as this should arise again, please email me at agtlewis at gmail dot com.

Posted: Mon Oct 16, 2006 8:37 am
by ok
According to onion2k's dns Gantt chart, we should start design the DB!
http://www.ooer.com/onion/dnsGantt2.png
feyd | we don't need a massive image breaking the page layout.

Where we are standing in the DB design?

PHP5/OOP:
I think that we should write it with a super-class:
dns_superclass.php

Code: Select all

<?php
Class DNS_super_class
{
  var $sql_core;
  var $theme_core;
  //...
}
?>
dns_db_class.php

Code: Select all

<?php
Class DNS_db_class
{
  var $dns_superclass;
  //...
?>
index.php

Code: Select all

<?php
require_once "dns_superclass.php";
require_once "dns_db_class.php";
$dns_superclass = new DNS_super_class;
$dns_superclass->sql_core = new DNS_db_class;
$dns_superclass->sql_core->dns_superclass &= $dns_superclass;
?>
I think that it's the best way for OOP.

Posted: Mon Oct 16, 2006 9:03 am
by Jenk
We haven't finished the specification(s) yet :)

and btw - your code is php4, not 5 :p

Posted: Mon Oct 16, 2006 11:23 am
by onion2k
Good to see that a lot has been done. There's only a handful of sections that need additions and we'll be on track to start writing the code and DB spec. And then actually start coding!

Posted: Mon Oct 16, 2006 1:51 pm
by ok
and btw - your code is php4, not 5 :p
:D - Right now I use PHP4 because my hosting company only supports it...

what is the implementation of that code in PHP5?
feyd | we don't need a massive image breaking the page layout.
You are right... I just posted it and run to other things... thanks

Posted: Mon Oct 16, 2006 1:59 pm
by feyd
ok wrote:You are right... I just posted it and run to other things... thanks
No problem; that's why I just edited it and left a tiny note. :)

Posted: Mon Oct 16, 2006 6:53 pm
by Jenk
ok wrote:
and btw - your code is php4, not 5 :p
:D - Right now I use PHP4 because my hosting company only supports it...

what is the implementation of that code in PHP5?

Code: Select all

<?php 
class DNS_super_class 
{ 
  public $sql_core; 
  public $theme_core; 
  //... 
} 
?>
and when assigning, you don't use the reference operator (no need to, all objects are now passed by ref.)

:)

Posted: Tue Oct 17, 2006 2:03 am
by ok
Cool 8)

So it we be much easier to implement this method!!!

Posted: Sun Oct 29, 2006 7:04 am
by ok
Hello,

After a though week I eventually have time to work on DNS...

I can see that according to the gantt chart the DB design should be ready, so...

I have an initial design:

Code: Select all

CREATE DATABASE `dns`;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_config` (
  `type` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL default '-1',
  PRIMARY KEY  (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_error` (
  `error_id` int(10) NOT NULL default '0',
  `error_level` varchar(2) NOT NULL default '',
  `message` varchar(255) NOT NULL default '',
  `log` tinyint(1) NOT NULL default '1',
  `print` tinyint(1) NOT NULL default '0',
  `stop_execution` tinyint(1) NOT NULL default '0',
  KEY `error_id` (`error_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_groups` (
  `id` int(5) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `admin_system` tinyint(1) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_members` (
  `id` mediumint(8) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `real_name` varchar(255) NOT NULL,
  `group` smallint(3) NOT NULL default '0',
  `password` varchar(255) NOT NULL,
  `secret_question` varchar(100) NOT NULL,
  `secret_answer` varchar(100) NOT NULL,
  `email` varchar(150) NOT NULL default '-1',
  `joined` int(10) NOT NULL default '0',
  `ip_address` varchar(16) NOT NULL,
  `time_offset` tinyint(2) NOT NULL default '0',
  `theme` varchar(255) NOT NULL default '-1',
  `local` varchar(32) NOT NULL default '-1',
  PRIMARY KEY  (`id`),
  KEY `name` (`name`),
  KEY `mgroup` (`group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- ----------------------------------------------------------------------------------

CREATE TABLE `dns_sessions` (
  `session_id` char(32) NOT NULL default '',
  `session_user_id` mediumint(8) NOT NULL default '0',
  `session_start` int(11) NOT NULL default '0',
  `session_end` int(11) NOT NULL default '0',
  `session_user_ip` char(15) NOT NULL default '0',
  `session_is_logged` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`session_id`),
  KEY `session_user_id` (`session_user_id`),
  KEY `session_user_ip` (`session_user_ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Explanation:
dns_error:
This table contains E,W and N level errors.
`error_id` - Error id, i.e 100 - module not found.
`error_level` - Error level, i.e Notice, Warning, Error... (like in PHP).
`message` - The reference to the message in the local file. This reference will be used to the local file of the log and the print.
`log` - Log the error. 0-No, 1-Yes.
`print` - Print the error to the screen. 0-No, 1-Yes.
`stop_execution` - Stop the execution of DNS. If print set to 1, this also should set to 1. 0-No, 1-Yes.

dns_config:
This table contains default configuration.
`type` - The config type, i.e default_theme, default_local, default_time_zone, site_url...
`value` - The value set to the type, i.e default_theme=dns_default, site_url=dns.com...

dns_groups:
This table contains all dns groups.
`id` - Group ID
`name` - Group name
`admin_system` - Group members can administrate dns or not. 0-No, 1-Yes.
Note: Additional permissions can be added to this table after the `admin_system` column!

dns_members:
This table contains all dns members.
If you don't understand what this table does, reply.

dns_sessions:
This table contains all active sessions.
`session_id` - The session set by PHP.
`session_user_id` - The user id that 'own' this session. (If not logged, set to -1).
`session_start` - time() when the session started.
`session_end` - time() when the session will expired.
`session_user_ip` - The user ip.
`session_is_logged` - 0-Not logged, 1-Logged.

Posted: Sun Oct 29, 2006 2:26 pm
by ok
The project is dead???

Posted: Sun Oct 29, 2006 2:32 pm
by Luke
I'm still very interested, but from the beginning I've been in on it to learn from others... I don't have enough experience to lead the project in even the slightest... :(

I hope it's not dead...

Posted: Sun Oct 29, 2006 2:35 pm
by ok
I also joined the project in order to learn new things... lol

Like you said:
I hope it's not dead...
Let's hope.

Posted: Sun Oct 29, 2006 2:39 pm
by Luke
I don't think astions is posting here anymore, but I figured he still would come to work on this project... I guess we'll find out.

Posted: Sun Oct 29, 2006 2:43 pm
by ok
onion2k is one of the 'top' leaders of the this project (he made the Gantt-Chart) and in the past five/four days
he didn't post a single post. Maybe they are busy etc...

Posted: Fri Nov 03, 2006 6:56 am
by Jenk
Image

Had a spare 5mins.

Will re-host and post on wiki later.