Jump to content

mfoland

Senior Member
  • Content count

    137
  • Joined

  • Last visited

  • Days Won

    3

mfoland last won the day on September 19

mfoland had the most liked content!

Community Reputation

8 Neutral

1 Follower

About mfoland

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I'm working on an Addon Module to store a License Key for an addon. I can have it verify the get the license key from the table.. but what I'm trying to do is figure out how to put a check_license within this: class License extends Model { /** @var string $table The table in which the addon settings are stored. (mod_mylicensetable) */ protected $table = 'mod_squareLicensing'; //protected function results($results); private $vString = "16da9d4d6fc1e1ec25ce622d59d3d34e2b147bed894296693492985d85d27868"; } $Licensedata = License::where('id', '1')->first( As such, I can get my License data as expected, however, within the Addon Module itself -- to ideally get everything, the check needs to be inside the Class. I'd like to do something like function verify_license { //--get information from original license call and do our actions for invalid or active } Can someone give me guidance? I'm new working with Laravel. I know how to do a license call with the default check_sample.php and have adapted that as needed, and have built upon it.. but working with the classes are new to me. Any help and pointers would be greatly appreciated 🙂
  2. mfoland

    Database Structure issue

    Well -- couldn't figure out the ajax part.. but I was able to make the autoupgrade.php like WHMCS has, however, to submit the data, you gotta click a submit button. WHMCS does not have that, and it's something they need to look into, since there's doesn't function right.
  3. mfoland

    Database Structure issue

    Sounds fun.. NOT lol. I did the above, and was able to create the enable_auto_upgrades. Now playing with ajax to see if I can have it auto change the db lol. <script> function getXMLHTTPRequest() { var req = false; try { /* for Firefox */ req = new XMLHttpRequest(); } catch (err) { try { /* for some versions of IE */ req = new ActiveXObject("Msxml2.XMLHTTP"); } catch (err) { try { /* for some other versions of IE */ req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (err) { req = false; } } } return req; } function updateToggle(obj,id){ obj.style.backgroundColor = '#cc0000'; var updReq = getXMLHTTPRequest(); var url = 'autoupgStatus.php'; var vars = 'id='+id+'&value='+obj.value; updReq.open('POST', url, true); updReq.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); updReq.onreadystatechange = function() { //Call a function when the state changes. if(updReq.readyState == 4 && updReq.status == 200) { if(updReq.responseText == 'N'){ obj.style.backgroundColor = '#cc8800'; }else{ if(obj.value == '1'){ obj.value = '0'; }else{ obj.value = '1'; } obj.src = updReq.responseText; obj.style.backgroundColor = '#0000cc'; } } } updReq.send(vars); } </script> Problem is, it's not working lol. I can go to the status page direct and change the value in the php code lol.. but the ajax part is being a twit! I even have the form with the onclick event.. and nerp.. it's not working lol. It changes to OFF or ON when you click respectively, but doesn't update the db as it should lol.
  4. mfoland

    Database Structure issue

    Changed DB structure temporarily: 54 created_at timestamp No CURRENT_TIMESTAMP Change Change Drop Drop More More 55 updated_at timestamp No CURRENT_TIMESTAMP Change Change Drop Drop More More 56 pwresetexpiry timestamp Yes NULL I have an open ticket at WHMCS too, we'll see what happens, and what they recommend.
  5. mfoland

    Database Structure issue

    I can't change my sql mode either, and I tried @brian!'s method, and it says the next field has the same issue. Tried changing them at the same time, and no go. lol. I have WHMCS working on it as well. Hope they can figure this mess out.
  6. mfoland

    Database Structure issue

    It's not even letting me update the db lol.
  7. mfoland

    Sell Software

    @caygri Awesome. You will need to set this up as a product in WHMCS. Also, I highly recommend that you use IonCube to protect your code. If you need assistance, you can DM me, and I'll be glad to offer up some help.
  8. mfoland

    Database Structure issue

    @Kian Here's the value for Created At 0000-00-00 00:00:00
  9. Hey all! I'm making a feature for my WHMCS for license auto upgrades, and I'm running into an error when adding to the database structure for tblclients. SQL query: ALTER TABLE `tblclients` ADD `enable_auto_upgrades` INT NOT NULL DEFAULT '0' AFTER `marketing_emails_opt_in` MySQL said: Documentation #1067 - Invalid default value for 'created_at' Can I get some guidance as to why I'd be getting the invalid default value when I'm just trying to add a custom field to the row. This specific field I don't want to show on the client details page, as I'm making a specific page for this.
  10. mfoland

    HTML and WHMCS Integration

    Beautifully done!
  11. mfoland

    API getProducts

    What exactly are you trying to use this on? I actually use this with the WHMCS Licensing Addon.
  12. Hello, I'm wanting to get everyone's thought on this. With the Licensing Addon, expired licenses just sit in the database. Is there any way that could be feasible to have this auto prune and remove from the database after they expire? I did create a topic on the requests page, but would love to know your thoughts! https://requests.whmcs.com/topic/auto-prune-expired-license-keys-in-licensing-addon Thanks!
  13. I think making the user number longer would benefit if you were sending the invoice off to collection company, etc if your company did that. Unless you were to keep the user ID normal, and add a custom field with some random numbers through php... Just a thought.
  14. I haven't had an issue yet, but that would suck royally. I have seen some sites using it without a license lol, and actually having a nulled whmcs too lol. Maybe WHMCS should more open source their software, OR improve upon the data feeds and API. You can EASILY use the API to code some php into your wordpress site quite simply 🙂
  15. Let me know if you need assistance 🙂
×

Important Information

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