1
Hi,
I had a non-xoops php programmer put some extra code in /footer.php that contains a link to another, non-xoops web program, passing username and pwd. The link works great -- except that it is in the footer of my website! I'd like to move it to a block that I can control, but am having problems cutting and pasting the code into a new .php block. This is what was added to footer.php that I would like to get into the block:
le="color: #000000"><?php // above this line is the standard XOOPS footer.php // below is the new function and link added function Encrypt($string, $key="xxxxxx") { $result = ''; for($i=1; $i<=strlen($string); $i++) { $char = substr($string, $i-1, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } return $result; } echo "<a href='/wp2/timesheet/index_user.php?login=".Encrypt($xoopsUser->getVar('uname'))."&password=".Encrypt($xoopsUser->getVar('pass'))."&ref=".Encrypt($_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'])."'>Click To Go To Timesheet</a>"; ?>
Can someone give me a pointer or two how to make this code work in a block?
Thx!