All pastes #374243 Raw Edit

Stuff

public php v1 · immutable
#374243 ·published 2007-02-27 12:31 UTC
rendered paste body
<?php//optymalizacja SEO - prosze nie usuwac!    class Titles     {        var $actView;                function Titles($actView)        {            $this -> actView = $actView;        }         //jako parametry nalezy podac tablice ze slowami oraz dlugosc tytulu, ktory ma sie wygenerowac        function generateTitle($words, $titleLenght)        {            srand($this -> actView);            shuffle($words);                 //oblicz dlugosc title              $wordsOut = array_slice($words, count($wordsOut) -$titleLenght);                 foreach($wordsOut as $key => $phrase)            {                echo ucfirst($phrase);                                if($key < count($wordsOut) - 1)                {                    echo ' ';                 }            }        }        function showTitles($array1)        {                        $this -> generateTitle($array1, 3);                     return true;        }    }    $titles1 = array('maszyny do metali', 'nagrzewnice', 'kompresory', 'obróbka metalu', 'agregaty pr&#261;dotwórcze');    if(!empty($_GET['cPath']))    {        if(is_numeric($_GET['cPath']))        {            $myTitles = new Titles($_GET['cPath']);        }        else        {            $number = explode("_",$_GET['cPath']);            $myTitles = new Titles($number[1]);        }        echo '<title>';        $myTitles -> showTitles($titles1);        echo ' - Centromet</title>';    }    else    {        echo '<title>Agregaty pr&#261;dotwórcze Kompresory Nagrzewnice - Centromet';    }?>