<commit_before><?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<div class="table">
	<h3><?php echo _('Balancers'); ?></h3>
	<span class="clearfix">
	<?php
	echo _("Load balancers for FoOlSlide are servers that contain the images cloned from the master server. You can use an external service to do this (like a Content Delivery Network), or use a second FoOlSlide in \"client mode\" on another server.");

	echo '<br/><br/>';

	echo sprintf(_(" Setting up a FoOlSlide balancer is really easy: just install a slide on the other server, tell it the URL to this slide (%s), and add the URL to the other slide down here. The rest is automatic."), site_url());

	echo '<br/><br/>';

	echo _("The % is for ease. You can set each host to any %. If you set two balancers at 100%, they will actually work at 50% each");

	echo '<br/><br/>';


	echo _("The load balancer can't support download of compressed archives. Those will still be served by the master FoOlSlide. Don't worry: less than 20% readers downloads. Just keep this in mind while distributing the %.");

	echo '<br/><br/>';
	?>
	</span>
	<div style="padding-right: 10px">
		<?php echo form_open(); ?>
		<table class="zebra-striped">
			<thead>
				<th><?php echo _('URL'); ?></th>
				<th><?php echo _('Priority'); ?></th>
			</thead>
			<tbody>
			<?php
				foreach ($balancers as $key => $item)
				{
					echo '<tr>
						<td>'.form_input('url[]', $item["url"]).'</td>
						<td width="140px">
							<div class="input-append">
								<input style="text-align: right; width: 100px" type="number" name="priority[]" min="0" max="100" value="'.form_prep($item["priority"]).'" />
								<span class="add-on">%</span>
							</div>
						</td>';
					echo '</tr>';
				}
			?>
			</tbody>
		</table>
	<?php
		echo form_submit('submit', _("Add/Save"));
		echo form_close();
		
		$form = array();
		$form[] = array(
			_('IPs of load balancing servers'),
			array(
				'type' => 'input',
				'value' => (isset($ips) && is_array($ips))?$ips:array(),
				'name' => 'fs_balancer_ips',
				'help' => _('Add the IPs of the servers used to balance. This will prevent them from being limited via the nationality filter.')
			)
		);
		echo form_open('', array('class' => 'form-stacked'));
		echo tabler($form, FALSE, TRUE);
		echo form_close();
	?>
	</div>
</div><commit_msg>Fixed missing load balancer fields.<commit_after><?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<div class="table">
	<h3><?php echo _('Balancers'); ?></h3>
	<span class="clearfix">
	<?php
	echo _("Load balancers for FoOlSlide are servers that contain the images cloned from the master server. You can use an external service to do this (like a Content Delivery Network), or use a second FoOlSlide in \"client mode\" on another server.");

	echo '<br/><br/>';

	echo sprintf(_(" Setting up a FoOlSlide balancer is really easy: just install a slide on the other server, tell it the URL to this slide (%s), and add the URL to the other slide down here. The rest is automatic."), site_url());

	echo '<br/><br/>';

	echo _("The % is for ease. You can set each host to any %. If you set two balancers at 100%, they will actually work at 50% each");

	echo '<br/><br/>';


	echo _("The load balancer can't support download of compressed archives. Those will still be served by the master FoOlSlide. Don't worry: less than 20% readers downloads. Just keep this in mind while distributing the %.");

	echo '<br/><br/>';
	?>
	</span>
	<div style="padding-right: 10px">
		<?php echo form_open(); ?>
		<table class="zebra-striped">
			<thead>
				<th><?php echo _('URL'); ?></th>
				<th><?php echo _('Priority'); ?></th>
			</thead>
			<tbody>
			<?php
				foreach ($balancers as $key => $item)
				{
					echo '<tr>
						<td>'.form_input('url[]', $item["url"]).'</td>
						<td width="140px">
							<div class="input-append">
								<input style="text-align: right; width: 100px" type="number" name="priority[]" min="0" max="100" value="'.form_prep($item["priority"]).'" />
								<span class="add-on">%</span>
							</div>
						</td>';
					echo '</tr>';
				}
				$url["value"] = "";
					echo '<tr>
						<td>'.form_input('url[]').'</td>
						<td width="140px">
							<div class="input-append">
								<input style="text-align: right; width: 100px" type="number" name="priority[]" min="0" max="100" value="0" />
								<span class="add-on">%</span>
							</div>
						</td>';
					echo '</tr>';
			?>
			</tbody>
		</table>
	<?php
		echo form_submit('submit', _("Add/Save"));
		echo form_close();
		
		$form = array();
		$form[] = array(
			_('IPs of load balancing servers'),
			array(
				'type' => 'input',
				'value' => (isset($ips) && is_array($ips))?$ips:array(),
				'name' => 'fs_balancer_ips',
				'help' => _('Add the IPs of the servers used to balance. This will prevent them from being limited via the nationality filter.')
			)
		);
		echo form_open('', array('class' => 'form-stacked'));
		echo tabler($form, FALSE, TRUE);
		echo form_close();
	?>
	</div>
</div>
{'fraction_non_alphanumeric': 0.18612922347362182, 'fraction_numerical': 0.010472238688006322, 'mean_word_length': 3.4481546572934976, 'pattern_counts': {'":': 0, '<': 104, '<?xml version=': 0, '>': 116, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7146732', 'n_tokens_mistral': 1978, 'n_tokens_neox': 1632, 'n_words': 577}