Install the User-Panel

Top  Previous  Next

delphinet2For Delphi and .NET platforms

INSTALL THE USER-PANEL

 

usrpanel01

The User Panel is a web-site, it is the same as uses the AV-SOFT site http://av-soft.com.ar from where you downloaded the AVLock SS package that you are installing now.

Once finished the installation you will have the following scheme on your hard disk, assuming you installed it on C:\AV-Soft\ss2std

 

avplusinstall07

 

 

Into the folder "userpanel" found the file sspanel.zip that contains all files needed to install the User-Panel. Below in the image you can see the contents, the PHP scripts and subfolders with additional code css, javascript, fonts and images used in the AV-SOFT site. Below is the list of files into sspanel.zip:

 

usrpanel02

For version 2 there are 4 new scripts:

 

install2.php               :   As part of the installation process

upgrade1to2.php    :   To upgrade from version 1 to version 2

conf.php                    :   To hold configuration data

news2.php                :   Used to show news into the application.

 

These scripts are distributed free of charge. If you need you can change it in order to adapt to another language, or change the language syntax of texts.

You can also create your own images and include them in the img folder. To preserve the appearance of the site your images must have the same size as the existing ones.

 

IMPORTANT: If you need to modify the php files do not use the Windows notepad, instead use a programmer editor like Notepad++, and save them with the encoding "UTF-8 without BOM" as you can see in the image below:

 

encoding01

 

 

To install the User-Panel you will need:

 

1. A hosting account, preferably Linux with CPanel.

2 Create a MySql database on your server (hosting account), or use an existing database.

3 copy to the web server the php files (scripts). These are in compressed format into the sspanel.zip file into the userpanel folder .

4 Install the User-Panel

 

 

1. A hosting account

 

Preferably it should be a Linux based hosting with CPanel. The CPanel is accessed from a web browser with the following url: http://<your-domain>: 2082. Here <your-domain> should be replaced by the domain that is assigned to your hosting account. Then you will be prompted to enter the username and password from the following screen:

 

cpanel01

 

Also could be useful to have a FTP client as FireFtp for Firefox.

 

2. Create a MySql database

 

If you already have created one can ignore this point. You only need to remember the database name, user name and password (password).

 

In the CPanel go to the Databases section and select the "MySQL Database Wizard".

 

install07

 

This will initiate the wizard to create a new database:

 

In step 1 you must enter a name for the database, the example we entered ssdb. Instead xxxxxxxxx it is shown the username for the hosting account.

 

install08

 

 

After clicking "Next Step" the  Step 2 form is displayed where you must create the user name and password associated with the database, in the example we set ssdb. It is practical to place the same name as the database.

 

 

install09

 

 

By clicking "Create user", the user is created and passed to the next screen (Step 3) where we assign user privileges we have created. Select "ALL PRIVILEGES" as seen in the image below.

 

 

install10

 

 

After clicking "Next Step" we go to the last screen (Step 4). It shows the name of the created database and username associated with it.

 

 

install11

 

 

3. Copy to the web server the php files (scripts)

 

The files to be copied are PHP scripts that comes into the sspanel.zip file with compressed format located into the userpanel folder.

 

From your hosting CPanel go to the "Files" section, then select File Manager".

 

install12a

 

The file manager window opens. Below in the image we highlighted the options that will be used. Here not all folders are shown, only the ones of interest for the task we will perform. The image is shown when the sspanel folder already has been created.

 

 

install12b

 

 

NOTE: In order to avoid users to view your files when they navigate into folders without index.html or index.php files, you should add a line to your .htaccess file in the public_html folder, if there is no such file can create one and add the line. The line to add is:

 

     Options -Indexes

 

 

Select the "public_html" folder then click on the "New Folder" icon.

 

install13

 

Here we should enter the name for the folder to be created. In this case we put "sspanel", then on "Create New Folder". Imediately we can see in the file manager the newly created folder, we click on it to select it.

 

Once selected the "sspanel" folder,  click on the "Upload" icon. You will see the following screen:

 

install14

 

 

Leave the options unchanged and click "Browse". You will need to select the sspanel.zip file from your local machine into the userpanel folder. A progress bar will shows the progress of the operation. Once completed you will see the file in the folder /public_html/sspanel.

 

You then need to extract the contents of sspanel.zip file, select it and click on the "Extract" icon. You will see the following screen:

 

install15

 

Verify that the references are correct and click the "Extract File(s)" button. In moments you will see a list of the extracted files.

 

install16

 

Within the set of extracted files is also the script of OLM with olms.php name. This contains the set of functions that allow a Delphi application to communicate with the MySQL database on the web server.

 

4. Install the User-Panel

 

Once correctly located the files that make up the User-panel, enter the following URL into your browser:

 

http://<your-domain>/sspanel/install.php  (replace <yourdomain> by your own domain).

 

In moments you will see the following screen where you must enter the appropriate data to properly configure and link it to the database that has been prepared.  Also the convention name is shown with each field.

 

install17

 

Here you must enter the following: (replace xxxxxxxx for the username of your hosting account:

 

FIELD

DATA TO ENTER

Database-Hosting

localhost

Database-User

xxxxxxxx_ssdb

Database-Password

The password from the database user

Database-Name

xxxxxxxx_ssdb

Tables-Prefix

Place a sequence of a few letters and/or numbers as the prefix for the tables. This will avoid conflicts on other tables in the same database that could have the same names. For example, if you place ss prefix, tables are created as ss_products, ss_subscriptions, etc..

Encryption-Key

Enter here a sequence of letters, numbers and special characters that serve as the encryption key for data sent and received from your Delphi application and web server. Note that the configuration of your Application should use the same value entered here.

Currency ISO-4217 (3 chars)

Enter the appropriate 3 chars according with the ISO-4217 specification. e.g. "USD"

http://en.wikipedia.org/wiki/ISO_4217

Currency  (1 char)

e.g. "$"

Main email address

The main email address for your site based in AVLock SS.

Sender email address

Sender email address in emails sent to users. (Email "From" item).

Sender name

The sender name (Email "From" item).

PayPal email address

Your PayPal email address or a fictional vendor email to use with the PayPal Sandbox.

 

 

In practice I made for this documentation I filled out the form with the data you see in the image below:

 

install17c

 

Later you can change this information from the options screen in the Dev-Panel which is accessed with the button options_02

 

Once completed the form, click on SUBMIT. If the operation was successful the following message will be displayed:

 

install19

 

Clicking OK enters into the User-panel home page.

 

install20

 

Now the User-Panel is installed but no data. All the information you see here will come from what you enter in the Dev-Panel.

 

From now you can access to the User-Panel using this url: http://<your-domain>/sspanel/index.php

 

In the next topic we will see how to configure and use the Dev-Panel.

 

NOTE: If you could not manage the installation and instead of congratulatory message received a set of error messages, you should try again, but before doing should investigate the possible causes of their error. If tables could not be created may have incorrectly entered some data from the database and / or the user. From CPanel you can use phpMyAdmin to view the database and its tables. In the Databases section of CPanel, click on this icon:

 

install21

 

After a few seconds (this may take a while) you will see the screen of phpMyAdmin. It is a comprehensive tool that allows you to do almost anything with your MySql database. Below you can see the left pane with the tables created by the installer. Note the ss_ prefixed to the name of each table.

 

install22

 

The data you enter in the installer is used to modify the configuration file conf.php which contains the configuration data.

 

Below is shown the conf.php file before to be modified:

 

install23

 

The installation process replaces all tags for the values ​​that you entered. For example <SQL_HOST> is replaced by localhost, and <SQL_USER> by username, etc.. This way, you can check this file and see what made the installer and try to identify the error. Below is the conf.php file after be modified:

 

install24

 

 

If the tables were not created or are not created as you expected, possibly made a mistake while entering data in the installer. In that case do the following:

1. If the tables were created, remove them using PHPMyAdmin from Cpanel.

2. Replace the original file conf.php by one as it was before it was amended by the installer.

3. Run the install.php installer again.

 

You can also directly edit the file conf.php to make some changes that are not related to the database, do not change the first 5 lines.