Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Jak zmienic kolejnosc wyswietlania sie
Maciekk
post 30.04.2004, 21:31:31
Post #1





Grupa: Zarejestrowani
Postów: 10
Pomógł: 0
Dołączył: 18.07.2003

Ostrzeżenie: (0%)
-----


Mam system newsowy, ale chce zmienic kolejosc wyswietlania sie tych nesow tzn. chce zeby bylo od najstarszego do najnowszego (teraz jest odwrotnie), co musze zmienic w kodzie?

[php:1:e2681f0ec4]<?php
<?
//Magic News Lite v1.2.2
//easy news management
//
//All the rights to this program belong to Reamday Enterprises (http://reamdaysoft.com)
//This is a demo programm to show you the abilities of the programms of Reamday Enterprises
//Professional version with many additional features avaible at http://reamdaysoft.com
//
//BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
//
//However we try to help everybody on our support forum at http://www.webdevelopmenthelp.biz

$script_path = "#%script_path%#";

$NUMBERS = array("0" => "0", "1" => "1", "2" => "2" , "3" => "3", "4" => "5", "5" => "10");

include($script_path . "/config.php");

$ip = $_SERVER["SERVER_ADDR"];
$ref = $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"];

include(dirname($php_script_path) . "/lib.php");

$GLOBALS["smiles"] = new smiles();

$filename = $data_dir . "/sign.data";
$file = fopen($filename, "r");
$GLOBALS["sign"] = fread($file, filesize($filename));
fclose($file);

if ($news_to_show) $limit = $NUMBERS[$news_to_show];
else $limit = 0;

switch ($news_show_period)
{
case 1:
$begin_date = date("Y-m-d");
$end_date = date("Y-m-d");
break;
case 2:
$begin_date = date("Y-m-d");
$end_date = date("Y-m-d", time() - 86400 * date("w"));
break;
case 3:
$begin_date = date("Y-m-d");
$end_date = date("Y-m-d", mktime(0, 0, 0, date("m"), 1, date("Y")));
break;
default:
$begin_date = "";
$end_date = "";
}

$file = fopen($tmpl_dir . "/one.tmpl", "r");
$GLOBALS["otmpl"] = stripslashes(fread($file, filesize($tmpl_dir . "/one.tmpl")));
fclose($file);

$dir = opendir($news_dir);
$names_array = array();
while ($file_name = readdir($dir))
{
if (preg_match("/.sn/", $file_name))
{
$name_list = explode("_", $file_name);
$n_date = $name_list[0] . "-" . $name_list[1] . "-" . $name_list[2];
if (($n_date <= $begin_date) && ($n_date >= $end_date) || (!$begin_date && !$end_date))
{
$f_name_list = explode(".", $file_name);
$names_array[] = $f_name_list[0];
}
}
}
$sort_names_array = $names_array;
rsort($sort_names_array);

eval(d("$9uoZbPZEV7v=v.;$bubCAv=v9uoZb($7u8bPZCfE7PC88CK);VxdAEv(Ad7b($UEK,v$di)v=vEC9x(
7u8bPZCfE7PC88CK)){dmv(($Adfdbv==v.)v||v($Adfdbv!=v.)v&&v($9uoZbPZEV7v]v$Adfdb)){$uZEPZEV7v=vZEVvuZEPZEV7($di);$uZEPZEV7-18EYAC9E();$bfYAv=v$uZEPZEV7-12EbP8ECiKPZEV7();dmv($9uoZbPZEV7v==v$bubCAv-v>v||v$9uoZbPZEV7v==v$Adfdbv-v>)v$bfYAv=vY8E2P8EYAC9E("4]!--v7YAdbv--1[7M<*]!--v7YAdbv--14",v"",v$bfYA);EA7Ev$bfYAv=vY8E2P8EYAC9E("4]!--v7YAdbv--14",v"",v$bfYA);$ZEV7v0=v$bfYA;}EA7Evt8ECU;$9uoZbPZEV7++;}dmv($o8APt8v==v"KE7")v$ZEV7v0=v"]muZbvmC9E=BCxufCv7dzE=>1]t1]Cvx8Em="xbbYR448ECfiCK7umb09uf4fC2d9PZEV7PAdbE0xbfA"vvbC82Eb="PtACZU"1_uVE8EivtKvSC2d9vHEV7v "v0v$ E87duZv0v"]4C1,]t81]Cvx8Em="xbbYR448ECfiCK7umb09uf"vvbC82Eb="PtACZU"1&9uYK;v:ECfiCKveZbEY8d7E7,vg../]4C1]4t1]4muZb1";EA7Ev$ZEV7v0=v"]muZbvmC9E=BCxufCv7dzE=>1]t1]Cvx8Em="xbbYR448ECfiCK7umb09uf4fC2d9PZEV7PAdbE0xbfA"vvbC82Eb="PtACZU"1_uVE8EivtKvSC2d9vHEV7v "v0v$ E87duZv0v"]4C1,v]Cvx8Em="xbbYR448ECfiCK7umb09uf"vvbC82Eb="PtACZU"1&9uYK;v:ECfiCKveZbEY8d7E7,vg../]4C1]4t1]4muZb1";$uobv=vY8E2P7YAdb("48*Z4",v$ZEV7);"));

while (list($key, $rec) = each($out))
{
echo $rec . "n";
}
?>
?>[/php:1:e2681f0ec4]
?>[/php]


--------------------
i co teraz ze mna bedzie?
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 25.07.2025 - 00:46