gnopaste
Sorry for this ugly message. We are searching for some translators.
Please take a look here
Thanks to all translators, you're doing a great job!
Userdata
Name
func
Scriptlanguage
PHP
Tabwidth
4
Date
03/01/2010 05:01:42 pm
IP
79.222.42.87
Description
The user was too lazy to give a description
Code (
Hide rownumbers
)
<?php
function
inputarray($tmpf){
$tmpfile = fopen($tmpf, "r");
$tmpbuffer =
''
;
while
(!feof($tmpfile)){
$tmpbuffer .= fgets($tmpfile, 4096);
}
fclose($tmpfile);
$strsplit =
'[input]'
;
$inputs = explode($strsplit, $tmpbuffer);
return
$inputs;
}
function
addedinputs($tmpf){
if
(is_file($tmpf)){
$inputs = inputarray($tmpf);
}
else
{
$tmpfile = fopen($tmpf, "w+");
fwrite($tmpfile,
'none'
);
fclose($tmpfile);
$inputs = inputarray($tmpf);
}
return
$inputs;
}
function
switchPositions($id, $to, $targetar){
$valueone = $targetar[$id];
$valuetwo = $targetar[$to];
$targetar[$id] = $valuetwo;
$targetar[$to] = $valueone;
return
$targetar;
}
function
updateDB($tmpf, $targetar){
$newdb = implode(
'[input]'
, $targetar);
// Erzeugen der neuen Datensaetze
unlink($tmpf);
// Ersetzen der alten Datensaetze
$dbfile = fopen($tmpf, "w+");
fwrite($dbfile, $newdb);
fclose($dbfile);
}
function
getPositionId($id, $targetar, $criterion, $direction){
if
($direction ==
'up'
){
$id--;
}
else
{
$id++;
}
while
($targetar[$id] == $criterion){
if
($direction ==
'up'
){
$id--;
}
else
{
$id++;
}
}
return
$id;
}
?>
submitter »
gnopaster
|
imprint
« imprint
»
Terms of use
«
Donate via
Bitcoin
:
1KCq5UvwuTMwgSAHUsd7eqkBWTHZau1ydN