parent
b575024cd9
commit
be851d9c66
|
@ -84,6 +84,7 @@ class news {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
$new['content'] = NULL;
|
$new['content'] = NULL;
|
||||||
|
$i = 0;
|
||||||
while (!feof($fp))
|
while (!feof($fp))
|
||||||
{
|
{
|
||||||
$buffer = fgets($fp, 4096);
|
$buffer = fgets($fp, 4096);
|
||||||
|
@ -120,6 +121,7 @@ class news {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
$name = strrchr($path, "/");
|
$name = strrchr($path, "/");
|
||||||
|
$date = array();
|
||||||
for($i=1; $name[$i] != NULL; $i++)
|
for($i=1; $name[$i] != NULL; $i++)
|
||||||
{
|
{
|
||||||
if ($i <= 4)
|
if ($i <= 4)
|
||||||
|
|
|
@ -11,12 +11,17 @@ setlocale(LC_ALL, 'en_EN');
|
||||||
|
|
||||||
$news = new news;
|
$news = new news;
|
||||||
$list = $news->get(10);
|
$list = $news->get(10);
|
||||||
|
|
||||||
|
$lang = "en";
|
||||||
|
if ($_GET['l'])
|
||||||
|
$lang = $_GET['l'];
|
||||||
|
|
||||||
foreach($list as $new)
|
foreach($list as $new)
|
||||||
{
|
{
|
||||||
if (($new = $news->read_content($new)) !== NULL)
|
if (($new = $news->read_content($new)) !== NULL)
|
||||||
{
|
{
|
||||||
echo "<div class='post'>\n";
|
echo "<div class='post'>\n";
|
||||||
echo "<p class='news-title'><a href='p.php?p=news/show&l=".$_GET['l']."&news_id=$new[id]'>".$new['title']."</a></p>";
|
echo "<p class='news-title'><a href='p.php?p=news/show&l=$lang&news_id=$new[id]'>".$new['title']."</a></p>";
|
||||||
echo "<p class='tiny'><a href='mailto:".$new['email']."'>".$new['author']."</a> - ".$new['date']."</p>";
|
echo "<p class='tiny'><a href='mailto:".$new['email']."'>".$new['author']."</a> - ".$new['date']."</p>";
|
||||||
echo "<div class='news-content'>".$new['content']."</div>\n";
|
echo "<div class='news-content'>".$new['content']."</div>\n";
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
|
@ -25,7 +30,7 @@ foreach($list as $new)
|
||||||
|
|
||||||
if ($news->has_archives() == true)
|
if ($news->has_archives() == true)
|
||||||
{
|
{
|
||||||
echo "<p><a href='p.php?p=news/archives&l=".$_GET['l']."' title='Read archives'>News archives</a></p>";
|
echo "<p><a href='p.php?p=news/archives&l=$lang' title='Read archives'>News archives</a></p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -38,7 +38,7 @@ $data = file_get_contents('php://input', NULL, NULL, 0, 64 * 1024);
|
||||||
$lines = explode("\n", $data);
|
$lines = explode("\n", $data);
|
||||||
$linecount = count($lines);
|
$linecount = count($lines);
|
||||||
|
|
||||||
for ($l = 0; $l <= $linecount; $l++)
|
for ($l = 0; $l < $linecount; $l++)
|
||||||
{
|
{
|
||||||
$items = explode(" ", $lines[$l]);
|
$items = explode(" ", $lines[$l]);
|
||||||
$res = "OK";
|
$res = "OK";
|
||||||
|
@ -65,7 +65,7 @@ for ($l = 0; $l <= $linecount; $l++)
|
||||||
$nsv = count($vsv);
|
$nsv = count($vsv);
|
||||||
$num = $ncl;
|
$num = $ncl;
|
||||||
if ($nsv < $num) $num = $nsv;
|
if ($nsv < $num) $num = $nsv;
|
||||||
for ($i = 0; $i <= $num; $i++)
|
for ($i = 0; $i < $num; $i++)
|
||||||
{
|
{
|
||||||
if (intval($vsv[$i]) > intval($vcl[$i]))
|
if (intval($vsv[$i]) > intval($vcl[$i]))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue