Exemplo n.º 1
0
             cache_param('action');
             savelog('FTP_ACCOUNT_DELETE_id_' . $delete_id . '#SUCCESS');
         }
         break;
 }
 if (form_submit('new_ftp')) {
     if ($_POST['action'] == 'new_ftp') {
         $tmp_title = strip_tags($_POST['ftp_new_title']);
         $tmp_desc = strip_tags($_POST['ftp_new_desc']);
         $tmp_host = strip_tags($_POST['ftp_new_host']);
         $tmp_login = strip_tags($_POST['ftp_new_login']);
         $tmp_pass = strip_tags($_POST['ftp_new_pass']);
         $tmp_port = strip_tags($_POST['ftp_new_port']);
         $tmp_public = strip_tags($_POST['ftp_new_public']);
         $ftp = new phpos_ftp();
         if ($ftp->new_ftp($tmp_title, $tmp_desc, $tmp_host, $tmp_login, $tmp_pass, $tmp_port, $tmp_public, null)) {
             helper_result('new_ftp', 'ok', txt('created'));
             helper_result('new_ftp_result', 'result', 'success');
             helper_result('new_ftp_id', 'var', 1);
             savelog('FTP_ACCOUNT_CREATE#SUCCESS');
         } else {
             savelog('FTP_ACCOUNT_CREATE#FAILED');
             helper_result('new_ftp_result', 'result', 'error');
             helper_result('new_ftp', 'error', txt('error'));
         }
         $_POST['action'] = null;
     }
 }
 // update
 if (form_submit('update_ftp')) {
     if ($_POST['action'] == 'update_ftp') {