Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/25/2016 in all areas

  1. This option is already available mate. In the client's profile, Next to "Auto Suspension" Click on the calendar icon.
    2 points
  2. Hi, really interested with blesta, reasonable price but rich features i was running two hosting business before, - 'closed-market' hosting for my relatives and family using kloxomr as hosting control panel and no billing system - regular hosting service for everyone using cpanel and boxbilling i want to move both my business to blesta (currently i'm using trial version of blesta since last night), but i found some problems here 1. how to move my existing clients from boxbilling to blesta? can't find any modules/plugins. i found that blesta has import manager plugin but only for whmcs 5.2 and blesta 2.5, not from boxbilling 2. how to sync my existing clients in cpanel? i tried to create the same username, same domain, same email and same package but blesta couldn't sync existing account. i had to delete existing account from cpanel and re-create from blesta. is there any simple method? 3. where is kloxo/lxadmin module? i found this thread from old lxadmin forum, http://forum.lxcenter.org/index.php?t=msg&th=14144& it shows blesta kloxo integration module but i cant find it in available modules page thanks
    1 point
  3. Paul

    Question About Stripe Payments

    If you disable credit card payments, they will not have access to create or manage credit card payment accounts. I *think* this would also prevent auto-debit from running on their existing payment account, but I could be wrong. Staff can continue to manage these if it's disabled.
    1 point
  4. Paul

    Question About Stripe Payments

    If the client has auto-debit enabled, and the payment account selected for auto-debit Blesta will automatically initiate a charge with Stripe every month (or whatever the term is).
    1 point
  5. Paul

    License Validations

    Thanks for the offer, but I think it would require certain knowledge about how our licensing is implemented. We have several license types, including trials, etc that would all need to be checked. I'm sure it wouldn't be very difficult to implement, it's just a matter of finding the time to do it. If you want to take a stab at it anyway and send it over, we'll take a look at it and see if it'll work. Do you have a copy of the license plugin/module already? We were planning to implement this feature as a plugin that can be accessed via the portal like the download manager, support, order, etc. It'd just be a box to enter the hostname and return the result. Cheers, Paul
    1 point
  6. it a one class file ... this is the content <?php /******************************************************************************* @name Kloxo Module (AKA LXAdmin) @author Cody Phillips @date May 12, 2009 @version 1.0 @notes For use with Blesta version 1.0.0+ *******************************************************************************/ class kloxo implements ModuleInterface { private static $module; public function __construct() { // Adds a new Kloxo that can be added, edited, or deleted self::$module = new Module("kloxo", true, true, true); // Adds the given fields to the database for this module if it has not already // been created. WARNING: if the module has already been created with the name // given in the Module constructor you must delete the old module before the // new one will be created. This may have an adverse effect on services. self::$module->addDBField("varchar(255)", "server", "Server"); self::$module->addDBField("varchar(255)", "dnstemplate", "DNS Template"); self::$module->addDBField("varchar(255)", "user", "User Name"); self::$module->addDBField("varchar(255)", "password", "Password"); self::$module->addDBField("varchar(5)", "usessl", "Use SSL", "false"); self::$module->addDBField("int(11)", "max", "Limit", "0"); self::$module->addDBField("int(11)", "cur", "Current", "0"); // Options for creating a new module row // Example: Kloxo module may store multiple different servers. The HTML Fields below // allow you to create/edit a server for the Kloxo module // NOTE: The HTML Fields will appear in the order defined here on the module setup/edit pages self::$module->addModuleHTMLField("text", "Server", "server"); self::$module->addModuleHTMLField("text", "DNS Template", "dnstemplate"); self::$module->addModuleHTMLField("text", "User Name", "user"); self::$module->addModuleHTMLField("text", "Password", "password"); self::$module->addModuleHTMLField("select", "Use SSL", "usessl"); self::$module->addModuleHTMLSelectOption("usessl", "Yes", "true"); self::$module->addModuleHTMLSelectOption("usessl", "No", "false"); self::$module->addModuleHTMLField("text", "Account Limit", "max", "^[0-9]+", "Account Limit must be an integer."); self::$module->addModuleHTMLField("text", "Current Accounts", "cur", "^[0-9]+", "Current Accounts must be an integer."); // Module Options while creating a package with this module // NOTE: Only one field is accepted of this type and must be named "mstring" self::$module->addPackageHTMLField("text", "Plan Name", "mstring", "^(.)+$", "You must enter a plan name."); // This adds a note to be displayed along with the above package field self::$module->addPackageNote("mstring", "Plan Name (ex. bronze)"); // Specify which field from the module table to display in the drop down and give it a friendly name // By default items will be shown by ID and have the friendly name of "Module ID". // This appears when adding or editing a service for a user. self::$module->setModuleRowSelect("DNS Template", "dnstemplate"); // These are shown as column names for each service of this type. self::$module->addServiceColumn("user1", "Domain"); self::$module->addServiceColumn("user2", "Username"); self::$module->addServiceColumn("pass", "Password"); self::$module->addServiceColumn("dnstemplate", "DNS Template"); // These are displayed as tags and are usable when creating/editing a package's welcome e-mail self::$module->addServiceTag("user1", "domain"); self::$module->addServiceTag("user2", "username"); self::$module->addServiceTag("pass", "pass"); self::$module->addServiceTag("term", "term"); // These are the fields that may be edited when performing a local edit on this service self::$module->addServiceEditField("user1", "Domain"); self::$module->addServiceEditField("user2", "Username"); // Client username self::$module->addServiceEditField("pass", "Password"); self::$module->addServiceEditField("plan", "Package/Term"); // Package/Term self::$module->addServiceEditField("dnstemplate", "DNS Template"); self::$module->addServiceEditField("dated", "Date Deleted"); self::$module->addServiceEditField("datep", "Date Suspended"); self::$module->addServiceEditField("dater", "Date Renews"); self::$module->addServiceEditField("notes", "Notes"); // Fields that are shown to the admins when adding a service that uses this module. self::$module->addServiceHTMLField("text", "Domain Name", "user1", "^[a-z0-9._%-]+\.[a-z]{2,6}$", "The domain you entered does not appear to be valid. It should be lowercase and in the format: domain.com."); self::$module->addServiceHTMLField("text", "Password", "pass", "^.{4,16}$", "Passwords must be between 4 and 16 characters."); // Fields that are shown to the user when adding a service that uses this module. self::$module->addUserServiceHTMLField("text", "Domain Name", "user1", "^[a-z0-9._%-]+\.[a-z]{2,6}$", "The domain you entered does not appear to be valid. It should be lowercase and in the format: domain.com."); self::$module->addUserServiceHTMLField("text", "Password", "pass", "^.{4,16}$", "Passwords must be between 4 and 16 characters."); // Creates the module, adds the module to the database if the module table does not // already exist. WARNING: if a module has already been created and you attempt to // add additional fields they WILL NOT BE ADDED, and any refrence to those fields // WILL RESULT IN AN ERROR. self::$module->createModule(); } /** * Returns the module object, this function MUST be present */ public function getModule() { return self::$module; } /** * This is the MAGIC function. This function automatically creates a service * for a user. * * IT MUST BE DEFINED HERE OR AN E-MAIL WILL BE SENT TO ALL SUBSCRIBED ADMINS * NOTIFYING THEM THAT THE SERVICE MUST BE MANUALLY CREATED. * * IF THIS FUNCTION IS DEFINED AND RETURNS TRUE IT IS ASSUMED THAT IT PERFORMS * THE NECCESSARY ACTIONS TO AUTOMATICALLY ACTIVATE THE SERVICE. */ public function promodule($action, $serviceInfo, $packageInfo) { // packageInfo comes from packagesetinfos() function $plan = $packageInfo[4][2]; $conditions = array(array("field" => "id", "value" => $serviceInfo['mid'])); $data = self::$module->getRows($conditions); $serviceInfo['dnstemplate'] = $data[0]['dnstemplate']; $serviceInfo['plan'] = $plan; switch ($action) { case "add": // Ensure we do not exceed the maximum number of accounts for this server. if ($data[0]['cur'] >= $data[0]['max']) return false; $serviceInfo['user2'] = self::makeUserName($serviceInfo['user1']); if (DEMO) return $serviceInfo; elseif ($this->addClient($serviceInfo, $data)) { // Update the current number of accounts on this server self::$module->updateDBFields("cur", $data[0]['cur']+1, $serviceInfo['mid']); return $serviceInfo; // return the info that we want to be inserted into the services table } break; case "remove": if (DEMO) return true; elseif ($this->removeClient($serviceInfo['user2'], $data)) { // Update the current number of accounts on this server self::$module->updateDBFields("cur", $data[0]['cur']-1, $serviceInfo['mid']); return true; } break; case "suspend": if (DEMO) return true; return $this->suspendClient($serviceInfo['user2'], $data); break; case "unsuspend": if (DEMO) return true; return $this->unsuspendClient($serviceInfo['user2'], $data); break; } return false; } /** * Add a client to the VPS system * */ private function addClient(&$serviceInfo, &$data) { $params = array(); $params['login-class'] = "client"; $params['login-name'] = $data[0]['user']; $params['login-password'] = $data[0]['password']; $params['output-type'] = "json"; $params['class'] = "client"; $params['name'] = $serviceInfo['user2']; $params['action'] = "add"; $params['v-password'] = $serviceInfo['pass']; $params['v-type'] = "customer"; $params['v-plan_name'] = $serviceInfo['plan']; $params['v-domain_name'] = $serviceInfo['user1']; $params['v-dnstemplate_name'] = $serviceInfo['dnstemplate']; return $this->request($data[0]['server'], $data[0]['usessl'], $params); } /** * Remove a client from the VPS system * */ private function removeClient(&$username, &$data) { $params = array(); $params['login-class'] = "client"; $params['login-name'] = $data[0]['user']; $params['login-password'] = $data[0]['password']; $params['output-type'] = "json"; $params['class'] = "client"; $params['name'] = $username; $params['action'] = "delete"; return $this->request($data[0]['server'], $data[0]['usessl'], $params); } /** * Suspend a client on the VPS system * */ private function suspendClient(&$username, &$data) { $params = array(); $params['login-class'] = "client"; $params['login-name'] = $data[0]['user']; $params['login-password'] = $data[0]['password']; $params['output-type'] = "json"; $params['class'] = "client"; $params['name'] = $username; $params['action'] = "update"; $params['subaction'] = "disable"; return $this->request($data[0]['server'], $data[0]['usessl'], $params); } /** * Unsuspend a client on the VPS system * */ private function unsuspendClient(&$username, &$data) { $params = array(); $params['login-class'] = "client"; $params['login-name'] = $data[0]['user']; $params['login-password'] = $data[0]['password']; $params['output-type'] = "json"; $params['class'] = "client"; $params['name'] = $username; $params['action'] = "update"; $params['subaction'] = "enable"; return $this->request($data[0]['server'], $data[0]['usessl'], $params); } /* * Prepares and executes a CURL request that performs Kloxo API request * @return response */ private function request($host, &$usessl, &$params) { // Log data received from Kloxo self::$module->logData($params, "input", true); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "http" . ($usessl == "true" ? "s" : "") . "://" . $host . "/webcommand.php"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params)); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); $response = (array)json_decode(curl_exec($ch)); curl_close($ch); // Log data received from Kloxo self::$module->logData($response, "output", ($response['return'] == "success" ? true : false)); if ($response['return'] == "success") return true; return false; } // Creates a username that is between 5 and 8 characters long // Usernames that are generated randomly are 7 characters in length private static function makeUserName($domain) { // Remove everything except letters from the domain $temp = preg_replace('/[^a-zA-Z]/', '', $domain); // If what we have left to build the username is less than 5 characters // add in some random characters to create a unique username. if (strlen($temp) < 5) { // Add 3-random characters followed by the rest of temp. $chars = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t', 'u','v','w','x','y','z'); $count = count($chars) - 1; for ($i=0; $i<3; $i++) $temp = $chars[rand(0, $count)] . $temp; } return substr($temp, 0, 8); } } ?>
    1 point
  7. Hello jobplease, I have tested and it dosent send any sttachment if you send a ticket to a client. The client has to login to see the attachment. I will try to implement the feature to send the attachment to a client wen Blesta 4.0 release to update the Support Manager Pro with the latest fixes from Blesta Support Manager Core. Regardss, PV
    1 point
  8. After many posts regarding problems I was having with Blesta, I am proud to announce that Stacktron has been completed and we are ready to take orders! We integrated the site with Blesta using a custom theme. It took me about 2 weeks to get the website 100% ready, and believe me that was crucial XD https://www.stacktron.net is the URL!
    1 point
  9. That seems to make more sense, updated my comment. Billing > Cancellation Requests
    1 point
×
×
  • Create New...