You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
<?php
|
|
require_once("Group-Office.php");
|
|
//require_once("config_php");
|
|
//$config_file = $GO_CONFIG->get_config_file();
|
|
$dbuser = $GO_CONFIG->db_user;
|
|
$dbname = $GO_CONFIG->db_name;
|
|
$dbpass = $GO_CONFIG->db_pass;
|
|
$dbhost = $GO_CONFIG->db_host;
|
|
$rdate = date('Y-m-d:H:i');
|
|
$bk4u_status = 0;
|
|
//echo time();
|
|
$u_fullname = $first_name . " " . $last_name;
|
|
$handle = mysql_connect($dbhost,$dbuser,$dbpass);
|
|
if(!handle)
|
|
{
|
|
$bk4u_status = 1;
|
|
die('could not connect database');
|
|
}
|
|
|
|
if (!mysql_select_db('bookmark4u', $handle)) {
|
|
$bk4u_status = 1;
|
|
die('Could not select database');
|
|
|
|
}
|
|
|
|
$sql = "INSERT INTO passwd(user,passwd,name,email,rdate) values('$username',PASSWORD('$pass1'),'$u_fullname','$email','$rdate')";
|
|
// echo $sql;
|
|
if(mysql_query($sql,$handle))
|
|
{
|
|
$sql1 = "select uid from passwd where user = '" . $username ."'";
|
|
$result = mysql_query($sql1);
|
|
$uidval = mysql_result($result,0);
|
|
// echo $uidval;
|
|
$sql2 = "insert into config(uid,memo,config) values ($uidval , '','')";
|
|
mysql_query($sql2);
|
|
print $sql." success";
|
|
exit;
|
|
}else{
|
|
print $sql."failed";
|
|
exit;
|
|
|
|
}
|
|
//else
|
|
mysql_close($handle);
|
|
|
|
?>
|
|
|