Esempio n. 1
0
     }
 } else {
     $form_title = _('User configuration');
     // fixme anton - now disabled since plugin/feature/credit exists
     // $option_credit = "<tr><td>" . _('Credit') . "</td><td>$credit</td></tr>";
 }
 // get access control list
 $c_option_acl = array_flip(acl_getall());
 $option_acl = _input('text', '', acl_getname($acl_id), array('readonly'));
 if (auth_isadmin()) {
     $option_acl = _select('up_acl_id', $c_option_acl, $acl_id);
 }
 if ($user_edited['status'] == 4) {
     $parent_id = user_getparentbyuid($user_edited['uid']);
     if ($parent_id == $user_config['uid']) {
         $c_option_acl = array_flip(acl_getallbyuid($user_config['uid']));
         $option_acl = _select('up_acl_id', $c_option_acl, $acl_id);
     }
 }
 // additional user's config available on registry
 $data = registry_search($c_uid, 'core', 'user_config');
 // credit unicodes messages as single message
 $option_enable_credit_unicode = _options(array(_('yes') => 1, _('no') => 0), $data['core']['user_config']['enable_credit_unicode']);
 if (auth_isadmin()) {
     $option_enable_credit_unicode = "<select name='edit_enable_credit_unicode'>" . $option_enable_credit_unicode . "</select>";
 } else {
     $option_enable_credit_unicode = $user_config['opt']['enable_credit_unicode'] ? _('yes') : _('no');
 }
 // error string
 if ($err = TRUE) {
     $error_content = _dialog();
Esempio n. 2
0
         $c_language_title = $plugin_config[$language]['title'];
         if ($c_language_title) {
             $lang_list[$c_language_title] = $language;
         }
     }
     if (is_array($lang_list)) {
         foreach ($lang_list as $key => $val) {
             if ($val == core_lang_get()) {
                 $selected = "selected";
             }
             $option_language_module .= "<option value=\"" . $val . "\" {$selected}>" . $key . "</option>";
             $selected = "";
         }
     }
     // get access control list
     $option_acl = _select('add_acl_id', array_flip(acl_getallbyuid($user_config['uid'])));
     $content .= "\n\t\t<h2>" . _('Manage subuser') . "</h2>\n\t\t<h3>" . _('Add subuser') . "</h3>\n\t\t<form action='index.php?app=main&inc=core_user&route=subuser_mgmnt&op=subuser_add_yes' method=POST>\n\t\t" . _CSRF_FORM_ . "\n\t\t<table class=playsms-table>\n\t\t<tbody>\n\t\t<tr>\n\t\t\t<td class=label-sizer>" . _('Access Control List') . "</td><td>" . $option_acl . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _mandatory(_('Username')) . "</td><td><input type='text' maxlength='30' name='add_username' value=\"{$add_username}\"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _mandatory(_('Password')) . "</td><td><input type='password' maxlength='30' name='add_password' value=\"{$add_password}\"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _mandatory(_('Full name')) . "</td><td><input type='text' maxlength='100' name='add_name' value=\"{$add_name}\"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _mandatory(_('Email')) . "</td><td><input type='text' maxlength='250' name='add_email' value=\"{$add_email}\"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _('Mobile') . "</td><td><input type='text' size='16' maxlength='16' name='add_mobile' value=\"{$add_mobile}\"> " . _hint(_('Max. 16 numeric or 11 alphanumeric characters')) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _('SMS footer') . "</td><td><input type='text' maxlength='30' name='add_footer' value=\"{$add_footer}\"> " . _hint(_('Max. 30 alphanumeric characters')) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _('Timezone') . "</td><td><input type='text' size='5' maxlength='5' name='add_datetime_timezone' value=\"{$add_datetime_timezone}\"> " . _hint(_('Eg: +0700 for Jakarta/Bangkok timezone')) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>" . _('Active language') . "</td><td><select name='add_language_module'>{$option_language_module}</select></td>\n\t\t</tr>\n\t\t</tbody>\n\t\t</table>\n\t\t<p><input type='submit' class='button' value='" . _('Save') . "'></p>\n\t\t</form>\n\t\t" . _back('index.php?app=main&inc=core_user&route=subuser_mgmnt&op=subuser_list');
     _p($content);
     break;
 case "subuser_add_yes":
     $add['acl_id'] = (int) $_POST['add_acl_id'];
     $add['email'] = $_POST['add_email'];
     $add['username'] = $_POST['add_username'];
     $add['password'] = $_POST['add_password'];
     $add['mobile'] = $_POST['add_mobile'];
     $add['name'] = $_POST['add_name'];
     $add['footer'] = $_POST['add_footer'];
     $add['datetime_timezone'] = $_POST['add_datetime_timezone'];
     $add['language_module'] = $_POST['add_language_module'];
     // subuser settings
     $add['parent_uid'] = $user_config['uid'];