if (isset($_POST['saveinfo'])) {
$szoveg = stripinput($_POST['szoveg']);
if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_GET['info_id']) && isnum($_GET['info_id']))) {
$result = dbquery("UPDATE ".DB_INFO." SET
szoveg = '".$szoveg."'
WHERE info_id='".$info_id."'");
redirect(FUSION_SELF.$aidlink."&status=af&info_id=".$info_id);
} else {
$result = dbquery("INSERT INTO ".DB_INFO." SET szoveg = '".$szoveg."'");
redirect(FUSION_SELF.$aidlink."&status=ah");
}
} else {
if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_GET['info_id']) && isnum($_GET['info_id']))) {
$result = dbquery("SELECT * FROM ".DB_INFO." WHERE info_id='".$info_id."'");
$data = dbarray($result);
$szoveg = stripinput($data['szoveg']);
$action = FUSION_SELF.$aidlink."&action=edit&info_id=".$info_id;
} else {
$szoveg = "";
$action = FUSION_SELF.$aidlink;
}
opentable();
echo "<form name='saveinfoform' method='post' action='$action'>\n";
echo "<table class='tbl-border' cellpadding='0' cellspacing='1' width='100%' align='center' border='0'>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>SZÖVEG:</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'><input type='text' name='szoveg' value='".$szoveg."'/>\n</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='center' colspan='2'><br />\n<input type='submit' name='saveinfo' value='MENTÉS' class='button' />\n</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</form>\n";
closetable();
}
$t1 ="";
$t2 ="";
$be ="";
$ho ="";
$mu ="";
$te ="";
$le ="";
if (isset($_POST['saveinfo'])) {
$t1 = ($_POST['t1'] =="" ? $locale['admin_058'] : stripinput($_POST['t1']));
$t2 = ($_POST['t2'] =="" ? $locale['admin_059'] : stripinput($_POST['t2']));
$t3 = stripinput($_POST['t3']);
$be = ($_POST['be'] =="" ? $locale['admin_060'] : stripinput($_POST['be']));
$ho = ($_POST['ho'] =="" ? $locale['admin_061'] : stripinput($_POST['ho']));
$ev = stripinput($_POST['ev']);
$mu = ($_POST['mu'] =="" ? $locale['admin_062'] : stripinput($_POST['mu']));
$te = ($_POST['te'] =="" ? $locale['admin_063'] : stripinput($_POST['te']));
$le = ($_POST['le'] =="" ? $locale['admin_064'] : stripinput($_POST['le']));
$ir = stripinput($_POST['ir']);
if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_GET['nf_id']) && isnum($_GET['nf_id']))) {
$result = dbquery("UPDATE ".DB_NF." SET
t1 = '".$t1."',
t2 = '".$t2."',
t3 = '".$t3."',
be = '".$be."',
ho = '".$ho."',
ev = '".$ev."',
mu = '".$mu."',
te = '".$te."',
le = '".$le."',
ir = '".$ir."'
WHERE nf_id='".$nf_id."'");
redirect(FUSION_SELF.$aidlink."&status=af&nf_id=".$nf_id);
} else {
$result = dbquery("INSERT INTO ".DB_NF." SET
t1 = '".$t1."',
t2 = '".$t2."',
t3 = '".$t3."',
be = '".$be."',
ho = '".$ho."',
ev = '".$ev."',
mu = '".$mu."',
te = '".$te."',
le = '".$le."',
ir = '".$ir."',
da = '".time()."',
la = '0'");
redirect(FUSION_SELF.$aidlink."&status=ah");
}
} else {
if ((isset($_GET['action']) && $_GET['action'] == "edit") && (isset($_GET['nf_id']) && isnum($_GET['nf_id']))) {
$result = dbquery("SELECT * FROM ".DB_NF." WHERE nf_id='".$nf_id."'");
$data = dbarray($result);
$t1 = stripinput($data['t1']);
$t2 = stripinput($data['t2']);
$t3 = stripinput($data['t3']);
$be = stripinput($data['be']);
$ho = stripinput($data['ho']);
$ev = stripinput($data['ev']);
$mu = stripinput($data['mu']);
$te = stripinput($data['te']);
$le = stripinput($data['le']);
$ir = stripinput($data['ir']);
$action = FUSION_SELF.$aidlink."&action=edit&nf_id=".$nf_id;
} else {
$t1 = "";
$t2 = "";
$t3 = "";
$be = "";
$ho = "";
$ev = "";
$mu = "";
$te = "";
$le = "";
$ir = $userdata['user_name'];
$action = FUSION_SELF.$aidlink;
}
opentable($locale['admin_004']);
echo "<form name='saveinfoform' method='post' action='$action'>\n";
echo "<table class='tbl-border' cellpadding='0' cellspacing='1' width='100%' align='center' border='0'>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_006']." <img src='".INFUSIONS."nf/image/info.png' style='vertical-align: middle;' width='14px' height='14px' alt='' title='".$locale['admin_007']."' /><strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='500px'><input type='text' name='ir' value='".$ir."' class='textbox' style='width:500px;padding-left:2px;' />\n<br />\n</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_008']." <img src='".INFUSIONS."nf/image/info.png' style='vertical-align: middle;' width='14px' height='14px' alt='' title='".$locale['admin_009']."' /><strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input type='text' name='t1' value='".$t1."' maxlength='1500' class='textbox' style='width:500px;padding-left:2px;' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_010']." <img src='".INFUSIONS."nf/image/info.png' style='vertical-align: middle;' width='14px' height='14px' alt='' title='".$locale['admin_011']."' /><strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input type='text' name='t2' value='".$t2."' maxlength='2000' class='textbox' style='width:500px;padding-left:2px;'/>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_012']." <img src='".INFUSIONS."nf/image/info.png' style='vertical-align: middle;' width='14px' height='14px' alt='' title='".$locale['admin_013']."' /><strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input required='required' type='text' name='t3' value='".$t3)."' maxlength='500' class='textbox' style='width:500px;padding-left:2px;' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_014']." <img src='".INFUSIONS."nf/image/info.png' style='vertical-align: middle;' width='14px' height='14px' alt='' title='".$locale['admin_015']."' /><strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input type='text' name='be' value='".$be."' maxlength='300' class='textbox' style='width:500px;padding-left:2px;' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_016']." <img src='".INFUSIONS."nf/image/info.png' style='vertical-align: middle;' width='14px' height='14px' alt='' title='".$locale['admin_017']."' /><strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input type='text' name='ho' value='".$ho."' maxlength='500' class='textbox' style='width:500px;padding-left:2px;' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_018']." <img src='".INFUSIONS."nf/image/info.png' style='vertical-align: middle;' width='14px' height='14px' alt='' title='".$locale['admin_019']."' /><strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input required='required' type='text' name='ev' value='".$ev)."' maxlength='20' class='textbox' style='width:500px;padding-left:2px;' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_020']."<strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input type='text' name='mu' value='".$mu."' maxlength='4500' class='textbox' style='width:500px;padding-left:2px;' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px;'>".$locale['admin_021']."<strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='width:500px;'>";
echo "<input type='text' name='te' value='".$te."' maxlength='4500' class='textbox' style='width:500px;padding-left:2px;' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='right' class='tbl1 tbl-border' style='width:200px; vertical-align:text-top;'>".$locale['admin_022']."<strong>:</strong>".$locale['admin_005']."</td>\n";
echo "<td align='left' class='tbl1 tbl-border' style='500px'><textarea name='le' cols='60' rows='5' class='textbox' style='width:500px;padding-left:2px;'>".$le."</textarea><br />\n";
echo display_bbcodes("510px", "le", "saveinfoform", "b|i|u|url|img|center|quote|color|bcolor")."</td>\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td align='center' colspan='2'><br />\n";
echo "<input type='submit' name='saveinfo' value='".$locale['admin_023']."' class='button' />\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</form>\n";
closetable();
}
$szoveg = ($_POST['szoveg'] =="" ? $locale['szoveg'] : stripinput($_POST['szoveg']));
$szoveg = ($_POST['szoveg'] == "DEFAULT VALUE HERE IF EMPTY" stripinput ($_POST['szoveg']) "?");
$szoveg = (? $_POST['szoveg'] == "" $locale['szoveg']: stripinput ($_POST'szoveg']));
<?php
/*-------------------------------------------------------+
| PHPFusion index-content Management System
| Copyright (C) 2002 - 2013 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: test.php
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
require_once THEMES."templates/header.php";
if (!iADMIN) { redirect(BASEDIR."index.php"); }
opentable("TEST");
$szoveg ="";
$szoveg = ($_POST['szoveg'] =="" ? "DEFAULT VALUE HERE IF EMPTY" : stripinput($_POST['szoveg']));
if (isset($_POST['saveinfo'])) {
echo $szoveg;
}
echo "<form name='saveinfoform' method='post' action='".FUSION_SELF."'>
<input type='text' name='szoveg' value=''/>
<input type='submit' name='saveinfo' value='MENTÉS' class='button' />
</form>\n";
closetable();
require_once THEMES."templates/footer.php";
?>
Category Forum
Modifications and Requests - 8Labels
None yet
Statistics
2 participants
Notifications
You are not receiving notifications from this thread.
Related Questions