// in dieser maske bleiben? if ($Ranew == "nein") { $T->add_refresh(0, "?menu=sites"); $id = $new_id; } else { $id = ""; $preset = array(); } } } } else { // alter eintrag // auch editiert? $what_to_do = "editieren"; if ($send != 0) { if ($PSITE->edit($id, $Rname, $Rkuerzel, $Rhead, $Rfoot) == false) { $formerror['main'] .= "Fehler: " . $PSITE->error_msg; } else { $status = "Änderung erfolgreich."; //$preset = $PSITE->get_info( $id ); $T->add_refresh(0, "?menu=sites"); } } // preset $preset = $PSITE->get_info($id); if ($preset == false) { $formerror['main'] = $PSITE->error_msg; } } // fill template head $T->add_title("Bereich " . $preset['name'] . " " . $what_to_do);
$tx = $PSITES->add($t2name . time(), $kuerzel1); it("create other name but same kuerzel", $tx, false, $PSITES->error_msg); $t3 = $PSITES->add("zwei", $kuerzel2); it("create 2nd", $t3, $t2 + 1); // id++ // wenn gleicher eintrag geschrieben wird, liefere id zur�ck des ersten eintrags $t4 = $PSITES->add("zwei", $kuerzel2); it("create 2nd, 2nd time; same id", $t4, $t3); // gleiche id? | # it("create 2nd, 2nd time; -1 ",$t4,-1,"(whould be nice but isn't tragic)"); $t5 = count($PSITES->show_all()); it("show all, count=2", $t5, 2); $s = $PSITES->get_name($t2); it("get_name", $s, $t2name, $PSITES->error_msg); $tname = "neu eins"; $t = $PSITES->edit($t2, $tname, $kuerzel1); $s = $PSITES->get_name($t2); it("edited, get_name", $s, $tname, $PSITES->error_msg); /* * * * entries * * * */ echo "<h2>ENTRIES</h2>"; echo "<h3>untested</h3>"; $PENTRIES->set_title("Ein kleiner Titel"); $PENTRIES->set_filename("image.jpg"); // i have to do an upload $psource = "Ostseezeitung"; $PENTRIES->set_source($psource); $key[0] = "meier"; $PENTRIES->add_keyword($key[0]); $key[1] = "M�LLer"; $PENTRIES->add_keyword($key[1]); $PENTRIES->add_site("1");