You're looking for some 4images templates and styles? Then visit this thread to show websites with 4images templates to download.
0 Members and 1 Guest are viewing this topic.
If possible please post in english... i can't understant... Quote from: dirk2903Mod ist soweit drin, aber egal welche Option (Hits,Date usw.) ich einstelle, es werden keine Pics zur abstimmung festgelegt, oder muß ich da noch etwas machen
Mod ist soweit drin, aber egal welche Option (Hits,Date usw.) ich einstelle, es werden keine Pics zur abstimmung festgelegt, oder muß ich da noch etwas machen
<?php /************************************************************************** * * * 4images - A Web Based Image Gallery Management System * * ---------------------------------------------------------------- * * * * File: potm.php * * Copyright: (C) 2002 Jan Sorgalla * * Email: jan@4homepages.de * * Web: http://www.4homepages.de * * Scriptversion: 1.8 * * * * Never released without support from: Nicky (http://www.nicky.net) * * * ************************************************************************** * * * Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz- * * bedingungen (Lizenz.txt) für weitere Informationen. * * --------------------------------------------------------------- * * This script is NOT freeware! Please read the Copyright Notice * * (Licence.txt) for further information. * * * *************************************************************************/define('GET_CACHES', 1);define('ROOT_PATH', './');include(ROOT_PATH.'global.php');require(ROOT_PATH.'includes/sessions.php');$user_access = get_permission();$main_template = 'potm'; // template nameinclude(ROOT_PATH.'includes/page_header.php'); global $cat_id, $site_db, $site_sess, $HTTP_COOKIE_VARS, $site_template, $lang, $user_table_fields; //-----------------------------------------------------//--- Parameters --------------------------------------//-----------------------------------------------------$potm_public = 1; // access for all visitors (true 1) only members ( false 0)$potm_nop = 8; // number of pictures for monthly voting$potm_top = 3; // after vote show top X images of this month vote$potm_lw = 12; // show last x 'photo of the month' winners$potm_table = "450"; // table witdt or use with %$potm_selection = 4; // selection of picturey by // 0 - hits // 1 - votes // 2 - rating // 3 - by date, latest pictures // 4 - automatically choose one of the three above//-----------------------------------------------------//--- Init --------------------------------------------//-----------------------------------------------------if ($user_info['user_level'] < $potm_public * -1 ){ show_error_page($lang['no_permission']); exit;}$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";if (isset($HTTP_COOKIE_VARS[$cookie_name.'potm'])){ $cookie_date = unserialize(stripslashes($_COOKIE[$cookie_name.'potm'])) ;}//-----------------------------------------------------//--- Check Date --------------------------------------//-----------------------------------------------------$datum = date("Y-m") . "-01";if ( $config['potm_date'] != $datum ){ if ( $potm_selection == 4 ) $potm_selection = date("m") % 4; if ( $potm_selection == 0 ) $sql_add = "hits"; elseif ( $potm_selection == 1 ) $sql_add = "votes"; elseif ( $potm_selection == 2 ) $sql_add = "rating"; else $sql_add = "date"; $sql = "UPDATE ".IMAGES_TABLE." SET image_potm = 1 WHERE image_potm_date = '".$config['potm_date']."' ORDER BY image_potm_votes DESC LIMIT 1"; $site_db->query($sql); $sql = "UPDATE ".IMAGES_TABLE." SET image_potm_date = '0000-00-00', image_potm_votes = 0 WHERE image_potm_date = '".$config['potm_date']."' AND image_potm = 0"; $site_db->query($sql); $sql = "UPDATE ".IMAGES_TABLE." SET image_potm_date = '".$datum."' WHERE image_potm = 0 ORDER BY image_".$sql_add." DESC LIMIT ".$potm_nop; $site_db->query($sql); $sql = "UPDATE ".SETTINGS_TABLE." SET setting_value = '".$datum."' WHERE setting_name = 'potm_date'"; $site_db->query($sql);}//-----------------------------------------------------//--- Voting ------------------------------------------//-----------------------------------------------------if ( $action == "potm_voting" ){ if ( $cookie_date != $datum ) { $sql = "UPDATE ".IMAGES_TABLE." SET image_potm_votes = image_potm_votes + 1 WHERE image_id = ".$id; $site_db->query($sql); $sql_datum = "AND i.image_potm_date = '".$datum."'"; $nop = $potm_top; $potm_description = $lang['potm_top_title']; $cookie_value = isset($HTTP_COOKIE_VARS[$cookie_name.'potm']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'potm'])) : array(); $cookie_potm_rated = $datum; $cookie_expire = mktime(0,0,0,date("m") + 1, 1, date("Y") ); setcookie($cookie_name.'potm', serialize($cookie_potm_rated), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE); } else { show_error_page($lang['potm_no_permission']); exit; } $sql_order = "i.image_potm_votes DESC, i.image_hits"; $nop = $potm_top;}//-----------------------------------------------------//--- Leaders of current Vote -------------------------//-----------------------------------------------------if ( $action == "locv" ){ if ( $cookie_date == $datum ) { $sql_order = "i.image_potm_votes DESC, i.image_hits"; $sql_datum = "AND i.image_potm = 0 AND i.image_potm_date = '".$datum."'"; $nop = $potm_top; $potm_description = $lang['potm_locv']; } else { show_error_page($lang['potm_no_permission']); exit; }}//-----------------------------------------------------//--- Show candidates ---------------------------------//-----------------------------------------------------if ( $action == "" ){ if ( $cookie_date != $datum ) { $sql_datum = "AND i.image_potm = 0 AND i.image_potm_date = '".$datum."'"; $sql_order = "i.image_name, i.image_hits ASC"; $nop = $potm_lw; } else { $sql_order = "i.image_potm_votes DESC, i.image_hits"; $sql_datum = "AND i.image_potm = 0"; $nop = $potm_top; $potm_description = $lang['potm_locv']; }}//-----------------------------------------------------//--- Last Winner -------------------------------------//-----------------------------------------------------if ( $action == "lw" ){ if ( $cookie_date != $datum ) $potm_menu_link = "<a href=\"".$site_sess->url(ROOT_PATH."potm.php")."\">{lang_potm_vote_menu}</a>"; $nop = $potm_lw; $sql_datum = "AND i.image_potm = 1"; $sql_order = "i.image_potm_date DESC, i.image_hits"; $potm_description = $lang['potm_winners_title'];}else { $potm_menu_link = "<a href=\"".$site_sess->url(ROOT_PATH."potm.php?action=lw")."\">{lang_potm_lastwinners}</a>";}if ( $cookie_date == $datum ) $potm_menu_link .= "<br><br><a href=\"".$site_sess->url(ROOT_PATH."potm.php?action=locv")."\">{lang_potm_locv}</a>";//-----------------------------------------------------//--- Menu --------------------------------------------//-----------------------------------------------------$cat_match_sql = ($cat_id && check_permission("auth_viewcat", $cat_id)) ? "AND i.cat_id = '$cat_id' " : ""; $cat_id_sql = get_auth_cat_sql("auth_viewcat", "NOTIN");$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_media_file, i.image_thumb_file, i.image_rating, i.image_votes, i.image_comments, c.cat_name, u.user_name, i.image_downloads, i.image_hits, i.image_potm, i.image_potm_date, i.image_potm_votes FROM ".IMAGES_TABLE." i, ".CATEGORIES_TABLE." c, ".USERS_TABLE." u WHERE i.image_active = 1 AND i.cat_id NOT IN ($cat_id_sql) AND i.cat_id = c.cat_id AND i.user_id = u.user_id $cat_match_sql ".$sql_datum." ORDER BY " . $sql_order ." LIMIT $nop";$result = $site_db->query($sql);$potm_list = array();$i = 1;while ($row = $site_db->fetch_array($result)){ $potm_list[$i] = $row; $i++;}$site_db->free_result();$potm_menu = "<table width=".$potm_table." border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n<form method=\"post\" action=\"{self}\">";for ($i = 1; $i <= $nop; $i++) { if (isset($potm_list[$i])) { if (empty($potm_list[$i]['image_thumb_file'])) { $thumb_file = ICON_PATH."/".get_file_extension($potm_list[$i]['image_media_file']).".gif"; } else { $thumb_file = (is_remote($potm_list[$i]['image_thumb_file'])) ? $potm_list[$i]['image_thumb_file'] : THUMB_PATH."/".$potm_list[$i]['cat_id']."/".$potm_list[$i]['image_thumb_file']; } $potm_menu .= "<tr class=\"row". (($i % 2) == 1 ? "1" : "2") ."\">\n<td width=100 align=\"center\" valign=\"center\">"; $potm_menu .= (check_permission("auth_viewimage", $potm_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$potm_list[$i]['image_id'])."\"><img src=\"".$thumb_file."\" border=\"1\" align=\"center\" alt=\"".$lang['clickhere']." "".$potm_list[$i]['image_name'].""\"/></a>" : "<img src=\"".$thumb_file."\" width=\"$new_width\" height=\"$new_height\" border=\"1\" align=\"center\" alt=\"".$potm_list[$i]['image_name']."\" />"; $potm_menu .= "</td><td>"; $potm_menu .= (check_permission("auth_viewimage", $potm_list[$i]['cat_id'])) ? "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$potm_list[$i]['image_id'])."\">".$potm_list[$i]['image_name']."</a>" : ($potm_list[$i]['image_name']); $potm_menu .= "<br>{lang_top_user}: " . "<a href=\"".$site_sess->url((!empty($url_show_profile)) ? preg_replace("/{user_id}/", $potm_list[$i]['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$potm_list[$i]['user_id'])."\">".htmlspecialchars($potm_list[$i]['user_name'])."</a>"; $potm_menu .= "<br>{lang_top_category}: " . "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$potm_list[$i]['cat_id'])."\">".$potm_list[$i]['cat_name']."</a>"; if ( $action != "" ) { $potm_menu .= "<br>".$lang['hits']." ".$potm_list[$i]['image_hits']; $potm_menu .= "<br>".$lang['rating']." ".$potm_list[$i]['image_rating']; } $potm_menu .= "<br>".$lang['comments']." ".$potm_list[$i]['image_comments']; $potm_menu .= "</td><td>\n"; if ( $action == "" && $cookie_date != $datum ) $potm_menu .= "<input type=\"radio\" name=\"id\" value=\"" .$potm_list[$i]['image_id']. "\" onclick=\"this.form.submit()\"/>{lang_potm_vote}\n"; else if ( $action == "lw" ) { $datum_array = explode("-",$potm_list[$i]['image_potm_date']); $potm_menu .= "<b>".$lang['potm_winner']."<br>".$lang['month_array'][(int)$datum_array[1]-1]." ".$datum_array[0]."</b>"; } else $potm_menu .= "<br>{lang_potm_votes} " . $potm_list[$i]['image_potm_votes']; } $potm_menu .= "</td>"; if ( $action == "" && $cookie_date != $datum ) { $potm_menu .= "<input type=\"hidden\" name=\"action\" value=\"potm_voting\"></tr>"; }}$potm_menu .= "</form></table>";//-----------------------------------------------------//--- Template vars -----------------------------------//-----------------------------------------------------$site_template->register_vars(array("potm_menu" => $potm_menu,"potm_menu_link" => $potm_menu_link,"lang_potm_title" => $lang['potm_title'],"lang_potm_vote" => $lang['potm_vote'],"lang_potm_votes" => $lang['potm_votes'],"lang_potm_vote_menu" => $lang['potm_vote_menu'],"lang_potm_lastwinners" => $lang['potm_lastwinners'],"lang_top_category" => $lang['top_category'],"lang_top_user" => $lang['top_user'],"lang_potm_description" => $potm_description,"lang_potm_locv" => $lang['potm_locv']));unset($action);//-----------------------------------------------------//--- Clickstream -------------------------------------//-----------------------------------------------------$clickstream = "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator']. $lang['potm_link'];$title = $config['site_name'];//-----------------------------------------------------//--- Print Out ---------------------------------------//-----------------------------------------------------$site_template->register_vars(array( "clickstream" => $clickstream, "title" => $title));$site_template->print_template($site_template->parse_template($main_template));include(ROOT_PATH.'includes/page_footer.php');?>
{header}<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td><table cellpadding="0" cellspacing="0" width="100%" border="0" bgcolor="#006699" > <tr> <td width="100%"> <table border="0" cellpadding="0" cellspacing="0" bgcolor="#3d3d3d" width="100%" height="62" background="bbcell.gif" > <tr> <td width="30%" align="left"><a target="_self" href="http://www.event-pics.de"><img border="0" src="{template_url}/images/4imgs.gif" width="246" height="58" align="center" alt="" /></a></td> <td width="40%" align="left" valign="middle"> <?phpinclude("http://www.event-pics.de/4images/banner/banner.php");?></td> <td width="30%" align="right" > <form method="post" action="{url_search}"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td> <input type="text" name="search_keywords" size="15" class="searchinput" /> </td> <td> <input type="submit" value="{lang_search}" class="button" name="submit" /> </td> </tr> <tr valign="top"> <td colspan="2"><a href="{url_search}" class="smalltext">{lang_advanced_search}</a></td> </tr> </table> </form> </td> </tr> </table></td></tr></table> </td> </tr> <tr> <td class="bordercolor"> <table width="100%" border="0" cellspacing="1" cellpadding="0" height="466"> <tr> <td class="tablebgcolor" height="465"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="navbar" height="23"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" width="50%"> <img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" /><a href="http://www.event-pics.de/4images">event-pics.de | Galerie</a> </td> <td align="right" width="50%"><a href="http://www.event-pics.de/4images/member.php?action=uploadform"><b>UPLOAD</b></a> |  <a href="{url_potm_link}"><b>{lang_potm_link}</b></a>  |<a href="{url_top_images}"><b>{lang_top_images}</b></a> |  <a href="{url_new_images}"><b>{lang_new_images}</b></a>  </td> </tr> </table> </td> </tr> </table> <table width="1155" border="0" cellspacing="0" cellpadding="0" height="447"> <tr> <td width="100" class="row2" valign="top" height="447"> <table width="150" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td> </tr> <tr> <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> <tr> <td align="center" class="row1">{user_box} </td> </tr> <tr> <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> </table> {if random_image} <table width="150" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td> </tr> <tr> <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> <tr> <td align="center" class="row1"> <br /> {random_image} <br /> <br /> </td> </tr> <tr> <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> </table> {endif random_image}{potd_image} <p align="center"> <?php echo date("d.m.Y, H:i"); ?> </p><p align="center"><?php include("4darkm.php"); ?> </td> <td width="921" valign="top"><br /> <b class="title">{lang_potm_title}</b><hr size="1" /> <p> {if msg}</p> <div class="msg{msg_color}">{msg}</div> <p>{endif msg} </p> <p><b>{lang_potm_description} </b> </p> <p>{potm_menu}</p> <p align="center">{potm_menu_link}</p> <br /> <p> <br /> </p> <p> <br /> </p> <br /> <br /> <br /> <p> </p> </td> <td width="39" valign="top"><img src="{template_url}/images/spacer.gif" width="19" height="19" alt="" /></td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td> <table width="640" border="0" cellspacing="0" cellpadding="0" class="tablebottom"> <tr> <td width="6"><img src="{template_url}/images/footer_left.gif" width="6" height="19" alt="" /></td> <td width="405"> </td> <td width="225"> </td> <td width="6"><img src="{template_url}/images/footer_right.gif" width="6" height="19" alt="" /></td> </tr> </table> </td> </tr></table>{footer}
DB Error: Bad SQL Query: SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_thumb_file, i.image_media_file, i.image_thumb_file, i.image_rating, i.image_votes, i.image_comments, c.cat_name, u.user_name, i.image_downloads, i.image_hits, i.image_potm, i.image_potm_date, i.image_potm_votes FROM maledivenimages i, maledivencategories c, phpbb_users u WHERE i.image_active = 1 AND i.cat_id NOT IN (0, 122, 123) AND i.cat_id = c.cat_id AND i.user_id = u.user_id AND i.image_potm = 1 ORDER BY i.image_potm_date DESC, i.image_hits LIMIT 12Unknown column 'u.user_name' in 'field list'