Unstoppable Domains

Install scripts then export database or convert Mysql query to txt for phpmyadmin

Spaceship Spaceship
Watch

desbest

Established Member
Impact
0
Convert mysql query into sql format for importing please for phpmyadmin
I've searched everywhere but can't find it.
I'm having trouble installing scripts and I would like to insert this code into phpmyadmin to create a database but I don't know how to convert it.
And no scripts can do so either.

Or alternativly, install these scripts for me then export your database as text and reply here.

CODING 1 (install this script)
PHP:
 $file = file("config.php");
  $fp = fopen("config.php", "w");

  $noenc = encodestring($secured, $apass);

  for ($i = 0; $i < count($file); $i++) {
    $line = $file[$i];

    if (substr($line, 0, 12) == "\$secure_pass") { $line = "\$secure_pass = \"$modpass\";\n"; }
    if (substr($line, 0, 10) == "\$my_server") { $line = "\$my_server = \"$myserver\";\n"; }    
    if (substr($line, 0, 12) == "\$my_database") { $line = "\$my_database = \"$mydb\";\n"; }
    if (substr($line, 0, 12) == "\$my_username") { $line = "\$my_username = \"$myuser\";\n"; }
    if (substr($line, 0, 12) == "\$my_password") { $line = "\$my_password = \"$mypass\";\n"; }

    if (substr($line, 0, 8) == "\$basedir") { $line = "\$basedir = \"$basedir2\";\n"; }
    if (substr($line, 0, 8) == "\$secured") { $line = "\$secured = \"$secured\";\n"; }

    if (substr($line, 0, 13) == "\$email_sender") { $line = "\$email_sender = \"$sender\";\n"; }
    if (substr($line, 0, 11) == "\$email_subj") { $line = "\$email_subj = \"$subj\";\n"; }
    if (substr($line, 0, 12) == "\$admin_email") { $line = "\$admin_email = \"$adminmail\";\n"; }

    if ($newacc == "on") {
      if (substr($line, 0, 11) == "\$noenc_pass") { $line = "\$noenc_pass = \"$noenc\";\n"; }
    }

    if (substr($line, 0, 11) == "\$randompass") { $line = "\$randompass = \"$random\";\n"; }
    if (substr($line, 0, 8) == "\$genuser") { $line = "\$genuser = \"$new_genuser\";\n"; }
    if (substr($line, 0, 11) == "\$cc_address") { $line = "\$cc_address = \"$address\";\n"; }

    fputs($fp, $line);
  }

  $fp = fclose($fp);

  $table1 = "CREATE TABLE accounts (
  id bigint(15) NOT NULL,
  name tinytext NOT NULL,
  email tinytext NOT NULL,
  messenger tinytext NOT NULL,
  domain tinytext NOT NULL,
  username tinytext NOT NULL,
  password tinytext NOT NULL,
  plan tinytext NOT NULL,
  payment tinytext NOT NULL,
  referer tinytext NOT NULL,
  comments tinytext NOT NULL,
  billing_cycle tinytext NOT NULL,
  server tinytext NOT NULL,
  field1 tinytext NOT NULL,
  field2 tinytext NOT NULL,
  field3 tinytext NOT NULL,
  flags tinytext NOT NULL,
  address tinytext NOT NULL,
  phone tinytext NOT NULL,
  billing tinytext NOT NULL,
  status enum('pending','current','terminated') NOT NULL default 'pending',
  KEY id (id)
) TYPE=MyISAM;";

  $table4 = "CREATE TABLE plans (
  name tinytext NOT NULL,
  string tinytext NOT NULL,
  monthly tinytext NOT NULL,
  quarterly tinytext NOT NULL,
  biyearly tinytext NOT NULL,
  yearly tinytext NOT NULL,
  monthly_url tinytext NOT NULL,
  quarterly_url tinytext NOT NULL,
  biyearly_url tinytext NOT NULL,
  yearly_url tinytext NOT NULL,
  template longtext NOT NULL
) TYPE=MyISAM;";

  $table5 = "CREATE TABLE cfg (
  id bigint(15) NOT NULL auto_increment,
  pname text NOT NULL,
  pvalue text NOT NULL,
  KEY id (id)
) TYPE=MyISAM;";

  $table6 = "CREATE TABLE servers (
  id bigint(15) NOT NULL auto_increment,
  port tinytext NOT NULL,
  address tinytext NOT NULL,
  string text NOT NULL,
  used tinytext NOT NULL,
  KEY id (id)
) TYPE=MyISAM;";

  $table7 = "CREATE TABLE eventlog (
  id bigint(15) NOT NULL auto_increment,
  account_id bigint(15) NOT NULL default '0',
  subject text NOT NULL,
  body text NOT NULL,
  KEY id (id)
) TYPE=MyISAM;";

  mysql_connect($myserver, $myuser, $mypass);
  mysql_db_query($mydb, $table1);
  mysql_db_query($mydb, $table2);
  mysql_db_query($mydb, $table3);
  mysql_db_query($mydb, $table4);
  mysql_db_query($mydb, $table5);
  mysql_db_query($mydb, $table6);
  mysql_db_query($mydb, $table7);

  $checksvr = mysql_db_query($mydb, "SELECT * FROM servers WHERE address = \"$whmserver\";");

  if (mysql_num_rows($checksvr) == 0) {
    mysql_db_query($mydb, "INSERT INTO servers SET address = \"$whmserver\", port = \"$whmport\", string = \"" . mkwhmstring($wuser, $wpass, $apass) . "\", used = \"yes\";");
  }

  $checkid = mysql_db_query($mydb, "SELECT * FROM cfg WHERE id = \"1\";");

  if (mysql_num_rows($checkid) == 0) {
    mysql_db_query($mydb, "INSERT INTO cfg SET id = \"1\", pname = \"acct_id\", pvalue = \"1\";");
  }

  $fp = fopen(".htaccess", "w");
  fputs($fp, "<Files config.php>\n\tOrder deny,allow\n\tDeny from all\n</Files>\n\n<Files install.php>\n\tOrder deny,allow\n\tDeny from all\n</Files>\n\nOptions -Indexes");
  $fp = fclose($fp);

  echo "<b>Installation complete.</b><br>Please login to the administration panel <a href=admin.php>here</a> and setup your webhosting plans.";
  echo "<br><br><b>NOTE:</b> In order to run install again, you will have to remove the script-generated .htaccess file from this directory.";

}

?>

CODING 2 (installs this script)
PHP:
Elseif ($step==1){
Echo "<p>creating the users table in mysql... <br>";
mysql_query("DROP TABLE IF EXISTS users");
mysql_query("CREATE TABLE users (
  id tinyint(4) NOT NULL auto_increment,
  user_login varchar(25) NOT NULL default '',
  user_pass varchar(255) NOT NULL default '',
  cp_login varchar(25) NOT NULL default '',
  cp_pass varchar(255) NOT NULL default '',
  name varchar(25) NOT NULL default '',
  email varchar(75) NOT NULL default '',
  site_url varchar(255) NOT NULL default '',
  site_name varchar(255) NOT NULL default '',
  cp_url varchar(255) NOT NULL default '',
  impons int(50) NOT NULL default '0',
  clicks int(50) NOT NULL default '0',
  imp_left text NOT NULL,
  lastip text NOT NULL,
  lastrid text NOT NULL,
  half text NOT NULL,
  act tinyint(1) NOT NULL default '0',
  numban tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (id),
  UNIQUE KEY id (id),
  UNIQUE KEY user_login (user_login)
)");
Echo "Done</p>";

Echo "<p>creating the clbox table in mysql... <br>";
mysql_query("DROP TABLE IF EXISTS banners");
mysql_query("CREATE TABLE banners (
  id tinyint(5) NOT NULL auto_increment,
  user varchar(75) NOT NULL default '',
  url varchar(255) NOT NULL default '',
  text text NOT NULL,
  act tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (id),
  UNIQUE KEY id (id,url)
)");

Echo "Done</p>";
Echo "Good, Step one is complete, now move on to <a href=\"install.php?step=2\">Step 2</a>!";
}

ElseIf ($step==2){
echo "<center>";
include "templates/install.inc";
echo "</center>";
}

ElseIf ($step==3){
            $user_pw = md5($PHP_AUTH_PW);
Echo "inserting your default login stuff into mysql \n";
$result = mysql_query ("INSERT INTO users (id, user_login, user_pass, cp_login, cp_pass, site_url, site_name, name, email, cp_url, imp_left, act) VALUES (1, '$cfg_defaultusername', '$user_pw', '$cfg_cpuser', '$cfg_cppw', '$cfg_siteurl', '$cfg_sitename', '$cfg_defaultname', '$cfg_defaultemail', '$cfg_cpurl', 9999999999, '1')");
Echo "Done ($result)</p>";

Echo "Clbox1 installation is complete!<br><b>DELETE INSTALL.PHP</b><Br>You can now make a link to <a href=\"index.html\">index.html</a> (after you edit it) and let your users sign up and all.<br><a href=\"members.php\">[Login]</a> (you also have to accept them in Admin Mode)";
}
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
If want you want is to create a database using the sql from these scripts, why don't you just feed the raw SQL to phpMyAdmin and let phpMyAdmin do the work?
 
0
•••
Unstoppable Domains
Domain Recover
DomainEasy โ€” Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back