Thread: WHM Auto Script
View Single Post
  #9 (permalink)  
Old 07-16-2005, 09:14 AM
MeGaMASTER MeGaMASTER is offline
Registered User
 
Join Date: May 2003
Posts: 49
MeGaMASTER
Yes. Anything that can be done in WHM, can be a function in this script. However your code is wrong. The function should look like this one:

PHP Code:
function addpkg ($host,$user,$accesshash,$usessl,$pkgname,$pkgquota,$pkghasshell,$pkgmaxftp,$maxpop,$pkgmaxlst,$pkgmaxsql,$pkgmaxsub,$pkgmaxpark,$pkgmaxaddon,$pkgcgi,$pkgfrontpage,$pkgbwlimit,$pkgcpmod,$pkgfeaturelist) { 
    
$result whmreq("/scripts2/addpkg?name=${pkgname}&quota=${pkgquota}&hasshell=${pkghasshell}&maxftp=${pkgmaxftp}&maxpop=${pkgmaxpop}&maxlst=${pkgmaxlst}&maxsql=${pkgmaxsql}&maxsub=${pkgmaxsub}&maxpark=${pkgmaxpark}&maxaddon=${pkgmaxaddon}&cgi=${pkgcgi}&frontpage=${pkgfrontpage}&bwlimit=${pkgbwlimit}&cpmod=${pkgcpmod}&featurelist=${pkgfeaturelist}&nohtml=1",$host,$user,$accesshash,$usessl); 
    if (
$cpanelaccterr != "") { return; } 
    return 
$result


Last edited by MeGaMASTER; 07-16-2005 at 09:37 AM.
Reply With Quote