"._ADMINCOME."
"; elseif ($tab=='_ele_numeri') echo "
"._ADMINNUMERI."

"; elseif ($tab=='_ele_servizi') echo "
"._ADMINSERVIZI."

"; elseif ($tab=='_ele_link') echo "
"._ADMINLINK."

"; echo "
"; echo "
"._ALLCOME."

" ."" .""; $result = mysql_query("select mid, title,preamble, content, editimage from ".$prefix.$tab." where id_cons='$id_cons'", $dbi); while(list($mid2, $title, $preamble, $content, $editimage) = mysql_fetch_row($result)) { echo "" ."" .""; } echo "
"._TITOLO." "._FUNZIONI." 
$title "._EDIT." - "._DELETE." " ."

"; echo "
"; echo "
"; if($vai=='editedit'){ $result = mysql_query("select title, preamble,content, editimage from ".$prefix.$tab." WHERE mid='$mid' AND id_cons='$id_cons'", $dbi); list($add_title,$add_preamble, $add_content, $editimage) = mysql_fetch_row($result); } //25.05.2009 $sql="SELECT editor,ed_user FROM ".$prefix."_config"; $res = mysql_query("$sql", $dbi); list($editor,$ed_user) = mysql_fetch_row($res); // echo "
"._ADDCOME."

"; echo "
"; echo "
"._TITOLO.":


"; if ($op=="link"){ if ($add_preamble=='')$add_preamble="http://"; echo ""._LINK.":
" ."

"; }else{ echo ""._PREAMBOLO.":
"; //25 maggio 2009 if ($editor) js_textarea("add_preamble", "$add_preamble", "$ed_user", "80", "10"); // 25 --> 24 maggio 2009 editor' else echo "

"; // echo "

"; } if ($op=='come') echo _CONTENUTO; elseif ($op=='numeri') echo _NUMERITEL; elseif ($op=='servizi') echo _DESCRAPP; elseif ($op=='link') echo _DESCRLINK; echo ":
"; //( "._HELPHTML." )
"; //25 maggio 2009 if ($editor) js_textarea("add_content", "$add_content", "$ed_user", "80", "20"); // 25 -->24 maggio 2009 editor else echo "

"; // echo "

"; echo "" ."" ."" .""; if ($vai=='editedit'){ echo "" .""; }else{ echo "" .""; } echo ""; echo "
"; echo""; include ("footer.php"); } function saveedit($mid, $title, $preamble, $content) { global $prefix, $dbi,$id_cons,$id_cons_gen,$tab,$op; $temp=$title.$preamble.$content; if (eregi("script",$temp)) die("La parola script e' proibita, devi toglierla dal testo."); $result = mysql_query("update ".$prefix.$tab." set title='$title', preamble='$preamble', content='$content' WHERE mid='$mid' AND id_cons='$id_cons'", $dbi); Header("Location: admin.php?op=$op&vai=come&id_cons_gen=$id_cons_gen"); } function addedit($add_title, $add_preamble, $add_content) { global $prefix, $dbi,$id_cons, $id_cons_gen,$tab,$op; $result = mysql_query("insert into ".$prefix.$tab." (id_cons,title,preamble,content) values ('$id_cons', '$add_title', '$add_preamble','$add_content')", $dbi); if (!$result) { exit(); } Header("Location: admin.php?op=$op&vai=come&id_cons_gen=$id_cons_gen"); } function deleteedit($mid, $ok=0) { global $prefix, $dbi, $id_cons,$id_cons_gen,$tab,$op; if($ok) { $result = mysql_query("delete from ".$prefix.$tab." where mid=$mid and id_cons='$id_cons'", $dbi); if (!$result) { return; } Header("Location: admin.php?op=$op&vai=come&id_cons_gen=$id_cons_gen"); } else { ele(); OpenTable(); echo "
"._ADMINCOME."
"; CloseTable(); echo "
"; OpenTable(); echo "
"._REMOVEINFO.""; echo "

[ "._NO." | "._YES." ]
"; CloseTable(); echo""; include("footer.php"); } } switch ($vai){ // or "come" or "servizi" or "editedit" case "come": ele(); come(); break; case "editedit": ele(); come(); break; case "saveedit": saveedit($mid, $add_title, $add_preamble,$add_content); break; case "numeri": ele(); come(); break; case "servizi": ele(); come(); break; case "link": ele(); come(); break; case "addedit": addedit($add_title, $add_preamble,$add_content); break; case "deleteedit": deleteedit($mid, $ok); break; } ?>