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
81. a>
82. <div class="text-center fs-14 mb-3">
83. <span class="">
84. <i class="fa-solid fa-user-group">i> {[ echo $odalar->$kapasite; ]}
85. span> |
86.
87. <span class="">
88. <i class="fa-solid fa-money-bill">i>
89. {[
90. echo ($odalar->rezerve == 1 && Price::get($odalar->productID, $yil) > 0)
91. ? ( Lang::get() == "tr" ? Price::getEuro(Price::get($odalar->productID, $yil))."₺ " : "€" . Price::get($odalar->productID, $yil) ). "/" . ML::Select("gecelik")
92. : ML::Select("rezerveye_kapali");
93. ]}
94. span>
95.
96. div>
97. <a class="btn-main w-100" href="{[ echo Shop::urunslug($odalar) ]}">{[ echo ML::select("incele_oda"); ]}a>
98. div>
99. div>
100. div>
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 .= '