


看老大介绍的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;
?>
<script></script>
<script> <BR>//引用以下两个dojo包 <BR>dojo.require("dojo.style"); <BR>dojo.require("dojo.dnd.*"); <BR>function init(){ <BR> //利用classname取到元素列表,将其注册为dojo.dnd.HtmlDragSour <BR> var arr=dojo.html.getElementsByClass('divdrag') <BR> for(var i=0;i<arr.length;i++){ <BR> var parentDiv=arr.parentNode.id <BR> new dojo.dnd.HtmlDragSource(arr,parentDiv); <BR> } <BR> //定义容器 <BR>new dojo.dnd.HtmlDropTarget("container0", ["container0",<?php for ( $p = 1 ; $p <= $num ; $p ++) { <BR>echo '"'.'container'.$p.'"'; <BR>if ($p != $num){ <BR> echo ","; <BR>} <BR> } <BR> echo ']); '; <br> for ($p =1 ; $p <=$num ;$p++){ <BR> echo chr(13).'new dojo.dnd.HtmlDropTarget("container'.$p.'", ["container0",'; <BR> for ($o =1 ;$o <= $num;$o++){ <BR> echo '"container'.$o.'"'; <BR> if ($o != $num){ <BR> echo ","; <BR> } <BR>} <BR> echo ']); '; <BR> } <BR> echo chr(13); <br> ?> <BR>} <BR>//增加到window.onload事件中 <BR>window. <BR>function bjsave() { <BR>gr="" <BR><?php <BR>$sql='select id from module'; <BR>$result=mssql_query($sql,$conn); <BR>while($myrow=mssql_fetch_array($result)) <BR>echo 'if (mokuai'.$myrow['id'].'.parentElement.id !="container0") {'.chr(13).'gr=gr+'.$myrow['id'].'+"|"+ mokuai'.$myrow['id'].'.parentElement.id+ "$"'.chr(13).'}'.chr(13); <BR>?> <BR>form1.gr.value=gr; <BR>form1.submit(); <BR>} <BR></script>
$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 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 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$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教程有兴趣的朋友有所帮助。

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

In this article, we're going to explore the notification system in the Laravel web framework. The notification system in Laravel allows you to send notifications to users over different channels. Today, we'll discuss how you can send notifications ov

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

Notepad++7.3.1
Easy-to-use and free code editor

Atom editor mac version download
The most popular open source editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.
