Browse code

Initial commit

Benjamin Roth authored on16/03/2023 20:22:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,222 @@
1
+<?php
2
+global $objPage;
3
+// Meta Angaben
4
+$objPage->title = $this->ad['name'];
5
+$description = strip_tags(str_replace('</p>',' ',$this->ad['htmlDescription']));
6
+$objPage->description = \Contao\StringUtil::substrHtml($description, 320);
7
+$text = $objPage->title.' '.$objPage->description;
8
+preg_match_all("/[a-z0-9\-]{4,}/i", $text, $matches);
9
+$GLOBALS['TL_KEYWORDS']=join(',', $matches[0]);
10
+?>
11
+
12
+<!--[if IE 7]>
13
+<link rel="stylesheet" href=/vendor/fontello/css/fontello-ie7.css"><![endif]-->
14
+<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?>
15
+  style="<?php echo $this->style; ?>"<?php endif; ?>>
16
+
17
+  <?php if ($this->headline): ?>
18
+    <<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
19
+  <?php endif; ?>
20
+
21
+  <div class="md-detail">
22
+    <a href="javascript:history.back();" class="back top"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['back'] ?></a>
23
+    <div class="md-detail-header">
24
+      <i class="icon-cab"></i>
25
+      <h1><?= $this->ad['name'] ?></h1>
26
+      <span class="price">
27
+        <?= \System::getFormattedNumber($this->ad['consumer_price_amount'], 2).' '.$this->ad['price_currency']; ?>
28
+        <?php if($this->ad['pseudo_price'] != '' && $this->ad['pseudo_price'] != 0): ?><span class="pseudo-price"><?= \System::getFormattedNumber($this->ad['pseudo_price'], 2).' '.$this->ad['price_currency']; ?></span><?php endif; ?>
29
+      </span>
30
+    </div>
31
+    <div class="md-detail-content">
32
+      <div class="md-detail-left">
33
+        <div class="ce_sliderStart block">
34
+          <div class="content-slider" data-config="4000,300,0,1">
35
+            <div class="slider-wrapper">
36
+              <?php if($this->ad['images'] && isset($this->ad['images']['XXL'])): ?>
37
+              <?php foreach($this->ad['images']['XXL'] as $key => $img): ?>
38
+                <div class="slide"><img src="<?= $img ?>"/></div>
39
+              <?php endforeach; ?>
40
+              <?php endif; ?>
41
+            </div>
42
+          </div>
43
+          <nav class="slider-control">
44
+            <a href="#" class="slider-prev"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['prev'] ?></a>
45
+            <span class="slider-menu"></span>
46
+            <a href="#" class="slider-next"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['next'] ?></a>
47
+          </nav>
48
+        </div>
49
+        <div class="md-detail-description">
50
+          <h2><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['headline-description'] ?></h2>
51
+          <?php if (isset($this->ad['vehicle_free_text'])): ?>
52
+            <?= $this->ad['vehicle_free_text'] ?>
53
+          <?php else: ?>
54
+            <?= $this->ad['htmlDescription'] ?>
55
+          <?php endif; ?>
56
+        </div>
57
+        <h2><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['headline-specifics'] ?></h2>
58
+        <div class="md-detail-box additional-attributes">
59
+          <ul class="detail-list">
60
+            <?php if($this->ad['fuelConsumption']): ?>
61
+              <?php foreach($this->ad['fuelConsumption'] as $key=>$feature): ?>
62
+                <?php if($feature['value'] != ''): ?>
63
+                  <li class="feature-<?= $key ?>"><span class="label"><?= $feature['label'] ?></span><span class="value"><?= $feature['value'] ?></span>
64
+                </li>
65
+                <?php endif; ?>
66
+              <?php endforeach; ?>
67
+            <?php endif; ?>
68
+
69
+            <?php if (isset($this->ad['fuelConsumptionSE'])): ?>
70
+            <li class="feature-fuel"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['consumption'] ?></span><span class="value">
71
+              <?php if($this->ad['fuelConsumptionSE']['combined']): ?>≈ <?= $this->ad['fuelConsumptionSE']['combined'] ?> l/100 km (kombiniert) <?php endif; ?>
72
+              <?php if($this->ad['fuelConsumptionSE']['outer']): ?>≈ <?= $this->ad['fuelConsumptionSE']['outer'] ?> l/100 km (außerorts) <?php endif; ?>
73
+              <?php if($this->ad['fuelConsumptionSE']['inner']): ?>≈ <?= $this->ad['fuelConsumptionSE']['inner'] ?> l/100 km (innerorts) <?php endif; ?>
74
+              </span></li>
75
+            <?php endif; ?>
76
+
77
+            <?php if(isset($this->ad['specifics'])): ?>
78
+            <?php foreach($this->ad['specifics'] as $key=>$feature): ?>
79
+            <li class="specifics-<?= $feature['key'] ?>">
80
+                <span class="label"><?= $feature['label'] ?></span><span class="value"><?= $feature['value'] ?></span>
81
+            </li>
82
+            <?php endforeach; ?>
83
+            <?php endif; ?>
84
+          </ul>
85
+        </div>
86
+
87
+        <?php $class = $this->ad['emission_fuel_consumption_energy_efficiency_class']; ?>
88
+        <?php if($class != ''): ?>
89
+          <div class="energy-class-label">
90
+            <div class="left-col">
91
+              <div class="label">CO-2-Effizienz</div>
92
+              <div class="description">*Auf der Grundlage der gemessenen CO-2 Emissionen unter Berücksichtigung der Masse des Fahrzeugs ermittelt.</div>
93
+            </div>
94
+            <div class="right-col">
95
+              <div class="energy-class class-a-plus<?php if($class == 'A+'): ?> active<?php endif; ?>"><span>A+</span></div>
96
+              <div class="energy-class class-a<?php if($class == 'A'): ?> active<?php endif; ?>"><span>A</span></div>
97
+              <div class="energy-class class-b<?php if($class == 'B'): ?> active<?php endif; ?>"><span>B</span></div>
98
+              <div class="energy-class class-c<?php if($class == 'C'): ?> active<?php endif; ?>"><span>C</span></div>
99
+              <div class="energy-class class-d<?php if($class == 'D'): ?> active<?php endif; ?>"><span>D</span></div>
100
+              <div class="energy-class class-e<?php if($class == 'E'): ?> active<?php endif; ?>"><span>E</span></div>
101
+              <div class="energy-class class-f<?php if($class == 'F'): ?> active<?php endif; ?>"><span>F</span></div>
102
+              <div class="energy-class class-g<?php if($class == 'G'): ?> active<?php endif; ?>"><span>G</span></div>
103
+            </div>
104
+          </div>
105
+        <?php endif; ?>
106
+
107
+        <h2><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['headline-features'] ?></h2>
108
+        <div class="md-detail-box additional-attributes features">
109
+          <ul class="detail-list">
110
+            <?php if($this->ad['features']): ?>
111
+            <?php foreach($this->ad['features'] as $key=>$feature): ?>
112
+            <li><span class="value"><i class="icon-ok" title="Feature"></i> <?= $feature['value'] ?></span></li>
113
+            <?php endforeach; ?>
114
+            <?php endif; ?>
115
+          </ul>
116
+        </div>
117
+      </div>
118
+      <div class="md-detail-right">
119
+        <div class="md-detail-box additional-attributes">
120
+          <h2><i class="icon-cab"></i> <?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['headline-technical-specifics'] ?></h2>
121
+          <ul class="detail-list">
122
+            <?php if($this->ad['vehicle_make']): ?>
123
+            <li class="attr-vehicle_make"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['make'] ?></span><span class="value"><?= $this->ad['vehicle_make'] ?></span></li>
124
+            <?php endif; ?>
125
+            <?php if($this->ad['specifics_exterior_color']): ?>
126
+            <li class="attr-exterior_color"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['exterior-color'] ?></span><span class="value"><?= $GLOBALS['TL_LANG']['tl_vehicle']['specifics_exterior_color']['options'][$this->ad['specifics_exterior_color']] ?></span>
127
+            </li>
128
+            <?php endif; ?>
129
+            <?php if($this->ad['specifics_first_registration']): ?>
130
+            <li class="attr-first_registration"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['first-registration'] ?></span><span class="value"><?= $this->
131
+              ad['specifics_first_registration'] ?></span></li>
132
+            <?php endif; ?>
133
+            <?php if($this->ad['specifics_mileage']): ?>
134
+            <li class="attr-mileage"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['mileage'] ?></span><span class="value"><?= \System::getFormattedNumber($this->ad['specifics_mileage'],0) ?></span>
135
+            </li>
136
+            <?php endif; ?>
137
+            <?php if($this->ad['specifics_fuel']): ?>
138
+            <li class="attr-fuel"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['fuel-type'] ?></span><span class="value"><?= $GLOBALS['TL_LANG']['tl_vehicle']['specifics_fuel']['options'][$this->ad['specifics_fuel']] ?></span>
139
+            </li>
140
+            <?php endif; ?>
141
+            <?php if($this->ad['specifics_power']): ?>
142
+            <li class="attr-power"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['power'] ?></span><span class="value"><?= $this->ad['specifics_power'] ?></span></li>
143
+            <?php endif; ?>
144
+            <?php if($this->ad['specifics_condition']): ?>
145
+            <li class="attr-condition"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['condition-type'] ?></span><span class="value"><?= $GLOBALS['TL_LANG']['tl_vehicle']['specifics_condition']['options'][$this->
146
+              ad['specifics_condition']] ?></span></li>
147
+            <?php endif; ?>
148
+            <?php if($this->ad['specifics_usage_type']): ?>
149
+            <li class="attr-usage_type"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['usage-type'] ?></span><span class="value"><?= $GLOBALS['TL_LANG']['tl_vehicle']['specifics_usage_type']['options'][$this->ad['specifics_usage_type']] ?></span></li>
150
+            <?php endif; ?>
151
+            <?php if($this->ad['bodyType']): ?>
152
+            <li class="attr-bodyType"><span class="label"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['body-type'] ?></span><span class="value"><?= $this->ad['bodyType'] ?></span></li>
153
+            <?php endif; ?>
154
+          </ul>
155
+        </div>
156
+
157
+        <?php if (isset($this->ad['seller'])): ?>
158
+        <div class="md-detail-box additional-contact">
159
+          <h2><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['headline-seller'] ?></h2>
160
+          <?php if($this->ad['seller']['company-name']['value'] != ""): ?>
161
+          <p><strong><?= $this->ad['seller']['company-name']['value'] ?></strong></p>
162
+          <?php endif; ?>
163
+          <?php if($this->ad['seller']['logo-image']): ?>
164
+          <?php $i = 0; foreach($this->ad['seller']['logo-image'] as $logoImage): ?>
165
+          <?php if($i == 0): ?>
166
+          <p><img src="<?= $logoImage['url'] ?>" alt="Verkäufer Logo"></p>
167
+          <?php endif; ?>
168
+          <?php $i++; endforeach; ?>
169
+          <p><strong><?= $this->ad['seller']['company-name']['value'] ?></strong><br>
170
+            <?php endif; ?>
171
+            <?= $this->ad['seller']['address']['street']['value'] ?><br>
172
+            <?= $this->ad['seller']['address']['zipcode']['value'] ?> <?= $this->ad['seller']['address']['city']['value']
173
+            ?></p>
174
+          <p>
175
+            <?php if($this->ad['seller']['phone']['value'] != ""): ?>
176
+            <i class="icon-phone" title="Telefon"></i><?= $this->ad['seller']['phone']['value'] ?><br>
177
+            <?php endif; ?>
178
+            <?php if($this->ad['seller']['email']['value'] != ""): ?>
179
+            <i class="icon-mail" title="E-Mail"></i> <a href="<?= $this->ad['seller']['email']['value'] ?>"><?= $this->
180
+            ad['seller']['email']['value'] ?></a><br>
181
+            <?php endif; ?>
182
+            <?php if($this->ad['seller']['homepage']['value'] != ""): ?>
183
+            <i class="icon-globe" title="Web"></i> <a href="<?= $this->ad['seller']['homepage']['value'] ?>"
184
+                                                      target="_blank"><?= $this->ad['seller']['homepage']['value'] ?></a>
185
+            <?php endif; ?>
186
+
187
+            <?php if($this->ad['seller']['mobile-seller-since']['value'] != ""): ?>
188
+          <p><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['seller-since'] ?> <?= date($GLOBALS['TL_CONFIG']['dateFormat'] ,strtotime($this->ad['seller']['mobile-seller-since']['value'])) ?></p>
189
+          <?php endif; ?>
190
+          </p>
191
+        </div>
192
+        <?php endif; ?>
193
+
194
+        <div class="md-detail-box additional-form">
195
+          <h2><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['headline-contact-form'] ?></h2>
196
+          {{insert_form::6}}
197
+        </div>
198
+      </div>
199
+    </div>
200
+    <div class="md-detail-footer">
201
+      <?php if($this->prevAd): ?>
202
+      <span class="prevAd"><a href="<?php echo $this->prevAd['href']; ?>">&laquo; <?php echo $this->
203
+        prevAd['title']; ?></a></span>
204
+      <?php endif; ?>
205
+      <?php if($this->nextAd): ?>
206
+      <span class="nextAd"><a href="<?php echo $this->nextAd['href']; ?>"><?php echo $this->
207
+        nextAd['title']; ?> &raquo;</a></span>
208
+      <?php endif; ?>
209
+    </div>
210
+    <a href="javascript:history.back();" class="back bottom"><?= $GLOBALS['TL_LANG']['pdirMobileDe']['field_keys']['back'] ?></a>
211
+  </div>
212
+</div>
213
+
214
+<?php if($this->debug): ?>
215
+<div>
216
+  <h2>DEBUG:</h2>
217
+  Modulversion: <?= $this->version ?><br>
218
+  HändlerID: <?= $this->customer ?><br><br>
219
+  RawData<br>
220
+  <pre><?php print_r($this->ad); ?></pre>
221
+</div>
222
+<?php endif; ?>