Ejemplo n.º 1
0
 $form->title(txt('user_login_data'), txt('all_fields_req'), ICONS . 'accounts/toolbar_edit.png');
 $form->label('Login', $usr->get_user_login(), '');
 //$form->condition('not_null', true , 'Password is empty');
 //$form->condition('min', 6, 'Password must have min 6 chars');
 //$form->condition('max', 30, 'Password can have max 30 chars');
 $form->condition('match', 'user_new_pass2', txt('pass_not_match'));
 $form->input('password', 'user_new_pass', '<span style=color:#7e1414>' . txt('new_pass') . '</span>', txt('dsc_users_account_pass'), '');
 //$form->condition('not_null', true , 'Password confirmation is empty');
 $form->input('password', 'user_new_pass2', '<span style=color:#7e1414>' . txt('new_pass_c') . '</span>', txt('dsc_users_account_pass_c'), '');
 $form->input('text', 'user_new_email', 'Email', txt('dsc_users_account_email'), $usr->get_user_email());
 echo $form->render();
 echo $layout->end('column');
 echo $layout->column('50%');
 $form->title(txt('usr_account_params'), '', ICONS . 'small_options.png');
 $items = array('1' => txt('yes'), '0' => txt('no'));
 $form->radio('user_new_active', txt('active'), txt('dsc_users_account_active'), $items, $usr->get_is_active());
 $items = array('1' => txt('user_user'), '2' => txt('user_admin'));
 $form->radio('user_new_type', 'Type', txt('dsc_users_account_type'), $items, $usr->get_user_type());
 $languages = new phpos_languages();
 $langs_array = $languages->get_lang_list();
 $lang_items = array();
 foreach ($langs_array as $lang_id) {
     $lang_data = $languages->get_lang_info($lang_id);
     $lang_name = $lang_data['eng_name'] . ' (' . $lang_data['local_name'] . ')';
     $lang_items[$lang_id] = $lang_name;
 }
 $new_cfg = new phpos_config('no_get');
 $new_cfg->set_id_user($user_id);
 $lang = $new_cfg->get_user('lang');
 $form->select('user_new_lang', txt('language'), txt('dsc_users_account_lang'), $lang_items, $lang);
 $form->status();
Ejemplo n.º 2
0
 $ftp->get_ftp();
 echo $layout->title(txt('edit_ftp'), 'icon.png');
 echo $layout->txtdesc(txt('dsc_ftp_title'));
 echo helper_result('update_ftp');
 $form = new phpos_forms();
 echo $form->form_start('update_ftp', helper_ajax('section.edit_account.php'), array('app_params' => ''));
 $form->reload_after_submit(array('nowy'));
 $form->input('hidden', 'action', '', '', 'update_ftp');
 echo $layout->column('50%');
 $form->title($ftp->get_title(), null, ICONS . 'edit.png');
 $form->condition('not_null', true, txt('form_empty_field') . txt('title'));
 $form->input('text', 'ftp_new_title', txt('title'), txt('dsc_ftp_name'), $ftp->get_title());
 $form->input('text', 'ftp_new_desc', txt('desc'), txt('dsc_ftp_desc'), $ftp->get_desc());
 if (is_root() || is_admin()) {
     $items = array('0' => txt('no'), '1' => txt('yes'));
     $form->radio('ftp_new_public', txt('ftp_form_public'), txt('ftp_form_public_desc'), $items, $ftp->get_is_public());
 } else {
     $form->input('hidden', 'ftp_new_public', '', '', '0');
 }
 echo $form->render();
 echo $layout->end('column');
 echo $layout->column('50%');
 $form->title(txt('ftp_authentication'), '', ICONS . 'system_info/key_icon.png');
 $form->condition('not_null', true, txt('form_empty_field') . 'Host');
 $form->input('text', 'ftp_new_host', 'Host/IP', txt('dsc_ftp_host'), $ftp->get_host());
 $form->condition('not_null', true, txt('form_empty_field') . 'Login');
 $form->input('text', 'ftp_new_login', 'Login', txt('dsc_ftp_login'), $ftp->get_login());
 $form->condition('not_null', true, txt('form_empty_field') . txt('password'));
 $form->input('password', 'ftp_new_pass', txt('password'), txt('dsc_ftp_pass'), $ftp->get_password());
 $form->input('text', 'ftp_new_port', 'Port', txt('dsc_ftp_port'), $ftp->get_port());
 $form->status();
Ejemplo n.º 3
0
if (empty($new_id)) {
    echo helper_result('new_ftp');
    echo $layout->title(txt('add_new_ftp'), 'icon.png');
    echo $layout->txtdesc(txt('dsc_ftp_title'));
    $form = new phpos_forms();
    echo $form->form_start('new_ftp', helper_ajax('section.new_account.php'), array('app_params' => ''));
    $form->reload_after_submit(array('nowy'));
    $form->input('hidden', 'action', '', '', 'new_ftp');
    echo $layout->column('50%');
    $form->title(txt('dsc_ftp_desc_new'), null, ICONS . 'create_new.png');
    $form->condition('not_null', true, txt('form_empty_field') . txt('title'));
    $form->input('text', 'ftp_new_title', txt('title'), txt('dsc_ftp_name'), '');
    $form->input('text', 'ftp_new_desc', txt('desc'), txt('dsc_ftp_desc'), '');
    if (is_root() || is_admin()) {
        $items = array('0' => txt('no'), '1' => txt('yes'));
        $form->radio('ftp_new_public', txt('ftp_form_public'), txt('ftp_form_public_desc'), $items, '0');
    } else {
        $form->input('hidden', 'ftp_new_public', '', '', '0');
    }
    echo $form->render();
    echo $layout->end('column');
    echo $layout->column('50%');
    $form->title(txt('ftp_authentication'), '', ICONS . 'system_info/key_icon.png');
    $form->condition('not_null', true, txt('form_empty_field') . 'Host');
    $form->input('text', 'ftp_new_host', 'Host/IP', txt('dsc_ftp_host'), '');
    $form->condition('not_null', true, txt('form_empty_field') . 'Login');
    $form->input('text', 'ftp_new_login', 'Login', txt('dsc_ftp_login'), '');
    $form->condition('not_null', true, txt('form_empty_field') . txt('password'));
    $form->input('password', 'ftp_new_pass', txt('password'), txt('dsc_ftp_pass'), '');
    $form->input('text', 'ftp_new_port', 'Port', txt('dsc_ftp_port'), '21');
    $form->status();
Ejemplo n.º 4
0
 echo helper_result('new_cloud');
 echo $layout->title(txt('add_new_cloud'), null);
 echo $layout->txtdesc(txt('dsc_cloud_title'));
 $form = new phpos_forms();
 echo $form->form_start('new_cloud', helper_ajax('section.new_account.php'), array('app_params' => ''));
 $form->reload_after_submit(array('nowy'));
 $form->input('hidden', 'action', '', '', 'new_cloud');
 $form->input('hidden', 'cloud_new_type', '', '', $cloud_type);
 echo $layout->column('50%');
 $form->title(txt('dsc_cloud_desc_new') . ': ' . $cloud->get_cloud_name(), null, $cloud->get_cloud_icon());
 $form->condition('not_null', true, txt('form_empty_field') . txt('title'));
 $form->input('text', 'cloud_new_title', txt('title'), txt('dsc_cloud_name'), '');
 $form->input('text', 'cloud_new_desc', txt('desc'), txt('dsc_cloud_desc'), '');
 if (is_root() || is_admin()) {
     $items = array('1' => txt('yes'), '0' => txt('no'));
     $form->radio('cloud_new_public', txt('public'), txt('dsc_cloud_public'), $items, '0');
 } else {
     $form->input('hidden', 'cloud_new_public', '', '', 0);
 }
 include MY_APP_DIR . 'views/cloud_help_google.php';
 echo $layout->end('column');
 echo $layout->column('50%');
 switch ($cloud_type) {
     case 'google_drive':
         echo $layout->txtdesc(txt('dsc_cloud_google_info'));
         $form->title(txt('cloud_authentication'), '', ICONS . 'auth_key.png');
         $form->condition('not_null', true, txt('form_empty_field') . 'ClientID');
         $form->input('text', 'cloud_new_login', 'Client ID', txt('dsc_cloud_login'), '');
         $form->condition('not_null', true, txt('form_empty_field') . 'Secret');
         $form->input('password', 'cloud_new_pass', 'Client Secret', txt('dsc_cloud_pass'), '');
         $form->input('text', 'cloud_new_url', 'Redirect URL', txt('dsc_cloud_port'), $_SESSION['PHPOS_NETURL']);
Ejemplo n.º 5
0
 $form->condition('min', 4, txt('login_min'));
 $form->condition('max', 30, txt('login_max'));
 $form->input('text', 'user_new_login', 'Login', txt('dsc_users_account_login'), '');
 $form->condition('not_null', true, txt('pass_empty'));
 $form->condition('min', 6, txt('pass_min'));
 $form->condition('max', 30, txt('pass_max'));
 $form->condition('match', 'user_new_pass2', txt('pass_empty'));
 $form->input('password', 'user_new_pass', txt('pass'), txt('dsc_users_account_pass'), '');
 $form->condition('not_null', true, txt('pass_empty'));
 $form->input('password', 'user_new_pass2', txt('pass_c'), txt('dsc_users_account_pass_c'), '');
 echo $form->render();
 echo $layout->end('column');
 echo $layout->column('50%');
 $form->title(txt('usr_account_params'), '', ICONS . 'small_options.png');
 $items = array('1' => txt('yes'), '0' => txt('no'));
 $form->radio('user_new_active', txt('active'), txt('dsc_users_account_active'), $items, '1');
 $items = array('1' => txt('user_user'), '2' => txt('user_admin'));
 $form->radio('user_new_type', txt('type'), txt('dsc_users_account_type'), $items, '1');
 /*
 	$items = array('1' => txt('create_home'));
 	$form->checkbox('user_new_homedir', txt('home_dir'), txt('home_dir'),  $items, '1');
 */
 $form->input('hidden', 'user_new_homedir', '', '', '1');
 $languages = new phpos_languages();
 $langs_array = $languages->get_lang_list();
 $lang_items = array();
 foreach ($langs_array as $lang_id) {
     $lang_data = $languages->get_lang_info($lang_id);
     $lang_name = $lang_data['eng_name'] . ' (' . $lang_data['local_name'] . ')';
     $lang_items[$lang_id] = $lang_name;
 }
Ejemplo n.º 6
0
	(c) 2013 Marcin Szczyglinski
	szczyglis83@gmail.com
	GitHUB: https://github.com/phpos/
	File version: 1.0.0, 2013.10.08
 
**********************************
*/
if (!defined('PHPOS')) {
    die;
}
echo helper_result('config_update');
echo $layout->title(txt('cp_updater_autocheck_title'), 'icon.png');
echo $layout->txtdesc(txt('cp_updater_autocheck_desc'));
$form = new phpos_forms();
echo $form->form_start('config_updater', helper_ajax('section.config_updater.php'), array('app_params' => ''));
$form->reload_after_submit(array('nowy'));
$form->input('hidden', 'action', '', '', 'config_updater');
$form->title(txt('cp_updater_autocheck_title'), null, ICONS . 'clock.png');
$items = array('1' => txt('yes'), '0' => txt('no'));
$form->radio('app_updater_autoupdate', txt('cp_updater_autocheck'), txt('cp_updater_autocheck_desc'), $items, globalconfig('app_updater_autoupdate'));
if (!globalconfig('app_updater_autoupdate_timeout')) {
    globalconfig('app_updater_autoupdate_timeout', '5');
}
$items = array('1' => '1s', '5' => '5s', '10' => '10s');
$form->radio('app_updater_autoupdate_timeout', txt('cp_updater_autocheck_timeout'), txt('cp_updater_autocheck_timeout_desc'), $items, globalconfig('app_updater_autoupdate_timeout'));
echo $form->render();
$form->status();
$form->submit('', txt('btn_update'), 'edit_add', 'right');
//$form->button('', 'button', 'edit_add');
echo $form->render();
echo $form->form_end();
Ejemplo n.º 7
0
$success_code = winclose(WIN_ID) . $monit_success;
/*
**************************
*/
$app = new phpos_app();
$app->set_app_id($link_param);
$app->load_config();
$after_reload = $my_app->get_param('after_reload');
$html .= $layout->subtitle(txt('shortcuts_share_title'), MY_RESOURCES_URL . 'shared.png');
$html .= $layout->txtdesc(txt('shortcuts_share_desc'));
$html .= $layout->subtitle(txt('shortcuts_share_id_title'), MY_RESOURCES_URL . 'folder.png');
$form = new phpos_forms();
$form->onsuccess($success_code);
$html .= $form->form_start($form_id, helper_ajax('shareAction.php'), array('app_params' => ''));
$form->reload_after_submit(array($after_reload));
$form->status();
$form->label(txt('shortcuts_share_form_folder') . ': ', $shared_id, txt('shortcuts_share_form_folder_desc'));
$html .= $form->render();
$html .= $layout->subtitle(txt('shortcuts_share_network_name'), MY_RESOURCES_URL . 'shared.png');
$html .= $layout->txtdesc(txt('shortcuts_share_network_name_desc'));
$form->condition('not_null', true, txt('name_empty'));
$form->input('text', 'new_folder_name', txt('shortcuts_share_form_name'), txt('shortcuts_share_network_name_tip'), $default_value);
$form->input('text', 'new_folder_desc', txt('shortcuts_share_form_desc'), txt('shortcuts_share_form_desc_desc'), $default_value);
$html .= $form->render();
$html .= $layout->subtitle(txt('shortcuts_share_access_title'), MY_RESOURCES_URL . 'perms.png');
$items = array('1' => txt('yes'), '0' => txt('no'));
$form->radio('new_folder_readonly', txt('shortcuts_share_form_readonly'), txt('shortcuts_share_form_readonly_desc'), $items, '1');
$html .= $form->render();
$form->submit_btn($button);
$next_button = $form->render();
$html .= $form->form_end();
}
if (!globalconfig('disable_access_admins')) {
    globalconfig('disable_access_admins', '0');
}
if (!globalconfig('disable_upload')) {
    globalconfig('disable_upload', '0');
}
if (!globalconfig('readonly')) {
    globalconfig('readonly', '0');
}
if (!globalconfig('demo_mode')) {
    globalconfig('demo_mode', '0');
}
$form->title(txt('cp_security_logins_title'), null, ICONS . 'user.png');
$items = array('0' => txt('no'), '1' => txt('yes'));
$form->radio('disable_access_users', txt('cp_security_disable_login_users'), txt('cp_security_disable_login_users_desc'), $items, globalconfig('disable_access_users'));
$items = array('0' => txt('no'), '1' => txt('yes'));
$form->radio('disable_access_admins', txt('cp_security_disable_login_admins'), txt('cp_security_disable_login_admins_desc'), $items, globalconfig('disable_access_admins'));
$items = array('0' => txt('no'), '1' => txt('yes'));
$form->radio('readonly', txt('cp_security_disable_explorer'), txt('cp_security_disable_explorer_desc'), $items, globalconfig('readonly'));
$items = array('0' => txt('no'), '1' => txt('yes'));
$form->radio('demo_mode', txt('cp_demomode'), txt('cp_demomode_desc'), $items, globalconfig('demo_mode'));
echo $form->render();
echo $layout->end('column');
echo $layout->column('50%');
$form->title(txt('cp_security_upload'), '', ICONS . 'dragdrop.png');
$items = array('0' => txt('no'), '1' => txt('yes'));
$form->radio('disable_upload', txt('cp_security_disable_upload'), txt('cp_security_disable_upload_desc'), $items, globalconfig('disable_upload'));
$form->textarea('upload_whitelist', txt('cp_security_upload_whitelist'), txt('cp_security_upload_whitelist_desc'), globalconfig('upload_whitelist'));
$form->textarea('upload_blacklist', txt('cp_security_upload_blacklist'), txt('cp_security_upload_blacklist_desc'), globalconfig('upload_blacklist'));
$form->status();
Ejemplo n.º 9
0
 $cloud->get_cloud();
 echo $layout->title(txt('edit_cloud'), 'icon.png');
 echo $layout->txtdesc(txt('dsc_cloud_title'));
 echo helper_result('update_cloud');
 $form = new phpos_forms();
 echo $form->form_start('update_cloud', helper_ajax('section.edit_account.php'), array('app_params' => ''));
 $form->reload_after_submit(array('nowy'));
 $form->input('hidden', 'action', '', '', 'update_cloud');
 echo $layout->column('50%');
 $form->title($cloud->get_title(), null, $cloud->get_cloud_icon());
 $form->condition('not_null', true, txt('form_empty_field') . txt('title'));
 $form->input('text', 'cloud_new_title', txt('title'), txt('dsc_cloud_name'), $cloud->get_title());
 $form->input('text', 'cloud_new_desc', txt('desc'), txt('dsc_cloud_desc'), $cloud->get_desc());
 if (is_root() || is_admin()) {
     $items = array('1' => txt('yes'), '0' => txt('no'));
     $form->radio('cloud_new_public', txt('public'), txt('dsc_cloud_public'), $items, $cloud->get_is_public());
 } else {
     $form->input('hidden', 'cloud_new_public', '', '', 0);
 }
 echo $form->render();
 include MY_APP_DIR . 'views/cloud_help_google.php';
 echo $layout->end('column');
 echo $layout->column('50%');
 switch ($cloud_type) {
     case 'google_drive':
         $form->title(txt('cloud_authentication'), '', ICONS . 'auth_key.png');
         $form->condition('not_null', true, txt('form_empty_field') . 'ClientID');
         $form->input('text', 'cloud_new_login', 'ClientID', txt('dsc_cloud_login'), $cloud->get_login());
         $form->condition('not_null', true, txt('form_empty_field') . 'Secret');
         $form->input('password', 'cloud_new_pass', 'Secret', txt('dsc_cloud_pass'), $cloud->get_password());
         $form->input('text', 'cloud_new_url', 'Redirect URL', txt('dsc_cloud_port'), $cloud->get_url());