microbolt
Retired Forum Member-
Posts
16 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Hotfixes
Everything posted by microbolt
-
I believe they changed the way the passwords are stored in the database (comparing to a backup I made before the upgrade) I'm assuming it failed for me as I was running PHP 5.2.x at the time. The new password routines must require PHP 5.3.x or above. But then I'm just guessing, who knows Here is how I fixed mine: First BACKUP your database. Don't say I didn't warn you. 1. Backup your Database 2. Reread step 1 3. Change your PHP version to be 5.3.x or higher 4. Go into myPhPAdmin and find table tblAdmins 5. Create an MD5 has of a temporary password want to use Or if you want to temporarly use the password test123 use the following hash: cc03e747a6afbbcbf8be7668acfebee5 6. Find your username entry and change the "Password" to your MD5 hash. 7. Clear out the contents of "Passwordhash" It MUST be blank for now. Once you change your password WHMCS will automatically recreate this. 8. Log in with the new password you generated with the MD5 has (or test123 if you used the hash above) 9. Change your password so that the system will update your password to the new format in the database 10. Profit?
-
Creating Page that only Paying Customers can see.
microbolt replied to EscalateSEO's topic in Developer Corner
Missing and } at the end for the if statement <?php define("CLIENTAREA",true); //define("FORCESSL",true); # Uncomment to force the page to use https:// require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="plr.php">PLR Products</a>'; initialiseClientArea($pagetitle,'',$breadcrumbnav); # To assign variables to the template system use the following syntax. # These can then be referenced using {$variablename} in the template. $smartyvalues["variablename"] = $value; # Check login status if ($_SESSION['uid']) { # User is logged in - put any code you like here # Here's an example to get the currently logged in clients first name $result = mysql_query("SELECT firstname FROM tblclients WHERE id=".(int)$_SESSION['uid']); $data = mysql_fetch_array($result); $clientname = $data[0]; $smartyvalues["clientname"] = $clientname; } else { # User is not logged in } # Define the template filename to be used without the .tpl extension $templatefile = "plr"; outputClientArea($templatefile); ?><?php define("CLIENTAREA",true); //define("FORCESSL",true); # Uncomment to force the page to use https:// require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $breadcrumbnav .= '<strong>Here is some info about this page.</strong>'; initialiseClientArea('','',$breadcrumbnav); # To assign variables to the template system use the following syntax. # These can then be referenced using {$variablename} in the template. $smartyvalues["variablename"] = $value; # Check login status if ($_SESSION['uid']) { # User is logged in - put any code you like here # Here's an example to get the currently logged in clients first name $result = mysql_query("SELECT firstname FROM tblclients WHERE id=".(int)$_SESSION['uid']); $data = mysql_fetch_array($result); $clientname = $data[0]; $smartyvalues["clientname"] = $clientname; } else { # User is not logged in } # Define the template filename to be used without the .tpl extension $templatefile = "plr"; outputClientArea($templatefile); ?><?php define("CLIENTAREA",true); //define("FORCESSL",true); # Uncomment to force the page to use https:// require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['clientareatitle']; $breadcrumbnav .= '<strong>InvisionProfits has over 100,000 PLR products available for you to download!</strong>'; initialiseClientArea('','',$breadcrumbnav); # To assign variables to the template system use the following syntax. # These can then be referenced using {$variablename} in the template. $smartyvalues["variablename"] = $value; # Check login status if ($_SESSION['uid']) { $query = "SELECT packageid, domainstatus FROM tblhosting WHERE userid=".$_SESSION['uid']." AND packageid IN ('1','2')"; $result = mysql_query($query); $good = false; while($row = mysql_fetch_array($result)) { if ($row['domainstatus'] == "Active") { $good = true; } } # To assign variables in Smarty use the following syntax. # This can then be used as {$variablename} in the template $smartyvalues["hasauth"] = $good; # Define the template filename to be used without the .tpl extension $templatefile = "plr"; outputClientArea($templatefile); [b]} #<---- Missing this brace[/b] ?> -
Only if your wanting to query information on them when their logged on. Like for instance: "Welcome back {Customer Name}"
-
Lol, I should of thought of doing that. I've done that before on another project I did for a customer. It should work. The only issue you may have if WHMCS is going to be in its own VPS then you might have problems sharing the DB with your main website. Probably will have to install WHMCS twice and point them to the same DB if on different servers.
-
Here's the code I have on my website. But, it won't work carry state across different subdomains. This assumes your installed in /clients <?php require("clients/dbconnect.php"); if ($_SESSION['uid']) { $query="SELECT * FROM tblclients WHERE id='" .sanitize($_SESSION['uid']) . "'"; $result = mysql_query($query) or die(mysql_error()); if($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $clientsdetails['firstname']=$row['firstname']; $clientsdetails['lastname']=$row['lastname']; $clientsdetails['email']=$row['email']; } echo "Welcome Back, <strong>".($row['firstname'])."</strong> <img src=\"/clients/templates/portal/images/icons/details.gif\" alt=\"My Details\" width=\"16\" height=\"16\" border=\"0\" class=\"absmiddle\" /> <a href=\"/clients/clientarea.php?action=details\" title=\"My Details\"><strong>My Details</strong></a> <img src=\"/clients/templates/portal/images/icons/logout.gif\" alt=\"Logout\" width=\"16\" height=\"16\" border=\"0\" class=\"absmiddle\" /> <a href=\"/clients/logout.php\" title=\"Logout\"><strong>Logout</strong></a>"; } else { echo "Please <a href=\"/clients/clientarea.php\" title=\"Login\"><strong>Login</strong></a> or <a href=\"/clients/register.php\" title=\"Register\"><strong>Register</strong></a>"; } ?>
-
Yep laszlof is right. And if the mods ever approve my first post I made a couple days here ago you can see the solution I use on my site. It must of picked up something in there as a URL and blocked it as potential spam, hehe.
-
I don't mind at all And I should say also that the sanitize function doesn't have to be in a separate file, it just makes the code a bit cleaner imo.
-
What I normally do is just create the product with quan 1 and set it as Hidden. Then I either answer the support ticket or email with the direct product link (under the links tab of product)
-
Yep, backup would be best, but you can reset the password to the WHMCS database if you dont know it and just repopulate the fields in the configuration.php. You shouldn't lose any data.
-
Didn't even realize when I posted it that it wasn't templated. Bit of a hack but I got it working. 1. Rename login.php to login2.php 2. Create new login.php with the following: <?php echo("<html><head><title>Your new title here</title>"); require("login2.php") ?> You might want to do the same to logout.php as well as it looks like its hardcoded too.
-
PayPal Website Payments Pro Vs Standard (USA)
microbolt replied to 00Dante's topic in Developer Corner
1. To best of my knowledge the buyer needs a PayPal account in order to do recurring payments (subscription) with PayPal Standard as they have to have a way to cancel the subscription and that can only be done on PayPal's Website. 2. Yes can do recurring payments with only PayPal Payments Pro. You don't need the recurring payment module, only the Payments Pro. ($30 total instead of $30 + $30) 3. WHMCS does NOT store the CVV code on the back of the card. You would need to in your PayPal settings (if your approved by PayPal) to not required the CVV code. PayPal lets some do this. It depends on if you was approved when you applied for your PayPal Payments Pro account. And yes you would need an SSL cert to be PCI compliant. -
Look under "admin/template/<current_template_your_using>/header.tpl" Then change inside the file <title>WHMCS - {$pagetitle}</title> to whatever you want it to be. Or better yet make a copy of the template to a new folder and make the changes there then choose the new admin theme in WHMCS (Home -> My Account) to the new directory you created and your changes will survive an upgrade.
-
Try this and see if it works. If it doesn't let us know any error messages that pop up: <?php require("client/dbconnect.php"); if ($_SESSION['uid']) { echo "Connecté"; } else { echo " <div id=\"login\"> <a href=\"#\" id=\"link\" class=\"signin\">Connexion</a> <form action=\"client/dologin.php\" method=\"post" class=\"drop\"> <label for=\"username\">Adresse courriel :</label> <input type=\"text\" name=\"username\" class=\"required\"/> <label for=\"password\">Mot de passe :</label> <input type=\"password\" name=\"password\" /> <p class=\"remember\"> <input type=\"checkbox\" class=\"checkbox\"/ name=\"rememberme\"> Se souvenir de moi</p> <input type=\"submit\" class=\"submit\" value=\"Login\" /> <p><a href=\"#\" class=\"tooltip\">Oublié votre mot de passe?<span>Cliquez ici pour le réinitialiser!</span></a></p> </form> </div> "; } ?> This is assuming your WHMCS install in under the folder "client"
-
The code you all are using is not safe and is vulnerable to SQL injection attack. You always want to sanitize any input provided by the user before passing it to MySQL. Cookie data is easily modified by an attacker. Add the following function to your code: <?php function sanitize($data) { // remove whitespaces (not a must though) $data = trim($data); // apply stripslashes if magic_quotes_gpc is enabled if(get_magic_quotes_gpc()) { $data = stripslashes($data); } // a mySQL connection is required before using this function $data = mysql_real_escape_string($data); return $data; } ?> I put it in a file called functions.php and include it in the header of all my pages: <?php require("functions.php"); ?> Then change your code to wrap the $_SESSION['uid'] in your query to be like: sanitize($_SESSION['uid']) $query="SELECT * FROM tblclients WHERE id='" .sanitize($_SESSION['uid']). "'"; Not doing this can lead to all you customer data leaking out and possibly even your server compromised.
