403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.45
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/cwd/wp-content/plugins/cornerstone/includes/integration/csv/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/cwd/wp-content/plugins/cornerstone/includes/integration/csv/controls.php
<?php

function cs_csv_controls($settings = []) {
  $hasInput = (bool) cs_get_array_value($settings, 'has_input', true);

  $out = $hasInput
    ? cs_csv_input_controls($settings)
    : [];

  $out = array_merge($out, [
    // Has Headers
    [
      'key' => 'has_header',
      'label' => __('Has Header', 'cornerstone'),
      'description' => __('Is the first row a list of header / column titles? Will use integers as the keys of the CSV if not, and the first row will be looped over', 'cornerstone'),
      'type' => 'toggle',
    ],

    // Delimiter
    [
      'key' => 'delimiter',
      'label' => __('Delimiter', 'cornerstone'),
      'description' => __('Which character delimits each column of data. This is typically a comma (,) or pipe (|)', 'cornerstone'),
      'type' => 'text',
    ],
  ]);

  return $out;
}

/**
 * CSV Input control
 * file, raw
 */
function cs_csv_input_controls($settings = []) {

  return [
    // Type of CSV content
    [
      'key' => 'type',
      'label' => __('Type', 'cornerstone'),
      'type' => 'choose',
      'options' => [
        'choices' => [
          [
            'value' => 'file',
            'label' => __('File', 'cornerstone'),
          ],
          [
            'value' => 'content',
            'label' => __("Content", "cornerstone"),
          ],
        ]
      ],
    ],

    // File Input
    [
      'key' => 'file',
      'type' => 'file',
      'label' => __('File', 'cornerstone'),
      'options' => [
        'file_types' => ['text/csv'],
      ],
      'conditions' => [
        [
          'key' => 'type',
          'op' => '==',
          'value' => 'file',
        ],
      ],
    ],

    // Content / Text
    [
      'key' => 'content',
      //'type' => 'textarea',
      'type' => 'text-editor',
      'options' => [
        'mode' => 'text',
        'expandable' => true,
        'only_raw' => true,
        'height' => 6,
      ],
      'conditions' => [
        [
          'key' => 'type',
          'op' => '==',
          'value' => 'content',
        ]
      ],
    ],

  ];
}

Youez - 2016 - github.com/yon3zu
LinuXploit