Go to Profile
thank you I just added below line 87 and when I enter the data and then when I click on submit in account-details.php to send I am directed to a blank page, there must be a problem somewhere I attach but two file
good evening Botanicar and I still made the changes you posted for the automatic update of
1. Donation statue
2. Donated amount
3. Duration of donation
but I can't get the donation add manually in my account_detail.php ?
I can't find where to put the code in my account-details.php file? π
here is my account-details.php
<?php
require_once("backend/functions.php");
dbconn();
loggedinonly();
stdhead("User CP");
$id = (int)$_GET["id"];
if (!is_valid_id($id))
show_error_msg(T_("NO_SHOW_DETAILS"), "Bad ID.",1);
$r = @SQL_Query_exec("SELECT * FROM users WHERE id=$id");
$user = mysqli_fetch_array($r) or show_error_msg(T_("NO_SHOW_DETAILS"), T_("NO_USER_WITH_ID")." $id.",1);
//add invites check here
if ($CURUSER["view_users"] == "no" && $CURUSER["id"] != $id)
show_error_msg(T_("ERROR"), T_("NO_USER_VIEW"), 1);
if (($user["enabled"] == "no" || ($user["status"] == "pending")) && $CURUSER["edit_users"] == "no")
show_error_msg(T_("ERROR"), T_("NO_ACCESS_ACCOUNT_DISABLED"), 1);
//get all vars first
//$country
$res = SQL_Query_exec("SELECT name FROM countries WHERE id=$user[country] LIMIT 1");
if (mysqli_num_rows($res) == 1){
$arr = mysqli_fetch_assoc($res);
$country = "$arr[name]";
}
if (!$country) $country = "<b>Unknown</b>";
//$stylesheet
$res = SQL_Query_exec("SELECT name FROM stylesheets WHERE id=$user[stylesheet] LIMIT 1");
if (mysqli_num_rows($res) == 1){
$arr = mysqli_fetch_assoc($res);
$stylesheets = "$arr[name]";
}
//$ratio
if ($user["downloaded"] > 0) {
$ratio = $user["uploaded"] / $user["downloaded"];
}else{
$ratio = "---";
}
$numtorrents = get_row_count("torrents", "WHERE owner = $id");
$numcomments = get_row_count("comments", "WHERE user = $id");
$numforumposts = get_row_count("forum_posts", "WHERE userid = $id");
$avatar = htmlspecialchars($user["avatar"]);
if (!$avatar) {
$avatar = $site_config["SITEURL"]."/images/default_avatar.png";
}
function peerstable($res){
$ret = "<table align='center' cellpadding=\"3\" cellspacing=\"0\" class=\"table_table\" width=\"100%\" border=\"1\"><tr><th class='table_head'>".T_("NAME")."</th><th class='table_head'>".T_("SIZE")."</th><th class='table_head'>" .T_("UPLOADED"). "</th>\n<th class='table_head'>" .T_("DOWNLOADED"). "</th><th class='table_head'>" .T_("RATIO"). "</th></tr>\n";
while ($arr = mysqli_fetch_assoc($res)){
$res2 = SQL_Query_exec("SELECT name,size FROM torrents WHERE id=$arr[torrent] ORDER BY name");
$arr2 = mysqli_fetch_assoc($res2);
if ($arr["downloaded"] > 0){
$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);
}else{
$ratio = "---";
}
$ret .= "<tr><td class='table_col1'><a href='torrents-details.php?id=$arr[torrent]&hit=1'><b>" . htmlspecialchars($arr2["name"]) . "</b></a></td><td align='center' class='table_col2'>" . mksize($arr2["size"]) . "</td><td align='center' class='table_col1'>" . mksize($arr["uploaded"]) . "</td><td align='center' class='table_col2'>" . mksize($arr["downloaded"]) . "</td><td align='center' class='table_col1'>$ratio</td></tr>\n";
}
$ret .= "</table>\n";
return $ret;
}
//Layout
stdhead(sprintf(T_("USER_DETAILS_FOR"), $user["username"]));
begin_frame(sprintf(T_("USER_DETAILS_FOR"), $user["username"]));
if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes") || ($CURUSER["id"] == $user["id"])) {
?>
<table align="center" border="0" cellpadding="6" cellspacing="1" width="100%">
<tr>
<td width="50%"><b><?php echo T_("PROFILE"); ?></b></td>
<td width="50%"><b><?php echo T_("ADDITIONAL_INFO"); ?></b></td>
</tr>
<tr valign="top">
<td align="left">
<?php echo T_("USERNAME"); ?>: <?php echo
class_user($user["username"])
?><br />
<?php echo T_("USERCLASS"); ?>: <?php echo get_user_class_name($user["class"])?><br />
<?php echo T_("THEME_NAME"); ?>: <?php echo $stylesheets?><br />
<?php echo T_("TITLE"); ?>: <i><?php echo format_comment($user["title"])?></i><br />
<?php echo T_("JOINED"); ?>: <?php echo htmlspecialchars(utc_to_tz($user["added"]))?><br />
<?php echo T_("LAST_VISIT"); ?>: <?php echo htmlspecialchars(utc_to_tz($user["last_access"]))?><br />
<?php echo T_("LAST_SEEN"); ?>: <?php echo htmlspecialchars($user["page"]);?><br />
</td>
<td align="left">
<?php echo T_("AGE"); ?>: <?php echo htmlspecialchars($user["age"])?><br />
<?php echo T_("CLIENT"); ?>: <?php echo htmlspecialchars($user["client"])?><br />
<?php echo T_("COUNTRY"); ?>: <?php echo $country?><br />
<?php echo T_("DONATED"); ?> <?php echo $site_config['currency_symbol']; ?><?php echo number_format($user["donated"], 2); ?><br />
<?php echo T_("WARNINGS"); ?>: <?php echo htmlspecialchars($user["warned"])?><br />
<?php if ($CURUSER["edit_users"] == "yes"){ echo T_("ACCOUNT_PRIVACY_LVL").": <b>".T_($user["privacy"])."</b><br />"; }?>
</td>
</tr>
<tr>
<td width="50%"><b><?php echo T_("STATISTICS"); ?></b></td>
<td width="50%"><b><?php echo T_("OTHER"); ?></b></td>
</tr>
<tr valign="top">
<td align="left">
<?php echo T_("UPLOADED"); ?>: <?php echo mksize($user["uploaded"]); ?><br />
<?php echo T_("DOWNLOADED"); ?>: <?php echo mksize($user["downloaded"]); ?><br />
<?php echo T_("Seed Bonus"); ?>: <?php echo $user["seedbonus"]; ?><br />
<?php echo T_("RATIO"); ?>: <?php echo $ratio; ?><br />
<?php echo T_("AVG_DAILY_DL"); ?>: <?php echo mksize($user["downloaded"] / (DateDiff($user["added"], time()) / 86400)); ?><br />
<?php echo T_("AVG_DAILY_UL"); ?>: <?php echo mksize($user["uploaded"] / (DateDiff($user["added"], time()) / 86400)); ?><br />
<?php echo T_("TORRENTS_POSTED"); ?>: <?php echo number_format($numtorrents); ?><br />
<?php echo T_("COMMENTS_POSTED"); ?>: <?php echo number_format($numcomments); ?><br />
Forum Posts: <?php echo number_format($numforumposts); ?><br />
</td>
<td align="left">
<img src="<?php echo $avatar; ?>" alt="" title="<?php echo $user["username"]; ?>" height="80" width="80" /><br />
<a href="mailbox.php?compose&id=<?php echo $user["id"]?>"><?php echo T_("SEND_PM"); ?></a><br />
<!-- <a href=#>View Forum Posts</a><br />
<a href=#>View Comments</a><br /> -->
<a href="report.php?user=<?php echo $user["id"]?>"><?php echo T_("REPORT_MEMBER"); ?></a><br />
</td>
</tr>
<?php if ($CURUSER["edit_users"] == "yes") { ?>
<tr>
<td width="50%"><b><?php echo T_("STAFF_ONLY_INFO"); ?></b></td>
</tr>
<tr valign="top">
<td align="left">
<?php
if ($user["invited_by"]) {
$res = SQL_Query_exec("SELECT username FROM users WHERE id=$user[invited_by]");
$row = mysqli_fetch_array($res);
echo "<b>".T_("INVITED_BY").":</b> <a href=\"account-details.php?id=$user[invited_by]\">$row[username]</a><br />";
}
echo "<b>".T_("INVITES").":</b> ".number_format($user["invites"])."<br />";
$invitees = array_reverse(explode(" ", $user["invitees"]));
$rows = array();
foreach ($invitees as $invitee) {
$res = SQL_Query_exec("SELECT id, username FROM users WHERE id='$invitee' and status='confirmed'");
if ($row = mysqli_fetch_array($res)) {
$rows[] = "<a href=\"account-details.php?id=$row[id]\">$row[username]</a>";
}
}
if ($rows)
echo "<b>".T_("INVITEES").":</b> ".implode(", ", $rows)."<br />";
?>
</td>
</tr>
<?php
}
//team
$res = SQL_Query_exec("SELECT name,image FROM teams WHERE id=$user[team] LIMIT 1");
if (mysqli_num_rows($res) == 1) {
$arr = mysqli_fetch_assoc($res);
echo "<tr><td colspan='2' align='left'><b>Team Member Of:</b><br />";
echo"<img src='".htmlspecialchars($arr["image"])."' alt='' /><br />".sqlesc($arr["name"])."<br /><br /><a href='teams-view.php'>[View ".T_("TEAMS")."]</a></td></tr>";
}
?>
</table>
<?php
}else{
echo sprintf(T_("REPORT_MEMBER_MSG"), $user["id"]);
}
end_frame();
if($CURUSER["edit_users"]=="yes"){
begin_frame(T_("STAFF_ONLY_INFO"));
$avatar = htmlspecialchars($user["avatar"]);
$signature = htmlspecialchars($user["signature"]);
$uploaded = $user["uploaded"];
$downloaded = $user["downloaded"];
$enabled = $user["enabled"] == 'yes';
$warned = $user["warned"] == 'yes';
$downloadbanned = $user["downloadbanned"] == 'yes';
$forumbanned = $user["forumbanned"] == 'yes';
$modcomment = htmlspecialchars($user["modcomment"]);
print("<form method='post' action='admin-modtasks.php'>\n");
print("<input type='hidden' name='action' value='edituser' />\n");
print("<input type='hidden' name='userid' value='$id' />\n");
print("<table border='0' cellspacing='0' cellpadding='3'>\n");
print("<tr><td>".T_("TITLE").": </td><td align='left'><input type='text' size='67' name='title' value=\"$user[title]\" /></td></tr>\n");
print("<tr><td>".T_("EMAIL")."</td><td align='left'><input type='text' size='67' name='email' value=\"$user[email]\" /></td></tr>\n");
print("<tr><td>".T_("SIGNATURE").": </td><td align='left'><textarea cols='50' rows='10' name='signature'>".htmlspecialchars($user["signature"])."</textarea></td></tr>\n");
print("<tr><td>".T_("UPLOADED").": </td><td align='left'><input type='text' size='30' name='uploaded' value=\"".mksize($user["uploaded"], 9)."\" /></td></tr>\n");
print("<tr><td>".T_("DOWNLOADED").": </td><td align='left'><input type='text' size='30' name='downloaded' value=\"".mksize($user["downloaded"], 9)."\" /></td></tr>\n");
print("<tr><td>".T_("AVATAR_URL")."</td><td align='left'><input type='text' size='67' name='avatar' value=\"$avatar\" /></td></tr>\n");
print("<tr><td>".T_("IP_ADDRESS").": </td><td align='left'><input type='text' size='20' name='ip' value=\"$user[ip]\" /></td></tr>\n");
print("<tr><td>".T_("INVITES").": </td><td align='left'><input type='text' size='4' name='invites' value='".$user["invites"]."' /></td></tr>\n");
if ($CURUSER["class"] > $user["class"]){
print("<tr><td>".T_("CLASS").": </td><td align='left'><select name='class'>\n");
$maxclass = $CURUSER["class"];
for ($i = 1; $i < $maxclass; ++$i)
print("<option value='$i' " . ($user["class"] == $i ? " selected='selected'" : "") . ">$prefix" . get_user_class_name($i) . "\n");
print("</select></td></tr>\n");
}
print("<tr><td>".T_("DONATED_US").": </td><td align='left'><input type='text' size='4' name='donated' value='$user[donated]' /></td></tr>\n");
print("<tr><td>".T_("PASSWORD").": </td><td align='left'><input type='password' size='67' name='password' value=\"$user[password]\" /></td></tr>\n");
print("<tr><td>".T_("CHANGE_PASS").": </td><td align='left'><input type='checkbox' name='chgpasswd' value='yes'/></td></tr>");
print("<tr><td>".T_("MOD_COMMENT").": </td><td align='left'><textarea cols='50' rows='10' name='modcomment'>$modcomment</textarea></td></tr>\n");
print("<tr><td>".T_("ACCOUNT_STATUS").": </td><td align='left'><input name='enabled' value='yes' type='radio' " . ($enabled ? " checked='checked'" : "") . " />Enabled <input name='enabled' value='no' type='radio' " . (!$enabled ? " checked='checked' " : "") . " />Disabled</td></tr>\n");
print("<tr><td>".T_("WARNED").": </td><td align='left'><input name='warned' value='yes' type='radio' " . ($warned ? " checked='checked'" : "") . " />Yes <input name='warned' value='no' type='radio' " . (!$warned ? " checked='checked'" : "") . " />No</td></tr>\n");
print("<tr><td>Download Banned: </td><td align=left><input name=downloadbanned value=yes type=radio" . ($downloadbanned ? " checked" : "") . ">Yes <input name=downloadbanned value=no type=radio" . (!$downloadbanned ? " checked" : "") . ">No</td></tr>\n");
print("<tr><td>".T_("FORUM_BANNED").": </td><td align='left'><input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td></tr>\n");
print("<tr><td>".T_("PASSKEY").": </td><td align='left'>$user[passkey]<br /><input name='resetpasskey' value='yes' type='checkbox' />".T_("RESET_PASSKEY")." (".T_("RESET_PASSKEY_MSG").")</td></tr>\n");
print("<tr><td colspan='2' align='center'><input type='submit' value='".T_("SUBMIT")."' /></td></tr>\n");
print("</table>\n");
print("</form>\n");
end_frame();
}
if($CURUSER["edit_users"]=="yes"){
begin_frame(T_("BANS_WARNINGS"));
print '<a name="warnings"></a>';
$rqq = "SELECT * FROM warnings WHERE userid=$id ORDER BY id DESC";
$res = SQL_Query_exec($rqq);
if (mysqli_num_rows($res) > 0){
?>
<b>Warnings:</b><br />
<table border="1" cellpadding="3" cellspacing="0" width="80%" align="center" class="table_table">
<tr>
<th class="table_head">Added</th>
<th class="table_head"><?php echo T_("EXPIRE"); ?></th>
<th class="table_head"><?php echo T_("REASON"); ?></th>
<th class="table_head"><?php echo T_("WARNED_BY"); ?></th>
<th class="table_head"><?php echo T_("TYPE"); ?></th>
</tr>
<?php
while ($arr = mysqli_fetch_assoc($res)){
if ($arr["warnedby"] == 0) {
$wusername = T_("SYSTEM");
} else {
$res2 = SQL_Query_exec("SELECT id,username FROM users WHERE id = ".$arr['warnedby']."");
$arr2 = mysqli_fetch_assoc($res2);
$wusername = htmlspecialchars($arr2["username"]);
}
$arr['added'] = utc_to_tz($arr['added']);
$arr['expiry'] = utc_to_tz($arr['expiry']);
$addeddate = substr($arr['added'], 0, strpos($arr['added'], " "));
$expirydate = substr($arr['expiry'], 0, strpos($arr['expiry'], " "));
print("<tr><td class='table_col1' align='center'>$addeddate</td><td class='table_col2' align='center'>$expirydate</td><td class='table_col1'>".format_comment($arr['reason'])."</td><td class='table_col2' align='center'><a href='account-details.php?id=".$arr2['id']."'>".$wusername."</a></td><td class='table_col1' align='center'>".$arr['type']."</td></tr>\n");
}
echo "</table>\n";
}else{
echo T_("NO_WARNINGS");
}
print("<form method='post' action='admin-modtasks.php'>\n");
print("<input type='hidden' name='action' value='addwarning' />\n");
print("<input type='hidden' name='userid' value='$id' />\n");
echo "<br /><br /><center><table border='0'><tr><td align='right'><b>".T_("REASON").":</b> </td><td align='left'><textarea cols='40' rows='5' name='reason'></textarea></td></tr>";
echo "<tr><td align='right'><b>".T_("EXPIRE").":</b> </td><td align='left'><input type='text' size='4' name='expiry' />(days)</td></tr>";
echo "<tr><td align='right'><b>".T_("TYPE").":</b> </td><td align='left'><input type='text' size='10' name='type' /></td></tr>";
echo "<tr><td colspan='2' align='center'><input type='submit' value='".T_("ADD_WARNING")."' /></td></tr></table></center></form>";
if($CURUSER["delete_users"] == "yes"){
print("<hr /><center><form method='post' action='admin-modtasks.php'>\n");
print("<input type='hidden' name='action' value='deleteaccount' />\n");
print("<input type='hidden' name='userid' value='$id' />\n");
print("<input type='hidden' name='username' value='".$user["username"]."' />\n");
echo "<b>".T_("REASON").":</b><input type='text' size='30' name='delreason' />";
echo " <input type='submit' value='".T_("DELETE_ACCOUNT")."' /></form></center>";
}
end_frame();
}
stdfoot();
?>
merci MicroMonkey pour ton aide et le partage de ton block π
thank you MicroMonkey for your help and for sharing your block
Good evening I managed to install the codes and I'm waiting for a donation to see if the account is updated and come back to tell you the result and again thank you to Botanicar for his help
thank you for your help botaniclar but when I make the changes it does not work and I do not understand where to put all the codes that you have put in the explanation?
I'm just looking for a block donate_block.php with a progress bar of donations and the code to add in the admin cp with a box to be able to register the donation received in the admin cp in order to progress the progress bar of donations on the site.
thank you for your help
thank you for your help but I don't understand because I'm looking for a piece of code to put in the admin cp to add the donations manually π
Hello I am looking for the code to add in the staff cp to be able to add the donations received in order to increase the bar of progress of donations I join you in file the block
thank you for your help
donate_block.php
<?php
begin_block(T_("DONATE"));
$totalneeded = "100"; //=== set this to your monthly wanted amount
$totalneeded3 ="$".sprintf("%01.2f", $totalneeded);
$month1 = sqlesc(gmdate("m"));
$year1 = sqlesc(gmdate("Y"));
$total_funds1 = SQL_Query_exec("SELECT sum(cash) as total_funds FROM `funds` WHERE month=$month1 && year = $year1");
$arr_funds = mysqli_fetch_array($total_funds1);
$funds_so_far = $arr_funds["total_funds"];
$funds_difference = $totalneeded - $funds_so_far;
$Progress_so_far = $funds_so_far / $totalneeded * 100;
$Percent = $Progress_so_far;
$Percent = floor(($Percent) * 100 + .5) * .01;
if($Progress_so_far >= $totalneeded)
$Progress_so_far = "100";
$Progress_so_far2 = $Progress_so_far;
if ($funds_so_far <= 300){
$pic = "images/donate/loadbarred.gif";
$Progress_so_far2 = 20;
}
elseif ($funds_so_far <= 500)
$pic = "images/donate/loadbaryellow.gif";
else $pic = "images/donate/loadbargreen.gif";
if($totalneeded >= $funds_so_far) {
$monthly_goal = " ".round($Progress_so_far)."%";
$monthly_goal22 = " d'objectif mensuel.]";
}
else
$monthly_goal = "[ Monthly goal met! ]";
print("<center><table cellpadding=3 class=main border=0>".
"<td class=row3 align=center><p align=center>"."<table width=220 hight=17 border=2><td width=$Progress_so_far2% height=15 background=$pic align=center valign=middle>".
"$monthly_goal</td><td style='padding: 0px; background-image:
url(images/donate/loadbarbg.gif); background-repeat: repeat-x'>".
"$monthly_goal22</td></tr></table> ".
"<a href=\"donate.php\"><img src=\"images/donate/donate.jpg\"></a>");
print("</td></tr></table></center>");
end_block();
?>
Hello I have an error message when I post the torrent and the TMDB description is not added,...
the error message is
Database Error. Please report this to an administrator.
and the error message in SQL Error of the Staff CP is
Database Error in tmdb/modules/creation_film.php on line 35: Field 'season' doesn't have a default value. Query was: INSERT INTO tmdb (id_torrent, id_tmdb, title, duration, producer, genre, resume, actor, ba, date, image, casts, review) VALUES
and on line 35 of the tmdb/modules/creation_film.php there is this piece of code,..
$ret = SQL_Query_exec('INSERT INTO tmdb (id_torrent, id_tmdb, titre, duree, producteur, genre, resume, acteur, ba, date, image, casts, review) VALUES ('.sqlesc($id).', '.sqlesc($id_tmdb).', '.sqlesc($titre).','.sqlesc($duree).', '.sqlesc($prod).', '.sqlesc($genre).', '.sqlesc($resume).','.sqlesc($bdd).', '.sqlesc($ba).', '.sqlesc($date).', '.sqlesc($image).', '.sqlesc($tagline).', '.sqlesc($review).')');
Thanks for your help and everything is good now π
very nice theme and can you tell me how and the piece of code to modify the css to enlarge the theme in width, thanks in advance π
Thank you very much for your help and I have started all over again and always the same thing with the same error message so I will test again at the end of the week because no time today π²
forum_tg is the name of the database
yes I deleted the two parts and put them back and still the same thing, I always get this error message when adding the points to the cagnote
Database Error. Please report this to an administrator.
thanks for the help and I haven't changed anything and when I want to add the points then when I click on the button I participate I get this error message
Database Error. Please report this to an administrator.
and my seedbonus point is deducted from my account but it is not added to the kitty?
I come back because when I add the points in the box to participate in the common pot and I click on the button "participate!" I have this error message
Database Error. Please report this to an administrator.
and the error code in staff cp sql error I get this error message
Database Error in commonpot.php on line 39: Incorrect integer value: '' for column `forum_tg`.`commonpot`.`id` at row 1. Query was: INSERT INTO commonpot (id, userid, points, added) VALUES('', 1, 200, '2023-02-03 18:17:16').
below the value on the database
je reviens car quand on ajoute les points dans la case de participer au pot commun et que l'on click sur le bouton "participer!" j'ai ce message d'erreur
et le code d'erreur dans staff cp erreur sql j'ai ce message d'erreur
Database Error in commonpot.php on line 39: Incorrect integer value: '' for column `forum_tg`.`commonpot`.`id` at row 1. Query was: INSERT INTO commonpot (id, userid, points, added) VALUES('', 1, 200, '2023-02-03 18:17:16').
I come back because when I add the points in the box to participate in the common pot and I click on the button "participate!" I have this error message
and the error code in staff cp sql error I get this error message
Database Error in commonpot.php on line 39: Incorrect integer value: '' for column `forum_tg`.`commonpot`.`id` at row 1. Query was: INSERT INTO commonpot (id, userid, points, added) VALUES('', 1, 200, '2023-02-03 18:17:16').
Bonjour spiritblue et un tout grand merci pour ton aide car Γ§a fonctionne bien maintenant π
Merci pour cette belle fonction mais quand on click sur [ Je participe ] ou sur [ Historique ] on a une page blanche avec ce message d'erreur
Thanks for this nice function but when you click on [ I participate ] or on [ History ] you get a blank page with this error message
Cette page ne fonctionne pas
Impossible de traiter cette demande Γ l'heure actuelle.
HTTP ERROR 500
This page does not work
Unable to process this request at this time.
HTTP ERROR 500
hello allocinΓ© is still not working can you tell me if anyone has the right keys to share, thanks in advance π