АрхангеЛ (8 Июля 2015 в 18:50)
Bender, в icfiles/head.php
Находим
$totalonsite = $totalonsite + time() - $datauser['lastdate']; `movings` = '$movings',
`total_on_site` = '$totalonsite',
`lastdate` = '" . time() . "' WHERE `id` = '$user_id'
");
после добавляем
/* код от Flyself */
if($headmod != 'link_history') {
$total_link_history = mysql_result(mysql_query("SELECT COUNT(*) FROM `link_history` WHERE `user_id` = '$user_id'"), 0); if($total_link_history < 100)
mysql_query("INSERT INTO `link_history` SET `user_id` = '$user_id', `time` = '$realtime', `text` = '" . functions
::check($_SERVER['REQUEST_URI']) . "', `name` = '" . functions
::check($textl) . "';"); else
mysql_query("UPDATE `link_history` SET `time` = '$realtime', `text` = '" . functions
::check($_SERVER['REQUEST_URI']) . "', `name` = '" . functions
::check($textl) . "' WHERE `user_id` = '$user_id' ORDER BY `time` ASC LIMIT 1;"); } //
В файле users/profile.php находим
'activity' => 'includes/profile',
'ban' => 'includes/profile',
'edit' => 'includes/profile',
'images' => 'includes/profile',
'info' => 'includes/profile',
'ip' => 'includes/profile',
'guestbook' => 'includes/profile',
'karma' => 'includes/profile',
'office' => 'includes/profile',
'password' => 'includes/profile',
'reset' => 'includes/profile',
'settings' => 'includes/profile',
'stat' => 'includes/profile',
'friends' => 'includes/profile'
);
Добавляем в код
'link_history' => 'includes/profile',
Примерно получиться вот так на чистом двиге
'activity' => 'includes/profile',
'ban' => 'includes/profile',
'edit' => 'includes/profile',
'images' => 'includes/profile',
'info' => 'includes/profile',
'ip' => 'includes/profile',
'guestbook' => 'includes/profile',
'karma' => 'includes/profile',
'office' => 'includes/profile',
'password' => 'includes/profile',
'reset' => 'includes/profile',
'settings' => 'includes/profile',
'stat' => 'includes/profile',
'friends' => 'includes/profile',
'link_history' => 'includes/profile'
);
Файл
link_history.php закидываем в папку
\users\includes\
В файле \users\includes\profile\office.php добавляем ссылку
echo '<div>' . functions::image('info.png') . '<a href="profile.php?act=link_history">История переходов</a></div>';
Как то так
)
|
жалоба