155. public function __construct(array $config = [])
156. {
157. $this->defaultConfig = Config::default('ZN\Database\DatabaseDefaultConfiguration')
158. ::get('Database', 'database');
159. $this->config = array_merge($this->defaultConfig, $config);
160. $this->db = $this->runDriver();
161. $this->prefix = $this->config['prefix'];
162. Properties::$prefix = $this->prefix;
163.
164. $this->db->connect($this->config);
165. }
166.
167. /**
168. * Magic Debug Info
169. */
170. public function __debugInfo()
171. {
172. return ['return' => $this->stringQuery ?: 'This is a general object, please call the sub method!'];
173. }
174.
1338. */
1339. public function query(string $query, array $secure = [])
1340. {
1341. $secure = $this->secure ?: $secure; $this->secure = [];
1342. $caching = $this->caching; $this->caching = [];
1343. $tableName = $this->tableName; $this->tableName = '';
1344. $jsonDecode = $this->jsonDecode; $this->jsonDecode = [];
1345. $paging = $this->paging ?? 'row'; $this->paging = NULL;
1346.
1347. return (new self($this->config))->setQueryByDriver($query, $secure,
1348. [
1349. 'caching' => $caching,
1350. 'tableName' => $tableName,
1351. 'jsonDecode' => $jsonDecode,
1352. 'paging' => $paging
1353. ]);
1354. }
1355.
1356. /**
1357. * Exec Basic Query
11. public static function get(int $productID, int $year)
12. {
13. $row = DB::query("
14. SELECT rp.price
15. FROM room_prices rp
16. INNER JOIN years y ON y.year_id = rp.year_id
17. WHERE rp.room_id = ?
18. AND y.year = ?
19. LIMIT 1
20. ", [$productID, $year])->row();
21.
22. $price = $row ? (float)$row->price : 0.0;
23. return round($price, 0); // Küsüratsız yuvarla
24. }
25.
26. /**
27. * Euro kuru ile çarpıp yuvarlar
28. *
29. * @param float $price
30. * @return int Yuvarlanmış fiyat
313. <img src="{[ echo URL::Base(UPLOADS_DIR . "products/" . $oda->resim); ]}" class="w-100 rounded-up-100" alt="">
314. <div class="abs hover-op-1 z-4 hover-mt-40 abs-centered">
315. <h2 class="mb-0">{[ echo $oda->$name; ]}h2>
316. {[ if ($oda->rezerve != 0): ]}
317. <div class="fs-14">{[ echo ML::select("fiyat"); ]}div>
318. {[ endif; ]}
319.
320. <h3 class="fs-40 lh-1 mb-4">
321. {[
322. echo ($oda->rezerve == 1 && Price::get($oda->productID, $yil) > 0)
323. ? ( Lang::get() == "tr" ? Price::getEuro(Price::get($oda->productID, $yil))."₺ " : "€" . Price::get($oda->productID, $yil) )
324. : ML::Select("rezerveye_kapali");
325. ]}
326. h3>
327.
328. <a class="btn-slider" href="{[ echo Shop::urunslug($oda) ]}"> {[ echo ML::select("goruntule_buyuk") ]}a>
329. div>
330. <div class="abs bg-color z-2 top-0 w-100 h-100 hover-op-1 rounded-up-100">div>
331. <div class="abs z-2 bottom-0 mb-3 w-100 text-center hover-op-0">
332. <h2 class="mb-0">{[ echo $oda->$name; ]}h2>
1. <div id="wrapper">
2. {[ Import::view('Sections/header'); ]}
3.
4. {[ if (isset($page)) {
5. Import::view($page);
6. } ]}
7.
8. {[ Import::view('Sections/footer'); ]}
9. div>
192.
193. echo $header;
194.
195. $randomPageVariable = $head['bodyPage'] ?? $masterPageSet['bodyPage'];
196.
197. if( ! empty($randomPageVariable) )
198. {
199. $randomDataVariable['view'] = $bodyContent;
200.
201. View::use($randomPageVariable, $randomDataVariable, false, $viewDirectory);
202. }
203. else
204. {
205. echo $bodyContent; // @codeCoverageIgnore
206. }
207.
208. $randomFooterVariable = EOL.''.EOL; 209. $randomFooterVariable .= '