User ga bir marta kurinadigan link qanday qilinadi yani
fc-arsenal.u z dagidek regdan utgandan kiyin link beradi
$izoh= mysql_result( mysql_query("SELECT COUNT(*) FROM `cms_library_comments` WHERE `sub_id` = '".$row['id']."' "),0);
<a href="?act=comments&id=' . $row['id'] . '">Fikrlar:</a>'.$izoh.'
<?php echo '<div class="phdr"><b>Yangi maqolalar</b></div>'; $kmess = '7'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `library_texts` WHERE `time` AND `premod`=1"), 0); $start = $page == 1 ? 0 : ($page - 1) * $kmess; $sql = mysql_query("SELECT `id`, `name`, `time`, `uploader`, `uploader_id`, `count_views`, `comments`, `count_comments`, `cat_id`, `announce` FROM `library_texts` WHERE `premod`=1 ORDER BY `time` DESC LIMIT " . $start . "," . $kmess); $nav = ($total > $kmess) ? '<div class="menu"><center>' . functions::display_pagination('?act=new&', $start, $total, $kmess) . '</center></div>' : ''; if ($total) { $i = 0; $comm = mysql_result( mysql_query("select count(*) from `cms_library_comments` where `refid` = '".$lib['id']."'"),0); echo '<div class="menu"><a href="' . $set['homeurl'] . '/library/index.php?id=' . $lib['id'] . '"><b>' . $lib['name'] . '</b></a> ['. functions::display_date($lib['time']) . ']<br>'.mb_substr($lib['announce'],0,100).'...<br>'; $catalog = mysql_fetch_assoc(mysql_query("SELECT `id`, `name` FROM `library_cats` WHERE `id` = " . $lib['cat_id'] . " LIMIT 1")); echo '[<a href="/library/index.php?do=dir&id=' . $catalog['id'] . '">' . functions::checkout($catalog['name']) . '</a>' . ($page > 1 ? ' | ' . functions::checkout($res['name']) : '') . ']'; echo '[<a href="/library/index.php?act=comments&id=' . $lib['id'] . '">Fikrlar:</a> (' . $lib['count_comments'] . ')]'; echo '<span style="float:right;"><b>[' . $lib['count_views'] . ']</b></span></div>'; $i; } } echo $nav; ?>


<?php /** * @package JohnCMS * @link http://johncms.com * @copyright Copyright (C) 2008-2011 JohnCMS Community * @license LICENSE.txt (see attached file) * @version VERSION.txt (see attached file) * @author http://johncms.com/about */ require('../incfiles/core.php'); $headmod = 'gallery'; $lng_gal = core::load_lng('gallery'); $textl = $lng['gallery']; require('../incfiles/head.php'); // Ограничиваем доступ к Галерее $error = ''; if (!$set['mod_gal'] && $rights < 7) { $error = $lng_gal['gallery_closed']; } elseif ($set['mod_gal'] == 1 && !$user_id) { $error = $lng['access_guest_forbidden']; } if ($error) { require_once('../incfiles/head.php'); echo '<div class="rmenu"><p>' . $error . '</p></div>'; require_once('../incfiles/end.php'); exit; } function setTransparency($new_image, $image_source) { if ($transparencyIndex >= 0) { } $transparencyIndex = imagecolorallocate($new_image, $transparencyColor['red'], $transparencyColor['green'], $transparencyColor['blue']); } 'new', 'edf', 'delf', 'edit', 'del', 'load', 'upl', 'cral', 'razd' ); require_once($act . '.php'); } else { if (!$set['mod_gal']) { echo '<p><font color="#FF0000"><b>' . $lng_gal['gallery_closed'] . '</b></font></p>'; } if ($id) { switch ($ms['type']) { case 'rz': /* ----------------------------------------------------------------- Просмотр раздела ----------------------------------------------------------------- */ echo '<div class="phdr"><i class="fa fa-picture-o" style="color:#ffffff;"></i> <a href="index.php"><b>' . $lng['gallery'] . '</b></a> | ' . $ms['text'] . '</div>'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery` WHERE `type` = 'al' AND `refid` = '$id'"), 0); if ($total) { $req = mysql_query("SELECT * FROM `gallery` WHERE `type` = 'al' AND `refid` = '$id' ORDER BY `time` DESC LIMIT $start, $kmess"); echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; $total_f = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery` WHERE `type` = 'ft' AND `refid` = '" . $res['id'] . "'"), 0); echo '<a href="index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> (' . $total_f . ')</div>'; ++$i; } } else { echo '<div class="menu"><p>' . $lng['list_empty'] . '</p></div>'; } echo '<div class="phdr"><i class="fa fa-spinner" style="color:#ffffff;"></i> ' . $lng['total'] . ': ' . $total . '</div><p>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('index.php?id=' . $id . '&', $start, $total, $kmess) . '</p>' . '<p><form action="index.php?id=' . $id . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } if ($rights >= 6) { echo "<div class='menu'><i class='fa fa-plus-square' style='color:red;'></i> <a href='index.php?act=cral&id=" . $id . "'>" . $lng_gal['create_album'] . "</a><br/>"; echo "<i class='fa fa-trash-o' style='color:red;'></i> <a href='index.php?act=del&id=" . $id . "'>" . $lng_gal['delete_section'] . "</a><br/>"; echo "<i class='fa fa-wrench' style='color:red;'></i> <a href='index.php?act=edit&id=" . $id . "'>" . $lng_gal['edit_section'] . "</a><br/>"; } echo "<i class='fa fa-share-square-o' style='color:red;'></i> <a href='index.php'>Galereya</a></p>"; break; case 'al': /* ----------------------------------------------------------------- Просмотр альбома ----------------------------------------------------------------- */ if ($imd != "." && $imd != ".." && $imd != "index.php") { $im[] = $imd; } } for ($imi = 0; $imi < $totalim; $imi++) { $ftime1 = $tim - 10; if ($filtime[$imi] < $ftime1) { } } echo '<div class="phdr"><i class="fa fa-picture-o" style="color:#ffffff;"></i> <a href="index.php"><b>' . $lng['gallery'] . '</b></a> | <a href="index.php?id=' . $ms['refid'] . '">' . $rz1['text'] . '</a> | ' . $ms['text'] . '</div>'; $total = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery` WHERE `type` = 'ft' AND `refid` = '$id'"), 0); $req = mysql_query("SELECT * FROM `gallery` WHERE `type` = 'ft' AND `refid` = '$id' ORDER BY `time` DESC LIMIT $start, $kmess"); echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<a href="index.php?id=' . $fot1['id'] . '">'; $infile = "foto/$fot1[name]"; $razm = $_SESSION['frazm']; } else { $razm = 100; } $width = $sizs[0]; $height = $sizs[1]; $quality = 80; $x_ratio = $razm / $width; $y_ratio = $razm / $height; if (($width <= $razm) && ($height <= $razm)) { $tn_width = $width; $tn_height = $height; } else { if (($x_ratio * $height) < $razm) { $tn_width = $razm; } else { $tn_height = $razm; } } $format = functions::format($infile); switch ($format) { case "gif": break; case "jpg": case "jpeg": break; case "png": break; } setTransparency($im1, $im); $namefile = "$fot1[name]"; switch ($format) { case "gif": $imagnam = "temp/$namefile.temp.gif"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "jpg": case "jpeg": $imagnam = "temp/$namefile.temp.jpg"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "png": $imagnam = "temp/$namefile.temp.png"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; } echo '</a>'; echo "$fot1[text]<br/>"; } if ($rights >= 6) { echo "<a href='index.php?act=edf&id=" . $fot1['id'] . "'>" . $lng['edit'] . "</a> | <a href='index.php?act=delf&id=" . $fot1['id'] . "'>" . $lng['delete'] . "</a><br/>"; } } else { echo $lng_gal['image_missing'] . '<br /><a href="index.php?act=delf&id=' . $fot1['id'] . '">' . $lng['delete'] . '</a>'; } echo "</div>"; ++$i; } echo '<div class="phdr"><i class="fa fa-spinner" style="color:#ffffff;"></i> ' . $lng['total'] . ': ' . $total . '</div><p>'; if ($total > $kmess) { echo '<p>' . functions::display_pagination('index.php?id=' . $id . '&', $start, $total, $kmess) . '</p>' . '<p><form action="index.php?id=' . $id . '" method="post">' . '<input type="text" name="page" size="2"/>' . '<input type="submit" value="' . $lng['to_page'] . ' >>"/>' . '</form></p>'; } if (($user_id && $rz1['user'] == 1 && $ms['text'] == $login && !$ban['1'] && !$ban['14']) || $rights >= 6) { echo '<div class="menu"><i class="fa fa-download" style="color:red;"></i> <a href="index.php?act=upl&id=' . $id . '">' . $lng_gal['upload_photo'] . '</a><br/>'; } if ($rights >= 6) { echo "<i class='fa fa-trash' style='color:red;'></i> <a href='index.php?act=del&id=" . $id . "'>" . $lng_gal['delete_album'] . "</a><br/>"; echo "<i class='fa fa-pencil' style='color:red;'></i> <a href='index.php?act=edit&id=" . $id . "'>" . $lng_gal['edit_album'] . "</a><br/>"; } echo "<i class='fa fa-share-square-o' style='color:red;'></i> <a href='index.php'>" . $lng_gal['to_gallery'] . "</a></p>"; break; case 'ft': /* ----------------------------------------------------------------- Просмотр фото ----------------------------------------------------------------- */ echo "<br/> "; $infile = "foto/$ms[name]"; $razm = $_SESSION['frazm']; } else { $razm = 50; } $width = $sizs[0]; $height = $sizs[1]; $format = functions::format($infile); switch ($format) { case "gif": break; case "jpg": break; case "jpeg": break; case "png": break; } setTransparency($im1, $im); $namefile = "$ms[name]"; switch ($format) { case "gif": $imagnam = "temp/$namefile.gif"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "jpg": case "jpeg": $imagnam = "temp/$namefile.jpg"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; case "png": $imagnam = "temp/$namefile.png"; echo "<img src='" . $imagnam . "' alt=''/><br/>"; break; } $fwidth = $sizs[0]; $fheight = $sizs[1]; echo "<p>" . $lng['description'] . ": $ms[text]<br/>"; echo $lng_gal['dimensions'] . ": $fwidth*$fheight пкс.<br/>"; echo $lng_gal['weight'] . ": $fotsz кб.<br/>"; echo $lng['date'] . ': ' . functions::display_date($ms['time']) . '<br/>'; echo $lng_gal['posted_by'] . ": $ms[avtor]<br/>"; echo "<a href='foto/$ms[name]'>" . $lng['download'] . "</a><br /><br />"; echo "<a href='index.php?id=" . $ms['refid'] . "'>" . $lng['back'] . "</a><br/>"; echo "<a href='index.php'>" . $lng_gal['to_gallery'] . "</a></p>"; break; default : break; } } else { /* ----------------------------------------------------------------- Главная страница Галлереи ----------------------------------------------------------------- */ echo '<p><a href="index.php?act=new">' . $lng_gal['new_photo'] . '</a> (' . counters::gallery(1) . ')</p>'; echo '<div class="phdr"><i class="fa fa-image" style="color:#ffffff;"></i> <b>' . $lng['gallery'] . '</b></div>'; echo $i % 2 ? '<div class="list2">' : '<div class="list1">'; echo '<a href="index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> (' . $countal . ')</div>'; ++$i; } echo '<div class="phdr"><i class="fa fa-spinner" style="color:#ffffff;"></i> ' . $lng['total'] . ': ' . $total . '</div><p>'; if ($rights >= 6) { echo "<div class='menu'><i class='fa fa-plus-square' style='color:red;'></i> <a href='index.php?act=razd'>" . $lng_gal['create_section'] . "</a><br/>"; } echo "</p>"; } } require('../incfiles/end.php'); ?>
.gif)