改进UITABLE控制
This commit is contained in:
parent
aad786b62c
commit
5a64d688b6
@ -3,14 +3,14 @@
|
||||
function CreateInputGroup()
|
||||
{
|
||||
$type =func_get_arg(0);
|
||||
$id =func_get_arg(1);
|
||||
$name =func_get_arg(1);
|
||||
$label =func_get_arg(2);
|
||||
$size =func_get_arg(3);
|
||||
|
||||
echo '<div class="form-group">
|
||||
<label class="control-label col-sm-2">'.$label.'</label>
|
||||
<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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
static $global_sql=null;
|
||||
$global_sql=null;
|
||||
|
||||
function get_sql()
|
||||
{
|
||||
@ -135,8 +135,14 @@
|
||||
++$count;
|
||||
}
|
||||
|
||||
// echo 'SQLString: '.$sql_string;
|
||||
return $sql->query($sql_string);
|
||||
$sql_result=$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;
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -46,9 +46,9 @@
|
||||
echo '<div class="panel-body"><p>'.$this->body.'</p></div>';
|
||||
|
||||
if($this->table_style)
|
||||
echo '<table class="table table-'.$this->table_style.'">';
|
||||
echo '<table class="table table-responsive table-'.$this->table_style.'">';
|
||||
else
|
||||
echo '<table class="table">';
|
||||
echo '<table class="table table-responsive">';
|
||||
|
||||
if($this->fields!=null)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user