summaryrefslogtreecommitdiff
path: root/views/mods/mod_videodownload/settings_edit.phtml
blob: befe61eb9482f3460f9fe62af1b601bc2643b054 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php

	/**
	 * Template für die Einstellungsseite des Videodownloadproduktmoduls
	 */

?>
<br />
<div class="wpsg_admin_box" id="wpsg_tab">	
	<div class="head">
		<div class="title">
			<div class="tab" id="tab1"><?php echo __('Einstellungen', 'wpsg'); ?></div>
			<div class="tab" id="tab2"><?php echo __('Textfelder', 'wpsg'); ?></div>
			<div class="tab tabright tabright-last" id="tab3"><?php echo __('Info', 'wpsg'); ?></div>
			<div class="wpsg_clear"></div>
		</div>
	</div>
	<div class="content">
		
		<div id="tabcontent1" class="tabcontent">			
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_command', __('Programmaufruf', 'wpsg'), $this->get_option('wpsg_mod_videodownload_command'), array('help' => 'mod_videodownload_einstellungen_programmaufruf')); ?>
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_infocommand', __('Programmaufruf (ffmpeg -i)', 'wpsg'), $this->get_option('wpsg_mod_videodownload_infocommand'), array('help' => 'mod_videodownload_einstellungen_programminfoaufruf')); ?>		
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_filename', __('Personalisierter Dateiname', 'wpsg'), $this->get_option('wpsg_mod_videodownload_filename'), array('help' => 'mod_videodownload_einstellungen_filename')); ?>
			<?php echo wpsg_drawForm_Select('wpsg_mod_videodownload_indiv_mode', __('Individualisierung planen', 'wpsg'), array(0 => __('Manuell', 'wpsg'), 1 => __('Nach Zahlung', 'wpsg'), 2 => __('Nach Bestellung', 'wpsg')), $this->get_option('wpsg_mod_videodownload_indiv_mode'), array('help' => 'mod_videodownload_einstellungen_individualisierungsmodus')); ?>
			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_videodownload_autosend', __('Videos nach Individualisierung sofort senden', 'wpsg'), $this->get_option('wpsg_mod_videodownload_autosend'), array('help' => 'mod_videodownload_einstellungen_autosend')); ?>
			<?php echo wpsg_drawForm_Select('wpsg_mod_videodownload_accepted', __('Gültigkeit von Links', 'wpsg'), array(0 => __('Unbegrenzt', 'wpsg'), 1 => __('Nach Downloads', 'wpsg'), 2 => __('Nach Tagen', 'wpsg')), $this->get_option('wpsg_mod_videodownload_accepted'), array('help' => 'mod_videodownload_einstellungen_accepted')); ?>
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_days', __('Gültigkeit in Tagen', 'wpsg'), $this->get_option('wpsg_mod_videodownload_days')); ?> 
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_downloads', __('Anzahl an möglichen Downloads', 'wpsg'), $this->get_option('wpsg_mod_videodownload_downloads')); ?>
			<?php echo wpsg_drawForm_Checkbox('wpsg_mod_videodownload_cleanraiddownloads', __('Abgelaufene Downloads bereinigen', 'wpsg'), $this->get_option('wpsg_mod_videodownload_cleanraiddownloads')); ?>
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_cleanolddownloads', __('Downloads nach X Tagen löschen', 'wpsg'), $this->get_option('wpsg_mod_videodownload_cleanolddownloads')); ?>
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_videopath', __('Pfad für die Videos der Produkte', 'wpsg'), $this->get_option('wpsg_mod_videodownload_videopath'), array('hint' => __('Standard: uploads/wpsg_videoprodukte/', 'wpsg'))); ?>
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_videoindivpath', __('Pfad für die Individualisierten Videos', 'wpsg'), $this->get_option('wpsg_mod_videodownload_videoindivpath'), array('hint' => __('Standard: uploads/wpsg_videoprodukte_order/', 'wpsg'))); ?>
			<?php echo wpsg_drawForm_Select('wpsg_mod_videodownload_format', __('Auslieferungsformat', 'wpsg'), array(0 => __('Direkt', 'wpsg'), 1 => __('Gezippt (intern)', 'wpsg'), 2 => __('Gezippt (extern)', 'wpsg')), $this->get_option('wpsg_mod_videodownload_format')); ?>
			<?php echo wpsg_drawForm_Input('wpsg_mod_videodownload_fontpath', __('Pfad für die weitere Schriftarten', 'wpsg'), $this->get_option('wpsg_mod_videodownload_fontpath'), array('hint' => __('Standard: user_views/mods/mod_videodownload/fonts/', 'wpsg'))); ?>
			<div class="wpsg_form_field">
				<div class="wpsg_form_left">
					<label><?php echo __('Mail für Individualisierungsbericht', 'wpsg'); ?>:</label>
				</div>
				<div class="wpsg_form_right">
					<p><?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#videodownloadcronmail'); ?></p>
				</div>
				<div class="wpsg_clear"></div>
			</div>			
			<div class="wpsg_form_field">
				<div class="wpsg_form_left">
					<label><?php echo __('Mail für Downloads an Kunden', 'wpsg'); ?>:</label>
				</div>
				<div class="wpsg_form_right">
					<p><?php echo wpsg_translate(__('Kann <a href="#1#">hier</a> konfiguriert werden.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=emailconf#videodownloadfiles'); ?></p>
				</div>
				<div class="wpsg_clear"></div>
			</div>
			<div class="wpsg_form_field">
				<div class="wpsg_form_left">
					<label><?php echo __('Letzte Ausführung des Crons', 'wpsg'); ?>:</label>
				</div>
				<div class="wpsg_form_right">
					<p><?php echo (($this->get_option('wpsg_lastCron') > 0)?wpsg_formatTimestamp($this->get_option('wpsg_lastCron')):__('Noch nicht ausgeführt', 'wpsg')); ?></p>
					<a rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_einstellungen_cron" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_einstellungen_cron"></a>
				</div>
				<div class="wpsg_clear"></div>
			</div>
		</div>
		
		<div id="tabcontent2" class="tabcontent">
		
			<table class="wpsg_mod_videodownload_fieldtable">
				<tr>
					<th class="col_bezeichnung"></th>
					<th class="col_font"><?php echo __('Schriftart', 'wpsg'); ?></th>
					<th class="col_x"><?php echo __('X', 'wpsg'); ?></th>
					<th class="col_y"><?php echo __('Y', 'wpsg'); ?></th>
					<th class="col_align"><?php echo __('Zentriert', 'wpsg'); ?></th>
					<th class="col_color"><?php echo __('Farbe', 'wpsg'); ?></th>
					<th class="col_alpha"><?php echo __('Opaque', 'wpsg'); ?></th>
					<th class="col_angle"><?php echo __('Winkel', 'wpsg'); ?></th>
					<th class="col_groesse"><?php echo __('Größe', 'wpsg'); ?></th>
					<th class="col_action"></th>
				</tr>
				<?php for ($i = 0; $i < 5; $i ++) { ?>				
				<tr>
					<td><?php echo '#'.($i + 1); ?></td>
					<td class="col_font">
						<?php if (!wpsg_isSizedArray($this->view['arFonts'])) { ?>
						<span class="wpsg_error"><?php echo __('Keine Fonts!', 'wpsg'); ?></span>
						<?php } else { ?>
						<select name="text[<?php echo $i; ?>][font]">
							<?php foreach ($this->view['arFonts'] as $font) { ?>
							<option value="<?php echo rawurlencode($font); ?>" <?php echo ((rawurlencode($font) === $this->view['arTexte'][$i]['font'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($font); ?></option>
							<?php } ?>
						</select>
						<?php } ?>
					</td>					
					<td>
						<input type="text" style="width:100%;" name="text[<?php echo $i; ?>][x]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['x']); ?>" />
					</td>
					<td>
						<input type="text" style="width:100%;" name="text[<?php echo $i; ?>][y]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['y']); ?>" />
					</td>
					<td class="col_align">
						<input type="hidden" name="text[<?php echo $i; ?>][align]" value="0" />
						<input type="checkbox" name="text[<?php echo $i; ?>][align]" value="1" <?php echo (($this->view['arTexte'][$i]['align'] == '1')?'checked="checked"':''); ?> />
					</td>
					<td>
						<input type="text" style="width:100%;" name="text[<?php echo $i; ?>][color]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['color']); ?>" />
					</td>
					<td>
						<input type="text" style="width:100%;" name="text[<?php echo $i; ?>][alpha]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['alpha']); ?>" />
					</td>					
					<td>
						<input type="text" style="width:100%;" name="text[<?php echo $i; ?>][angle]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['angle']); ?>" />
					</td>
					<td>
						<select name="text[<?php echo $i; ?>][fontsize]" style="width:100%;">
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "8")?'selected="selected"':''); ?> value="8">8</option>				
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "9")?'selected="selected"':''); ?> value="9">9</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "10")?'selected="selected"':''); ?> value="10">10</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "11")?'selected="selected"':''); ?> value="11">11</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "12")?'selected="selected"':''); ?> value="12">12</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "13")?'selected="selected"':''); ?> value="13">13</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "14")?'selected="selected"':''); ?> value="14">14</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "16")?'selected="selected"':''); ?> value="16">16</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "18")?'selected="selected"':''); ?> value="18">18</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "20")?'selected="selected"':''); ?> value="20">20</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "22")?'selected="selected"':''); ?> value="22">22</option>
							<option <?php echo (($this->view['arTexte'][$i]['fontsize'] == "24")?'selected="selected"':''); ?> value="24">24</option>
						</select>
					</td>
					<td>			
						<label><input type="checkbox" value="1" name="text[<?php echo $i; ?>][aktiv]" <?php echo (($this->view['arTexte'][$i]['aktiv'] == 1)?'checked="checked"':''); ?> />&nbsp;<?php echo __("Aktiv", "wpsg"); ?></label>
						<a style="float:right; position:relative;" class="wpsg_form_help" href="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_fieldconfig" rel="?page=wpsg-Admin&subaction=loadHelp&noheader=1&field=mod_videodownload_fieldconfig"></a>
					</td>
				</tr>
				<tr>
					<td></td>
					<td class="col_freitext_label"><?php echo __('Freitext', 'wpsg'); ?>:</td>
					<td colspan="8" class="col_freitext">
						<input type="text" style="width:100%;" name="text[<?php echo $i; ?>][text]" value="<?php echo wpsg_hspc($this->view['arTexte'][$i]['text']); ?>" />
					</td>
				</tr>
				<?php } ?>
			</table>
			
		</div>
		
		<div id="tabcontent3" class="tabcontent">
		
			<p><?php echo __('Mit dem Videodownload Modul ist es möglich Videos zu verkaufen die pro Bestellung individuell angepasst werden.', 'wpsg'); ?>
		
		</div>
		
	</div>
</div>

<script type="text/javascript">

	function wpsg_mod_videodownload_switchAccepted()
	{

		if (jQuery('#wpsg_mod_videodownload_accepted').val() == '1')
			jQuery('#wpsg_mod_videodownload_downloads').parent().parent().show();
		else
			jQuery('#wpsg_mod_videodownload_downloads').parent().parent().hide();
		
		if (jQuery('#wpsg_mod_videodownload_accepted').val() == '2')
			jQuery('#wpsg_mod_videodownload_days').parent().parent().show();
		else
			jQuery('#wpsg_mod_videodownload_days').parent().parent().hide();
		
	} // function wpsg_mod_videodownload_switchAccepted()

	jQuery(document).ready(function() {
 
		jQuery('#wpsg_mod_videodownload_accepted').bind('change', function() { wpsg_mod_videodownload_switchAccepted(); } );

		wpsg_mod_videodownload_switchAccepted();
		
		jQuery('#wpsg_tab').wpsg_tab( { 
			'cookiename': 'wpsg_videodownload_tab',
			'tab2': function() {
				jQuery('.tablink').show();
			}
		} );
	} );

</script>