kodel menesio narys pas mane tvarkot,paziurejus archyva irgi rodo,bet ismeta tokia klaida --- Notice: Undefined index: November in /home/idomu/idomu.uzeik.in/infusions/month_user_panel/month_user_archive.php on line 16
stai tas php
<?php
require_once "../../maincore.php";
require_once THEMES."templates/header.php";
if (file_exists(INFUSIONS."month_user_panel/".$settings['locale'].".php")) {
include INFUSIONS."month_user_panel/".$settings['locale'].".php";
} else {
include INFUSIONS."month_user_panel/English.php";
}
$result = dbquery("SELECT * FROM ".DB_PREFIX."monthuser WHERE end!='0' ORDER BY start DESC");
$view_list = "<center>";
opentable($locale['mu201']);
if (dbrows($result) != 0) {
while ($data = dbarray($result)) {
$lt_month = $month[(strftime("%B", $data['end']+($settings['timeoffset']*3600)))];
$view_list .= "<option value='".$data['month_id']."'>".$locale['mu211'].$lt_month." ".strftime("%Y", $data['end']+($settings['timeoffset']*3600)).$locale['mu212'].$lt_month." ".strftime("%Y", $data['end']+($settings['timeoffset']*3600))."</option>\n";
}
echo "<form name='pollsform' method='post' action='".FUSION_SELF."'>".$locale['mu210']."<br>
<select name='muid' class='textbox'>
$view_list</select>
<input type='submit' name='viewmu' value='".$locale['mu052']."' class='button'></form>\n";
} else {
$view_list .= $locale['mu205'];
}
$view_list .= "</center>";
closetable();
if (isset($_POST['viewmu']) && (isset($_POST['muid']) && isNum($_POST['muid']) && $_POST['muid'] != 0)) {
$muid = $_POST['muid'];
$result = dbquery("
SELECT *, count(month_id) AS votes FROM ".DB_PREFIX."monthuser_ratings mu
LEFT JOIN ".DB_PREFIX."users tu ON mu.votedfor_id=tu.user_id
WHERE month_id='$muid' GROUP BY votedfor_id ORDER BY votes DESC, votedfor_id ASC
");
$k = 1; $l = 2;
$view_list = "<center>";
if (dbrows($result)) {
$view_list .= "<table align='center' cellpadding='0' cellspacing='1' class='tbl-border'>";
while ($data = dbarray($result)) {
if ($k == 1) {
$view_list .= "<tr class='".($l==1?"tbl1":"tbl2")."'><td colspan='3' align='center'>".$locale['mu203']."<a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a>";
if ($data['user_avatar'] != '' && file_exists(IMAGES."avatars/".$data['user_avatar'])) {
$view_list .= "<br><img src='".IMAGES."avatars/".$data['user_avatar']."'>";
} else {
$view_list .= "<br><img src='noavatar.gif'>";
}
$view_list .= $locale['mu155'].$data['votes']."</td></tr>";
} else {
$view_list .= "<tr class='".($l==1?"tbl1":"tbl2")."' height='24' align='center'><td width='30'>".$k."</td><td width='160' style='padding: 2px 2px 2px 2px'><a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a></td><td width='40'>".$data['votes']."</td></tr>";
}
if ($l == 1) { $l++; } else { $l--; }
$k++;
}
$view_list .= "</table>";
} else {
$view_list .= $locale['mu213'];
}
$view_list .= "</center>";
$data2 = dbarray(dbquery("SELECT * FROM ".DB_PREFIX."monthuser WHERE month_id='$muid'"));
tablebreak();
$lt_month = $month[(strftime("%B", $data2['start']+($settings['timeoffset']*3600)))];
opentable($locale['mu202'].strtolower($locale['mu211']).$lt_month." ".strftime("%Y", $data2['end']+($settings['timeoffset']*3600)).$locale['mu212'].$lt_month." ".strftime("%Y", $data2['end']+($settings['timeoffset']*3600)));
echo $view_list;
closetable();
}
require_once THEMES."templates/footer.php";
?>
kame reikalas?
|