<?php	
		$data['tabs'][] = array(
			'id'		=> 'tab_readme',
			'title'		=> $this->language->get('tab_readme')
		);	

		$data['tabs'][] = array(
			'id'		=> 'tab_general',
			'title'		=> $this->language->get('tab_general')
		);
		
		$data['tabs'][] = array(
			'id'		=> 'tab_order_status',
			'title'		=> $this->language->get('tab_order_status')
		);

		$data['tabs'][] = array(
			'id'		=> 'tab_debug',
			'title'		=> $this->language->get('tab_debug')
		);

		$data['tabs'][] = array(
			'id'		=> 'tab_support',
			'title'		=> $this->language->get('tab_support')
		);

$readme = <<<EOF
How to setup your Paypal Pro Hosted account:
======================
1. Login to your Paypal Pro account
2. Goto My Account -> Profile -> Paypal Pro Settings -> Payment confirmation page
3. Select: "On my site's confirmation page."
4. Set Return URL to: index.php?route=checkout/success
EOF;


		$data['fields'][] = array(
			'tab'			=> 'tab_readme',
			'entry'			=> 'Readme:',
			'type'			=> 'label',
			'name'			=> '',
			'value'			=> nl2br($readme),
			'help'			=> ($this->language->get('help_readme') != 'help_readme' ? $this->language->get('help_readme') : ''),
			'tooltip'		=> ($this->language->get('tooltip_readme') != 'tooltip_readme' ? $this->language->get('tooltip_readme') : '')
		);
		
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_status'),
			'type'			=> 'select',
			'name' 			=> 'status',
			'value' 		=> (isset($this->request->post['status'])) ? $this->request->post['status'] : $this->config->get($classname . '_status'),
			'required' 		=> false,
			'options'		=> array(
				'0' => $this->language->get('text_disabled'),
				'1' => $this->language->get('text_enabled')
			),
			'help'			=> ($this->language->get('help_status') != 'help_status' ? $this->language->get('help_status') : ''),
			'tooltip'		=> ($this->language->get('tooltip_status') != 'tooltip_status' ? $this->language->get('tooltip_status') : '')
		);

		foreach ($languages as $language_id => $language_name) {
			$data['fields'][] = array(
				'tab'			=> 'tab_general',
				'entry' 		=> '[ ' . $language_name . ' ] ' . $this->language->get('entry_title'),
				'type'			=> 'text',
				'size'			=> '20',
				'name' 			=> 'title_' . $language_id,
				'value' 		=> ((isset($this->request->post['title_' . $language_id])) ? $this->request->post['title_' . $language_id] : $this->config->get($classname . '_title_' . $language_id) ? $this->config->get($classname . '_title_' . $language_id) : ucwords(str_replace(array('-','_','.'), " ", $classname))),
				'required' 		=> false,
				'help'			=> ($this->language->get('help_title') != 'help_title' ? $this->language->get('help_title') : ''),
				'tooltip'		=> ($this->language->get('tooltip_title') != 'tooltip_title' ? $this->language->get('tooltip_title') : '')
			);
		}
		
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_customer_group'),
			'type'			=> 'scrollbox',
			'name' 			=> 'customer_group[]',
			'value' 		=> explode(',', (isset($this->request->post['customer_group'])) ? $this->request->post['customer_group'] : $this->config->get($classname . '_customer_group') ? $this->config->get($classname . '_customer_group') : ''),
			'required' 		=> false,
			'options'		=> $customer_groups,
			'help'			=> ($this->language->get('help_customer_group') != 'help_customer_group' ? $this->language->get('help_customer_group') : ''),
			'tooltip'		=> ($this->language->get('tooltip_customer_group') != 'tooltip_customer_group' ? $this->language->get('tooltip_customer_group') : '')
		);

		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_test'),
			'type'			=> 'select',
			'name' 			=> 'test',
			'value' 		=> (isset($this->request->post['test'])) ? $this->request->post['test'] : $this->config->get($classname . '_test'),
			'required' 		=> false,
			'options'		=> array(
				'0' => $this->language->get('text_no'),
				'1' => $this->language->get('text_yes')
			),
			'help'			=> ($this->language->get('help_test') != 'help_test' ? $this->language->get('help_test') : ''),
			'tooltip'		=> ($this->language->get('tooltip_test') != 'tooltip_test' ? $this->language->get('tooltip_test') : '')
		);

		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_email'),
			'type'			=> 'text',
			'name' 			=> 'email',
			'value' 		=> (isset($this->request->post['email'])) ? $this->request->post['email'] : $this->config->get($classname . '_email'),
			'required' 		=> true,
			'help'			=> ($this->language->get('help_email') != 'help_email' ? $this->language->get('help_email') : ''),
			'tooltip'		=> ($this->language->get('tooltip_email') != 'tooltip_email' ? $this->language->get('tooltip_email') : '')
		);
				
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_transaction'),
			'type'			=> 'select',
			'name' 			=> 'transaction',
			'value' 		=> (isset($this->request->post['transaction'])) ? $this->request->post['transaction'] : $this->config->get($classname . '_transaction'),
			'required' 		=> false,
			'options'		=> array(
				'S' => $this->language->get('text_sale'),
				'A' => $this->language->get('text_auth')
			),
			'help'			=> ($this->language->get('help_transaction') != 'help_transaction' ? $this->language->get('help_transaction') : ''),
			'tooltip'		=> ($this->language->get('tooltip_transaction') != 'tooltip_transaction' ? $this->language->get('tooltip_transaction') : '')
		);
							
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_iframe'),
			'type'			=> 'select',
			'name' 			=> 'iframe',
			'value' 		=> (isset($this->request->post['iframe'])) ? $this->request->post['iframe'] : $this->config->get($classname . '_iframe'),
			'required' 		=> false,
			'options'		=> array(
				'0' => $this->language->get('text_no'),
				'1' => $this->language->get('text_yes')
			),
			'help'			=> ($this->language->get('help_iframe') != 'help_iframe' ? $this->language->get('help_iframe') : ''),
			'tooltip'		=> ($this->language->get('tooltip_iframe') != 'tooltip_iframe' ? $this->language->get('tooltip_iframe') : '')
		);
				
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_total'),
			'type'			=> 'text',
			'name' 			=> 'total',
			'value' 		=> (isset($this->request->post['total'])) ? $this->request->post['total'] : $this->config->get($classname . '_total'),
			'required' 		=> false,
			'help'			=> ($this->language->get('help_total') != 'help_total' ? $this->language->get('help_total') : ''),
			'tooltip'		=> ($this->language->get('tooltip_total') != 'tooltip_total' ? $this->language->get('tooltip_total') : '')
		);
		
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_max_total'),
			'type'			=> 'text',
			'name' 			=> 'max_total',
			'value' 		=> (isset($this->request->post['max_total'])) ? $this->request->post['max_total'] : $this->config->get($classname . '_max_total') ? $this->config->get($classname . '_max_total') : '2000',
			'required' 		=> false,
			'help'			=> ($this->language->get('help_max_total') != 'help_max_total' ? $this->language->get('help_max_total') : ''),
			'tooltip'		=> ($this->language->get('tooltip_max_total') != 'tooltip_max_total' ? $this->language->get('tooltip_max_total') : '')
		);
		
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_supported_currencies'),
			'type'			=> 'scrollbox',
			'name' 			=> 'supported_currencies[]',
			'value' 		=> explode(',', (isset($this->request->post['supported_currencies'])) ? $this->request->post['supported_currencies'] : $this->config->get($classname . '_supported_currencies') ? $this->config->get($classname . '_supported_currencies') : ''),
			'required' 		=> false,
			'options'		=> $currencies,
			'help'			=> ($this->language->get('help_supported_currencies') != 'help_supported_currencies' ? $this->language->get('help_supported_currencies') : ''),
			'tooltip'		=> ($this->language->get('tooltip_supported_currencies') != 'tooltip_supported_currencies' ? $this->language->get('tooltip_supported_currencies') : '')
		);
		
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_default_currency'),
			'type'			=> 'select',
			'name' 			=> 'default_currency',
			'value' 		=> (isset($this->request->post['default_currency'])) ? $this->request->post['default_currency'] : $this->config->get($classname . '_default_currency'),
			'required' 		=> false,
			'options'		=> $currencies,
			'help'			=> ($this->language->get('help_default_currency') != 'help_default_currency' ? $this->language->get('help_default_currency') : ''),
			'tooltip'		=> ($this->language->get('tooltip_default_currency') != 'tooltip_default_currency' ? $this->language->get('tooltip_default_currency') : '')
		);
				
		$data['fields'][] = array(
			'tab'			=> 'tab_order_status',
			'entry' 		=> $this->language->get('entry_order_status'),
			'type'			=> 'select',
			'name' 			=> 'order_status_id',
			'value' 		=> (isset($this->request->post['order_status_id'])) ? $this->request->post['order_status_id'] : $this->config->get($classname . '_order_status_id'),
			'required' 		=> false,
			'options'		=> $order_statuses,
			'help'			=> ($this->language->get('help_order_status') != 'help_order_status' ? $this->language->get('help_order_status') : ''),
			'tooltip'		=> ($this->language->get('tooltip_order_status') != 'tooltip_order_status' ? $this->language->get('tooltip_order_status') : '')
		);
		
		$ordstatuses = array(
			'pending',
			'denied',
			'failed',
			'refunded',
			'canceled_reversal',
			'reversed',
			'unspecified'			
		);
		
		foreach ($ordstatuses as $ord_status) {
			$data['fields'][] = array(
				'tab'			=> 'tab_order_status',
				'entry' 		=> $this->language->get('entry_order_status_' . $ord_status),
				'type'			=> 'select',
				'name' 			=> 'order_status_id_' . $ord_status,
				'value' 		=> (isset($this->request->post['order_status_id_' . $ord_status])) ? $this->request->post['order_status_id_' . $ord_status] : $this->config->get($classname . '_order_status_id_' . $ord_status),
				'required' 		=> false,
				'options'		=> $order_statuses,
				'help'			=> ($this->language->get('help_order_status_' . $ord_status) != 'help_order_status_' . $ord_status ? $this->language->get('help_order_status_' . $ord_status) : ''),
				'tooltip'		=> ($this->language->get('tooltip_order_status_' . $ord_status) != 'tooltip_order_status_' . $ord_status ? $this->language->get('tooltip_order_status_' . $ord_status) : '')
			);
		}
		
		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry' 		=> $this->language->get('entry_geo_zone'),
			'type'			=> 'select',
			'name' 			=> 'geo_zone_id',
			'value' 		=> (isset($this->request->post['geo_zone_id'])) ? $this->request->post['geo_zone_id'] : $this->config->get($classname . '_geo_zone_id'),
			'required' 		=> false,
			'options'		=> $geo_zones,
			'help'			=> ($this->language->get('help_geo_zone') != 'help_geo_zone' ? $this->language->get('help_geo_zone') : ''),
			'tooltip'		=> ($this->language->get('tooltip_geo_zone') != 'tooltip_geo_zone' ? $this->language->get('tooltip_geo_zone') : '')
		);

		$data['fields'][] = array(
			'tab'			=> 'tab_general',
			'entry'			=> $this->language->get('entry_sort_order'),
			'type'			=> 'text',
			'name'			=> 'sort_order',
			'value'			=> (isset($this->request->post['sort_order'])) ? $this->request->post['sort_order'] : $this->config->get($classname . '_sort_order'),
			'required'		=> false,
			'help'			=> ($this->language->get('help_sort_order') != 'help_sort_order' ? $this->language->get('help_sort_order') : ''),
			'tooltip'		=> ($this->language->get('tooltip_sort_order') != 'tooltip_sort_order' ? $this->language->get('tooltip_sort_order') : '')
		);
		
		$data['fields'][] = array(
			'tab'			=> 'tab_debug',
			'entry' 		=> $this->language->get('entry_debug'),
			'type'			=> 'select',
			'name' 			=> 'debug',
			'value' 		=> (isset($this->request->post['debug'])) ? $this->request->post['debug'] : $this->config->get($classname . '_debug'),
			'required' 		=> false,
			'options'		=> array(
				'0' => $this->language->get('text_disabled'),
				'1' => $this->language->get('text_enabled')
			),
			'help'			=> ($this->language->get('help_debug') != 'help_debug' ? $this->language->get('help_debug') : ''),
			'tooltip'		=> ($this->language->get('tooltip_debug') != 'tooltip_debug' ? $this->language->get('tooltip_debug') : '')
		);

		$data['fields'][] = array(
			'tab'			=> 'tab_debug',
			'entry'			=> $this->language->get('entry_debug_file'),
			'type'			=> 'label',
			'name'			=> '',
			'value'			=> DIR_LOGS . $classname . '_debug.txt',
			'help'			=> ($this->language->get('help_debug_file') != 'help_debug_file' ? $this->language->get('help_debug_file') : ''),
			'tooltip'		=> ($this->language->get('tooltip_debug_file') != 'tooltip_debug_file' ? $this->language->get('tooltip_debug_file') : '')
		);

		$data['fields'][] = array(
			'tab'			=> 'tab_debug',
			'entry'			=> '',
			'type'			=> 'textarea',
			'cols'			=> '160',
			'rows'			=> '100',
			'name'			=> '',
			'value'			=> (file_exists(DIR_LOGS . $classname . '_debug.txt')) ? file_get_contents(DIR_LOGS . $classname . '_debug.txt') : 'empty'
		);

		$data['fields'][] = array(
			'tab'			=> 'tab_support',
			'entry'			=> 'Troubleshooting Info: ',
			'type'			=> 'label',
			'name'			=> 'troubleshooting',
			'value'			=> '',
			'help'			=> '',
			'tooltip'		=> ''
		);

		$data['fields'][] = array(
			'tab'			=> 'tab_support',
			'entry'			=> 'Support Info:',
			'type'			=> 'label',
			'name'			=> 'support',
			'value'			=> 'For support questions, contact me at qphoria@gmail.com or on skype: taqmobile',
			'help'			=> '',
			'tooltip'		=> ''
		);

?>