Speed roller skating federation Slovenia - ' . $isci . ''; } else echo 'Speed roller skating federation Slovenia - News'; } else { if($naslov != NULL) { $naslov=htmlspecialchars($_GET['naslov']); $naslov=str_replace("_"," ",$naslov); $naslov=str_replace("ch","č",$naslov); $naslov=str_replace("zh","ž",$naslov); $naslov=str_replace("sh","š",$naslov); $naslov=str_replace("Ch","Č",$naslov); $naslov=str_replace("Zh","Ž",$naslov); $naslov=str_replace("Sh","Š",$naslov); $isci=substr($naslov,11); echo 'Zveza za hitrostno rolanje Slovenije - ' . $isci . ''; } else echo 'Zveza za hitrostno rolanje Slovenije - Novice'; } ?> '; echo '
'; echo 'Admin-username:
Admin-password:
'; } echo ' '; echo '



















'; $usrsql="morel"; $pwsql="geslozasql"; //preveri jezik - slovensko //------------------------------------------------------------------------ ENGLISH PAGE ------------------------------------------ if($lang =='2') { // Make a mysql Connection $link=($GLOBALS["___mysqli_ston"] = mysqli_connect("database", "$usrsql", "$pwsql")) or die(mysqli_error($GLOBALS["___mysqli_ston"])); mysqli_select_db($link, 'rolarska-zveza') or die(mysqli_error($GLOBALS["___mysqli_ston"])); //pridobim iz mysqla vse novicke pred tem datumom $arhivstart=intval(htmlspecialchars($_GET['arhivstart'])); $arhivend=intval(htmlspecialchars($_GET['arhivend'])); if($_GET['naslov']) { $naslov=htmlspecialchars($_GET['naslov']); $naslov=str_replace("_"," ",$naslov); $isci=substr($naslov,11); $novica = mysqli_query($link, "SELECT * FROM `newsen` WHERE `naslov` LIKE '$isci' ORDER BY `datum` DESC LIMIT 0 , 5"); $row = mysqli_fetch_array($novica); solonovica($row); } else { if($arhivend==NULL) { $arhivend=4; } if($arhivstart==NULL) { $arhivstart=0; } $novica = mysqli_query($link, "SELECT * FROM `newsen` WHERE `datum` LIKE'20%%-%%-%%' ORDER BY `datum` DESC LIMIT $arhivstart,4"); // cekiram vsako vrstico dokler ne pridem do konca echo '
'; while($row = mysqli_fetch_array($novica)) { // izpis novic po vrsticah echo '

'; echo datum($row['datum']); echo '

'; echo '

'; echo ''; echo $row['naslov']; echo ''; echo '

'; echo '

'; $length=strpos($row['vsebina'],'.',500); if($length==0) $length=500; ++$length; $linky=strpos(substr($row['vsebina'],0,$length),' (more...)'; } else { $findy=strpos(substr($row['vsebina'],$linky),'',40); $length=$length+$findy-19; echo substr($row['vsebina'],0,$length); echo ' (more...)'; } echo '


'; } //Preverjamo stare novice if($arhivend==NULL) { $arhivend=4; } if($arhivstart==NULL) { $arhivstart=0; } echo '
'; echo '

'; $bottom=$arhivstart-4; $novica = mysqli_query($link, "SELECT * FROM `newsen` WHERE `datum` LIKE'2%%%-%%-%%' ORDER BY `datum` DESC LIMIT $bottom,$arhivstart"); $max=mysqli_num_rows($novica); if(!$max) { echo ' '; } else { echo 'Newer news'; } echo '

'; echo '
'; echo '

'; $top=$arhivend+4; $novica = mysqli_query($link, "SELECT * FROM `newsen` WHERE `datum` LIKE'2%%%-%%-%%' ORDER BY `datum` DESC LIMIT $arhivend,$top"); $max=mysqli_num_rows($novica); if(!$max) { echo ' '; } else { echo 'Older news'; } echo '

'; echo '
'; } } else //------------------------------------------------------------------------ SLOVENIAN PAGE ------------------------------------------ { // Make a mysql Connection $link=($GLOBALS["___mysqli_ston"] = mysqli_connect("database", "$usrsql", "$pwsql")) or die(mysqli_error($GLOBALS["___mysqli_ston"])); mysqli_select_db($link, 'rolarska-zveza') or die(mysqli_error($GLOBALS["___mysqli_ston"])); //pridobim iz mysqla vse novicke pred tem datumom $arhivstart=intval(htmlspecialchars($_GET['arhivstart'])); $arhivend=intval(htmlspecialchars($_GET['arhivend'])); if($_GET['naslov']) { $naslov=htmlspecialchars($_GET['naslov']); $naslov=str_replace("_"," ",$naslov); $naslov=str_replace("ch","č",$naslov); $naslov=str_replace("zh","ž",$naslov); $naslov=str_replace("sh","š",$naslov); $naslov=str_replace("Ch","Č",$naslov); $naslov=str_replace("Zh","Ž",$naslov); $naslov=str_replace("Sh","Š",$naslov); $isci=substr($naslov,11); $novica = mysqli_query($link, "SELECT * FROM `news` WHERE `naslov` LIKE '$isci' ORDER BY `datum` DESC LIMIT 0 , 5"); $row = mysqli_fetch_array($novica); solonovica($row); } else { if($arhivend==NULL) { $arhivend=4; } if($arhivstart==NULL) { $arhivstart=0; } $novica = mysqli_query($link, "SELECT * FROM `news` WHERE `datum` LIKE'20%%-%%-%%' ORDER BY `datum` DESC LIMIT $arhivstart,4"); // cekiram vsako vrstico dokler ne pridem do konca echo '
'; while($row = mysqli_fetch_array($novica)) { // izpis novic po vrsticah echo '

'; echo datum($row['datum']); echo '

'; echo '

'; $naslovslo=str_replace(" ","_",$row['naslov']); $naslovslo=str_replace("č","ch",$naslovslo); $naslovslo=str_replace("ž","zh",$naslovslo); $naslovslo=str_replace("š","sh",$naslovslo); $naslovslo=str_replace("Č","Ch",$naslovslo); $naslovslo=str_replace("Ž","Zh",$naslovslo); $naslovslo=str_replace("Š","Sh",$naslovslo); echo ''; echo $row['naslov']; echo ''; echo '

'; echo '

'; $length=strpos($row['vsebina'],'.',400); if($length==0) $length=400; ++$length; $linky=strpos(substr($row['vsebina'],0,$length),' (več...)'; } else { $findy=strpos(substr($row['vsebina'],$linky),'',40); $length=$length+$findy-19; echo substr($row['vsebina'],0,$length); echo ' (več...)'; } echo '


'; } //Preverjamo stare novice if($arhivend==NULL) { $arhivend=4; } if($arhivstart==NULL) { $arhivstart=0; } echo '
'; echo '

'; $bottom=$arhivstart-4; $novica = mysqli_query($link, "SELECT * FROM `news` WHERE `datum` LIKE'2%%%-%%-%%' ORDER BY `datum` DESC LIMIT $bottom,$arhivstart"); $max=mysqli_num_rows($novica); if(!$max) { echo ' '; } else { echo 'Novejše novice'; } echo '

'; echo '
'; echo '

'; $top=$arhivend+4; $novica = mysqli_query($link, "SELECT * FROM `news` WHERE `datum` LIKE'2%%%-%%-%%' ORDER BY `datum` DESC LIMIT $arhivend,$top"); $max=mysqli_num_rows($novica); if(!$max) { echo ' '; } else { echo 'Starejše novice'; } echo '

'; echo '
'; } } echo '
'; ((is_null($___mysqli_res = mysqli_close($link))) ? false : $___mysqli_res); function solonovica($row) { echo '

'; echo datum($row['datum']); echo '

'; echo '

'; echo $row['naslov']; echo '

'; echo '

'; echo $row['vsebina']; } ?>