A method to save drag layout in php+dojo database dojo download here_PHP tutorial

WBOY
Release: 2016-07-21 15:57:34
Original
909 people have browsed it

After reading the dojo framework introduced by the boss, I learned and wrote it. I just started learning php, please give me some advice! Found that the attachment could not be sent. Post two codes for everyone to experience.

Copy code The code is as follows:

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"); 
?> 

Download dojo here http://download.dojotoolkit.org/release-0.3.1/dojo-0.3.1-ajax.zip

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/317834.htmlTechArticleLooking at the dojo framework introduced by the boss, I learned and wrote it. I just started learning php, please give me some advice! Found that the attachment could not be sent. Post two codes for everyone to experience. Copy the code The code is as follows:...
source:php.cn
Previous article:PHP batch deletion of data_PHP tutorial Next article:The Fourteen Most Confusing Problems for PHP Beginners_PHP Tutorial
Statement of this Website
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
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!