I got this when i tried to fix a cam-portal (24 Update Cam Portal Script v 3.3).
Warning: extract(): First argument should be an array in /home/PROTECTED/public_html/PROTECTED/mods/stats.php on line 42
Det finns totalt 1 medlemmar i portalen.
Det finns totalt 10 kategorier från 1 olika länder.
Det finns totalt Totalt bilder cam images in the member archives.
Warning: extract(): First argument should be an array in /home/PROTECTED/public_html/PROTECTED/mods/stats.php on line 85
Det finns totalt Totalt bilder nya bilder idag.
Warning: extract(): First argument should be an array in /home/PROTECTED/public_html/PROTECTED/mods/stats.php on line 99
Det finns totalt Totalt bilder B image transfer in .
stats.php
<?
$update1 = "update db_cam_total set total_images = '0' where id = 'total'";
@mysql_query($update1);
$query = @mysql_query("SELECT id FROM db_cam WHERE active = '1' GROUP BY id");
while ($rows = mysql_fetch_array($query)){
$user_id = $rows[id];
$nums = @mysql_query("SELECT id from db_cam_image_$user_id");
$num_rows = @mysql_num_rows($nums);
$res1 = @mysql_query("select total_images from db_cam_total WHERE id = 'total'");
@extract(mysql_fetch_array($res1));
$new_total = $num_rows + $total_images;
$update2 = "update db_cam_total set total_images = '$new_total' where id = 'total'";
@mysql_query($update2);
}
?>
<CENTER>
<TABLE WIDTH="400" BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD WIDTH="100%" BGCOLOR="<? echo "$TD_color2"; ?>">
<B><FONT COLOR="<? echo "$text_color1"; ?>" SIZE="-1" FACE="<? echo "$font_type"; ?>"><? echo "$stats_header"; ?></FONT></B></TD>
</TR>
<TR>
<TD WIDTH="100%" BGCOLOR="<? echo "$TD_color1"; ?>">
<FONT COLOR="<? echo "$text_color2"; ?>" SIZE="-1" FACE="<? echo "$font_type"; ?>">
<?
$num1 = "SELECT id from db_cam_cat";
$nums1 = mysql_query($num1);
$num_rows1 = mysql_num_rows($nums1);
$num2 = "SELECT id from db_cam GROUP BY country";
$nums2 = mysql_query($num2);
$num_rows2 = mysql_num_rows($nums2);
$num3 = "SELECT id from db_cam";
$nums3 = mysql_query($num3);
$num_rows3 = mysql_num_rows($nums3);
$q2 = "select total_images from db_cam_total WHERE id = 'total'";
$res2 = mysql_query($q2) or die(mysql_error());
extract(mysql_fetch_array($res2));
echo "$there_are_total $num_rows3 $cam_m_in_portal<BR>";
echo "$there_are_total $num_rows1 $categorys_from $num_rows2 $different_countrys<BR>";
echo "$there_are_total $total_images $cam_i_in_m_archives<BR>";
// Images today start
// GMT time start
$gmt_user = $HTTP_COOKIE_VARS["gmt_client"];
if ($gmt_user == ""){
$gmt_client = date("d-m-Y");
} else {
$arrgmt = array("-12"=>"-12", "-11"=>"-11", "-10"=>"-10", "-9"=>"-9", "-8"=>"-8", "-7"=>"-7", "-6"=>"-6", "-5"=>"-5", "-4"=>"-4", "-3"=>"-3", "-2"=>"-2", "-1=">"-1", "+0"=>"0", "+1"=>"1", "+2"=>"2", "+3"=>"3", "+4"=>"4", "+5"=>"5", "+6"=>"6", "+7"=>"7", "+8"=>"8", "+9"=>"9", "+10"=>"10", "+11"=>"11", "+12"=>"12");
$gmt = $arrgmt[$gmt_user];
$gmt_a = $gmt-$server_GMT;
$gmt_b = $gmt-$server_GMT;
$user_hdiff = $gmt_a-$gmt_b;
$gmt_client = date("d-m-Y", time()+$user_hdiff*3600);
}
// GMT time end
$month_reset_time = time();
$resh = @mysql_query("select month_reset from db_cam_total WHERE id = 'total_today'");
@extract(mysql_fetch_array($resh));
if($month_reset_time - $month_reset > 10800){
$update3 = "update db_cam_total set total_images = '0' where id = 'total_today'";
@mysql_query($update3);
$queryz = @mysql_query("SELECT id FROM db_cam WHERE active = '1' GROUP BY id");
while ($rowz = @mysql_fetch_array($queryz)){
$useridz = $rowz[id];
$numsz = @mysql_query("SELECT id FROM db_cam_image_$useridz WHERE date = '$gmt_client'");
$num_rows_today = @mysql_num_rows($numsz);
$resg = @mysql_query("select total_images from db_cam_total WHERE id = 'total_today'");
@extract(mysql_fetch_array($resg));
$new_total_today = $num_rows_today + $total_images;
$update4 = "update db_cam_total set total_images = '$new_total_today',month_reset = '$month_reset_time' where id = 'total_today'";
@mysql_query($update4);
}
}
$qu = "select total_images from db_cam_total WHERE id = 'total_today'";
$resu = mysql_query($qu) or die(mysql_error());
extract(mysql_fetch_array($resu));
echo "$there_are_total $total_images $new_cams_today<BR>";
// Images today end
// Setup some common file size measurements.
$kb = 1024; // Kilobyte
$mb = 1024 * $kb; // Megabyte
$gb = 1024 * $mb; // Gigabyte
$tb = 1024 * $gb; // Terabyte
// Get the file size in bytes.
$q1 = "select total_images,month_reset from db_cam_total WHERE id = 'total_kb'";
$res1 = mysql_query($q1) or die(mysql_error());
extract(mysql_fetch_array($res1));
$size = "$total_images";
if($size < $kb) {
$size = $size." B";
} else if($size < $mb) {
$size = round($size/$kb,2)." KB";
} else if($size < $gb) {
$size = round($size/$mb,2)." MB";
} else if($size < $tb) {
$size = round($size/$gb,2)." GB";
} else {
$size = round($size/$tb,2)." TB";
}
$monthName = array(01=> "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$monthname=("$monthName[$month_reset]");
echo "$there_are_total $size image transfer in $monthname.";
?>
</FONT></TD>
</TR>
</TABLE>
</CENTER>
Please explain what i need to do, cause i can´t much about php. :o