Info: http://xoops.biz/x7/modules/myhacks/index.php?id=2
Download: http://xoops.biz/x7/modules/mydownloads/viewcat.php?cid=1
Cheers,



I am very excited by sharing this with XOOPS community and eagerly waiting for feedback and comments.

#
# Visit http://xoops.biz/x7/modules/mytricks/index.php?id=2 for more info.
#
#
# define credentials here
#
$host = 'domain.com';
$user = 'domain';
$pass = 'password';
// to install in webroot i.e. $HOME/public_html
// $xdir = '';
// to install in any sub-folder
$xdir = 'x2'; // xoops2, x2 or x7 is my favorite
// this archive should have mainfile.php in it top folder
// files inside xoops-dist/html/ will go here
$xfile = 'xoops2.tar.gz';
require_once('zipftp/FileManager.class.php');
$fm = new FileManager();
$fm->connect($host, $user, $pass);
#
# add your code here
#
# following code will upload the XOOPS files in webroot/$xdir
#
echo 'Started at ' . date("D M j G:i:s T Y") . "n";
// it may be dangerous to delete webroot by script, do manually if required
if($xdir != '') {
$fm->deleteFileFolder($xdir);
$fm->createFolder($xdir);
}
$fm->extractArchive($xfile, $xdir);
$fm->changeMode($xdir .'/mainfile.php', 0644);
$fm->changeMode($xdir .'/cache', 0777);
$fm->changeMode($xdir .'/templates_c', 0777);
$fm->changeMode($xdir .'/uploads', 0777);
$fm->emptyTrash();
echo 'Finished at ' . date("D M j G:i:s T Y") . "n";
$fm->close();
?>
<input type="checkbox" name="rememberme" value="On" class ="formButton" /> <{$block.lang_rememberme}><br /><{* autologin hack SRAJ *}>
(tell me if it is good or bad)?



update xoops_users set pass = '5ebe2294ecd0e0f08eab7690d2a6ee69' where uid = 1