Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Po atnaujinimo netynka senas pass.

Parašė ex-it· 2009 Bal. 11 20:04:48
#10

<?php

// Locate config.php and set the basedir path
$folder_level = ""; $i = 0;
while (!file_exists($folder_level."config.php")) {
   $folder_level .= "../"; $i++;
   if ($i == 5) { die("Config file not found"); }
}
require_once $folder_level."config.php";
define("BASEDIR", $folder_level);

function dbconnect($db_host, $db_user, $db_pass, $db_name) {
   $db_connect = @mysql_connect($db_host, $db_user, $db_pass);
   $db_select = @mysql_select_db($db_name);
   if (!$db_connect) {
      die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to establish connection to MySQL</b><br />".mysql_errno()." : ".mysql_error()."</div>");
   } elseif (!$db_select) {
      die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><b>Unable to select MySQL database</b><br />".mysql_errno()." : ".mysql_error()."</div>");
   }
}

// Establish mySQL database connection
$link = dbconnect($db_host, $db_user, $db_pass, $db_name);

//////////////////////////////////////

$db_request = 'SELECT * FROM fusion_users ORDER BY user_id';
$exec = mysql_query($db_request);
while ($line = mysql_fetch_array($exec)) {
   extract($line);
   $result = md5($line['user_password']);
   mysql_query("UPDATE fusion_users SET user_password='".$result."' WHERE user_id = ".$line['user_id']);
   echo "id ".$line['user_id']." done sucessfully<br />";
}

?>




sukurk faila su siuo turiniu, ir ikelk i savo root direktorija ftp. Tada nueik adresu manosaitas.lt/failo_pavadinimas.php ir vsio :}

Nemeginau, taciau turetu viskas paskui norm veikti :}

Redagavo ex-it· 2009 Bal. 11 20:04:04