Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lakeside

Pages: [1] 2 3 4 5 ... 8
1
Okay, found it out, VERY EASILY!

A user must only be guest, then clear his/her cookies then revote.

This explains why an image on our site can only show 15 hits to the actual image in our servers logs but show 35 votes.

There really must be a better way about this.

Perhaps a way of eliminating guests from voting, then use the vote stored in database mod so that only registered members can vote, and thus eliminate this vulnarability.

Any people want to comment?

2
Is there a mod or can someone come up with one or something else to help me out here.

Basically I have a category for each user, and right now its fine because there are only 68 users, but I need a way of breaking up the permissions page into multiple pages.

So that when I edit user Zebra,
And the set his permissions, I am currently shown a list of all categories, but I need to break that list into multiple pages.

The reason for this is that once the list gets really large it will corrupt the browser from viewing it correctly.  I have learned this in the past running huge matchmaker systems where we had too many questions (i.e. form fields, drop down boxes etc), so before that happens, can anyone help me to break up that page into multiple pages?

Would also be greatfull if someone could breakup the edit categories page into multiple pages as well, while that shouldnt corrupt the browser, it will take a huge amount of time eventually to load all the categories.  Though this is not critical at the moment, whereas the above request would be.

Thanks,

3
I got a new user that signed up, and posted one image.  Shortly the image was showing 35 votes, but my server logs were showing the image had only been viewed 15 times.

So in some way someone managed to manipulate the vote system and post multiple votes.  Is there a browser out there that could circumvent the system?

I understand how a logged in user can be kept track of with the votes, but what about guests that are not logged in? How are their votes kept track of?

Thanks,

4
What I want to do is to draw attention to certain menu items in the user_info.php file.

So for example I have

Home
My Gallery
Announcements
Assignments
Contests
Logoff

What Id like to do is to put a small 5x5 flashing red gif square next to Announcements everytime I make a new announcement.

I know I can do it manually, and thats what I've done, but I'd like to put some kind of if statement in the system that when activated would do it for me.

So in the admin settings, I'd like to have a checkbox, for each menu item, that when checked would correspond to the flashing red gif on the users menu.

I would think it's as simple as if contests_on = 1 then show variable contest_gif where contest_gif is the name of a variable that would actually be an image tag in say functions.php or main.php or wherever it would have to go.

Anyone done anything like this.

Again I know I could do it manually, but I hate that, because Im quite lazy and while I do them to turn them on, I dont usually turn them off until I get really tired of looking at them with no new info.

Thanks,

5
Thanks,
This took care of the situation great.

6
No, I wasnt very clear.

What I want to do is send the actual url of the image in the validation email, right now it sends the url to the page the image is on, which I also want, but in addition I want to send out the actual direct url to the image in the validation email.

Thanks,

7
Hi,
We have disabled the right click, but when an image is submitted, our site sends out an image validation email, and in this email, we would like to be able to add the actual direct link to the photo so that the photo owner can post it to other sites, but this would help to prevent other users from just right clicking on an image and viewing the properties to see what the url is and posting it when it's not there photo to post.

Does this make sence?  Is there a way that we can use the mod that sends out image validation so that it also sends out the direct url to the image in question so that the author of the photo can use it to post to other sites, while other visitors to our site are still using the disabled right click mod?

Thanks,

8
URL sent in private (to protect the innocent) hehehehe

9
Okay, Im posting my page_header.php and my stats.php here in code so that hopefully someone else can help me diagnose why I dont get the popup box, but instead get the error message:
Warning: Cannot add header information - headers already sent by (output started at /home/xxx/xxx-www/gallery/includes/stats.php:83) in /home/xxx/xxx-www/gallery/includes/page_header.php on line 126

Heres my stats.php file:
Code: [Select]
<?PHP

//-----------------------------------------------------
//--- Show number of Users ----------------------------
//-----------------------------------------------------
   $sql = "SELECT COUNT(*) as users
          FROM ".USERS_TABLE."
          WHERE user_id <> ".GUEST;
  $row = $site_db->query_firstrow($sql);

  $total_users = "".$lang['users']."<B> ".$row['users']."</B>\n";
   
  $site_template->register_vars("total_users", $total_users);
unset($total_users);

//-----------------------------------------------------
//--- Hits --------------------------------------------
//-----------------------------------------------------
    $sql = "SELECT SUM(image_hits) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_hits = "".$lang['total_hits']."<B> ".$row['sum']."</B>\n";
   
  $site_template->register_vars("total_hits", $total_hits);
unset($total_hits);

//-----------------------------------------------------
//--- Votes -------------------------------------------
//-----------------------------------------------------
    $sql = "SELECT SUM(image_votes) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_votes = "".$lang['total_votes']."<B> ".$row['sum']."</B>\n";
   
  $site_template->register_vars("total_votes", $total_votes);
unset($total_votes);

//-----------------------------------------------------
//--- Downloads ---------------------------------------
//-----------------------------------------------------
    $sql = "SELECT SUM(image_downloads) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_downloads = "".$lang['total_downloads']."<B> ".$row['sum']."</B>\n";
   
  $site_template->register_vars("total_downloads", $total_downloads);
unset($total_downloads);

//-----------------------------------------------------
//--- Comments ----------------------------------------
//-----------------------------------------------------
    $sql = "SELECT SUM(image_comments) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_comments = "".$lang['total_comments']."<B> ".$row['sum']."</B>\n";
   
  $site_template->register_vars("total_comments", $total_comments);
unset($total_comments);

//-----------------------------------------------------
//--- New Member --------------------------------------
//-----------------------------------------------------
//   $sql = "SELECT *
//          FROM ".USERS_TABLE."
//          WHERE user_level > ".USER_AWAITING."
//          ORDER by user_joindate DESC";
//  $row = $site_db->query_firstrow($sql);
//
 // $new_member = "Welcome to our newest member, ".(($row['user_id']) ? " <a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><B>".$row['user_name']."</B></a>\n" : "<B>".$row['user_name']."</B>");
 // $site_template->register_vars("new_member", $new_member);
 // unset($new_member);


?>


And here is my entire page_header.php:
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File&#58; page_header.php                                      *
 *        Copyright&#58; &#40;C&#41; 2002 Jan Sorgalla                                *
 *            Email&#58; jan@4homepages.de                                    *
 *              Web&#58; http&#58;//www.4homepages.de                             *
 *    Scriptversion&#58; 1.7                                                  *
 *                                                                        *
 *    Never released without support from&#58; Nicky &#40;http&#58;//www.nicky.net&#41;   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen &#40;Lizenz.txt&#41; für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    &#40;Licence.txt&#41; for further information.                              *
 *                                                                        *
 *************************************************************************/
if &#40;!defined&#40;'ROOT_PATH'&#41;&#41; &#123;
  
die&#40;"Security violation"&#41;;
&#125;
//----------------------------------------------------- 
//--- Maintenance      -------------------------------- 
//----------------------------------------------------- 
$maintenance $config['maintenance'&#93;; 
$redirect_url TEMPLATE_PATH."/maintenance.html"
if &
#40;$maintenance&#41;&#123; 
  
header&#40;"Location&#58; ".$site_sess->url&#40;$redirect_url, "&"&#41;&#41;; 
  
exit; 
&
#125; 

//----------------------------------------------------- 
//--- End of Maintenance      ------------------------- 
//-----------------------------------------------------
// Cache Templates
$template_list 'header,footer,category_dropdown_form,user_logininfo,user_loginform';
if &
#40;isset&#40;$templates_used&#41; && $templates_used != ""&#41; &#123;
  
$template_list $template_list.",".$templates_used;
&
#125;
$site_template->cache_templates&#40;$template_list&#41;;
$waktu=date&#40;"l, j F Y"&#41;;
$site_template->register_vars&#40;"date",$waktu&#41;;
//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
$total_images 0;
$total_categories 0;
$auth_cat_sql['auth_viewcat'&#93;['IN'&#93; = 0;
$auth_cat_sql['auth_viewcat'&#93;['NOTIN'&#93; = 0;
if &#40;!empty&#40;$cat_cache&#41;&#41; &#123;
  
foreach &#40;$cat_cache as $key => $val&#41; &#123;
    
if &#40;check_permission&#40;"auth_viewcat", $key&#41;&#41; &#123;
      
$total_categories++;
      if &
#40;isset&#40;$val['num_images'&#93;&#41;&#41; &#123;
        
$total_images += $val['num_images'&#93;;
      
&#125;
      
else &#123;
        
$cat_cache[$key&#93;['num_images'&#93; = 0;
      
&#125;
      
$auth_cat_sql['auth_viewcat'&#93;['IN'&#93; .= ", ".$key;
    
&#125;
    
else &#123;
      
$auth_cat_sql['auth_viewcat'&#93;['NOTIN'&#93; .= ", ".$key;
    
&#125;
  
&#125;
&#125;

  
$user_cat_id ""
foreach&
#40;$cat_cache as $key => $val&#41;&#123; 
    
if &#40;$user_info['user_name'&#93; == $cat_cache[$key&#93;['cat_name'&#93;&#41; &#123;
        
$user_cat_id $key
        break; 
    &
#125; 
&#125; 
//----------------------------------------------------- 
//--- PMS --------------------------------------------- 
//----------------------------------------------------- 
$sql "SELECT COUNT&#40;pms_id&#41; AS total 
                FROM "
.PMS_TABLE.
                WHERE pms_to = "
.$user_info['user_id'&#93;." AND &#40;pms_type = ".PMS_SENT." OR pms_type = ".PMS_SDLT." OR pms_type = ".PMS_UNREAD."&#41;"; 
$result $site_db->query_firstrow&#40;$sql&#41;; 
$pms_inbox $result['total'&#93;; 
$sql "SELECT COUNT&#40;pms_id&#41; AS total 
                FROM "
.PMS_TABLE.
                WHERE pms_from = "
.$user_info['user_id'&#93;." AND pms_type = ".PMS_UNREAD; 
$result $site_db->query_firstrow&#40;$sql&#41;; 
$pms_outbox $result['total'&#93;; 
$sql "SELECT COUNT&#40;pms_id&#41; AS total 
                FROM "
.PMS_TABLE.
                WHERE pms_from = "
.$user_info['user_id'&#93;." AND &#40;pms_type = ".PMS_SENT." OR pms_type = ".PMS_RDLT."&#41;"; 
$result $site_db->query_firstrow&#40;$sql&#41;; 
$pms_sentbox $result['total'&#93;; 
$sql "SELECT COUNT&#40;pms_id&#41; AS new 
                FROM "
.PMS_TABLE.
                WHERE pms_to = "
.$user_info['user_id'&#93;." AND pms_type = ".PMS_UNREAD; 
$result $site_db->query_firstrow&#40;$sql&#41;; 
$pms_new "<a href=\"".$site_sess->url&#40;ROOT_PATH."pms.php"&#41;."\">".&#40;&#40;$result['new'&#93;&#41; ? "<blink>".$result['new'&#93;."</blink>" &#58; 0&#41;."</a>"; 
$pms preg_replace&#40;"/".$site_template->start."msg_new_count".$site_template->end."/siU", $pms_new, $lang['pms_link'&#93;&#41;; 
$pms preg_replace&#40;"/".$site_template->start."inbox".$site_template->end."/siU", "<a href=\"".$site_sess->url&#40;ROOT_PATH."pms.php"&#41;."\">".$lang['pms_inbox'&#93;."</a>", $pms&#41;; 
// PMS Boxes 
$blink "<script language=\"JavaScript\">\n<!--\nvar flg=0;\nfunction blink&#40;&#41;&#123;\nvar myElement=document.getElementById&#40;'blnk'&#41;;\nflg^=1;\nif&#40;flg==1&#41;&#123;\nmyElement.style.visibility='hidden';\n&#125;\nelse&#123;\nmyElement.style.visibility='visible';\n&#125;\ntimerID = setTimeout&#40; 'blink&#40;&#41;' , 500 &#41;;\n&#125;\n//-->\n</script>\n"
$show_inbox = &#40;$result['new'&#93;&#41; ? $blink."<span id=\"blnk\">".$lang['pms_inbox'&#93;."</span><script language=\"JavaScript\">blink&#40;&#41;;</script>" &#58; $lang['pms_inbox'&#93;; 
$inbox "<a href=\"".$site_sess->url&#40;ROOT_PATH."pms.php?action=inbox"&#41;."\" title=\"".$lang['pms_total'&#93;." &#40;".$pms_inbox."&#41;\">".$show_inbox."</a>"; 
$sentbox "<a href=\"".$site_sess->url&#40;ROOT_PATH."pms.php?action=sentbox"&#41;."\" title=\"".$lang['pms_total'&#93;." &#40;".$pms_sentbox."&#41;\">".$lang['pms_sentbox'&#93;."</a>"; 
$outbox "<a href=\"".$site_sess->url&#40;ROOT_PATH."pms.php?action=outbox"&#41;."\" title=\"".$lang['pms_total'&#93;." &#40;".$pms_outbox."&#41;\">".$lang['pms_outbox'&#93;."</a>"; 
$newpms "<a href=\"".$site_sess->url&#40;ROOT_PATH."pms.php?action=new"&#41;."\">".$lang['pms_new'&#93;."</a>"; 

$sql "SELECT pms_date 
                FROM "
.PMS_TABLE.
                WHERE pms_to = "
.$user_info['user_id'&#93;." AND pms_type = ".PMS_UNREAD." 
                
ORDER BY pms_date DESC"; 
$result = $site_db->query_firstrow&#40;$sql&#41;; 
$pms_popup_script = ""; 
$pms_popup_header = ""; 
if &#40;
$result && $user_info['user_pms_popup'&#93; && !ereg&#40;"pms.php", $self_url&#41;&#41; &#123; 
    
$cookie_name = &#40;defined&#40;"COOKIE_NAME"&#41;&#41; ? COOKIE_NAME &#58; "4images_"; 
    
$cookie_pmsnewpopup = isset&#40;$HTTP_COOKIE_VARS[$cookie_name.'pmsnewpopup'&#93;&#41; ? unserialize&#40;stripslashes&#40;$HTTP_COOKIE_VARS[$cookie_name.'pmsnewpopup'&#93;&#41;&#41; &#58; 0; 
    
$pmsnewpopup = &#40;isset&#40;$session_info['pmsnewpopup'&#93;&#41;&#41; ? $session_info['pmsnewpopup'&#93; &#58; $cookie_pmsnewpopup
    if &#40;
$pmsnewpopup < $result['pms_date'&#93;&#41; &#123; 
        
$cookie_expire = time&#40;&#41; + 60 * 60 * 24 * 90; 
        setcookie&#40;
$cookie_name.'pmsnewpopup', serialize&#40;$result['pms_date'&#93;&#41;, $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE&#41;; 
        
$site_sess->set_session_var&#40;"pmsnewpopup", $result['pms_date'&#93;&#41;; 
        
$pms_popup_script = "<script language=\"JavaScript\"> 
        <!-- 
        function confirm_newpm&#40;&#41; &#123; 
            input_box=confirm&#40;'"
.$lang['pms_popup_confirm'&#93;."'&#41;; 
            
if &#40;input_box==true&#41; &#123; // Output when OK is clicked 
                
second_box=confirm&#40;'".$lang['pms_popup_newwindow'&#93;."'&#41;; 
                
if &#40;second_box==true&#41; &#123; 
                    
window.open&#40;'".$site_sess->url&#40;ROOT_PATH."pms.php"&#41;."','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50'&#41;; 
                
&#125; else &#123; 
                    
window.location='".$site_sess->url&#40;ROOT_PATH."pms.php"&#41;."'
                &
#125; 
            
&#125; else &#123; 
            // Output when Cancel is clicked 
            
&#125; 
        
&#125; 
        // --> 
        
</script>"; 
        
$pms_popup_header = "onload=\"Javascript&#58;confirm_newpm&#40;&#41;\""
    &
#125; 
&#125; 

$site_template->register_vars&#40;array&#40; 
    
"pms_boxes" => &#40;$user_info['user_level'&#93; < USER&#41; ? "" &#58; $inbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$sentbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$outbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$newpms, 
    
"pms_popup_script" => $pms_popup_script
    
"pms_popup_header" => $pms_popup_header
  
"media_url" => MEDIA_PATH
"user_cat_url" => &#40;$user_cat_id&#41; ? "<a href=\"".$site_sess->url&#40;ROOT_PATH."categories.php?cat_id=".$user_cat_id&#41;."\" class=\"box2\">My Gallery</a>" &#58; "",
  
"thumb_url" => THUMB_PATH,
  
"icon_url" => ICON_PATH,
  
"template_url" => TEMPLATE_PATH,
  
"template_image_url" => TEMPLATE_PATH."/images",
  
"template_lang_image_url" => TEMPLATE_PATH."/images_".$config['language_dir'&#93;,
  
"site_name" => $config['site_name'&#93;,
  
"site_email" => $config['site_email'&#93;,
  
"self" => $site_sess->url&#40;$self_url&#41;,
  
"self_full" => $site_sess->url&#40;$script_url."/".$self_url&#41;,
  
"script_version" => SCRIPT_VERSION,
  
"cp_link" => &#40;$user_info['user_level'&#93; != ADMIN&#41; ? "" &#58; "\n<p align=\"center\">[<a href=\"".$site_sess->url&#40;ROOT_PATH."admin/index.php"&#41;."\">Control Panel</a>&#93;</p>\n",
  
"total_categories" => $total_categories,
  
"total_images" => $total_images,
  
"url_new_images" => $site_sess->url&#40;ROOT_PATH."search.php?search_new_images=1"&#41;,
  
"url_top_images" => $site_sess->url&#40;ROOT_PATH."top.php"&#41;,
  
"url_top_cat_images" => $site_sess->url&#40;ROOT_PATH."top.php".&#40;&#40;$cat_id && preg_match&#40;"/categories.php/", $self_url&#41;&#41; ? "?".URL_CAT_ID."=".$cat_id &#58; ""&#41;&#41;,
  
"url_register" => &#40;!empty&#40;$url_register&#41;&#41; ? $site_sess->url&#40;$url_register&#41; &#58; $site_sess->url&#40;ROOT_PATH."register.php"&#41;,
  
"url_search" => $site_sess->url&#40;ROOT_PATH."search.php"&#41;,
  
"url_lightbox" => $site_sess->url&#40;ROOT_PATH."lightbox.php"&#41;,
  
"url_control_panel" => &#40;!empty&#40;$url_control_panel&#41;&#41; ? $site_sess->url&#40;$url_control_panel&#41; &#58; $site_sess->url&#40;ROOT_PATH."member.php?action=editprofile"&#41;,
  
"url_categories" => $site_sess->url&#40;ROOT_PATH."categories.php"&#41;,
  
"url_home" => $site_sess->url&#40;ROOT_PATH."index.php"&#41;,
  
"url_login" => &#40;!empty&#40;$url_login&#41;&#41; ? $site_sess->url&#40;$url_login&#41; &#58; $site_sess->url&#40;ROOT_PATH."login.php"&#41;,
  
"url_logout" => &#40;!empty&#40;$url_logout&#41;&#41; ? $site_sess->url&#40;$url_logout&#41; &#58; $site_sess->url&#40;ROOT_PATH."logout.php"&#41;,
  
"url_member" => &#40;!empty&#40;$url_member&#41;&#41; ? $site_sess->url&#40;$url_member&#41; &#58; $site_sess->url&#40;ROOT_PATH."member.php"&#41;,
  
"url_upload" => &#40;!empty&#40;$url_upload&#41;&#41; ? $site_sess->url&#40;$url_upload&#41; &#58; $site_sess->url&#40;ROOT_PATH."member.php?action=uploadform"&#41;,
  
"url_lost_password" => &#40;!empty&#40;$url_lost_password&#41;&#41; ? $site_sess->url&#40;$url_lost_password&#41; &#58; $site_sess->url&#40;ROOT_PATH."member.php?action=lostpassword"&#41;,
  
"guest" => &#40;$user_info['user_level'&#93; == GUEST&#41; ? 1 &#58; 0
&#41;&#41;;

if &#40;!empty&#40;$additional_urls&#41;&#41; &#123;
  
$register_array = array&#40;&#41;;
  
foreach &#40;$additional_urls as $key => $val&#41; &#123;
    
$register_array[$key&#93; = $site_sess->url&#40;$val&#41;;
  
&#125;
  
$site_template->register_vars&#40;$register_array&#41;;
&#125;

// Replace Globals in $lang
$lang $site_template->parse_array&#40;$lang&#41;;

$site_template->register_vars&#40;array&#40;
  
"lang_site_stats" => $lang['site_stats'&#93;,
  
"lang_registered_user" => $lang['registered_user'&#93;,
  
"lang_random_image" => $lang['random_image'&#93;,
  
"lang_categories" => $lang['categories'&#93;,
  
"lang_sub_categories" => $lang['sub_categories'&#93;,
  
"lang_new_images" => $lang['new_images'&#93;,
  
"lang_top_images" => $lang['top_images'&#93;,
  
"lang_search" => $lang['search'&#93;,
  
"lang_advanced_search" => $lang['advanced_search'&#93;,
  
"lang_lightbox" => $lang['lightbox'&#93;,
  
"lang_register" => $lang['register'&#93;,
  
"lang_reregister" => $lang['reregister'&#93;,
  
"lang_control_panel" => $lang['control_panel'&#93;,
  
"lang_login" => $lang['login'&#93;,
  
"lang_auto_login" => $lang['lang_auto_login'&#93;,
  
"lang_logout" => $lang['logout'&#93;,
  
"lang_lost_password" => $lang['lost_password'&#93;,
  
"lang_user_name" => $lang['user_name'&#93;,
  
"lang_password" => $lang['password'&#93;,
  
"lang_go" => $lang['go'&#93;,
  
"lang_images_per_page" => $lang['images_per_page'&#93;,
  
"lang_user_online" => $lang['user_online'&#93;,
  
"lang_user_online_detail" => $lang['user_online_detail'&#93;,
  
"charset" => $lang['charset'&#93;,
  
"direction" => $lang['direction'&#93;,
  
"memberbar" => $lang['memberbar'&#93;
&#41;&#41;;

//-----------------------------------------------------
//--- Category Dropdown -------------------------------
//-----------------------------------------------------
$category_dropdown_selfjump get_category_dropdown&#40;$cat_id, 1&#41;;
$site_template->register_vars&#40;"category_dropdown_selfjump", $category_dropdown_selfjump&#41;;
$category_dropdown_form $site_template->parse_template&#40;"category_dropdown_form"&#41;;
$site_template->register_vars&#40;array&#40;"category_dropdown_form" => $category_dropdown_form&#41;&#41;;

$site_template->un_register_vars&#40;"category_dropdown_selfjump"&#41;;
unset&#40;$category_dropdown_selfjump&#41;;
unset&#40;$category_dropdown_form&#41;;

//-----------------------------------------------------
//--- Random Image ------------------------------------
//-----------------------------------------------------
$random_image = &#40;defined&#40;"SHOW_RANDOM_IMAGE"&#41; && SHOW_RANDOM_IMAGE == 0&#41; ? "" &#58; get_random_image&#40;&#41;;
$site_template->register_vars&#40;"random_image", $random_image&#41;;
unset&#40;$random_image&#41;;
//----------------------------------------------------- 
//--- Photo Of The Day -------------------------------- 
//----------------------------------------------------- 

$potd_image = &#40;defined&#40;"SHOW_POTD_IMAGE"&#41; && SHOW_POTD_IMAGE == 0&#41; ? "" &#58; get_potd_image&#40;&#41;; 
$site_template->register_vars&#40;"potd_image", $potd_image&#41;; 
$site_template->register_vars&#40;array&#40;"lang_potd_title" => $lang['potd_title'&#93;&#41;&#41;; 
switch &#40;POTD_SELECT_MODE&#41; &#123; 
    
case "by_rating"    &#58; $site_template->register_vars&#40;array&#40;"lang_potd_type" => $lang['potd_type_rating'&#93;&#41;&#41;; break; 
    
case "by_votes"     &#58; $site_template->register_vars&#40;array&#40;"lang_potd_type" => $lang['potd_type_votes'&#93;&#41;&#41;; break; 
    
case "by_comments"  &#58; $site_template->register_vars&#40;array&#40;"lang_potd_type" => $lang['potd_type_comments'&#93;&#41;&#41;; break; 
    
case "by_downloads" &#58; $site_template->register_vars&#40;array&#40;"lang_potd_type" => $lang['potd_type_downloads'&#93;&#41;&#41;; break; 
    
case "by_hits"      &#58; $site_template->register_vars&#40;array&#40;"lang_potd_type" => $lang['potd_type_hits'&#93;&#41;&#41;; break; 
&#125; 
unset&#40;$potd_image&#41;; 

//--- End Photo Of The Day ----------------------------
//-----------------------------------------------------
//--- Set Paging Vars ---------------------------------
//-----------------------------------------------------
if &#40;isset&#40;$HTTP_POST_VARS['setperpage'&#93;&#41;&#41; &#123;
  
$setperpage intval&#40;$HTTP_POST_VARS['setperpage'&#93;&#41;;
  
if &#40;$setperpage&#41; &#123;
    
$site_sess->set_session_var&#40;"perpage", $setperpage&#41;;
    
$session_info['perpage'&#93; = $setperpage;
  
&#125;
&#125;

if &#40;isset&#40;$session_info['perpage'&#93;&#41;&#41; &#123;
  
$perpage $session_info['perpage'&#93;;
&#125;
else &#123;
  
$perpage ceil&#40;$config['default_image_rows'&#93; * $config['image_cells'&#93;&#41;;
&#125;

//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
$setperpage_dropdown "\n<select name=\"setperpage\" class=\"setperpageselect\">\n";
for&
#40;$i = 1; $i <= $config['custom_row_steps'&#93;; $i++&#41; &#123;
  
$setvalue $config['image_cells'&#93; * $i;
  
$setperpage_dropdown .= "<option value=\"".$setvalue."\"";
    if &
#40;$setvalue == $perpage&#41; &#123;
    
$setperpage_dropdown .= " selected=\"selected\"";
  &
#125;
  
$setperpage_dropdown .= ">";
  
$setperpage_dropdown .= $setvalue;
  
$setperpage_dropdown .= "</option>\n";
&
#125;
$setperpage_dropdown .= "</select>\n";
if &
#40;$cat_id != 0&#41; &#123;
  
$setperpage_dropdown .= "<input type=\"hidden\" name=\"cat_id\" value=\"".$cat_id."\" />\n";
&
#125;
if &#40;isset&#40;$show_result&#41; && $show_result == 1&#41; &#123;
  
$setperpage_dropdown .= "<input type=\"hidden\" name=\"show_result\" value=\"1\" />\n";
&
#125;
$site_template->register_vars&#40;"setperpage_dropdown", $setperpage_dropdown&#41;;
$setperpage_dropdown_form $site_template->parse_template&#40;"setperpage_dropdown_form"&#41;;
$site_template->register_vars&#40;"setperpage_dropdown_form", $setperpage_dropdown_form&#41;;

$site_template->un_register_vars&#40;"setperpage_dropdown"&#41;;
unset&#40;$setperpage_dropdown&#41;;
unset&#40;$setperpage_dropdown_form&#41;;

//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if &#40;$action == "addtolightbox" && $id&#41; &#123;
  
if &#40;$user_info['user_level'&#93; >= USER&#41; &#123;
    
$msg = &#40;add_to_lightbox&#40;$id&#41;&#41; ? $lang['lightbox_add_success'&#93; &#58; $lang['lightbox_add_error'&#93;;
  
&#125;
  
else &#123;
    
$msg $lang['lightbox_register'&#93;;
  
&#125;
&#125;
if &#40;$action == "removefromlightbox" && $id&#41; &#123;
  
if &#40;$user_info['user_level'&#93; >= USER&#41; &#123;
    
$msg = &#40;remove_from_lightbox&#40;$id&#41;&#41; ? $lang['lightbox_remove_success'&#93; &#58; $lang['lightbox_remove_error'&#93;;
  
&#125;
  
else &#123;
    
$msg $lang['lightbox_register'&#93;;
  
&#125;
&#125;
if &#40;$action == "clearlightbox"&#41; &#123;
  
if &#40;$user_info['user_level'&#93; >= USER&#41; &#123;
    
$msg = &#40;clear_lightbox&#40;&#41;&#41; ? $lang['lightbox_delete_success'&#93; &#58; $lang['lightbox_delete_error'&#93;;
  
&#125;
  
else &#123;
    
$msg $lang['lightbox_register'&#93;;
  
&#125;
&#125;

//-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
if &#40;$action == "rateimage" && $id&#41; &#123;
  
$rating intval&#40;$HTTP_POST_VARS['rating'&#93;&#41;;
  
$cookie_name = &#40;defined&#40;"COOKIE_NAME"&#41;&#41; ? COOKIE_NAME &#58; "4images_";
  
$cookie_rated = isset&#40;$HTTP_COOKIE_VARS[$cookie_name.'rated'&#93;&#41; ? unserialize&#40;stripslashes&#40;$HTTP_COOKIE_VARS[$cookie_name.'rated'&#93;&#41;&#41; &#58; array&#40;&#41;;
  
if &#40;$rating && $rating <= MAX_RATING && $id&#41; &#123;
    
if &#40;!isset&#40;$session_info['rated_imgs'&#93;&#41;&#41; &#123;
      
$session_info['rated_imgs'&#93; = $site_sess->get_session_var&#40;"rated_imgs"&#41;;
    
&#125;    
    
$split_list = array&#40;&#41;;
    
if &#40;!empty&#40;$session_info['rated_imgs'&#93;&#41;&#41; &#123;
      
$split_list explode&#40;" ", $session_info['rated_imgs'&#93;&#41;;
    
&#125;
    
if &#40;!in_array&#40;$id, $split_list&#41; && !in_array&#40;$id, $cookie_rated&#41;&#41; &#123;
      
$session_info['rated_imgs'&#93; .= " ".$id;
      
$session_info['rated_imgs'&#93; = trim&#40;$session_info['rated_imgs'&#93;&#41;;
      
$site_sess->set_session_var&#40;"rated_imgs", $session_info['rated_imgs'&#93;&#41;;
      
$cookie_rated[&#93; = $id;
      
$cookie_expire time&#40;&#41; + 60 * 60 * 24 * 4;
      
setcookie&#40;$cookie_name.'rated', serialize&#40;$cookie_rated&#41;, $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE&#41;;
      
update_image_rating&#40;$id, $rating&#41;;
      
$msg $lang['voting_success'&#93;;
    
&#125;
    
else &#123;
      
$msg $lang['already_voted'&#93;;
    
&#125;
  
&#125;
  
else &#123;
    
$msg $lang['voting_error'&#93;;
  
&#125;
&#125;

//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if &#40;isset&#40;$main_template&#41; && $main_template&#41; &#123;
  
$header $site_template->parse_template&#40;"header"&#41;;
  
$footer $site_template->parse_template&#40;"footer"&#41;;
  
$site_template->register_vars&#40;array&#40;
    
"header" => $header,
    
"footer" => $footer
  
&#41;&#41;;
  
unset&#40;$header&#41;;
  
unset&#40;$footer&#41;;
&#125;

//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if &#40;$user_info['user_level'&#93; >= USER&#41; &#123;
  
$site_template->register_vars&#40;"lang_loggedin_msg", preg_replace&#40;"/".$site_template->start."loggedin_user_name".$site_template->end."/siU", $user_info['user_name'&#93;, $lang['lang_loggedin_msg'&#93;&#41;&#41;;
  
$user_box $site_template->parse_template&#40;"user_logininfo"&#41;;
  
$site_template->register_vars&#40;array&#40;
    
"user_box" => $user_box,
    
"user_loggedin" => 1,
    
"user_loggedout" => 0,
    
"is_admin" => &#40;$user_info['user_level'&#93; == ADMIN&#41; ? 1 &#58; 0

  
&#41;&#41;;  
  
$site_template->un_register_vars&#40;"user_logininfo"&#41;;
  
unset&#40;$user_box&#41;;
&#125;
else &#123;
  
$user_box $site_template->parse_template&#40;"user_loginform"&#41;;
  
$site_template->register_vars&#40;array&#40;
    
"user_box" => $user_box,
    
"user_loggedin" => 0,
    
"user_loggedout" => 1,
    
"is_admin" => 0
  
&#41;&#41;;
  
$site_template->un_register_vars&#40;"user_loginform"&#41;;
  
unset&#40;$user_box&#41;;
&#125;
?>

10
Thanks,
i've got that mod installed, but I need to be able to put a one line response in it based on the image in question.

So if someone uploads an adult photo, I would want the email to be standard up to the point where it would say:
Your photo has been rejected:
1. Because it's an adult oriented photo

Or if it was a known copyright violation, then I want to add
1. Because it's a known copyrighted image.

With his mod (and its good) it will only send out a basic decline form, but I want to add one line dependant on the circumstances of the photo in question.

11
Im wondering if it would be possible that we have multiple emails to send out when a photo gets declined.

Perhaps it could work something like

On the admins validation page there could be a text box where we can type in a specific reason why the photo is not being validated, then this text could get inserted into the email message that gets sent out so the end user knows specifically why the photo has been declined.

Any takers on doing something like this?

12
I know I should be gratefull for someone wanting to add more than 25 photos to my site, but it just sits in my craw that they go to the trouble to circumvent the system I have in place now.

13
I have the need to ban or rather not let anyone using a free email provider access to register on my site.

So I want to not allow hotmail freemail lycos etc etc etc etc etc.

The problem seems to be that people signup for multiple email accounts on places like hotmail and the only way I spoted this was because a user registered with a username that is almost the same as another registered user in that one might be dubulous and kubulous  and they both have hotmail accounts, so I'd rather just ban any further signups that use any of the free email accounts but allow the ones already registered to stay.

Has anyone done this, is doing this or can do this?

Thanks,

14
Discussion & Troubleshooting / Was working, now it's not working
« on: June 02, 2003, 10:08:27 PM »
And now it's working again.  Totally bizzare!

All I did do this time was go into the 4imagesg_users table, and change the value of the admin for group type from 2 to 1, then it was working again, so I changed it back to 2 and it's still working, so this must not have anything to do with it.

Im stumped on this and what could have caused this to happen.

15
Discussion & Troubleshooting / Was working, now it's not working
« on: June 02, 2003, 09:39:52 PM »
Also, from the stats on the index.php page it shows:
Code: [Select]
No categories found.0 images in 0 categories.
Total Members: 45 Total Image Votes: 324 Total Image Comments: 50 Total Image Hits: 2936 Total Image Downloads: 10


This tells me that their might be a problem with the categories, but when I go into myphpmysql (or whatever the name of the program is), it shows me a 4imagesg_categories table and it has all the data in there.

But also all my dropdown lists of categories are not functioning at all, they just show
"choose category"
--------------------

But no category listings.

What in the world happened?  I've tried my other sites on the same server that use their own mysql databases and they all function, so it's something specific to this site, but Im not sure where to look.

Thanks,

Pages: [1] 2 3 4 5 ... 8