O to się rozchodzi, polecenie jest takie abym się nauczył jak to zrobic. Nigdy nie ciachałem stronek. Wiec pytam was o szczegóły, piszcie co wam przedstawić z ftp-a, jakie pliki żeby było widomo jak mi pomóc.
Nie działaja mi wasze skrypty
index.php
Kod
<?php
session_start();
$sid = session_id();
require('includes/dbal.php');
require('includes/smarty/Smarty.class.php');
$template = new Smarty();
$lang = addslashes($_GET['lang']);
switch($lang)
{
case 'pl':
case 'en':
$template->assign('config', $lang . '.conf');
break;
default:
if(ereg('pl', $_SERVER['HTTP_ACCEPT_LANGUAGE']))
{
$template->assign('config', 'pl.conf');
$lang = 'pl';
}
else
{
$template->assign('config', 'en.conf');
$lang = 'en';
}
break;
}
require 'includes/config.php';
switch($dir)
{
case '': //strona glowna
$template->assign('site_def', 'main.tpl');
$u_f = get_option('glowna','flash'); //menu
$template->assign('menu', get_option('flash WHERE flash_id="'.$u_f.'"',$url_));
$per_page = get_option('newsy_set', 'per_page_glowna');//newsy
$result = sql('SELECT id, temat, data_pokazania, tresc_wstepna, tresc, link_adres, link_nazwa FROM newsy_'.$lang.' WHERE NOW() BETWEEN data_pokazania AND data_konca_pokazywania ORDER BY id DESC LIMIT ' . $per_page);
$data = array();
while($row = mysql_fetch_array($result))
{
$data[] = $row;
}
$template->assign('news', $data);
if ($lang == 'pl') {$template->assign("tu","Strona główna");} else {$template->assign("tu","Home");}
break;
default: //podstrony
$query = 'podstrony WHERE (url_name_pl="'.$dir.'") OR (url_name_en="'.$dir.'") LIMIT 1';//zawartosc
$template->assign('content', get_option($query, $podstrony_content_));
$template->assign('naglowek', get_option($query, $podstrony_naglowek_));
$template->assign('site_def', 'podstrona.tpl');
$result = sql('SELECT '.$url_.' FROM flash WHERE flash_id ="'.get_option($query, flash).'" LIMIT 1'); //menu
$row = mysql_fetch_row($result);
$template->assign('menu', $row[0]);
$pi[0]["link"] = ""; //tu jestes
$pi[0]["opis"] = get_option($query, $podstrony_naglowek_);
$template->assign("tujestes",$pi);
if ($lang == 'pl') {$template->assign("tu","<a href=\"/pl/\" class=\"tua\">Strona główna</a>");} else {$template->assign("tu","<a href=\"/en/\" class=\"tua\">Home</a>");}
break;
case 'news':
include('includes/news.php');
$u_f = get_option('glowna','flash'); //menu
$template->assign('menu', get_option('flash WHERE flash_id="'.$u_f.'"',$url_));
break;
case 'instrumenty':
case 'instruments':
$u_f = get_option('kategorie_set', 'flash'); //menu
$template->assign('menu', get_option('flash WHERE flash_id="'.$u_f.'"',$url_));
include('includes/kat.php');
break;
case 'portfolio':
include('includes/portfolio.php');
$u_f = get_option('portfolio_set', 'flash'); //menu
$template->assign('menu', get_option('flash WHERE flash_id="'.$u_f.'"',$url_));
break;
}
$self = empty($dir) ? '' : $dir;
$self .= empty($subdir) ? '' : '/' . $subdir;
$self .= empty($item) ? '' : '/' . $item;
$self .= empty($view) ? '' : '/' . $view;
$self .= empty($nr) ? '' : '/' . $nr;
$template->assign('U_SELF', $self);
$template->assign('dir', $dir);
$template->assign('subdir', $subdir);
$template->assign('item', $item);
$template->display('index.tpl');
?>