* other person. No title to and ownership of the software is hereby * transferred. * * * ******************************************************************** */ /** * @author Maciej Husak <*****@*****.**> */ if (!defined("WHMCS")) { die("This file cannot be accessed directly"); } $api = new spamexperts_api($params, true); if (isset($_POST['_action'])) { switch ($_POST['_action']) { case 'unbind': $api->call('/auth/getrole/'); $role = $api->getResponse(); if ($role['result'] == 'admin') { $api->call('/reseller/unbinddomains/username/' . $params['username'] . '/domains/' . $_POST['unbind-domain'] . '/'); } else { $api->call('/domain/remove/domain/' . $_POST['unbind-domain'] . '/'); } if ($api->isSuccess()) { $vars['_status'] = array('code' => 1, 'msg' => $vars['lang']['domain_unbinded']); } else { $vars['_status'] = array('code' => 0, 'msg' => $api->error()); } break; case 'bind': $api->call('/auth/getrole/'); $role = $api->getResponse();
/** * FUNCTION spamexpertsreseller_ClientArea * Display extended pages in clientarea * @params array * @return array */ function spamexpertsreseller_ClientArea($params) { global $smarty; include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'class.connection.php'; $lang = spamexpertsreseller_getLang($params); $api = new spamexperts_api($params); $api->call("authticket/create/username/" . $params['username'] . "/"); if ($api->isSuccess()) { $res = $api->getResponse(); $auth = $res['result']; } if (strpos($params['configoption1'], 'http') === false) { $url = 'http://' . $params['configoption1']; } else { $url = $params['configoption1']; } $smarty->assign('api_url', $url . '/?authticket=' . $auth); $smarty->assign('lang', $lang['mainsite']); }