# shiftcontroller/2.1.0/application/modules/wordpress/views/admin/users/sync.php

ShiftController Employee Shift Scheduling, version 2.1.0. 95 lines.

- Page: https://pluginprobe.com/plugins/shiftcontroller/2.1.0/code/application/modules/wordpress/views/admin/users/sync.php
- Raw: https://pluginprobe.com/plugins/shiftcontroller/2.1.0/raw/application/modules/wordpress/views/admin/users/sync.php
- Modified: 2014-01-08T18:20:24+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shiftcontroller/2.1.0/code/application/modules/wordpress/views/admin/users/sync.php#L10-L20`.

```php
<?php
$CI =& ci_get_instance();
$app_title = $CI->config->item('nts_app_title');
?>
<?php
echo form_open(
	'wordpress/admin/users/syncrun',
	array(
		'class' => 'form-horizontal form-condensed'
		)
	);
?>

<fieldset>
	<legend>Copy WordPress User Accounts</legend>

	<table class="table table-striped table-condensed">
		<tr>
			<th>
				WordPress
			</th>
			<th>
				<?php echo $app_title; ?>
			</th>
		</tr>

		<?php foreach( $wordpress_roles as $role_value => $role_name ) : ?>
			<?php
			$this_role_count = ( isset($wordpress_count_users['avail_roles'][$role_value]) ) ? $wordpress_count_users['avail_roles'][$role_value] : 0;
			?>
			<tr>
				<td>
					<?php echo $role_name; ?> [<?php echo $this_role_count; ?>]
				</td>
				<td>
					<?php
					if( $role_value )
					{
						if( $role_value == 'administrator' )
						{
							$default = USER_MODEL::LEVEL_ADMIN;
						}
						else
						{
							if( $this_role_count )
								$default = USER_MODEL::LEVEL_STAFF;
							else
								$default = 0;
						}
					}
					else
						$default = 0;

					$field_name = 'role_' . $role_value;
					$options = array(
						USER_MODEL::LEVEL_ADMIN		=> lang('user_level_admin'),
						USER_MODEL::LEVEL_MANAGER	=> lang('user_level_manager'),
						USER_MODEL::LEVEL_STAFF		=> lang('user_level_staff'),
						0							=> lang('common_none'),
						);

					echo $this->hc_form->input(
						array(
							'type'		=> 'dropdown',
							'name'		=> $field_name,
							'options'	=> $options,
							'default'	=> $default,
							)
						);
					?>
				</td>
			</tr>
		<?php endforeach; ?>

		<tr>
			<td>
				&nbsp;
			</td>
			<td>
				<?php
				echo form_button( 
					array(
						'type' => 'submit',
						'name' => 'submit',
						'class' => 'btn btn-primary'
						),
					lang('common_go')
					);
				?>
			</td>
		</tr>
	</table>
</fieldset>

<?php echo form_close();?>
```
