Yangi formatda davom etish uchun: https://uzfor.net/view.php?id=736&page=51
Johncms bo'yicha umumiy savollar
Mavzu fayllari (121)
Xabarlar
Bekmurod, Salom shu kodda ozgina xatolik ketibdi shuni to'g'rlab bering ma masalan kecha soat 01:10 ni ham 27 -martga yozilgan buni menimcha 28-mart qilishi kerak edi bugun yozdim 07:53 uni 28-martga yozdi menimcha soat 12 dan o'timi uni boshqa kunga yozishi kerak shunga yordam bering namuna http://fcb.su
Biriktirilgan fayllar [1]:
— screenshot_2018-03-28-07-57-29.png (207.31 KB) (143 ↴)
— screenshot_2018-03-28-07-57-29.png (207.31 KB) (143 ↴)
Bekmurod, Salom, yuqorida newsni sana bilan ajratish kodi bor ekan o'shani qildim o'xshamayapdi. Shuni qanday o'rnatadi yordam bervoring! Rahmat oldindan.
DjHuSo, # DjHuSo (28.03.2018 / 10:26)
Ajalbek,
if($vaqtc != date('d', $res['time']))
echo'<div align="center">'.
functions::display_soat($res['time']).'</div>';
$vaqtc = date('d', $res['time']);Buni krite news dagi yangiliklarni chiqaruvchi kodga qo'ysam umuman hechnima yo'q. Qanday o'rnatishni o'rgating. Iloji bo'lsa zip fayl bormi? Oldindan rahmat
Ajalbek,
if($vaqtc != date('d', $res['time']))
echo'<div align="center">'.
functions::display_soat($res['time']).'</div>';
$vaqtc = date('d', $res['time']);Buni krite news dagi yangiliklarni chiqaruvchi kodga qo'ysam umuman hechnima yo'q. Qanday o'rnatishni o'rgating. Iloji bo'lsa zip fayl bormi? Oldindan rahmat
DjHuSo, <?php
echo '<div class="phdr"><center>Kun yangiliklari</center></div>';
echo '<div class="menu">';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news`"), 0);
if( $total) {
$req = mysql_query("SELECT `id`, `name`, `text`, `time`, `reads` FROM `cms_news` ORDER BY `time` DESC LIMIT 15");
$i = 1;
while (( $row = mysql_fetch_assoc($req)) !== false) {
$comm = mysql_result(mysql_query("select count(*) from `cms_news_comments` where `refid` = '".$row['id']."'"), 0);
if( file_exists('files/news/small_news_' . $row['id'] . '.jpg') !== false) {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '">';
echo '<img src="/ico/feed.png">';
echo ' ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
} else {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '"><img src="/ico/feed.png"> ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
}
if( $row['time'] > time())
//echo '<p>' . $lng_news['begin_show_through'] . ': ' . timer($row['time'] - time()) . '</p>';
++ $i;
}
} else {
echo '<div class="rmenu">Yangiliklar yo`q</div>';
}
echo '<div style="text-align: right;"><span class="currentpage"><b>1</b></span> <a class="pagenav" href="/news/news.php?page=2">2</a> <a class="pagenav" href="/news/news.php?page=3">3</a> <a class="pagenav" href="/news/news.php?page=4">4</a> <a class="pagenav" href="/news/news.php?page=5">5</a> <a class="pagenav" href="/news/news.php?page=2">»</a></div></div>';
?>
echo '<div class="phdr"><center>Kun yangiliklari</center></div>';
echo '<div class="menu">';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news`"), 0);
if( $total) {
$req = mysql_query("SELECT `id`, `name`, `text`, `time`, `reads` FROM `cms_news` ORDER BY `time` DESC LIMIT 15");
$i = 1;
while (( $row = mysql_fetch_assoc($req)) !== false) {
$comm = mysql_result(mysql_query("select count(*) from `cms_news_comments` where `refid` = '".$row['id']."'"), 0);
if( file_exists('files/news/small_news_' . $row['id'] . '.jpg') !== false) {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '">';
echo '<img src="/ico/feed.png">';
echo ' ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
} else {
echo '<a href="../news/index.php?act=view&id=' . $row['id'] . '"><img src="/ico/feed.png"> ' . htmlentities($row['name'], ENT_QUOTES, 'UTF-8') . '</a><hr>';
}
if( $row['time'] > time())
//echo '<p>' . $lng_news['begin_show_through'] . ': ' . timer($row['time'] - time()) . '</p>';
++ $i;
}
} else {
echo '<div class="rmenu">Yangiliklar yo`q</div>';
}
echo '<div style="text-align: right;"><span class="currentpage"><b>1</b></span> <a class="pagenav" href="/news/news.php?page=2">2</a> <a class="pagenav" href="/news/news.php?page=3">3</a> <a class="pagenav" href="/news/news.php?page=4">4</a> <a class="pagenav" href="/news/news.php?page=5">5</a> <a class="pagenav" href="/news/news.php?page=2">»</a></div></div>';
?>
DjHuSo, shunaqa qib ko'ringchi.
Date('d',time()) bunda kun tartib raqammi lekin 05 yoki 16 deb ko'rsatadi.
Date('j',time()) bo'lsa oldinda nolsiz 5 qib ko'rsatadi.
http://php.net/manual/ru/function.date.php
echo'<div align="center">'. functions::display_soat($res['time']).'</div>';
Date('d',time()) bunda kun tartib raqammi lekin 05 yoki 16 deb ko'rsatadi.
Date('j',time()) bo'lsa oldinda nolsiz 5 qib ko'rsatadi.
http://php.net/manual/ru/function.date.php
DjHuSo, # DjHuSo (28.03.2018 / 08:02)
Bekmurod, Salom shu kodda ozgina xatolik ketibdi shuni to'g'rlab bering ma masalan kecha soat 01:10 ni ham 27 -martga yozilgan buni menimcha 28-mart qilishi kerak edi bugun yozdim 07:53 uni 28-martga kod server vaqti bilan ko'rsatadi ya'i uzb vaqtidan 2 soat oldin, sayt vaqti blan tenglashtirishingiz kerak kodni
Bekmurod, Salom shu kodda ozgina xatolik ketibdi shuni to'g'rlab bering ma masalan kecha soat 01:10 ni ham 27 -martga yozilgan buni menimcha 28-mart qilishi kerak edi bugun yozdim 07:53 uni 28-martga kod server vaqti bilan ko'rsatadi ya'i uzb vaqtidan 2 soat oldin, sayt vaqti blan tenglashtirishingiz kerak kodni
DjHuSo, # DjHuSo (28.03.2018 / 21:25)
Bekmurod, Barbir o'xshamadi!/incfiles/core.php ning tepa qismi
ga mana bu kod yozing
kegin saytning admin panelda vaqtni sozlang.
Bekmurod, Barbir o'xshamadi!/incfiles/core.php ning tepa qismi
ga mana bu kod yozing
kegin saytning admin panelda vaqtni sozlang.
Salom. Krite newsda yangilik pastiga mavzuga oid qo'shimcha o'xshash 3ta yangilik chiqarish uchun qanaqa kod kere aytib yuborilar. Men topolmadim
DjHuSo, shu kodi ichiga shu yozgan kodizi qo’yib berolasmi iltmos
<?php
/*
////////////////////////////////////////////////////////////////////////////////
// JohnCMS //
// Официальный сайт сайт проекта: http://johncms.com //
// Дополнительный сайт поддержки: http://gazenwagen.com //
////////////////////////////////////////////////////////////////////////////////
// JohnCMS core team: //
// Евгений Рябинин aka john77 john77@johncms.com //
// Олег Касьянов aka AlkatraZ alkatraz@johncms.com //
// //
// Информацию о версиях смотрите в прилагаемом файле version.txt //
////////////////////////////////////////////////////////////////////////////////
*/
defined('_IN_JOHNCMS') or die('Error: restricted access');
if(empty($_SESSION['error']))
$_SESSION['error'] = '';
//Функция отображения рейтинга
function rating($id, $type = 0) {
if(!$id)
return '<img class="ico" src="../images/stars/stars_5.gif" alt="0" />';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news_rating` WHERE `news`='$id'"), 0);
if($total) {
$query = mysql_query("SELECT `golos`, COUNT(*) as `count` FROM `cms_news_rating` WHERE `news`='$id' GROUP BY `golos`");
$array['plus'] = 0;
$array['minus'] = 0;
while (($row = mysql_fetch_assoc($query)) !== false) {
if(isset($row['golos']) && $row['golos'] == 1) $array['plus'] = $row['count'];
else if(isset($row['golos']) && $row['golos'] == 2) $array['minus'] = $row['count'];
else {
$array['plus'] = 0;
$array['minus'] = 0;
}
}
if($array['plus'] > $array['minus']) {
if($array['minus'] == 0) {
if($array['plus'] == 1) $count = 60;
else if($array['plus'] == 2) $count = 60;
else if($array['plus'] == 3) $count = 60;
else if($array['plus'] == 4) $count = 70;
else if($array['plus'] == 5) $count = 70;
else if($array['plus'] == 6) $count = 80;
else if($array['plus'] == 7) $count = 80;
else if($array['plus'] == 8) $count = 90;
else if($array['plus'] == 9) $count = 90;
else if($array['plus'] >= 10) $count = 100;
} else {
$count = round($array['minus'] / $array['plus'], 1) * 100;
if($count == 0) $count = 100;
else $count = (100 - $count);
}
} else if($array['plus'] < $array['minus']) {
if($array['plus'] == 0) {
if($array['minus'] == 1) $count = 40;
else if($array['minus'] == 2) $count = 40;
else if($array['minus'] == 3) $count = 40;
else if($array['minus'] == 4) $count = 30;
else if($array['minus'] == 5) $count = 30;
else if($array['minus'] == 6) $count = 20;
else if($array['minus'] == 7) $count = 20;
else if($array['minus'] == 8) $count = 10;
else if($array['minus'] == 9) $count = 10;
else if($array['minus'] >= 10) $count = 0;
} else {
$pr = (round($array['plus'] / $array['minus'], 1) * 100);
$count = $pr;
}
} else
$count = 50;
$percent = $count;
if($percent == 100) $stars = 10;
else if($percent < 100 && $percent >= 90) $stars = 9;
else if($percent < 100 && $percent >= 90) $stars = 9;
else if($percent < 90 && $percent >= 80) $stars = 8;
else if($percent < 80 && $percent >= 70) $stars = 7;
else if($percent < 70 && $percent >= 60) $stars = 6;
else if($percent < 60 && $percent >= 50) $stars = 5;
else if($percent < 50 && $percent >= 40) $stars = 4;
else if($percent < 40 && $percent >= 30) $stars = 3;
else if($percent < 30 && $percent >= 20) $stars = 2;
else if($percent < 20 && $percent >= 10) $stars = 2;
else if($percent < 10 && $percent > 0) $stars = 1;
else if($percent == 0) $stars = 0;
if($type == 0) return '<img class="ico" src="../images/stars/stars_'.$stars.'.gif" alt="•" />';
else return $percent;
} else return '<img class="ico" src="../images/stars/stars_5.gif" alt="•" />';
}
if($id) {
$query = mysql_query("SELECT `cms_news`.*, `cms_news_cat`.`name` as `catname`, `cms_news_cat`.`id` as `catid` FROM `cms_news` LEFT JOIN `cms_news_cat` ON `cms_news`.`refid`=`cms_news_cat`.`id` WHERE `cms_news`.`id`='$id'".($rights < 6 ? " AND `cms_news`.`time`<='" . time() . "'":"")." LIMIT 1;");
if (mysql_num_rows($query)) {
//Показываем новость
$res1 = mysql_fetch_assoc($query);
$textl = htmlentities($res1['name'], ENT_QUOTES, 'UTF-8');
require_once('../incfiles/head.php');
echo '<div class="header">' . htmlentities($res1['name'], ENT_QUOTES, 'UTF-8') . '</div>';
$ncount = mysql_fetch_array(mysql_query("SELECT * FROM `cms_news` WHERE `id` ='$id'"));
if (!isset($_SESSION['cms_news']) || isset($_SESSION['cms_news'])&&$_SESSION['cms_news'] != $id) {
$_SESSION['cms_news'] = $id;
$newscount = intval($ncount['count']) + 3;
mysql_query("UPDATE `cms_news` SET `count` ='$newscount'WHERE `id` ='$id'");
}
//Выводим автора новости
$us = mysql_query("SELECT `id`, `imname` FROM `users` WHERE `id` = '{$res1['user_id']}'");
if (mysql_num_rows($us)) {
$rowuse = mysql_fetch_assoc($us);
$name_use = $user_id ? '<a href="../users/profile.php?user=' . $rowuse['id'] . '">' . $rowuse['imname'] . '</a>' : $rowuse['imname'];
} else {
$name_use = $lng['guest'];
}
echo '<div class="news1" style="color:#000000;"><font style="color: #696969"><img style="vertical-align: middle ! important;" src="/news/images/add.png" alt="."> Qo‘shdi: ' . $name_use . '</br><img style="vertical-align: middle ! important;" src="/news/images/date.png" alt="."> ' . date('d.m.o, H:i', $res1['time'] + (core::$system_set['timeshift'] + core::$user_set['timeshift']) * 3600) . ' – <img style="vertical-align: middle ! important;" src="/news/images/update.png" alt="."> '. $ncount['count'] .'</font><br/>';
//Выводим картинку
if(file_exists('../files/news/news_' . $id . '.jpg') !== false) echo '<img class="posts" src="/files/news/news_' . $id . '.jpg" alt="."><br />';
$text = functions::checkout($res1['text'], 1, 1);
if ($set_user['smileys'])
$text = functions::smileys($text);
echo $text;
echo '<div style="clear:both;"></div>';
//Обрабатываем голосование
if(isset($_POST['plus_x']) || isset($_POST['plus_y'])) {
if($res1['user_id'] == $user_id) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['my_vote'] . '!</div>';
} else {
$plus = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news_rating` WHERE `news`='$id' AND `user_id`='$user_id' LIMIT 1;"), 0);
if($plus) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['already_voted'] . '!</div>';
} else {
mysql_query("INSERT INTO `cms_news_rating` SET
`news`='$id',
`user_id`='$user_id', `golos`='1';");
$_SESSION['error'] = '<div class="list1 green">' . $lng_news['ok_vote'] . '!</div>';
}
}
Header('Location: index.php?act=view&id=' . $id);
exit;
} else if(isset($_POST['minus_x']) || isset($_POST['minus_y'])) {
if($res1['user_id'] == $user_id) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['my_vote'] . '!</div>';
} else {
$plus = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news_rating` WHERE `news`='$id' AND `user_id`='$user_id' LIMIT 1;"), 0);
if($plus) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['already_voted'] . '!</div>';
} else {
mysql_query("INSERT INTO `cms_news_rating` SET
`news`='$id',
`user_id`='$user_id', `golos`='2';");
$_SESSION['error'] = '<div class="list1 green">' . $lng_news['ok_vote'] . '!</div>';
}
}
Header('Location: index.php?act=view&id=' . $id);
exit;
}
//Сообщение об оставленном голосе
echo $_SESSION['error'];
echo '</div>';
if (!$user_id){
echo '<div class="phdr"><b>Fikrlar</b></div><div class="rmenu">Fikr bildirish uchun saytimizdan ro‘yxatdan o‘tishingiz kerak.</div>';
}
include 'comments2.php';
echo '
' . ($rights >= 6 ? '<div class="menu"><div class="func">
<a href="../panel/index.php?act=news&mod=newsedit&id=' . $id . '">' . $lng['edit'] . '</a><br />
<a href="../panel/index.php?act=news&mod=delnews&id=' . $id . '">' . $lng['delete'] . '</a><br />
</div></div>':'') . '
';
} else {
$textl = $lng['news'];
require_once('../incfiles/head.php');
echo functions::display_error($lng_news['news_does_not_exist']);
}
} else {
$textl = $lng['news'];
require_once('../incfiles/head.php');
echo functions::display_error($lng_news['news_is_not_chose']);
}
unset($_SESSION['error']);
<?php
/*
////////////////////////////////////////////////////////////////////////////////
// JohnCMS //
// Официальный сайт сайт проекта: http://johncms.com //
// Дополнительный сайт поддержки: http://gazenwagen.com //
////////////////////////////////////////////////////////////////////////////////
// JohnCMS core team: //
// Евгений Рябинин aka john77 john77@johncms.com //
// Олег Касьянов aka AlkatraZ alkatraz@johncms.com //
// //
// Информацию о версиях смотрите в прилагаемом файле version.txt //
////////////////////////////////////////////////////////////////////////////////
*/
defined('_IN_JOHNCMS') or die('Error: restricted access');
if(empty($_SESSION['error']))
$_SESSION['error'] = '';
//Функция отображения рейтинга
function rating($id, $type = 0) {
if(!$id)
return '<img class="ico" src="../images/stars/stars_5.gif" alt="0" />';
$total = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news_rating` WHERE `news`='$id'"), 0);
if($total) {
$query = mysql_query("SELECT `golos`, COUNT(*) as `count` FROM `cms_news_rating` WHERE `news`='$id' GROUP BY `golos`");
$array['plus'] = 0;
$array['minus'] = 0;
while (($row = mysql_fetch_assoc($query)) !== false) {
if(isset($row['golos']) && $row['golos'] == 1) $array['plus'] = $row['count'];
else if(isset($row['golos']) && $row['golos'] == 2) $array['minus'] = $row['count'];
else {
$array['plus'] = 0;
$array['minus'] = 0;
}
}
if($array['plus'] > $array['minus']) {
if($array['minus'] == 0) {
if($array['plus'] == 1) $count = 60;
else if($array['plus'] == 2) $count = 60;
else if($array['plus'] == 3) $count = 60;
else if($array['plus'] == 4) $count = 70;
else if($array['plus'] == 5) $count = 70;
else if($array['plus'] == 6) $count = 80;
else if($array['plus'] == 7) $count = 80;
else if($array['plus'] == 8) $count = 90;
else if($array['plus'] == 9) $count = 90;
else if($array['plus'] >= 10) $count = 100;
} else {
$count = round($array['minus'] / $array['plus'], 1) * 100;
if($count == 0) $count = 100;
else $count = (100 - $count);
}
} else if($array['plus'] < $array['minus']) {
if($array['plus'] == 0) {
if($array['minus'] == 1) $count = 40;
else if($array['minus'] == 2) $count = 40;
else if($array['minus'] == 3) $count = 40;
else if($array['minus'] == 4) $count = 30;
else if($array['minus'] == 5) $count = 30;
else if($array['minus'] == 6) $count = 20;
else if($array['minus'] == 7) $count = 20;
else if($array['minus'] == 8) $count = 10;
else if($array['minus'] == 9) $count = 10;
else if($array['minus'] >= 10) $count = 0;
} else {
$pr = (round($array['plus'] / $array['minus'], 1) * 100);
$count = $pr;
}
} else
$count = 50;
$percent = $count;
if($percent == 100) $stars = 10;
else if($percent < 100 && $percent >= 90) $stars = 9;
else if($percent < 100 && $percent >= 90) $stars = 9;
else if($percent < 90 && $percent >= 80) $stars = 8;
else if($percent < 80 && $percent >= 70) $stars = 7;
else if($percent < 70 && $percent >= 60) $stars = 6;
else if($percent < 60 && $percent >= 50) $stars = 5;
else if($percent < 50 && $percent >= 40) $stars = 4;
else if($percent < 40 && $percent >= 30) $stars = 3;
else if($percent < 30 && $percent >= 20) $stars = 2;
else if($percent < 20 && $percent >= 10) $stars = 2;
else if($percent < 10 && $percent > 0) $stars = 1;
else if($percent == 0) $stars = 0;
if($type == 0) return '<img class="ico" src="../images/stars/stars_'.$stars.'.gif" alt="•" />';
else return $percent;
} else return '<img class="ico" src="../images/stars/stars_5.gif" alt="•" />';
}
if($id) {
$query = mysql_query("SELECT `cms_news`.*, `cms_news_cat`.`name` as `catname`, `cms_news_cat`.`id` as `catid` FROM `cms_news` LEFT JOIN `cms_news_cat` ON `cms_news`.`refid`=`cms_news_cat`.`id` WHERE `cms_news`.`id`='$id'".($rights < 6 ? " AND `cms_news`.`time`<='" . time() . "'":"")." LIMIT 1;");
if (mysql_num_rows($query)) {
//Показываем новость
$res1 = mysql_fetch_assoc($query);
$textl = htmlentities($res1['name'], ENT_QUOTES, 'UTF-8');
require_once('../incfiles/head.php');
echo '<div class="header">' . htmlentities($res1['name'], ENT_QUOTES, 'UTF-8') . '</div>';
$ncount = mysql_fetch_array(mysql_query("SELECT * FROM `cms_news` WHERE `id` ='$id'"));
if (!isset($_SESSION['cms_news']) || isset($_SESSION['cms_news'])&&$_SESSION['cms_news'] != $id) {
$_SESSION['cms_news'] = $id;
$newscount = intval($ncount['count']) + 3;
mysql_query("UPDATE `cms_news` SET `count` ='$newscount'WHERE `id` ='$id'");
}
//Выводим автора новости
$us = mysql_query("SELECT `id`, `imname` FROM `users` WHERE `id` = '{$res1['user_id']}'");
if (mysql_num_rows($us)) {
$rowuse = mysql_fetch_assoc($us);
$name_use = $user_id ? '<a href="../users/profile.php?user=' . $rowuse['id'] . '">' . $rowuse['imname'] . '</a>' : $rowuse['imname'];
} else {
$name_use = $lng['guest'];
}
echo '<div class="news1" style="color:#000000;"><font style="color: #696969"><img style="vertical-align: middle ! important;" src="/news/images/add.png" alt="."> Qo‘shdi: ' . $name_use . '</br><img style="vertical-align: middle ! important;" src="/news/images/date.png" alt="."> ' . date('d.m.o, H:i', $res1['time'] + (core::$system_set['timeshift'] + core::$user_set['timeshift']) * 3600) . ' – <img style="vertical-align: middle ! important;" src="/news/images/update.png" alt="."> '. $ncount['count'] .'</font><br/>';
//Выводим картинку
if(file_exists('../files/news/news_' . $id . '.jpg') !== false) echo '<img class="posts" src="/files/news/news_' . $id . '.jpg" alt="."><br />';
$text = functions::checkout($res1['text'], 1, 1);
if ($set_user['smileys'])
$text = functions::smileys($text);
echo $text;
echo '<div style="clear:both;"></div>';
//Обрабатываем голосование
if(isset($_POST['plus_x']) || isset($_POST['plus_y'])) {
if($res1['user_id'] == $user_id) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['my_vote'] . '!</div>';
} else {
$plus = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news_rating` WHERE `news`='$id' AND `user_id`='$user_id' LIMIT 1;"), 0);
if($plus) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['already_voted'] . '!</div>';
} else {
mysql_query("INSERT INTO `cms_news_rating` SET
`news`='$id',
`user_id`='$user_id', `golos`='1';");
$_SESSION['error'] = '<div class="list1 green">' . $lng_news['ok_vote'] . '!</div>';
}
}
Header('Location: index.php?act=view&id=' . $id);
exit;
} else if(isset($_POST['minus_x']) || isset($_POST['minus_y'])) {
if($res1['user_id'] == $user_id) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['my_vote'] . '!</div>';
} else {
$plus = mysql_result(mysql_query("SELECT COUNT(*) FROM `cms_news_rating` WHERE `news`='$id' AND `user_id`='$user_id' LIMIT 1;"), 0);
if($plus) {
$_SESSION['error'] = '<div class="list1 red">' . $lng_news['already_voted'] . '!</div>';
} else {
mysql_query("INSERT INTO `cms_news_rating` SET
`news`='$id',
`user_id`='$user_id', `golos`='2';");
$_SESSION['error'] = '<div class="list1 green">' . $lng_news['ok_vote'] . '!</div>';
}
}
Header('Location: index.php?act=view&id=' . $id);
exit;
}
//Сообщение об оставленном голосе
echo $_SESSION['error'];
echo '</div>';
if (!$user_id){
echo '<div class="phdr"><b>Fikrlar</b></div><div class="rmenu">Fikr bildirish uchun saytimizdan ro‘yxatdan o‘tishingiz kerak.</div>';
}
include 'comments2.php';
echo '
' . ($rights >= 6 ? '<div class="menu"><div class="func">
<a href="../panel/index.php?act=news&mod=newsedit&id=' . $id . '">' . $lng['edit'] . '</a><br />
<a href="../panel/index.php?act=news&mod=delnews&id=' . $id . '">' . $lng['delete'] . '</a><br />
</div></div>':'') . '
';
} else {
$textl = $lng['news'];
require_once('../incfiles/head.php');
echo functions::display_error($lng_news['news_does_not_exist']);
}
} else {
$textl = $lng['news'];
require_once('../incfiles/head.php');
echo functions::display_error($lng_news['news_is_not_chose']);
}
unset($_SESSION['error']);
DjHuSo, yani #864 postdegi kodizi qo’shilaman qo’shilmiman kodini man yozgan kodi ichiga to’g’rlab yozib berolasizmi oldindan rahmat kottakon
YAngiliklar bosh sahifaga aloxida qib chiqarishni iloji bormi bolsa yordam berila
Masalan
Dunyo yangiliklar
Fudbol yangiliklari
Shularga yangilik yozsa aloxida chiqishi kk
Masalan
Dunyo yangiliklar
Fudbol yangiliklari
Shularga yangilik yozsa aloxida chiqishi kk
DjHuSo, mana news papka butunley iloji bo’sa kodlarni yozb bersez kein bazaga bergan so’ro’viz bormayapti hato bor dvoti
mana
mana
Ошибка : Duplicate column name 'yoqdi' Sql запрос остановлен.
Saytimga odam ro'yxatdan otib biroz yurip chiqib yana qaytib kelsa login parol so'rayapti nimadan bo'lishi mumkun
Tavsiya etamiz:
- Hoziroq maydonlarni to'ldiring va reklamangizni joylashtiring!
Mavzuga oid xabarlar soni: 3101 ta
So'ngi faollik vaqti: 15:21:31, 19 Apr 2022