Index-pomoc;)

Witam! Chcialbym prosic o pomoc… a mianowicie zeby mi podal ktos index php taki gotowy co strona juz dziala co ma system logowania itd.poniewaz nie wiem gdzie co wklejac i pozatym chcialbym wiedziec jak to wyglada.:slight_smile:

Thanks from the mountains

Macias:))))))

Na http://www.yoyo.pl jest mozliwosc instalacji jakiegos cmsa na stronie. Zrób sobie taką przykładową np. php fusion i będziesz miał gotowe.

Nie, zle mnie zrozumiales:) ja nie chce instalowac zadnego cms. Strone i podstrony to ja mam tylko chce czyis index SAM INDEX BEZ POD STRON I SZABLONU zeby wiedziec co gdzie wkleic i tyle:)

Thanks:))))

Macias:)))))

<?php

ini_set('session.use_cookies', 1);

session_set_cookie_params(43200);

session_start();

require_once('class.php');

conn();



 $count=5;

 $offset=0;



 if(isset($_GET['news']))$count = $_GET['news'];

 if(isset($_GET['l']))$offset = $count*$_GET['l']; 



 $sql = 'Select count(*) from nius';

 $result = mysql_query($sql);

 $r = mysql_fetch_array($result);


 $pages = ceil($r[0]/$count);



 $sql = 'Select * from nius ORDER BY id DESC Limit '.$count.' offset '.$offset.';';

 $result = mysql_query($sql);




 while(($row=mysql_fetch_array($result))!=NULL){

$tresc .= ''.$row['temat'].'
';

	$tresc .= ''.$row['data'].'   Autor: '.$row['autor'].'

'; 

	$tresc .= ''.$row['tresc'].'';

	$tresc .= '


';

	$tresc .= ' komentarzy ('.ilekoment($row['id'], 1).')';

	$tresc .= '

';


 }


  $tresc .='strona: ';

 for($i=0;$i<$pages;$i++){


 if($i*$count==$offset){

 $il = $i+1;

 $tresc .= ' '.$il.' ';

 }else{

  $il = $i+1;

 $tresc .= ''.$il.' ';

 }

 }





$theme = new template();

$theme->display('templates/default/default');

$theme->replace('{tresc}', ''.$tresc.'');

$theme->return_template();

?>[/code]