Is there any way to remove License Key From php code
Posted: Thu Jul 31, 2008 10:27 pm
I have whmcs source but when I try to install software it ask for License Key Is there any way to remove License Key from php code
<?php /*
[Release by DivX_4uS]
*/
?><?
function mysql_import_file ($filename)
{
$lines = file ($filename);
if (!$lines)
{
$errmsg = '' . 'cannot open file ' . $filename;
return false;
}
$scriptfile = false;
foreach ($lines as $line)
{
$line = trim ($line);
if (!ereg ('^--', $line))
{
$scriptfile .= ' ' . $line;
continue;
}
}
$queries = explode (';', $scriptfile);
foreach ($queries as $query)
{
$query = trim ($query);
++$querycount;
if ($query == '')
{
continue;
}
if (!mysql_query ($query))
{
$queryerrors .= '' . 'Line ' . $querycount . ' - ' . mysql_error () . '<br>';
continue;
}
}
if ($queryerrors)
{
echo '' . '<b>Errors Occured</b><br><br>Please open a ticket with the debug information below for support<br><br>File: ' . $filename . '<br>' . $queryerrors;
}
return true;
}
function v321upgrade ()
{
mysql_import_file ('upgrade321.sql');
}
function v322upgrade ()
{
mysql_import_file ('upgrade322.sql');
}
function v323upgrade ()
{
mysql_import_file ('upgrade323.sql');
}
function v330upgrade ()
{
mysql_import_file ('upgrade330.sql');
include '../configuration.php';
$query = '' . 'SELECT id,AES_DECRYPT(cardnum,\'' . $cc_encryption_hash . '\') as cardnum,AES_DECRYPT(expdate,\'' . $cc_encryption_hash . '\') as expdate,AES_DECRYPT(issuenumber,\'' . $cc_encryption_hash . '\') as issuenumber,AES_DECRYPT(startdate,\'' . $cc_encryption_hash . '\') as startdate FROM tblclients';
$result = mysql_query ($query);
while ($row = mysql_fetch_array ($result))
{
$id = $row['id'];
$cardnum = $row['cardnum'];
$cardexp = $row['expdate'];
$cardissuenum = $row['issuenumber'];
$cardstart = $row['startdate'];
$query2 = '' . 'UPDATE tblclients SET cardnum=AES_ENCRYPT(\'' . $cardnum . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\'),expdate=AES_ENCRYPT(\'' . $cardexp . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\'),startdate=AES_ENCRYPT(\'' . $cardstart . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\'),issuenumber=AES_ENCRYPT(\'' . $cardissuenum . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\') WHERE id=\'' . $id . '\'';
$result2 = mysql_query ($query2);
}
}
function v340upgrade ()
{
mysql_import_file ('upgrade340.sql');
$result = mysql_query ('UPDATE tblhosting SET nextinvoicedate = nextduedate');
$result = mysql_query ('UPDATE tbldomains SET nextinvoicedate = nextduedate');
$result = mysql_query ('UPDATE tblhostingaddons SET nextinvoicedate = nextduedate');
}
function v341upgrade ()
{
mysql_import_file ('upgrade341.sql');
}
function v350upgrade ()
{
$query = 'ALTER TABLE tblupgrades ADD `orderid` INT( 1 ) NOT NULL AFTER `id`';
$result = mysql_query ($query);
$query = 'SELECT * FROM tblorders WHERE upgradeids!=\'\'';
$result = mysql_query ($query);
while ($data = mysql_fetch_array ($result))
{
$orderid = $data['id'];
$upgradeids = $data['upgradeids'];
$upgradeids = explode (',', $upgradeids);
foreach ($upgradeids as $upgradeid)
{
if ($upgradeid)
{
$query2 = '' . 'UPDATE tblupgrades SET orderid=\'' . $orderid . '\' WHERE id=\'' . $upgradeid . '\'';
$result2 = mysql_query ($query2);
continue;
}
}
}
mysql_import_file ('upgrade350.sql');
}
function v351upgrade ()
{
mysql_import_file ('upgrade351.sql');
}
error_reporting (0);
$latestversion = '3.5.1';
echo '<html>
<head>
<title>WHMCompleteSolution</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../admin/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td height="21" bgcolor="#EFEFEF" style="border-bottom:1px solid #999999; padding-left:12px;"> </td>
<td heig';
echo 'ht="20" bgcolor="#EFEFEF" style="border-bottom:1px solid #999999; padding-right:12px;"><div align="right">';
echo date ('l <b>|</b> jS F Y <b>|</b> g:ia');
echo '</div></td>
</tr>
<tr>
<td background="../admin/images/logobg.gif" height="71" colspan=2 style="padding-left:44px" bgcolor="#8FBCE9"><table width=100% cellspacing=0 cellpadding=0><tr><td width=219><div align="center"><img src="../admin/images/toplogo.gif"></div></td>
<td background="../admin/images/logobg.gif" width="730" align=center bgcolor="#8FBCE9"></td>
</tr></table></td></tr>
<tr>
<tr>
<td height="';
echo '39" colspan="2" background="../admin/images/topbg2.gif" class="menuLink" style="border-bottom:1px solid #999999;"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" valign="top" bgcolor="#FFFFFF" style="padding-top:13px;padding-bottom:13px;"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="#F4F4F4" style="border-top: solid 1p';
echo 'x #CCCCCC;">';
echo '<s';
echo 'pan class="style10"> </span></td>
</tr>
<tr><td class="pageheaderrow">';
echo '<s';
echo 'pan class="style8">INSTALL/UPGRADE WHMCS</span></td></tr>
<tr><td class="pagecontentbox" valign="top">
';
$step = $_REQUEST['step'];
$type = $_REQUEST['type'];
if ($type == 'upgrade300')
{
if ($step == '3')
{
$step = 'upgrade300';
}
}
if ($type == 'upgrade310')
{
if ($step == '3')
{
$step = 'upgrade310';
}
}
if ($type == 'upgrade311')
{
if ($step == '3')
{
$step = 'upgrade311';
}
}
if ($type == 'upgrade312')
{
if ($step == '3')
{
$step = 'upgrade312';
}
}
if ($type == 'upgrade320')
{
if ($step == '3')
{
$step = 'upgrade320';
}
}
if ($type == 'upgrade321')
{
if ($step == '3')
{
$step = 'upgrade321';
}
}
if ($type == 'upgrade322')
{
if ($step == '3')
{
$step = 'upgrade322';
}
}
if ($type == 'upgrade323')
{
if ($step == '3')
{
$step = 'upgrade323';
}
}
if ($type == 'upgrade330')
{
if ($step == '3')
{
$step = 'upgrade330';
}
}
if ($type == 'upgrade340')
{
if ($step == '3')
{
$step = 'upgrade340';
}
}
if ($type == 'upgrade341')
{
if ($step == '3')
{
$step = 'upgrade341';
}
}
if ($type == 'upgrade350')
{
if ($step == '3')
{
$step = 'upgrade350';
}
}
if ($step == '')
{
echo '
<p><b>End User License Agreement</b></p>
<p>Please review the license terms before installing WHMCompleteSolution. By installing, copying, or otherwise using the software, you are agreeing to be bound by the terms of the EULA.</p>
<p align="center"><textarea style="width:700px;font-family:Tahoma;font-size:10px;color:#666666" rows="25" readonly>
WHMCompleteSolution Software License Agreement
Pleas';
echo 'e read this End-User License Agreement (the "EULA")
IMPORTANT --- READ CAREFULLY. By installing, copying, or otherwise using the Software, you are agreeing to be bound by the terms of this EULA, including the WARRANTY DISCLAIMERS, LIMITATIONS OF LIABILITY, and TERMINATION PROVISIONS. If you do not agree to the terms of this EULA do not install or use the Software.
LICENSE TERMS
THIS FILE WAS DECODED BY REVERSE ENGINEERING, AND MISUSE OF THIS ARE NOT OUR RESPONSIBLITY: HackerZero
1. The ';
echo 'Software is supplied by WHMCompleteSolution and is licensed, not sold, under the terms of this EULA and WHMCompleteSolution reserves all rights not expressly granted to you. WHMCompleteSolution retains the ownership of the Software.
2. Software License:
a. WHMCompleteSolution grants you a license to use one copy of the Software. You may not modify or disable any licensing or control featur';
echo 'es of the Software.
b. This Software is licensed to operate on only one domain.
c. Only one company may use the Software for its intended purpose on the domain. This company may not sell the products or services of other companies in the capacity of an on-line mall or buyer service. If more than one company wishes to use the Software they must purchase a separate license.
3. License Restr';
echo 'ictions:
a. By accepting this EULA you are agreeing not to reverse engineer, decompile, or disassemble the Software Application, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
b. You are the exclusive licensee of the Software and sharing any source code of the Software with any individual or entity is a violation o';
echo 'f copyright laws and international treaties and cause for license termination.
c. Modifying any portion of the Software source code or asking any individual or entity to modify the Software source code other than WHMCompleteSolution is a violation of copyright laws and international treaties and cause for license termination.
d. If you upgrade the Software to a higher version of the Software';
echo ', this EULA is terminated and your rights shall be limited to the EULA associated with the higher version.
4. Proprietary Rights: All title and copyrights in and to the Software (including, without limitation, any images, photographs, animations, video, audio, music, text, and "applets" incorporated into the Software Application), the accompanying media and printed materials, and any copies of';
echo ' the Software are owned by WHMCompleteSolution. The Software is protected by copyright laws and international treaty provisions. Therefore, you must treat the Software like any other copyrighted material, subject to the provisions of this EULA.
5. Termination Rights: Without prejudice to any other rights, WHMCompleteSolution may terminate this EULA if you fail to comply with the terms and cond';
echo 'itions of this EULA. In such event, you must destroy all copies of the Software and all of its component parts, and WHMCompleteSolution may suspend or deactivate your use of the Software with or without notice.
6. Export Control: You may not export or re-export the Software or any copy or adaptation of the Software in violation of any applicable laws or regulations.
7. WHMCompleteSolution do';
echo 'es not warrant that the operation of WHMCompleteSolution Software will be uninterrupted or error free. WHMCompleteSolution Software may contain third-party functions or may have been subject to incidental use.
8. WHMCompleteSolution is not responsible for problems resulting from improper or inadequate maintenance or configuration; software or interface routines or functions NOT developed by WH';
echo 'MCompleteSolution; unauthorized specifications for the Software; improper site preparation or maintenance; Beta Software; encryption mechanisms or routines.
Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it. The user must assume the entire risk of using the Software. IN NO EVENT WILL WHMCompleteSolution OR ITS SUPPLIERS BE';
echo ' LIABLE FOR DIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL (INCLUDING LOST PROFIT OR LOST SAVINGS) OR OTHER DAMAGE WHETHER BASED IN CONTRACT, TORT, OR OTHERWISE EVEN IF A WHMCompleteSolution REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY. Some states or provinces do not allow the exclusion or limitation of incidental or consequential damages, so';
echo ' the above limitation or exclusion may not apply to you.
9. Submissions: Should you decide to transmit to WHMCompleteSolution by any means or by any media any information (including, without limitation, ideas, concepts, or techniques for new or improved services and products), whether as information, feedback, data, questions, comments, suggestions, or the like, you agree such submissions are u';
echo 'nrestricted and shall be deemed non-confidential and you automatically grant WHMCompleteSolution and its assigns a non-exclusive, royalty-free, worldwide, perpetual, irrevocable license, with the right to sublicense, to use, copy, transmit, distribute, create derivative works of, display, and perform the same.
10. Distribution and Backups
a. DISTRIBUTION OF THE REGISTERED VERSION OF THE Sof';
echo 'tware IS STRICTLY PROHIBITED and is a violation of United States copyright laws and international treaties punishable by severe criminal and civil penalties.
b. You may make copies of the Registered Version of the Software for backup purposes only. All backup copies must be an exact copy of the original Software.
11. Governing Law: The validity, construction, and performance of this Agreem';
echo 'ent will be governed by the substantive law of the State of Florida.
12. Refunds Policy: Refunds are only issued for software failure. Refunds are not issued for server failure/issues, lack of features or if your server does not meet the Software Requirements. Refunds are determined on individual circumstances and only issued once our technical staff determine that WHMCS has a fault causing it ';
echo 'to not run on your server. Installation charges are not refundable under any circumstances. Refunds are not available after 1 month from purchase date.
13. U.S. Government Restricted Rights: The Software and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Tec';
echo 'hnical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable.
</textarea></p>
<p align=center><input type="submit" value="I AGREE" class="button" onClick="window.location=\'';
echo $PHP_SELF;
echo '?step=2\'"> <input type="button" value="I DISAGREE" class="button" onClick="window.location=\'';
echo $PHP_SELF;
echo '\'">
';
}
else
{
if ($step == '2')
{
echo '
<p><b>System Requirement Checks</b></p>
<p style="font-size: 16px;">
» PHP Version .......... ';
if ('4.2.0' <= phpversion ())
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'Your PHP version needs to be upgraded to at least V4.2.0 before you can use WHMCS.';
$error = '1';
}
echo '<br>
» MySQL .......... ';
if (function_exists ('mysql_connect'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'MySQL support is not available in this PHP installation. It is required by WHMCompleteSolution for it to function.';
$error = '1';
}
echo '<br>
» CURL .......... ';
if (function_exists ('curl_init'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must have CURL installed with SSL Support for WHMCS to function correctly';
$error = '1';
}
echo '</p>
<b>Permissions Checks</b></p>
<p style="font-size: 16px;">
» Configuration File .......... ';
if (is_writable ('../configuration.php'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the configuration.php file so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Attachments Folder Permissions .......... ';
if (is_writable ('../attachments/'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the attachments folder so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Downloads Folder Permissions .......... ';
if (is_writable ('../downloads/'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the downloads folder so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Templates Folder Permissions .......... ';
if (is_writable ('../templates_c/'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the templates_c folder so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Announcements RSS File .......... ';
if (is_writable ('../announcements.xml'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the announcements.xml file so it can be written to (CHMOD 777)';
$error = '1';
}
echo '</p>
';
if ($error == '1')
{
echo '<p><b>Error! Some Preinstallation Checks Failed.</b> You must correct the errors above before you can continue with installation.</p>
';
}
else
{
echo '<form method="post" action="';
echo $PHP_SELF;
echo '?step=3">
<p><b>Installation Type</b></p>
<p>Choose your installation type from below. Please ensure you <B>backup</B> your database before upgrading.</p>
<p><input type="radio" name="type" value="newinstall" checked> New Install V';
echo $latestversion;
echo '<br>
';
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
mysql_select_db ($db_name);
$query = 'SELECT * FROM tblconfiguration WHERE setting=\'Version\'';
$result = mysql_query ($query);
while ($data = @mysql_fetch_array ($result))
{
$setting = $data['setting'];
$value = $data['value'];
$CONFIG['' . $setting] = '' . $value;
}
echo '<input type="radio" name="type" value="upgrade320"';
if ($CONFIG['Version'] == '3.2.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.0 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade321"';
if ($CONFIG['Version'] == '3.2.1')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.1 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade322"';
if ($CONFIG['Version'] == '3.2.2')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.2 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade323"';
if ($CONFIG['Version'] == '3.2.3')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.3 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade330"';
if ($CONFIG['Version'] == '3.3.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.3.0 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade340"';
if ($CONFIG['Version'] == '3.4.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.4.0 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade341"';
if ($CONFIG['Version'] == '3.4.1')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.4.1 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade350"';
if ($CONFIG['Version'] == '3.5.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.5.0 to V';
echo $latestversion;
echo '</p>
<p align="center"><input type="submit" value="Begin Installation" class="button"></p>
</form>
';
}
echo '
';
}
else
{
if ($step == '3')
{
echo '
<form method="post" action="';
echo $PHP_SELF;
echo '?step=4">
<p><b>License Key</b></p>
<p>You will find your license key in the <a href="http://www.whmcs.com/clients" target="_blank">WHMCS Client Area</a> or alternatively if you obtained a license from a reseller your reseller should have already given the license key to you.</p>
<table>
<tr><td width=120>License Key</td><td><input type="text" name="licensekey" size="20"></td></tr>
</table>
<p><b>Database Conn';
echo 'ection Details</b></p>
<p>You must now create a MySQL database in your control panel and assign a user to it. Once this is complete, enter the connection details below.</p>
<table>
<tr><td width=120>Database Host</td><td><input type="text" name="dbhost" size="20" value="localhost"></td></tr>
<tr><td>Database Name</td><td><input type="text" name="dbname" size="20" value=""></td></tr>
<tr><td>Database Username</td>';
echo '<td><input type="text" name="dbusername" size="20" value=""></td></tr>
<tr><td>Database Password</td><td><input type="text" name="dbpassword" size="20" value=""></td></tr>
</table>
<p align="center"><input type="submit" value="Continue »" class="button"></p>
</form>
';
}
else
{
if ($step == '4')
{
if ($_REQUEST['licensekey'] == '')
{
echo 'You did not enter your license key. You must go back and correct this.';
exit ();
}
$length = 64;
$seeds = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$str = null;
$seeds_count = strlen ($seeds) - 1;
$i = 0;
while ($i < $length)
{
$str .= $seeds[rand (0, $seeds_count)];
++$i;
}
$output = '<?php
$license="' . $_REQUEST['licensekey'] . '";
$db_host = "' . $_REQUEST['dbhost'] . '";
$db_username = "' . $_REQUEST['dbusername'] . '";
$db_password = "' . $_REQUEST['dbpassword'] . '";
$db_name = "' . $_REQUEST['dbname'] . '";
$cc_encryption_hash = "' . $str . '";
$templates_compiledir = "templates_c/";
?>';
$fp = fopen ('../configuration.php', 'w');
fwrite ($fp, $output);
fclose ($fp);
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
mysql_import_file ('install.sql');
mysql_import_file ('emailtemplates.sql');
echo '
<p><b>Setup Administrator Account</b></p>
<form method="post" action="';
echo $PHP_SELF;
echo '?step=5">
<p>You now need to setup your administrator account.</p>
<table>
<tr><td width=120>First Name:</td><td><input type="text" name="firstname" size="30"></td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lastname" size="30"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email" size="50"></td></tr>
<tr><td>Username:</td><td><input type="text" name="username" size="20"></td></tr>
<tr><td>Passwor';
echo 'd:</td><td><input type="password" name="password" size="20"></td></tr>
</table>
<p align="center"><input type="submit" value="Continue" class="button"></p>
</form>
';
}
else
{
if ($step == '5')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
$result = mysql_query ('INSERT INTO `tbladmins` ( `username` , `password` , `firstname` , `lastname` , `email` , `userlevel` , `signature` , `notes` , `supportdepts` ) VALUES (\'' . $_REQUEST['username'] . '\', \'' . md5 ($_REQUEST['password']) . '\', \'' . $_REQUEST['firstname'] . '\', \'' . $_REQUEST['lastname'] . '\', \'' . $_REQUEST['email'] . '\', \'3\', \'\', \'Welcome to WHMCS! Please ensure you have setup the cron job in cPanel to automate tasks\', \',\')');
v321upgrade ();
v322upgrade ();
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Installation Complete</b></p>
<p>Here\'s what you should do next:</p>
<p><b>1. Delete the Install Folder</b></p>
<p>Make sure you delete the <b><i>install</i></b> directory from your server now setup has been completed - leaving it on your server is a big security risk.</p>
<p><b>2. Setup the Cron Job</b></p>
<p>You should setup a cron job in your control panel to run using the following command once';
echo ' per day:<br>
<input type="text" size="120" value="php -q ';
$pos = strrpos ($_SERVER['SCRIPT_FILENAME'], '/');
$filename = substr ($_SERVER['SCRIPT_FILENAME'], 0, $pos);
$pos = strrpos ($filename, '/');
$filename = substr ($filename, 0, $pos);
echo $filename;
echo '/admin/cron.php"></p>
<p><b>3. Completed the above?</b></p>
<p>You should login to the admin area and go through all the configuration options in the Configuration section of WHMCS. From here you can configure your general settings, payment gateways, setup your domain pricing, customise the messages your system will send out, add your products/services to the system, configure the automation settin';
echo 'gs, setup your custom fields, setup your operator accounts and configure all the other features of your WHMCS system.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade320')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v321upgrade ();
v322upgrade ();
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade321')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v322upgrade ();
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade322')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade323')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade330')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade340')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade341')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade350')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
}
}
}
}
}
}
}
}
}
}
}
}
echo '
</td>
</tr>
<tr>
<td height="10" bgcolor="#F4F4F4" style="border-bottom: solid 1px #CCCCCC;">';
echo '<s';
echo 'pan class="style10"> </span></td>
</tr>
</table> </td>
</tr>
<tr>
<td style="border-top:1px solid #999999;padding:12px" height="30" colspan=2 bgcolor="#ECECEC"><img src="../admin/images/spacer.gif" height="1" width="50">';
echo '<s';
echo 'pan class="style2">Copyright © <a href="http://www.whmcs.com/" target="_blank">WHMCompleteSolution</a>. All Rights Reserved.</span></td>
</tr>
</table>
</body>
</html>
';
?><?
/*
[Release by DivX_4uS]
*/
?>
<?php /*
[Release by DivX_4uS]
*/
?><?
function mysql_import_file ($filename)
{
$lines = file ($filename);
if (!$lines)
{
$errmsg = '' . 'cannot open file ' . $filename;
return false;
}
$scriptfile = false;
foreach ($lines as $line)
{
$line = trim ($line);
if (!ereg ('^--', $line))
{
$scriptfile .= ' ' . $line;
continue;
}
}
$queries = explode (';', $scriptfile);
foreach ($queries as $query)
{
$query = trim ($query);
++$querycount;
if ($query == '')
{
continue;
}
if (!mysql_query ($query))
{
$queryerrors .= '' . 'Line ' . $querycount . ' - ' . mysql_error () . '<br>';
continue;
}
}
if ($queryerrors)
{
echo '' . '<b>Errors Occured</b><br><br>Please open a ticket with the debug information below for support<br><br>File: ' . $filename . '<br>' . $queryerrors;
}
return true;
}
function v321upgrade ()
{
mysql_import_file ('upgrade321.sql');
}
function v322upgrade ()
{
mysql_import_file ('upgrade322.sql');
}
function v323upgrade ()
{
mysql_import_file ('upgrade323.sql');
}
function v330upgrade ()
{
mysql_import_file ('upgrade330.sql');
include '../configuration.php';
$query = '' . 'SELECT id,AES_DECRYPT(cardnum,\'' . $cc_encryption_hash . '\') as cardnum,AES_DECRYPT(expdate,\'' . $cc_encryption_hash . '\') as expdate,AES_DECRYPT(issuenumber,\'' . $cc_encryption_hash . '\') as issuenumber,AES_DECRYPT(startdate,\'' . $cc_encryption_hash . '\') as startdate FROM tblclients';
$result = mysql_query ($query);
while ($row = mysql_fetch_array ($result))
{
$id = $row['id'];
$cardnum = $row['cardnum'];
$cardexp = $row['expdate'];
$cardissuenum = $row['issuenumber'];
$cardstart = $row['startdate'];
$query2 = '' . 'UPDATE tblclients SET cardnum=AES_ENCRYPT(\'' . $cardnum . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\'),expdate=AES_ENCRYPT(\'' . $cardexp . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\'),startdate=AES_ENCRYPT(\'' . $cardstart . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\'),issuenumber=AES_ENCRYPT(\'' . $cardissuenum . '\',\'54X6zoYZZnS35o6m5gEwGmYC6' . $cc_encryption_hash . '\') WHERE id=\'' . $id . '\'';
$result2 = mysql_query ($query2);
}
}
function v340upgrade ()
{
mysql_import_file ('upgrade340.sql');
$result = mysql_query ('UPDATE tblhosting SET nextinvoicedate = nextduedate');
$result = mysql_query ('UPDATE tbldomains SET nextinvoicedate = nextduedate');
$result = mysql_query ('UPDATE tblhostingaddons SET nextinvoicedate = nextduedate');
}
function v341upgrade ()
{
mysql_import_file ('upgrade341.sql');
}
function v350upgrade ()
{
$query = 'ALTER TABLE tblupgrades ADD `orderid` INT( 1 ) NOT NULL AFTER `id`';
$result = mysql_query ($query);
$query = 'SELECT * FROM tblorders WHERE upgradeids!=\'\'';
$result = mysql_query ($query);
while ($data = mysql_fetch_array ($result))
{
$orderid = $data['id'];
$upgradeids = $data['upgradeids'];
$upgradeids = explode (',', $upgradeids);
foreach ($upgradeids as $upgradeid)
{
if ($upgradeid)
{
$query2 = '' . 'UPDATE tblupgrades SET orderid=\'' . $orderid . '\' WHERE id=\'' . $upgradeid . '\'';
$result2 = mysql_query ($query2);
continue;
}
}
}
mysql_import_file ('upgrade350.sql');
}
function v351upgrade ()
{
mysql_import_file ('upgrade351.sql');
}
error_reporting (0);
$latestversion = '3.5.1';
echo '<html>
<head>
<title>WHMCompleteSolution</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../admin/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width=100% border=0 align="center" cellpadding=0 cellspacing=0>
<tr>
<td height="21" bgcolor="#EFEFEF" style="border-bottom:1px solid #999999; padding-left:12px;"> </td>
<td heig';
echo 'ht="20" bgcolor="#EFEFEF" style="border-bottom:1px solid #999999; padding-right:12px;"><div align="right">';
echo date ('l <b>|</b> jS F Y <b>|</b> g:ia');
echo '</div></td>
</tr>
<tr>
<td background="../admin/images/logobg.gif" height="71" colspan=2 style="padding-left:44px" bgcolor="#8FBCE9"><table width=100% cellspacing=0 cellpadding=0><tr><td width=219><div align="center"><img src="../admin/images/toplogo.gif"></div></td>
<td background="../admin/images/logobg.gif" width="730" align=center bgcolor="#8FBCE9"></td>
</tr></table></td></tr>
<tr>
<tr>
<td height="';
echo '39" colspan="2" background="../admin/images/topbg2.gif" class="menuLink" style="border-bottom:1px solid #999999;"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" valign="top" bgcolor="#FFFFFF" style="padding-top:13px;padding-bottom:13px;"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="10" bgcolor="#F4F4F4" style="border-top: solid 1p';
echo 'x #CCCCCC;">';
echo '<s';
echo 'pan class="style10"> </span></td>
</tr>
<tr><td class="pageheaderrow">';
echo '<s';
echo 'pan class="style8">INSTALL/UPGRADE WHMCS</span></td></tr>
<tr><td class="pagecontentbox" valign="top">
';
$step = $_REQUEST['step'];
$type = $_REQUEST['type'];
if ($type == 'upgrade300')
{
if ($step == '3')
{
$step = 'upgrade300';
}
}
if ($type == 'upgrade310')
{
if ($step == '3')
{
$step = 'upgrade310';
}
}
if ($type == 'upgrade311')
{
if ($step == '3')
{
$step = 'upgrade311';
}
}
if ($type == 'upgrade312')
{
if ($step == '3')
{
$step = 'upgrade312';
}
}
if ($type == 'upgrade320')
{
if ($step == '3')
{
$step = 'upgrade320';
}
}
if ($type == 'upgrade321')
{
if ($step == '3')
{
$step = 'upgrade321';
}
}
if ($type == 'upgrade322')
{
if ($step == '3')
{
$step = 'upgrade322';
}
}
if ($type == 'upgrade323')
{
if ($step == '3')
{
$step = 'upgrade323';
}
}
if ($type == 'upgrade330')
{
if ($step == '3')
{
$step = 'upgrade330';
}
}
if ($type == 'upgrade340')
{
if ($step == '3')
{
$step = 'upgrade340';
}
}
if ($type == 'upgrade341')
{
if ($step == '3')
{
$step = 'upgrade341';
}
}
if ($type == 'upgrade350')
{
if ($step == '3')
{
$step = 'upgrade350';
}
}
if ($step == '')
{
echo '
<p><b>End User License Agreement</b></p>
<p>Please review the license terms before installing WHMCompleteSolution. By installing, copying, or otherwise using the software, you are agreeing to be bound by the terms of the EULA.</p>
<p align="center"><textarea style="width:700px;font-family:Tahoma;font-size:10px;color:#666666" rows="25" readonly>
WHMCompleteSolution Software License Agreement
Pleas';
echo 'e read this End-User License Agreement (the "EULA")
IMPORTANT --- READ CAREFULLY. By installing, copying, or otherwise using the Software, you are agreeing to be bound by the terms of this EULA, including the WARRANTY DISCLAIMERS, LIMITATIONS OF LIABILITY, and TERMINATION PROVISIONS. If you do not agree to the terms of this EULA do not install or use the Software.
LICENSE TERMS
THIS FILE WAS DECODED BY REVERSE ENGINEERING, AND MISUSE OF THIS ARE NOT OUR RESPONSIBLITY: HackerZero
1. The ';
echo 'Software is supplied by WHMCompleteSolution and is licensed, not sold, under the terms of this EULA and WHMCompleteSolution reserves all rights not expressly granted to you. WHMCompleteSolution retains the ownership of the Software.
2. Software License:
a. WHMCompleteSolution grants you a license to use one copy of the Software. You may not modify or disable any licensing or control featur';
echo 'es of the Software.
b. This Software is licensed to operate on only one domain.
c. Only one company may use the Software for its intended purpose on the domain. This company may not sell the products or services of other companies in the capacity of an on-line mall or buyer service. If more than one company wishes to use the Software they must purchase a separate license.
3. License Restr';
echo 'ictions:
a. By accepting this EULA you are agreeing not to reverse engineer, decompile, or disassemble the Software Application, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.
b. You are the exclusive licensee of the Software and sharing any source code of the Software with any individual or entity is a violation o';
echo 'f copyright laws and international treaties and cause for license termination.
c. Modifying any portion of the Software source code or asking any individual or entity to modify the Software source code other than WHMCompleteSolution is a violation of copyright laws and international treaties and cause for license termination.
d. If you upgrade the Software to a higher version of the Software';
echo ', this EULA is terminated and your rights shall be limited to the EULA associated with the higher version.
4. Proprietary Rights: All title and copyrights in and to the Software (including, without limitation, any images, photographs, animations, video, audio, music, text, and "applets" incorporated into the Software Application), the accompanying media and printed materials, and any copies of';
echo ' the Software are owned by WHMCompleteSolution. The Software is protected by copyright laws and international treaty provisions. Therefore, you must treat the Software like any other copyrighted material, subject to the provisions of this EULA.
5. Termination Rights: Without prejudice to any other rights, WHMCompleteSolution may terminate this EULA if you fail to comply with the terms and cond';
echo 'itions of this EULA. In such event, you must destroy all copies of the Software and all of its component parts, and WHMCompleteSolution may suspend or deactivate your use of the Software with or without notice.
6. Export Control: You may not export or re-export the Software or any copy or adaptation of the Software in violation of any applicable laws or regulations.
7. WHMCompleteSolution do';
echo 'es not warrant that the operation of WHMCompleteSolution Software will be uninterrupted or error free. WHMCompleteSolution Software may contain third-party functions or may have been subject to incidental use.
8. WHMCompleteSolution is not responsible for problems resulting from improper or inadequate maintenance or configuration; software or interface routines or functions NOT developed by WH';
echo 'MCompleteSolution; unauthorized specifications for the Software; improper site preparation or maintenance; Beta Software; encryption mechanisms or routines.
Good data processing procedure dictates that any program be thoroughly tested with non-critical data before relying on it. The user must assume the entire risk of using the Software. IN NO EVENT WILL WHMCompleteSolution OR ITS SUPPLIERS BE';
echo ' LIABLE FOR DIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL (INCLUDING LOST PROFIT OR LOST SAVINGS) OR OTHER DAMAGE WHETHER BASED IN CONTRACT, TORT, OR OTHERWISE EVEN IF A WHMCompleteSolution REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY. Some states or provinces do not allow the exclusion or limitation of incidental or consequential damages, so';
echo ' the above limitation or exclusion may not apply to you.
9. Submissions: Should you decide to transmit to WHMCompleteSolution by any means or by any media any information (including, without limitation, ideas, concepts, or techniques for new or improved services and products), whether as information, feedback, data, questions, comments, suggestions, or the like, you agree such submissions are u';
echo 'nrestricted and shall be deemed non-confidential and you automatically grant WHMCompleteSolution and its assigns a non-exclusive, royalty-free, worldwide, perpetual, irrevocable license, with the right to sublicense, to use, copy, transmit, distribute, create derivative works of, display, and perform the same.
10. Distribution and Backups
a. DISTRIBUTION OF THE REGISTERED VERSION OF THE Sof';
echo 'tware IS STRICTLY PROHIBITED and is a violation of United States copyright laws and international treaties punishable by severe criminal and civil penalties.
b. You may make copies of the Registered Version of the Software for backup purposes only. All backup copies must be an exact copy of the original Software.
11. Governing Law: The validity, construction, and performance of this Agreem';
echo 'ent will be governed by the substantive law of the State of Florida.
12. Refunds Policy: Refunds are only issued for software failure. Refunds are not issued for server failure/issues, lack of features or if your server does not meet the Software Requirements. Refunds are determined on individual circumstances and only issued once our technical staff determine that WHMCS has a fault causing it ';
echo 'to not run on your server. Installation charges are not refundable under any circumstances. Refunds are not available after 1 month from purchase date.
13. U.S. Government Restricted Rights: The Software and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Tec';
echo 'hnical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable.
</textarea></p>
<p align=center><input type="submit" value="I AGREE" class="button" onClick="window.location=\'';
echo $PHP_SELF;
echo '?step=2\'"> <input type="button" value="I DISAGREE" class="button" onClick="window.location=\'';
echo $PHP_SELF;
echo '\'">
';
}
else
{
if ($step == '2')
{
echo '
<p><b>System Requirement Checks</b></p>
<p style="font-size: 16px;">
» PHP Version .......... ';
if ('4.2.0' <= phpversion ())
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'Your PHP version needs to be upgraded to at least V4.2.0 before you can use WHMCS.';
$error = '1';
}
echo '<br>
» MySQL .......... ';
if (function_exists ('mysql_connect'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'MySQL support is not available in this PHP installation. It is required by WHMCompleteSolution for it to function.';
$error = '1';
}
echo '<br>
» CURL .......... ';
if (function_exists ('curl_init'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must have CURL installed with SSL Support for WHMCS to function correctly';
$error = '1';
}
echo '</p>
<b>Permissions Checks</b></p>
<p style="font-size: 16px;">
» Configuration File .......... ';
if (is_writable ('../configuration.php'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the configuration.php file so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Attachments Folder Permissions .......... ';
if (is_writable ('../attachments/'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the attachments folder so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Downloads Folder Permissions .......... ';
if (is_writable ('../downloads/'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the downloads folder so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Templates Folder Permissions .......... ';
if (is_writable ('../templates_c/'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the templates_c folder so it can be written to (CHMOD 777)';
$error = '1';
}
echo '<br>
» Announcements RSS File .......... ';
if (is_writable ('../announcements.xml'))
{
echo '<font color=#99cc00><B>Passed</B></font>';
}
else
{
echo 'You must set permissions for the announcements.xml file so it can be written to (CHMOD 777)';
$error = '1';
}
echo '</p>
';
if ($error == '1')
{
echo '<p><b>Error! Some Preinstallation Checks Failed.</b> You must correct the errors above before you can continue with installation.</p>
';
}
else
{
echo '<form method="post" action="';
echo $PHP_SELF;
echo '?step=3">
<p><b>Installation Type</b></p>
<p>Choose your installation type from below. Please ensure you <B>backup</B> your database before upgrading.</p>
<p><input type="radio" name="type" value="newinstall" checked> New Install V';
echo $latestversion;
echo '<br>
';
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
mysql_select_db ($db_name);
$query = 'SELECT * FROM tblconfiguration WHERE setting=\'Version\'';
$result = mysql_query ($query);
while ($data = @mysql_fetch_array ($result))
{
$setting = $data['setting'];
$value = $data['value'];
$CONFIG['' . $setting] = '' . $value;
}
echo '<input type="radio" name="type" value="upgrade320"';
if ($CONFIG['Version'] == '3.2.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.0 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade321"';
if ($CONFIG['Version'] == '3.2.1')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.1 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade322"';
if ($CONFIG['Version'] == '3.2.2')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.2 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade323"';
if ($CONFIG['Version'] == '3.2.3')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.2.3 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade330"';
if ($CONFIG['Version'] == '3.3.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.3.0 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade340"';
if ($CONFIG['Version'] == '3.4.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.4.0 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade341"';
if ($CONFIG['Version'] == '3.4.1')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.4.1 to V';
echo $latestversion;
echo '<br>
<input type="radio" name="type" value="upgrade350"';
if ($CONFIG['Version'] == '3.5.0')
{
echo ' checked';
}
else
{
echo ' disabled';
}
echo '> Upgrade Install V3.5.0 to V';
echo $latestversion;
echo '</p>
<p align="center"><input type="submit" value="Begin Installation" class="button"></p>
</form>
';
}
echo '
';
}
else
{
if ($step == '3')
{
echo '
<form method="post" action="';
echo $PHP_SELF;
echo '?step=4">
<p><b>License Key</b></p>
<p>You will find your license key in the <a href="http://www.whmcs.com/clients" target="_blank">WHMCS Client Area</a> or alternatively if you obtained a license from a reseller your reseller should have already given the license key to you.</p>
<table>
<tr><td width=120>License Key</td><td><input type="text" name="licensekey" size="20"></td></tr>
</table>
<p><b>Database Conn';
echo 'ection Details</b></p>
<p>You must now create a MySQL database in your control panel and assign a user to it. Once this is complete, enter the connection details below.</p>
<table>
<tr><td width=120>Database Host</td><td><input type="text" name="dbhost" size="20" value="localhost"></td></tr>
<tr><td>Database Name</td><td><input type="text" name="dbname" size="20" value=""></td></tr>
<tr><td>Database Username</td>';
echo '<td><input type="text" name="dbusername" size="20" value=""></td></tr>
<tr><td>Database Password</td><td><input type="text" name="dbpassword" size="20" value=""></td></tr>
</table>
<p align="center"><input type="submit" value="Continue »" class="button"></p>
</form>
';
}
else
{
if ($step == '4')
{
if ($_REQUEST['licensekey'] == '')
{
echo 'You did not enter your license key. You must go back and correct this.';
exit ();
}
$length = 64;
$seeds = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
$str = null;
$seeds_count = strlen ($seeds) - 1;
$i = 0;
while ($i < $length)
{
$str .= $seeds[rand (0, $seeds_count)];
++$i;
}
$output = '<?php
$license="' . $_REQUEST['licensekey'] . '";
$db_host = "' . $_REQUEST['dbhost'] . '";
$db_username = "' . $_REQUEST['dbusername'] . '";
$db_password = "' . $_REQUEST['dbpassword'] . '";
$db_name = "' . $_REQUEST['dbname'] . '";
$cc_encryption_hash = "' . $str . '";
$templates_compiledir = "templates_c/";
?>';
$fp = fopen ('../configuration.php', 'w');
fwrite ($fp, $output);
fclose ($fp);
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
mysql_import_file ('install.sql');
mysql_import_file ('emailtemplates.sql');
echo '
<p><b>Setup Administrator Account</b></p>
<form method="post" action="';
echo $PHP_SELF;
echo '?step=5">
<p>You now need to setup your administrator account.</p>
<table>
<tr><td width=120>First Name:</td><td><input type="text" name="firstname" size="30"></td></tr>
<tr><td>Last Name:</td><td><input type="text" name="lastname" size="30"></td></tr>
<tr><td>Email:</td><td><input type="text" name="email" size="50"></td></tr>
<tr><td>Username:</td><td><input type="text" name="username" size="20"></td></tr>
<tr><td>Passwor';
echo 'd:</td><td><input type="password" name="password" size="20"></td></tr>
</table>
<p align="center"><input type="submit" value="Continue" class="button"></p>
</form>
';
}
else
{
if ($step == '5')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
$result = mysql_query ('INSERT INTO `tbladmins` ( `username` , `password` , `firstname` , `lastname` , `email` , `userlevel` , `signature` , `notes` , `supportdepts` ) VALUES (\'' . $_REQUEST['username'] . '\', \'' . md5 ($_REQUEST['password']) . '\', \'' . $_REQUEST['firstname'] . '\', \'' . $_REQUEST['lastname'] . '\', \'' . $_REQUEST['email'] . '\', \'3\', \'\', \'Welcome to WHMCS! Please ensure you have setup the cron job in cPanel to automate tasks\', \',\')');
v321upgrade ();
v322upgrade ();
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Installation Complete</b></p>
<p>Here\'s what you should do next:</p>
<p><b>1. Delete the Install Folder</b></p>
<p>Make sure you delete the <b><i>install</i></b> directory from your server now setup has been completed - leaving it on your server is a big security risk.</p>
<p><b>2. Setup the Cron Job</b></p>
<p>You should setup a cron job in your control panel to run using the following command once';
echo ' per day:<br>
<input type="text" size="120" value="php -q ';
$pos = strrpos ($_SERVER['SCRIPT_FILENAME'], '/');
$filename = substr ($_SERVER['SCRIPT_FILENAME'], 0, $pos);
$pos = strrpos ($filename, '/');
$filename = substr ($filename, 0, $pos);
echo $filename;
echo '/admin/cron.php"></p>
<p><b>3. Completed the above?</b></p>
<p>You should login to the admin area and go through all the configuration options in the Configuration section of WHMCS. From here you can configure your general settings, payment gateways, setup your domain pricing, customise the messages your system will send out, add your products/services to the system, configure the automation settin';
echo 'gs, setup your custom fields, setup your operator accounts and configure all the other features of your WHMCS system.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade320')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v321upgrade ();
v322upgrade ();
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade321')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v322upgrade ();
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade322')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v323upgrade ();
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade323')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v330upgrade ();
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade330')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v340upgrade ();
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade340')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v341upgrade ();
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade341')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v350upgrade ();
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
else
{
if ($step == 'upgrade350')
{
include '../configuration.php';
$link = mysql_connect ($db_host, $db_username, $db_password);
if (!(mysql_select_db ($db_name)))
{
exit ('Could not connect to the database - check the database connection details you entered and go back and correct them if necessary');
;
}
v351upgrade ();
echo '
<p><b>Upgrade Complete</b></p>
<p>You should now delete the install folder from your web server.</p>
<p><a href="../admin/">Click here to go to the admin area</a></p>
<p><b>Thank you for choosing WHMCS!</b></p>
';
}
}
}
}
}
}
}
}
}
}
}
}
}
echo '
</td>
</tr>
<tr>
<td height="10" bgcolor="#F4F4F4" style="border-bottom: solid 1px #CCCCCC;">';
echo '<s';
echo 'pan class="style10"> </span></td>
</tr>
</table> </td>
</tr>
<tr>
<td style="border-top:1px solid #999999;padding:12px" height="30" colspan=2 bgcolor="#ECECEC"><img src="../admin/images/spacer.gif" height="1" width="50">';
echo '<s';
echo 'pan class="style2">Copyright © <a href="http://www.whmcs.com/" target="_blank">WHMCompleteSolution</a>. All Rights Reserved.</span></td>
</tr>
</table>
</body>
</html>
';
?><?
/*
[Release by DivX_4uS]
*/
?>