The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need a little help

Discussion in 'General Discussion' started by volumeserver, May 13, 2003.

  1. volumeserver

    volumeserver Registered

    Joined:
    Mar 5, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I purchased PHPManager
    and i keep submitting support requests that go ignored
    I can not get the program to create the account in WHM

    It doesnt give me any error just says

    "DONE WHM"

    This is the create code to do it

    PHP:
    $sql "SELECT * FROM whm WHERE package='$package'";
    $result mysql_query($sql);
    $myrow mysql_fetch_array($result);
    $ip $myrow["ip"];
    $cgi $myrow["cgi"];
    $quota $myrow["quota"];
    $frontpage $myrow["frontpage"];
    $cpmod $myrow["cpmod"];
    $ftp $myrow["ftp"];
    $num_sql $myrow["num_sql"];
    $pop $myrow["pop"];
    $emaillists $myrow["emaillists"];
    $subdomains $myrow["subdomains"];
    $bandwidth $myrow["bandwidth"];
    $shellaccess $myrow["shellaccess"];
    $whm_package $myrow["whm_package"];

    $msel "209.51.138.202,$cgi,$quota,$frontpage,$cpmod,$ftp,$num_sql,$pop,$emaillists,$subdomains,$bandwidth,$shellaccess,$whm_package";

    if (
    $ip=="y"){
    $ip "1";
    } else {
    $ip "0";
    }

    if (
    $cgi=="y"){
    $cgi "1";
    } else {
    $cgi "0";
    }

    if (
    $frontpage=="y"){
    $frontpage "1";
    } else {
    $frontpage "0";
    }

    if (
    $shellaccess=="y"){
    $shellaccess "1";
    } else {
    $shellaccess "0";
    }

    $url "http://volume:vol2003@volumeserver.com:2086/scripts/wwwacct?";
    $url .= "sign=&submit=yes&domain=$domainname$domain&username=$username&password=$password";
    $url .= "&quota=$quota&ip=$ip&cgi=$cgi&hasshell=$shellaccess&frontpage=$frontpage&maxftp=$ftp&maxpop=$pop";
    $url .= "&maxlst=$emaillists&maxsql=$num_sql&maxsub=$subdomains&bwlimit=$bandwidth&cpmod=$cpmod&msel=$msel";

    if (!
    $whmfailure){

    $lines_array file($url);
    while (list (
    $line_num$line) = each ($lines_array)) {
       if (
    preg_match("/[0-9]{1,3}([.][0-9]{1,3}){3}/",$line,$regmatch) ) {
            
    $ip_addr=trim("$regmatch[0]");
            
    $sql "SELECT * FROM clients WHERE username='$username' AND domainname='$domainname'";
            
    $result mysql_query($sql);
            
    $myrow mysql_fetch_array($result);
            
    $id $myrow["id"];
            
    $sql "UPDATE clients SET ipaddress='$ip_addr' WHERE id=$id";
            
    $result mysql_query($sql);
            
    end ($lines_array);
       }
    }

    }

    ?>
     
Loading...

Share This Page