A method to save drag layout in php+dojo database dojo download here_PHP tutorial
WBOY
Release: 2016-07-21 15:57:34
Original
939 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
http://www.bkjia.com/PHPjc/317834.htmlwww.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:...
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