Jump to content

Can you convert this to smarty3 please.


ozgurerdogan

Recommended Posts

Can someone please convert this smarty2 to smarty3 syntax. Because I can not get it work with whmcs 6.

 

{php}
global $smarty;
$kullaniciadi = $smarty->_tpl_vars["service"]["username"];

$table = "tblhosting";
$fields = "username,password";
$where = array("username"=>$kullaniciadi);
$result = select_query($table,$fields,$where);
$data = mysql_fetch_array($result);

$password = $data['password'];

$passtodec = $data["password"];
$command = "decryptpassword";
$adminuser = "admin";
$values["password2"] = $passtodec;
$results = localAPI($command,$values,$adminuser);
$sifre = $results["password"];

{/php}

 

 

Thanks in advance.

Link to comment
Share on other sites

http://forum.whmcs.com/showthread.php?101707-Smarty-Issue-on-WHMCS-6-Beta-5&p=421914#post421914

 

btw - I posted that link because it contained the specific answer to your question - not so you could post the same question in the thread there! :roll:

 

$smartyvars = $template->getTemplateVars();
$kullaniciadi = $smartyvars['service']['username'];

Edited by brian!
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated