-
';
+
';
if(func_num_args()==5)
{
diff --git a/tools_firstpage.js b/tools_firstpage.js
index 8fb7b87..e22858a 100644
--- a/tools_firstpage.js
+++ b/tools_firstpage.js
@@ -1,12 +1,12 @@
-function on_first_page()
+function on_first_page()
{
var form=document.forms["cm_first_form"];
- var username=form["username"].value;
- var password=form["password"].value;
-
- if(username==null||username==""){alert("username must be filled out");return;}
- if(password==null||password==""){alert("password must be filled out");return;}
+// var username=form["username"].value;
+// var password=form["password"].value;
+//
+// if(username==null||username==""){alert("username must be filled out");return;}
+// if(password==null||password==""){alert("password must be filled out");return;}
form["width" ].value=document.body.clientWidth;
form["height" ].value=document.body.clientHeight;
diff --git a/tools_sql.php b/tools_sql.php
index 4faf643..3e44343 100644
--- a/tools_sql.php
+++ b/tools_sql.php
@@ -1,6 +1,6 @@
query($sql_string);
+ $sql_result=$sql->query($sql_string);
+
+ if($sql_result)
+ return $sql_result;
+
+ echo 'SQL Insert error,SQLString: '.$sql_string.'
';
+ echo 'SQL Error: '.$sql->error;
+ return null;
}
/**
@@ -159,7 +165,10 @@
$resultmode=MYSQLI_STORE_RESULT;
foreach($field_array as $field)
- $data_array[$field]=$_POST[$field];
+ {
+ if(isset($_POST[$field])&&strlen($_POST[$field])>0)
+ $data_array[$field]=$_POST[$field];
+ }
return sql_insert($table_name,$data_array,$resultmode);
}
diff --git a/ui_table.php b/ui_table.php
index 7a97ba0..2f66215 100644
--- a/ui_table.php
+++ b/ui_table.php
@@ -46,9 +46,9 @@
echo '
';
if($this->table_style)
- echo '
';
+ echo '';
else
- echo '';
+ echo '';
if($this->fields!=null)
{