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.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
| 1. / 2. / ...
<?php
// ClanSphere 2009 - www.clansphere.net
// Drag0n $
$cs_lang = cs_translate('positionier');
$img_filetypes = array('gif','jpg','png');
$img_filetype = 'gif,jpg und png';
$cs_options = cs_sql_option(__FILE__,'positionier');
if(isset($_POST['submit'])) {
$cs_positionier['positionier_time'] = cs_time();
$cs_positionier['positionier_name'] = $_POST['positionier_name'];
$cs_positionier['positionier_info'] = empty($cs_main['rte_html']) ? $_POST['positionier_info'] : cs_abcode_inhtml($_POST['positionier_info'], 'add');
$cs_positionier['positionier_stich'] = $_POST['positionier_stich'];
$cs_positionier['positionier_nr2304'] = $_POST['positionier_nr2304'];
$cs_positionier['positionier_preis2304'] = $_POST['positionier_preis2304'];
$cs_positionier['positionier_link2304'] = $_POST['positionier_link2304'];
$cs_positionier['positionier_nr4808'] = $_POST['positionier_nr4808'];
$cs_positionier['positionier_preis4808'] = $_POST['positionier_preis4808'];
$cs_positionier['positionier_link4808'] = $_POST['positionier_link4808'];
$cs_positionier['positionier_nr7312'] = $_POST['positionier_nr7312'];
$cs_positionier['positionier_preis7312'] = $_POST['positionier_preis7312'];
$cs_positionier['positionier_link7312'] = $_POST['positionier_link7312'];
$cs_positionier['positionier_nr8625'] = $_POST['positionier_nr8625'];
$cs_positionier['positionier_preis8625'] = $_POST['positionier_preis8625'];
$cs_positionier['positionier_link8625'] = $_POST['positionier_link8625'];
$cs_positionier['positionier_spalte1'] = $_POST['positionier_spalte1'];
$cs_positionier['positionier_spalte2'] = $_POST['positionier_spalte2'];
$cs_positionier['positionier_spalte3'] = $_POST['positionier_spalte3'];
$cs_positionier['positionier_spalte4'] = $_POST['positionier_spalte4'];
$cs_positionier['positionier_spalte5'] = $_POST['positionier_spalte5'];
$cs_positionier['positionier_spalte6'] = $_POST['positionier_spalte6'];
$cs_positionier['positionier_spalte7'] = $_POST['positionier_spalte7'];
$cs_positionier['positionier_spalte8'] = $_POST['positionier_spalte8'];
$cs_positionier['positionier_spalte9'] = $_POST['positionier_spalte9'];
$cs_positionier['positionier_spalte10'] = $_POST['positionier_spalte10'];
$error = 0;
$message = '';
$img_size = getimagesize($_FILES['picture']['tmp_name']);
if(!empty($_FILES['picture']['tmp_name']) AND empty($img_size) OR $img_size[2] > 3) {
$message .= $cs_lang['img_error'] . ' ' . $img_filetype . cs_html_br(1);
$error++;
}
elseif(!empty($_FILES['picture']['tmp_name'])) {
switch($img_size[2]) {
case 1:
$extension = 'gif'; break;
case 2:
$extension = 'jpg'; break;
case 3:
$extension = 'png'; break;
}
if($img_size[0]>$cs_options['max_width']) {
$message .= $cs_lang['too_wide'] . cs_html_br(1);
$error++;
}
if($img_size[1]>$cs_options['max_height']) {
$message .= $cs_lang['too_high'] . cs_html_br(1);
$error++;
}
if($_FILES['picture']['size']>$cs_options['max_size']) {
$message .= $cs_lang['too_big'] . cs_html_br(1);
$error++;
}
}
$img_size2 = getimagesize($_FILES['picture2']['tmp_name']);
if(!empty($_FILES['picture2']['tmp_name']) AND empty($img_size2) OR $img_size2[2] > 3) {
$message .= $cs_lang['img_error_klein'] . ' ' . $img_filetype . cs_html_br(1);
$error++;
}
elseif(!empty($_FILES['picture2']['tmp_name'])) {
switch($img_size2[2]) {
case 1:
$extension = 'gif'; break;
case 2:
$extension = 'jpg'; break;
case 3:
$extension = 'png'; break;
}
if($img_size2[0]>$cs_options['max_width_klein']) {
$message .= $cs_lang['too_wide_klein'] . cs_html_br(1);
$error++;
}
if($img_size2[1]>$cs_options['max_height_klein']) {
$message .= $cs_lang['too_high_klein'] . cs_html_br(1);
$error++;
}
if($_FILES['picture2']['size']>$cs_options['max_size_klein']) {
$message .= $cs_lang['too_big_klein'] . cs_html_br(1);
$error++;
}
}
if(empty($cs_positionier['positionier_name'])) {
$error++;
$message .= $cs_lang['no_name'] . cs_html_br(1);
}
if(empty($cs_positionier['positionier_info'])) {
$error++;
$message .= $cs_lang['no_info'] . cs_html_br(1);
}
if(empty($_FILES['picture2']['tmp_name'])) {
$error++;
$message .= $cs_lang['no_img_klein'] . cs_html_br(1);
}
if(empty($_FILES['picture']['tmp_name'])) {
$error++;
$message .= $cs_lang['no_img'] . cs_html_br(1);
}
$where = "positionier_name = '" . cs_sql_escape($cs_positionier['positionier_name']) . "'";
$search = cs_sql_count(__FILE__,'positionier',$where);
if(!empty($search)) {
$error++;
$message .= $cs_lang['name_exists'] . cs_html_br(1);
}
}
else {
$cs_positionier['positionier_time'] = '';
$cs_positionier['positionier_name'] = '';
$cs_positionier['positionier_info'] = '';
$cs_positionier['positionier_stich'] = '';
$cs_positionier['positionier_nr2304'] = '';
$cs_positionier['positionier_preis2304'] = '';
$cs_positionier['positionier_link2304'] = '';
$cs_positionier['positionier_nr4808'] = '';
$cs_positionier['positionier_preis4808'] = '';
$cs_positionier['positionier_link4808'] = '';
$cs_positionier['positionier_nr7312'] = '';
$cs_positionier['positionier_preis7312'] = '';
$cs_positionier['positionier_link7312'] = '';
$cs_positionier['positionier_nr8625'] = '';
$cs_positionier['positionier_preis8625'] = '';
$cs_positionier['positionier_link8625'] = '';
$cs_positionier['positionier_spalte1'] = '';
$cs_positionier['positionier_spalte2'] = '';
$cs_positionier['positionier_spalte3'] = '';
$cs_positionier['positionier_spalte4'] = '';
$cs_positionier['positionier_spalte5'] = '';
$cs_positionier['positionier_spalte6'] = '';
$cs_positionier['positionier_spalte7'] = '';
$cs_positionier['positionier_spalte8'] = '';
$cs_positionier['positionier_spalte9'] = '';
$cs_positionier['positionier_spalte10'] = '';
}
if(!isset($_POST['submit'])) {
$data['lang']['body'] = $cs_lang['create_body'];
}
if(!empty($error)) {
$data['lang']['body'] = $message;
}
if(!empty($error) OR !isset($_POST['submit'])) {
$data['positionier']['positionier_name'] = $cs_positionier['positionier_name'];
$data['positionier']['positionier_info'] = $cs_positionier['positionier_info'];
$data['positionier']['positionier_stich'] = $cs_positionier['positionier_stich'];
$data['positionier']['positionier_nr2304'] = $cs_positionier['positionier_nr2304'];
$data['positionier']['positionier_preis2304'] = $cs_positionier['positionier_preis2304'];
$data['positionier']['positionier_link2304'] = $cs_positionier['positionier_link2304'];
$data['positionier']['positionier_nr4808'] = $cs_positionier['positionier_nr4808'];
$data['positionier']['positionier_preis4808'] = $cs_positionier['positionier_preis4808'];
$data['positionier']['positionier_link4808'] = $cs_positionier['positionier_link4808'];
$data['positionier']['positionier_nr7312'] = $cs_positionier['positionier_nr7312'];
$data['positionier']['positionier_preis7312'] = $cs_positionier['positionier_preis7312'];
$data['positionier']['positionier_link7312'] = $cs_positionier['positionier_link7312'];
$data['positionier']['positionier_nr8625'] = $cs_positionier['positionier_nr8625'];
$data['positionier']['positionier_preis8625'] = $cs_positionier['positionier_preis8625'];
$data['positionier']['positionier_link8625'] = $cs_positionier['positionier_link8625'];
$data['positionier']['positionier_spalte1'] = $cs_positionier['positionier_spalte1'];
$data['positionier']['positionier_spalte2'] = $cs_positionier['positionier_spalte2'];
$data['positionier']['positionier_spalte3'] = $cs_positionier['positionier_spalte3'];
$data['positionier']['positionier_spalte4'] = $cs_positionier['positionier_spalte4'];
$data['positionier']['positionier_spalte5'] = $cs_positionier['positionier_spalte5'];
$data['positionier']['positionier_spalte6'] = $cs_positionier['positionier_spalte6'];
$data['positionier']['positionier_spalte7'] = $cs_positionier['positionier_spalte7'];
$data['positionier']['positionier_spalte8'] = $cs_positionier['positionier_spalte8'];
$data['positionier']['positionier_spalte9'] = $cs_positionier['positionier_spalte9'];
$data['positionier']['positionier_spalte10'] = $cs_positionier['positionier_spalte10']; |