This is the parse error that I get:
Parse error: parse error, unexpected '{' in /home/animati/public_html/studio/upload.php on line 5
Here's what I added to upload.php ( Nibblets code addition from lines 4 to line 8 )
I also tried adding the code after Line 48, got same parse error message.
1 <?php
2
3
4 //Limit the number of uploads per user in 24 hour period.
5 $query = db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = '$user_id' AND ctime > NOW() - (24*60*60)");
6 if ((mysql_num_rows($query) >= 2) {
7 cpg_die(INFORMATION, "You have reached your upload quota of 2 picture(s) per 24hr.");
8 }
9
10 // ------------------------------------------------------------------------- //
11 // Coppermine Photo Gallery 1.3.2 //
12 // ------------------------------------------------------------------------- //
13 // Copyright (C) 2002-2004 Gregory DEMAR //
14 // http://www.chezgreg.net/coppermine/ //
15 // ------------------------------------------------------------------------- //
16 // Updated by the Coppermine Dev Team //
17 // (http://coppermine.sf.net/team/) //
18 // see /docs/credits.html for details //
19 // ------------------------------------------------------------------------- //
20 // This program is free software; you can redistribute it and/or modify //
21 // it under the terms of the GNU General Public License as published by //
22 // the Free Software Foundation; either version 2 of the License, or //
23 // (at your option) any later version. //
24 // ------------------------------------------------------------------------- //
25 // CVS version: $Id: upload.php,v 1.9 2004/07/28 08:25:25 gaugau Exp $
26 // ------------------------------------------------------------------------- //
27
28
29 // Confirm we are in Coppermine and set the language blocks.
30 define('IN_COPPERMINE', true);
31 define('UPLOAD_PHP', true);
32 define('DB_INPUT_PHP', true);
33 define('CONFIG_PHP', true);
34
35 // Call basic functions, etc.
36 require('include/init.inc.php');
37 require('include/picmgmt.inc.php');
38
39 // Some placeholders.
40 $customize = CUSTOMIZE_UPLOAD_FORM;
41 $user_form = USER_UPLOAD_FORM;
42 $allowed_URI_boxes = NUM_URI_BOXES;
43 $allowed_file_boxes = NUM_FILE_BOXES;
44
45 // Check to see if user can upload pictures. Quit with an error if he cannot.
46 if (!USER_CAN_UPLOAD_PICTURES) {
47 cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);
48 }