###################################################################### # For PHP-NUKE: Web Portal System # =========================== # eGallery 3.0 # Copyright (c) 2001 by Don Grabowski(Don@ecomjunk.com) # http://ecomjunk.com # # This modules is for image galleries # # Code clean-up and debugging by Dan Fleming (dan@swingshift.net) # 5-16-2001 # # This program is free software. You can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License. ###################################################################### if (!eregi("modules.php", $PHP_SELF)) { die ("You can't access this file directly..."); } require_once("mainfile.php"); $module_name = basename(dirname(__FILE__)); get_lang($module_name); ; $pagetitle = "- "._ECards.""; $index = 1; $module_version = "6.5"; include "modules/$module_name/lib.inc.php"; $Tag_DefaultSiteFont =""; include ("header.php"); $Border_Option ="\n"; if($AllowBorder =="Y") { include("modules/Cards/include/ThemeHeader.php"); } global $sitename, $ver; OpenTable(); echo "
";
function viewcats() {
global $gallname, $module_name, $CatThumbWidth, $CatThumbHeight, $CategoryCols, $GalleryCols, $Images_Page, $AdminGalleryCols, $AllowListTopGallery, $AllowListTop, $SiteFontSize, $Tag_DefaultSiteFont, $GalleryColWidth, $GalleryTableBorder, $AllowUploadFile, $GalleryTableWidth, $SiteTEXT, $SiteLINK;
$title="$sitename pictures";
//if (!$user) { Header("Location: user.php") ;}
global $prefix, $SiteFontFace, $Tag_DefaultFormFont;
OpenTable();
$Upload_Option ="\n";
if($AllowUploadFile =="Y")
{
upload();
}
CloseTable();
echo "
";
// get gallery names and intro image
$result = mysql_query("select CatID, CatName, catimg, catloc, CatDesc "
."from $prefix"._card_imgcat ." "
."order by CatName");
// get total over-all count of images
list($count) = mysql_fetch_array(mysql_query("select count(*) "
."from $prefix"._card_img .""));
$result = mysql_query("select CatID, CatName, catimg, catloc, CatDesc "
."from $prefix"._card_imgcat ." "
."order by CatName");
// get total over-all count of images
list($CatName) = mysql_fetch_array(mysql_query("select count(*) "
."from $prefix"._card_imgcat .""));
// begin output
OpenTable();
if (mysql_num_rows($result) > 0) {
echo "$Tag_DefaultSiteFont
" //."
"
."$Tag_DefaultSiteFont"._CURRENT.""
."
"
."$Tag_DefaultSiteFont$CatName Categories &
"
."$Tag_DefaultSiteFont$count "._IMAGESTOT."
"; OpenTable(); // Create table to organize gallery options echo "
"
.""
.""
." " ."$Tag_DefaultSiteFont" ."$Tag_DefaultSiteFont $CatName" ." " ."" //Type text here ."$Tag_DefaultSiteFont "; // get number of pictures in this gallery list($count) = mysql_fetch_array(mysql_query("select count(*) " ."from $prefix"._card_img." " ."where cid=$CatID")); echo "$Tag_DefaultSiteFont $count Images "; echo "$Tag_DefaultSiteFont$CatDesc"; echo "
| ";
$x++;
if ($x == $CategoryCols) {
echo "|||||||||||||||||||||||||||||||||||||||||||||||||||||
$Tag_DefaultSiteFont"._PAGE." | |||||||||||||||||||||||
$Tag_DefaultSiteFont | "; } else { echo ""; } $pages = intval($numrows / $limit); if ($numrows % $limit) { $pages++; } // Output page numbers echo " | $Tag_DefaultSiteFont"; for ($i = 1; $i <= $pages; $i++) { $newoffset = $limit * ($i - 1); if ($i != 1) { echo ", "; } if ($newoffset == $offset) { echo "$i"; } else { echo "$i"; } } echo " | "; if (!(($offset / $limit) == ($pages - 1)) && $pages != 1) { $newoffset = $offset + $limit; echo "$Tag_DefaultSiteFont | "; } else { echo ""; // CloseTable(); } echo " | |||||||||||||||||||
"
."
| ||||||||
$Tag_DefaultSiteFont"._MSGSEND.":"
. "$Tag_DefaultSiteFont"._C.": $numcomments | $Tag_DefaultSiteFont"._S.": $size[0]x$size[1] ($kbytes) | $Tag_DefaultSiteFont"._H.":$counter | $Tag_DefaultSiteFont"._SUBMITBY.": $submitter | $Tag_DefaultSiteFont"._DESCRIPT.":$description | $Tag_DefaultSiteFont"._D.": $date | |
$Tag_DefaultSiteFont" ."$Tag_DefaultSiteFont$sitename "._IMAGEVIEWER."" ." | " ."|||
";
if (!is_user($user)) {
echo ""; } else{
echo "";
}
echo " " ."$Tag_DefaultSiteFont | |||
"
."$Tag_DefaultSiteFont"
.""
."";
if (!is_user($user)) {
echo "$Tag_DefaultSiteFontRegister to Send now as an eCard | | ";
}else{
echo "||
$Tag_DefaultSiteFont | |||
" ." | |||
$Tag_DefaultSiteFont$Tag_DefaultSiteFont"._POSTEDCOMM." |
" . "$Tag_DefaultSiteFontMember: | " . "" . "$Tag_DefaultSiteFontComment: | " . "" . "$Tag_DefaultSiteFontScore: | " . "" . "$Tag_DefaultSiteFontDate: | " . "
" ."" . "$Tag_DefaultSiteFont$uname | " . "$Tag_DefaultSiteFont" . "$comment | " . "$Tag_DefaultSiteFont" . "$vote | " . "$Tag_DefaultSiteFont" . "$date | " . "
"
.""
." " ."$Tag_DefaultSiteFontViewed $counter Times " ."($Tag_DefaultSiteFont$comments comments)" ."($Tag_DefaultSiteFont$vote Votes)" ." | ");
$count++;
if ($count == 2) {
echo "|
$Tag_DefaultSiteFont"._NOTOP10RESULTS." | "; CloseTable(); } mysql_free_result($result); } function upload() { global $prefix, $user, $useownpic, $SiteFontSize, $Tag_DefaultSiteFont, $module_name; if (!is_user($user)) { echo "|
$Tag_DefaultSiteFontRegister to Send your own images as an eCard |