Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Ban upload + record action mod
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2013-09-16 22:19:15
Salut, voci un petit code pour bani d'upload, mais avant tout vous devriez installer ce mode [url="http://www.torrenttrader.pw/topic/17550-recorded-actions-for-changes-into-account-details/"]http://www.torrenttrader.pw/topic/17550-recorded-actions-for-changes-into-account-details/[/url]

---------------------------------------------------------------------------------------------

Hi this is a young code that a create to ban d'upload, but for the firt time you must to install this code [url="http://www.torrenttrader.pw/topic/17550-recorded-actions-for-changes-into-account-details/"]http://www.torrenttrader.pw/topic/17550-recorded-actions-for-changes-into-account-details/[/url]

Desole pour mon vieux anglais

-----------------

Sorry for my bad english

1- SQL

ALTER TABLE users ADD `uploadbanned` CHAR(3) NOT NULL DEFAULT 'no' AFTER `forumbanned`;

ALTER TABLE `users` ADD `uploadbanneduntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `uploadbanned`

2- Chercher dans / Search in ======> account-details

$forumbanned = $user["forumbanned"] == 'yes';

et ajoute ca au dessous / and add that below

$uploadbanned = $user["uploadbanned"] == 'yes';

3- apres ton code forum ajoute / after your code forum add

$uploadbanneduntil = $user["uploadbanneduntil"];
   if ($uploadbanneduntil != "0000-00-00 00:00:00"){
       $banuploaduntil = "Remains: <font color=red><b>".mkprettytime(strtotime($uploadbanneduntil) - gmtime())."</b></font> to go...";
   } else {
       $banuploaduntil = "";
   }
 
   print("<tr><td height='5'></td></tr>n");    //===| 5px space here!
 
   //upload banned
   if (get_user_class() >= 5) {
       print("<form method='post' action='admin-modtasks.php'>n");
       print("<input type='hidden' name='action' value='uploadbanned' />n");
       print("<input type='hidden' name='userid' value='$id' />n");
       print("<input type='hidden' name='username' value='".$user["username"]."' />n");
       print("<tr><td>".T_("UPLOAD_BANNED").": </td><td class='table_col2' align='left'><input name='uploadbanned' value='yes' type='radio' " . ($uploadbanned ? " checked='checked'" : "") . " /> Yes &nbsp;<input name='uploadbanned' value='no' type='radio' " . (!$uploadbanned ? " checked='checked'" : "") . " /> Non");
       print("<font style='margin-left:15px; margin-right:20px'>Banned for: <input type='text' size='4' name='uploadbannedlength' /> days</font>$banuploaduntiln");
       print("<div style='margin-top:5px'>Raison: <input type='text' size='70' name='forbanreason'>n");
       print("<font style='margin-left:10px; margin-right:20px'><input type='submit' value='Submit' /></font></div>n");
       print("</td></tr>n");
       print("</form>n");
   }

4- dans admin-modtasks ajoute ca / in admin-modtasks add

//===| Start Upload Banned |===//
   if ($action == 'uploadbanned') {
       $curusername = ($CURUSER['username']);
       $curuserid = ($CURUSER['id']);
       $username = sqlesc($_POST["username"]);
       $userid = $_POST["userid"];
       $uploadbanned = sqlesc($_POST["uploadbanned"]);
       $uploadbannedlength = sqlesc($_POST["uploadbannedlength"]);
       $uploadbanneduntil = get_date_time(gmtime() + $uploadbannedlength * 86400);
       $days = $uploadbannedlength . " day" . ($uploadbannedlength > 1 ? "s" : "");
       $fbreason = $_POST["forbanreason"];
     
       if ($_POST["uploadbanned"] == 'yes' && $_POST["uploadbannedlength"] == '') {
           show_error_msg(T_("ERROR"), "Vous devez spécifier le nombre de jours! &nbsp [<a href=account-details.php?id=$userid><b>Retour</b></a>]", 1);
       }
     
       if ($_POST["uploadbanned"] == 'yes' && $_POST["forbanreason"] == '') {
           show_error_msg(T_("ERROR"), "Vous devez fournir une raison pour cette action! &nbsp [<a href=account-details.php?id=$userid><b>Retour</b></a>]", 1);
       }
     
       $modcomment = $row['modcomment'];
       If ($_POST["uploadbanned"] != 'yes') {
           $modcomment2 = gmdate("d-M-Y") . " - $curusername a supprimé l'interdiction de upload. n";
       } else {
           $modcomment2 = gmdate("d-M-Y") . " - $curusername a ajouté l'interdiction de upload. for $daysn- Reason: $fbreason n";
       }
       $modcomment = $modcomment2 . "" . $modcomment;
       $modcom = sqlesc($modcomment);

       If ($_POST["uploadbanned"] != 'yes') {
           SQL_Query_exec("UPDATE users SET uploadbanned=$uploadbanned, uploadbanneduntil = '0000-00-00 00:00:00', modcomment = CONCAT($modcom,modcomment) WHERE id = $userid");
               $msg = sqlesc("Votre interdiction Upload a été supprimé par ".$curusername."");
               $added = sqlesc(get_date_time());
               SQL_Query_exec("INSERT INTO messages (sender, receiver, msg, added, subject) VALUES(0, $userid, $msg, $added, 'Ban Upload')");
           write_log("<a href=account-details.php?id=$curuserid><b>$curusername</b></a> a supprimé l'interdiction sur le Upload pour l'utilisateur <a href=account-details.php?id=$userid><b>$username</b></a>");
       } else {
           SQL_Query_exec("UPDATE users SET uploadbanned=$uploadbanned, uploadbanneduntil = '$uploadbanneduntil', modcomment = CONCAT($modcom,modcomment) WHERE id = $userid");
               $msg = sqlesc("Vous etes banni de Upload pour ".$days." par ".$curusername."nnReason: ".$fbreason."");
               $added = sqlesc(get_date_time());
               SQL_Query_exec("INSERT INTO messages (sender, receiver, msg, added, subject) VALUES(0, $userid, $msg, $added, 'Ban Upload')");
           write_log("<a href=account-details.php?id=$curuserid><b>$curusername</b></a> a interdit à l'utilisateur du Upload. <a href=account-details.php?id=$userid><b>$username</b></a> for $days<br />Reason: $fbreason");
       }
       header("Location: account-details.php?id=$userid");
       die;
   }
//====| End Upload Banned |====//

5- dans torrent-upload ajoute/in torrent-upload add

if($CURUSER["can_upload"]=="no" || $CURUSER["uploadbanned"] == "yes")

6- pour retire la ban automatique ajoute dans / to remove te ban auto add in ======> cleanup

# Remove ban on upload
$res32 = SQL_Query_exec("SELECT id FROM users WHERE uploadbanned='yes' AND uploadbanneduntil < NOW() AND uploadbanneduntil <> '0000-00-00 00:00:00'");
if (mysql_num_rows($res32) > 0)
{
$dt = sqlesc(get_date_time());
$msg = sqlesc("Your ban on upload has been removed.n");
while ($arr = mysql_fetch_assoc($res32))
{
SQL_Query_exec("UPDATE users SET uploadbanned = 'no', uploadbanneduntil = '0000-00-00 00:00:00' WHERE id = $arr[id]");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id], $dt, $msg, 0)");
}
}

big thank Artic

PS: [size=18px]Desoler je ne sais pas comment cree se code si une personne sait faire je serais ravi[/size]

-------------------------------------------------------------------------------------------------------------

PS: [size=18px]Sorry, i don't know how to create this code, if some one can create it i will be happy[/size]

[size=14px]UPDATE SQL[/size]


ALTER TABLE `users` ADD `uploadbanned` CHAR(3) NOT NULL DEFAULT 'no';

ALTER TABLE `users` ADD `uploadbanneduntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';

ALTER TABLE `users` ADD `forumbanned` CHAR(3) NOT NULL DEFAULT 'no';

ALTER TABLE `users` ADD `forumbanneduntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';
Unknown User
2013-09-18 01:23:10
why not

i do  :rolleyes:

je vais faire c'est pas gagné  :D
Unknown User
2013-09-18 01:43:34
Ben je ne sais pas a chaque fois je fais mais ca ne marche pas je ne sais pas.

-------------------------------------------------------------------------------------------------

When i try to make code but nothing work i don't know.
Unknown User
2013-09-18 04:19:26
.. its not hard copy

# Remove ban on forum
$res32 = SQL_Query_exec("SELECT id FROM users WHERE forumbanned='yes' AND forumbanneduntil < NOW() AND forumbanneduntil <> '0000-00-00 00:00:00'");
if (mysql_num_rows($res32) > 0)
{
$dt = sqlesc(get_date_time());
$msg = sqlesc("Your ban on forum has been removed.n");
while ($arr = mysql_fetch_assoc($res32))
{
SQL_Query_exec("UPDATE users SET forumbanned = 'no', forumbanneduntil = '0000-00-00 00:00:00' WHERE id = $arr[id]");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, $arr[id], $dt, $msg, 0)");
}
}

in cleanup changing forum to upload
Unknown User
2013-09-18 16:33:21
Not Work for me, can you look for me

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6980"]cleanup.php[/url]
cleanup.php
Download
Unknown User
2014-12-19 16:55:43
warning

 
ALTER TABLE `users` ADD `uploadbanned` CHAR(3) NOT NULL DEFAULT 'no' AFTER `forumbanned`;

ALTER TABLE `users` ADD `uploadbanneduntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `uploadbanned`;

Unknown User
2014-12-19 20:18:02
wrong SQL

2014-12-20 01:08:51
told me or you make your request on your bdd !?
Unknown User
2014-12-20 03:13:16
ALTER TABLE `users` ADD `uploadbanned` CHAR(3) NOT NULL DEFAULT 'no' AFTER `forumbanned`;
MySQL a r&eacute;pondu: [url="http://localhost/phpmyadmin/url.php?url=http%3A%2F%2Fdev.mysql.com%2Fdoc%2Frefman%2F5.6%2Fen%2Ferror-messages-server.html"][/url]

#1054 - Unknown column 'forumbanned' in 'users'
Unknown User
2014-12-20 03:31:57
i think have found



ALTER TABLE `users` ADD `uploadbanned` CHAR(3) NOT NULL DEFAULT 'no';

ALTER TABLE `users` ADD `uploadbanneduntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';

ALTER TABLE `users` ADD `forumbanned` CHAR(3) NOT NULL DEFAULT 'no';

ALTER TABLE `users` ADD `forumbanneduntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00';

Unknown User
2014-12-27 10:41:28
it's not nessessary all delet file in account-datail.php lolll
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728