A web service API is in development, currently you can interconnect or integrate the pagebuilder with your process flow using SQL queries on the Drag & Drop Sitecreator (DDSC) database. We also provide some PHP scripts examples for integration.
Bellow are a few SQL query sample to manipulate directly the DDSC admin control panel.
To create a new user you need to insert a record in the users table.
When doing direct sql injection make sure you do not go over your license quota for the number of users in your system or DDSC may just stop working until you delete the extra users.
The users table has the following structure:
CREATE TABLE `users` ( `idusers` int(10) NOT NULL AUTO_INCREMENT, `firstname` varchar(40) NOT NULL DEFAULT '', `middlename` varchar(20) NOT NULL DEFAULT '', `lastname` varchar(40) NOT NULL DEFAULT '', `email` varchar(80) NOT NULL DEFAULT '', `phone` varchar(30) NOT NULL DEFAULT '', `company` varchar(40) NOT NULL DEFAULT '', `position` varchar(40) NOT NULL DEFAULT '', `address1` varchar(80) NOT NULL DEFAULT '', `address2` varchar(80) NOT NULL DEFAULT '', `city` varchar(40) NOT NULL DEFAULT '', `zip` varchar(20) NOT NULL DEFAULT '', `state` varchar(30) NOT NULL DEFAULT '', `country` varchar(40) NOT NULL DEFAULT '', `username` varchar(20) NOT NULL DEFAULT '', `password` varchar(20) NOT NULL DEFAULT '', `isadmin` int(5) NOT NULL DEFAULT '0', `regdate` date NOT NULL DEFAULT '0000-00-00', `idresellers` int(11) NOT NULL DEFAULT '0', `last_renew_date` date NOT NULL DEFAULT '0000-00-00', `active_flag` varchar(100) NOT NULL DEFAULT 'True', `is_advance` varchar(10) NOT NULL DEFAULT 'No', `is_trial` varchar(10) NOT NULL DEFAULT 'No', `idplan` mediumint(10) NOT NULL DEFAULT '0', PRIMARY KEY (`idusers`), UNIQUE KEY `idaffiliate` (`idusers`), KEY `idaffiliate_2` (`idusers`) ) ;
Relevant fields description:
Only firstname, lastname, email, username, password, regdate, idplan, idresellers are required. To add a new users you can simply run:
INSERT INTO users (firstname, lastname, email, username, password, regdate, idplan, idresellers) VALUES ('John', 'doe', 'jdoe@example.com', 'jonny', 'hispassword', NOW(), 1, 1);
Activate a user from Trial to Active using is email address as unique key.
UPDATE users SET active_flag='True', is_trial='No' WHERE email = 'username@userdomain.com';
To disable a user and block him from log in into the system without deleting his account and files.
UPDATE users SET active_flag='False' WHERE email = 'username@userdomain.com';
Once you have inserted the user you can setup the FTP information for that user. You will need to get the idusers of the user.
SELECT idusers FROM users WHERE email = 'username@userdomain.com'
Then with the idusers insert a record in the db_ftp table:
CREATE TABLE `db_ftp` ( `iddb_ftp` int(11) NOT NULL AUTO_INCREMENT, `db_server` varchar(100) NOT NULL DEFAULT '', `db_name` varchar(100) NOT NULL DEFAULT '', `db_username` varchar(100) NOT NULL DEFAULT '', `db_passwords` varchar(100) DEFAULT '0', `ftp_host` varchar(100) DEFAULT NULL, `ftp_username` varchar(100) DEFAULT NULL, `ftp_passwords` varchar(100) DEFAULT '0', `ftp_path` varchar(100) DEFAULT '0', `ftp_url` varchar(100) DEFAULT NULL, `db_structure` varchar(10) DEFAULT NULL, `db_data` varchar(10) DEFAULT NULL, `user_id` int(11) NOT NULL DEFAULT '0', `db_localdb` varchar(254) NOT NULL DEFAULT '', PRIMARY KEY (`iddb_ftp`), UNIQUE KEY `iddb_ftp` (`iddb_ftp`) );
You can use the following query:
INSERT INTO db_ftp (`user_id`, `ftp_host`, `ftp_username`, `ftp_passwords`, `ftp_path`, `ftp_url`) VALUES (1332, 'example.com', 'jonny', 'hispassword', 'public_html/', 'http://www.example.com')
1332 should be the value of idusers
2 fields that depends on your setup are ftp_path and ftp_url.
ftp_path is the folder in which the web site needs to be publish. You need to provide the path in which the DDSC publishing will cd (change dir) in just after the login.
ftp_url this is the url of the published web site.
Like with the FTP setup you will need to get the idusers of the user you want to setup.
SELECT idusers FROM users WHERE email = 'username@userdomain.com'
Then with the idusers you can insert the database connection information with the following query:
INSERT INTO db_ftp (`user_id`, `db_server` ,`db_name`, `db_username`, `db_passwords`) VALUES (1332, 'example.com', 'example_database', 'jonny', 'hispassword')
1332 should be the value of idusers
Ask Zach: http://www.lifelesspeople.com/