Jump to content

Is it possible to view import scripts in clear text?


eugenevdm

Recommended Posts

I having someone design an import routine for Plesk Clients & Domains.

 

Instead of reverse engineering the database and interacting directly with it, is it possible to view the import scripts, such as the Modernbill import script, in clear text?

 

At present it looks all garbled (Ioncubed?) and I'm sure it's probably intellectual property, but being able to see an example import script will save my developer quite a bit of time. It looks like an import will involve first creating a client, then an order, and then a product / domain.

Link to comment
Share on other sites

I wouldn't bet on it.

An import script is made up of a ton of MySQL entries. Query...Import.. Update... It's not very complicated IMO, just time consuming. Your developer should know/understand that. Just looking at another import script would only give an idea of how to structure it. The real work is looking back and forth at database tables matching things up.

Link to comment
Share on other sites

I would like to import from Plesk 8.1.x Windows & Linux Clients and Domains to WHMCS 3.1.2.

 

Plesk Linux keeps it's clients in a table called 'clients'.

WHMCS keeps it's clients in a table called 'tblclients'

 

These fields correspond as follow:

 

Plesk Linux <-> WHMCS

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

id <-> id (auto increment)

cname <-> companyname

pname <-> firstname + lastname

login <-> in WHMCS your email is your login

account_id <-> no equivalent but needs to be used to extract clear text password from Plesk

phone <-> phonenumber

fax <-> does not exist, possible to add in custom fields (more later)

email <-> email

address <-> address1 + address2

city <-> city

state <-> state

pcode <-> postcode

country <-> country

Linked to 'accounts' <-> password (encrypted)

 

If you've added custom fields such as 'Fax' you have to examine 'tblcustomfields' and to obtain the relative IDs to the 'tblcustomfieldsvalues' and so obtain the values. At this stage I'll leave that to the brave.

 

Plesk for Windows has a slightly different layout, in that the password field isn't related to a different table, instead held in the 'clients' table in a field called 'passwd'.

 

When you talk about domains it gets more interesting.

 

Plesk domains are held in a table called 'domains' and linked to the 'clients' table by the 'cl_id' field.

Plesk domain limits are held in a table called 'Limits' and linked in the 'domains' table by the 'limits_id' field.

 

The reason why I mention limits is because at some stage during this conversion process I have to add new packages ('tblproducts') to WHMCS but before I can do that I have to hard code our Hosting packages to some of the existing limits as defined by Plesk. To give you an example, if the 'disk_space' limit is '209715200' and I'm currently migrating server 'Server29' I have assume it's a Silver Hosting package that normally comes with 200 MB disk space. Silver hosting packages must be hard coded to the correct ID in 'tblproducts'. This will work quite well on our system because on specific servers specific packages normally have set amounts of disk space. Where this won't work is when the web site was set up on Plesk without a template, or where the Plesk limit has been increased. But I suspect this will migrate about 90% of the sites just fine.

 

In order to migrate domains that don't have hosting I will look for a specific limits and instead of inserting into 'tblproducts' I have to insert into 'tbldomains'.

 

Once I've determined which package to assign it looks like I have to create an order in WHMCS in the 'tblorders' table. My actual objective is to create a new Hosting entity in the 'tblhosting' table, but since 'tblhosting' refers to orders I am going to create an order first. This is where the order number ('ordernum') comes in, I haven't worked out how it's generated but it looks fairly random.

 

At some stage I have to assign prices to hostings, this will also have to be some kind of a hard coded lookup.

 

I'm not really a developer but this is the brief I gave to my developer to far. If anyone has some constructive input please feel free to comment.

Link to comment
Share on other sites

  • 1 year later...
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated