|
|
@@ -417,6 +417,89 @@ function zimbraSingleConfigOptions($params) {
|
|
|
return $configOptions;
|
|
|
}
|
|
|
|
|
|
+function zimbraSingleCreateCustomFields($packageconfigoption)
|
|
|
+{
|
|
|
+ $whmcs = App::self();
|
|
|
+ $productID = $whmcs->get_req_var('id');
|
|
|
+ Capsule::table('tblcustomfields')
|
|
|
+ ->where('relid', '=', $productID)
|
|
|
+ ->delete();
|
|
|
+ Capsule::table('tblcustomfields')
|
|
|
+ ->insert(
|
|
|
+ array(
|
|
|
+ 'type' => 'product',
|
|
|
+ 'relid' => $productID,
|
|
|
+ 'fieldname' => 'givenname | Vorname',
|
|
|
+ 'fieldtype' => 'text',
|
|
|
+ 'required' => 'on',
|
|
|
+ 'showorder' => 'on',
|
|
|
+ 'sortorder' => '0'
|
|
|
+ )
|
|
|
+ );
|
|
|
+ Capsule::table('tblcustomfields')
|
|
|
+ ->insert(
|
|
|
+ array(
|
|
|
+ 'type' => 'product',
|
|
|
+ 'relid' => $productID,
|
|
|
+ 'fieldname' => 'sn | Nachname',
|
|
|
+ 'fieldtype' => 'text',
|
|
|
+ 'required' => 'on',
|
|
|
+ 'showorder' => 'on',
|
|
|
+ 'sortorder' => '1'
|
|
|
+ )
|
|
|
+ );
|
|
|
+ Capsule::table('tblcustomfields')
|
|
|
+ ->insert(
|
|
|
+ array(
|
|
|
+ 'type' => 'product',
|
|
|
+ 'relid' => $productID,
|
|
|
+ 'fieldname' => 'username | E-Mail Name',
|
|
|
+ 'fieldtype' => 'text',
|
|
|
+ 'required' => 'on',
|
|
|
+ 'showorder' => 'on',
|
|
|
+ 'sortorder' => '2'
|
|
|
+ )
|
|
|
+ );
|
|
|
+ Capsule::table('tblcustomfields')
|
|
|
+ ->insert(
|
|
|
+ array(
|
|
|
+ 'type' => 'product',
|
|
|
+ 'relid' => $productID,
|
|
|
+ 'fieldname' => 'maildomain | Mail Domaine',
|
|
|
+ 'fieldtype' => 'dropdown',
|
|
|
+ 'fieldoptions' => implode(',', $packageconfigoption[2]),
|
|
|
+ 'required' => 'on',
|
|
|
+ 'showorder' => 'on',
|
|
|
+ 'sortorder' => '3'
|
|
|
+ )
|
|
|
+ );
|
|
|
+ Capsule::table('tblcustomfields')
|
|
|
+ ->insert(
|
|
|
+ array(
|
|
|
+ 'type' => 'product',
|
|
|
+ 'relid' => $productID,
|
|
|
+ 'fieldname' => 'password | Password',
|
|
|
+ 'fieldtype' => 'password',
|
|
|
+ 'required' => 'on',
|
|
|
+ 'showorder' => 'on',
|
|
|
+ 'sortorder' => '4'
|
|
|
+ )
|
|
|
+ );
|
|
|
+ Capsule::table('tblcustomfields')
|
|
|
+ ->insert(
|
|
|
+ array(
|
|
|
+ 'type' => 'product',
|
|
|
+ 'relid' => $productID,
|
|
|
+ 'fieldname' => 'cos | Class of Service',
|
|
|
+ 'fieldtype' => 'dropdown',
|
|
|
+ 'fieldoptions' => $packageconfigoption[1],
|
|
|
+ 'adminonly' => 'on',
|
|
|
+ 'required' => 'on',
|
|
|
+ 'sortorder' => '5'
|
|
|
+ )
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
function recursiveFindAll($haystack, $needle)
|
|
|
{
|
|
|
$values = array();
|