"; include ("header.php"); $Border_Option ="\n"; if($AllowBorder =="Y") { include("modules/Cards/include/ThemeHeader.php"); } global $sitename, $ver; OpenTable(); echo "
$Tag_DefaultSiteFont

$SiteName "._ECARDS."$module_version

"; CloseTable(); 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

" //."

"._LOGO."

" ."$Tag_DefaultSiteFont"._CURRENT."" ."
" ."$Tag_DefaultSiteFont$CatName Categories &
" ."$Tag_DefaultSiteFont$count "._IMAGESTOT."

"; $List_TopPostcards="\n"; if($AllowListTop =="Y") { echo "$Tag_DefaultSiteFont"; echo "
" // .""._TOP10."" ."

"; } CloseTable(); echo "

"; OpenTable(); // Create table to organize gallery options echo "$Tag_DefaultSiteFont"; while(list($CatID, $CatName, $catimg, $catloc, $CatDesc) = mysql_fetch_array($result)) { echo ""; $x++; if ($x == $CategoryCols) { echo ""; $x = 0; } } } mysql_free_result($result); } function showgall($cid, $offset) { OpenTable(); global $prefix, $module_name, $GalleryImgsPP, $gallery_table_width, $column_width, $GalleryStandard , $GalleryCols, $GalleryTableBorder; global $GalleryThumbWidth, $GalleryThumbHeight, $AllowListTopGallery, $prefix_user, $user, $description, $SiteFontSize, $Tag_DefaultSiteFont, $SiteBACKGROUND; $title = "$Tag_DefaultSiteFont $sitename "._IMAGEGALLERIES." "; // Get total number of pics for this gallery list($numrows) = mysql_fetch_array(mysql_query("select count(*) " ."from $prefix"._card_img." " ."where cid=$cid " ."order by pid")); // Get gallery data from database with $limit and $offset for paging $limit = $GalleryImgsPP; if (empty($offset)) { $offset = 0; } $result = mysql_query("select pid, cid, catloc, CardImgFile, CardThmFile, counter, submitter, description, date " ."from $prefix"._card_img." " ."where cid=$cid " ."order by pid " ."limit $offset, $limit"); echo ("
" ."" ."\"$CatName\"" ."
" ."$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 "

 

" .""); // start output of navigation ( << Prev - Page 1 - Next >> echo ""; echo ""; if ($offset != 0) { $prevoffset = $offset - $limit; echo ""; } else { echo ""; } $pages = intval($numrows / $limit); if ($numrows % $limit) { $pages++; } // Output page numbers echo ""; if (!(($offset / $limit) == ($pages - 1)) && $pages != 1) { $newoffset = $offset + $limit; echo ""; } else { echo ""; // CloseTable(); } echo ""; // begin gallery thumbnail output //echo "
$Tag_DefaultSiteFont"._CLICKTHUMB."" ."" ."

$Tag_DefaultSiteFont
" ."

$Tag_DefaultSiteFont"._PAGE."
$Tag_DefaultSiteFont\"«$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 "$Tag_DefaultSiteFont\"Next

"; while(list($pid, $cid, $catloc, $CardImgFile, $CardThmFile, $counter, $submitter, $description, $date ) = mysql_fetch_array($result)) { if (!$date) { $date="Unknown"; } $size = getimagesize("modules/$module_name/images/$catloc/$CardImgFile"); list($numcomments, $vote) = mysql_fetch_array(mysql_query("select count(*) " ."from $prefix"._cardcomments." " ."where pid = '$pid'")); $kbytes = round(filesize("modules/$module_name/images/$catloc/$CardImgFile")/$GalleryStandard) . "k"; echo "" . "" . "" . "" . "" . "" . "
" .""; if (!is_user($user)) { echo "" . "" . "" . "" . "" . "" . "" . "
" ."" ."\"$description\"" ."
\"To\n
$SiteFontFace"._C.": $numcomments
$SiteFontFace"._S.": $size[0]x$size[1] ($kbytes)
$SiteFontFace"._H.":$counter
$SiteFontFace"._SUBMITBY.": $submitter
$SiteFontFace"._DESCRIPT.":$description
$SiteFontFace"._D.": $date
"; }else{ echo "
$Tag_DefaultSiteFont"._MSGSEND.":._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
"; } echo""; $count++; if ($count == $GalleryCols) { echo ""; $count = 0; } } mysql_free_result($result); } function showpic($pid) { global $user, $prefix,$imgpath,$module_name, $AllowPostComment, $AllowShowComment, $Tag_DefaultSiteFont, $GalleryTableBorder, $SiteBACKGROUND, $Galleryicons; $imgpath="modules/$module_name/images"; // get image information // update this pics number of hits mysql_query("update $prefix"._card_img." " ."set counter = counter + 1 " ."where pid = $pid"); $result = mysql_query("select catloc, CardImgFile, cid, description " ."from $prefix"._card_img." " ."where pid = $pid"); list($catloc, $CardImgFile, $cid, $description) = mysql_fetch_array($result); mysql_free_result($result); // begin html ouput OpenTable(); echo ("" ."" .""); // if we have an image display it if (isset($CardImgFile)) { echo ""; echo "" .""; }else{ echo ""; } echo ""; // output form for comments $Comment_Option ="\n"; if($AllowPostComment =="Y") { echo "" ."" ."" ."" ."" .""; } //Output Votes // output comments $CommentShow_Option ="\n"; if($AllowShowComment =="Y") { $result = mysql_query("SELECT vote ASC LIMIT 0, 30) " ."from $prefix"._cardcomments." " ."where pid = $pid " ."order by vote "); while(list($vote) = mysql_query($result)) { } echo ""; $result = mysql_query("select pid, uname, comment, vote, date_format(date, '%c/%e/%y') " ."from $prefix"._cardcomments." " ."where pid = $pid " ."order by date DESC"); global $SiteTEXT, $SiteBGCOLOR, $Tag_DefaultSiteFont, $SiteVLINK, $FormBGcolor, $GalleryTableWidth; while(list($pid, $uname, $comment, $vote, $date) = mysql_fetch_array($result)) { echo"
$Tag_DefaultSiteFont" ."$Tag_DefaultSiteFont$sitename "._IMAGEVIEWER."" ."

"; if (!is_user($user)) { echo "\"Send"; } else{ echo "\"Send"; } echo "

" ."$Tag_DefaultSiteFont
"._DESCRIPT.": $description
"; echo "

" ."$Tag_DefaultSiteFont" ."" .""; if (!is_user($user)) { echo "
$Tag_DefaultSiteFontRegister to Send now as an eCard
$Tag_DefaultSiteFont\"Send
" ."
" ."" //."note: comments posted here are logged. " //."some are anonymous. some words are auto-censored." ."$Tag_DefaultSiteFont
$Tag_DefaultSiteFont"._YOURCOMM."

" .""; echo "
"; if (isset($user)) { echo " "._POSTANON.""; } echo "" ."
" ."" ."" ."
" ."
" ."
" ."
$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
" . ""; } // display message if there are no comments if (mysql_num_rows($result) < 1) { echo "$Tag_DefaultSiteFont"._NOCOMMENTS.""; } } } // if there was no picture display a message else { echo "$Tag_DefaultSiteFont"._NOIMAGE.""; } } function top() { global $prefix, $module_name, $ListTop, $SiteFontSize, $Tag_DefaultSiteFont, $GalleryTableBorder; OpenTable(); $title= ""._TOP." $ListTop "._VIEWED.""; //dbconnect(); $result = mysql_query("select pid, cid, catloc, CardImgFile, CardThmFile, CardTemplate, counter, description " ."from $prefix"._card_img." " ."order by counter DESC " ."limit 0, $ListTop"); // begin output // OpenTable(); echo ("

$Tag_DefaultSiteFont"._TOP." $ListTop "._VIEWED."" ."" ."

" ."

"); echo ("" .""); while(list($pid, $cid, $catloc, $CardImgFile, $CardThmFile, $CardTemplate, $counter, $description) = mysql_fetch_array($result)) { list($comments) = mysql_fetch_array(mysql_query("select count(*) " ."from $prefix"._cardcomments." " ."where pid = $pid")); list($vote) = mysql_fetch_array(mysql_query("select count(*)/100 " ."from $prefix"._cardcomments." " ."where pid = $pid " ."")); echo (""); $count++; if ($count == 2) { echo ""; $count = 0; } } // display message if there are no pics if (mysql_num_rows($result) < 1) { echo ""; CloseTable(); } mysql_free_result($result); } function upload() { global $prefix, $user, $useownpic, $SiteFontSize, $Tag_DefaultSiteFont, $module_name; if (!is_user($user)) { echo ""; }else{ echo "" . ""; $T_Upload_Option_Note = _MSGUPLOADYOUROWNFILEINFO; } } function postcomment($pid, $comment, $vote, $date) { // word censoring global $user, $cookie, $anonfl, $prefix; // see if we have a registered that is not posting anonymously if (isset($user) and $anonfl != 1) { cookiedecode($user); $username = $cookie[1]; } else { $username = "Anonymous"; } mysql_query("insert into $prefix"._cardcomments." " ."set pid = '$pid', " ."uname = '$username', " ."comment = '$comment', " ."vote = '$vote'," ."date = now()"); showpic($pid); } switch($op) { case "showgall": showgall($cid, $offset); break; case "showpic": showpic($pid); break; case "top": top(); break; case "random": random(); break; case "upload": upload(); break; case "postcomment": break; case "post": postcomment($pid, $comment, $vote, $date); break; default: viewcats(); break; } function SWF_Image($file = "",$url) { global $FlashHeight,$FlashWidth,$MsgNoFlash,$MsgClickHereToGet; $show ="\n"; if( eregi(".swf",$file) ) { $show.=" $MsgNoFlash <a href=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">$MsgClickHereToGet</a> "; }else{ $show.= "\"\""; } return $show; } echo"

" ."" ."\"$description\"
" ."$Tag_DefaultSiteFontViewed $counter Times
" ."($Tag_DefaultSiteFont$comments comments)" ."($Tag_DefaultSiteFont$vote Votes)" ."
$Tag_DefaultSiteFont"._NOTOP10RESULTS."
$Tag_DefaultSiteFontRegister to Send your own images as an eCard
"; CloseTable(); $Border_Option ="\n"; if($AllowBorder =="Y") { include("modules/Cards/include/ThemeFooter.php"); } include("footer.php"); ?>