diff --git a/application/bootstrap.php b/application/bootstrap.php index 4d4a646e..abe98816 100644 --- a/application/bootstrap.php +++ b/application/bootstrap.php @@ -118,12 +118,12 @@ Kohana::modules(array( /** * Load our modules defined in the DB */ -Kohana::modules(array_merge(Kohana::modules(),Config::appmodules())); +Kohana::modules(array_merge(Kohana::modules(),Config::modules())); /** * Enable specalised interfaces */ -Route::set('sections', '/(/(/(/)))', +Route::set('sections', '//((/(/)))', array( 'directory' => '('.implode('|',Kohana::config('config.method_directory')).')' )); diff --git a/modules/account/classes/auth/osb.php b/application/classes/auth/osb.php similarity index 96% rename from modules/account/classes/auth/osb.php rename to application/classes/auth/osb.php index 132e8a42..6fa762b2 100644 --- a/modules/account/classes/auth/osb.php +++ b/application/classes/auth/osb.php @@ -226,13 +226,15 @@ class Auth_OSB extends Auth_ORM { if (count($session_change_trigger) AND (session_id() != $oldsess)) { foreach ($session_change_trigger as $t => $c) { - $orm = ORM::factory($t) - ->where($c,'=',$oldsess); + if (Config::moduleexist($c)) { + $orm = ORM::factory($t) + ->where($c,'=',$oldsess); - // @todo There must be a way that ORM can update multiple records with 1 SQL - foreach ($orm->find_all() as $o) - $o->set('session_id',session_id()) - ->update(); + // @todo There must be a way that ORM can update multiple records with 1 SQL + foreach ($orm->find_all() as $o) + $o->set('session_id',session_id()) + ->update(); + } } } diff --git a/application/classes/company.php b/application/classes/company.php index 5184b52c..5ac0b385 100644 --- a/application/classes/company.php +++ b/application/classes/company.php @@ -1,14 +1,14 @@ where('status','=',1)->find_all()->as_array(); + if (! count($return)) + foreach (ORM::factory('module')->where('status','=',1)->find_all() as $mo) + $return[$mo->name] = MODPATH.$mo->name; - foreach ($mo as $o) - $modules[$o->name] = MODPATH.$o->name; - } + return $return; + } - return $modules; + public static function moduleexist($module) { + return array_key_exists($module,static::modules()) ? TRUE : FALSE; } } ?> diff --git a/modules/account/classes/controller/account.php b/application/classes/controller/account.php similarity index 100% rename from modules/account/classes/controller/account.php rename to application/classes/controller/account.php diff --git a/application/classes/controller/admin/welcome.php b/application/classes/controller/admin/welcome.php index 4fbb5639..9966a52c 100644 --- a/application/classes/controller/admin/welcome.php +++ b/application/classes/controller/admin/welcome.php @@ -32,7 +32,8 @@ class Controller_Admin_Welcome extends Controller_TemplateDefault { 'due_date'=>array('label'=>'Due Date'), 'account->name()'=>array('label'=>'Account'), 'account->display("status")'=>array('label'=>'Active'), - 'id()'=>array('label'=>'ID'), + 'id'=>array('label'=>'ID','url'=>'user/invoice/view/'), + 'total_amt'=>array('label'=>'Total','class'=>'right'), 'due(TRUE)'=>array('label'=>'Amount Due','class'=>'right'), ), array('page'=>TRUE)), @@ -49,7 +50,8 @@ class Controller_Admin_Welcome extends Controller_TemplateDefault { 'due_date'=>array('label'=>'Due Date'), 'account->name()'=>array('label'=>'Account'), 'account->display("status")'=>array('label'=>'Active'), - 'id()'=>array('label'=>'ID'), + 'id'=>array('label'=>'ID','url'=>'user/invoice/view/'), + 'total_amt'=>array('label'=>'Total','class'=>'right'), 'due(TRUE)'=>array('label'=>'Amount Due','class'=>'right'), ), array('page'=>TRUE)), @@ -60,13 +62,14 @@ class Controller_Admin_Welcome extends Controller_TemplateDefault { Block_Sub::add(array( 'title'=>'Invoices Due', 'body'=>Table::display( - $o->list_due($t), + $o->list_due(), 25, array( 'due_date'=>array('label'=>'Due Date'), 'account->name()'=>array('label'), 'account->display("status")'=>array('label'=>'Active'), - 'id()'=>array('label'=>'ID'), + 'id'=>array('label'=>'ID','url'=>'user/invoice/view/'), + 'total_amt'=>array('label'=>'Total','class'=>'right'), 'due(TRUE)'=>array('label'=>'Amount Due','class'=>'right'), ), array('show_other'=>'due()')), @@ -83,9 +86,10 @@ class Controller_Admin_Welcome extends Controller_TemplateDefault { $o->list_unapplied(), 25, array( - 'id'=>array('label'=>'ID'), + 'date_payment'=>array('label'=>'Pay Date'), 'account->name()'=>array('label'=>'Account'), 'account->display("status")'=>array('label'=>'Active'), + 'id'=>array('label'=>'ID','url'=>'user/payment/view/'), 'total_amt'=>array('label'=>'Total','class'=>'right'), 'balance(TRUE)'=>array('label'=>'Balance','class'=>'right'), ), diff --git a/application/classes/controller/lnapp/templatedefault.php b/application/classes/controller/lnapp/templatedefault.php index 88391da7..9a253b4d 100644 --- a/application/classes/controller/lnapp/templatedefault.php +++ b/application/classes/controller/lnapp/templatedefault.php @@ -152,6 +152,15 @@ abstract class Controller_lnApp_TemplateDefault extends Controller_Template { $this->meta->title = Kohana::Config('config.appname'); $this->template->title = ''; + // Language + $this->meta->language = Config::instance()->so->language_id; + + // Copyright + $this->meta->copywrite = Config::instance()->so->site_name; + + // Copyright + $this->meta->description = sprintf('%s::%s',$this->request->controller(),$this->request->action()); + // Style Sheets Properties $this->meta->styles = Style::factory(); diff --git a/application/classes/controller/templatedefault.php b/application/classes/controller/templatedefault.php index 881ed40c..36203805 100644 --- a/application/classes/controller/templatedefault.php +++ b/application/classes/controller/templatedefault.php @@ -39,7 +39,7 @@ class Controller_TemplateDefault extends Controller_lnApp_TemplateDefault { } private function _cart() { - if (! class_exists('cart') OR ! Cart::instance()->contents()->reset(FALSE)->count_all()) + if (! Config::moduleexist('cart') OR ! class_exists('cart') OR ! Cart::instance()->contents()->reset(FALSE)->count_all()) return ''; return Cart::instance()->cart_block(); diff --git a/application/classes/controller/templatedefault/affiliate.php b/application/classes/controller/templatedefault/affiliate.php index ef428dc7..14de941a 100644 --- a/application/classes/controller/templatedefault/affiliate.php +++ b/application/classes/controller/templatedefault/affiliate.php @@ -11,5 +11,20 @@ * @license http://dev.leenooks.net/license.html */ class Controller_TemplateDefault_Affiliate extends Controller_TemplateDefault_User { + /** + * This will filter a search query to only return the affiliates + */ + protected function filter($o,$af,$sort='account->name()',$afid='affiliate_id') { + $result = array(); + + foreach ($o as $x) + if ($x->$afid == $af) + array_push($result,$x); + + if ($sort) + Sort::MAsort($result,$sort); + + return $result; + } } ?> diff --git a/application/classes/controller/tree.php b/application/classes/controller/tree.php index fbf61f2a..f397bbbc 100644 --- a/application/classes/controller/tree.php +++ b/application/classes/controller/tree.php @@ -35,7 +35,7 @@ class Controller_Tree extends Controller_lnApp_Tree { if ($mmo->menu_display AND empty($modules[$mmo->module_id])) $modules[$mmo->module_id] = $mmo->module; - Sort::masort($modules,'name'); + Sort::MAsort($modules,'name'); foreach ($modules as $id => $mo) if (! $mo->parent_id) @@ -52,7 +52,7 @@ class Controller_Tree extends Controller_lnApp_Tree { if ($user->has_any('group',$gmo->list_childgrps(TRUE))) $methods[$mmo->id] = $mmo; - Sort::masort($modules,'name'); + Sort::MASort($modules,'name'); foreach ($methods as $id => $mmo) { if (preg_match('/_/',$mmo->name)) { diff --git a/modules/account/classes/controller/user/account.php b/application/classes/controller/user/account.php similarity index 100% rename from modules/account/classes/controller/user/account.php rename to application/classes/controller/user/account.php diff --git a/modules/country/classes/country.php b/application/classes/country.php similarity index 100% rename from modules/country/classes/country.php rename to application/classes/country.php diff --git a/modules/currency/classes/currency.php b/application/classes/currency.php similarity index 100% rename from modules/currency/classes/currency.php rename to application/classes/currency.php diff --git a/application/classes/lnapp/config.php b/application/classes/lnapp/config.php index a373084a..f9b23b2c 100644 --- a/application/classes/lnapp/config.php +++ b/application/classes/lnapp/config.php @@ -92,7 +92,7 @@ abstract class lnApp_Config extends Kohana_Config { * Show a date using a site configured format */ public static function date($date) { - return date(Kohana::config('config.date_format'),$date); + return $date ? date(Kohana::config('config.date_format'),$date) : '>Not Set<'; } /** diff --git a/application/classes/lnapp/sort.php b/application/classes/lnapp/sort.php index c490f054..603cf99a 100644 --- a/application/classes/lnapp/sort.php +++ b/application/classes/lnapp/sort.php @@ -20,75 +20,64 @@ class lnApp_Sort { * @param boolean Whether to reverse sort. * @return array Sorted multi demension array. */ - public static function masort(&$data,$sortby,$rev=0) { - // if the array to sort is null or empty - if (! $data) + public static function MAsort(&$data,$sortby,$rev=0) { + // if the array to sort is null or empty, or our sortby is bad + if (! preg_match('/^[a-zA-Z0-9_]+(\([a-zA-Z0-9_,]*\))?$/',$sortby) || ! $data) return; - $code = "\$c=0;\n"; + $code = '$c=0;'; foreach (explode(',',$sortby) as $key) { - $code .= "if (is_object(\$a) || is_object(\$b)) {\n"; + $code .= 'if (is_object($a) || is_object($b)) {'; + foreach (array('a','b') as $x) { + $code .= 'if (is_array($'.$x.'->'.$key.')) {'; + $code .= 'asort($'.$x.'->'.$key.');'; + $code .= '$x'.$x.' = array_shift($'.$x.'->'.$key.');'; + $code .= '} else'; + $code .= '$x'.$x.' = $'.$x.'->'.$key.';'; + } - $code .= " if (is_array(\$a->$key)) {\n"; - $code .= " asort(\$a->$key);\n"; - $code .= " \$aa = array_shift(\$a->$key);\n"; - $code .= " } else\n"; - $code .= " \$aa = \$a->$key;\n"; - - $code .= " if (is_array(\$b->$key)) {\n"; - $code .= " asort(\$b->$key);\n"; - $code .= " \$bb = array_shift(\$b->$key);\n"; - $code .= " } else\n"; - $code .= " \$bb = \$b->$key;\n"; - - $code .= " if (\$aa != \$bb)"; + $code .= 'if ($xa != $xb)'; if ($rev) - $code .= " return (\$aa < \$bb ? 1 : -1);\n"; + $code .= 'return ($xa < $xb ? 1 : -1);'; else - $code .= " return (\$aa > \$bb ? 1 : -1);\n"; + $code .= 'return ($xa > $xb ? 1 : -1);'; - $code .= "} else {\n"; + $code .= '} else {'; - $code .= " \$a = array_change_key_case(\$a);\n"; - $code .= " \$b = array_change_key_case(\$b);\n"; + foreach (array('a','b') as $x) + $code .= '$'.$x.' = array_change_key_case($'.$x.');'; $key = strtolower($key); - $code .= " if ((! isset(\$a['$key'])) && isset(\$b['$key'])) return 1;\n"; - $code .= " if (isset(\$a['$key']) && (! isset(\$b['$key']))) return -1;\n"; + $code .= 'if ((! isset($a[\''.$key.'\'])) && isset($b[\''.$key.'\'])) return 1;'; + $code .= 'if (isset($a[\''.$key.'\']) && (! isset($b[\''.$key.'\']))) return -1;'; - $code .= " if ((isset(\$a['$key'])) && (isset(\$b['$key']))) {\n"; - $code .= " if (is_array(\$a['$key'])) {\n"; - $code .= " asort(\$a['$key']);\n"; - $code .= " \$aa = array_shift(\$a['$key']);\n"; - $code .= " } else\n"; - $code .= " \$aa = \$a['$key'];\n"; + $code .= 'if ((isset($a[\''.$key.'\'])) && (isset($b[\''.$key.'\']))) {'; + foreach (array('a','b') as $x) { + $code .= 'if (is_array($'.$x.'[\''.$key.'\'])) {'; + $code .= 'asort($'.$x.'[\''.$key.'\']);'; + $code .= '$x'.$x.' = array_shift($'.$x.'[\''.$key.'\']);'; + $code .= '} else'; + $code .= '$x'.$x.' = $'.$x.'[\''.$key.'\'];'; + } - $code .= " if (is_array(\$b['$key'])) {\n"; - $code .= " asort(\$b['$key']);\n"; - $code .= " \$bb = array_shift(\$b['$key']);\n"; - $code .= " } else\n"; - $code .= " \$bb = \$b['$key'];\n"; - - $code .= " if (\$aa != \$bb)\n"; - $code .= " if (is_numeric(\$aa) && is_numeric(\$bb)) {\n"; + $code .= 'if ($xa != $xb)'; + $code .= 'if (is_numeric($xa) && is_numeric($xb)) {'; if ($rev) - $code .= " return (\$aa < \$bb ? 1 : -1);\n"; + $code .= 'return ($xa < $xb ? 1 : -1);'; else - $code .= " return (\$aa > \$bb ? 1 : -1);\n"; + $code .= 'return ($xa > $xb ? 1 : -1);'; - $code .= " } else {\n"; + $code .= '} else {'; if ($rev) - $code .= " if ( (\$c = strcasecmp(\$bb,\$aa)) != 0 ) return \$c;\n"; + $code .= 'if (($c = strcasecmp($xb,$xa)) != 0) return $c;'; else - $code .= " if ( (\$c = strcasecmp(\$aa,\$bb)) != 0 ) return \$c;\n"; + $code .= 'if (($c = strcasecmp($xa,$xb)) != 0) return $c;'; - $code .= " }\n"; - $code .= " }\n"; - $code .= "}\n"; + $code .= '}}}'; } $code .= 'return $c;'; diff --git a/application/classes/lnapp/table.php b/application/classes/lnapp/table.php index 03aa3404..eac4afa3 100644 --- a/application/classes/lnapp/table.php +++ b/application/classes/lnapp/table.php @@ -201,7 +201,7 @@ $(document).ready(function() { break; } - if ($pag OR ($i++ < $rows)) { + if ($pag OR ($i++ < $rows) OR is_null($rows)) { foreach (array_keys($cols) as $col) $td[$col]['value'] = Table::resolve($do,$col); diff --git a/modules/account/classes/model/account.php b/application/classes/model/account.php similarity index 100% rename from modules/account/classes/model/account.php rename to application/classes/model/account.php diff --git a/modules/account/classes/model/account/log.php b/application/classes/model/account/log.php similarity index 100% rename from modules/account/classes/model/account/log.php rename to application/classes/model/account/log.php diff --git a/modules/account/classes/model/auth/roledefault.php b/application/classes/model/auth/roledefault.php similarity index 100% rename from modules/account/classes/model/auth/roledefault.php rename to application/classes/model/auth/roledefault.php diff --git a/modules/account/classes/model/auth/userdefault.php b/application/classes/model/auth/userdefault.php similarity index 100% rename from modules/account/classes/model/auth/userdefault.php rename to application/classes/model/auth/userdefault.php diff --git a/application/classes/model/country.php b/application/classes/model/country.php new file mode 100644 index 00000000..2f8c908d --- /dev/null +++ b/application/classes/model/country.php @@ -0,0 +1,15 @@ + diff --git a/modules/group/classes/model/group.php b/application/classes/model/group.php similarity index 100% rename from modules/group/classes/model/group.php rename to application/classes/model/group.php diff --git a/application/classes/model/setup.php b/application/classes/model/setup.php new file mode 100644 index 00000000..04d6acd8 --- /dev/null +++ b/application/classes/model/setup.php @@ -0,0 +1,21 @@ +array('foreign_key'=>'id','far_key'=>'country_id'), + ); +} +?> diff --git a/application/classes/sort.php b/application/classes/sort.php index cccb437e..d4445671 100644 --- a/application/classes/sort.php +++ b/application/classes/sort.php @@ -1,4 +1,4 @@ diff --git a/application/config/auth.php b/application/config/auth.php index c061cf37..4e3ed489 100644 --- a/application/config/auth.php +++ b/application/config/auth.php @@ -1,9 +1,10 @@ array - ( +return array ( + 'file' => array ( 'driver' => 'file', 'cache_dir' => Kohana::$cache_dir ? Kohana::$cache_dir : '/dev/shm/lnapp', 'default_expire' => 3600, diff --git a/application/config/config.php b/application/config/config.php index b1594727..46590ba1 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -1,9 +1,10 @@ 'default', ); diff --git a/application/config/pagination.php b/application/config/pagination.php index 889da06d..3dd178a7 100644 --- a/application/config/pagination.php +++ b/application/config/pagination.php @@ -1,15 +1,24 @@ - array( - 'current_page' => array('source' => 'query_string', 'key' => 'page'), // source: "query_string" or "route" + 'current_page' => array('source' => 'query_string', 'key' => 'page'), 'total_items' => 0, 'items_per_page' => 20, 'view' => 'pagination/floating', 'auto_hide' => TRUE, 'first_page_in_url' => FALSE, ), - ); +?> diff --git a/application/media/img/country/au.png b/application/media/img/country/au.png new file mode 100644 index 00000000..b20b0480 Binary files /dev/null and b/application/media/img/country/au.png differ diff --git a/modules/account/views/account/password_reset.php b/application/views/account/password_reset.php similarity index 100% rename from modules/account/views/account/password_reset.php rename to application/views/account/password_reset.php diff --git a/modules/account/views/account/user/edit.php b/application/views/account/user/edit.php similarity index 100% rename from modules/account/views/account/user/edit.php rename to application/views/account/user/edit.php diff --git a/modules/account/views/register.php b/application/views/register.php similarity index 100% rename from modules/account/views/register.php rename to application/views/register.php diff --git a/modules/account/account_construct.xml b/modules/account/account_construct.xml deleted file mode 100644 index cdb985dc..00000000 --- a/modules/account/account_construct.xml +++ /dev/null @@ -1,306 +0,0 @@ - - - - account - - account
- - - - 0 - - last_name - - 25 - - 1 - - - - username,password - first_name,middle_name,last_name - company - email - affiliate_id - campaign_id - country_id - city,state - city - state - zip - id,site_id - first_name,last_name,email,company - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - I8 - date - Date Expire - - - I4 - Parent Account - - - C(32) - Language - - - I4 - Country - - - I4 - - - I4 - - - I4 - - - I4 - Currency - - - C(32) - Theme - - - C(128) - 4 - 128 - any - 1 - 1 - User Name - - - C(128) - 6 - 128 - password - md5 - Password - - - - C2(128) - - - - Active - I4 - - - C(128) - 1 - 128 - any - 1 - First Name - - - C(128) - Middle Name - - - C(128) - 1 - 128 - any - 1 - Last Name - - - <type>C(128)</type> - <display>Title</display> - - - C(255) - 4 - 128 - email - 1 - 1 - Email - - - C(255) - Company - - - C(128) - 3 - 128 - any - Address - - - C(128) - 128 - Address - - - C(32) - 2 - 32 - any - City - - - C(32) - 2 - 32 - any - State - - - C(16) - 4 - 16 - any - Postal Code - - - L - HTML Email - - - I4 - Invoice Delivery - - - L - 1 - Show Itemised Invoice - - - I4 - Invoice Grace Period - - - I4 - Invoice Advance Generation - - - C(64) - Tax ID - - - I4 - Max Children - - - - I4 - Net Terms - - - - - - date_orig,date_last,language_id,country_id,affiliate_id,reseller_id,campaign_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id,invoice_delivery,invoice_show_itemized,invoice_grace - id,date_orig,date_last,language_id,country_id,affiliate_id,reseller_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id - id,parent_id,date_last,language_id,country_id,affiliate_id,reseller_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id,max_child - id - search,date_expire,language_id,country_id,currency_id,theme_id,username,password,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip - id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,invoice_delivery,invoice_show_itemized,invoice_grace,invoice_advance_gen,tax_id,max_child - id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,invoice_delivery,invoice_show_itemized,invoice_grace,invoice_advance_gen,tax_id,max_child - id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,invoice_delivery,invoice_show_itemized,invoice_grace,invoice_advance_gen,tax_id,max_child - id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,tax_id,max_child - language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id - language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id - language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id - language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id - - - - - - account:add_account_groups - - - account:update_account_groups - - - - - - <add>Register User Account</add> - <mail_one>Send Email to User</mail_one> - <merge>Merge User Accounts</merge> - <search_form>Search</search_form> - <user_add>Register User Account</user_add> - <user_view>Update User Account</user_view> - <user_password>Reset Password</user_password> - <user_password_reset>Reset Password</user_password_reset> - <user_verify>Enter Verification Code</user_verify> - <user_verify_resend>Resend Verification Email</user_verify_resend> - <view>Account</view> - - - - - - - id - checkbox - 25px - - - status - bool_icon - 20px - - - last_name - - - first_name - - - username - 25 - - - email - 25 - - - literal - 120px - -Email -Service -Invoice -]]> - - - -
diff --git a/modules/account/account_install.xml b/modules/account/account_install.xml deleted file mode 100644 index 712518bb..00000000 --- a/modules/account/account_install.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - Account - - 1 - - account - - - - - - - - base - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - Search - 1 - search_form - - - - search_show - - - - update - - - - view - - - - search_export - - - install - - - update_account_groups - - - - send_verify_email - - - - send_password_email - - - - mail_multi - - - mail_one - - - autoselect - - - login - - - - merge - - - group_search - - - product_search - - - diff --git a/modules/account/account_install_data.xml b/modules/account/account_install_data.xml deleted file mode 100644 index 7f1d218d..00000000 --- a/modules/account/account_install_data.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - 1 - 1 - 1075175744 - 1112335769 - 0 - 0 - en - 840 - 0 - 1 - default - admin - 21232f297a57a5a743894a0e4a801fc3 - Notes - 1 - Admin - Admin - Mrs - email@company.com - - City - State - 12345 - 0 - 0 - - - 33 - - diff --git a/modules/adsl/adsl.inc.php b/modules/adsl/adsl.inc.php deleted file mode 100644 index 4d21e216..00000000 --- a/modules/adsl/adsl.inc.php +++ /dev/null @@ -1,36 +0,0 @@ -. - * - * Originally authored by Deon George - * - * @author Deon George - * @copyright 2009 Deon George - * @link http://osb.leenooks.net - * @license http://www.gnu.org/licenses/ - * @package AgileBill - * @subpackage Modules:ADSL - */ - -/** - * This class provides the ability to define ADSL Supplier Products. - * - * @package osBilling - * @subpackage Modules:ADSL - */ -class adsl extends OSB_module { -} -?> diff --git a/modules/adsl/adsl_construct.xml b/modules/adsl/adsl_construct.xml deleted file mode 100644 index 4f3e168b..00000000 --- a/modules/adsl/adsl_construct.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - adsl - adsl
- - 0 - product_desc - 35 - - - - <add>Add ADSL</add> - <view>ADSL</view> - - - - - I8 - 1 - - - I4 - - - I8 - date-now - - - I8 - date-now - - - Active - L - - - Supplier - I4 - adsl_supplier - name - any - - - Product ID - C(16) - 1 - 16 - - - Product Description - C(128) - 1 - 128 - - - Base Cost - F - - - Contract Term in Months - Contract Term - I4 - - - Peak Downloads (MB) - F - - - Peak Uploads (MB) - F - - - OffPeak Downloads (MB) - F - - - OffPeak Uploads (MB) - F - - - Charge Extra Traffic - L - - - Shaping speed for extra traffic - C(8) - - - Offpeak Start - I8 - time - - - Offpeak End - I8 - time - - - Peak Downloads Rate ($/MB) - F - - - Peak Uploads Rate ($/MB) - F - - - OffPeak Downloads Rate ($/MB) - F - - - OffPeak Uploads Rate ($/MB) - F - - - - - supplier_id,product_id,product_desc - id,date_last,status,product_id,product_desc,base_cost,contract_term,base_down_peak,base_up_peak,base_down_offpeak,base_up_offpeak,extra_charged,extra_shaped,offpeak_start,offpeak_end,extra_down_peak,extra_up_peak,extra_down_offpeak,extra_up_offpeak - id - id,status,supplier_id,product_id,product_desc,base_cost,contract_term,base_down_peak,base_up_peak,base_down_offpeak,base_up_offpeak,extra_charged,extra_shaped,offpeak_start,offpeak_end,extra_down_peak,extra_up_peak,extra_down_offpeak,extra_up_offpeak - id,date_orig,date_last,status,supplier_id,product_id,product_desc,base_cost - - - - id,site_id - supplier_id - service_id - product - - - 0 - - - - - - id - checkbox - 25px - - - supplier_id - - - product_id - - - base_cost - currency - - - -
diff --git a/modules/adsl/adsl_install.xml b/modules/adsl/adsl_install.xml deleted file mode 100644 index f791d66f..00000000 --- a/modules/adsl/adsl_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - ADSL - - 1 - - adsl - - - - adsl - - adsl_supplier - - - - - - - - Add - 1 - add - - - - delete - - - - Search - 1 - search - - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/adsl/classes/model/adsl/plan.php b/modules/adsl/classes/model/adsl/plan.php index 1b5ef076..73b9a2a9 100644 --- a/modules/adsl/classes/model/adsl/plan.php +++ b/modules/adsl/classes/model/adsl/plan.php @@ -12,29 +12,30 @@ */ class Model_ADSL_Plan extends ORMOSB { // Relationships + // @todo This model should probably be joined with product_plugin_adsl protected $_belongs_to = array( 'adsl_supplier_plan'=>array(), ); protected $_has_many = array( - 'service'=>array('through'=>'service__adsl'), + 'product'=>array('far_key'=>'id','foreign_key'=>'prod_plugin_data'), ); - protected $_formats = array( + protected $_display_filters = array( 'extra_down_peak'=>array( - 'Tax::add'=>array(), - 'Currency::display'=>array(), + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), ), 'extra_down_offpeak'=>array( - 'Tax::add'=>array(), - 'Currency::display'=>array(), + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), ), 'extra_up_peak'=>array( - 'Tax::add'=>array(), - 'Currency::display'=>array(), + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), ), 'extra_up_offpeak'=>array( - 'Tax::add'=>array(), - 'Currency::display'=>array(), + array('Tax::add',array(':value')), + array('Currency::display',array(':value')), ), ); } diff --git a/modules/adsl/classes/model/adsl/supplier.php b/modules/adsl/classes/model/adsl/supplier.php index 1570ff24..295831e4 100644 --- a/modules/adsl/classes/model/adsl/supplier.php +++ b/modules/adsl/classes/model/adsl/supplier.php @@ -27,13 +27,16 @@ class Model_ADSL_Supplier extends ORMOSB { $services = array(); // Get a list of plans made for this supplier + // @todo This doesnt work if a product adsl plan is overriden. foreach ($this->adsl_supplier_plan->find_all() as $aspo) // Find all the plan who use this supplier plan foreach ($aspo->adsl_plan->find_all() as $apo) - // Find all the services who use this plan - foreach ($apo->service->find_all() as $so) - if (! $active OR $so->active) - array_push($services,$so); + // Find all the products who use this plan + foreach ($apo->product->find_all() as $po) + // Find all the services who that use this product + foreach ($po->service->find_all() as $so) + if (! $active OR $so->active) + array_push($services,$so); return $services; } diff --git a/modules/service/classes/model/service/adsl.php b/modules/adsl/classes/model/service/plugin/adsl.php similarity index 80% rename from modules/service/classes/model/service/adsl.php rename to modules/adsl/classes/model/service/plugin/adsl.php index f49f5b99..c8f300dc 100644 --- a/modules/service/classes/model/service/adsl.php +++ b/modules/adsl/classes/model/service/plugin/adsl.php @@ -10,22 +10,42 @@ * @copyright (c) 2010 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Service_ADSL extends Model_Service { +class Model_Service_Plugin_ADSL extends Model_Service_Plugin { protected $_table_name = 'service__adsl'; protected $_updated_column = FALSE; // Relationships protected $_belongs_to = array( - 'adsl_plan'=>array('foreign_key'=>'adsl_plan_id'), 'service'=>array(), ); + protected $_has_one = array( + 'adsl_plan'=>array('far_key'=>'provided_adsl_plan_id','foreign_key'=>'id'), + ); + protected $_display_filters = array( 'service_connect_date'=>array( array('Config::date',array(':value')), ), ); + // Required abstract functions + public function service_view() { + return View::factory('service/user/plugin/adsl/view') + ->set('so',$this); + } + + public function name() { + return $this->service_number; + } + + public function product() { + if ($this->provided_adsl_plan_id) + return $this->adsl_plan; + else + return $this->service->product->plugin(); + } + /** * Return the IP Address for the service */ @@ -91,7 +111,7 @@ class Model_Service_ADSL extends Model_Service { $return = array(); - $to = ORM::factory('service_adsl_traffic') + $to = ORM::factory('service_plugin_adsl_traffic') ->where('service','=',$this->service_username) ->and_where('date','>=',date('Y-m-d',mktime(0,0,0,date('m',$period),1,date('Y',$period)))) ->and_where('date','<=',date('Y-m-d',strtotime('last day of '.date('M Y',$period)))); @@ -99,14 +119,14 @@ class Model_Service_ADSL extends Model_Service { foreach ($to->find_all() as $traffic) { // Roll up the charges according to the configuration $data = ADSL::allowance(array( - 'base_down_peak'=>is_null($this->adsl_plan->base_down_peak) ? NULL : $traffic->down_peak, - 'base_down_offpeak'=>is_null($this->adsl_plan->base_down_offpeak) ? NULL : $traffic->down_offpeak, - 'base_up_peak'=>is_null($this->adsl_plan->base_up_peak) ? NULL : $traffic->up_peak, - 'base_up_offpeak'=>is_null($this->adsl_plan->base_up_offpeak) ? NULL : $traffic->up_offpeak, - 'extra_down_peak'=>$this->adsl_plan->extra_down_peak, - 'extra_down_offpeak'=>$this->adsl_plan->extra_down_offpeak, - 'extra_up_peak'=>$this->adsl_plan->extra_up_peak, - 'extra_up_offpeak'=>$this->adsl_plan->extra_up_offpeak, + 'base_down_peak'=>is_null($this->service->product->plugin()->base_down_peak) ? NULL : $traffic->down_peak, + 'base_down_offpeak'=>is_null($this->service->product->plugin()->base_down_offpeak) ? NULL : $traffic->down_offpeak, + 'base_up_peak'=>is_null($this->service->product->plugin()->base_up_peak) ? NULL : $traffic->up_peak, + 'base_up_offpeak'=>is_null($this->service->product->plugin()->base_up_offpeak) ? NULL : $traffic->up_offpeak, + 'extra_down_peak'=>$this->service->product->plugin()->extra_down_peak, + 'extra_down_offpeak'=>$this->service->product->plugin()->extra_down_offpeak, + 'extra_up_peak'=>$this->service->product->plugin()->extra_up_peak, + 'extra_up_offpeak'=>$this->service->product->plugin()->extra_up_offpeak, )); $day = date('d',strtotime($traffic->date)); @@ -128,7 +148,7 @@ class Model_Service_ADSL extends Model_Service { * Return an array of the data used in a year by month */ public function get_traffic_data_monthly($period=NULL,$bydate=FALSE) { - $cacheable = FALSE; + $cacheable = TRUE; if (is_null($period)) $period = strtotime('yesterday'); @@ -140,7 +160,7 @@ class Model_Service_ADSL extends Model_Service { $return = array(); - $to = ORM::factory('service_adsl_traffic') + $to = ORM::factory('service_plugin_adsl_traffic') ->select( array('date_format(date,\'%y-%m\')','month'), array('sum(up_peak)','up_peak'), @@ -156,14 +176,14 @@ class Model_Service_ADSL extends Model_Service { foreach ($to->find_all() as $traffic) { // Roll up the charges according to the configuration $data = ADSL::allowance(array( - 'base_down_peak'=>is_null($this->adsl_plan->base_down_peak) ? NULL : $traffic->down_peak, - 'base_down_offpeak'=>is_null($this->adsl_plan->base_down_offpeak) ? NULL : $traffic->down_offpeak, - 'base_up_peak'=>is_null($this->adsl_plan->base_up_peak) ? NULL : $traffic->up_peak, - 'base_up_offpeak'=>is_null($this->adsl_plan->base_up_offpeak) ? NULL : $traffic->up_offpeak, - 'extra_down_peak'=>$this->adsl_plan->extra_down_peak, - 'extra_down_offpeak'=>$this->adsl_plan->extra_down_offpeak, - 'extra_up_peak'=>$this->adsl_plan->extra_up_peak, - 'extra_up_offpeak'=>$this->adsl_plan->extra_up_offpeak, + 'base_down_peak'=>is_null($this->service->product->plugin()->base_down_peak) ? NULL : $traffic->down_peak, + 'base_down_offpeak'=>is_null($this->service->product->plugin()->base_down_offpeak) ? NULL : $traffic->down_offpeak, + 'base_up_peak'=>is_null($this->service->product->plugin()->base_up_peak) ? NULL : $traffic->up_peak, + 'base_up_offpeak'=>is_null($this->service->product->plugin()->base_up_offpeak) ? NULL : $traffic->up_offpeak, + 'extra_down_peak'=>$this->service->product->plugin()->extra_down_peak, + 'extra_down_offpeak'=>$this->service->product->plugin()->extra_down_offpeak, + 'extra_up_peak'=>$this->service->product->plugin()->extra_up_peak, + 'extra_up_offpeak'=>$this->service->product->plugin()->extra_up_offpeak, )); if ($bydate) @@ -202,12 +222,12 @@ class Model_Service_ADSL extends Model_Service { foreach ($this->traffic_month($date,FALSE) as $k => $v) { // We shouldnt need to eval for nulls, since the traffic calc does that - if ($all OR ($v > $this->adsl_plan->$k)) { - $return[$k]['allowance'] = $this->adsl_plan->$k; + if ($all OR ($v > $this->service->product->plugin()->$k)) { + $return[$k]['allowance'] = $this->service->product->plugin()->$k; $return[$k]['used'] = $v; - $return[$k]['shaped'] = (! empty($this->adsl_plan->extra_shaped) AND $this->adsl_plan->extra_shaped AND $v > $this->adsl_plan->$k) ? TRUE : FALSE; - $return[$k]['excess'] = (! empty($this->adsl_plan->extra_charged) AND $this->adsl_plan->extra_charged AND $v > $this->adsl_plan->$k) ? $v-$this->adsl_plan->$k : 0; - $return[$k]['rate'] = $this->adsl_plan->{ADSL::map($k)}; + $return[$k]['shaped'] = (! empty($this->service->product->plugin()->extra_shaped) AND $this->service->product->plugin()->extra_shaped AND $v > $this->service->product->plugin()->$k) ? TRUE : FALSE; + $return[$k]['excess'] = (! empty($this->service->product->plugin()->extra_charged) AND $this->service->product->plugin()->extra_charged AND $v > $this->service->product->plugin()->$k) ? $v-$this->service->product->plugin()->$k : 0; + $return[$k]['rate'] = $this->service->product->plugin()->{ADSL::map($k)}; $return[$k]['charge'] = ceil(($return[$k]['excess'])/1000)*$return[$k]['rate']; } } @@ -340,31 +360,23 @@ class Model_Service_ADSL extends Model_Service { return FALSE; } - protected function _service_name() { - return sprintf('%s - %s',$this->service->product->name(),$this->service_number); - } - - protected function _service_view() { - return View::factory('service/user/adsl/view') - ->set('so',$this); - } - /** * Get specific service details for use in other modules * For Example: Invoice * * @todo Make the rendered items configurable + * @todo Change this method name, now that it is public */ - protected function _details($type) { + public function _details($type) { switch ($type) { - case 'invoice': + case 'invoice_detail_items': return array( _('Service Address')=>$this->display('service_address'), _('Contract Until')=>$this->contract_date_end(), ); break; default: - throw new Kohana_Exception('Unkown detail request :type',array(':type'=>$type)); + return parent::$_details($type); } } @@ -413,7 +425,7 @@ class Model_Service_ADSL extends Model_Service { } public function table_traffic($month=NULL) { - return View::factory('service/user/adsl/table_traffic') + return View::factory('service/user/plugin/adsl/table_traffic') ->set('traffic',$this->traffic_month((! is_null($month) AND trim($month)) ? strtotime($month.'-01') : NULL,FALSE)); } } diff --git a/modules/service/classes/model/service/adsl/traffic.php b/modules/adsl/classes/model/service/plugin/adsl/traffic.php similarity index 86% rename from modules/service/classes/model/service/adsl/traffic.php rename to modules/adsl/classes/model/service/plugin/adsl/traffic.php index 9062208c..ad149620 100644 --- a/modules/service/classes/model/service/adsl/traffic.php +++ b/modules/adsl/classes/model/service/plugin/adsl/traffic.php @@ -10,9 +10,10 @@ * @copyright (c) 2010 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Service_ADSL_Traffic extends ORMOSB { +class Model_Service_Plugin_ADSL_Traffic extends ORMOSB { protected $_table_name = 'service__adsl_traffic'; protected $_primary_key = 'service'; + protected $_disable_wild_select = TRUE; protected $_created_column = FALSE; protected $_updated_column = FALSE; diff --git a/modules/service/classes/service/traffic/adsl.php b/modules/adsl/classes/service/traffic/adsl.php similarity index 92% rename from modules/service/classes/service/traffic/adsl.php rename to modules/adsl/classes/service/traffic/adsl.php index bee7372b..c4c4bdf8 100644 --- a/modules/service/classes/service/traffic/adsl.php +++ b/modules/adsl/classes/service/traffic/adsl.php @@ -87,7 +87,7 @@ class Service_Traffic_ADSL { break; } - $traffic = ORM::factory('service_adsl_traffic'); + $traffic = ORM::factory('service_plugin_adsl_traffic'); foreach ($data as $item) { $traffic->values($item,array_keys($item)); $traffic->supplier_id = $this->so->id; @@ -111,7 +111,7 @@ class Service_Traffic_ADSL { // @todo need a way to find out services that have traffic charges dynamically. foreach ($this->so->services() as $so) { - if ($charge = $so->service_adsl->traffic_lastmonth_exceed(FALSE,$date)) { + if ($charge = $so->plugin()->traffic_lastmonth_exceed(FALSE,$date)) { foreach ($charge as $metric => $details) { $co = ORM::factory('charge'); @@ -126,7 +126,7 @@ class Service_Traffic_ADSL { $co->description = _('Excess Traffic'); // @todo This need to be improved = strtotime function should be the one used in the function call $co->attributes = implode("\n",array( - sprintf('ADSL Service==%s',$so->service_adsl->service_number), + sprintf('ADSL Service==%s',$so->plugin()->service_number), sprintf('Allowance==%s',$details['allowance']), sprintf('Metric==%s',$metric), sprintf('Used==%s',$details['used']), @@ -144,12 +144,12 @@ class Service_Traffic_ADSL { $et = Email_Template::instance('adsl_traffic_notice'); foreach ($this->so->services() as $so) { - if (! $so->service_adsl->report_traffic()) + if (! $so->plugin()->report_traffic()) continue; // Get our variable data $et->to = array('account'=>array($so->account_id)); - $et->variables = $so->service_adsl->template_variables($et->variables()); + $et->variables = $so->plugin()->template_variables($et->variables()); $et->send(); } diff --git a/modules/service/classes/service/traffic/adsl/exetelhspa.php b/modules/adsl/classes/service/traffic/adsl/exetelhspa.php similarity index 80% rename from modules/service/classes/service/traffic/adsl/exetelhspa.php rename to modules/adsl/classes/service/traffic/adsl/exetelhspa.php index b478229e..51ceb452 100644 --- a/modules/service/classes/service/traffic/adsl/exetelhspa.php +++ b/modules/adsl/classes/service/traffic/adsl/exetelhspa.php @@ -39,17 +39,17 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL { $update = array(); foreach ($this->so->services() as $so) { - if ($so->service_adsl->service_stats_collect AND $so->service_adsl->service_stats_lastupdate < $date) { + if ($so->plugin()->service_stats_collect AND $so->plugin()->service_stats_lastupdate < $date) { // Start Session $request = Request::factory($this->so->stats_url) ->method('POST') - ->post($this->login_user_field,$so->service_adsl->service_username) - ->post($this->login_pass_field,$so->service_adsl->service_password) + ->post($this->login_user_field,$so->plugin()->service_username) + ->post($this->login_pass_field,$so->plugin()->service_password) ->post('doLogin',1) ->post('submit','Login'); $request->get_client()->options($this->curlopts+array( - CURLOPT_COOKIEJAR=>sprintf('/tmp/usage.cookies.%s.txt',$so->service_adsl->service_number), + CURLOPT_COOKIEJAR=>sprintf('/tmp/usage.cookies.%s.txt',$so->plugin()->service_number), )); $response = $request->execute(); @@ -57,16 +57,17 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL { if (! $data) { // @todo Log into a log file - printf('Bad fetch for %s [%s]',$so->service_adsl->service_number,$this->so->stats_lastupdate); + printf('Bad fetch for %s [%s]',$so->plugin()->service_number,$this->so->stats_lastupdate); #$html = new simple_html_dom(); #$html->load($data); - #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.login.html',$so->service_adsl->service_number,'login')); + #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.login.html',$so->plugin()->service_number,'login')); continue; } for ($servicedate=date('Y-m-d',strtotime($this->so->stats_lastupdate.'+1 day')); $servicedate <= $this->today; $servicedate=date('Y-m-d',strtotime('+1 month',strtotime(date('Y-m',strtotime($servicedate)).'-01')))) { + #print_r(array('sn'=>$so->plugin()->service_number,'sd'=>$servicedate)); $lastday = date('Y-m-d',strtotime('-1 second',strtotime('+1 month',strtotime(date('Y-m',strtotime($servicedate)).'-01')))); if (strtotime($lastday) > time()) @@ -84,16 +85,16 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL { ->post('do_usage_search',1); $request->get_client()->options($this->curlopts+array( - CURLOPT_COOKIEFILE=>sprintf('/tmp/usage.cookies.%s.txt',$so->service_adsl->service_number), - )); + CURLOPT_COOKIEFILE=>sprintf('/tmp/usage.cookies.%s.txt',$so->plugin()->service_number), + )); $response = $request->execute(); $result = $response->body(); $html->load($result); - #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.html',$so->service_adsl->service_number,$servicedate)); + #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.html',$so->plugin()->service_number,$servicedate)); die(); } else { - $html->load_file(sprintf('/tmp/usage.%s.%s.txt',$so->service_adsl->service_number,$servicedate)); + $html->load_file(sprintf('/afs/local/tmp/usage.%s.%s.html',$so->plugin()->service_number,$servicedate)); } $header = array(); @@ -103,7 +104,7 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL { if (! preg_match('/^Usage Detail/',$fieldset->find('legend',0)->plaintext)) continue; - #echo "X:";print_r($fieldset->find('legend',0)->plaintext); echo "\n"; + #echo "X:";print_r($fieldset->find('table',0)->find('tr')->plaintext); echo "\n"; foreach ($fieldset->find('table',0)->find('tr') as $key => $values) { foreach ($values->children() as $a => $b) { #print_r(array('a'=>$a,'b'=>$b)); @@ -119,6 +120,7 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL { case 'Peak Download': $header[$a] = 'down_peak'; break; case 'Download': $header[$a] = 'down_peak'; break; case 'Duration': break; + case 'Total': break; default: printf('Unkown header :%s',$b->plaintext); $this->fetchresult = FALSE; @@ -137,27 +139,28 @@ class Service_Traffic_ADSL_ExetelHSPA extends Service_Traffic_ADSL { #echo "VALUES: ".$b->plaintext."\n"; } } + #print_r($data); if (isset($data['date']) && preg_match('/^[0-9]{4}/',$data['date'])) { $sdate = date('Y-m-d',strtotime($data['date'])); unset($data['date']); - if (isset($update[$so->service_adsl->service_number][$sdate])) + if (isset($update[$so->plugin()->service_number][$sdate])) foreach ($data as $key => $value) - $update[$so->service_adsl->service_number][$sdate][$key] += $value; + $update[$so->plugin()->service_number][$sdate][$key] += $value; else - $update[$so->service_adsl->service_number][$sdate] = $data; + $update[$so->plugin()->service_number][$sdate] = $data; - $update[$so->service_adsl->service_number][$sdate]['service'] = $so->service_adsl->service_number; - $update[$so->service_adsl->service_number][$sdate]['date'] = $sdate; + $update[$so->plugin()->service_number][$sdate]['service'] = $so->plugin()->service_number; + $update[$so->plugin()->service_number][$sdate]['date'] = $sdate; } } } } // If we got here and have data, we had a good fetch, update the stats date - $so->service_adsl->service_stats_lastupdate = $lastday; - $so->service_adsl->save(); + $so->plugin()->service_stats_lastupdate = $lastday; + $so->plugin()->save(); } } diff --git a/modules/service/classes/service/traffic/adsl/exetelpe.php b/modules/adsl/classes/service/traffic/adsl/exetelpe.php similarity index 83% rename from modules/service/classes/service/traffic/adsl/exetelpe.php rename to modules/adsl/classes/service/traffic/adsl/exetelpe.php index 7f1b37b0..01840b0c 100644 --- a/modules/service/classes/service/traffic/adsl/exetelpe.php +++ b/modules/adsl/classes/service/traffic/adsl/exetelpe.php @@ -39,17 +39,17 @@ class Service_Traffic_ADSL_ExetelPE extends Service_Traffic_ADSL { $update = array(); foreach ($this->so->services() as $so) { - if ($so->service_adsl->service_stats_collect AND $so->service_adsl->service_stats_lastupdate < $date) { + if ($so->plugin()->service_stats_collect AND $so->plugin()->service_stats_lastupdate < $date) { // Start Session $request = Request::factory($this->so->stats_url) ->method('POST') - ->post($this->login_user_field,$so->service_adsl->service_username) - ->post($this->login_pass_field,$so->service_adsl->service_password) + ->post($this->login_user_field,$so->plugin()->service_username) + ->post($this->login_pass_field,$so->plugin()->service_password) ->post('doLogin',1) ->post('submit','Login'); $request->get_client()->options($this->curlopts+array( - CURLOPT_COOKIEJAR=>sprintf('/tmp/usage.cookies.%s.txt',$so->service_adsl->service_number), + CURLOPT_COOKIEJAR=>sprintf('/tmp/usage.cookies.%s.txt',$so->plugin()->service_number), )); $response = $request->execute(); @@ -57,10 +57,10 @@ class Service_Traffic_ADSL_ExetelPE extends Service_Traffic_ADSL { if (! $data) { // @todo Log into a log file - printf('Bad fetch for %s [%s]',$so->service_adsl->service_number,$this->so->stats_lastupdate); + printf('Bad fetch for %s [%s]',$so->plugin()->service_number,$this->so->stats_lastupdate); #$html = new simple_html_dom(); #$html->load($data); - #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.login.html',$so->service_adsl->service_number,'login')); + #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.login.html',$so->plugin()->service_number,'login')); continue; } @@ -84,16 +84,16 @@ class Service_Traffic_ADSL_ExetelPE extends Service_Traffic_ADSL { ->post('do_usage_search',1); $request->get_client()->options($this->curlopts+array( - CURLOPT_COOKIEFILE=>sprintf('/tmp/usage.cookies.%s.txt',$so->service_adsl->service_number), + CURLOPT_COOKIEFILE=>sprintf('/tmp/usage.cookies.%s.txt',$so->plugin()->service_number), )); $response = $request->execute(); $result = $response->body(); $html->load($result); - #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.html',$so->service_adsl->service_number,$servicedate)); + #$html->save(sprintf('/afs/local/tmp/usage.%s.%s.html',$so->plugin()->service_number,$servicedate)); } else { - $html->load_file(sprintf('/afs/local/tmp/usage.%s.%s.html',$so->service_adsl->service_number,$servicedate)); + $html->load_file(sprintf('/afs/local/tmp/usage.%s.%s.html',$so->plugin()->service_number,$servicedate)); } $header = array(); @@ -141,22 +141,22 @@ class Service_Traffic_ADSL_ExetelPE extends Service_Traffic_ADSL { $sdate = date('Y-m-d',strtotime(str_replace('/','-',$data['date']))); unset($data['date']); - if (isset($update[$so->service_adsl->service_number][$sdate])) + if (isset($update[$so->plugin()->service_number][$sdate])) foreach ($data as $key => $value) - $update[$so->service_adsl->service_number][$sdate][$key] += $value; + $update[$so->plugin()->service_number][$sdate][$key] += $value; else - $update[$so->service_adsl->service_number][$sdate] = $data; + $update[$so->plugin()->service_number][$sdate] = $data; - $update[$so->service_adsl->service_number][$sdate]['service'] = $so->service_adsl->service_number; - $update[$so->service_adsl->service_number][$sdate]['date'] = $sdate; + $update[$so->plugin()->service_number][$sdate]['service'] = $so->plugin()->service_number; + $update[$so->plugin()->service_number][$sdate]['date'] = $sdate; } } } } // If we got here and have data, we had a good fetch, update the stats date - $so->service_adsl->service_stats_lastupdate = $lastday; - $so->service_adsl->save(); + $so->plugin()->service_stats_lastupdate = $lastday; + $so->plugin()->save(); } } diff --git a/modules/service/classes/service/traffic/adsl/exetelvisp.php b/modules/adsl/classes/service/traffic/adsl/exetelvisp.php similarity index 99% rename from modules/service/classes/service/traffic/adsl/exetelvisp.php rename to modules/adsl/classes/service/traffic/adsl/exetelvisp.php index b2071582..8340f2c2 100644 --- a/modules/service/classes/service/traffic/adsl/exetelvisp.php +++ b/modules/adsl/classes/service/traffic/adsl/exetelvisp.php @@ -29,7 +29,7 @@ class Service_Traffic_ADSL_ExetelVisp extends Service_Traffic_ADSL { $request->get_client()->options($this->curlopts+array( CURLOPT_POST => TRUE, - )); + )); $response = $request->execute(); $data = $response->body(); diff --git a/modules/service/classes/service/traffic/adsl/iinetadsl.php b/modules/adsl/classes/service/traffic/adsl/iinetadsl.php similarity index 100% rename from modules/service/classes/service/traffic/adsl/iinetadsl.php rename to modules/adsl/classes/service/traffic/adsl/iinetadsl.php diff --git a/modules/service/classes/service/traffic/adsl/peopleagent.php b/modules/adsl/classes/service/traffic/adsl/peopleagent.php similarity index 100% rename from modules/service/classes/service/traffic/adsl/peopleagent.php rename to modules/adsl/classes/service/traffic/adsl/peopleagent.php diff --git a/modules/service/views/service/admin/adsl/update.php b/modules/adsl/views/service/admin/adsl/update.php similarity index 100% rename from modules/service/views/service/admin/adsl/update.php rename to modules/adsl/views/service/admin/adsl/update.php diff --git a/modules/adsl/views/service/admin/list/adslbilling_body.php b/modules/adsl/views/service/admin/list/adslbilling_body.php new file mode 100644 index 00000000..c41a43df --- /dev/null +++ b/modules/adsl/views/service/admin/list/adslbilling_body.php @@ -0,0 +1,11 @@ + + plugin()->display('service_number'); ?> + adsl_supplier_plan->name().($planoverride ? '*' : ''); ?> + plugin()->contract_date_start(); ?> + plugin()->contract_date_end(); ?> + adsl_supplier_plan->base_cost); ?> + adsl_supplier_plan->base_cost+$plan->adsl_supplier_plan->tax()); ?> + onchange="paid(this);"/> + + + diff --git a/modules/service/views/service/admin/list/adslbilling_foot.php b/modules/adsl/views/service/admin/list/adslbilling_foot.php similarity index 100% rename from modules/service/views/service/admin/list/adslbilling_foot.php rename to modules/adsl/views/service/admin/list/adslbilling_foot.php diff --git a/modules/service/views/service/admin/list/adslbilling_head.php b/modules/adsl/views/service/admin/list/adslbilling_head.php similarity index 100% rename from modules/service/views/service/admin/list/adslbilling_head.php rename to modules/adsl/views/service/admin/list/adslbilling_head.php diff --git a/modules/adsl/views/service/admin/list/adslbilling_summary.php b/modules/adsl/views/service/admin/list/adslbilling_summary.php new file mode 100644 index 00000000..068965fb --- /dev/null +++ b/modules/adsl/views/service/admin/list/adslbilling_summary.php @@ -0,0 +1,10 @@ + + plugin()->display('service_number'); ?> + adsl_supplier_plan->name().($planoverride ? '*' : ''); ?> + plugin()->contract_date_start(); ?> + plugin()->contract_date_end(); ?> + product->plugin()->adsl_supplier_plan->base_cost); ?> + product->plugin()->adsl_supplier_plan->base_cost+$service->product->plugin()->adsl_supplier_plan->tax()); ?> + + product->plugin()->adsl_supplier_plan->base_cost+$service->product->plugin()->adsl_supplier_plan->tax()-$amount; ?> + diff --git a/modules/service/views/service/admin/list/adslbilling_summary_exception.php b/modules/adsl/views/service/admin/list/adslbilling_summary_exception.php similarity index 100% rename from modules/service/views/service/admin/list/adslbilling_summary_exception.php rename to modules/adsl/views/service/admin/list/adslbilling_summary_exception.php diff --git a/modules/service/views/service/admin/list/adslservices_body.php b/modules/adsl/views/service/admin/list/adslservices_body.php similarity index 52% rename from modules/service/views/service/admin/list/adslservices_body.php rename to modules/adsl/views/service/admin/list/adslservices_body.php index f93d337e..e8255bbb 100644 --- a/modules/service/views/service/admin/list/adslservices_body.php +++ b/modules/adsl/views/service/admin/list/adslservices_body.php @@ -1,10 +1,10 @@ - service_adsl->display('service_number'); ?> - service_adsl->ipaddress(); ?> - name(),$service->id); ?> + plugin()->display('service_number'); ?> + plugin()->ipaddress(); ?> + product->name(),$service->id); ?> product->prod_plugin_file ? $service->product->plugin()->allowance() : 'No Details'; ?> - service_adsl->traffic_thismonth(); ?> - service_adsl->traffic_lastmonth(); ?> + plugin()->traffic_thismonth(); ?> + plugin()->traffic_lastmonth(); ?> display('price'); ?> display('recur_schedule'); ?> display('date_next_invoice'); ?> diff --git a/modules/service/views/service/admin/list/adslservices_header.php b/modules/adsl/views/service/admin/list/adslservices_header.php similarity index 100% rename from modules/service/views/service/admin/list/adslservices_header.php rename to modules/adsl/views/service/admin/list/adslservices_header.php diff --git a/modules/service/views/service/user/adsl/table_traffic.php b/modules/adsl/views/service/user/plugin/adsl/table_traffic.php similarity index 100% rename from modules/service/views/service/user/adsl/table_traffic.php rename to modules/adsl/views/service/user/plugin/adsl/table_traffic.php diff --git a/modules/service/views/service/user/adsl/view.php b/modules/adsl/views/service/user/plugin/adsl/view.php similarity index 76% rename from modules/service/views/service/user/adsl/view.php rename to modules/adsl/views/service/user/plugin/adsl/view.php index 82c1c760..525e77c6 100644 --- a/modules/service/views/service/user/adsl/view.php +++ b/modules/adsl/views/service/user/plugin/adsl/view.php @@ -1,13 +1,13 @@ - + - + - - '; } ?> + + prod_plugin && method_exists($record->prod_plugin_file,'feature_summary')) { + // @todo This doesnt work, it needs to be product_plugin_xx class + $pio = new $record->prod_plugin_file; + echo ''; + } ?> + @@ -77,7 +84,16 @@ echo Form::open('cart/add'); - + + + + prod_plugin && method_exists($record->prod_plugin_file,'product_cart')) { + $pio = new $record->prod_plugin_file; + echo ''; + } ?> + + +
Service DetailsService Details
  
+ @@ -35,7 +35,7 @@ - + @@ -43,21 +43,21 @@
Service Number
Service Passworddisplay('service_password'); ?>display('service_password'); ?>
Service IP
- + -
+ - - + +
Traffic Used This Month traffic_month(null); ?>
Traffic Used Last Monthtraffic_lastmonth(); ?>Traffic Used Last Monthtraffic_lastmonth(); ?>
+ @@ -67,7 +67,7 @@ - +
View Daily Traffic for Month
graph_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?> - table_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?> + graph_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?>table_traffic(isset($_POST['month']) ? $_POST['month'] : ''); ?>
diff --git a/modules/adsl_supplier/adsl_supplier.inc.php b/modules/adsl_supplier/adsl_supplier.inc.php deleted file mode 100644 index 8b48d6d9..00000000 --- a/modules/adsl_supplier/adsl_supplier.inc.php +++ /dev/null @@ -1,22 +0,0 @@ - - * @copyright 2009 Deon George - * @link http://osb.leenooks.net - * @package osBilling - * @subpackage Modules:ADSL - */ - -/** - * This class provides the ability to define ADSL Suppliers. - * - * @package osBilling - * @subpackage Modules:ADSL - */ -class adsl_supplier extends OSB_module { -} -?> diff --git a/modules/adsl_supplier/adsl_supplier_construct.xml b/modules/adsl_supplier/adsl_supplier_construct.xml deleted file mode 100644 index 287b8a18..00000000 --- a/modules/adsl_supplier/adsl_supplier_construct.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - adsl_supplier - - adsl_supplier
- - - - 0 - - name - - 25 - - - - - I4 - 1 - 1 - - - I4 - - - Active - L - - - L - - - Supplier - C(128) - 1 - 128 - any - - - C(255) - - - C(128) - 1 - 128 - - - X2 - array - - - I4 - - - - - - name - id,status,debug,name,notes,provision_plugin,provision_plugin_data,max_accounts - id - id,status,debug,name,notes,provision_plugin,provision_plugin_data,max_accounts - id,status,debug,name,notes,provision_plugin,provision_plugin_data,max_accounts - - - - 0 - - - - - - id - checkbox - 25px - - - name - - - -
diff --git a/modules/adsl_supplier/adsl_supplier_install.xml b/modules/adsl_supplier/adsl_supplier_install.xml deleted file mode 100644 index e87db353..00000000 --- a/modules/adsl_supplier/adsl_supplier_install.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - ADSL Suppliers - adsl_supplier - adsl_supplier
- adsl - - adsl - - 1 -
- - - - - Add - add - - 1 - - - delete - - - search - - - Search - search_show - - - - update - - - List - view - - 1 - - - -
diff --git a/modules/adsl_supplier/adsl_supplier_install_data.xml b/modules/adsl_supplier/adsl_supplier_install_data.xml deleted file mode 100644 index 9001c9d4..00000000 --- a/modules/adsl_supplier/adsl_supplier_install_data.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - 1 - 1 - 1 - - Exetel - - - - - - - 2 - 1 - 0 - - People - - - - - - - - 3 - - diff --git a/modules/host_server/classes/model/hostserver.php b/modules/affiliate/classes/model/affiliate.php similarity index 63% rename from modules/host_server/classes/model/hostserver.php rename to modules/affiliate/classes/model/affiliate.php index 43cd1bcd..15d1cb98 100644 --- a/modules/host_server/classes/model/hostserver.php +++ b/modules/affiliate/classes/model/affiliate.php @@ -1,16 +1,15 @@ diff --git a/modules/core/database.inc.php b/modules/core/database.inc.php index fd8aa454..cf189e49 100644 --- a/modules/core/database.inc.php +++ b/modules/core/database.inc.php @@ -223,7 +223,7 @@ function sqlConditions($db,$Conditions=false,$Tables=false) { # Add the SITE ID if (! is_array($Tables) || count($Tables) == 1) { - if ($Tables == 'setup') + if (in_array($Tables,array('setup','currency','tax'))) $where .= sprintf('id=%s',DEFAULT_SITE); else $where .= sprintf('site_id=%s',DEFAULT_SITE); diff --git a/modules/core/list.inc.php b/modules/core/list.inc.php index f3aca2f1..2a0f18e1 100644 --- a/modules/core/list.inc.php +++ b/modules/core/list.inc.php @@ -169,6 +169,7 @@ class CORE_list { } public function format_currency_decimal($number,$currency_id,$decimals=DEFAULT_DECIMAL_PLACE) { + return ($number); if (empty($number)) return 0; if (empty($currency_id)) diff --git a/modules/domain/classes/domain.php b/modules/domain/classes/domain.php new file mode 100644 index 00000000..ae7e9905 --- /dev/null +++ b/modules/domain/classes/domain.php @@ -0,0 +1,54 @@ +// + '; + + $output .= View::factory('domain/cart'); + + return $output; + } + + public static function NS(Model_Service_Plugin_Domain $o) { + if ($o->registrar_ns) + return is_array($o->registrar_ns) ? implode(',',$o->registrar_ns) : '>Invalid<'; + else + return is_array($o->domain_registrar->whitelabel_ns) ? implode(',',$o->domain_registrar->whitelabel_ns) : '>Unknown<'; + } +} +?> diff --git a/modules/domain/classes/model/domain/registrar.php b/modules/domain/classes/model/domain/registrar.php new file mode 100644 index 00000000..1e74acfb --- /dev/null +++ b/modules/domain/classes/model/domain/registrar.php @@ -0,0 +1,27 @@ +file); + if (! class_exists($c)) + return ''; + + $po = new $c($this->id); + + return $po->manage_button($u,$p,$d); + } +} +?> diff --git a/modules/domain/classes/model/domain/tld.php b/modules/domain/classes/model/domain/tld.php new file mode 100644 index 00000000..18fb0b4d --- /dev/null +++ b/modules/domain/classes/model/domain/tld.php @@ -0,0 +1,20 @@ +array( + array('strtoupper',array(':value')), + ), + ); +} +?> diff --git a/modules/domain/classes/model/service/plugin/domain.php b/modules/domain/classes/model/service/plugin/domain.php new file mode 100644 index 00000000..15e2a8bd --- /dev/null +++ b/modules/domain/classes/model/service/plugin/domain.php @@ -0,0 +1,71 @@ +array('foreign_key'=>'id','far_key'=>'domain_tld_id'), + 'domain_registrar'=>array('foreign_key'=>'id','far_key'=>'domain_registrar_id'), + 'service_plugin_host'=>array('through'=>'service','far_key'=>'service_id','foreign_key'=>'service_id'), + ); + protected $_belongs_to = array( + 'service'=>array(), + ); + + protected $_display_filters = array( + 'domain_expire'=>array( + array('Config::date',array(':value')), + ), + 'domain_name'=>array( + array('strtoupper',array(':value')), + ), + 'registrar_ns'=>array( + array('Domain::NS',array(':model')), + ), + 'registrar_lastsync'=>array( + array('Config::date',array(':value')), + ), + ); + + // Required abstract functions + public function service_view() { + return View::factory('service/user/plugin/domain/view') + ->set('so',$this); + } + + public function name() { + return sprintf('%s.%s',$this->display('domain_name'),$this->domain_tld->display('name')); + } + + public function service_name() { + return sprintf('%s - %s',_('Domain Name License'),$this->name()); + } + + protected function _admin_update() { + } + + /** + * This provides us with a manage button to jump to the registrar + * to manage the domain. + */ + public function manage_button() { + return ($this->registrar_username AND $this->registrar_password) ? $this->domain_registrar->manage_button($this->registrar_username,$this->registrar_password,$this->name()) : _('Please contact us'); + } + + public function manage_dns_button() { + return $this->service_plugin_host->manage_button(); + } +} +?> diff --git a/modules/domain/classes/service/domain.php b/modules/domain/classes/service/domain.php new file mode 100644 index 00000000..bfed5f86 --- /dev/null +++ b/modules/domain/classes/service/domain.php @@ -0,0 +1,56 @@ + 60, + CURLOPT_FAILONERROR => TRUE, + CURLOPT_FOLLOWLOCATION => FALSE, + CURLOPT_HEADER => FALSE, + CURLOPT_HTTPPROXYTUNNEL => FALSE, + CURLOPT_RETURNTRANSFER => TRUE, + CURLOPT_TIMEOUT => 30, + CURLOPT_SSL_VERIFYHOST => FALSE, + CURLOPT_SSL_VERIFYPEER => FALSE, + CURLOPT_VERBOSE => FALSE, + ); + + /** + * Setup this class. We need to get our supplier details out of the database. + */ + public function __construct($sid) { + $this->so = ORM::factory('domain_registrar',$sid); + } + + /** + * Our HTML button that will enable us to manage this domain. + */ + abstract public function manage_button($u,$p,$d); + + /** + * Return an instance of this class + * + * @return HeadImage + */ + public static function instance($supplier) { + $sc = sprintf('%s_%s',get_called_class(),$supplier); + + if (! class_exists($sc)) + throw new Kohana_Exception('Class doesnt exist for :supplier',array(':supplier'=>$supplier)); + else + return new $sc; + } +} +?> diff --git a/modules/domain/classes/service/domain/manual.php b/modules/domain/classes/service/domain/manual.php new file mode 100644 index 00000000..cbacefc0 --- /dev/null +++ b/modules/domain/classes/service/domain/manual.php @@ -0,0 +1,23 @@ + diff --git a/modules/domain/classes/service/domain/planetdomain.php b/modules/domain/classes/service/domain/planetdomain.php new file mode 100644 index 00000000..8542f6a3 --- /dev/null +++ b/modules/domain/classes/service/domain/planetdomain.php @@ -0,0 +1,35 @@ +so->whitelabel_url,'newdnr/action/user/login.jsp'), + array('target'=>'pd','method'=>'post') + ); + $output .= Form::input($this->login_user_field,$u,array('type'=>'hidden')); + $output .= Form::input($this->login_pass_field,$p,array('type'=>'hidden')); + $output .= Form::input('page.next',sprintf('/newdnr/action/dns/getDNSDetails.jsp?domain.name=%s',$d),array('type'=>'hidden')); + $output .= Form::button('submit',_('Manage'),array('class'=>'form_button')); + $output .= Form::close(); + + return $output; + } +} +?> diff --git a/modules/domain/classes/service/domain/tpp.php b/modules/domain/classes/service/domain/tpp.php new file mode 100644 index 00000000..e264f757 --- /dev/null +++ b/modules/domain/classes/service/domain/tpp.php @@ -0,0 +1,34 @@ +so->whitelabel_url,'execute/logon'), + array('target'=>'tpp','method'=>'post') + ); + $output .= Form::input($this->login_user_field,$u,array('type'=>'hidden')); + $output .= Form::input($this->login_pass_field,$p,array('type'=>'hidden')); + $output .= Form::button('submit',_('Manage'),array('class'=>'form_button')); + $output .= Form::close(); + + return $output; + } +} +?> diff --git a/modules/domain/views/service/user/plugin/domain/view.php b/modules/domain/views/service/user/plugin/domain/view.php new file mode 100644 index 00000000..ad7c69fa --- /dev/null +++ b/modules/domain/views/service/user/plugin/domain/view.php @@ -0,0 +1,51 @@ + + + + + + + + + + + + +
Service Details
 
+ + + + + + + + + + + + + + + + + + + + + +
Domain Namename(); ?>
Domain Expiredisplay('domain_expire'); ?>
Domain Primary Name Serversdisplay('registrar_ns'); ?> (Last Sync: display('registrar_lastsync'); ?>)
Domain Auth Passworddisplay('registrar_auth_password'); ?>
Domain Typedisplay('registrar_type'); ?>
+
+ + manage_button()) { ?> + + + + + + manage_dns_button()) { ?> + + + + + +
Manage Registrar
Manage DNS
+
diff --git a/modules/host/classes/model/host/server.php b/modules/host/classes/model/host/server.php new file mode 100644 index 00000000..f7fc9f3b --- /dev/null +++ b/modules/host/classes/model/host/server.php @@ -0,0 +1,24 @@ +provision_plugin); + if (! class_exists($c)) + return ''; + + $po = new $c($this->id); + + return $po->manage_button($u,$p,$d); + } +} +?> diff --git a/modules/host/classes/model/service/plugin/host.php b/modules/host/classes/model/service/plugin/host.php new file mode 100644 index 00000000..4a99f651 --- /dev/null +++ b/modules/host/classes/model/service/plugin/host.php @@ -0,0 +1,57 @@ +array('foreign_key'=>'id','far_key'=>'domain_tld_id'), + 'host_server'=>array('far_key'=>'host_server_id','foreign_key'=>'id'), + ); + protected $_belongs_to = array( + 'service'=>array(), + ); + + protected $_display_filters = array( + 'domain_name'=>array( + array('strtoupper',array(':value')), + ), + 'host_expire'=>array( + array('Config::date',array(':value')), + ), + ); + + // Required abstract functions + public function service_view() { + return View::factory('service/user/plugin/host/view') + ->set('so',$this); + } + + public function name() { + return sprintf('%s.%s',$this->display('domain_name'),$this->domain_tld->display('name')); + } + + protected function _admin_update() { + } + + /** + * This provides us with a manage button to jump to the hosting server + * to manage the domain. + */ + public function manage_button() { + return ($this->host_username AND $this->host_password) ? $this->host_server->manage_button($this->host_username,$this->host_password,$this->name()) : ''; + } +} +?> diff --git a/modules/host/classes/service/host.php b/modules/host/classes/service/host.php new file mode 100644 index 00000000..435261f0 --- /dev/null +++ b/modules/host/classes/service/host.php @@ -0,0 +1,56 @@ + 60, + CURLOPT_FAILONERROR => TRUE, + CURLOPT_FOLLOWLOCATION => FALSE, + CURLOPT_HEADER => FALSE, + CURLOPT_HTTPPROXYTUNNEL => FALSE, + CURLOPT_RETURNTRANSFER => TRUE, + CURLOPT_TIMEOUT => 30, + CURLOPT_SSL_VERIFYHOST => FALSE, + CURLOPT_SSL_VERIFYPEER => FALSE, + CURLOPT_VERBOSE => FALSE, + ); + + /** + * Setup this class. We need to get our supplier details out of the database. + */ + public function __construct($sid) { + $this->so = ORM::factory('host_server',$sid); + } + + /** + * Our HTML button that will enable us to manage this domain. + */ + abstract public function manage_button($u,$p,$d); + + /** + * Return an instance of this class + * + * @return HeadImage + */ + public static function instance($supplier) { + $sc = sprintf('%s_%s',get_called_class(),$supplier); + + if (! class_exists($sc)) + throw new Kohana_Exception('Class doesnt exist for :supplier',array(':supplier'=>$supplier)); + else + return new $sc; + } +} +?> diff --git a/modules/host/classes/service/host/plesk.php b/modules/host/classes/service/host/plesk.php new file mode 100644 index 00000000..eb8b7097 --- /dev/null +++ b/modules/host/classes/service/host/plesk.php @@ -0,0 +1,34 @@ +so->manage_url,'login_up.php3'), + array('target'=>'w24','method'=>'post') + ); + $output .= Form::input($this->login_user_field,$u,array('type'=>'hidden')); + $output .= Form::input($this->login_pass_field,$p,array('type'=>'hidden')); + $output .= Form::button('submit',_('Manage'),array('class'=>'form_button')); + $output .= Form::close(); + + return $output; + } +} +?> diff --git a/modules/host/classes/service/host/tpp.php b/modules/host/classes/service/host/tpp.php new file mode 100644 index 00000000..9a8cc804 --- /dev/null +++ b/modules/host/classes/service/host/tpp.php @@ -0,0 +1,34 @@ +so->whitelabel_url,'execute/logon'), + array('target'=>'tpp','method'=>'post') + ); + $output .= Form::input($this->login_user_field,$u,array('type'=>'hidden')); + $output .= Form::input($this->login_pass_field,$p,array('type'=>'hidden')); + $output .= Form::button('submit',_('Manage'),array('class'=>'form_button')); + $output .= Form::close(); + + return $output; + } +} +?> diff --git a/modules/host/views/service/user/plugin/host/view.php b/modules/host/views/service/user/plugin/host/view.php new file mode 100644 index 00000000..e03e2152 --- /dev/null +++ b/modules/host/views/service/user/plugin/host/view.php @@ -0,0 +1,33 @@ + + + + + + + + + + + + +
Service Details
 
+ + + + + + + + + +
Domain Namename(); ?>
Hosting Expiredisplay('host_expire'); ?>
+
+ + manage_button()) { ?> + + + + + +
Panel Login
+
diff --git a/modules/host_registrar_plugin/host_registrar_plugin.inc.php b/modules/host_registrar_plugin/host_registrar_plugin.inc.php deleted file mode 100644 index 07528e4f..00000000 --- a/modules/host_registrar_plugin/host_registrar_plugin.inc.php +++ /dev/null @@ -1,169 +0,0 @@ - - * @copyright 2009 Deon George - * @link http://osb.leenooks.net - * - * @link http://www.agileco.com/ - * @copyright 2004-2008 Agileco, LLC. - * @license http://www.agileco.com/agilebill/license1-4.txt - * @author Tony Landis - * @package AgileBill - * @subpackage Module:HostRegistrarPlugin - */ - -/** - * The main AgileBill Host Registrar Plugin Class - * - * @package AgileBill - * @subpackage Module:HostRegistrarPlugin - */ -class host_registrar_plugin extends OSB_module { - ############################## - ## SEARCH ## - ############################## - function search($VAR) - { - - ### Read the contents of the /plugins/affiliate directory: - $count = 0; - chdir(PATH_PLUGINS . 'registrar'); - $dir = opendir(PATH_PLUGINS . 'registrar'); - while ($file_name = readdir($dir)) - { - if($file_name != '..' && $file_name != '.' && !eregi("^_", $file_name)) - { - $count++; - } - } - - # define the DB vars as a Smarty accessible block - global $smarty; - - # create the search record: - if($count > 0) - { - # create the search record - include_once(PATH_CORE . 'search.inc.php'); - $search = new CORE_search; - $arr['module'] = $this->module; - $arr['sql'] = ''; - $arr['limit'] = '999'; - $arr['order_by']= 'name'; - $arr['results'] = $count; - $search->add($arr); - - # define the search id and other parameters for Smarty - $smarty->assign('search_id', $search->id); - - # page: - $smarty->assign('page', '1'); - - # limit: - $smarty->assign('limit', '999'); - - # order_by: - $smarty->assign('order_by', 'name'); - - # define the result count - $smarty->assign('results', $count); - } - } - - ############################## - ## SEARCH SHOW ## - ############################## - function search_show($VAR) - { - - ### Read the contents of the /plugins/db_mapping directory: - $count = 0; - chdir(PATH_PLUGINS . 'registrar'); - $dir = opendir(PATH_PLUGINS . 'registrar'); - while ($file_name = readdir($dir)) - { - if($file_name != '..' && $file_name != '.' && !eregi("^_", $file_name) ) - { - $result[$count]['name'] = eregi_replace('.php', '', $file_name); - $result[$count]['id'] = $count; - - ### Get the status of this plugin: - $db = &DB(); - $q = 'SELECT status,id FROM '.AGILE_DB_PREFIX.'host_registrar_plugin WHERE - file = '. $db->qstr($result[$count]['name']) . ' AND - site_id = '. $db->qstr(DEFAULT_SITE); - $dbmap = $db->Execute($q); - - ### error reporting: - if ($dbmap === false) - { - global $C_debug; - $C_debug->error('affiliate_plugin.inc.php','search_show', $db->ErrorMsg()); return; - } - - if($dbmap->RecordCount() > 0) - { - $result[$count]['id'] = $dbmap->fields['id']; - $result[$count]['status'] = 1; - $result[$count]['active'] = $dbmap->fields['status']; - } - else - { - $result[$count]['status'] = 0; - } - - $count++; - } - } - - - $class_name = TRUE; - for ($i=0; $iassign($this->table, $smart); - $smarty->assign('page', $VAR['page']); - $smarty->assign('order', $smarty_order); - $smarty->assign('sort', $smarty_sort); - $smarty->assign('limit', $search->limit); - $smarty->assign('search_id',$search->id); - $smarty->assign('results', $count); - - # total pages - $smarty->assign('pages', 1); - - # current page - $smarty->assign('page', 1); - $page_arr = ''; - - # page array for menu - $smarty->assign('page_arr', $page_arr); - } -} -?> diff --git a/modules/host_registrar_plugin/host_registrar_plugin_construct.xml b/modules/host_registrar_plugin/host_registrar_plugin_construct.xml deleted file mode 100644 index 6366dfb2..00000000 --- a/modules/host_registrar_plugin/host_registrar_plugin_construct.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - host_registrar_plugin - - host_registrar_plugin
- - - - 0 - - name - - 25 - - 1 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - Active - L - - - C(32) - 1 - 2 - 32 - any - - - C(32) - 1 - 2 - 32 - any - - - X2 - array - - - - - - status,name,file,plugin_data - id,site_id,status,name,file,plugin_data - id,site_id,status,name,file,plugin_data - id,site_id,status,name,file,plugin_data - id,site_id,status,name,file,plugin_data - - - - - - - - - - - - -
diff --git a/modules/host_registrar_plugin/host_registrar_plugin_install.xml b/modules/host_registrar_plugin/host_registrar_plugin_install.xml deleted file mode 100644 index bc49746e..00000000 --- a/modules/host_registrar_plugin/host_registrar_plugin_install.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - Host Registrar Plugins - - 1 - - host_registrar_plugin - - - - host_server - - - - - - - - - - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/host_registrar_plugin/host_registrar_plugin_install_data.xml b/modules/host_registrar_plugin/host_registrar_plugin_install_data.xml deleted file mode 100644 index 91da153e..00000000 --- a/modules/host_registrar_plugin/host_registrar_plugin_install_data.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - 1 - 1 - 1 - manual - MANUAL - - - - 2 - - diff --git a/modules/host_server/host_server.inc.php b/modules/host_server/host_server.inc.php deleted file mode 100644 index 3bd75d44..00000000 --- a/modules/host_server/host_server.inc.php +++ /dev/null @@ -1,221 +0,0 @@ - - * @copyright 2009 Deon George - * @link http://osb.leenooks.net - * - * @link http://www.agileco.com/ - * @copyright 2004-2008 Agileco, LLC. - * @license http://www.agileco.com/agilebill/license1-4.txt - * @author Tony Landis - * @package AgileBill - * @subpackage Module:HostServer - */ - -/** - * The main AgileBill Hosting Server Class - * - * @package AgileBill - * @subpackage Module:HostServer - */ -class host_server extends OSB_module { - # Manual add - function host_manual_new($service, $server, $account) { } - - # Manual edit - function host_manual_edit($service, $server, $account) { } - - # Manual activate - function host_manual_active($service, $server, $account) { } - - # Manual deactivate - function host_manual_inactive($service, $server, $account) { } - - # Manual delete - function host_manual_delete($service, $server, $account) { } - - - # Generate a new login - function generate_login($service,$account,$max_un_len, $max_pw_len, $shared) { - # define username - if($service['host_username'] != '') { - $ret['username'] = $service['host_username']; - } else { - if ($shared == false) { - # is username already in use on this server? - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'service WHERE - id != ' . $db->qstr( $service['id'] ) . ' AND - host_server_id = ' . $db->qstr( $service['host_server_id'] ) . ' AND - host_username = ' . $db->qstr( $account['username'] ) . ' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - if ($rs->RecordCount() == 0) { - $ret['username'] = $account['username']; - } else { - $ret['username'] = $this->generate_login1($max_un_len); - } - } else { - $ret['username'] = $account['username']; - } - } - - # define password - if($service['host_password'] != '') { - $ret['password'] = $service['host_password']; - } else { - $ret['password'] = $this->generate_login1($max_pw_len); - } - - # save the username/password for this service - $db = &DB(); - $sql = 'UPDATE ' . AGILE_DB_PREFIX . 'service - SET - host_username = ' . $db->qstr( $ret['username'] ) . ', - host_password = ' . $db->qstr( $ret['password'] ) . ' - WHERE - id = ' . $db->qstr( $service['id'] ) . ' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $db->Execute($sql); - return $ret; - } - - - # random un/pw - function generate_login1($length) - { - srand((double)microtime()*1000000); - $vowels = array("a", "e", "i", "o", "u"); - $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", - "r", "s", "t", "u", "v", "w", "tr", "cr", "br", "fr", "th", - "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl"); - $num_vowels = count($vowels); - $num_cons = count($cons); - for($i = 0; $i < $length; $i++){ - @$rand .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)]; - } - return $rand; - } - - # use ip address - function useipaddress($service, $server) - { - if($service['host_ip'] != '') return $service['host_ip']; - - $pat = "\r\n"; - $ips_r = ''; - @$ips = explode($pat, $server['ip_based_ip']); - for($i=0; $imethod["$type"] = explode(",", $this->method["$type"]); - $dx = new CORE_database; - $rs = $dx->view($VAR, $this, $type); - - # get the list of available servers to define as "next server" - $db = &DB(); - $sql= 'SELECT id,name FROM ' . AGILE_DB_PREFIX . 'host_server WHERE - id != ' . $db->qstr( $rs[0]['id'] ) . ' AND - next_host_server_id != ' . $db->qstr( $rs[0]['id'] ) . ' AND - provision_plugin = ' . $db->qstr( $rs[0]['provision_plugin'] ) . ' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - if(@$rs->RecordCount() > 0) - { - $arr[0] = ''; - while(!$rs->EOF) { - $arr[$rs->fields['id']] = $rs->fields['name']; - $rs->MoveNext(); - } - $smarty->assign('next_server_options', $arr); - $smarty->assign('next_server', true); - - } else { - $smarty->assign('next_server', false); - } - } -} -?> diff --git a/modules/host_server/host_server_construct.xml b/modules/host_server/host_server_construct.xml deleted file mode 100644 index 80abd5ee..00000000 --- a/modules/host_server/host_server_construct.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - host_server - - host_server
- - - - 0 - - name - - 25 - - 0 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - Active - L - - - L - - - C(128) - 1 - 128 - any - - - C(255) - - - C(128) - 1 - 128 - - - X2 - array - - - I4 - - - I4 - host_server - name - - - L - - - C(32) - - - L - - - X2 - - - C(128) - - - C(128) - - - C(128) - - - C(128) - - - C(64) - - - - - - status,debug,name,notes,provision_plugin,name_based,name_based_ip,ip_based,ip_based_ip,ns_ip_secondary,ns_ip_primary,ns_primary,ns_secondary,keycode - id,site_id,status,debug,name,notes,provision_plugin,provision_plugin_data,max_accounts,next_host_server_id,name_based,name_based_ip,ip_based,ip_based_ip,ns_ip_secondary,ns_ip_primary,ns_primary,ns_secondary,keycode - id,site_id,status,debug,name,notes,provision_plugin,provision_plugin_data,max_accounts,next_host_server_id,name_based,name_based_ip,ip_based,ip_based_ip,ns_ip_secondary,ns_ip_primary,ns_primary,ns_secondary,keycode - id,site_id,status,debug,name,notes,provision_plugin,provision_plugin_data,max_accounts,next_host_server_id,name_based,name_based_ip,ip_based,ip_based_ip,ns_ip_secondary,ns_ip_primary,ns_primary,ns_secondary,keycode - id,site_id,status,debug,name,notes,provision_plugin,provision_plugin_data,max_accounts,next_host_server_id,name_based,name_based_ip,ip_based,ip_based_ip,ns_ip_secondary,ns_ip_primary,ns_primary,ns_secondary,keycode - - - - - - - - - - - - - - id - checkbox - 25px - - - name - - - provision_plugin - - - name_based_ip - - - max_accounts - - - status - bool_icon - 20px - - - -
diff --git a/modules/host_server/host_server_install.xml b/modules/host_server/host_server_install.xml deleted file mode 100644 index 479581c7..00000000 --- a/modules/host_server/host_server_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Hosting Servers - - 1 - - host_server - - - - - - host_tld,host_registrar_plugin - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/host_tld/auth.inc.php b/modules/host_tld/auth.inc.php deleted file mode 100644 index 87d52290..00000000 --- a/modules/host_tld/auth.inc.php +++ /dev/null @@ -1,8 +0,0 @@ - 'host_tld', 'method' => 'whois'), -Array ('module' => 'host_tld', 'method' => 'whois_transfer'), -Array ('module' => 'host_tld', 'method' => 'whois_mass') -); -?> \ No newline at end of file diff --git a/modules/host_tld/host_tld.inc.php b/modules/host_tld/host_tld.inc.php deleted file mode 100644 index ef0dde04..00000000 --- a/modules/host_tld/host_tld.inc.php +++ /dev/null @@ -1,348 +0,0 @@ - - * @copyright 2009 Deon George - * @link http://osb.leenooks.net - * - * @link http://www.agileco.com/ - * @copyright 2004-2008 Agileco, LLC. - * @license http://www.agileco.com/agilebill/license1-4.txt - * @author Tony Landis - * @package AgileBill - * @subpackage Module:Domains - */ - -/** - * The main AgileBill Module Domains Class - * - * @package AgileBill - * @subpackage Module:Domains - */ -class host_tld extends OSB_module { - - /** - * Get the TLD pricing array - * - * @param string $tld - * @param string $type park, register, renew - * @param int $product_id - * @param array $discount_products - * @param float $discount_rate - * @param int $account - * @return array - */ - function price_tld_arr($tld, $type, $product_id=false, $discount_products=false, $discount_rate=false, $account=SESS_ACCOUNT) - { - # get the plugin for this domain: - $db = &DB(); - $result = $db->Execute(sqlSelect($db,"host_tld","*","name=::$tld:: AND status=1")); - if($result == false || $result->RecordCount() == 0) return false; - - # serialize: - global $C_auth; - $p_arr = unserialize($result->fields["price_group"]); - - # get the pricing for domain parking: - if($type == "park") { - if($p_arr[0]["show"] != "1") { - return false; - } else { - $i = 0; - $type = $register; - while (list ($group, $vals) = each ($p_arr[$i])) - if (gettype($group) != 'string' && $C_auth->auth_group_by_account_id($account, $group)) - if(empty($price) || $vals["register"] < $price) - $price = $vals["register"]; - return $price; - } - } else { - # get any hosting discounts for this product: - if(!empty($discount_products)) { - $d_arr = unserialize($discount_products); - for($ii=0; $iifields["id"]) - $hosting_discount = $discount_rate; - } - } - - if(empty($hosting_discount)) $hosting_discount = false; - - # get the pricing details for registrations/transfers for this TLD: - if(count($p_arr) > 0) - for($i=1; $i<=10; $i++) - if($p_arr[$i]["show"] == "1") - while (list ($group, $vals) = each ($p_arr[$i])) - if (gettype($group) != 'string' && $C_auth->auth_group_by_account_id($account, $group)) - if(empty($price[$i]) || $vals[$type] < $price[$i]) - if(!empty($vals[$type])) - if($hosting_discount != false) - $price[$i] = $vals[$type] - ($vals[$type] * $hosting_discount); - else - $price[$i] = $vals[$type]; - return $price; - } - return false; - } - - - /** SUGGEST RESULTS - */ - function suggest($VAR) - { - $db = &DB(); - $dbm = new CORE_database; - $sql = $dbm->sql_select('host_tld','name,default_term_new', "auto_search = 1 AND status = 1", "name", $db); - $rs = $db->Execute($sql); - while(!$rs->EOF) { - $smart[] = $rs->fields; - $rs->MoveNext(); - } - - $count = count($smart); - $js = "var tldArr = new Array($count); var tldCount = $count; "; - for($i=0; $i<$count; $i++) - $js .= "tldArr[$i] = '{$smart[$i]['name']}'; "; - - global $smarty; - $smarty->assign('tlds', $smart); - $smarty->assign('javascript', $js); - } - - /** WHOIS LOOKUP - */ - function whois_mass($VAR) - { - global $smarty, $C_debug, $C_translate; - $db = &DB(); - - if(!empty($VAR['domains'])) - { - $arr = explode("\r\n", $VAR['domains']); - $domains =''; - $msg =''; - // loop through each row - for($i=0; $i$td) { - if($key > 0) { - if(!empty($tld)) $tld .='.'; - $tld .= $td; - } - } - - # check for duplicates - $do=true; - for($ii=0; $iivalue['host_tld']['domain'] = ''.$domain.".".$tld.''; - $C_translate->value['host_tld']['tld'] = ''.$tld.''; - - # get the plugin for this domain: - $result = $db->Execute(sqlSelect($db,"host_tld","*","name=::$tld:: AND status=1")); - if($result == false || $result->RecordCount() == 0) - { - ### INVALID TLD - $msg .= $C_translate->translate('search_mass_err_tld','host_tld','') . '
'; - } - else - { - # get the whois plugin details for this TLD & check avail - $file = $result->fields['whois_plugin']; - $data = unserialize($result->fields['whois_plugin_data']); - include_once(PATH_PLUGINS . 'whois/'. $file.'.php'); - eval ( '$_WHOIS = new plgn_whois_'. strtoupper ( $file ) . ';' ); - if($_WHOIS->check($domain, $tld, $data)) - { - $smarty->assign("checkout", true); - $domains .= $domain.'.'.$tld."\r\n"; - $domainarr[] = Array($domain,$tld); - } else { - ### DOMAIN NOT AVAILABLE - $msg .= $C_translate->translate('search_mass_err_dom','host_tld','') . '
'; - } - } - } - } - } - if($msg) $C_debug->alert($msg); - $smarty->assign('domains', @$domains); - $smarty->assign('domainarr', @$domainarr); - } - } - - /** - * WHOIS RESPONSE - */ - function whois_reponse($type, $VAR, $response, $park=0) { - if(defined('AJAX')) { - - if($type=='register') { - if($response) - echo 'available('.$park.');'; - else - echo 'unavailable();'; - - } elseif($type=='transfer') { - if($response) - echo 'unavailable();'; - else - echo 'available();'; - - } elseif($type=='suggest') { - if($response) - echo "domainUpdate('{$VAR['domain']}','{$VAR['tld']}','register','{$VAR['element']}',1);"; - else - echo "domainUpdate('{$VAR['domain']}','{$VAR['tld']}','register','{$VAR['element']}',0);"; - } - } - return $response; - } - - /** - * WHOIS LOOKUP - */ - function whois($VAR) - { - if(!empty($VAR['tld']) && !empty($VAR['domain'])) - { - $db = &DB(); - # check this domain & tld is not already in the service table: - $rs = $db->Execute(sqlSelect($db,"service","id","domain_name = ::{$VAR['domain']}:: AND domain_tld = ::{$VAR['tld']}::")); - if($rs && $rs->RecordCount()) { - //$smarty->assign("whois_result", "0"); - //echo 'unavailable();'; - return $this->whois_reponse($VAR['type'], $VAR, false); - } - - # check this domain & tld is not already in the shopping cart: - $rs = $db->Execute(sqlSelect($db,"cart","id","domain_name = ::{$VAR['domain']}:: AND domain_tld = ::{$VAR['tld']}::")); - if($rs && $rs->RecordCount()) { - return $this->whois_reponse($VAR['type'], $VAR, false); - } - - # get the plugin for this domain: - $result = $db->Execute(sqlSelect($db,"host_tld","*","name=::{$VAR['tld']}:: AND status=1")); - if($result == false || $result->RecordCount() == 0) { - return $this->whois_reponse($VAR['type'], $VAR, false); - } - - # get the whois plugin details for this TLD - $file = $result->fields['whois_plugin']; - $data = unserialize($result->fields['whois_plugin_data']); - - # allow parking? - $price = unserialize ( $result->fields['price_group'] ); - $park = $price["0"]["show"]; - - # initialize the whois plugin: - include_once(PATH_PLUGINS . 'whois/'. $file.'.php'); - eval ( '$_WHOIS = new plgn_whois_'. strtoupper ( $file ) . ';' ); - - if($_WHOIS->check($VAR['domain'], $VAR['tld'], $data)) - return $this->whois_reponse($VAR['type'], $VAR, true, $park); - else - return $this->whois_reponse($VAR['type'], $VAR, false, $park); - - } else { - return $this->whois_reponse($VAR['type'], $VAR, false, $park); - } - } - - /** - * WHOIS TRANSFER LOOKUP - */ - function whois_transfer($VAR) - { - global $smarty; - if(!empty($VAR['tld']) && !empty($VAR['domain'])) - { - $db = &DB(); - - # check this domain & tld is not already in the service table: - $rs = $db->Execute(sqlSelect($db,"service","id","domain_name = ::{$VAR['domain']}:: AND domain_tld = ::{$VAR['tld']}::")); - if($rs && $rs->RecordCount()) { - $smarty->assign("whois_result", "0"); - return; - } - - # check this domain & tld is not already in the shopping cart: - $rs = $db->Execute(sqlSelect($db,"cart","id","domain_name = ::{$VAR['domain']}:: AND domain_tld = ::{$VAR['tld']}::")); - if($rs && $rs->RecordCount()) { - $smarty->assign("whois_result", "0"); - return; - } - - # get the plugin for this domain: - $result = $db->Execute(sqlSelect($db,"host_tld","*","name=::{$VAR['tld']}:: AND status=1")); - if($result == false || $result->RecordCount() == 0) { - $smarty->assign("whois_result", "0"); - return; - } - - # get the pricing details to see if transfers are allowed for this TLD: - $p_arr = unserialize($result->fields["price_group"]); - $transfer = false; - if(count($p_arr) > 0) - for($i=1; $i<=10; $i++) - if($p_arr[$i]["show"] == "1") - while(list($key,$val) = each($p_arr[$i])) - if(isset($val["transfer"]) && $val["transfer"] > 1) $transfer = true; - - if(!$transfer) - { - $smarty->assign("whois_result", "0"); - return; - } - - # get the whois plugin details for this TLD - $file = $result->fields['whois_plugin']; - $data = unserialize($result->fields['whois_plugin_data']); - - # initialize the whois plugin: - include_once(PATH_PLUGINS . 'whois/'. $file.'.php'); - eval ( '$_WHOIS = new plgn_whois_'. strtoupper ( $file ) . ';' ); - - if($_WHOIS->check_transfer($VAR['domain'], $VAR['tld'], $data)) - { - $smarty->assign("whois_result", "1"); - return; - } - else - { - $smarty->assign("whois_result", "0"); - return; - } - } - else - { - $smarty->assign("whois_result", "0"); - return; - } - } -} -?> diff --git a/modules/host_tld/host_tld_construct.xml b/modules/host_tld/host_tld_construct.xml deleted file mode 100644 index 50c50f63..00000000 --- a/modules/host_tld/host_tld_construct.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - host_tld - - host_tld
- - - - 15 - - name - - 25 - - 0 - - - - status - name - auto_search - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - Date Created - I8 - - - - date-now - Date Updated - I8 - - - - Active - L - - - Extension Name - C(128) - any - - - Taxable - L - - - Whois Plugin - C(32) - 1 - 32 - - - X2 - array - - - Registrar Plugin - I4 - host_registrar_plugin - name - - - X2 - array - - - Auto Search - L - - - Default Term - I4 - 1 - 2 - numeric - - - X2 - array - - - - - - status,name,whois_plugin,auto_search,default_term_new,taxable - id,site_id,status,name,whois_plugin,whois_plugin_data,registrar_plugin_id,registrar_plugin_data,auto_search,default_term_new,price_group,taxable - id,site_id,status,name,whois_plugin,whois_plugin_data,registrar_plugin_id,registrar_plugin_data,auto_search,default_term_new,price_group,taxable - id,site_id,status,name,whois_plugin,whois_plugin_data,registrar_plugin_id,registrar_plugin_data,auto_search,default_term_new,price_group,taxable - id,site_id,status,name,whois_plugin,whois_plugin_data,registrar_plugin_id,registrar_plugin_data,auto_search,default_term_new,price_group,taxable - - - - - - - - <add>Add TLD</add> - - - - - - - id - checkbox - 25px - - - name - - - status - bool_icon - 20px - - - whois_plugin - - - registrar_plugin_id - - - -
diff --git a/modules/host_tld/host_tld_install.xml b/modules/host_tld/host_tld_install.xml deleted file mode 100644 index 7ced8540..00000000 --- a/modules/host_tld/host_tld_install.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - Domain TLD - - 1 - - host_tld - - - - host_server - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/host_tld/host_tld_install_data.xml b/modules/host_tld/host_tld_install_data.xml deleted file mode 100644 index cce3e428..00000000 --- a/modules/host_tld/host_tld_install_data.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - 1 - 1 - 1 - com - 0 - DEFAULT - - 1 - - 1 - 1 - - - - 2 - 1 - 1 - net - 1 - DEFAULT - - 1 - - 1 - 1 - - - - 3 - 1 - 1 - org - 1 - DEFAULT - - 1 - - 1 - 2 - - - - 4 - 1 - 1 - com.au - 1 - DEFAULT - - 1 - - 1 - 2 - - - - 5 - 1 - 1 - net.au - 1 - DEFAULT - - 1 - - 1 - 2 - - - - 6 - 1 - 1 - org.au - 1 - DEFAULT - - 1 - - 1 - 2 - - - - 6 - - diff --git a/modules/invoice/classes/controller/task/invoice.php b/modules/invoice/classes/controller/task/invoice.php index 87c2ab59..84488a69 100644 --- a/modules/invoice/classes/controller/task/invoice.php +++ b/modules/invoice/classes/controller/task/invoice.php @@ -53,7 +53,7 @@ class Controller_Task_Invoice extends Controller_Task { $io = ORM::factory('invoice'); $key = 'remind_due'; - foreach ($io->list_due(time()-86400*$days) as $io) { + foreach ($io->list_due(time()+86400*$days) as $io) { // If we have already sent a reminder, we'll skip to the next one. if ($io->remind($key) AND (is_null($x=$this->request->param('id')) OR $x != 'again')) continue; diff --git a/modules/invoice/classes/model/invoice.php b/modules/invoice/classes/model/invoice.php index 82f75114..fd23a7ab 100644 --- a/modules/invoice/classes/model/invoice.php +++ b/modules/invoice/classes/model/invoice.php @@ -170,7 +170,7 @@ class Model_Invoice extends ORMOSB { foreach ($this->items_main() as $ito) { $unique = TRUE; - $t = $ito->product->summary(); + $t = $ito->product->name(); if (! isset($result[$t])) { $result[$t]['quantity'] = 0; $result[$t]['subtotal'] = 0; @@ -373,29 +373,26 @@ class Model_Invoice extends ORMOSB { /** LIST FUNCTIONS **/ + private function _list_due() { + // @todo This rounding should be a system configuration + return $this->where('round(total_amt-ifnull(credit_amt,0),2)','>','=billed_amt') + ->and_where('status','=',1) + ->order_by('due_date,account_id,id'); + } + /** * Identify all the invoices that are due */ - private function _list_due($time=NULL,$op='<=') { + public function list_overdue($time=NULL) { if (is_null($time)) $time = time(); // @todo This rounding should be a system configuration - return $this - ->where('round(total_amt-ifnull(credit_amt,0),2)','>','=billed_amt') - ->and_where('due_date',$op,$time) - ->and_where('status','=',1) - ->order_by('due_date,account_id,id') + return $this->_list_due() + ->and_where('due_date','<=',$time) ->find_all(); } - /** - * Return a list of invoices that are over their due date. - */ - public function list_overdue($time=NULL) { - return $this->_list_due($time,'<='); - } - /** * Return a list of invoices that are over their due date with/without auto billing */ @@ -419,7 +416,15 @@ class Model_Invoice extends ORMOSB { * Return a list of invoices that are due, excluding overdue. */ public function list_due($time=NULL) { - return $this->_list_due($time,'>'); + if (is_null($time)) + return $this->_list_due() + ->and_where('due_date','>',time()) + ->find_all(); + else + return $this->_list_due() + ->and_where('due_date','<=',$time) + ->and_where('due_date','>',time()) + ->find_all(); } } ?> diff --git a/modules/invoice/classes/model/invoice/item.php b/modules/invoice/classes/model/invoice/item.php index cd320cef..a6aa87b5 100644 --- a/modules/invoice/classes/model/invoice/item.php +++ b/modules/invoice/classes/model/invoice/item.php @@ -39,7 +39,7 @@ class Model_Invoice_Item extends ORMOSB { if ($this->item_type != 0) return; - return $this->service->details('invoice'); + return $this->service->details('invoice_detail_items'); } public function subtotal() { diff --git a/modules/product/classes/controller/product.php b/modules/product/classes/controller/product.php index 200e66e6..87ffb7ae 100644 --- a/modules/product/classes/controller/product.php +++ b/modules/product/classes/controller/product.php @@ -36,7 +36,7 @@ class Controller_Product extends Controller_TemplateDefault { * Obtain a list of pages in a category */ private function _get_category($id) { - return ORM::factory('product')->category($id); + return ORM::factory('product')->list_category($id); } /** diff --git a/modules/product/classes/model/product.php b/modules/product/classes/model/product.php index 940b1f28..6490dfb0 100644 --- a/modules/product/classes/model/product.php +++ b/modules/product/classes/model/product.php @@ -14,6 +14,7 @@ class Model_Product extends ORMOSB { // @todo this doesnt have our site_id when getting the translation protected $_has_many = array( 'product_translate'=>array('far_key'=>'id'), + 'service'=>array('far_key'=>'id'), ); protected $_sorting = array( @@ -27,21 +28,6 @@ class Model_Product extends ORMOSB { ), ); - /** - * The feature summary should be implemented in child objects. - * It is displayed on the product overview page, as a summary of the products features. - */ - protected function _feature_summary() { - throw new Kohana_Exception(':method not defined in child class :class',array(':method'=>__METHOD__,':class'=>get_class($this))); - } - - /** - * The summary should be implemented in child objects. - */ - protected function _summary() { - return _('No Description'); - } - /** * Return the object of the product plugin */ @@ -52,8 +38,7 @@ class Model_Product extends ORMOSB { if (! is_numeric($this->prod_plugin_data)) throw new Kohana_Exception('Missing plugin_id for :product (:type)',array(':product'=>$this->id,':type'=>$this->prod_plugin_file)); - $spn = sprintf('%s_%s',get_class($this),$this->prod_plugin_file); - return new $spn($this->prod_plugin_data); + return ORM::factory(sprintf('product_plugin_%s',$this->prod_plugin_file),$this->prod_plugin_data); } /** @@ -67,36 +52,7 @@ class Model_Product extends ORMOSB { * This will render the product feature summary information */ public function feature_summary() { - if (is_null($plugin = $this->plugin())) - return HTML::nbsp(''); - else - return $plugin->_feature_summary(); - } - - /** - * Get the summary description - * - * Generally this is used on the invoice summary page - */ - public function summary() { - if (is_null($plugin = $this->plugin())) - return _('Other'); - else - return $plugin->_summary(); - } - - /** - * Return the products for a given category - * @todo This shouldnt be here. - */ - public function category($cat) { - $results = array(); - foreach ($this->where('active','=',TRUE)->find_all() as $po) { - if ($c = unserialize($po->avail_category_id) AND in_array($cat,$c)) - array_push($results,$po); - } - - return $results; + return (is_null($plugin = $this->plugin())) ? HTML::nbsp('') : $plugin->feature_summary(); } /** @@ -155,5 +111,20 @@ class Model_Product extends ORMOSB { // @todo Change the ALT to the product name. echo HTML::image($thumb,array('alt'=>_('Thumb Nail'))); } + + /** + * Return the products for a given category + * @todo This shouldnt be here. + */ + public function list_category($cat) { + $results = array(); + + foreach ($this->where('active','=',TRUE)->find_all() as $po) { + if ($c = unserialize($po->avail_category_id) AND in_array($cat,$c)) + array_push($results,$po); + } + + return $results; + } } ?> diff --git a/modules/product/classes/model/product/category.php b/modules/product/classes/model/product/category.php index 8c1f91e4..e095aa8b 100644 --- a/modules/product/classes/model/product/category.php +++ b/modules/product/classes/model/product/category.php @@ -16,5 +16,14 @@ class Model_Product_Category extends ORMOSB { protected $_sorting = array( 'name'=>'asc', ); + + public function list_bylistgroup($cat) { + $result = array(); + + foreach ($this->where('list_group','=',$cat)->find_all() as $pco) + $result[$pco->id] = $pco; + + return $result; + } } ?> diff --git a/modules/product/classes/model/product/plugin.php b/modules/product/classes/model/product/plugin.php new file mode 100644 index 00000000..7d0dd142 --- /dev/null +++ b/modules/product/classes/model/product/plugin.php @@ -0,0 +1,23 @@ + diff --git a/modules/product/classes/model/product/adsl.php b/modules/product/classes/model/product/plugin/adsl.php similarity index 78% rename from modules/product/classes/model/product/adsl.php rename to modules/product/classes/model/product/plugin/adsl.php index 2d8ea318..928857af 100644 --- a/modules/product/classes/model/product/adsl.php +++ b/modules/product/classes/model/product/plugin/adsl.php @@ -10,11 +10,11 @@ * @copyright (c) 2010 Open Source Billing * @license http://dev.osbill.net/license.html */ -class Model_Product_ADSL extends Model_Product { +class Model_Product_Plugin_ADSL extends Model_Product_Plugin { protected $_table_name = 'adsl_plan'; - protected $_primary_key = 'id'; - protected $_sorting = array( + protected $_belongs_to = array( + 'adsl_supplier_plan'=>array(), ); protected $_display_filters = array( @@ -28,15 +28,13 @@ class Model_Product_ADSL extends Model_Product { ), ); - protected function _feature_summary() { - return View::factory('product/adsl/feature_summary') + // Our required abstract methods + public function feature_summary() { + // @todo This view should render based on the the results of this::allowance(); + return View::factory('product/plugin/adsl/feature_summary') ->set('po',$this); } - protected function _summary() { - return sprintf('%s: %s %s','ADSL Services',$this->speed,$this->allowance(TRUE)); - } - /** * Show the ADSL allowance as a peak/offpeak metric */ diff --git a/modules/product/classes/model/product/plugin/domain.php b/modules/product/classes/model/product/plugin/domain.php new file mode 100644 index 00000000..c7f2b6c5 --- /dev/null +++ b/modules/product/classes/model/product/plugin/domain.php @@ -0,0 +1,41 @@ +
%s
',_('Domains are available with the following suffixes')); + $output .= Table::display( + $t->where('status','=','1')->find_all(), + 25, + array( + 'display("name")'=>array('label'=>'TLD Suffix'), + ), + array( + )); + $output .= '
'; + + return $output; + } +} +?> diff --git a/modules/product/classes/model/product/plugin/host.php b/modules/product/classes/model/product/plugin/host.php new file mode 100644 index 00000000..32c5bf85 --- /dev/null +++ b/modules/product/classes/model/product/plugin/host.php @@ -0,0 +1,25 @@ + diff --git a/modules/product/views/product/adsl/feature_summary.php b/modules/product/views/product/plugin/adsl/feature_summary.php similarity index 100% rename from modules/product/views/product/adsl/feature_summary.php rename to modules/product/views/product/plugin/adsl/feature_summary.php diff --git a/modules/product/views/product/view.php b/modules/product/views/product/view.php index 3567a08a..4d3e5f24 100644 --- a/modules/product/views/product/view.php +++ b/modules/product/views/product/view.php @@ -42,6 +42,13 @@ echo Form::open('cart/add'); echo '
'.$pio->contract_view($record->prod_plugin_data,$record->price_base,$record->price_setup).'
'.$pio->feature_summary().'
 
'form_button')); ?> | 'disabled'),array('class'=>'form_button')); ?> 
'.$pio->product_cart($record->prod_plugin_data).'
'form_button','disabled'=>'disabled')); ?> | 'disabled'),array('class'=>'form_button')); ?>
diff --git a/modules/service/classes/controller/admin/service.php b/modules/service/classes/controller/admin/service.php index ce06aac0..67adf01b 100644 --- a/modules/service/classes/controller/admin/service.php +++ b/modules/service/classes/controller/admin/service.php @@ -1,7 +1,7 @@ 'services'); - protected $secure_actions = array( 'list'=>TRUE, 'listbycheckout'=>TRUE, 'listadslbilling'=>TRUE, 'listadslservices'=>TRUE, + 'listdomainservices'=>TRUE, + 'listhostservices'=>TRUE, 'listhspaservices'=>TRUE, 'update'=>TRUE, ); @@ -26,17 +26,14 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin { * Show a list of services */ public function action_list() { - $so = ORM::factory('service'); - Block::add(array( - 'title'=>_('System Customer Services'), + 'title'=>_('Customer Services'), 'body'=>Table::display( - $so->find_all(), + ORM::factory('service')->find_all(), 25, array( 'id'=>array('label'=>'ID','url'=>'user/service/view/'), - 'type'=>array('label'=>'Type'), - 'name()'=>array('label'=>'Details'), + 'service_name()'=>array('label'=>'Details'), 'recur_schedule'=>array('label'=>'Billing'), 'price'=>array('label'=>'Price','class'=>'right'), 'active'=>array('label'=>'Active'), @@ -46,7 +43,7 @@ class Controller_Admin_Service extends Controller_TemplateDefault_Admin { array( 'page'=>TRUE, 'type'=>'select', - 'form'=>'user/email/view', + 'form'=>'user/service/view', )), )); } @@ -124,181 +121,163 @@ ORDER BY c.id,s.recur_schedule,c.name,a.company,a.last_name,a.first_name )); } - //@todo this should really be in a different class, since adsl wont be part of the main app - public function action_listadslservices() { - // @todo need to add the DB prefix here - $services = DB::query(Database::SELECT,' -SELECT A.service_id -FROM ab_service__adsl A,ab_service B,ab_account C,ab_service D,ab_product E -WHERE B.active=1 AND A.service_id=B.id AND A.site_id=B.site_id -AND B.account_id=C.id AND B.site_id=C.site_id -AND A.service_id=D.id AND A.site_id=D.site_id -AND D.product_id=E.id AND D.site_id=E.site_id -AND E.sku like "%ADSL%" -ORDER BY C.last_name,B.account_id,A.service_number - ') - ->execute(); + private function consoltraffic($svs,$date) { + $data = array(); - // @todo If no items, show a nice message. This is not correct for ORM. - if (! count($services)) { - echo Kohana::debug('No services for ADSL'); - die(); - } + foreach ($svs as $so) { + $c = array(); + foreach ($so->plugin()->get_traffic_data_monthly($date) as $metric => $ma) { + foreach ($ma as $month => $traffic) { + // Only count the service once, not for each metric. + if (! isset($c[$month])) { + if (isset($data['svs'][$month])) + $data['svs'][$month] += 1; + else + $data['svs'][$month] = 1; - $last_account = ''; - $i = 0; - $output = ''; - foreach ($services as $service) { - $so = ORM::factory('service',$service['service_id']); + $c[$month] = 1; + } - if ($last_account != $so->account_id) { - if ($i) - $output .= ''; - - $output .= View::factory('service/admin/list/adslservices_header') - ->set('service',$so); - - $last_account = $so->account_id; + if (isset($data['data'][$metric][$month])) + $data['data'][$metric][$month] += (int)$traffic; + else + $data['data'][$metric][$month] = (int)$traffic; + } } - - $output .= View::factory('service/admin/list/adslservices_body') - ->set('service',$so) - ->set('i',$i++%2); } - $output .= '
 
'; - // Chart the traffic for the last 12 months. - // @todo need to add the DB prefix here - $traffic = DB::query(Database::SELECT,sprintf(' -SELECT DATE_FORMAT(DATE,"%%y-%%m") AS MONTH,SID,MAX(NUM) AS NUM,SUM(DOWN_PEAK) AS DOWN_PEAK,SUM(IFNULL(DOWN_OFFPEAK,0)+IFNULL(PEER,0)+IFNULL(INTERNAL,0)) AS DOWN_OFFPEAK -FROM ab_view_traffic_adsl_daily -WHERE SID in (%s) AND DATE>"%s" -GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID - ','1,2',date('Y-m',time()-365*86400))) - ->execute(); + ksort($data['svs']); + foreach ($data['data'] as $metric => $details) + ksort($data['data'][$metric]); - $peak = $offpeak = $services = array(); + return $data; + } - foreach ($traffic as $a => $v) { - $peak[$v['SID']]['Peak'][$v['MONTH']] = $v['DOWN_PEAK']; - $peak[$v['SID']]['OffPeak'][$v['MONTH']] = $v['DOWN_OFFPEAK']; - $peak[$v['SID']]['Services'][$v['MONTH']] = $v['NUM']; - } + public function action_listadslservices() { + $svs = ORM::factory('service')->list_bylistgroup('ADSL'); + $data = $this->consoltraffic($svs,time()); $google = GoogleChart::factory('vertical_bar'); $google->title = sprintf('ADSL traffic as at %s',date('Y-m-d',strtotime('yesterday'))); - $google->series(array( - 'title'=>array('Exetel-Peak','Exetel-Offpeak'), - 'axis'=>'x', - 'data'=>array('Exetel-Peak'=>$peak[1]['Peak'],'Exetel-OffPeak'=>$peak[1]['OffPeak']))); - $google->series(array( - 'title'=>array('People-Peak','People-Offpeak'), - 'axis'=>'x', - 'data'=>array('People-Peak'=>$peak[2]['Peak'],'People-OffPeak'=>$peak[2]['OffPeak']))); - $google->series(array( - 'title'=>'Exetel-Services', - 'axis'=>'r', - 'data'=>array('Exetel-Services'=>$peak[1]['Services']))); - $google->series(array( - 'title'=>'People-Services', - 'axis'=>'r', - 'data'=>array('People-Services'=>$peak[2]['Services']))); + $google->series(array('title'=>array_keys($data['data']),'axis'=>'x','data'=>$data['data'])); + $google->series(array('title'=>'Services','axis'=>'r','data'=>array('Services'=>$data['svs']))); + + Block::add(array('body'=>$google)); Block::add(array( - 'body'=>$google, + 'title'=>_('ADSL Services'), + 'body'=>Table::display( + $svs, + NULL, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'name()'=>array('label'=>'Service'), + 'plugin()->ipaddress()'=>array('label'=>'IP Address'), + 'product->plugin()->allowance()'=>array('label'=>'Allowance'), + 'plugin()->traffic_thismonth()'=>array('label'=>'This Month'), + 'plugin()->traffic_lastmonth()'=>array('label'=>'Last Month'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'date_next_invoice'=>array('label'=>'Next Invoice'), + ), + array( + 'type'=>'select', + 'form'=>'user/service/view', + )), )); - - Block::add(array( - 'title'=>_('List all ADSL Services'), - 'body'=>$output, - )); - - Style::add(array( - 'type'=>'file', - 'data'=>'css/list.css', - )); } public function action_listhspaservices() { - // @todo need to add the DB prefix here - $services = DB::query(Database::SELECT,' -SELECT A.service_id -FROM ab_service__adsl A,ab_service B,ab_account C,ab_service D,ab_product E -WHERE B.active=1 AND A.service_id=B.id AND A.site_id=B.site_id -AND B.account_id=C.id AND B.site_id=C.site_id -AND A.service_id=D.id AND A.site_id=D.site_id -AND D.product_id=E.id AND D.site_id=E.site_id -AND E.sku like "%HSPA%" -ORDER BY C.last_name,B.account_id,A.service_number - ') - ->execute(); - - // @todo If no items, show a nice message. This is not correct for ORM. - if (! count($services)) { - echo Kohana::debug('No services for HSPA'); - die(); - } - - $last_account = ''; - $i = 0; - $output = ''; - foreach ($services as $service) { - $so = ORM::factory('service',$service['service_id']); - - if ($last_account != $so->account_id) { - if ($i) - $output .= ''; - - $output .= View::factory('service/admin/list/adslservices_header') - ->set('service',$so); - - $last_account = $so->account_id; - } - - $output .= View::factory('service/admin/list/adslservices_body') - ->set('service',$so) - ->set('i',$i++%2); - } - $output .= '
 
'; - - // Chart the traffic for the last 12 months. - // @todo need to add the DB prefix here - $traffic = DB::query(Database::SELECT,sprintf(' -SELECT DATE_FORMAT(DATE,"%%y-%%m") AS MONTH,SID,MAX(NUM) AS NUM,SUM(DOWN_PEAK)*1000 AS DOWN_PEAK,SUM(IFNULL(DOWN_OFFPEAK,0)+IFNULL(PEER,0)+IFNULL(INTERNAL,0))*1000 AS DOWN_OFFPEAK -FROM ab_view_traffic_adsl_daily -WHERE SID=%s AND DATE>"%s" -GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID - ',3,date('Y-m',time()-365*86400))) - ->execute(); - - $peak = $offpeak = $services = array(); - - foreach ($traffic as $a => $v) { - $peak['Peak'][$v['MONTH']] = $v['DOWN_PEAK']; - $peak['OffPeak'][$v['MONTH']] = $v['DOWN_OFFPEAK']; - $peak['Services'][$v['MONTH']] = $v['NUM']; - } + $svs = ORM::factory('service')->list_bylistgroup('HSPA'); + $data = $this->consoltraffic($svs,time()); $google = GoogleChart::factory('vertical_bar'); $google->title = sprintf('HSPA traffic as at %s',date('Y-m-d',strtotime('yesterday'))); - $google->series(array('title'=>array('Peak','Offpeak'),'axis'=>'x','data'=>array('Peak'=>$peak['Peak'],'OffPeak'=>$peak['OffPeak']))); - $google->series(array('title'=>'Services','axis'=>'r','data'=>array('Services'=>$peak['Services']))); + $google->series(array('title'=>array_keys($data['data']),'axis'=>'x','data'=>$data['data'])); + $google->series(array('title'=>'Services','axis'=>'r','data'=>array('Services'=>$data['svs']))); + + Block::add(array('body'=>$google)); Block::add(array( - 'body'=>$google, + 'title'=>_('HSPA Services'), + 'body'=>Table::display( + $svs, + NULL, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'name()'=>array('label'=>'Service'), + 'plugin()->ipaddress()'=>array('label'=>'IP Address'), + 'product->plugin()->allowance()'=>array('label'=>'Allowance'), + 'plugin()->traffic_thismonth()'=>array('label'=>'This Month'), + 'plugin()->traffic_lastmonth()'=>array('label'=>'Last Month'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'date_next_invoice'=>array('label'=>'Next Invoice'), + ), + array( + 'type'=>'select', + 'form'=>'user/service/view', + )), )); - - Block::add(array( - 'title'=>_('List all HSPA Services'), - 'body'=>$output, - )); - - Style::add(array( - 'type'=>'file', - 'data'=>'css/list.css', - )); } + public function action_listdomainservices() { + $svs = ORM::factory('service')->list_bylistgroup('DOMAIN'); + Sort::MAsort($svs,'name()'); + + Block::add(array( + 'title'=>_('Domain Names'), + 'body'=>Table::display( + $svs, + 25, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'service_name()'=>array('label'=>'Details'), + 'plugin()->display("domain_expire")'=>array('label'=>'Expire'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'display("date_next_invoice")'=>array('label'=>'Next Invoice'), + ), + array( + 'page'=>TRUE, + 'type'=>'select', + 'form'=>'user/service/view', + )), + )); + } + + public function action_listhostservices() { + $svs = ORM::factory('service')->list_bylistgroup('HOST'); + Sort::MAsort($svs,'name()'); + + Block::add(array( + 'title'=>_('Hosting Services'), + 'body'=>Table::display( + $svs, + 25, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'service_name()'=>array('label'=>'Details'), + 'plugin()->display("host_expire")'=>array('label'=>'Expire'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'display("date_next_invoice")'=>array('label'=>'Next Invoice'), + ), + array( + 'page'=>TRUE, + 'type'=>'select', + 'form'=>'user/service/view', + )), + )); + } /** * Reconcile billing for an ADSL supplier * @@ -328,18 +307,24 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID $output = View::factory('service/admin/list/adslbilling_head'); $output .= ''; foreach ($aso->services(TRUE) as $so) { + $po = $so->plugin()->product(); + // Reset our uploaded data $uploaded = array(); + $uploaded['excess'] = empty($csv[$so->plugin()->service_number]['excess']) ? 0 : $csv[$so->plugin()->service_number]['excess']; + // If our uploaded file has some cost data. - if (! empty($csv[$so->service_adsl->service_number])) { + if (! empty($csv[$so->plugin()->service_number])) { $uploaded['amount'] = - (empty($csv[$so->service_adsl->service_number]['cost']) ? 0 : $csv[$so->service_adsl->service_number]['cost']) + - (empty($csv[$so->service_adsl->service_number]['credit']) ? 0 : $csv[$so->service_adsl->service_number]['credit']); + (empty($csv[$so->plugin()->service_number]['cost']) ? 0 : $csv[$so->plugin()->service_number]['cost']) + + (empty($csv[$so->plugin()->service_number]['credit']) ? 0 : $csv[$so->plugin()->service_number]['credit']); // Record the the exception if the cost is not expected - if (round($so->service_adsl->adsl_plan->adsl_supplier_plan->base_cost+$so->service_adsl->adsl_plan->adsl_supplier_plan->tax(),2) != $uploaded['amount']) { + if (round($po->adsl_supplier_plan->base_cost+$po->adsl_supplier_plan->tax(),2) != $uploaded['amount']) { $summary .= View::factory('service/admin/list/adslbilling_summary') ->set('service',$so) + ->set('plan',$po) + ->set('planoverride',$so->plugin()->provided_adsl_plan_id ? TRUE : FALSE) ->set('amount',$uploaded['amount']) ->set('i',$j++%2); @@ -348,19 +333,23 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID $uploaded['checked'] = 'checked="checked"'; } - unset($csv[$so->service_adsl->service_number]); + unset($csv[$so->plugin()->service_number]); } else { $uploaded['checked'] = ''; $uploaded['amount'] = 0; } + $total += $uploaded['amount']; $output .= View::factory('service/admin/list/adslbilling_body') ->set('service',$so) + ->set('plan',$po) + ->set('planoverride',$so->plugin()->provided_adsl_plan_id ? TRUE : FALSE) ->set('checked',$uploaded['checked']) ->set('amount',$uploaded['amount']) - ->set('adsl',$so->service_adsl) + ->set('excess',$uploaded['excess']) + ->set('adsl',$so->plugin()) ->set('i',$i++%2); } @@ -435,7 +424,7 @@ GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID // If the description says VISP credit, we know this is commission. elseif (preg_match('/^VISP Credit/',$description)) $return[$service]['credit'] = preg_replace('/\$/','',$total); - // If the description says Excess, we know this is commission. + // If the description says Excess, we know this is excess charges. elseif (preg_match('/^Excess usage/',$description)) $return[$service]['excess'] = preg_replace('/\$/','',$total); else diff --git a/modules/service/classes/controller/affiliate/service.php b/modules/service/classes/controller/affiliate/service.php index b09892ae..d28cae19 100644 --- a/modules/service/classes/controller/affiliate/service.php +++ b/modules/service/classes/controller/affiliate/service.php @@ -1,7 +1,7 @@ 'services'); - protected $secure_actions = array( 'list'=>TRUE, 'listbycheckout'=>TRUE, 'listadslservices'=>TRUE, + 'listdomainservices'=>TRUE, + 'listhostservices'=>TRUE, 'listhspaservices'=>TRUE, ); @@ -24,17 +24,14 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate * Show a list of services */ public function action_list() { - $so = ORM::factory('service'); - Block::add(array( - 'title'=>_('System Customer Services'), + 'title'=>_('Customer Services'), 'body'=>Table::display( - $so->where('affiliate_id','=',$this->ao->affiliate->id)->find_all(), + $this->filter(ORM::factory('service')->list_active(),$this->ao->affiliate->id), 25, array( 'id'=>array('label'=>'ID','url'=>'user/service/view/'), - 'type'=>array('label'=>'Type'), - 'name()'=>array('label'=>'Details'), + 'service_name()'=>array('label'=>'Details'), 'recur_schedule'=>array('label'=>'Billing'), 'price'=>array('label'=>'Price','class'=>'right'), 'active'=>array('label'=>'Active'), @@ -44,7 +41,7 @@ class Controller_Affiliate_Service extends Controller_TemplateDefault_Affiliate array( 'page'=>TRUE, 'type'=>'select', - 'form'=>'user/email/view', + 'form'=>'user/service/view', )), )); } @@ -123,181 +120,156 @@ ORDER BY c.id,s.recur_schedule,c.name,a.company,a.last_name,a.first_name )); } - //@todo this should really be in a different class, since adsl wont be part of the main app - public function action_listadslservices() { - // @todo need to add the DB prefix here - // @todo need to restrict this to affiliate services - $services = DB::query(Database::SELECT,' -SELECT A.service_id -FROM ab_service__adsl A,ab_service B,ab_account C,ab_service D,ab_product E -WHERE B.active=1 AND A.service_id=B.id AND A.site_id=B.site_id -AND B.account_id=C.id AND B.site_id=C.site_id -AND A.service_id=D.id AND A.site_id=D.site_id -AND D.product_id=E.id AND D.site_id=E.site_id -AND E.sku like "%ADSL%" -ORDER BY C.last_name,B.account_id,A.service_number - ') - ->execute(); + private function consoltraffic($svs,$date) { + $data = array(); - // @todo If no items, show a nice message. This is not correct for ORM. - if (! count($services)) { - echo Kohana::debug('No services for ADSL'); - die(); - } + foreach ($svs as $so) { + $c = array(); + foreach ($so->plugin()->get_traffic_data_monthly($date) as $metric => $ma) { + foreach ($ma as $month => $traffic) { + // Only count the service once, not for each metric. + if (! isset($c[$month])) { + if (isset($data['svs'][$month])) + $data['svs'][$month] += 1; + else + $data['svs'][$month] = 1; - $last_account = ''; - $i = 0; - $output = '
'; - foreach ($services as $service) { - $so = ORM::factory('service',$service['service_id']); + $c[$month] = 1; + } - if ($last_account != $so->account_id) { - if ($i) - $output .= ''; - - $output .= View::factory('service/admin/list/adslservices_header') - ->set('service',$so); - - $last_account = $so->account_id; + if (isset($data['data'][$metric][$month])) + $data['data'][$metric][$month] += (int)$traffic; + else + $data['data'][$metric][$month] = (int)$traffic; + } } - - $output .= View::factory('service/admin/list/adslservices_body') - ->set('service',$so) - ->set('i',$i++%2); } - $output .= '
 
'; - // Chart the traffic for the last 12 months. - // @todo need to add the DB prefix here - $traffic = DB::query(Database::SELECT,sprintf(' -SELECT DATE_FORMAT(DATE,"%%y-%%m") AS MONTH,SID,MAX(NUM) AS NUM,SUM(DOWN_PEAK) AS DOWN_PEAK,SUM(IFNULL(DOWN_OFFPEAK,0)+IFNULL(PEER,0)+IFNULL(INTERNAL,0)) AS DOWN_OFFPEAK -FROM ab_view_traffic_adsl_daily -WHERE SID in (%s) AND DATE>"%s" -GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID - ','1,2',date('Y-m',time()-365*86400))) - ->execute(); + ksort($data['svs']); + foreach ($data['data'] as $metric => $details) + ksort($data['data'][$metric]); - $peak = $offpeak = $services = array(); + return $data; + } - foreach ($traffic as $a => $v) { - $peak[$v['SID']]['Peak'][$v['MONTH']] = $v['DOWN_PEAK']; - $peak[$v['SID']]['OffPeak'][$v['MONTH']] = $v['DOWN_OFFPEAK']; - $peak[$v['SID']]['Services'][$v['MONTH']] = $v['NUM']; - } + public function action_listadslservices() { + $svs = $this->filter(ORM::factory('service')->list_bylistgroup('ADSL'),$this->ao->affiliate->id,'name()'); + $data = $this->consoltraffic($svs,time()); $google = GoogleChart::factory('vertical_bar'); $google->title = sprintf('ADSL traffic as at %s',date('Y-m-d',strtotime('yesterday'))); - $google->series(array( - 'title'=>array('Exetel-Peak','Exetel-Offpeak'), - 'axis'=>'x', - 'data'=>array('Exetel-Peak'=>$peak[1]['Peak'],'Exetel-OffPeak'=>$peak[1]['OffPeak']))); - $google->series(array( - 'title'=>array('People-Peak','People-Offpeak'), - 'axis'=>'x', - 'data'=>array('People-Peak'=>$peak[2]['Peak'],'People-OffPeak'=>$peak[2]['OffPeak']))); - $google->series(array( - 'title'=>'Exetel-Services', - 'axis'=>'r', - 'data'=>array('Exetel-Services'=>$peak[1]['Services']))); - $google->series(array( - 'title'=>'People-Services', - 'axis'=>'r', - 'data'=>array('People-Services'=>$peak[2]['Services']))); + $google->series(array('title'=>array_keys($data['data']),'axis'=>'x','data'=>$data['data'])); + $google->series(array('title'=>'Services','axis'=>'r','data'=>array('Services'=>$data['svs']))); + + Block::add(array('body'=>$google)); Block::add(array( - 'body'=>$google, + 'title'=>_('ADSL Services'), + 'body'=>Table::display( + $svs, + NULL, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'name()'=>array('label'=>'Service'), + 'plugin()->ipaddress()'=>array('label'=>'IP Address'), + 'product->plugin()->allowance()'=>array('label'=>'Allowance'), + 'plugin()->traffic_thismonth()'=>array('label'=>'This Month'), + 'plugin()->traffic_lastmonth()'=>array('label'=>'Last Month'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'date_next_invoice'=>array('label'=>'Next Invoice'), + ), + array( + 'type'=>'select', + 'form'=>'user/service/view', + )), )); - - Block::add(array( - 'title'=>_('List all ADSL Services'), - 'body'=>$output, - )); - - Style::add(array( - 'type'=>'file', - 'data'=>'css/list.css', - )); } public function action_listhspaservices() { - // @todo need to add the DB prefix here - // @todo need to restrict this to affiliate services - $services = DB::query(Database::SELECT,' -SELECT A.service_id -FROM ab_service__adsl A,ab_service B,ab_account C,ab_service D,ab_product E -WHERE B.active=1 AND A.service_id=B.id AND A.site_id=B.site_id -AND B.account_id=C.id AND B.site_id=C.site_id -AND A.service_id=D.id AND A.site_id=D.site_id -AND D.product_id=E.id AND D.site_id=E.site_id -AND E.sku like "%HSPA%" -ORDER BY C.last_name,B.account_id,A.service_number - ') - ->execute(); - - // @todo If no items, show a nice message. This is not correct for ORM. - if (! count($services)) { - echo Kohana::debug('No services for HSPA'); - die(); - } - - $last_account = ''; - $i = 0; - $output = ''; - foreach ($services as $service) { - $so = ORM::factory('service',$service['service_id']); - - if ($last_account != $so->account_id) { - if ($i) - $output .= ''; - - $output .= View::factory('service/admin/list/adslservices_header') - ->set('service',$so); - - $last_account = $so->account_id; - } - - $output .= View::factory('service/admin/list/adslservices_body') - ->set('service',$so) - ->set('i',$i++%2); - } - $output .= '
 
'; - - // Chart the traffic for the last 12 months. - // @todo need to add the DB prefix here - $traffic = DB::query(Database::SELECT,sprintf(' -SELECT DATE_FORMAT(DATE,"%%y-%%m") AS MONTH,SID,MAX(NUM) AS NUM,SUM(DOWN_PEAK)*1000 AS DOWN_PEAK,SUM(IFNULL(DOWN_OFFPEAK,0)+IFNULL(PEER,0)+IFNULL(INTERNAL,0))*1000 AS DOWN_OFFPEAK -FROM ab_view_traffic_adsl_daily -WHERE SID=%s AND DATE>"%s" -GROUP BY DATE_FORMAT(DATE,"%%Y-%%m"),SID - ',3,date('Y-m',time()-365*86400))) - ->execute(); - - $peak = $offpeak = $services = array(); - - foreach ($traffic as $a => $v) { - $peak['Peak'][$v['MONTH']] = $v['DOWN_PEAK']; - $peak['OffPeak'][$v['MONTH']] = $v['DOWN_OFFPEAK']; - $peak['Services'][$v['MONTH']] = $v['NUM']; - } + $svs = $this->filter(ORM::factory('service')->list_bylistgroup('HSPA'),$this->ao->affiliate->id,'name()'); + $data = $this->consoltraffic($svs,time()); $google = GoogleChart::factory('vertical_bar'); $google->title = sprintf('HSPA traffic as at %s',date('Y-m-d',strtotime('yesterday'))); - $google->series(array('title'=>array('Peak','Offpeak'),'axis'=>'x','data'=>array('Peak'=>$peak['Peak'],'OffPeak'=>$peak['OffPeak']))); - $google->series(array('title'=>'Services','axis'=>'r','data'=>array('Services'=>$peak['Services']))); + $google->series(array('title'=>array_keys($data['data']),'axis'=>'x','data'=>$data['data'])); + $google->series(array('title'=>'Services','axis'=>'r','data'=>array('Services'=>$data['svs']))); + + Block::add(array('body'=>$google)); Block::add(array( - 'body'=>$google, + 'title'=>_('HSPA Services'), + 'body'=>Table::display( + $svs, + NULL, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'name()'=>array('label'=>'Service'), + 'plugin()->ipaddress()'=>array('label'=>'IP Address'), + 'product->plugin()->allowance()'=>array('label'=>'Allowance'), + 'plugin()->traffic_thismonth()'=>array('label'=>'This Month'), + 'plugin()->traffic_lastmonth()'=>array('label'=>'Last Month'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'date_next_invoice'=>array('label'=>'Next Invoice'), + ), + array( + 'type'=>'select', + 'form'=>'user/service/view', + )), )); + } + public function action_listdomainservices() { Block::add(array( - 'title'=>_('List all HSPA Services'), - 'body'=>$output, + 'title'=>_('Domain Names'), + 'body'=>Table::display( + $this->filter(ORM::factory('service')->list_bylistgroup('DOMAIN'),$this->ao->affiliate->id,'name()'), + 25, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'service_name()'=>array('label'=>'Details'), + 'plugin()->display("domain_expire")'=>array('label'=>'Expire'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'display("date_next_invoice")'=>array('label'=>'Next Invoice'), + ), + array( + 'page'=>TRUE, + 'type'=>'select', + 'form'=>'user/service/view', + )), )); + } - Style::add(array( - 'type'=>'file', - 'data'=>'css/list.css', - )); + public function action_listhostservices() { + Block::add(array( + 'title'=>_('Hosting Services'), + 'body'=>Table::display( + $this->filter(ORM::factory('service')->list_bylistgroup('HOST'),$this->ao->affiliate->id,'name()'), + 25, + array( + 'id'=>array('label'=>'ID','url'=>'user/service/view/'), + 'service_name()'=>array('label'=>'Details'), + 'plugin()->display("host_expire")'=>array('label'=>'Expire'), + 'recur_schedule'=>array('label'=>'Billing'), + 'price'=>array('label'=>'Price','class'=>'right'), + 'account->accnum()'=>array('label'=>'Cust ID'), + 'account->name()'=>array('label'=>'Customer'), + 'display("date_next_invoice")'=>array('label'=>'Next Invoice'), + ), + array( + 'page'=>TRUE, + 'type'=>'select', + 'form'=>'user/service/view', + )), + )); } } ?> diff --git a/modules/service/classes/controller/user/service.php b/modules/service/classes/controller/user/service.php index ab147718..6c112037 100644 --- a/modules/service/classes/controller/user/service.php +++ b/modules/service/classes/controller/user/service.php @@ -7,8 +7,8 @@ * @subpackage Service * @category Controllers/User * @author Deon George - * @copyright (c) 2010 Deon George - * @license http://dev.leenooks.net/license.html + * @copyright (c) 2010 Open Source Billing + * @license http://dev.osbill.net/license.html */ class Controller_User_Service extends Controller_TemplateDefault_User { protected $secure_actions = array( @@ -27,8 +27,7 @@ class Controller_User_Service extends Controller_TemplateDefault_User { 25, array( 'id'=>array('label'=>'ID','url'=>'user/service/view/'), - 'type'=>array('label'=>'Type'), - 'name()'=>array('label'=>'Details'), + 'service_name()'=>array('label'=>'Details'), 'recur_schedule'=>array('label'=>'Billing'), 'price'=>array('label'=>'Price','class'=>'right'), 'active'=>array('label'=>'Active'), @@ -65,7 +64,7 @@ class Controller_User_Service extends Controller_TemplateDefault_User { ->set('so',$so); Block::add(array( - 'title'=>sprintf('%s: %s',$so->id(),$so->product->name()), + 'title'=>sprintf('%s: %s',$so->id(),$so->service_name()), 'body'=>$output, )); } diff --git a/modules/service/classes/model/service.php b/modules/service/classes/model/service.php index c87f73b1..11ee7e9f 100644 --- a/modules/service/classes/model/service.php +++ b/modules/service/classes/model/service.php @@ -15,10 +15,6 @@ class Model_Service extends ORMOSB { protected $_has_many = array( 'invoice'=>array('through'=>'invoice_item'), ); - protected $_has_one = array( - 'service_adsl'=>array('far_key'=>'id'), - 'service_domain'=>array('far_key'=>'id'), - ); protected $_belongs_to = array( 'product'=>array(), 'account'=>array(), @@ -76,15 +72,14 @@ class Model_Service extends ORMOSB { /** * Return the object of the product plugin */ - private function plugin() { + public function plugin() { if (! $this->product->prod_plugin_file) return NULL; if (! is_numeric($this->product->prod_plugin_data)) throw new Kohana_Exception('Missing plugin_id for :product (:type)',array(':product'=>$this->product->id,':type'=>$this->product->prod_plugin_file)); - $spn = sprintf('%s_%s',get_class($this),$this->product->prod_plugin_file); - return new $spn(array('service_id'=>$this->id)); + return ORM::factory(sprintf('service_plugin_%s',$this->product->prod_plugin_file),array('service_id'=>$this->id)); } /** @@ -98,7 +93,15 @@ class Model_Service extends ORMOSB { * Display the service product name */ public function name() { - return $this->product->name(); + return is_null($plugin=$this->plugin()) ? $this->product->name() : $plugin->name(); + } + + public function service_name() { + return is_null($plugin=$this->plugin()) ? $this->name() : $plugin->service_name(); + } + + public function service_view() { + return is_null($plugin=$this->plugin()) ? HTML::nbsp('') : $plugin->service_view(); } /** @@ -108,29 +111,12 @@ class Model_Service extends ORMOSB { return $this->product->feature_summary(); } - /** - * Display the service details - */ - public function service_view() { - if (is_null($plugin = $this->plugin())) - return HTML::nbsp(''); - else - return $plugin->_service_view(); - } - - public function service_name() { - if (is_null($plugin = $this->plugin())) - return $this->name(); - else - return $plugin->_service_name(); - } - /** * Render some details for specific calls, eg: invoice */ public function details($type) { switch ($type) { - case 'invoice': + case 'invoice_detail_items': if (is_null($plugin = $this->plugin())) return array(); else @@ -156,5 +142,26 @@ class Model_Service extends ORMOSB { public function tax() { return $this->price * .1; } + + public function list_active() { + return $this->where('active','=','1')->find_all(); + } + + public function list_bylistgroup($cat) { + $result = array(); + + $cats = ORM::factory('product_category')->list_bylistgroup($cat); + + foreach ($this->list_active() as $so) { + if (! $so->product->avail_category_id OR ! preg_match('/^a:/',$so->product->avail_category_id)) + continue; + + $pc = unserialize($so->product->avail_category_id); + if (array_intersect($pc,array_keys($cats))) + array_push($result,$so); + } + + return $result; + } } ?> diff --git a/modules/service/classes/model/service/domain.php b/modules/service/classes/model/service/domain.php deleted file mode 100644 index ea45020a..00000000 --- a/modules/service/classes/model/service/domain.php +++ /dev/null @@ -1,59 +0,0 @@ -array('foreign_key'=>'id','far_key'=>'domain_tld_id'), - 'host_registrar_plugin'=>array('foreign_key'=>'id','far_key'=>'domain_registrar_id'), - ); - protected $_belongs_to = array( - 'service'=>array(), - ); - - protected $_display_filters = array( - 'domain_expire'=>array( - array('Config::date',array(':value')), - ), - ); - - protected function _service_name() { - return sprintf('%s - %s','Domain',$this->name()); - } - - protected function _service_view() { - } - - /** - * Get specific service details for use in other modules - * For Example: Invoice - * - * @todo Make the rendered items configurable - */ - protected function _details($type) { - switch ($type) { - default: - throw new Kohana_Exception('Unkown detail request :type',array(':type'=>$type)); - } - } - - protected function _admin_update() { - } - - public function name() { - return sprintf('%s.%s',$this->domain_name,$this->host_tld->name); - } -} -?> diff --git a/modules/service/classes/model/service/plugin.php b/modules/service/classes/model/service/plugin.php new file mode 100644 index 00000000..60e6eae5 --- /dev/null +++ b/modules/service/classes/model/service/plugin.php @@ -0,0 +1,52 @@ +service->product->name(),$this->name()); + } + + /** + * Get specific service details for use in other modules + * For Example: Invoice + * + * @todo Make the rendered items configurable + * @todo Change this method name, now that it is public + */ + public function _details($type) { + switch ($type) { + // Nothing to add for invoices + case 'invoice_detail_items': + return array(); + + default: + throw new Kohana_Exception('Unkown detail request :type',array(':type'=>$type)); + } + } +} +?> diff --git a/modules/service/views/service/admin/list/adslbilling_body.php b/modules/service/views/service/admin/list/adslbilling_body.php deleted file mode 100644 index cd3ba000..00000000 --- a/modules/service/views/service/admin/list/adslbilling_body.php +++ /dev/null @@ -1,10 +0,0 @@ - - service_adsl->display('service_number'); ?> - service_adsl->adsl_plan->adsl_supplier_plan->name(); ?> - service_adsl->contract_date_start(); ?> - service_adsl->contract_date_end(); ?> - service_adsl->adsl_plan->adsl_supplier_plan->base_cost); ?> - service_adsl->adsl_plan->adsl_supplier_plan->base_cost+$service->service_adsl->adsl_plan->adsl_supplier_plan->tax()); ?> - onchange="paid(this);"/> - - diff --git a/modules/service/views/service/admin/list/adslbilling_summary.php b/modules/service/views/service/admin/list/adslbilling_summary.php deleted file mode 100644 index 265b6820..00000000 --- a/modules/service/views/service/admin/list/adslbilling_summary.php +++ /dev/null @@ -1,10 +0,0 @@ - - service_adsl->display('service_number'); ?> - service_adsl->adsl_plan->adsl_supplier_plan->name(); ?> - service_adsl->contract_date_start(); ?> - service_adsl->contract_date_end(); ?> - service_adsl->adsl_plan->adsl_supplier_plan->base_cost); ?> - service_adsl->adsl_plan->adsl_supplier_plan->base_cost+$service->service_adsl->adsl_plan->adsl_supplier_plan->tax()); ?> - - service_adsl->adsl_plan->adsl_supplier_plan->base_cost+$service->service_adsl->adsl_plan->adsl_supplier_plan->tax()-$amount; ?> - diff --git a/modules/task/classes/controller/admin/task.php b/modules/task/classes/controller/admin/task.php new file mode 100644 index 00000000..68a2f623 --- /dev/null +++ b/modules/task/classes/controller/admin/task.php @@ -0,0 +1,40 @@ +TRUE, + ); + + /** + * Show a list of tasks run + */ + public function action_listlog() { + Block::add(array( + 'title'=>_('Task Log'), + 'body'=>Table::display( + ORM::factory('task_log')->order_by('id','DESC')->find_all(), + 25, + array( + 'id'=>array('label'=>'ID','url'=>'admin/task/view/'), + 'date_orig'=>array('label'=>'Date'), + 'task->display("name")'=>array('label'=>'Task'), + 'result'=>array('label'=>'Result'), + 'message'=>array('label'=>'Message'), + ), + array( + 'page'=>TRUE, + )), + )); + } +} +?> diff --git a/modules/task/classes/controller/task.php b/modules/task/classes/controller/task.php new file mode 100644 index 00000000..7a842f64 --- /dev/null +++ b/modules/task/classes/controller/task.php @@ -0,0 +1,15 @@ + diff --git a/modules/task/classes/model/task.php b/modules/task/classes/model/task.php index b00a9fb3..cc384513 100644 --- a/modules/task/classes/model/task.php +++ b/modules/task/classes/model/task.php @@ -42,6 +42,7 @@ class Model_Task extends ORMOSB { $this->save(); // Check we are the winning host to run this task + // @todo We need to test that the lock is not stale $this->reload(); if ($this->running_host != $r) return; diff --git a/modules/task/classes/model/task/log.php b/modules/task/classes/model/task/log.php index 6463024f..b126b658 100644 --- a/modules/task/classes/model/task/log.php +++ b/modules/task/classes/model/task/log.php @@ -11,6 +11,10 @@ * @license http://dev.osbill.net/license.html */ class Model_Task_Log extends ORMOSB { + protected $_belongs_to = array( + 'task'=>array(), + ); + protected $_display_filters = array( 'date_orig'=>array( array('Config::datetime',array(':value')), diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_DIRECTADMIN_1_23.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_DIRECTADMIN_1_23.tpl deleted file mode 100644 index f35574a1..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_DIRECTADMIN_1_23.tpl +++ /dev/null @@ -1,43 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* DirectAdmin Port - - eg: 2222
*DirectAdmin Host - - eg: server.com
*DirectAdmin Login - - eg: admin
*DirectAdmin Password - -
Allow DirectAdmin to notify user? - {$list->bool("host_server_provision_plugin_data[notify]", $plugin_data.notify, "form_menu")} -
* = required fields 
  
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_EASYADMIN.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_EASYADMIN.tpl deleted file mode 100644 index c068979e..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_EASYADMIN.tpl +++ /dev/null @@ -1,33 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - -
*easyAdmin Host - - eg: http://x.x.x.x:88/.easy/main/mysql.cgi
*easyAdmin Login - - eg: admin
*easyAdmin Password - -
*easyAdmin Reseller - - eg: admin
* = required fields 
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_3.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_3.tpl deleted file mode 100644 index 7e523413..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_3.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as a .sh file - on the target server in your ensim directory where the "adddomain", - "editdomain", and "deldomain" executable files are located. - You must then give the .sh file you have created proper permission to execute - the above mentioned files, and create a crontab job that runs it every 2-3 - minutes.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .sh file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_3_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_3_5.tpl deleted file mode 100644 index 7df1e6f4..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_3_5.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as a .sh file - on the target server in your ensim directory where the "AddVirtDomain", - "EditVirtDomain", "DisableVirtDomain", "EnableVirtDomain", - and "DeleteVirtDomain" executable files are located. You must - then give the .sh file you have created proper permission to execute the - above mentioned files, and create a crontab job that runs it every 2-3 minutes.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .sh file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_PLAN_3_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_PLAN_3_5.tpl deleted file mode 100644 index 7df1e6f4..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_LINUX_PLAN_3_5.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as a .sh file - on the target server in your ensim directory where the "AddVirtDomain", - "EditVirtDomain", "DisableVirtDomain", "EnableVirtDomain", - and "DeleteVirtDomain" executable files are located. You must - then give the .sh file you have created proper permission to execute the - above mentioned files, and create a crontab job that runs it every 2-3 minutes.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .sh file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_WINDOWS_3.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_WINDOWS_3.tpl deleted file mode 100644 index b14bdf3b..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_WINDOWS_3.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
Update Local Dns Server after adding new domains? - { $list->bool("host_server_provision_plugin_data[dns]", $plugin_data.dns, "form_menu") } -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as AgileBill.bat - file on the target server in your ensim directory where the "adddomain", - "editdomain", and "deldomain" executable files are located. - You must then give the AgileBill.bat file you have created proper permission - to execute the above mentioned files, and create a task that runs the AgileBill.bat - file each time your server starts.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .bat file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_WINDOWS_3_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_WINDOWS_3_5.tpl deleted file mode 100644 index 97e356e9..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_ENSIM_WINDOWS_3_5.tpl +++ /dev/null @@ -1,60 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
Update Local Dns Server after adding new domains? - { $list->bool("host_server_provision_plugin_data[dns]", $plugin_data.dns, "form_menu") } -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as AgileBill.bat - file on the target server in your ensim directory where the "adddomain", - "editdomain", and "deldomain" executable files are located. - You must then give the AgileBill.bat file you have created proper permission - to execute the above mentioned files, and create a task that runs the AgileBill.bat - file each time your server starts.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .bat file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_HEARTINTERNET.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_HEARTINTERNET.tpl deleted file mode 100644 index fc6a2a83..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_HEARTINTERNET.tpl +++ /dev/null @@ -1,11 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
Your Heart Internet Reseller Authcode - -
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_HELM_3_1.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_HELM_3_1.tpl deleted file mode 100644 index 664ac98f..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_HELM_3_1.tpl +++ /dev/null @@ -1,34 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - -
*Helm Host - - ie: cp.site.com
*Helm Login - -
*Helm Password - -
*Helm Reseller Username (must have hosting plans configured - for this reseller) - -
* = required fields 
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_HOSTOPIA.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_HOSTOPIA.tpl deleted file mode 100644 index 77b8b446..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_HOSTOPIA.tpl +++ /dev/null @@ -1,17 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - -
Hostopia Username - -
Hostopia Password - -
- diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_MANUAL.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_MANUAL.tpl deleted file mode 100644 index 12d012f8..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_MANUAL.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - email - {/translate} - - -
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_8.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_8.tpl deleted file mode 100644 index bf7f3b0c..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_8.tpl +++ /dev/null @@ -1,33 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - -
* Plesk Port - - eg: 8443
* Plesk Host - - eg: server.com
* Plesk Login - - eg: admin
* Plesk Password - -
* = required fields 
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_LINUX_6.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_LINUX_6.tpl deleted file mode 100644 index 6d359416..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_LINUX_6.tpl +++ /dev/null @@ -1,44 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as a .sh file - on the target server where the plesk creation utilities are created. You - must then give the .sh file you have created proper permission to execute - the plesk creation utilities (normally root), and create a crontab job that - runs it every 2-3 minutes.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .sh file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_LINUX_7.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_LINUX_7.tpl deleted file mode 100644 index 6d359416..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_LINUX_7.tpl +++ /dev/null @@ -1,44 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as a .sh file - on the target server where the plesk creation utilities are created. You - must then give the .sh file you have created proper permission to execute - the plesk creation utilities (normally root), and create a crontab job that - runs it every 2-3 minutes.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .sh file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_RELOADED_7_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_RELOADED_7_5.tpl deleted file mode 100644 index bf7f3b0c..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_RELOADED_7_5.tpl +++ /dev/null @@ -1,33 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - -
* Plesk Port - - eg: 8443
* Plesk Host - - eg: server.com
* Plesk Login - - eg: admin
* Plesk Password - -
* = required fields 
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_WINDOWS_6_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_WINDOWS_6_5.tpl deleted file mode 100644 index 548b5f73..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_WINDOWS_6_5.tpl +++ /dev/null @@ -1,53 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as AgileBill.bat - on the target server in the directory where the plesk creation utilities - are created. You must then give the AgileBill.bat file you have created - proper permission to execute the Plesk creation utilities, and create a - task that runs the AgileBill.bat file each time your server starts.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .bat file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_WINDOWS_7.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_WINDOWS_7.tpl deleted file mode 100644 index 548b5f73..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_PLESK_WINDOWS_7.tpl +++ /dev/null @@ -1,53 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as AgileBill.bat - on the target server in the directory where the plesk creation utilities - are created. You must then give the AgileBill.bat file you have created - proper permission to execute the Plesk creation utilities, and create a - task that runs the AgileBill.bat file each time your server starts.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .bat file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_PSA_RESELL_7_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_PSA_RESELL_7_5.tpl deleted file mode 100644 index 98158cc1..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_PSA_RESELL_7_5.tpl +++ /dev/null @@ -1,42 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Plesk Port - - eg: 8443
* Plesk Host - - eg: server.com
* Plesk Login - - eg: admin
* Plesk Password - -
* Plesk Client ID - - This is the numeric client ID of the PSA user to create all domains under. - To get this ID, create a new client in PSA and on the Client page, move - your mouse over the client name and in the status bar you will see the client - id like so: ...?cl_id=X (where X is the client id)
* = required fields 
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_RAQ_4.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_RAQ_4.tpl deleted file mode 100644 index cacaade8..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_RAQ_4.tpl +++ /dev/null @@ -1,58 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_server} - connection_mode - {/translate} - - -
- {translate module=host_server} - host - {/translate} - - -
- {translate module=host_server} - path - {/translate} - - -
- {translate module=host_server} - username - {/translate} - - -
- {translate module=host_server} - password - {/translate} - - -
- diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_RAQ_550.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_RAQ_550.tpl deleted file mode 100644 index bc857489..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_RAQ_550.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -
To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as a .sh file - on the target server in your ensim directory where the "addvsite", - "adduser", and "cdelvsite" executable files are located. - You must then give the .sh file you have created proper permission to execute - the above mentioned files, and create a crontab job that runs it every 2-3 - minutes.
-
- You must also have curl installed, and make sure the correct path to the - curl directory is reflected in the 1st line of your .sh file...
-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_WEBMIN.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_WEBMIN.tpl deleted file mode 100644 index c28dfc71..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_WEBMIN.tpl +++ /dev/null @@ -1,38 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - -
Webmin Hostname or IP - -
Webmin Port - -
Webmin User Account - -
Webmin Password - -
Connect Type - -
- diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_WEBMIN_PRO.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_WEBMIN_PRO.tpl deleted file mode 100644 index 4ba49789..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_WEBMIN_PRO.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_server} - field_keycode - {/translate} - - -
- - - - - - - - -

To complete the automation for this server with the selected provisioning - plugin, you must paste the text in the box below and save it as a .sh file - on the target server in the directory where the following executable files are located. (generally '/usr/libexec/webmin/virtual-server/')

-
create-domain.pl
delete-domain.pl
disable-domain.pl
enable-domain.pl
edit-domain.pl
-

You must - then give the .sh file you have created proper permission to execute the - above mentioned files (root), and create a crontab job that runs it every 2-3 minutes to keep changes on the server up to date. -
-
- You must also have curl installed on the machine where the .sh file will be copied, and make sure the correct path to the - curl directory is reflected in the 1st line of your .sh file below...

-
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_cfg_WHM.tpl b/themes/default/blocks/host_provision_plugin/plugin_cfg_WHM.tpl deleted file mode 100644 index bff74ed9..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_cfg_WHM.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{$list->unserial($host_server.provision_plugin_data,'plugin_data')} - - - - - - - - - - - - - - - - - - - - - - -
Connect Type - -
Host
Path to 'Accounting.php.inc'
WHM User Account
WHM Access Hash
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_DIRECTADMIN_1_23.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_DIRECTADMIN_1_23.tpl deleted file mode 100644 index 71a65b82..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_DIRECTADMIN_1_23.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - -
DirectAdmin Package Name - - eg: newpackage
IP Based? - {$list->bool("product_host_provision_plugin_data[type]", $plugin_data.type, "form_menu")} -
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_EASYADMIN.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_EASYADMIN.tpl deleted file mode 100644 index fcfcacfd..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_EASYADMIN.tpl +++ /dev/null @@ -1,112 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Host Type - -
Disk Quota - - MB
Max POP3/FTP Users - -
Enable FrontPage - { $list->bool("product_host_provision_plugin_data[enfp]", $plugin_data.enfp, "form_menu") } -
PHP - { $list->bool("product_host_provision_plugin_data[enphp]", $plugin_data.enphp, "form_menu") } -
Shell Access - { $list->bool("product_host_provision_plugin_data[enshell]", $plugin_data.enshell, "form_menu") } -
SSI - { $list->bool("product_host_provision_plugin_data[enssi]", $plugin_data.enssi, "form_menu") } -
CGI - { $list->bool("product_host_provision_plugin_data[encgi]", $plugin_data.encgi, "form_menu") } -
suEXEC - { $list->bool("product_host_provision_plugin_data[ensuexec]", $plugin_data.ensuexec, "form_menu") } - (cannot be enabled at the same time as Miva)
Raw Log Access - { $list->bool("product_host_provision_plugin_data[enraw]", $plugin_data.enraw, "form_menu") } -
Miva Merchant - { $list->bool("product_host_provision_plugin_data[enmiva]", $plugin_data.enmiva, "form_menu") } - (cannot be enabled at the same time as suEXEC)
SSL - { $list->bool("product_host_provision_plugin_data[enssl]", $plugin_data.enssl, "form_menu") } -
Spam Filter (Spamassasin) - { $list->bool("product_host_provision_plugin_data[enfilter]", $plugin_data.enfilter, "form_menu") } -
Limit Bandwidth - { $list->bool("product_host_provision_plugin_data[enthrottle]", $plugin_data.enthrottle, "form_menu") } -
Limite Bandwidth Settings (If Yes to above) Limit: - - -
- Duration - - -
-

 

diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_3.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_3.tpl deleted file mode 100644 index a6cd369a..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_3.tpl +++ /dev/null @@ -1,49 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - ipinfo_namebased - {/translate} - --- - -
- {translate module=host_provision_plugin} - assoc_plan - {/translate} - --- - -
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_3_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_3_5.tpl deleted file mode 100644 index 5c5325dd..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_3_5.tpl +++ /dev/null @@ -1,457 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - ipinfo_namebased - {/translate} - --- - -
- {translate module=host_provision_plugin} - diskquota - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - maxusers - {/translate} - --- - -
- {translate module=host_provision_plugin} - bandwidth_threshold - {/translate} - --- - - Bytes (0=unlimited)
- {translate module=host_provision_plugin} - bandwidth_rollover - {/translate} - --- - -
- {translate module=host_provision_plugin} - mailscanner - {/translate} - - { $list->bool("product_host_provision_plugin_data[mailscanner]", $plugin_data.mailscanner, "form_menu") } - - {translate module=host_provision_plugin} - mailscanner_out - {/translate} - { $list->bool("product_host_provision_plugin_data[mailscanner_out]", $plugin_data.mailscanner_out, "form_menu") } - {translate module=host_provision_plugin} - mailscanner_in - {/translate} - { $list->bool("product_host_provision_plugin_data[mailscanner_in]", $plugin_data.mailscanner_in, "form_menu") } -
- {translate module=host_provision_plugin} - aspmgr - {/translate} - - { $list->bool("product_host_provision_plugin_data[aspmgr]", $plugin_data.aspmgr, "form_menu") } -  
- {translate module=host_provision_plugin} - scriptsmgr - {/translate} - - { $list->bool("product_host_provision_plugin_data[scriptsmgr]", $plugin_data.scriptsmgr, "form_menu") } -  
- {translate module=host_provision_plugin} - files - {/translate} - - { $list->bool("product_host_provision_plugin_data[files]", $plugin_data.files, "form_menu") } -  
- {translate module=host_provision_plugin} - analog - {/translate} - - { $list->bool("product_host_provision_plugin_data[analog]", $plugin_data.analog, "form_menu") } -  
- {translate module=host_provision_plugin} - frontpage - {/translate} - - { $list->bool("product_host_provision_plugin_data[frontpage]", $plugin_data.frontpage, "form_menu") } -  
- {translate module=host_provision_plugin} - perl - {/translate} - - { $list->bool("product_host_provision_plugin_data[perl]", $plugin_data.perl, "form_menu") } -  
- {translate module=host_provision_plugin} - allowanonymous - {/translate} - - { $list->bool("product_host_provision_plugin_data[anonftp]", $plugin_data.anonftp, "form_menu") } -  
- {translate module=host_provision_plugin} - mysql - {/translate} - - { $list->bool("product_host_provision_plugin_data[mysql]", $plugin_data.mysql, "form_menu") } - - - Max DBs
- {translate module=host_provision_plugin} - cgi - {/translate} - - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } -  
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } -  
- {translate module=host_provision_plugin} - develenv - {/translate} - - { $list->bool("product_host_provision_plugin_data[develenv]", $plugin_data.develenv, "form_menu") } -  
- {translate module=host_provision_plugin} - telnet - {/translate} - - { $list->bool("product_host_provision_plugin_data[telnet]", $plugin_data.telnet, "form_menu") } - Jail? - { $list->bool("product_host_provision_plugin_data[telnet_jail]", $plugin_data.telnet_jail, "form_menu") } -
- {translate module=host_provision_plugin} - ssh - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssh]", $plugin_data.ssh, "form_menu") } - Jail? - { $list->bool("product_host_provision_plugin_data[ssh_jail]", $plugin_data.ssh_jail, "form_menu") } -
- {translate module=host_provision_plugin} - logrotate - {/translate} - - { $list->bool("product_host_provision_plugin_data[logrotate]", $plugin_data.logrotate, "form_menu") } -  
- {translate module=host_provision_plugin} - vhbackup - {/translate} - - { $list->bool("product_host_provision_plugin_data[vhbackup]", $plugin_data.vhbackup, "form_menu") } -  
- {translate module=host_provision_plugin} - bind - {/translate} - - { $list->bool("product_host_provision_plugin_data[bind]", $plugin_data.bind, "form_menu") } -  
- {translate module=host_provision_plugin} - imap - {/translate} - - { $list->bool("product_host_provision_plugin_data[imap]", $plugin_data.imap, "form_menu") } -  
- {translate module=host_provision_plugin} - tomcat4 - {/translate} - - { $list->bool("product_host_provision_plugin_data[tomcat4]", $plugin_data.tomcat4, "form_menu") } -  
- {translate module=host_provision_plugin} - openssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[openssl]", $plugin_data.openssl, "form_menu") } -  
- {translate module=host_provision_plugin} - weblogs - {/translate} - - { $list->bool("product_host_provision_plugin_data[weblogs]", $plugin_data.weblogs, "form_menu") } -  
- {translate module=host_provision_plugin} - anonftp - {/translate} - - { $list->bool("product_host_provision_plugin_data[anonftp]", $plugin_data.anonftp, "form_menu") } -  
- {translate module=host_provision_plugin} - majordomo - {/translate} - - { $list->bool("product_host_provision_plugin_data[majordomo]", $plugin_data.majordomo, "form_menu") } -  
- {translate module=host_provision_plugin} - vacation - {/translate} - - { $list->bool("product_host_provision_plugin_data[vacation]", $plugin_data.vacation, "form_menu") } -  
- {translate module=host_provision_plugin} - spam_filter - {/translate} - - { $list->bool("product_host_provision_plugin_data[spam_filter]", $plugin_data.spam_filter, "form_menu") } -  
- {translate module=host_provision_plugin} - sqmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[sqmail]", $plugin_data.sqmail, "form_menu") } -  
- {translate module=host_provision_plugin} - mivamerchant - {/translate} - - { $list->bool("product_host_provision_plugin_data[mivamerchant]", $plugin_data.mivamerchant, "form_menu") } -  
- {translate module=host_provision_plugin} - webalizer - {/translate} - - { $list->bool("product_host_provision_plugin_data[webalizer]", $plugin_data.webalizer, "form_menu") } -  
- {translate module=host_provision_plugin} - proftpd - {/translate} - - { $list->bool("product_host_provision_plugin_data[proftpd]", $plugin_data.proftpd, "form_menu") } -  
- {translate module=host_provision_plugin} - sendmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[sendmail]", $plugin_data.sendmail, "form_menu") } -  
- {translate module=host_provision_plugin} - subdomain - {/translate} - - { $list->bool("product_host_provision_plugin_data[subdomain]", $plugin_data.subdomain, "form_menu") } - - - {translate module=host_provision_plugin} - max_subdomain - {/translate} -
- {translate module=host_provision_plugin} - apache_jail - {/translate} - - { $list->bool("product_host_provision_plugin_data[apache_jail]", $plugin_data.apache_jail, "form_menu") } -  
   
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_PLAN_3_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_PLAN_3_5.tpl deleted file mode 100644 index 5e2ec47e..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_LINUX_PLAN_3_5.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - -
Enter service plan name from Ensim (ie: default) - -
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_WINDOWS_3.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_WINDOWS_3.tpl deleted file mode 100644 index 40d5fd9f..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_WINDOWS_3.tpl +++ /dev/null @@ -1,377 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - ipinfo_namebased - {/translate} - --- - -
- {translate module=host_provision_plugin} - diskquota - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - maxusers - {/translate} - --- - -
- {translate module=host_provision_plugin} - files - {/translate} - - { $list->bool("product_host_provision_plugin_data[winfiles]", $plugin_data.winfiles, "form_menu") } - ---
- {translate module=host_provision_plugin} - analog - {/translate} - - { $list->bool("product_host_provision_plugin_data[winanalog]", $plugin_data.winanalog, "form_menu") } - ---
- {translate module=host_provision_plugin} - odbc - {/translate} - - { $list->bool("product_host_provision_plugin_data[odbc]", $plugin_data.odbc, "form_menu") } -  
- {translate module=host_provision_plugin} - coldfusion - {/translate} - - { $list->bool("product_host_provision_plugin_data[coldfusion]", $plugin_data.coldfusion, "form_menu") } -  
- {translate module=host_provision_plugin} - frontpage - {/translate} - - { $list->bool("product_host_provision_plugin_data[frontpage]", $plugin_data.frontpage, "form_menu") } -  
- {translate module=host_provision_plugin} - perl - {/translate} - - { $list->bool("product_host_provision_plugin_data[perl]", $plugin_data.perl, "form_menu") } -  
- {translate module=host_provision_plugin} - php - {/translate} - - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } -  
- {translate module=host_provision_plugin} - mysql - {/translate} - - { $list->bool("product_host_provision_plugin_data[mysql]", $plugin_data.mysql, "form_menu") } -  
- {translate module=host_provision_plugin} - urchin - {/translate} - - { $list->bool("product_host_provision_plugin_data[urchin]", $plugin_data.urchin, "form_menu") } -  
- {translate module=host_provision_plugin} - msftpsvc - {/translate} - - { $list->bool("product_host_provision_plugin_data[msftpsvc]", $plugin_data.msftpsvc, "form_menu") } -  
- {translate module=host_provision_plugin} - cgi - {/translate} - - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } -  
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } -  
- {translate module=host_provision_plugin} - sslc - {/translate} - - { $list->bool("product_host_provision_plugin_data[sslc]", $plugin_data.sslc, "form_menu") } -  
- {translate module=host_provision_plugin} - w3svc - {/translate} - - { $list->bool("product_host_provision_plugin_data[w3svc]", $plugin_data.w3svc, "form_menu") } -  
- {translate module=host_provision_plugin} - allowanonymous - {/translate} - - { $list->bool("product_host_provision_plugin_data[allowanonymous]", $plugin_data.allowanonymous, "form_menu") } -  
- {translate module=host_provision_plugin} - logtype - {/translate} - - { $list->bool("product_host_provision_plugin_data[logtype]", $plugin_data.logtype, "form_menu") } -  
- {translate module=host_provision_plugin} - msftpsvc - {/translate} - - { $list->bool("product_host_provision_plugin_data[msftpsvc]", $plugin_data.msftpsvc, "form_menu") } -  
- {translate module=host_provision_plugin} - ftp_maxconnections - {/translate} - --- - -
- {translate module=host_provision_plugin} - ftp_maxconnectionsunlimited - {/translate} - - { $list->bool("product_host_provision_plugin_data[ftp_maxconnectionsunlimited]", $plugin_data.ftp_maxconnectionsunlimited, "form_menu") } -  
- {translate module=host_provision_plugin} - logtype - {/translate} - - { $list->bool("product_host_provision_plugin_data[logtype]", $plugin_data.logtype, "form_menu") } -  
- {translate module=host_provision_plugin} - enablebandwidthquota - {/translate} - - { $list->bool("product_host_provision_plugin_data[enablebandwidthquota]", $plugin_data.enablebandwidthquota, "form_menu") } - - - Kbps
- {translate module=host_provision_plugin} - cpuquota - {/translate} - - { $list->bool("product_host_provision_plugin_data[cpuquota]", $plugin_data.cpuquota, "form_menu") } - - - 1-100
- {translate module=host_provision_plugin} - w3svc_maxconnections - {/translate} - --- - -
- {translate module=host_provision_plugin} - w3svc_maxconnectionsunlimited - {/translate} - - { $list->bool("product_host_provision_plugin_data[w3svc_maxconnectionsunlimited]", $plugin_data.w3svc_maxconnectionsunlimited, "form_menu") } -  
- {translate module=host_provision_plugin} - serversize - {/translate} - --- - -
- {translate module=host_provision_plugin} - winmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[winmail]", $plugin_data.winmail, "form_menu") } -  
- {translate module=host_provision_plugin} - userforwards - {/translate} - - { $list->bool("product_host_provision_plugin_data[userforwards]", $plugin_data.userforwards, "form_menu") } -  
- {translate module=host_provision_plugin} - autoresponder - {/translate} - - { $list->bool("product_host_provision_plugin_data[autoresponder]", $plugin_data.autoresponder, "form_menu") } -  
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_WINDOWS_3_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_WINDOWS_3_5.tpl deleted file mode 100644 index 7a4793fe..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_ENSIM_WINDOWS_3_5.tpl +++ /dev/null @@ -1,419 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - ipinfo_namebased - {/translate} - --- - -
- {translate module=host_provision_plugin} - diskquota - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - maxusers - {/translate} - --- - -
- {translate module=host_provision_plugin} - datadrive - {/translate} - --- - -
- {translate module=host_provision_plugin} - style_name - {/translate} - --- - -
- {translate module=host_provision_plugin} - urchin - {/translate} - - { $list->bool("product_host_provision_plugin_data[urchin]", $plugin_data.urchin, "form_menu") } - ---
- {translate module=host_provision_plugin} - files - {/translate} - - { $list->bool("product_host_provision_plugin_data[winfiles]", $plugin_data.winfiles, "form_menu") } - ---
- {translate module=host_provision_plugin} - analog - {/translate} - - { $list->bool("product_host_provision_plugin_data[winanalog]", $plugin_data.winanalog, "form_menu") } - ---
- {translate module=host_provision_plugin} - odbc - {/translate} - - { $list->bool("product_host_provision_plugin_data[odbc]", $plugin_data.odbc, "form_menu") } -  
- {translate module=host_provision_plugin} - coldfusion - {/translate} - - { $list->bool("product_host_provision_plugin_data[coldfusion]", $plugin_data.coldfusion, "form_menu") } -  
- {translate module=host_provision_plugin} - frontpage - {/translate} - - { $list->bool("product_host_provision_plugin_data[frontpage]", $plugin_data.frontpage, "form_menu") } -  
- {translate module=host_provision_plugin} - perl - {/translate} - - { $list->bool("product_host_provision_plugin_data[perl]", $plugin_data.perl, "form_menu") } -  
- {translate module=host_provision_plugin} - php - {/translate} - - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } -  
- {translate module=host_provision_plugin} - mysql - {/translate} - - { $list->bool("product_host_provision_plugin_data[mysql]", $plugin_data.mysql, "form_menu") } -  
- {translate module=host_provision_plugin} - urchin - {/translate} - - { $list->bool("product_host_provision_plugin_data[urchin]", $plugin_data.urchin, "form_menu") } -  
- {translate module=host_provision_plugin} - msftpsvc - {/translate} - - { $list->bool("product_host_provision_plugin_data[msftpsvc]", $plugin_data.msftpsvc, "form_menu") } -  
- {translate module=host_provision_plugin} - cgi - {/translate} - - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } -  
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } -  
- {translate module=host_provision_plugin} - sslc - {/translate} - - { $list->bool("product_host_provision_plugin_data[sslc]", $plugin_data.sslc, "form_menu") } -  
- {translate module=host_provision_plugin} - w3svc - {/translate} - - { $list->bool("product_host_provision_plugin_data[w3svc]", $plugin_data.w3svc, "form_menu") } -  
- {translate module=host_provision_plugin} - allowanonymous - {/translate} - - { $list->bool("product_host_provision_plugin_data[allowanonymous]", $plugin_data.allowanonymous, "form_menu") } -  
- {translate module=host_provision_plugin} - logtype - {/translate} - - { $list->bool("product_host_provision_plugin_data[logtype]", $plugin_data.logtype, "form_menu") } -  
- {translate module=host_provision_plugin} - msftpsvc - {/translate} - - { $list->bool("product_host_provision_plugin_data[msftpsvc]", $plugin_data.msftpsvc, "form_menu") } -  
- {translate module=host_provision_plugin} - ftp_maxconnections - {/translate} - --- - -
- {translate module=host_provision_plugin} - ftp_maxconnectionsunlimited - {/translate} - - { $list->bool("product_host_provision_plugin_data[ftp_maxconnectionsunlimited]", $plugin_data.ftp_maxconnectionsunlimited, "form_menu") } -  
- {translate module=host_provision_plugin} - logtype - {/translate} - - { $list->bool("product_host_provision_plugin_data[logtype]", $plugin_data.logtype, "form_menu") } -  
- {translate module=host_provision_plugin} - enablebandwidthquota - {/translate} - - { $list->bool("product_host_provision_plugin_data[enablebandwidthquota]", $plugin_data.enablebandwidthquota, "form_menu") } - - - Kbps
- {translate module=host_provision_plugin} - cpuquota - {/translate} - - { $list->bool("product_host_provision_plugin_data[enablecpuquota]", $plugin_data.enablecpuquota, "form_menu") } - - - 1-100
- {translate module=host_provision_plugin} - w3svc_maxconnections - {/translate} - --- - -
- {translate module=host_provision_plugin} - w3svc_maxconnectionsunlimited - {/translate} - - { $list->bool("product_host_provision_plugin_data[w3svc_maxconnectionsunlimited]", $plugin_data.w3svc_maxconnectionsunlimited, "form_menu") } -  
- {translate module=host_provision_plugin} - serversize - {/translate} - --- - -
- {translate module=host_provision_plugin} - winmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[winmail]", $plugin_data.winmail, "form_menu") } -  
- {translate module=host_provision_plugin} - userforwards - {/translate} - - { $list->bool("product_host_provision_plugin_data[userforwards]", $plugin_data.userforwards, "form_menu") } -  
- {translate module=host_provision_plugin} - autoresponder - {/translate} - - { $list->bool("product_host_provision_plugin_data[autoresponder]", $plugin_data.autoresponder, "form_menu") } -  
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_HEARTINTERNET.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_HEARTINTERNET.tpl deleted file mode 100644 index 74ba3fce..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_HEARTINTERNET.tpl +++ /dev/null @@ -1,9 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - -
Heart Internet Hosting Package ID - - eg: 12345
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_HELM_3_1.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_HELM_3_1.tpl deleted file mode 100644 index 1805dd35..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_HELM_3_1.tpl +++ /dev/null @@ -1,21 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - -
Helm Hosting Plan ID - -
To get the hosting Plan Id, go to your reseller account in - Helm, view your Hosting Plans, then click one to view it. In the URL field - of your web browser, you will see the URL and the Plan Id will be displayed - at the end: PlanID=XXX - Where XXX is the Plan Id. Also, the plans you enter - here must have no setup fees or recurring fees, otherwise, AB will not be - able to create the domain in the user's account after adding the Plan to - their account. 
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_HOSTOPIA.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_HOSTOPIA.tpl deleted file mode 100644 index a0e946ae..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_HOSTOPIA.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - -
- Hostopia Package - -
Hostopia Service
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_MANUAL.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_MANUAL.tpl deleted file mode 100644 index 73ff77ef..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_MANUAL.tpl +++ /dev/null @@ -1,251 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - bandwidth_threshold - {/translate} - --- - - bytes
- {translate module=host_provision_plugin} - ipinfo_namebased - {/translate} - --- - -
- {translate module=host_provision_plugin} - diskquota - {/translate} - - - - -
- {translate module=host_provision_plugin} - telnet - {/translate} - - { $list->bool("product_host_provision_plugin_data[telnet]", $plugin_data.telnet, "form_menu") } - ---
- {translate module=host_provision_plugin} - ssh - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssh]", $plugin_data.ssh, "form_menu") } - ---
- {translate module=host_provision_plugin} - imap - {/translate} - - { $list->bool("product_host_provision_plugin_data[imap]", $plugin_data.imap, "form_menu") } - ---
- {translate module=host_provision_plugin} - bind - {/translate} - - { $list->bool("product_host_provision_plugin_data[bind]", $plugin_data.bind, "form_menu") } - ---
- {translate module=host_provision_plugin} - anonftp - {/translate} - - { $list->bool("product_host_provision_plugin_data[anonftp]", $plugin_data.anonftp, "form_menu") } - ---
- {translate module=host_provision_plugin} - openssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[openssl]", $plugin_data.openssl, "form_menu") } - ---
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } - ---
- {translate module=host_provision_plugin} - weblogs - {/translate} - - { $list->bool("product_host_provision_plugin_data[weblogs]", $plugin_data.weblogs, "form_menu") } - ---
- {translate module=host_provision_plugin} - vacation - {/translate} - - { $list->bool("product_host_provision_plugin_data[vacation]", $plugin_data.vacation, "form_menu") } - ---
- {translate module=host_provision_plugin} - majordomo - {/translate} - - { $list->bool("product_host_provision_plugin_data[majordomo]", $plugin_data.majordomo, "form_menu") } - ---
- {translate module=host_provision_plugin} - sqmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[sqmail]", $plugin_data.sqmail, "form_menu") } - ---
- {translate module=host_provision_plugin} - frontpage - {/translate} - - { $list->bool("product_host_provision_plugin_data[frontpage]", $plugin_data.frontpage, "form_menu") } - ---
- {translate module=host_provision_plugin} - mivamerchant - {/translate} - - { $list->bool("product_host_provision_plugin_data[mivamerchant]", $plugin_data.mivamerchant, "form_menu") } - ---
- {translate module=host_provision_plugin} - analog - {/translate} - - { $list->bool("product_host_provision_plugin_data[analog]", $plugin_data.analog, "form_menu") } - ---
- {translate module=host_provision_plugin} - backup - {/translate} - - { $list->bool("product_host_provision_plugin_data[backup]", $plugin_data.backup, "form_menu") } - ---
- {translate module=host_provision_plugin} - files - {/translate} - - { $list->bool("product_host_provision_plugin_data[files]", $plugin_data.files, "form_menu") } - ---
- -
- {translate module=host_provision_plugin} - notes - {/translate} -
- -
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_8.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_8.tpl deleted file mode 100644 index 0f986cb7..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_8.tpl +++ /dev/null @@ -1,36 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - -
   
IP Based Plan? - { $list->bool("product_host_provision_plugin_data[ip_based]", $plugin_data.ip_based, "form_menu") } -
   
Client/Domain Templates 
Client template - -
Domain template - -
- - - diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_LINUX_6.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_LINUX_6.tpl deleted file mode 100644 index 98fe28a6..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_LINUX_6.tpl +++ /dev/null @@ -1,364 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - hst_type - {/translate} - - - ---
- {translate module=host_provision_plugin} - hard_quota - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - disk_space - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - traffic - {/translate} - --- - - MB/month
- {translate module=host_provision_plugin} - max_box - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_redir - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_mg - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_resp - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_wu - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_db - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_maillists - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_webapps - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - keep_traf_stat - {/translate} - --- - - Months (0=unlimited)
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp]", $plugin_data.fp, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp_ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp_ssl]", $plugin_data.fp_ssl, "form_menu") } - ---
- {translate module=host_provision_plugin} - fpauth - {/translate} - - { $list->bool("product_host_provision_plugin_data[fpauth]", $plugin_data.fpauth, "form_menu") } - ---
- {translate module=host_provision_plugin} - php - {/translate} - - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } - ---
- {translate module=host_provision_plugin} - cgi - {/translate} - - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } - ---
- {translate module=host_provision_plugin} - perl - {/translate} - - { $list->bool("product_host_provision_plugin_data[perl]", $plugin_data.perl, "form_menu") } - ---
- {translate module=host_provision_plugin} - asp - {/translate} - - { $list->bool("product_host_provision_plugin_data[asp]", $plugin_data.asp, "form_menu") } - ---
- {translate module=host_provision_plugin} - python - {/translate} - - { $list->bool("product_host_provision_plugin_data[python]", $plugin_data.python, "form_menu") } - ---
- {translate module=host_provision_plugin} - webstat - {/translate} - - { $list->bool("product_host_provision_plugin_data[webstat]", $plugin_data.webstat, "form_menu") } - ---
- {translate module=host_provision_plugin} - webmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[webmail]", $plugin_data.webmail, "form_menu") } - ---
- {translate module=host_provision_plugin} - log_bysize - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_rotate]", $plugin_data.log_rotate, "form_menu") } - - - KB
- {translate module=host_provision_plugin} - log_max_num - {/translate} - - - - -
- {translate module=host_provision_plugin} - log_compress - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_compress]", $plugin_data.log_compress, "form_menu") } - ---
- {translate module=host_provision_plugin} - err_docs - {/translate} - - { $list->bool("product_host_provision_plugin_data[err_docs]", $plugin_data.err_docs, "form_menu") } - ---
- {translate module=host_provision_plugin} - wuscripts - {/translate} - - { $list->bool("product_host_provision_plugin_data[wuscripts]", $plugin_data.wuscripts, "form_menu") } - ---
- {translate module=host_provision_plugin} - ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssl]", $plugin_data.ssl, "form_menu") } - ---
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_LINUX_7.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_LINUX_7.tpl deleted file mode 100644 index 30e9be87..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_LINUX_7.tpl +++ /dev/null @@ -1,419 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - hst_type - {/translate} - - - ---
- {translate module=host_provision_plugin} - shell - {/translate} - --- - -
- {translate module=host_provision_plugin} - hard_quota - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - disk_space - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - traffic - {/translate} - --- - - MB/month
- {translate module=host_provision_plugin} - mail_service - {/translate} - - { $list->bool("product_host_provision_plugin_data[mail_service]", $plugin_data.mail_service, "form_menu") } -  
- {translate module=host_provision_plugin} - max_box - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - mbox_quota - {/translate} - --- - - KB
- {translate module=host_provision_plugin} - max_redir - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_mg - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_resp - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_wu - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_db - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_subdom - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_maillists - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_webapps - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - keep_traf_stat - {/translate} - --- - - Months (0=unlimited)
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp]", $plugin_data.fp, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp_ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp_ssl]", $plugin_data.fp_ssl, "form_menu") } - ---
- {translate module=host_provision_plugin} - fpauth - {/translate} - - { $list->bool("product_host_provision_plugin_data[fpauth]", $plugin_data.fpauth, "form_menu") } - ---
- {translate module=host_provision_plugin} - php - {/translate} - - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } - ---
- {translate module=host_provision_plugin} - cgi - {/translate} - - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } - ---
- {translate module=host_provision_plugin} - perl - {/translate} - - { $list->bool("product_host_provision_plugin_data[perl]", $plugin_data.perl, "form_menu") } - ---
- {translate module=host_provision_plugin} - asp - {/translate} - - { $list->bool("product_host_provision_plugin_data[asp]", $plugin_data.asp, "form_menu") } - ---
- {translate module=host_provision_plugin} - python - {/translate} - - { $list->bool("product_host_provision_plugin_data[python]", $plugin_data.python, "form_menu") } - ---
- {translate module=host_provision_plugin} - coldfusion - {/translate} - - { $list->bool("product_host_provision_plugin_data[coldfusion]", $plugin_data.coldfusion, "form_menu") } - ---
- {translate module=host_provision_plugin} - webstat - {/translate} - - { $list->bool("product_host_provision_plugin_data[webstat]", $plugin_data.webstat, "form_menu") } - ---
- {translate module=host_provision_plugin} - webmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[webmail]", $plugin_data.webmail, "form_menu") } - ---
- {translate module=host_provision_plugin} - log_bysize - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_rotate]", $plugin_data.log_rotate, "form_menu") } - - - KB
- {translate module=host_provision_plugin} - log_max_num - {/translate} - - - - -
- {translate module=host_provision_plugin} - log_compress - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_compress]", $plugin_data.log_compress, "form_menu") } - ---
- {translate module=host_provision_plugin} - err_docs - {/translate} - - { $list->bool("product_host_provision_plugin_data[err_docs]", $plugin_data.err_docs, "form_menu") } - ---
- {translate module=host_provision_plugin} - wuscripts - {/translate} - - { $list->bool("product_host_provision_plugin_data[wuscripts]", $plugin_data.wuscripts, "form_menu") } - ---
- {translate module=host_provision_plugin} - ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssl]", $plugin_data.ssl, "form_menu") } - ---
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_RELOADED_7_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_RELOADED_7_5.tpl deleted file mode 100644 index ce3679cc..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_RELOADED_7_5.tpl +++ /dev/null @@ -1,311 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   
IP Based Plan? - { $list->bool("product_host_provision_plugin_data[ip_based]", $plugin_data.ip_based, "form_menu") } -
   
Client/Domain Limits 
Maximum number of subdomains - -
Disk space - - MB
Maximum amount of traffic - - MB/Month
Maximum number of web users - -
Maximum number of databases - -
Maximum number of mailboxes - -
Mailbox quota - - KB
Maximum number of mail redirects - -
Maximum number of mail groups - -
Maximum number of mail autoresponders - -
Maximum number of mailing lists - -
Maximum number of Java applications - -
FTP Quota - - - MB
   
Client Permissions: 
Domain creation - { $list->bool("product_host_provision_plugin_data[create_domains]", $plugin_data.create_domains, "form_menu") } -
Physical hosting management - { $list->bool("product_host_provision_plugin_data[manage_phosting]", $plugin_data.manage_phosting, "form_menu") } -
Management of shell access to server - { $list->bool("product_host_provision_plugin_data[manage_sh_access]", $plugin_data.manage_sh_access, "form_menu") } -
Non-chrooted shell management - { $list->bool("product_host_provision_plugin_data[manage_not_chroot_shell]", $plugin_data.manage_not_chroot_shell, "form_menu") } -
Hard disk quota assignment - { $list->bool("product_host_provision_plugin_data[manage_quota]", $plugin_data.manage_quota, "form_menu") } -
Subdomains management - { $list->bool("product_host_provision_plugin_data[manage_subdomains]", $plugin_data.manage_subdomains, "form_menu") } -
Log rotation management - { $list->bool("product_host_provision_plugin_data[manage_log]", $plugin_data.manage_log, "form_menu") } -
Anonymous FTP management - { $list->bool("product_host_provision_plugin_data[manage_anonftp]", $plugin_data.manage_anonftp, "form_menu") } -
Crontab management - { $list->bool("product_host_provision_plugin_data[manage_crontab]", $plugin_data.manage_crontab, "form_menu") } -
Use of Mambo content management system (Site Builder) - { $list->bool("product_host_provision_plugin_data[site_builder]", $plugin_data.site_builder, "form_menu") } -
Domain limits adjustment - { $list->bool("product_host_provision_plugin_data[change_limits]", $plugin_data.change_limits, "form_menu") } -
DNS zone management - { $list->bool("product_host_provision_plugin_data[manage_dns]", $plugin_data.manage_dns, "form_menu") } -
Java applications management - { $list->bool("product_host_provision_plugin_data[manage_webapps]", $plugin_data.manage_webapps, "form_menu") } -
Mailing lists management - { $list->bool("product_host_provision_plugin_data[manage_maillists]", $plugin_data.manage_maillists, "form_menu") } -
Dr.Web antivirus management - { $list->bool("product_host_provision_plugin_data[manage_drweb]", $plugin_data.manage_drweb, "form_menu") } -
Backup/restore functions - { $list->bool("product_host_provision_plugin_data[make_dumps]", $plugin_data.make_dumps, "form_menu") } -
  
Domain Permissions: 
Enable Frontpage - { $list->bool("product_host_provision_plugin_data[fp]", $plugin_data.fp, "form_menu") } -
Enable Frontpage SSL - { $list->bool("product_host_provision_plugin_data[fp_ssl]", $plugin_data.fp_ssl, "form_menu") } -
Enable Frontpage Authentication - { $list->bool("product_host_provision_plugin_data[fp_auth]", $plugin_data.fp_auth, "form_menu") } -
SSL - { $list->bool("product_host_provision_plugin_data[ssl]", $plugin_data.ssl, "form_menu") } -
Shell - { $list->bool("product_host_provision_plugin_data[shell]", $plugin_data.shell, "form_menu") } -
PHP - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } -
SSI - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } -
CGI - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } -
MOD Perl - { $list->bool("product_host_provision_plugin_data[mod_perl]", $plugin_data.mod_perl, "form_menu") } -
MOD Python - { $list->bool("product_host_provision_plugin_data[mod_python]", $plugin_data.mod_python, "form_menu") } -
ASP - { $list->bool("product_host_provision_plugin_data[asp]", $plugin_data.asp, "form_menu") } -
ASP.net - { $list->bool("product_host_provision_plugin_data[asp_dot_net]", $plugin_data.asp_dot_net, "form_menu") } -
ColdFusion - { $list->bool("product_host_provision_plugin_data[coldfusion]", $plugin_data.coldfusion, "form_menu") } -
Web Stats - { $list->bool("product_host_provision_plugin_data[webstat]", $plugin_data.webstat, "form_menu") } -
Error Docs - { $list->bool("product_host_provision_plugin_data[errdocs]", $plugin_data.errdocs, "form_menu") } -
@domains - { $list->bool("product_host_provision_plugin_data[at_domains]", $plugin_data.at_domains, "form_menu") } -
- - - diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_WINDOWS_6_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_WINDOWS_6_5.tpl deleted file mode 100644 index 0dc08767..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_WINDOWS_6_5.tpl +++ /dev/null @@ -1,375 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - hst_type - {/translate} - - - ---
- {translate module=host_provision_plugin} - hard_quota - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - disk_space - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - traffic - {/translate} - --- - - MB/month
- {translate module=host_provision_plugin} - max_box - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_redir - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_mg - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_resp - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_wu - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_db - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_subdom - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_maillists - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_webapps - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - keep_traf_stat - {/translate} - --- - - Months (0=unlimited)
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp]", $plugin_data.fp, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp_ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp_ssl]", $plugin_data.fp_ssl, "form_menu") } - ---
- {translate module=host_provision_plugin} - fpauth - {/translate} - - { $list->bool("product_host_provision_plugin_data[fpauth]", $plugin_data.fpauth, "form_menu") } - ---
- {translate module=host_provision_plugin} - php - {/translate} - - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } - ---
- {translate module=host_provision_plugin} - cgi - {/translate} - - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } - ---
- {translate module=host_provision_plugin} - perl - {/translate} - - { $list->bool("product_host_provision_plugin_data[perl]", $plugin_data.perl, "form_menu") } - ---
- {translate module=host_provision_plugin} - asp - {/translate} - - { $list->bool("product_host_provision_plugin_data[asp]", $plugin_data.asp, "form_menu") } - ---
- {translate module=host_provision_plugin} - python - {/translate} - - { $list->bool("product_host_provision_plugin_data[python]", $plugin_data.python, "form_menu") } - ---
- {translate module=host_provision_plugin} - webstat - {/translate} - - { $list->bool("product_host_provision_plugin_data[webstat]", $plugin_data.webstat, "form_menu") } - ---
- {translate module=host_provision_plugin} - webmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[webmail]", $plugin_data.webmail, "form_menu") } - ---
- {translate module=host_provision_plugin} - log_bysize - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_rotate]", $plugin_data.log_rotate, "form_menu") } - - - KB
- {translate module=host_provision_plugin} - log_max_num - {/translate} - - - - -
- {translate module=host_provision_plugin} - log_compress - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_compress]", $plugin_data.log_compress, "form_menu") } - ---
- {translate module=host_provision_plugin} - err_docs - {/translate} - - { $list->bool("product_host_provision_plugin_data[err_docs]", $plugin_data.err_docs, "form_menu") } - ---
- {translate module=host_provision_plugin} - wuscripts - {/translate} - - { $list->bool("product_host_provision_plugin_data[wuscripts]", $plugin_data.wuscripts, "form_menu") } - ---
- {translate module=host_provision_plugin} - ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssl]", $plugin_data.ssl, "form_menu") } - ---
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_WINDOWS_7.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_WINDOWS_7.tpl deleted file mode 100644 index 30e9be87..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_PLESK_WINDOWS_7.tpl +++ /dev/null @@ -1,419 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
- {translate module=host_provision_plugin} - hst_type - {/translate} - - - ---
- {translate module=host_provision_plugin} - shell - {/translate} - --- - -
- {translate module=host_provision_plugin} - hard_quota - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - disk_space - {/translate} - --- - - MB
- {translate module=host_provision_plugin} - traffic - {/translate} - --- - - MB/month
- {translate module=host_provision_plugin} - mail_service - {/translate} - - { $list->bool("product_host_provision_plugin_data[mail_service]", $plugin_data.mail_service, "form_menu") } -  
- {translate module=host_provision_plugin} - max_box - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - mbox_quota - {/translate} - --- - - KB
- {translate module=host_provision_plugin} - max_redir - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_mg - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_resp - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_wu - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_db - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_subdom - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_maillists - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - max_webapps - {/translate} - --- - - -1=unlimited
- {translate module=host_provision_plugin} - keep_traf_stat - {/translate} - --- - - Months (0=unlimited)
- {translate module=host_provision_plugin} - ssi - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp]", $plugin_data.fp, "form_menu") } - ---
- {translate module=host_provision_plugin} - fp_ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[fp_ssl]", $plugin_data.fp_ssl, "form_menu") } - ---
- {translate module=host_provision_plugin} - fpauth - {/translate} - - { $list->bool("product_host_provision_plugin_data[fpauth]", $plugin_data.fpauth, "form_menu") } - ---
- {translate module=host_provision_plugin} - php - {/translate} - - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } - ---
- {translate module=host_provision_plugin} - cgi - {/translate} - - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } - ---
- {translate module=host_provision_plugin} - perl - {/translate} - - { $list->bool("product_host_provision_plugin_data[perl]", $plugin_data.perl, "form_menu") } - ---
- {translate module=host_provision_plugin} - asp - {/translate} - - { $list->bool("product_host_provision_plugin_data[asp]", $plugin_data.asp, "form_menu") } - ---
- {translate module=host_provision_plugin} - python - {/translate} - - { $list->bool("product_host_provision_plugin_data[python]", $plugin_data.python, "form_menu") } - ---
- {translate module=host_provision_plugin} - coldfusion - {/translate} - - { $list->bool("product_host_provision_plugin_data[coldfusion]", $plugin_data.coldfusion, "form_menu") } - ---
- {translate module=host_provision_plugin} - webstat - {/translate} - - { $list->bool("product_host_provision_plugin_data[webstat]", $plugin_data.webstat, "form_menu") } - ---
- {translate module=host_provision_plugin} - webmail - {/translate} - - { $list->bool("product_host_provision_plugin_data[webmail]", $plugin_data.webmail, "form_menu") } - ---
- {translate module=host_provision_plugin} - log_bysize - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_rotate]", $plugin_data.log_rotate, "form_menu") } - - - KB
- {translate module=host_provision_plugin} - log_max_num - {/translate} - - - - -
- {translate module=host_provision_plugin} - log_compress - {/translate} - - { $list->bool("product_host_provision_plugin_data[log_compress]", $plugin_data.log_compress, "form_menu") } - ---
- {translate module=host_provision_plugin} - err_docs - {/translate} - - { $list->bool("product_host_provision_plugin_data[err_docs]", $plugin_data.err_docs, "form_menu") } - ---
- {translate module=host_provision_plugin} - wuscripts - {/translate} - - { $list->bool("product_host_provision_plugin_data[wuscripts]", $plugin_data.wuscripts, "form_menu") } - ---
- {translate module=host_provision_plugin} - ssl - {/translate} - - { $list->bool("product_host_provision_plugin_data[ssl]", $plugin_data.ssl, "form_menu") } - ---
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_PSA_RESELL_7_5.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_PSA_RESELL_7_5.tpl deleted file mode 100644 index ce3679cc..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_PSA_RESELL_7_5.tpl +++ /dev/null @@ -1,311 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   
IP Based Plan? - { $list->bool("product_host_provision_plugin_data[ip_based]", $plugin_data.ip_based, "form_menu") } -
   
Client/Domain Limits 
Maximum number of subdomains - -
Disk space - - MB
Maximum amount of traffic - - MB/Month
Maximum number of web users - -
Maximum number of databases - -
Maximum number of mailboxes - -
Mailbox quota - - KB
Maximum number of mail redirects - -
Maximum number of mail groups - -
Maximum number of mail autoresponders - -
Maximum number of mailing lists - -
Maximum number of Java applications - -
FTP Quota - - - MB
   
Client Permissions: 
Domain creation - { $list->bool("product_host_provision_plugin_data[create_domains]", $plugin_data.create_domains, "form_menu") } -
Physical hosting management - { $list->bool("product_host_provision_plugin_data[manage_phosting]", $plugin_data.manage_phosting, "form_menu") } -
Management of shell access to server - { $list->bool("product_host_provision_plugin_data[manage_sh_access]", $plugin_data.manage_sh_access, "form_menu") } -
Non-chrooted shell management - { $list->bool("product_host_provision_plugin_data[manage_not_chroot_shell]", $plugin_data.manage_not_chroot_shell, "form_menu") } -
Hard disk quota assignment - { $list->bool("product_host_provision_plugin_data[manage_quota]", $plugin_data.manage_quota, "form_menu") } -
Subdomains management - { $list->bool("product_host_provision_plugin_data[manage_subdomains]", $plugin_data.manage_subdomains, "form_menu") } -
Log rotation management - { $list->bool("product_host_provision_plugin_data[manage_log]", $plugin_data.manage_log, "form_menu") } -
Anonymous FTP management - { $list->bool("product_host_provision_plugin_data[manage_anonftp]", $plugin_data.manage_anonftp, "form_menu") } -
Crontab management - { $list->bool("product_host_provision_plugin_data[manage_crontab]", $plugin_data.manage_crontab, "form_menu") } -
Use of Mambo content management system (Site Builder) - { $list->bool("product_host_provision_plugin_data[site_builder]", $plugin_data.site_builder, "form_menu") } -
Domain limits adjustment - { $list->bool("product_host_provision_plugin_data[change_limits]", $plugin_data.change_limits, "form_menu") } -
DNS zone management - { $list->bool("product_host_provision_plugin_data[manage_dns]", $plugin_data.manage_dns, "form_menu") } -
Java applications management - { $list->bool("product_host_provision_plugin_data[manage_webapps]", $plugin_data.manage_webapps, "form_menu") } -
Mailing lists management - { $list->bool("product_host_provision_plugin_data[manage_maillists]", $plugin_data.manage_maillists, "form_menu") } -
Dr.Web antivirus management - { $list->bool("product_host_provision_plugin_data[manage_drweb]", $plugin_data.manage_drweb, "form_menu") } -
Backup/restore functions - { $list->bool("product_host_provision_plugin_data[make_dumps]", $plugin_data.make_dumps, "form_menu") } -
  
Domain Permissions: 
Enable Frontpage - { $list->bool("product_host_provision_plugin_data[fp]", $plugin_data.fp, "form_menu") } -
Enable Frontpage SSL - { $list->bool("product_host_provision_plugin_data[fp_ssl]", $plugin_data.fp_ssl, "form_menu") } -
Enable Frontpage Authentication - { $list->bool("product_host_provision_plugin_data[fp_auth]", $plugin_data.fp_auth, "form_menu") } -
SSL - { $list->bool("product_host_provision_plugin_data[ssl]", $plugin_data.ssl, "form_menu") } -
Shell - { $list->bool("product_host_provision_plugin_data[shell]", $plugin_data.shell, "form_menu") } -
PHP - { $list->bool("product_host_provision_plugin_data[php]", $plugin_data.php, "form_menu") } -
SSI - { $list->bool("product_host_provision_plugin_data[ssi]", $plugin_data.ssi, "form_menu") } -
CGI - { $list->bool("product_host_provision_plugin_data[cgi]", $plugin_data.cgi, "form_menu") } -
MOD Perl - { $list->bool("product_host_provision_plugin_data[mod_perl]", $plugin_data.mod_perl, "form_menu") } -
MOD Python - { $list->bool("product_host_provision_plugin_data[mod_python]", $plugin_data.mod_python, "form_menu") } -
ASP - { $list->bool("product_host_provision_plugin_data[asp]", $plugin_data.asp, "form_menu") } -
ASP.net - { $list->bool("product_host_provision_plugin_data[asp_dot_net]", $plugin_data.asp_dot_net, "form_menu") } -
ColdFusion - { $list->bool("product_host_provision_plugin_data[coldfusion]", $plugin_data.coldfusion, "form_menu") } -
Web Stats - { $list->bool("product_host_provision_plugin_data[webstat]", $plugin_data.webstat, "form_menu") } -
Error Docs - { $list->bool("product_host_provision_plugin_data[errdocs]", $plugin_data.errdocs, "form_menu") } -
@domains - { $list->bool("product_host_provision_plugin_data[at_domains]", $plugin_data.at_domains, "form_menu") } -
- - - diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_RAQ_550.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_RAQ_550.tpl deleted file mode 100644 index 800bf094..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_RAQ_550.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- quota - -
maxusers
ftp-quota
ftp-maxconn
enable-shell { $list->bool("product_host_provision_plugin_data[enable-shell]", $plugin_data.enable-shell, "form_menu") }
enable-apop{ $list->bool("product_host_provision_plugin_data[enable-apop]", $plugin_data.enable-apop, "form_menu") }
enable-cgi{ $list->bool("product_host_provision_plugin_data[enable-cgi]", $plugin_data.enable-cgi, "form_menu") }
enable-php{ $list->bool("product_host_provision_plugin_data[enable-php]", $plugin_data.enable-php, "form_menu") }
enable-ssi{ $list->bool("product_host_provision_plugin_data[enable-ssi]", $plugin_data.enable-ssi, "form_menu") }
enable-ssl{ $list->bool("product_host_provision_plugin_data[enable-ssl]", $plugin_data.enable-ssl, "form_menu") }
enable-java { $list->bool("product_host_provision_plugin_data[enable-java]", $plugin_data.enable-java, "form_menu") }
enable-ftp{ $list->bool("product_host_provision_plugin_data[enable-ftp]", $plugin_data.enable-ftp, "form_menu") }
-


-
-

-


-
-
-

diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_WEBMIN.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_WEBMIN.tpl deleted file mode 100644 index 92d41daa..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_WEBMIN.tpl +++ /dev/null @@ -1,92 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_provision_plugin} - service - {/translate} - - {translate module=host_provision_plugin} - enabled - {/translate} - - {translate module=host_provision_plugin} - options - {/translate} -
Network interface   - -
Create home directory? - { $list->bool("product_host_provision_plugin_data[home_dir]", $plugin_data.home_dir, "form_menu") } -  
Set up DNS zone? - { $list->bool("product_host_provision_plugin_data[dns]", $plugin_data.dns, "form_menu") } -  
Set up website for domain? - { $list->bool("product_host_provision_plugin_data[website]", $plugin_data.website, "form_menu") } -  
Create MySQL database? - { $list->bool("product_host_provision_plugin_data[mysql]", $plugin_data.mysql, "form_menu") } -  
Create Unix user? - { $list->bool("product_host_provision_plugin_data[unix]", $plugin_data.unix, "form_menu") } -  
Set up Webalizer for web logs? - { $list->bool("product_host_provision_plugin_data[webalizer]", $plugin_data.webalizer, "form_menu") } -  
Set up log file rotation? - { $list->bool("product_host_provision_plugin_data[logrotate]", $plugin_data.logrotate, "form_menu") } -  
Create Webmin login? - { $list->bool("product_host_provision_plugin_data[webmin]", $plugin_data.webmin, "form_menu") } -  
- -

-
-
diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_WEBMIN_PRO.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_WEBMIN_PRO.tpl deleted file mode 100644 index 9c16bc50..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_WEBMIN_PRO.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Server Template Name - - -
{translate module=host_provision_plugin} -ipinfo_namebased - {/translate}
Home directory exists? { $list->bool("product_host_provision_plugin_data[dir]", $plugin_data.dir, "form_menu") }
Unix user exists? { $list->bool("product_host_provision_plugin_data[unix]", $plugin_data.unix, "form_menu") }
DNS domain enabled? { $list->bool("product_host_provision_plugin_data[dns]", $plugin_data.dns, "form_menu") }
Web virtual server enabled? { $list->bool("product_host_provision_plugin_data[web]", $plugin_data.web, "form_menu") }
Webalizer reporting enabled? { $list->bool("product_host_provision_plugin_data[webalizer]", $plugin_data.webalizer, "form_menu") }
Log file rotation enabled? { $list->bool("product_host_provision_plugin_data[logrotate]", $plugin_data.logrotate, "form_menu") }
MySQL database enabled? { $list->bool("product_host_provision_plugin_data[mysql]", $plugin_data.mysql, "form_menu") }
Status monitoring enabled? { $list->bool("product_host_provision_plugin_data[status]", $plugin_data.status, "form_menu") }
Webmin login enabled? { $list->bool("product_host_provision_plugin_data[webmin]", $plugin_data.webmin, "form_menu") }
- \ No newline at end of file diff --git a/themes/default/blocks/host_provision_plugin/plugin_prod_WHM.tpl b/themes/default/blocks/host_provision_plugin/plugin_prod_WHM.tpl deleted file mode 100644 index b5d4dc17..00000000 --- a/themes/default/blocks/host_provision_plugin/plugin_prod_WHM.tpl +++ /dev/null @@ -1,15 +0,0 @@ -{$list->unserial($product.host_provision_plugin_data, "plugin_data")} - - - - - - -
- {translate module=host_provision_plugin} - whm_plan - {/translate} - - -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/add.tpl b/themes/default/blocks/host_registrar_plugin/add.tpl deleted file mode 100644 index ac7b0801..00000000 --- a/themes/default/blocks/host_registrar_plugin/add.tpl +++ /dev/null @@ -1,46 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - - -{if $form_validation} - {$block->display('core:alert_fields')} -{/if} - - -
- - - - - -
- - - - - - - -
{osb f=tt}
- - - - - - - - - -
{osb f=tf field=status}{$list->bool('host_registrar_plugin_status',$VAR.host_registrar_plugin_status,'form_menu')}
{osb f=tf field=name}
- {assign var=thistype value='add'} - {assign var='afile' value=$VAR.host_registrar_plugin_file} - {assign var='ablock' value='host_registrar_plugin:plugin_cfg_'} - {assign var='blockfile' value="$ablock$afile"} - {$block->display($blockfile)} - - {include file='file:../core/add_tr_submit.tpl'} -
-
-
- -
diff --git a/themes/default/blocks/host_registrar_plugin/main.tpl b/themes/default/blocks/host_registrar_plugin/main.tpl deleted file mode 100644 index 0298982c..00000000 --- a/themes/default/blocks/host_registrar_plugin/main.tpl +++ /dev/null @@ -1,27 +0,0 @@ - - - - - -
- - - - - - - -
-
- {translate module=host_registrar_plugin} - menu - {/translate} -
-
- - - - -
{translate module=host_registrar_plugin}help_file{/translate}
-
-
diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_BULKREGISTER.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_BULKREGISTER.tpl deleted file mode 100644 index 9286ce39..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_BULKREGISTER.tpl +++ /dev/null @@ -1,99 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - br_user - {/translate} - - -
- {translate module=host_registrar_plugin} - br_pass - {/translate} - - -
- {translate module=host_registrar_plugin} - br_pgpemail - {/translate} - - { $list->menu("", "host_registrar_plugin_plugin_data[br_pgpemail]", "staff", "nickname", $plugin_data.br_pgpemail, "form_menu") } -
- {translate module=host_registrar_plugin} - br_mode - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[br_mode]", $plugin_data.br_mode, "form_menu")} -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_DIRECTI.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_DIRECTI.tpl deleted file mode 100644 index 32251312..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_DIRECTI.tpl +++ /dev/null @@ -1,95 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - directi_user - {/translate} - - -
- {translate module=host_registrar_plugin} - directi_pass - {/translate} - - -
Directi Parent ID - -
- {translate module=host_registrar_plugin} - directi_mode - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[mode]", $plugin_data.mode, "form_menu")} -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_ENOM.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_ENOM.tpl deleted file mode 100644 index 02f8c046..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_ENOM.tpl +++ /dev/null @@ -1,83 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
Live Mode - {$list->bool("host_registrar_plugin_plugin_data[enom_mode]", $plugin_data.enom_mode, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - enom_user - {/translate} - - -
- {translate module=host_registrar_plugin} - enom_pass - {/translate} - - -
diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_GODADDY.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_GODADDY.tpl deleted file mode 100644 index c7ba42ed..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_GODADDY.tpl +++ /dev/null @@ -1,89 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - gd_user - {/translate} - - -
- {translate module=host_registrar_plugin} - gd_pass - {/translate} - - -
- {translate module=host_registrar_plugin} - gd_mode - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[gd_mode]", $plugin_data.gd_mode, "form_menu")} -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_MANUAL.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_MANUAL.tpl deleted file mode 100644 index f01c6bea..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_MANUAL.tpl +++ /dev/null @@ -1,39 +0,0 @@ -{if $thistype != 'add'} - {$list->unserial($record.plugin_data,'plugin_data')} -{else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{osb f=tf field=primary_ns}
{osb f=tf field=secondary_ns}
{osb f=tf field=primary_nsip}
{osb f=tf field=secondary_nsip}
{osb f=tf field=manual_add_email}{$list->menu('','host_registrar_plugin_plugin_data[manual_add_email]','staff','nickname',$plugin_data.manual_add_email,'form_menu')}
{osb f=tf field=manual_renew_email}{$list->menu('','host_registrar_plugin_plugin_data[manual_renew_email]','staff','nickname',$plugin_data.manual_renew_email,'form_menu')}
{osb f=tf field=manual_transfer_email}{$list->menu('','host_registrar_plugin_plugin_data[manual_transfer_email]','staff','nickname',$plugin_data.manual_transfer_email,'form_menu')}
{osb f=tf field=manual_park_email}{$list->menu('','host_registrar_plugin_plugin_data[manual_park_email]','staff','nickname',$plugin_data.manual_park_email,'form_menu')}
diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_MELBOURNEIT.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_MELBOURNEIT.tpl deleted file mode 100644 index 5b42ab2b..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_MELBOURNEIT.tpl +++ /dev/null @@ -1,99 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - melbourne_user - {/translate} - - -
- {translate module=host_registrar_plugin} - melbourne_pass - {/translate} - - -
- {translate module=host_registrar_plugin} - melbourne_pgpemail - {/translate} - - -
- {translate module=host_registrar_plugin} - melbourne_mode - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[melbourne_mode]", $plugin_data.melbourne_mode, "form_menu")} -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_NAMES4EVER.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_NAMES4EVER.tpl deleted file mode 100644 index 744af044..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_NAMES4EVER.tpl +++ /dev/null @@ -1,87 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
Names4Ever Reseller ID - -
Names4Ever Password - -
Names4Ever Plan ID - -
- {translate module=host_registrar_plugin} - osrs_enviroment - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[mode]", $plugin_data.mode, "form_menu")} -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_NOMINET.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_NOMINET.tpl deleted file mode 100644 index 04f1a11a..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_NOMINET.tpl +++ /dev/null @@ -1,79 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - nominet_tag - {/translate} - - -
- {translate module=host_registrar_plugin} - pgp_emailto - {/translate} - - { $list->menu("", "host_registrar_plugin_plugin_data[pgp_emailto]", "staff", "nickname", $plugin_data.pgp_emailto, "form_menu") } -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_ONLINENIC.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_ONLINENIC.tpl deleted file mode 100644 index 27aa1d7e..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_ONLINENIC.tpl +++ /dev/null @@ -1,75 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
Live Mode - {$list->bool("host_registrar_plugin_plugin_data[mode]", $plugin_data.mode, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
Reseller ID - -
Password - -
diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_OPENSRS.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_OPENSRS.tpl deleted file mode 100644 index 58b93cc2..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_OPENSRS.tpl +++ /dev/null @@ -1,99 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - osrs_user - {/translate} - - -
- {translate module=host_registrar_plugin} - osrs_testkey - {/translate} - - -
- {translate module=host_registrar_plugin} - osrs_livekey - {/translate} - - -
- {translate module=host_registrar_plugin} - osrs_enviroment - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[osrs_enviroment]", $plugin_data.osrs_enviroment, "form_menu")} -
- \ No newline at end of file diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_PLANETDOMAIN.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_PLANETDOMAIN.tpl deleted file mode 100644 index 1869d2f1..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_PLANETDOMAIN.tpl +++ /dev/null @@ -1,77 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
PlanetDomain Username - -
PlanetDomain Password - -
PlanetDomain Reseller Id - -
diff --git a/themes/default/blocks/host_registrar_plugin/plugin_cfg_TOTALREGISTRATIONS.tpl b/themes/default/blocks/host_registrar_plugin/plugin_cfg_TOTALREGISTRATIONS.tpl deleted file mode 100644 index 46bdef29..00000000 --- a/themes/default/blocks/host_registrar_plugin/plugin_cfg_TOTALREGISTRATIONS.tpl +++ /dev/null @@ -1,79 +0,0 @@ -{ if $thistype != "add" } - {$list->unserial($host_registrar_plugin.plugin_data, "plugin_data")} -{ else} - {assign var=plugin_data value=$VAR.host_registrar_plugin_data} -{/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- {translate module=host_registrar_plugin} - debug - {/translate} - - {$list->bool("host_registrar_plugin_plugin_data[debug]", $plugin_data.debug, "form_menu")} -
- {translate module=host_registrar_plugin} - primary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_ns - {/translate} - - -
- {translate module=host_registrar_plugin} - primary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - secondary_nsip - {/translate} - - -
- {translate module=host_registrar_plugin} - tr_partnerno - {/translate} - - -
- {translate module=host_registrar_plugin} - tr_pass - {/translate} - - -
diff --git a/themes/default/blocks/host_registrar_plugin/search_show.tpl b/themes/default/blocks/host_registrar_plugin/search_show.tpl deleted file mode 100644 index 528fb9bb..00000000 --- a/themes/default/blocks/host_registrar_plugin/search_show.tpl +++ /dev/null @@ -1,48 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - -{$method->exe($meth.0,$meth.1)} -{if ($method->result == false)} - {$block->display('core:method_error')} -{else} - {include file='file:../core/search_show_pre.tpl'} - - - - - - -
- - - - - - - - - {foreach from=$host_registrar_plugin item=record} - - - - - - {/foreach} - -
 {translate module=host_registrar_plugin}field_name{/translate} 
- {if $record.status == '1'} - Enabled - {else} - Disabled - {/if} - {$record.name} - {if $record.status == '1'} - {t}View / Edit Plugin{/t} - {else} - {t}Install Plugin{/t} - {/if} -
-
- - {/if} - diff --git a/themes/default/blocks/host_registrar_plugin/view.tpl b/themes/default/blocks/host_registrar_plugin/view.tpl deleted file mode 100644 index b7df672c..00000000 --- a/themes/default/blocks/host_registrar_plugin/view.tpl +++ /dev/null @@ -1,52 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - -{$method->exe($meth.0,$meth.1)} -{if ($method->result == false)} - {$block->display('core:method_error')} -{else} - {include file='file:../core/view_pre.tpl'} - - - {if $form_validation} - {$block->display('core:alert_fields')} - {/if} - - -
- - - - - -
- - - - - - - - {include file='file:../core/view_tr_submit_delete.tpl'} -
{osb f=tt}
- - - - - - - - - -
{osb f=tf field=status}{$list->bool('host_registrar_plugin_status',$record.status,'form_menu')}
{osb f=tf field=name}
- {assign var=thistype value='edit'} - {assign var='afile' value=$record.file} - {assign var='ablock' value='host_registrar_plugin:plugin_cfg_'} - {assign var='blockfile' value="$ablock$afile"} - {$block->display($blockfile)} -
-
- - {include file='file:../core/view_post.tpl'} -
-{/if} diff --git a/themes/default/blocks/host_server/add.tpl b/themes/default/blocks/host_server/add.tpl deleted file mode 100644 index b7818674..00000000 --- a/themes/default/blocks/host_server/add.tpl +++ /dev/null @@ -1,95 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - - -{if $form_validation} - {$block->display('core:alert_fields')} -{/if} - - -
- - - - - -
- - - - - - - -
{osb f=tt}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {include file='file:../core/add_tr_submit.tpl'} -
{osb f=tf field=status} - {if $VAR.host_server_status != ''} - {$list->bool('host_server_status',$VAR.host_server_status,'form_menu')} - {else} - {$list->bool('host_server_status','1','form_menu')} - {/if} -
{osb f=tf field=debug}{$list->bool('host_server_debug',$VAR.host_server_debug,'form_menu')}
{osb f=tf field=name}
{osb f=tf field=notes}
{osb f=tf field=provision_plugin}{$list->menu_files('','host_server_provision_plugin',$VAR.host_server_provision_plugin,'provision_plugin','','.php','form_menu')}
{osb f=tf field=name_based} - {if $VAR.host_server_name_based != ''} - {$list->bool('host_server_name_based',$VAR.host_server_name_based,'form_menu')} - {else} - {$list->bool('host_server_name_based','1','form_menu')} - {/if} -
{osb f=tf field=name_based_ip}
{osb f=tf field=ip_based}{$list->bool('host_server_ip_based',$VAR.host_server_ip_based,'form_menu')}
{osb f=tf field=ip_based_ip}
{osb f=tf field=primary_ns}
{osb f=tf field=secondary_ns}
{osb f=tf field=primary_nsip}
{osb f=tf field=secondary_nsip}
-
-
- -
diff --git a/themes/default/blocks/host_server/search_show.tpl b/themes/default/blocks/host_server/search_show.tpl deleted file mode 100644 index 2e593f28..00000000 --- a/themes/default/blocks/host_server/search_show.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - -{$method->exe($meth.0,$meth.1)} -{if ($method->result == false)} - {$block->display('core:method_error')} -{else} - {include file='file:../core/search_show_pre.tpl'} - {$method->exe_noauth($meth.0,'tpl_search_show',$search_show)} - {include file='file:../core/search_show_post-1.tpl'} - {include file='file:../core/search_show_post-2.tpl'} -{/if} diff --git a/themes/default/blocks/host_server/view.tpl b/themes/default/blocks/host_server/view.tpl deleted file mode 100644 index 63293444..00000000 --- a/themes/default/blocks/host_server/view.tpl +++ /dev/null @@ -1,109 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - -{$method->exe($meth.0,$meth.1)} -{if ($method->result == false)} - {$block->display('core:method_error')} -{else} - {include file='file:../core/view_pre.tpl'} - - - {if $form_validation} - {$block->display('core:alert_fields')} - {/if} - - -
- - - - - -
- - - - - - - - {include file='file:../core/view_tr_submit_delete.tpl'} -
{osb f=tt}
- - - - - - - - - - - - - - - - - - - - - - {if $next_server == true} - - - - - {/if} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{osb f=tf field=status}{$list->bool('host_server_status',$record.status,'" onchange="submit()')}
{osb f=tf field=debug}{$list->bool('host_server_debug',$record.debug,'" onchange="submit()')}
{osb f=tf field=name}
{osb f=tf field=notes}
{osb f=tf field=max_accounts}
{osb f=tf field=next_host_server_id} - -
{osb f=tf field=name_based}{$list->bool('host_server_name_based',$record.name_based,'form_menu')}
{osb f=tf field=name_based_ip}
{osb f=tf field=ip_based}{$list->bool('host_server_ip_based',$record.ip_based,'form_menu')}
{osb f=tf field=ip_based_ip}
{osb f=tf field=provision_plugin}{$list->menu_files('','host_server_provision_plugin',$record.provision_plugin,'provision_plugin','','.php','form_menu')}
{osb f=tf field=primary_ns}
{osb f=tf field=secondary_ns}
{osb f=tf field=primary_nsip}
{osb f=tf field=secondary_nsip}
- {assign var='ablock' value='host_provision_plugin:plugin_cfg_'} - {assign var='afile' value=$record.provision_plugin} - {assign var='blockfile' value="$ablock$afile"} - {$block->display($blockfile)} -
-
- - {include file='file:../core/view_post.tpl'} -
-{/if} diff --git a/themes/default/blocks/host_tld/add.tpl b/themes/default/blocks/host_tld/add.tpl deleted file mode 100644 index f81978f5..00000000 --- a/themes/default/blocks/host_tld/add.tpl +++ /dev/null @@ -1,65 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - - -{if $form_validation} - {$block->display('core:alert_fields')} -{/if} - - -
- - - - - -
- - - - - - - -
{osb f=tt}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {include file='file:../core/add_tr_submit.tpl'} -
{osb f=tf field=status} - {if $VAR.host_tld_status != ''} - {$list->bool('host_tld_status',$VAR.host_tld_status)} - {else} - {$list->bool('host_tld_status','1')} - {/if} -
{osb f=tf field=name}
{osb f=tf field=whois_plugin}{$list->menu_files('','host_tld_whois_plugin',$VAR.host_tld_whois_plugin,'whois_plugin','','.php','form_menu')}
{osb f=tf field=registrar_plugin_id}{$list->menu('','host_tld_registrar_plugin_id','host_registrar_plugin','name',$VAR.host_tld_registrar_plugin_id,'form_menu')}
{osb f=tf field=taxable}{$list->bool('host_tld_taxable',$VAR.host_tld_taxable)}
{osb f=tf field=auto_search}{$list->bool('host_tld_auto_search',$VAR.host_tld_auto_search)}
{osb f=tf field=default_term_new}
-
-
- -
diff --git a/themes/default/blocks/host_tld/admin_search.tpl b/themes/default/blocks/host_tld/admin_search.tpl deleted file mode 100644 index 8a688922..00000000 --- a/themes/default/blocks/host_tld/admin_search.tpl +++ /dev/null @@ -1,105 +0,0 @@ -{literal} - - -{/literal} - - - - - - - -
- - - - -
- {translate module=host_tld} - domain_register - {/translate} -
-
-
- - - - -
- - - - - - - - -
- - - - {translate}search{/translate}
- - - - - - - -
- - - - -
- {translate module=host_tld} - register_instructions_s - {/translate} -
-
-
-
-
-{literal}{/literal} -
- diff --git a/themes/default/blocks/host_tld/admin_search_transfer.tpl b/themes/default/blocks/host_tld/admin_search_transfer.tpl deleted file mode 100644 index 3e58704e..00000000 --- a/themes/default/blocks/host_tld/admin_search_transfer.tpl +++ /dev/null @@ -1,92 +0,0 @@ -{literal} - - -{/literal} - - - - - - - -
- - - - -
- {translate module=host_tld} - domain_transfer - {/translate} -
-
-
- - - - -
- - - - - - - - -
- - - - {translate}search{/translate}
- - - - - - - -
- - - -
- {translate module=host_tld} - register_instructions_s - {/translate} -
-
-
-
-
-{literal}{/literal} \ No newline at end of file diff --git a/themes/default/blocks/host_tld/ajax.js b/themes/default/blocks/host_tld/ajax.js deleted file mode 100644 index 97fefdb8..00000000 --- a/themes/default/blocks/host_tld/ajax.js +++ /dev/null @@ -1,69 +0,0 @@ -var http=getHTTPObject(); -var validatedDomain=false; -var domain=null; -var tld=null; - -function cartAdd(type) { - if(validatedDomain) { - getUserDomainInfo(); - document.location = '?_page=cart:cart&do[]=cart:add&host_type='+type+'&domain_name='+domain+'&domain_tld='+tld; - } else { - alert('Invalid domain!'); - } -} - -function showSuggest() { - getUserDomainInfo(); - if(domain==null || domain=='') - document.location = '?_page=host_tld:suggest&domain='+domain+'&tld='+tld; - else - document.location = '?_page=host_tld:suggest'; -} - -function getUserDomainInfo() { - domain = document.getElementById("domainName").value; - tld = document.getElementById("domainTLD").value; -} - -function domainSearchResponse(domain,tld) { - http.open("GET", 'ajax.php?do[]=host_tld:whois&type='+type+'&tld='+tld+'&domain='+domain, true); - http.onreadystatechange = function() { - if (http.readyState == 4) { - try { eval(http.responseText) } catch(e) {} - } - } - http.send(null); -} - -function domainSearch() { - getUserDomainInfo(); - validatedDomain=false; - try{ window.parent.domainUpdate(0,0,0) } catch(e) {} - if(domain!=null || domain!='') { - document.getElementById("search").style.display='block'; - try{ document.getElementById("instructions").style.display='none' }catch(e){} - document.getElementById("available").style.display='none'; - document.getElementById("unavailable").style.display='none'; - domainSearchResponse(domain,tld,type); - } else { - unavailable(); - } -} - -function available(i) { - validatedDomain=true; - document.getElementById("available").style.display='block'; - document.getElementById("search").style.display='none'; - document.getElementById("unavailable").style.display='none'; - if(i==1 || i==true ) try{ document.getElementById("park_available").style.display='block' } catch(e) {} - try{ window.parent.domainUpdate(domain,tld,type) } catch(e) {} -} - -function unavailable() { - validatedDomain=false; - document.getElementById("unavailable").style.display='block'; - document.getElementById("search").style.display='none'; - document.getElementById("available").style.display='none'; - try{ document.getElementById("park_available").style.display='none'; } catch(e) {} - try{ window.parent.domainUpdate(0,0,0) } catch(e) {} -} \ No newline at end of file diff --git a/themes/default/blocks/host_tld/host_tld.js b/themes/default/blocks/host_tld/host_tld.js deleted file mode 100644 index d2c310d0..00000000 --- a/themes/default/blocks/host_tld/host_tld.js +++ /dev/null @@ -1,6 +0,0 @@ -// Supporting Javascript for HOST_TLD -function domainUpdate(domain,tld,type) { - document.getElementById('domain_name').value = domain; - document.getElementById('domain_tld').value = tld; - document.getElementById('domain_option').value = type; -} diff --git a/themes/default/blocks/host_tld/iframe_ns_transfer.tpl b/themes/default/blocks/host_tld/iframe_ns_transfer.tpl deleted file mode 100644 index f15decf9..00000000 --- a/themes/default/blocks/host_tld/iframe_ns_transfer.tpl +++ /dev/null @@ -1,26 +0,0 @@ -{ $block->display("core:top_clean") } -
- - - - - - - - - -

- {translate module=host_tld} - ns_transfer_instructions - {/translate} -
 
-

- - . - -


-
 
-
-{literal}{/literal} - - diff --git a/themes/default/blocks/host_tld/iframe_register.tpl b/themes/default/blocks/host_tld/iframe_register.tpl deleted file mode 100644 index 2ddc5877..00000000 --- a/themes/default/blocks/host_tld/iframe_register.tpl +++ /dev/null @@ -1,71 +0,0 @@ -{ $block->display("core:top_clean") } -{literal} - - -{/literal} -
- - - - - - - -

- {translate module=host_tld} - register_instructions - {/translate} -
- - - - - - - -
- - - - {translate}search{/translate}
- - - - - - - -
- - - -
 
-
-
-
-
-{literal}{/literal} - - \ No newline at end of file diff --git a/themes/default/blocks/host_tld/iframe_transfer.tpl b/themes/default/blocks/host_tld/iframe_transfer.tpl deleted file mode 100644 index a071fc95..00000000 --- a/themes/default/blocks/host_tld/iframe_transfer.tpl +++ /dev/null @@ -1,71 +0,0 @@ -{ $block->display("core:top_clean") } -{literal} - - -{/literal} -
- - - - - - - -

- {translate module=host_tld} - register_instructions - {/translate} -
- - - - - - - -
- - - - {translate}search{/translate}
- - - - - - - -
- - - -
 
-
-
-
-
-{literal}{/literal} - - \ No newline at end of file diff --git a/themes/default/blocks/host_tld/search.tpl b/themes/default/blocks/host_tld/search.tpl deleted file mode 100644 index 9f6a64d6..00000000 --- a/themes/default/blocks/host_tld/search.tpl +++ /dev/null @@ -1,123 +0,0 @@ -{literal} - - -{/literal} - - - - - - - -
- - - - -
- {translate module=host_tld} - domain_register - {/translate} -
-
-
- - - - -
- - - - - - - - -
- - - - {translate}search{/translate}
- - - - - - - -
- - - - -
- {translate module=host_tld} - register_instructions_s - {/translate} -
-
-
-
-
- -{if $VAR._page!='host_tld:iframe_register'} -
- - -{/if} \ No newline at end of file diff --git a/themes/default/blocks/host_tld/search_mass.tpl b/themes/default/blocks/host_tld/search_mass.tpl deleted file mode 100644 index 683e29e3..00000000 --- a/themes/default/blocks/host_tld/search_mass.tpl +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - -
- - - - - -
- {translate module=host_tld} - search_mass_header - {/translate} -
-
-
- - - - -
- - - - - - - - - -
- - -

- {translate module=host_tld} - search_mass_instructions - {/translate} -

-
- - - - - {if $checkout} - - - {translate module=host_tld} - suggest_purchase - {/translate} - - {/if} -
-
-
-
-
- - {foreach from=$domainarr item=rs} - - - - {/foreach} - - - -
- diff --git a/themes/default/blocks/host_tld/search_show.tpl b/themes/default/blocks/host_tld/search_show.tpl deleted file mode 100644 index 2e593f28..00000000 --- a/themes/default/blocks/host_tld/search_show.tpl +++ /dev/null @@ -1,12 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - -{$method->exe($meth.0,$meth.1)} -{if ($method->result == false)} - {$block->display('core:method_error')} -{else} - {include file='file:../core/search_show_pre.tpl'} - {$method->exe_noauth($meth.0,'tpl_search_show',$search_show)} - {include file='file:../core/search_show_post-1.tpl'} - {include file='file:../core/search_show_post-2.tpl'} -{/if} diff --git a/themes/default/blocks/host_tld/search_transfer.tpl b/themes/default/blocks/host_tld/search_transfer.tpl deleted file mode 100644 index 56de899b..00000000 --- a/themes/default/blocks/host_tld/search_transfer.tpl +++ /dev/null @@ -1,91 +0,0 @@ -{literal} - - -{/literal} - - - - - - - -
- - - - -
- {translate module=host_tld} - domain_transfer - {/translate} -
-
-
- - - - -
- - - - - - - - -
- - - - {translate}search{/translate}
- - - - - - - -
- - - -
- {translate module=host_tld} - register_instructions_s - {/translate} -
-
-
-
-
- \ No newline at end of file diff --git a/themes/default/blocks/host_tld/suggest.tpl b/themes/default/blocks/host_tld/suggest.tpl deleted file mode 100644 index a4cb8242..00000000 --- a/themes/default/blocks/host_tld/suggest.tpl +++ /dev/null @@ -1,291 +0,0 @@ -{$method->exe_noauth("host_tld","suggest")} - - - - - - - -
- - - - - -
- {translate module=host_tld} - suggest_heading - {/translate} -
-
-
- - {/literal} - - - - - - - - - - - -
- - - - - - - -
- - - - - {translate} - search - {/translate} -
- - - - - - - -
- -
- {translate module=host_tld} - register_instructions_s - {/translate} -
-
-
- - - - {foreach from=$tlds item=tld} - - {/foreach} -
-
- - - -
- -
-

{translate module=host_tld}domain_transfer{/translate}

- diff --git a/themes/default/blocks/host_tld/view.tpl b/themes/default/blocks/host_tld/view.tpl deleted file mode 100644 index bfa48e60..00000000 --- a/themes/default/blocks/host_tld/view.tpl +++ /dev/null @@ -1,144 +0,0 @@ -{assign var=meth value=':'|explode:$VAR._page} - - -{$method->exe($meth.0,$meth.1)} -{if ($method->result == false)} - {$block->display('core:method_error')} -{else} - {include file='file:../core/view_pre.tpl'} - - - {if $form_validation} - {$block->display('core:alert_fields')} - {/if} - - -
- - - - - -
- - - - - - - - - - - {if ($list->smarty_array('group','name'," AND pricing='1' ",'group_array'))}{/if} - - - - {section name=year start=1 loop=11 step=1} - {assign var="year" value=$smarty.section.year.index} - - - - - - - {/section} - {include file='file:../core/view_tr_submit_delete.tpl'} -
{osb f=tt}
- - - - - - - - - - - - - -
{osb f=tf field=status}{$list->bool('host_tld_status',$record.status,'onChange="submit()')}
{osb f=tf field=name}
{osb f=tf field=whois_plugin}{$list->menu_files('','host_tld_whois_plugin',$record.whois_plugin,'whois_plugin','','.php','form_menu')}
- {assign var="ablock" value="host_whois_plugin:plugin_cfg_"} - {assign var="afile" value=$record.whois_plugin} - {assign var="blockfile" value="$ablock$afile"} - {$block->display($blockfile)} - - - - - - - - - - - - - - - - - - -
{osb f=tf field=registrar_plugin_id}{$list->menu('','host_tld_registrar_plugin_id','host_registrar_plugin','name',$record.registrar_plugin_id,'form_menu')}
{osb f=tf field=taxable}{$list->bool('host_tld_taxable',$record.taxable,'form_menu')}
{osb f=tf field=auto_search}{$list->bool('host_tld_auto_search',$record.auto_search,'form_menu')}
{osb f=tf field=default_term_new} - - - - - -
- - {$list->unserial($record.price_group,'price')} -
-
-
- - - - -
{t}Offer domain parking for this TLD{/t}  {$list->bool('host_tld_price_group[0][show]',$price[0].show,'form_menu')}
-
- {foreach from=$group_array item=arr} - {assign var="idx" value=$arr.id} - - - - - - - -
{$arr.name}{$list->currency_iso('')}  
- {/foreach} -
- - - - -
{t}Offer purchase options for this TLD for year{/t}: {$year}  {$list->bool("host_tld_price_group[$year][show]",$price[$year].show,'form_menu')}
-
- - - - - - - -
 {t}Registrations{/t}{t}Renewals{/t}{t}Transfers{/t}
- {foreach from=$group_array item=arr} - {assign var="idx" value=$arr.id} - - - - - - - -
{$arr.name}{$list->currency_iso('')}{$list->currency_iso('')}{$list->currency_iso('')}
- {/foreach} -
-
- - {include file='file:../core/view_post.tpl'} -
-{/if} diff --git a/themes/default/blocks/host_whois_plugin/plugin_cfg_DEFAULT.tpl b/themes/default/blocks/host_whois_plugin/plugin_cfg_DEFAULT.tpl deleted file mode 100644 index 480fe42e..00000000 --- a/themes/default/blocks/host_whois_plugin/plugin_cfg_DEFAULT.tpl +++ /dev/null @@ -1,25 +0,0 @@ -{$list->unserial($host_tld.whois_plugin_data, "plugin_data")} - - - - - - - - - - -
- {translate module=host_whois_plugin} - whois_server - {/translate} - - -
- {translate module=host_whois_plugin} - avail_response - {/translate} - - -
- diff --git a/themes/default/blocks/host_whois_plugin/plugin_cfg_SUBDOMAIN.tpl b/themes/default/blocks/host_whois_plugin/plugin_cfg_SUBDOMAIN.tpl deleted file mode 100644 index e9fba631..00000000 --- a/themes/default/blocks/host_whois_plugin/plugin_cfg_SUBDOMAIN.tpl +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/themes/default/blocks/host_whois_plugin/plugin_cfg_WHOIS_CO_ZA.tpl b/themes/default/blocks/host_whois_plugin/plugin_cfg_WHOIS_CO_ZA.tpl deleted file mode 100644 index e9fba631..00000000 --- a/themes/default/blocks/host_whois_plugin/plugin_cfg_WHOIS_CO_ZA.tpl +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file