Notice: Undefined variable: show in /home/www/lindsayl/cp_latest.php on line 7

Notice: Undefined variable: random in /home/www/lindsayl/cp_latest.php on line 20
function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } EOT; // definition taken from init.inc.php $CONFIG['TABLE_PICTURES'] = $CONFIG['TABLE_PREFIX']."pictures"; $CONFIG['TABLE_ALBUMS'] = $CONFIG['TABLE_PREFIX']."albums"; $CONFIG['TABLE_COMMENTS'] = $CONFIG['TABLE_PREFIX']."comments"; $CONFIG['TABLE_CATEGORIES'] = $CONFIG['TABLE_PREFIX']."categories"; $CONFIG['TABLE_CONFIG'] = $CONFIG['TABLE_PREFIX']."config"; $CONFIG['TABLE_USERGROUPS'] = $CONFIG['TABLE_PREFIX']."usergroups"; $CONFIG['TABLE_VOTES'] = $CONFIG['TABLE_PREFIX']."votes"; $CONFIG['TABLE_USERS'] = $CONFIG['TABLE_PREFIX']."users"; // Connect to database if($cpgconn != 1) { if(db_connect() == FALSE) { // die("Coppermine critical error:
Unable to connect to database !

MySQL said: ".mysql_error().""); $cpgconn = 0; } else { $cpgconn = 1; } } // If connected, process through if($cpgconn == 1) { // get config data $result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name='fullpath'"); $row = mysql_fetch_row($result); $cpg_album_path=$row[1]; $result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name='thumb_pfx'"); $row = mysql_fetch_row($result); $cpg_thumb_pfx=$row['1']; $result = mysql_query("SELECT * from {$CONFIG['TABLE_CONFIG']} WHERE name='thumbcols'"); $row = mysql_fetch_row($result); $cpg_thumbcols=$row['1']; if ($function == 'cpg_thumb' || $function == 'recentTopics' || $function == 'whosOnline' || $function == 'welcome' || $function == 'menubar' || $function == 'logout' || $function == 'login' || $function == 'topBoards' || $function == 'topTopicsViews' || $function == 'topTopicsReplies' || $function == 'latestMember' || $function == 'boardStats') { $function(); // Execute Function exit; } } function cpg_thumb() { GLOBAL $CONFIG,$url_of_cpg_dir,$cpg_album_path,$cpg_thumb_pfx,$cpg_thumbcols,$cpg_lang_random,$cpg_lang_views,$cpg_lang_keywords; $numargs = func_num_args(); $arg_list = func_get_args(); if ($numargs > 0) {$cpg_include_link=$arg_list[0];} if ($numargs > 1) {$cpg_link_singlepic=$arg_list[1];} if ($numargs > 2) {$cpg_how_many=$arg_list[2];} if ($numargs > 3) {$cgp_limit_album=$arg_list[3];} if ($numargs > 4) {$cpg_random=$arg_list[4];} if ($numargs > 5) {$cpg_link_target=$arg_list[5];} if ($cpg_link_target==""){$cpg_link_target="_top";} //get pic info $query = "SELECT * from {$CONFIG['TABLE_PICTURES']} WHERE approved='YES' "; if($cgp_limit_album!=""){$query.="AND aid='".$cgp_limit_album."'";} $query.=" AND user2!='1' ORDER BY "; if($cpg_random=="1"){$query.="RAND()";}else{$query.="ctime";} $query.=" DESC LIMIT 0,".$cpg_how_many; $result = mysql_query($query); if ($cpg_how_many!=1) { $return_value=""; //$td_start="
"; //$td_end="
"; $td_start=""; $td_end=""; $cpg_table_end=""; $tr_start=""; $tr_end=""; } else { $return_value=""; $td_start=""; $td_end=""; $cpg_table_end=""; $tr_start=""; $tr_end=""; } $counter=0; if ($cpg_thumbcols > $cpg_how_many) {$cpg_thumbcols=$cpg_how_many;} while ($row = mysql_fetch_array($result)) { //------ if ($counter==0){$return_value.=$tr_start;} $return_value.=$td_start; if ($cpg_include_link==1) { $return_value.= ""; if ($cpg_include_link==1){$return_value.="";} $return_value.=$td_end."\n"; $counter++; if ($counter==$cpg_thumbcols){$counter=0;$return_value.=$tr_end;} } $return_value.=$cpg_table_end; return $return_value; } function cpg_single() { $numargs = func_num_args(); $arg_list = func_get_args(); if ($numargs > 0){return cpg_thumb(1,1,1,"",0,$arg_list[0]);} else{return cpg_thumb(1,1,1,"",0);} } function cpg_total_pics($cgp_limit_album) { GLOBAL $CONFIG,$cpg_decimal_point,$cpg_thousands_separator; $query = "SELECT COUNT(*) from {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES'"; if($cgp_limit_album!=""){$query.=" AND aid='".$cgp_limit_album."'";} $result = mysql_query($query); $nbEnr = mysql_fetch_array($result); $pic_count = $nbEnr[0]; mysql_free_result($result); return number_format($pic_count,0,$cpg_decimal_point,$cpg_thousands_separator); } function cpg_total_views($cgp_limit_album) { GLOBAL $CONFIG,$cpg_decimal_point,$cpg_thousands_separator; $query = "SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"; if($cgp_limit_album!=""){$query.=" AND aid='".$cgp_limit_album."'";} $result = mysql_query($query); $nbEnr = mysql_fetch_array($result); $view_count = $nbEnr[0]; mysql_free_result($result); return number_format($view_count,0,$cpg_decimal_point,$cpg_thousands_separator); } function cpg_hit_ratio($cgp_limit_album) { GLOBAL $CONFIG; //get stats $result=mysql_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; $result=mysql_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; $cpg_ratio_string=str_replace(".", ",",(floor(((str_replace(".", "", cpg_total_views($cgp_limit_album))/str_replace(".", "", cpg_total_pics($cgp_limit_album)))*10)/($hit_count/$picture_count)))/10); //$cpg_ratio_string=cpg_total_views($cgp_limit_album).'|'.cpg_total_pics($cgp_limit_album).'|'.$hit_count.'|'.$picture_count; return $cpg_ratio_string; } function cpg_stat_string($cgp_limit_album) { GLOBAL $url_of_cpg_dir,$cpg_lang_pics,$cpg_lang_views; $cpg_stat_string='['; $cpg_stat_string.=cpg_total_pics($cgp_limit_album); $cpg_stat_string.=' ' . $cpg_lang_pics . ', '; $cpg_stat_string.=cpg_total_views($cgp_limit_album); $cpg_stat_string.=' ' . $cpg_lang_views . ''; $cpg_stat_string.=', SF: '.cpg_hit_ratio($cgp_limit_album).''; $cpg_stat_string.=']'; return $cpg_stat_string; } function cpg_total_albums() { GLOBAL $CONFIG,$cpg_decimal_point,$cpg_thousands_separator; $query = "SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1"; $result = mysql_query($query); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); return number_format($album_count,0,$cpg_decimal_point,$cpg_thousands_separator); } function cpg_total_comments() { GLOBAL $CONFIG,$cpg_decimal_point,$cpg_thousands_separator; $query = "SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE 1"; $result = mysql_query($query); $nbEnr = mysql_fetch_array($result); $comments_count = $nbEnr[0]; mysql_free_result($result); return number_format($comments_count,0,$cpg_decimal_point,$cpg_thousands_separator); } function cpg_total_cats() { GLOBAL $CONFIG,$cpg_decimal_point,$cpg_thousands_separator; $query = "SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1"; $result = mysql_query($query); $nbEnr = mysql_fetch_array($result); $cats_count = $nbEnr[0]; mysql_free_result($result); return number_format($cats_count,0,$cpg_decimal_point,$cpg_thousands_separator); } function cpg_random() { return cpg_thumb(1,1,1,"",1); } function cpg_search($cpg_size,$cpg_question,$cpg_submit_text) { GLOBAL $url_of_cpg_dir; $cpg_search_string = "
"; if ($cpg_submit_text!="" and $cpg_submit_text!="0") { $cpg_search_string.= " "; } $cpg_search_string.= "
"; return $cpg_search_string; } function cpg_stats() { GLOBAL $CONFIG; $result=mysql_query("SELECT count(*) FROM {$CONFIG['TABLE_ALBUMS']} WHERE 1"); $nbEnr = mysql_fetch_array($result); $album_count = $nbEnr[0]; mysql_free_result($result); $result=mysql_query("SELECT count(*) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); $picture_count = $nbEnr[0]; mysql_free_result($result); $result=mysql_query("SELECT count(*) FROM {$CONFIG['TABLE_COMMENTS']} WHERE 1"); $nbEnr = mysql_fetch_array($result); $comment_count = $nbEnr[0]; mysql_free_result($result); $result=mysql_query("SELECT count(*) FROM {$CONFIG['TABLE_CATEGORIES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); $cat_count = $nbEnr[0] - $HIDE_USER_CAT; mysql_free_result($result); $result=mysql_query("SELECT sum(hits) FROM {$CONFIG['TABLE_PICTURES']} WHERE 1"); $nbEnr = mysql_fetch_array($result); $hit_count = (int)$nbEnr[0]; mysql_free_result($result); print $picture_count.", ".$album_count.", ".$cat_count.", ".$comment_count.", ".$hit_count; } //function taken from functions.inc.php function db_connect() { global $CONFIG; $result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']); if (!$result) return false; if (!mysql_select_db($CONFIG['dbname'])) return false; return $result; } ?>
Notice: Undefined variable: cpgconn in /home/www/lindsayl/cp_latest.php on line 31
This gallery feature is temporarily unavailable. Check back in a few minutes.