|
Titel: [Erledigt] Admin Modul Beitrag von: mattesLau am 03 März 2009, 19:42:13 Hallo
Kann mir einer erklären wie man in PragmaMX ein Admin Modul aufbaut und wie man das mit die function macht und wie man es mit <form action=\"admin.php?op=meinmodul&action=save\" method=\"post\"> aufrufen kann. Gruß Mattes Titel: Re: Admin Modul Beitrag von: mattesLau am 04 März 2009, 19:29:32 hier mal mein code
Code: [Select] <?Php vielleicht kann mir einer helfeninclude("header.php"); $wysiwyg = 0; $wysiwyg_topbox = 0; include_once('spaw/spaw_control.class.php'); global $admin, $prefix, $multilingual, $user_prefix; GraphicAdmin(); if (!$GLOBALS['wysiwyg'] || !$GLOBALS['wysiwyg_topbox']) { $content = str_replace("<br />", "\n", $content); $content = str_replace("<br>", "\n", $content); } OpenTable(); echo "<h1><center>Yout Account Navi Code</center></h1>"; echo "<br><br>"; #echo "<form action=\"admin.php?op=account_navi&action=save\" method=\"post\">"; echo "<form action=\"admin.php\" method=\"post\">"; $query = mysql_query("SELECT * FROM {$user_prefix}_account_menue"); while($row = mysql_fetch_assoc($query)) { $content=$row['linkname']; } if ($GLOBALS['wysiwyg'] && $GLOBALS['wysiwyg_topbox']) { $sw = new SPAW_Wysiwyg('content', $content, _DOC_LANGUAGE, $GLOBALS['wysiwyg_toolbar'], $GLOBALS['wysiwyg_btnset'], '100%', '350'); $sw->show(); } else { echo "<textarea name=\"content\" rows=\"15\" cols=\"60\">" . htmlspecialchars($content) . "</textarea>"; } echo "<input type=\"hidden\" name=\"op1\" value=\"savemsg\">"; echo "<input type=\"submit\" value=\"Speichern\">"; echo "</form>"; /* @author: akeil production */ function save() { # $content = mysql_real_escape_string($_POST['content']); # $query = mysql_query("INSERT INTO tabelle (feld) VALUES ('".$content."')"); echo('save()'); $content = mysql_real_escape_string($_POST['content']); $query = mysql_query("UPDATE {$user_prefix}_account_menue SET linkname = '".$content."' WHERE id = '1'"); echo mysql_error(); if($query == true) { echo('erfolgreich eingetragen'); } else { echo('fehler beim Eintragen'); } } function account_navi() { # global $prefix; # $title = mxAddSlashesForSQL(($title)); # if (!$GLOBALS['wysiwyg'] || !$GLOBALS['wysiwyg_topbox']) { # $content = str_replace("\n", "<br />", $content); # } # $content = mxAddSlashesForSQL(($content)); # $result = sql_query("update " . $prefix . "_account_menue set linkname='$content' "); } CloseTable(); switch ($op) { case "account_navi": break; } include("footer.php"); ?> Gruß Mattes Titel: Re: Admin Modul Beitrag von: grafikmurkser am 05 März 2009, 10:24:50 öhm ich denk ich werde nicht der einzige sein der sich fragt : adminmodul ? wozu ?
Titel: Re: Admin Modul Beitrag von: mattesLau am 05 März 2009, 10:27:54 Ich hab eine Neues Modul geschrieben, und dazu will ich ein Admin Modul erstellen für die Einstellung
das Modul an sich selber ist schon fertig es fehl nur noch der Teil, in Admin bereich und zwar das Speichern wie ich die function ausführe, dann ist das modul Fertig und geb es dann auch bekannt. Gruß Mattes Titel: Re: Admin Modul Beitrag von: SvenW am 05 März 2009, 14:16:37 Schau dir mal den Ordner “admin“ im mx-Team Modul an:
http://www.pragmamx.org/Downloads-op-view-lid-653.html Ansonsten gibt es auch noch die Möglichkeit es mit einem Frame einzubinden… Titel: Re: Admin Modul Beitrag von: mattesLau am 05 März 2009, 17:32:10 Ihr habt mir das falsch verstanden, ich hab es ja in admin menü drin
nur wie muß mein echo "<form action=\"admin.php?op=account_navi&action=save\" method=\"post\">"; aussehen wenn ich die funktion function save() ausführen will Gruß Mattes Titel: Re: Admin Modul Beitrag von: mattesLau am 06 März 2009, 20:44:08 OK danke für die hilfe
Ich hab es jetzt hinbekommen, Gruß Mattes |