Files
Testing/halloween_contest.php

63 lines
2.4 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/include/analytics/');
ini_set('session.bug_compat_warn', 0);
ini_set('session.bug_compat_42', 0);
include(PATHTOINCLUDES."base.php");
$em="";
$page = "halloween_contest";
include "header.php";
/* $Id: community.php 59 2013-10-10 03:25:54Z phil $ */
$_SESSION["cp_userid"]=$user->user_info['user_id'];
$_SESSION["pagename"]="Halloween Contest";
$_SESSION["nickname"]=$user->user_info['user_username'];
$_SESSION["blocklist"]=$user->user_info['user_blocklist'];
$_SESSION["invisible"]=$user->user_info['user_invisible'];
$_SESSION["userphoto"]=$user->user_photo("./images/nophoto.png",true);
$_SESSION["cp_useremail"]=$user->user_info['user_email'];
$_SESSION["cp_userlevel"]=$user->user_info['user_level_id'];
$entrysubmitted="";
$dbcon=dbconnect2();
include(PATHTOINCLUDES."setstate2.php");
$sql="SELECT
`halloween_contest`.`hcidu`,
`halloween_contest`.`hcuid`,
`halloween_contest`.`hcuname`,
`halloween_contest`.`hcemail`,
`halloween_contest`.`hcimgurl`,
`halloween_contest`.`hcimgwdth`,
`halloween_contest`.`hcimgheight`,
`halloween_contest`.`hccomtotal`,
`halloween_contest`.`hcimagename`,
`halloween_contest`.`thedate`,
`halloween_contest`.`hcapproved`,
`halloween_contest`.`badurl`,
`halloween_contest`.`hctrash`,
`halloween_contest`.`hc_path`,
`halloween_contest`.`hc_name`,
`halloween_contest`.`hc_ext`
FROM
`halloween_contest`
ORDER BY
`halloween_contest`.`hcidu` ASC";
$result=mysql_query($sql) or $em=$em.mysql_error();
$entries="";
while ($row = mysql_fetch_assoc($result)) {
$fullimg=$row["hc_path"]."/".$row["hc_name"]."_full.".$row["hc_ext"]."?id=".$row["hcidu"];
$thumbimg=$row["hc_path"]."/".$row["hc_name"]."_thumbnail.".$row["hc_ext"];
$origimg=$row["hc_path"]."/".$row["hc_name"].".".$row["hc_ext"]."?id=".$row["hcidu"];
if($row["hcapproved"] == "yes" || $user->user_info['user_id'] == "21092" || $user->user_info['user_id'] == "8" || $user->user_info['user_id'] == "9")
{
$entries .=' <a class="rsImg" data-rsBigImg="'.$origimg.'" href="'.$fullimg.'"><img width="100" height="110" class="rsTmb" src="'.$thumbimg.'" style="width:auto;height:72px;margin:0px auto;" /></a>';
}
if($row["hcuid"]==$user->user_info['user_id'])
{
$entrysubmitted=$row["hcapproved"];
}
}
$smarty->assign('esub',$entrysubmitted);
$smarty->assign('thetitle',"Halloween Contest");
$smarty->assign('entries',$entries);
$smarty->assign('em',$em);
include "footer.php";
?>