ispCP - Board - Support
Extern order package (not with the orderpage) - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: Extern order package (not with the orderpage) (/thread-881.html)



Extern order package (not with the orderpage) - jelle - 06-27-2007 08:34 PM

I don't know of this is the right place to post it.

I'm busy with making a automaticly order page on my hosting site.
It is a phonehost (for dutch people and belgium people). Adding credits to your account is automaticly, but I want that when the user order a package, my site add it automaticly into the ispcp database. But i see that the test user stay with this status: toadd.
I've used rau3.php for the mysql query's and add it into my source code.
here's a preview:
Code:
mysql_select_db("ispcp");
$userexist = mysql_query("select * from `admin` where admin_name = '".$sub.".".$sitenaam."'");
$existrow = mysql_num_rows($userexist);
if($existrow != "0") {
echo "Domeinnaam is al ingebruik! (translate: domain allready used!)";
include "footer.php";
exit;
}
mysql_query("insert into admin (admin_name, admin_pass, admin_type, domain_created, created_by, fname, lname, firm, zip, city, country, email, phone, fax, street1, street2, customer_id) values ('".$sub.".".$sitenaam."' , '".$md5pass."', 'user', unix_timestamp(), '2', '', '', '', '', '', '', '".$checksql->email."', '', '', '', '', '')") or die(mysql_error());
$recordquery = mysql_query("select * from `admin` where admin_name = '".$sub.".".$sitenaam."'");
$sql = mysql_fetch_object($recordquery);
$record_id = $sql->admin_id;
mysql_query("insert into domain (domain_name, domain_admin_id, domain_created_id, domain_created, domain_mailacc_limit, domain_ftpacc_limit, domain_traffic_limit, domain_sqld_limit, domain_sqlu_limit, domain_status, domain_subd_limit, domain_alias_limit, domain_ip_id, domain_disk_limit, domain_disk_usage, domain_php, domain_cgi) values ( '".$sub.".".$sitenaam."', '$record_id', '2', unix_timestamp(), '0', '0', '$traffic', '0', '0', 'toadd', '0', '0', '1', '$space', '0', 'yes', 'no')");
mysql_query("insert into user_gui_props (user_id, lang, layout) values ('$record_id', 'lang_English', 'omega_original')");

In the gui I see a fully added domain, but the status is now a day long (24h) on toadd.
How can I fix this?


".$sub.".".$sitenaam." = e.g. yourhost.isp-control.net