改进UITABLE控制
This commit is contained in:
parent
aad786b62c
commit
5a64d688b6
@ -3,14 +3,14 @@
|
|||||||
function CreateInputGroup()
|
function CreateInputGroup()
|
||||||
{
|
{
|
||||||
$type =func_get_arg(0);
|
$type =func_get_arg(0);
|
||||||
$id =func_get_arg(1);
|
$name =func_get_arg(1);
|
||||||
$label =func_get_arg(2);
|
$label =func_get_arg(2);
|
||||||
$size =func_get_arg(3);
|
$size =func_get_arg(3);
|
||||||
|
|
||||||
echo '<div class="form-group">
|
echo '<div class="form-group">
|
||||||
<label class="control-label col-sm-2">'.$label.'</label>
|
<label class="control-label col-sm-2">'.$label.'</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<input type="'.$type.'" class="form-control" id="'.$type.'" size="'.$size.'">';
|
<input type="'.$type.'" class="form-control" name="'.$name.'" size="'.$size.'">';
|
||||||
|
|
||||||
if(func_num_args()==5)
|
if(func_num_args()==5)
|
||||||
{
|
{
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
function on_first_page()
|
function on_first_page()
|
||||||
{
|
{
|
||||||
var form=document.forms["cm_first_form"];
|
var form=document.forms["cm_first_form"];
|
||||||
|
|
||||||
var username=form["username"].value;
|
// var username=form["username"].value;
|
||||||
var password=form["password"].value;
|
// var password=form["password"].value;
|
||||||
|
//
|
||||||
if(username==null||username==""){alert("username must be filled out");return;}
|
// if(username==null||username==""){alert("username must be filled out");return;}
|
||||||
if(password==null||password==""){alert("password must be filled out");return;}
|
// if(password==null||password==""){alert("password must be filled out");return;}
|
||||||
|
|
||||||
form["width" ].value=document.body.clientWidth;
|
form["width" ].value=document.body.clientWidth;
|
||||||
form["height" ].value=document.body.clientHeight;
|
form["height" ].value=document.body.clientHeight;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
static $global_sql=null;
|
$global_sql=null;
|
||||||
|
|
||||||
function get_sql()
|
function get_sql()
|
||||||
{
|
{
|
||||||
@ -135,8 +135,14 @@
|
|||||||
++$count;
|
++$count;
|
||||||
}
|
}
|
||||||
|
|
||||||
// echo 'SQLString: '.$sql_string;
|
$sql_result=$sql->query($sql_string);
|
||||||
return $sql->query($sql_string);
|
|
||||||
|
if($sql_result)
|
||||||
|
return $sql_result;
|
||||||
|
|
||||||
|
echo 'SQL Insert error,SQLString: '.$sql_string.'<br/>';
|
||||||
|
echo 'SQL Error: '.$sql->error;
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -159,7 +165,10 @@
|
|||||||
$resultmode=MYSQLI_STORE_RESULT;
|
$resultmode=MYSQLI_STORE_RESULT;
|
||||||
|
|
||||||
foreach($field_array as $field)
|
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);
|
return sql_insert($table_name,$data_array,$resultmode);
|
||||||
}
|
}
|
||||||
|
@ -46,9 +46,9 @@
|
|||||||
echo '<div class="panel-body"><p>'.$this->body.'</p></div>';
|
echo '<div class="panel-body"><p>'.$this->body.'</p></div>';
|
||||||
|
|
||||||
if($this->table_style)
|
if($this->table_style)
|
||||||
echo '<table class="table table-'.$this->table_style.'">';
|
echo '<table class="table table-responsive table-'.$this->table_style.'">';
|
||||||
else
|
else
|
||||||
echo '<table class="table">';
|
echo '<table class="table table-responsive">';
|
||||||
|
|
||||||
if($this->fields!=null)
|
if($this->fields!=null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user