Quote:Il permet au membre de supprimer son propre compte, mais il est imposible au saff de supprimer son compte.
"thib, post: 84823":sinon juste un peu de lecture dans le fichier api-allocine-helper.php ...
* Décoder de l'UTF8 les données réceptionnées
*/
define( 'ALLO_UTF8_DECODE', true );
"AzuriS, post: 84819":Thank you very much for your info AZURIS! I confirm the disorder just me! lol -_-vérifie ton fichier config.php, que ton cache soit réglé sur disk sinon tu modifie le code pour que ca corresponde ( ca devrait aussi réglé ton probleme sur le lien quand tu édite)
pour les accents toujours le même problème..... TT fonctionne avec des fichiers UTF-8 donc enregistre tes fichiers en UTF-8 avant de les envoyer sur ton serveur
"ArcticWolf, post: 84817":most of the fopen(/home/dr/public_html/TEST/cache/allocine/13.cache errors are caused incorrect permissions on your server that dir is prob not chmodd 777
and/or bad location of the cache dir
case "disk":
$fp = fopen($this->cachedir."/$var.cache", "w");
fwrite($fp, serialize($val));
fclose($fp);
return;
break;
if ($action == "sitelog_pirate") {
stdhead("Site Log");
navmenu();
$search = trim($search);
if ($search != '' ){
$where = "WHERE txt LIKE " . sqlesc("%$search%") . "";
}
$res2 = SQL_Query_exec("SELECT COUNT(*) FROM log_pirate $where");
$row = mysql_fetch_array($res2);
$count = $row[0];
$perpage = 50;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=sitelog_pirate&");
begin_frame("Site Log pirate");
print("<br /><CENTER><form method=get action=?>n");
print("<input type=hidden name=action value=sitelog_pirate>n");
print("" . SEARCH . ": <input type=text size=30 name=search>n");
print("<input type=submit value='Search'>n");
print("</form></CENTER><br />n");
echo $pagertop;
?>
<br /><CENTER><table align=center cellpadding="0" cellspacing="0" width="90%" border="1">
<tr>
<td class=ttable_head align=center>Date</td>
<td class=ttable_head align=center>Heure</td>
<td class=ttable_head align=center>Evénement</td>
<!-- <td class=table_head align=center>Delete</td> -->
</tr>
<?
$rqq = "SELECT id, added, txt FROM log_pirate $where ORDER BY id DESC $limit";
$res = SQL_Query_exec($rqq);
while ($arr = MYSQL_FETCH_ARRAY($res)){
$arr['added'] = utc_to_tz($arr['added']);
$date = substr($arr['added'], 0, strpos($arr['added'], " "));
$time = substr($arr['added'], strpos($arr['added'], " ") + 1);
print("<tr><td class=ttable_col1>$date</td><td class=ttable_col2>$time</td><td class=ttable_col1 align=left>".stripslashes($arr[txt])."</td><!--<td class=ttable_col2><a href='staffcp.php?act=view_log_pirate&do=del_log_pirate&lid=$arr[id]' title='delete this entry'>Supprimer</a></td>--></tr>n");
}
echo "</table></CENTER><br />n";
print($pagerbottom);
echo '<br />';
end_frame();
stdfoot();
Change to
#======================================================================#
# Log Pirate
#======================================================================#
if ($action == "sitelog_pirate") {
stdhead("Site Log");
navmenu();
$search = $_GET['search'];
if ($search != '' ){
$where = "WHERE txt LIKE " . sqlesc("%$search%") . "";
}
$res2 = SQL_Query_exec("SELECT COUNT(*) FROM log_pirate $where");
$row = mysql_fetch_array($res2);
$count = $row[0];
$perpage = 50;
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=sitelog_pirate&");
begin_frame(T_("SITE_PIRATE_LOG"));
print("<br /><div align=center><form method=get action=?>n");
print("<input type=hidden name=action value=sitelog_pirate>n");
print("<input type=text size=30 name=search>n");
print("<input type=submit value='".T_("SEARCH")."' />n");
print("</form></div><br />n");
echo $pagertop;
?>
<br /><div align="center"><table align="center" cellpadding="0" cellspacing="0" width="90%" border="1">
<tr>
<td class="ttable_head" align="center"><?php echo T_("ADDED"); ?></td>
<td class="ttable_head" align="center"><?php echo T_("TIME"); ?></td>
<td class="ttable_head" align="center"><?php echo T_("EVENT"); ?></td>
<!-- <td class="table_head2" align="center"><?php echo T_("DELETE"); ?></td> -->
</tr>
<?
$rqq = "SELECT id, added, txt FROM log_pirate $where ORDER BY id DESC $limit";
$res = SQL_Query_exec($rqq);
while ($arr = MYSQL_FETCH_ARRAY($res)){
$arr['added'] = utc_to_tz($arr['added']);
$date = substr($arr['added'], 0, strpos($arr['added'], " "));
$time = substr($arr['added'], strpos($arr['added'], " ") + 1);
print("<tr><td class=ttable_col1 align=center>$date</td><td class=ttable_col2 align=center>$time</td><td class=ttable_col1 align=left>".stripslashes($arr[txt])."</td><!--<td class=ttable_col2><a href='staffcp.php?act=view_log_pirate&do=del_log_pirate&lid=$arr[id]' title='delete this entry'>".T_("DELETE")."</a></td>--></tr>n");
}
echo "</table></div><br />n";
print($pagerbottom);
echo '<br />';
end_frame();
stdfoot();
}
#======================================================================#
# End Log Pirate
#======================================================================#
Put links to your ...
<td align="center"><a href="admincp.php?action=sitelog_pirate"><img src="images/admin/Pirate.png" border="0" width="32" height="32"><br /><?php echo T_("PIRATE_SITE"); ?></a><br /></td>
In backend/function .php search
function write_log_pirate($text){
$text = sqlesc($text);
$added = sqlesc(get_date_time());
SQL_Query_exec("INSERT INTO log_pirate (added, txt) VALUES($added, $text)");
}
// function piratage
function piratage($page) {
global $CURUSER;
$ip = $_SERVER['REMOTE_ADDR'];
$pseudo = $CURUSER['username'];
$id = $CURUSER['id'];
if (!empty($pseudo)) {
write_log_pirate("Tentative de piratage avec la page ".$page." de <a href=account-details.php?id=$id target=_blank>" . $pseudo . "</a>");
} else {
write_log_pirate("Tentative de piratage avec la page ".$page." de la part d'un utilisateur non-inscrit dont l'ip est : <a href=http://whatismyipaddress.com/ip/$ip target=_blank>$ip</a>");
}
die("<br /><br /><center><font color=red size=6>Votre tentative de piratage a été enregistrée ! <br /><br />Bonne journée !</font></center>");
}
Change to
// Log Pirate
function write_log_pirate($text){
$text = sqlesc($text);
$added = sqlesc(get_date_time());
SQL_Query_exec("INSERT INTO log_pirate (added, txt) VALUES($added, $text)");
}
// function piratage
function piratage($page) {
global $CURUSER;
$ip = $_SERVER['REMOTE_ADDR'];
$pseudo = $CURUSER['username'];
$id = $CURUSER['id'];
if (!empty($pseudo)) {
write_log_pirate("".T_("TENTATIVE_PAGE")." , ".$page." , ".T_("OF")." <a href=account-details.php?id=$id target=_blank>" . $pseudo . "</a>");
} else {
write_log_pirate("".T_("TENTATIVE_PAGE")." , ".$page." , ".T_("USER_LOGOUT_IP")." : <a href=http://add your site name here/ip/$ip target=_blank>$ip</a>");
}
die("<br /><br /><div align=center><font color=red size=6>".T_("PIRATE_SITE_1")." <br /><br />".T_("PIRATE_SITE_2")."</font></div>");
}
// END Log Pirate
WARNING: Dont forget to change "add your site name here" with your domain name.
Search in languages ??/ ..
// Admin CP
if ($CURUSER["class"] == "7") {
begin_frame("VIP Donation Fix");
print("<form method=post action=admin-modtasks.php>n");
print("<input type=hidden name='action' value='donater_fix'>n");
print("<input type=hidden name='userid' value='$id'>n");
echo "<br /><br /><center><table border=0>";
echo "<tr><td align=right class=table_col1><b>" . T_("REASON") . ":</b> </td><td align=left class=table_col1><textarea cols=40 rows=5 name=reason></textarea></td></tr>";
echo "<tr><td align=right class=table_col1><b>Transaction ID (req):</b> </td><td align=left class=table_col1><input type=text size=30 name=txn_id></td></tr>";
echo "<tr><td align=right class=table_col1><b>Money (req):</b> </td><td align=left class=table_col1><input type=text size=10 name=money></td></tr>";
echo "<tr><td colspan=2 align=center class=table_col1><input type=submit class=btn_big value='Add Donation'></td></tr></table></center></form>";
end_frame();
} //$CURUSER["class"] == "7"
}
end_frame();
}
stdfoot();
?>
Change to }
end_frame();
if ($CURUSER["class"] == "7") {
begin_frame(T_("VIP_DONATION"));
print("<form method='post' action='admin-modtasks.php'>n");
print("<input type='hidden' name='action' value='donater_fix'>n");
print("<input type='hidden' name='userid' value='$id'>n");
echo "<br /><br /><center><table border='0'>";
echo "<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>Transaction ID (req):</b> </td><td align='left'><input type=text size=30 name=txn_id></td></tr>";
echo "<tr><td align='right'><b>Money (req):</b> </td><td align='left'><input type='text' size='10' name='money'></td></tr>";
echo "<tr><td colspan='2' align='center'><input type='submit' class='table_col2' value='Add Donation'></td></tr></table></form>";
end_frame();
} //$CURUSER["class"] == "7"
}
end_frame();
stdfoot();
?>
"ArcticWolf, post: 82900":Its not hard
in account-details
find
if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {
after add
//Donor count down
if ($user[donor] && $CURUSER[id] == $user[id] || $CURUSER["class"] >= 6)
{
$donoruntil = $user['donoruntil'];
if ($donoruntil != '0000-00-00 00:00:00')
{
print("<b><p>Donated Status Until - $donoruntil");
if ($CURUSER["class"] < 6)
print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b><font size="-2"> to re-new donation click <a class=altlink href=donate.php>here</a>.</font></p>n");
else
print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b></p>n");
}
}
//====end
then in account
find
<b><?php echo T_("PASSKEY"); ?>:</b> <?php echo $CURUSER["passkey"]; ?><br />
after add
<b>Last <?php echo T_("DONATED"); ?>:</b> <?php echo $site_config['currency_symbol']; ?><?php echo number_format($CURUSER["donated"], 2); ?><br>
<b>Total <?php echo T_("DONATED"); ?>:</b> <?php echo $site_config['currency_symbol']; ?><?php echo number_format($CURUSER["total_donated"], 2); ?><br>
<?php if ($CURUSER['donoruntil']<>"0000-00-00 00:00:00 && ".htmlspecialchars($CURUSER['donor'])." == 'yes'")
echo "<b>Donor Until: </b> ".$CURUSER['donoruntil']." [ ".mkprettytime(strtotime($CURUSER['donoruntil']) - gmtime()); ?> ] to go...<br>
I of the other addons about donor stuff here has the cleanup to reset to power user once it expires.. use the search thats whats it here for!!!!!!!!!!!!!!!
//Donor count down
if ($user[donor] && $CURUSER[id] == $user[id] || $CURUSER["class"] >= 6)
{
$donoruntil = $user['donoruntil'];
if ($donoruntil != '0000-00-00 00:00:00')
{
print("<b><p>Donated Status Until - $donoruntil");
if ($CURUSER["class"] < 6)
print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b><font size="-2"> to re-new donation click <a class=altlink href=donate.php>here</a>.</font></p>n");
else
print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b></p>n");
}
}
//====end
// Utilisateurs en ligne aujourd_hui
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
begin_frame( T_("ONLINE_USERS_TODAY") );
$expires = 900; // Cache time in seconds
if (($rows = $TTCache->Get("usersonlinetoday_block", $expires)) === false) {
$res = SQL_Query_exec("SELECT id, username, class, donated, warned FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 86400");
$rows = array();
while ($row = mysql_fetch_assoc($res)) {
$rows[] = $row;
}
$TTCache->Set("usersonlinetoday_block", $rows, $expires);
}
if (!$rows) {
echo T_("NO_USERS_ONLINE");
} else {
echo "<div id='uOnline' class='bMenu'><ul>n";;
for ($i = 0, $cnt = count($rows), $n = $cnt - 1; $i < $cnt; $i++) {
$row = &$rows[$i];
switch ( $row['class'] )
{
case 8:
$color = '#2090FF';
break;
case 7:
$color = '#FF0000';
break;
case 6:
$color = '#33FF33';
break;
case 5:
$color = '#40E0D0';
break;
case 4:
$color = '#006600';
break;
case 3:
$color = '#FEDE01';
break;
case 2:
$color = '#C0C0C0';
break;
case 1:
$color = '#FFFFFF';
break;
}
$warned = null;
if ( $row['warned'] == 'yes' )
{
$warned = '<img src="images/warned.png" alt="Warned" title="Warned" border="0" />';
}
$donated = null;
if ($row['donated'] > 0)
{
$donated = '<img src="images/star.png" alt="Donated" title="Donated" border="0" />';
}
echo "<a href='account-details.php?id=$row[id]'><font style='color: ".$color."'>" . class_user($row["username"]) . "</font> $warned $donated</a>".($i < $n ? "," : "")."n";;
}
echo "</ul></div>n";;
}
// online users
print("<div class='f-cat' width='100%' align='center'>".T_("ONLINE_USERS")."</div>");
$expires = 600; // Cache time in seconds
if (($rows = $TTCache->Get("usersonline_block", $expires)) === false) {
$res = SQL_Query_exec("SELECT id, username FROM users WHERE enabled = 'yes' AND status = 'confirmed' AND privacy !='strong' AND UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(users.last_access) <= 900");
$rows = array();
while ($row = mysql_fetch_assoc($res)) {
$rows[] = $row;
}
$TTCache->Set("usersonline_block", $rows, $expires);
}
if (!$rows) {
echo T_("NO_USERS_ONLINE");
} else {
echo "<div id='uOnline' class='bMenu'><ul>n";;
for ($i = 0, $cnt = count($rows), $n = $cnt - 1; $i < $cnt; $i++) {
$row = &$rows[$i];
echo "<li><a href='account-details.php?id=$row[id]'>" . class_user($row["username"]) . "</a>".($i < $n ? ", " : "")."</li>n";;
}
echo "</ul></div>n";
}
// END online users
// Rang et simbol
print("<div class='f-cat' width='100%' align='center'>".T_("CLASS_LEGENDS")."</div>");
echo "<div align='center'><span style='font-size:medium;'><table class='table_head1' width='75%' align='center' cellpadding='1' cellspacing='1' border='0' valign='top'><tr><td align='center' width='110'></table></span>
<br />
<span style='color:#FFFFFF'>".T_("MEMBER")."</span> | <span style='color:#C0C0C0'>".T_("SUPER_MEMBER")."</span> | <span style='color:#006600'>".T_("UPLOADER")."</span> | <span style='color:#FEDE01'>".T_("VIP")."</span> | <span style='color:#40E0D0'>".T_("MODERATOR")."</span> | <span style='color:#33FF33'>".T_("SUPER_MODERATOR")."</span> | <span style='color:#2090FF'>".T_("ENCODOR")."</span> | <span style='color:#FF0000'>".T_("ADMINISTRATOR")."</span>
<br />
<hr width='85%' align='center' size='3' />
<img src="images/warn.png" title="Vous avez eu une avertissement du staff!!"><span style='color:#FF0000'><i> Avertissement</i></span> | <img src="images/star.png" title="Vous avez contribué a la réussite du site!"><span style='color:#FF0000'><i> Donateur</i></span> | <img src="images/seedbox.png" title="Torrent qui proviens d'une seedbox a débit très élever!" width="20" height="18"><span style='color:#FF0000'><i> SeedBox</i></span> | <img src="images/free.gif" title="Téléchargement gratuit a 100%"><span style='color:#FF0000'><i> FreeLeech 100%</i></span> | <img src="images/silver.gif" title="Téléchargement gratuit a 50%"><span style='color:#FF0000'><i> FreeLeech 50%</i></span> | <img src="images/new_torrent.png" title="Nouveau torrent!"><span style='color:#FF0000'><i> Nouveau Torrent</i></span></div><br/>n";
// End Rang et simbol
end_frame();
}
// END Utilisateurs en ligne aujourd_hui