Changeset 34 for trunk/index.php
- Timestamp:
- Jan 10, 2019, 10:51:57 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r33 r34 237 237 '<input value="'.$_SESSION['location'].'" onkeyup="if(event.keyCode!=9) upf(\'location\',$(this).val(),(event.keyCode==13?0:1)); '. 238 238 '" id="location" autocomplete="off" type="text"/>'. 239 '</div> '; 239 '</div> '; 240 240 $Output .= '<div class="filter-num-box">'. 241 241 '<div class="label-box">Zpráva</div>'. 242 242 '<input value="'.$_SESSION['message'].'" onkeyup="if(event.keyCode!=9) upf(\'message\',$(this).val(),(event.keyCode==13?0:1)); '. 243 243 '" id="message" autocomplete="off" type="text"/>'. 244 '</div> '; 244 '</div> '; 245 245 } 246 246 … … 263 263 $PageList = GetPageList($DbRow[0]); 264 264 265 $Gender = array('', 'Muž', 'Žena'); 265 $Gender = array('', 'Muž', 'Žena'); 266 266 $Output .= '<div id="list_content">'; 267 267 $Output .= $PageList['Output']; … … 304 304 $Output .= '</div>'; 305 305 if (array_key_exists('lvm', $_GET) and ($_GET['lvm'] == 'seznam')) 306 { 306 { 307 307 } 308 308 else … … 313 313 return($Output); 314 314 } 315 315 316 316 function ShowMeetItem() 317 317 { 318 318 $this->Title .= ' - Seznamka - Inzerát'; 319 $Output = ''; 319 $Output = ''; 320 320 if(count($this->PathItems) > 2) 321 321 { … … 341 341 '<tr><th>Email</th><td>'.$MeetItem['Email'].'</td></tr>'. 342 342 '<tr><th>Telefón</th><td>'.$MeetItem['Phone'].'</td></tr>'. 343 '<tr><th>Zpráva</th><td>'.$MeetItem['Message'].'</td></tr>'. 343 '<tr><th>Zpráva</th><td>'.$MeetItem['Message'].'</td></tr>'. 344 344 '<tr><th>Původní web</th><td>'.$Link.'</td></tr>'. 345 345 '<tr><th>Zdroj importu</th><td><a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a></td></tr>'; … … 372 372 if ($MeetItem['Age'] != '') $Description .= '<br/>Věk: '.$MeetItem['Age'].' let'; 373 373 if ($MeetItem['Height'] != '') $Description .= '<br/>Výška: '.$MeetItem['Height'].' cm'; 374 if ($MeetItem['Weight'] != '') $Description .= '<br/>Váha: '.$MeetItem['Weight'].' kg'; 375 $Description .= '<br/>Zdroj importu: <a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a>'; 374 if ($MeetItem['Weight'] != '') $Description .= '<br/>Váha: '.$MeetItem['Weight'].' kg'; 375 $Description .= '<br/>Zdroj importu: <a href="'.$MeetItem['SourceURL'].'">'.$MeetItem['SourceName'].'</a>'; 376 376 $Time = MysqlDateTimeToTime($MeetItem['Time']); 377 $TimeImport = MysqlDateTimeToTime($MeetItem['TimeImport']); 377 $TimeImport = MysqlDateTimeToTime($MeetItem['TimeImport']); 378 378 // Append time part of TimeImport time to item time so new items will appear in correct time order even if item doesn't have time part specified 379 379 if (TimeToMysqlTime($Time) == '00:00:00') … … 408 408 '</head><body>'; 409 409 $Output .= $Content; 410 $Output .= '<div ></div><divclass="footer">Kontakt: <a href="mailto:'.$Config['Contact'].'">'.$Config['Contact'].'</a> '.410 $Output .= '<div class="footer">Kontakt: <a href="mailto:'.$Config['Contact'].'">'.$Config['Contact'].'</a> '. 411 411 '<a href="https://app.zdechov.net/tanec/">Zdrojový kód</a></div>'; 412 412 $Output .= '</body></html>'; 413 413 return($Output); 414 } 415 416 function ShowRobots() 417 { 418 $this->NoFullPage = true; 419 $Result = 'User-agent: *'."\n". 420 'Disallow: /*?'."\n". 421 'Sitemap: '.$this->AbsoluteLink('/sitemap.xml'); 422 return($Result); 423 } 424 425 function ShowSiteMap() 426 { 427 $this->NoFullPage = true; 428 $Urls = array( 429 '/seznamka/', 430 '/skoly/', 431 '/tance/', 432 ); 433 $Result = '<?xml version="1.0" encoding="UTF-8"?>'."\n". 434 '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n"; 435 foreach ($Urls as $Url) 436 { 437 $Result .= '<url>'."\n". 438 ' <loc>'.$this->AbsoluteLink($Url).'</loc>'."\n". 439 //'<lastmod>'..'</lastmod>'."\n". 440 '</url>'."\n"; 441 } 442 // MeetItems 443 $DbResult = $this->Database->query('SELECT `Id`,`Time` FROM `MeetItem`'); 444 while ($DbRow = $DbResult->fetch_array()) 445 { 446 $Url = '/seznamka/inzerat/'.$DbRow['Id']; 447 $Time = MysqlDateTimeToTime($DbRow['Time']); 448 $Result .= '<url>'."\n". 449 ' <loc>'.$this->AbsoluteLink($Url).'</loc>'."\n". 450 ' <lastmod>'.date('c', $Time).'</lastmod>'."\n". 451 '</url>'."\n"; 452 $Result .= '<loc>'.$this->AbsoluteLink($Url).'</loc>'."\n"; 453 } 454 455 $Result .= '</urlset>'; 456 return($Result); 414 457 } 415 458 … … 429 472 430 473 $this->Title = 'Tanec'; 431 $Output = ''; 474 $Output = ''; 432 475 433 476 if(count($this->PathItems) > 0) 434 477 { 435 if($this->PathItems[0] == 'skoly') $Output .= $this->ShowSchoolList(); 478 if($this->PathItems[0] == 'robots.txt') $Output .= $this->ShowRobots(); 479 else if($this->PathItems[0] == 'sitemap.xml') $Output .= $this->ShowSiteMap(); 480 else if($this->PathItems[0] == 'skoly') $Output .= $this->ShowSchoolList(); 436 481 else if($this->PathItems[0] == 'tance') $Output .= $this->ShowDanceList(); 437 482 else if($this->PathItems[0] == 'seznamka') { … … 442 487 else if($this->PathItems[1] == 'inzerat') $Output .= $this->ShowMeetItem(); 443 488 } else $Output .= $this->ShowMeetList(); 444 } 489 } 445 490 else $Output .= $this->ShowDanceList(); 446 491 } else $Output .= $this->ShowDanceList();
Note:
See TracChangeset
for help on using the changeset viewer.