Home  >  Article  >  Backend Development  >  A method for saving drag layout in dojo toolkit php+dojo database dojo download here

A method for saving drag layout in dojo toolkit php+dojo database dojo download here

WBOY
WBOYOriginal
2016-07-29 08:36:251105browse

看老大介绍的dojo框架,学习着写了下。刚开始学习php 请大家指教下!发现发不了附件。发两个代码大家自己体会了。

复制代码 代码如下:


session_start();
if ($_SESSION['gh']==''){
header('location:login.php');
}
include("config.php");
$sql="select * from module";
$result=mssql_query($sql,$conn);
$num=mssql_num_rows($result);
//echo $num;
?> 
 
 
 

 
 
$sql='select * from module where id not in (select mokuaiid from geren where gh ='.$_SESSION['gh'].')';
$result=mssql_query($sql,$conn);
while($myrow=mssql_fetch_array($result))
echo ''.$myrow['mn'].''; 
?> 
 
 
   
     
for ($p=1; $p<=$num;$p=$p+2){  
  echo ''; 
  $sql='select mokuaiid from geren where biaogeid='.$p.' and gh ='.$_SESSION['gh']; 
  $result=mssql_query($sql,$conn); 
  while($myrow=mssql_fetch_array($result)){ 
   $sql='select * from module where id='.$myrow['mokuaiid']; 
   $result1=mssql_query($sql,$conn);    
   while($myrow1=mssql_fetch_array($result1)){ 
    echo ''.$myrow1['mn'].''; 
   } 
  }      
  echo '
';  
}   
?> 
     
for ($p=2; $p<=$num;$p=$p+2){  
  echo ''; 
  $sql='select mokuaiid from geren where biaogeid='.$p.' and gh ='.$_SESSION['gh']; 
  $result=mssql_query($sql,$conn); 
  while($myrow=mssql_fetch_array($result)){ 
   $sql='select * from module where id='.$myrow['mokuaiid']; 
   $result1=mssql_query($sql,$conn);    
   while($myrow1=mssql_fetch_array($result1)){ 
    echo ''.$myrow1['mn'].''; 
   } 
  }      
  echo '
';  
}   
?> 
  
   
 
复制代码 代码如下:


session_start(); 
if ($_SESSION['gh']==''){ 
header('location:login.php');  

include("config.php"); 
$sql='delete from geren where gh='.$_SESSION['gh']; 
mssql_query($sql); 
$gr=str_replace("container","",$_POST['gr']); 
//echo $gr; 
$array = explode("$", $gr); 
for ($i=0;$i<=count($array)-2;$i++){ 
$add=explode("|",$array[$i]); 
$sql='insert into geren (mokuaiid,biaogeid,gh) values ("'.$add[0].'","'.$add 
[1].'","'.$_SESSION['gh'].'")'; 
//echo $sql.'
'; 
mssql_query($sql); 

header("location:view.php"); 
?> 


dojo 这里下载 http://download.dojotoolkit.org/release-0.3.1/dojo-0.3.1-ajax.zip

以上就介绍了dojo toolkit php+dojo 的数据库保存拖动布局的一个方法dojo 这里下载,包括了dojo toolkit方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Docker CentOS7 LNMP环境yum方式安装Next article:php代码 个人站长制做网页常用的php代码

Related articles

See more