Exemplo n.º 1
0
 function preferences()
 {
     $this->viewdata["function_title"] = _("Preferences");
     $form = array();
     if (find_imagick()) {
         $imagick_status = '<span class="label success">' . _('Found and Working') . '</span>';
     } else {
         if (!$this->fs_imagick->exec) {
             $imagick_status = '<span class="label important">' . _('Not Available') . '</span><a rel="popover-right" href="#" data-content="' . htmlspecialchars(_('You must have Safe Mode turned off and the exec() function enabled to allow ImageMagick to process your images. Please check the information panel for more details.')) . '" data-original-title="' . htmlspecialchars(_('Disabled Functions')) . '"><img src="' . icons(388, 16) . '" class="icon icon-small"></a>';
         } else {
             if (!$this->fs_imagick->found) {
                 $imagick_status = '<span class="label important">' . _('Not Found') . '</span><a rel="popover-right" href="#" data-content="' . htmlspecialchars(_('You must provide the correct path to the "convert" binary on your system. This is typically located under /usr/bin (Linux), /opt/local/bin (Mac OSX) or the installation directory (Windows).')) . '" data-original-title="' . htmlspecialchars(_('Disabled Functions')) . '"><img src="' . icons(388, 16) . '" class="icon icon-small"></a>';
             } else {
                 if (!$this->fs_imagick->available) {
                     $imagick_status = '<span class="label important">' . _('Not Working') . '</span><a rel="popover-right" href="#" data-content="' . htmlspecialchars(sprintf(_('There has been an error encountered when testing your ImageMagick installation. To manually check for errors, access your server via shell or command line and type: %s'), '<br/><code>' . $this->fs_imagick->found . ' -version</code>')) . '" data-original-title="' . htmlspecialchars(_('Disabled Functions')) . '"><img src="' . icons(388, 16) . '" class="icon icon-small"></a>';
                 }
             }
         }
     }
     $form[] = array(_('Path to ImageMagick') . ' ' . $imagick_status, array('type' => 'input', 'name' => 'fs_serv_imagick_path', 'placeholder' => '/usr/bin', 'preferences' => 'fs_gen', 'help' => sprintf(_('FoOlSlide uses %s via command line to maximize the processor power for processing images. If ImageMagick %s automatically, enter the location of the "convert" binary on your server in the field above.'), '<a href="#" rel="popover-below" title="ImageMagick" data-content="' . _('This is a library used to dynamically create, edit, compose or convert images.') . '">ImageMagick</a>', '<a href="#" rel="popover-below" title="' . _('ImageMagick Binary') . '" data-content="' . htmlspecialchars(_('This is typically located under /usr/bin (Linux), /opt/local/bin (Mac OSX) or the installation directory (Windows).')) . '" >' . _('can\'t be found') . '</a>')));
     if ($post = $this->input->post()) {
         $this->_submit($post, $form);
         redirect('admin/system/preferences');
     }
     // create a form
     $table = tabler($form, FALSE);
     $data['table'] = $table;
     // print out
     $this->viewdata["main_content_view"] = $this->load->view("admin/preferences/general.php", $data, TRUE);
     $data["form_title"] = _("Preferences");
     $this->viewdata["main_content_view"] = $this->load->view("admin/system/preferences", $data, TRUE);
     $this->load->view("admin/default.php", $this->viewdata);
 }
Exemplo n.º 2
0
	function _get_requests() {
		$application = array();
		$members = new Membership();
		if ($members->get_requests()) {
			foreach ($members->all as $key => $applicant) {
				$application[] = array(
					$applicant->team->name,
					$applicant->is_leader,
					array(
						'display' => 'buttoner',
						'href' => site_url('/admin/members/accept_application/' . $applicant->team->id),
						'text' => _('Accept'),
						'plug' => _('Do you really want to join this team?')
					),
					array(
						'display' => 'buttoner',
						'href' => site_url('/admin/members/reject_application/' . $applicant->team->id),
						'text' => _('Reject'),
						'plug' => _('Do you really want to reject the request to join this team?')
					)
				);
			}

			$list = tabler($application, TRUE, FALSE);
			$data = array('application' => $list, 'section' => _('Pending requests'));
			$this->viewdata['main_content_view'] .= $this->load->view("admin/dashboard/applicants", $data, TRUE);
		}
	}
Exemplo n.º 3
0
 function index()
 {
     if (!is_writable("content")) {
         $form = array();
     }
     if (!$this->_check()) {
         $data["table"] = "";
         $this->viewdata['main_content_view'] = "";
         $this->load->view("install/default", $this->viewdata);
         return FALSE;
     }
     $form[] = array(_('Database type'), array('type' => 'dropdowner', 'name' => 'db_type', 'id' => 'db_type', 'values' => array('mysql' => 'MySQL', 'mssql' => 'MSSQL', 'mysqli' => 'MySQLi', 'oci8' => 'OCI8', 'obdc' => 'OBDC', 'postgre' => 'Postgre', 'sqlite' => 'SQLite'), 'value' => 'mysql', 'placeholder' => _('required'), 'help' => _('The type of database you\'re going to use. Leave it on MySQL if using a standard installation')));
     $form[] = array(_('Database hostname'), array('type' => 'input', 'name' => 'db_hostname', 'id' => 'db_hostname', 'maxlength' => '200', 'placeholder' => 'required', 'required' => 'required', 'value' => 'localhost', 'help' => _('The hostname of the server hosting the database. 99.8% of times is localhost')));
     $form[] = array(_('Database name'), array('type' => 'input', 'name' => 'db_name', 'id' => 'db_name', 'maxlength' => '200', 'placeholder' => 'required', 'required' => 'required', 'help' => _('The name of the database')));
     $form[] = array(_('Database username'), array('type' => 'input', 'name' => 'db_username', 'id' => 'db_username', 'maxlength' => '200', 'required' => 'required', 'placeholder' => 'required', 'help' => _('The username of the user with permissions to the database')));
     $form[] = array(_('Database password'), array('type' => 'password', 'name' => 'db_password', 'id' => 'db_password', 'maxlength' => '200', 'required' => 'required', 'placeholder' => 'required', 'help' => _('The password of the user with permissions to the database')));
     $form[] = array(_('Database prefix'), array('type' => 'input', 'name' => 'db_prefix', 'id' => 'db_prefix', 'maxlength' => '200', 'value' => 'fs_', 'help' => _('Add a database prefix to avoid collisions, in example if you have other FoOlSlides')));
     $form[] = array(_('Administrator username'), array('type' => 'input', 'name' => 'username', 'id' => 'username', 'required' => 'required', 'placeholder' => 'required', 'maxlength' => '200', 'help' => _('The username of the administrator\'s account')));
     $form[] = array(_('Administrator password'), array('type' => 'password', 'name' => 'password', 'id' => 'password', 'maxlength' => '200', 'placeholder' => 'required', 'required' => 'required', 'help' => _('The password of the administrator\'s account')));
     $form[] = array(_('Administrator email'), array('type' => 'input', 'name' => 'email', 'id' => 'email', 'maxlength' => '200', 'placeholder' => 'required', 'required' => 'required', 'help' => _('The email of the administrator\'s account')));
     // send to _submit that does all the rest of installation
     if ($post = $this->input->post()) {
         if ($this->_submit($post) == 'stop') {
             return FALSE;
         }
         if (validation_errors()) {
             set_notice('error', validation_errors());
         }
     }
     // make a form off the array
     $table = tabler($form, FALSE, TRUE, TRUE);
     $data['table'] = $table;
     // print out
     $this->viewdata['main_content_view'] = $this->load->view("install/index", $data, TRUE);
     $this->load->view("install/default", $this->viewdata);
 }
Exemplo n.º 4
0
 function slideshow()
 {
     $this->viewdata["function_title"] = _("Slideshow");
     $form = array();
     // build the array for the form
     $form[] = array(_('1st Image URL'), array('type' => 'input', 'name' => 'fs_slsh_src_1', 'placeholder' => _('Activate by inserting an URL'), 'preferences' => 'fs_gen', 'help' => _('Image URL (don\'t forget "http://"). Suggested size: 690px width, 280px height')));
     $form[] = array(_('1st URL'), array('type' => 'input', 'name' => 'fs_slsh_url_1', 'placeholder' => _('Not required'), 'preferences' => 'fs_gen', 'help' => _('Link URL (don\'t forget "http://")')));
     $form[] = array(_('1st Display text'), array('type' => 'textarea', 'name' => 'fs_slsh_text_1', 'preferences' => 'fs_gen', 'help' => _('Text that appears on bottom of the image. HTML accepted')));
     $form[] = array(_('2nd Image URL'), array('type' => 'input', 'name' => 'fs_slsh_src_2', 'placeholder' => _('Activate by inserting an URL'), 'preferences' => 'fs_gen', 'help' => _('Image URL (don\'t forget "http://"). Suggested size: 690px width, 280px height')));
     $form[] = array(_('2nd URL'), array('type' => 'input', 'name' => 'fs_slsh_url_2', 'placeholder' => _('Not required'), 'preferences' => 'fs_gen', 'help' => _('Link URL (don\'t forget "http://")')));
     $form[] = array(_('2nd Display text'), array('type' => 'textarea', 'name' => 'fs_slsh_text_2', 'preferences' => 'fs_gen', 'help' => _('Text that appears on bottom of the image. HTML accepted')));
     $form[] = array(_('3rd Image URL'), array('type' => 'input', 'name' => 'fs_slsh_src_3', 'placeholder' => _('Activate by inserting an URL'), 'preferences' => 'fs_gen', 'help' => _('Image URL (don\'t forget "http://"). Suggested size: 690px width, 280px height')));
     $form[] = array(_('3rd URL'), array('type' => 'input', 'name' => 'fs_slsh_url_3', 'placeholder' => _('Not required'), 'preferences' => 'fs_gen', 'help' => _('Link URL (don\'t forget "http://")')));
     $form[] = array(_('3rd Display text'), array('type' => 'textarea', 'name' => 'fs_slsh_text_3', 'preferences' => 'fs_gen', 'help' => _('Text that appears on bottom of the image. HTML accepted')));
     $form[] = array(_('4th Image URL'), array('type' => 'input', 'name' => 'fs_slsh_src_4', 'placeholder' => _('Activate by inserting an URL'), 'preferences' => 'fs_gen', 'help' => _('Image URL (don\'t forget "http://"). Suggested size: 690px width, 280px height')));
     $form[] = array(_('4th URL'), array('type' => 'input', 'name' => 'fs_slsh_url_4', 'placeholder' => _('Not required'), 'preferences' => 'fs_gen', 'help' => _('Link URL (don\'t forget "http://")')));
     $form[] = array(_('4th Display text'), array('type' => 'textarea', 'name' => 'fs_slsh_text_4', 'preferences' => 'fs_gen', 'help' => _('Text that appears on bottom of the image. HTML accepted')));
     if ($post = $this->input->post()) {
         $this->_submit($post, $form);
         redirect('admin/preferences/slideshow');
     }
     // create a form
     $table = tabler($form, FALSE);
     $data['table'] = $table;
     // print out
     $this->viewdata["main_content_view"] = $this->load->view("admin/preferences/general.php", $data, TRUE);
     $this->load->view("admin/default.php", $this->viewdata);
 }
Exemplo n.º 5
0
 function import($stub)
 {
     if (!$this->tank_auth->is_admin()) {
         show_404();
     }
     if (!$stub) {
         show_404();
     }
     $comic = new Comic();
     $comic->where('stub', $stub)->get();
     $data['comic'] = $comic;
     $this->viewdata["extra_title"][] = $comic->name;
     $archive[] = array(_("Absolute directory path to ZIP archive for the series") . ' ' . $comic->name, array('type' => 'input', 'name' => 'directory', 'help' => sprintf(_('Insert the absolute directory path. This means from the lowest accessible directory. Example: %s'), '/var/www/backup/' . $comic->stub)));
     $data['archive'] = tabler($archive, FALSE, TRUE, TRUE);
     $this->viewdata["function_title"] = _("Import");
     if ($this->input->post('directory')) {
         $data['directory'] = $this->input->post('directory');
         if (!is_dir($data['directory'])) {
             set_notice('error', _('The directory you set does not exist.'));
             $this->viewdata["main_content_view"] = $this->load->view("admin/series/import", $data, TRUE);
             $this->load->view("admin/default.php", $this->viewdata);
             return FALSE;
         }
         $data['archives'] = $this->files_model->import_list($data);
         $this->viewdata["main_content_view"] = $this->load->view("admin/series/import_compressed_list", $data, TRUE);
         $this->load->view("admin/default.php", $this->viewdata);
         return TRUE;
     }
     if ($this->input->post('action') == 'execute') {
         $result = $this->files_model->import_compressed();
         if (isset($result['error']) && !$result['error']) {
             $this->output->set_output(json_encode($result));
             return FALSE;
         } else {
             $this->output->set_output(json_encode($result));
             return true;
         }
     }
     $this->viewdata["main_content_view"] = $this->load->view("admin/series/import", $data, TRUE);
     $this->load->view("admin/default.php", $this->viewdata);
 }
Exemplo n.º 6
0
<div class='mainInfo'>	
	<div id="infoMessage"><?php echo $message;?></div>
	
                
                <?php
                    $rows = array();
                    $rows[] = array('Username', 'Email', 'Group', 'Status');
                    foreach ($users as $user)
                    {
                        $rows[] = array('<a href="'.site_url('/admin/users/user/'.$user['id']).'">'.$user['username'].'</a>', $user['email'], $user['group_description'], ($user['active']) ? anchor("auth/deactivate/".$user['id'], 'Active') : anchor("auth/activate/". $user['id'], 'Inactive'));
                    }
                    echo tabler($rows, TRUE, FALSE)
                ?>
	
</div>
Exemplo n.º 7
0
	function add_team() {

		if ($post = $this->input->post()) {
			$team = new Team();
			$team->update_team($this->input->post());
			redirect('/admin/members/teams/' . $team->stub);
		}

		$team = new Team();

		$this->viewdata["function_title"] = "Team";
		$this->viewdata["extra_title"][] = 'New';

		$result = ormer($team);
		$result = tabler($result, FALSE, TRUE);
		$data['table'] = $result;
		$this->viewdata["main_content_view"] = $this->load->view('admin/form', $data, TRUE);
		$this->load->view("admin/default", $this->viewdata);
	}
Exemplo n.º 8
0
 function client()
 {
     $this->viewdata["function_title"] = _("Client");
     $form = array();
     // build the array for the form
     $form[] = array(_('URL to master FoOlSlide root'), array('type' => 'input', 'name' => 'fs_balancer_master_url', 'id' => 'site_title', 'placeholder' => 'http://', 'preferences' => 'fs_gen', 'help' => _('Providing a URL will convert this FoOlSlide installation into a load balancer.')));
     if ($post = $this->input->post()) {
         $this->_submit($post, $form);
     }
     // create a form
     $table = tabler($form, FALSE);
     $data['form_title'] = _('Client');
     $data['form_description'] = _('These settings can only be activated if there are no comics available on this FoOlSlide. All core functions will be disabled and your data will be duplicated quietly in the background.');
     $data['table'] = $table;
     // print out
     $this->viewdata['function_title'] = _('Client');
     $this->viewdata["main_content_view"] = $this->load->view("admin/preferences/general.php", $data, TRUE);
     $this->load->view("admin/default.php", $this->viewdata);
 }
Exemplo n.º 9
0
 function add_team()
 {
     // only admins and mods are allowed to create teams
     if (!$this->tank_auth->is_allowed()) {
         show_404();
     }
     // save the data if POST
     if ($post = $this->input->post()) {
         $team = new Team();
         $team->update_team($this->input->post());
         flash_notice('notice', 'Added the team ' . $team->name . '.');
         redirect('/admin/members/teams/' . $team->stub);
     }
     $team = new Team();
     // set title and subtitle
     $this->viewdata["function_title"] = '<a href="' . site_url("/admin/members/teams") . '">' . _('Teams') . '</a>';
     $this->viewdata["extra_title"][] = _('Add New');
     // transform the Datamapper array to a form
     $result = ormer($team);
     $result = tabler($result, FALSE, TRUE);
     $data['form_title'] = _('Add New Team');
     $data['table'] = $result;
     // print out
     $this->viewdata["main_content_view"] = $this->load->view('admin/form', $data, TRUE);
     $this->load->view("admin/default", $this->viewdata);
 }
Exemplo n.º 10
0
	function server() {
		show_404();
		$this->viewdata["function_title"] = _("Server");

		if ($post = $this->input->post()) {
			$this->_submit($post);
		}

		$form = array();


		$form[] = array(
			_('Input on each line the URL of FoOlSlide on the other server.'),
			array(
				'type' => 'textarea',
				'name' => 'fs_srv_servers',
				'placeholder' => _('List of servers'),
				'preferences' => 'fs_srv'
			)
		);

		$table = tabler($form, FALSE);

		$data['table'] = $table;


		$this->viewdata["main_content_view"] = $this->load->view("admin/preferences/general.php", $data, TRUE);
		$this->load->view("admin/default.php", $this->viewdata);
	}
Exemplo n.º 11
0
								<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 for balancing. 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>