Version avec modules séparés !

This commit is contained in:
Chouchen
2010-09-27 10:48:53 +00:00
parent 2861556131
commit 734e6f4829
81 changed files with 324 additions and 264 deletions

View File

@@ -1,18 +0,0 @@
<?
$reserve = $_POST['reserve'];
$doc = new DOMDocument;
$doc->load('../db/links.xml');
$xpath = new DOMXpath($doc);
// Buffering and deleting moved element
foreach($xpath->query('label/link[title = "'.$reserve.'"]') as $node) {
$buffer = $node;
$node->parentNode->removeChild($node);
}
$searchLabel = $xpath->query('reserve');
$searchLabel->item(0)->appendChild($buffer);
$doc->save('../db/links.xml');

View File

@@ -1,12 +0,0 @@
<?
include '../class/Links.php';
if($links_xml = simplexml_load_file('../'.links::LINKS_FILE)){
$links = $links_xml->reserve;
foreach($links as $label){
echo '<ul id="reserveiconlist">';
foreach($label->link as $link){
echo '<li class="iconitem" id="'.$link->title.'"><img src="images/interface/delete.png" class="deleteLink" /><a href="'.$link->url.'" class="'.$link->onclick.'"><img src="images/links/'.$link->img.'" /><br>'.$link->title.'</a></li>';
}
echo '</ul> ';
}
}

View File

@@ -1,19 +0,0 @@
<?
$reserve = $_POST['reserve'];
$doc = new DOMDocument;
$doc->load('../db/links.xml');
$xpath = new DOMXpath($doc);
// Buffering and deleting moved element
foreach($xpath->query('reserve/link[title = "'.$reserve.'"]') as $node) {
$buffer = $node;
$node->parentNode->removeChild($node);
}
$searchLabel = $xpath->query('label');
$lastLabel = $searchLabel->length -1;
$searchLabel->item($lastLabel)->appendChild($buffer);
$doc->save('../db/links.xml');

View File

@@ -1,21 +0,0 @@
<?
$xmla = simplexml_load_file('../db/todoist.xml');
if(isset($_POST['token'])){
$token = trim($_POST['token']);
$xmla->addChild("token", $token);
$xmla->asXML('../db/todoist.xml');
echo "ok";
}else if(isset($_POST['name']) && isset($_POST['id'])){

View File

@@ -1,36 +0,0 @@
<?
$label = $_POST['label'];
$order = $_POST['order'];
$itemMoved = $_POST['itemMoved'];
$orderArray = explode(',', $order);
$itemIndex = 0;
foreach($orderArray as $index=>$value){
if($value == $itemMoved)
$itemIndex = (int)$index;
}
$itemAfter = '';
if(isset($orderArray[$itemIndex+1]))
$itemAfter = $orderArray[$itemIndex+1];
$doc = new DOMDocument;
$doc->load('../db/links.xml');
$xpath = new DOMXpath($doc);
// Buffering and deleting moved element
foreach($xpath->query('label/link[title = "'.$itemMoved.'"]') as $node) {
$buffer = $node;
$node->parentNode->removeChild($node);
}
if($itemAfter != ''){
$searchLabel = $xpath->query('label[@id="'.$label.'"]/link[title = "'.$itemAfter.'"]')->item(0);
$searchLabel->parentNode->insertBefore($buffer, $searchLabel);
}else{
$searchLabel = $xpath->query('label[@id="'.$label.'"]');
$searchLabel->item(0)->appendChild($buffer);
}
$doc->save('../db/links.xml');

View File

@@ -1,22 +0,0 @@
<?php
// Error reporting
error_reporting(E_ALL^E_NOTICE);
// Validating the input data:
if(!is_numeric($_GET['id']) || !is_numeric($_GET['x']) || !is_numeric($_GET['y']) || !is_numeric($_GET['z']))
die("0");
// Escaping:
$id = (int)$_GET['id'];
$x = (int)$_GET['x'];
$y = (int)$_GET['y'];
$z = (int)$_GET['z'];
// Saving the position and z-index of the note:
$xmla = simplexml_load_file('../db/notes.xml');
$target = -1;
$i = 0;
foreach ($xmla->note as $s) {