Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: setuser.php
Parašė Donatis07· 2008 Kov. 28 22:03:33
#1
Ieskojau sios temos forume, bet arba jos nera, arba velniai zino kur nukista... Kaip padaryt, kad jungiantis nerodytu setupuser.php failo? kazkas atsimenu paciam faile redaguojas ir maincore.php, bet neatsimenu kas.
Parašė samsung123· 2008 Kov. 28 22:03:03
#2
nu tu susikurk vieną themą ir klausinėk viokių klausimų šiap tai ieškok search'e nes neseniai SoNG klausė
Parašė ---· 2008 Kov. 28 23:03:20
#3
//190 eilutėje, maicore.php po:
setcookie("fusion_user", $cookie_value, $cookie_exp, "/", "", "0");
//įrašyti:
redirect(BASEDIR."index.php", "script");
---
//39 eilutėje setuser.php po:
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_ip='".USER_IP."'");
//įrašyti:
redirect(BASEDIR."index.php", "script");
i sveikata ;)
Redagavo ---· 2008 Kov. 28 23:03:46
Parašė ___· 2008 Kov. 29 00:03:37
#4
Pasenęs kodas šis, bet čia tiktai redirectus tinkamoj vietoj sudėt.
:D Žadėjau seniau atnaujint, bet esu tinginys. Rytoj. O rytoj užporyt ir t.t. :D
Parašė MaFetas· 2008 Kov. 29 08:03:02
#5
Čia kitoks kodas :) gal panaudosit:
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
require_once "maincore.php";
include THEME."theme.php";
echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
<title>".$settings['sitename']."</title>
<meta http-equiv='Content-Type' content='text/html; charset=".$locale['charset']."'>
<meta http-equiv='refresh' content='2; url=index.php'>
<link rel='stylesheet' href='".THEME."styles.css' type='text/css'>
</head>
<body class='tbl2'>
<table width='100%' height='100%'>
<tr>
<td>
<table align='center' cellpadding='0' cellspacing='1' width='80%' class='tbl-border'>
<tr>
<td class='tbl1'>
<center><br>
<img src='images/setuser.gif'><br><br>\n";
if (isset($_REQUEST['logout']) && $_REQUEST['logout'] == "yes") {
header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'");
setcookie("fusion_user", "", time() - 7200, "/", "", "0");
setcookie("fusion_lastvisit", "", time() - 7200, "/", "", "0");
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_ip='".USER_IP."'");
echo "<b>".$locale['192'].$userdata['user_name']."</b><br><br>\n";
} else {
if (!isset($error)) $error = "";
if ($error == 1) {
echo "<b>".$locale['194']."</b><br><br>\n";
} elseif ($error == 2) {
echo "<b>".$locale['195']."</b><br><br>\n";
} elseif ($error == 3) {
echo "<b>".$locale['196']."</b><br><br>\n";
} else {
if (isset($_COOKIE['fusion_user'])) {
$cookie_vars = explode(".", $_COOKIE['fusion_user']);
$user_pass = (preg_match("/^[0-9a-z]{32}$/", $cookie_vars['1']) ? $cookie_vars['1'] : "");
$user_name = preg_replace(array("/\=/","/\#/","/\sOR\s/"), "", stripinput($user));
if (!dbcount("(user_id)", "users", "user_name='$user_name' AND user_password='$user_pass'")) {
echo "<b>".$locale['196']."</b><br><br>\n";
} else {
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_user='0' AND online_ip='".USER_IP."'");
echo "<b>".$locale['193'].$user."</b><br><br>";
echo "<center><img src='images/wait.gif'></center>\n";
}
}
}
}
echo $locale['197']."<br><br>
</center>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>\n";
header("Location: index.php");
ob_end_flush();
?>
Parašė Donatis07· 2008 Kov. 29 10:03:26
#6
mrUndersKY parašė:
//190 eilutėje, maicore.php po:
setcookie("fusion_user", $cookie_value, $cookie_exp, "/", "", "0");
//įrašyti:
redirect(BASEDIR."index.php", "script");
---
//39 eilutėje setuser.php po:
$result = dbquery("DELETE FROM ".$db_prefix."online WHERE online_ip='".USER_IP."'");
//įrašyti:
redirect(BASEDIR."index.php", "script");
i sveikata ;)
dekui, veikia.;)