Bywalec
Postów: 377 Pomógł: 42
v7.02.07 Data rejestracji: 18.03.2005 10:39
|
Witam, mam ci ja taki kod ramówki, ale zmiany może dokonać tylko ktoś z prawami admina a ja chciałbym by mógł to robić ktoś kto jest w 1 grupie bez praw admina.
Oto kod proszę o pomoc.
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: site_team.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| 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 http://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";
if (!checkRights("RAM") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); }
require_once THEMES."templates/admin_header.php";
include INFUSIONS."ramowka/infusion_db.php";
include INC_RAMOWKA."ramowka_include.php";
include INFUSIONS."top_fixed_menu_panel/top_fixed_menu_panel.php";
if (file_exists(INFUSIONS."ramowka/locale/".$settings['locale'].".php")) {
include INFUSIONS."ramowka/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."ramowka/locale/English.php";
}
if ($settings['tinymce_enabled']) {
echo "<script language='javascript' type='text/javascript'>advanced();</script>\n";
} else {
require_once INCLUDES."html_buttons_include.php";
}
$axn = isset($_REQUEST['axn']) ? $_REQUEST['axn'] : "";
$ram_id = (isset($_REQUEST['ram_id']) AND isnum($_REQUEST['ram_id'])) ? $_REQUEST['ram_id'] : "";
if (dbrows(dbquery("SELECT * FROM ".DB_PREFIX."ramowka_settings")) < 1) {
echo "<center><div class='admin-message'>".$locale['ram_20']." - ".$locale['ram_026']."</div><center>";
}
$result = dbquery("SELECT srama_manternance, srama_manternance_text FROM ".DB_PREFIX."ramowka_settings WHERE srama_id ='1'");
$ram_pa_st = dbarray($result);
if ($ram_pa_st['srama_manternance'] == '1') {
echo rammanternance();
}
opentable($locale['ram_000'].$locale['ram_067']);
switch ($axn) {
default:
$result = dbquery("SELECT a.*, b.user_id, b.user_name, b.user_status, ram_stgd FROM ".DB_RAMOWKA." AS a LEFT JOIN ".DB_USERS." AS b ON a.ram_user=b.user_id ORDER BY ram_day, ram_stgd ASC");
$rows = dbrows($result);
if ($rows > 0) {
echo "<table width='100%' cellpadding='1' cellspacing='1' border='0' align='center' style='margin-top:1em;margin-bottom:1em;'>\n";
echo "<tr>";
echo "<td align='right' class='tbl2' colspan='8'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=add'><input type='submit' value='".$locale['ram_032']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "<td align='center' class='tbl2'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=settings'><input type='submit' value='".$locale['ram_030']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<table width='100%' cellpadding='1' cellspacing='1' border='0' align='center' style='margin-top:1em;margin-bottom:1em;'>\n";
echo "<tr>";
echo "<td align='center' width='20%' class='tbl2' style='font-weight:bold'>".$locale['ram_003']."</td>";
echo "<td align='center' width='5%' class='tbl2' style='font-weight:bold'>".$locale['ram_009']."</td>";
echo "<td align='center' width='15%' class='tbl2' style='font-weight:bold'>".$locale['ram_003a']."</td>";
echo "<td align='center' width='15%' class='tbl2' style='font-weight:bold'>".$locale['ram_004']."</td>";
echo "<td align='center' width='5%' class='tbl2' style='font-weight:bold'>".$locale['ram_028']."</td>";
echo "<td align='center' width='1%' class='tbl2' style='font-weight:bold'>".$locale['ram_029']."</td>";
echo "</tr>";
while ($data = dbarray($result)) {
echo "<tr>";
echo "<td align='center' class='tbl1' style='font-weight:bold'>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>\n";
echo "<td align='center' class='tbl1'>";
$ramday = $data['ram_day'];
echo getramday($ramday);
echo "</td>\n";
echo "<td align='center' class='tbl1'>";
if($data['ram_day']=="1") {
$result1 = dbquery("SELECT srama_data_pon FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_pon'];
} elseif($data['ram_day']=="2") {
$result1 = dbquery("SELECT srama_data_wto FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_wto'];
} elseif($data['ram_day']=="3") {
$result1 = dbquery("SELECT srama_data_sro FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_sro'];
} elseif($data['ram_day']=="4") {
$result1 = dbquery("SELECT srama_data_czw FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_czw'];
} elseif($data['ram_day']=="5") {
$result1 = dbquery("SELECT srama_data_pio FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_pio'];
} elseif($data['ram_day']=="6") {
$result1 = dbquery("SELECT srama_data_sob FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_sob'];
} elseif($data['ram_day']=="0") {
$result1 = dbquery("SELECT srama_data_nie FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_nie'];
}
echo "</td>\n";
echo "<td align='center' class='tbl1' style='font-size:12px;'>".$data['ram_stgd'].":".$data['ram_stmn']." - ".$data['ram_engd'].":".$data['ram_enmn']."</td>\n";
$addtime = $data['ram_addtime'];
echo "<td align='center' class='tbl1'>".date("Y.m.d H:i " , $addtime)."</td>\n";
echo "<td align='center' class='tbl1'>";
echo "<a class='tip_trigger' href='".FUSION_SELF.$aidlink."&axn=edit&ram_id=".$data['ram_id']."'><img src='".IMAGES."zapiszoff.png' onmouseover='src=\"".IMAGES."zapiszonn.png\"' onmouseout='src=\"".IMAGES."zapiszoff.png\"' style='border:0;'><span class='tip'>Edytuj</span></a>";
echo "<a class='tip_trigger' href='".FUSION_SELF.$aidlink."&axn=del&ram_id=".$data['ram_id']."'><img src='".IMAGES."usunoff.png' onmouseover='src=\"".IMAGES."usunonn.png\"' onmouseout='src=\"".IMAGES."usunoff.png\"' style='border:0;'><span class='tip'>Usuń</span></a>";
echo "</td></tr>";
}
echo "</table>";
echo "<table width='100%' cellpadding='1' cellspacing='1' border='0' align='center' style='margin-top:1em;margin-bottom:1em;'>\n";
echo "<tr>";
echo "<td align='right' class='tbl2' colspan='8'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=add'><input type='submit' value='".$locale['ram_032']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "<td align='center' class='tbl2'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=settings'><input type='submit' value='".$locale['ram_030']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "</tr>";
echo "</table>";
}
else {
echo "<div style='text-align:center'><p style='margin-top:2em'><span style='color:#cc0000; weight:bold;font-size:1.5em;'>".$locale['ram_001']."</span></p><br><br>\n";
echo "<p style='margin-bottom:2em'><a href='".FUSION_SELF.$aidlink."&axn=add'><input type='submit' value='".$locale['ram_032']."' class='button'></a>
</p><p style='margin-bottom:2em'><a href='".FUSION_SELF.$aidlink."&axn=settings'><input type='submit' value='".$locale['ram_030']."' class='button'></a>
</p></div>\n";
}
break;
case 'add':
if (isset($_POST['add_button'])) {
$ram_prezenter = stripinput($_POST['prezenter']);
$ram_day = stripinput($_POST['ram_day']);
$ram_start_god = stripinput($_POST['ram_start_god']);
$ram_start_mn = stripinput($_POST['ram_start_mn']);
$ram_end_god = stripinput($_POST['ram_end_god']);
$ram_end_mn = stripinput($_POST['ram_end_mn']);
dbquery("INSERT INTO ".DB_RAMOWKA." VALUES('', '$ram_name', '$ram_prezenter', '$ram_day', '$ram_start_god', '$ram_start_mn', '$ram_end_god', '$ram_end_mn', '0', '$ram_grupowa', '$ram_gosc', '$ram_stala', '".time()."')");
redirect (FUSION_SELF.$aidlink, "script");
} else {
echo "<form name='addform' action='".FUSION_SELF.$aidlink."&axn=add' method='post'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>";
echo "<tr>";
echo "<td align='center' class='tbl2' colspan='2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_051']."</span></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='130' class='tbl'>".$locale['ram_041']." <font color='red'>*</font></td>\n";
echo "<td class='tbl'>";
echo "<select name='prezenter' class='textbox' style='width:200px;' />";
include INC_RAMOWKA."ram_user_include.php";
echo"</select></td>";
echo "</td>";
echo "</tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_042']." <font color='red'>*</font></td>\n";
echo "<td class='tbl'><select name='ram_day' class='textbox' style='width:200px;' />\n";
include INC_RAMOWKA."ram_day_include.php";
echo"</select></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Audycje:</td>\n";
echo "<td class='tbl' >";
echo "<table width='200px' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>";
echo "<td class='tbl'>Od:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "<td class='tbl'>Do:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "</tr>";
echo "</table>";
echo"</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='130' class='tbl'>".$locale['ram_054']." <font color='red'>*</font></td>\n";
echo "<td class='tbl'><select name='ram_start_god' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_gd_include.php";
echo "</select> : <select name='ram_start_mn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_mn_include.php";
echo "</select> - <select name='ram_end_god' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_gd_include.php";
echo "</select> : <select name='ram_end_mn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_mn_include.php";
echo "</tr>";
echo "<tr>";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='submit' name='add_button' value='".$locale['ram_032']."' class='button' /></td>\n";
echo "</tr>\n</table>\n</form>\n";
}
break;
case 'edit':
if (isset($_POST['edit_button'])) {
$ram_prezenter = stripinput($_POST['prezenter']);
$ram_day = stripinput($_POST['ram_day']);
$ram_stgd = stripinput($_POST['ram_stgd']);
$ram_stmn = stripinput($_POST['ram_stmn']);
$ram_engd = stripinput($_POST['ram_engd']);
$ram_enmn = stripinput($_POST['ram_enmn']);
dbquery("UPDATE ".DB_RAMOWKA." SET
ram_user='$ram_prezenter',
ram_day='$ram_day',
ram_stgd='$ram_stgd',
ram_stmn='$ram_stmn',
ram_engd='$ram_engd',
ram_enmn='$ram_enmn',
WHERE ram_id='".$ram_id."'");
redirect (FUSION_SELF.$aidlink, "script");
} else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_id=".$ram_id."");
$data = dbarray($result);
echo "<form name='editform' action='".FUSION_SELF.$aidlink."&axn=edit' method='post' style='margin:2em;'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>";
echo "<tr>";
echo "<td align='center' class='tbl2' colspan='2'><span>".$locale['ram_052']."</span></td>";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_041']."</td>\n";
echo "<td class='tbl'><select name='prezenter' class='textbox' style='width:200px;' />\n";
include INC_RAMOWKA."ram_user_include.php";
echo"</select></td>\n";
echo "</td>\n";
echo "</tr>";
//--
//dzień
echo "<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_042']."</td>\n";
echo "<td class='tbl'><select name='ram_day' class='textbox' style='width:200px;' />\n";
include INC_RAMOWKA."ram_day_include.php";
echo"</select></td>\n";
echo "</tr>";
//--
//godziny
echo "<tr>\n";
echo "<td width='130' class='tbl'>Audycje:</td>\n";
echo "<td class='tbl' >";
echo "<table width='200px' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>";
echo "<td class='tbl'>Od:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "<td class='tbl'>Do:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "</tr>";
echo "</table>";
echo"</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='130' class='tbl'>".$locale['ram_054']."</td>\n";
echo "<td class='tbl'><select name='ram_stgd' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_gd_include.php";
echo "</select> : <select name='ram_stmn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_mn_include.php";
echo "</select> - <select name='ram_engd' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_gd_include.php";
echo "</select> : <select name='ram_enmn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_mn_include.php";
echo "</tr>";
echo "<tr>\n";
echo "<td align='center' class='tbl' colspan='2'>\n";
echo "<input type='hidden' name='ram_id' value='$ram_id'><input type='submit' name='edit_button' value='".$locale['ram_031']."' class='button' />\n";
echo "</td>";
echo "</tr></table>\n";
echo "</form>\n";
}
break;
case 'del':
if (isset($_POST['del_button'])) {
dbquery("DELETE FROM ".DB_RAMOWKA." WHERE ram_id=".$ram_id."");
redirect (FUSION_SELF.$aidlink, "script");
} else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_id=".$ram_id."");
$data = dbarray($result);
echo "<form action='".FUSION_SELF.$aidlink."&axn=del' method='post' style='margin:2em;'>\n";
echo "<table width='50%' cellpadding='3' cellspacing='1' border='0' align='center'>\n";
echo "<tr height='40'><td align='center' class='tbl2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_053']."</span></td></tr>\n";
echo "<tr><td class='tbl1' align='center' width='35%'>\n";
echo "<p style='padding:2em;'>".$locale['ram_056']."<span style='font-weight:bold;'>".$data['ram_name']."</span>?\n";
echo "</td></tr>\n";
echo "<tr><td align='center' class='tbl1'><input type='hidden' name='ram_id' value='$ram_id' />\n";
echo "<input type='submit' name='del_button' value='".$locale['ram_034']."' class='button' />\n";
echo "<input type='button' onclick=\"history.go(-1);\" value='".$locale['ram_036']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>";
}
break;
case 'delold':
if (isset($_POST['select_del_button'])) {
dbquery("DELETE FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='0'");
redirect (FUSION_SELF.$aidlink, "script");
}
else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='0'");
echo "<form action='".FUSION_SELF.$aidlink."&axn=delold' method='post' style='margin:2em;'>\n";
echo "<table width='50%' cellpadding='3' cellspacing='1' border='0' align='center'>\n";
echo "<tr height='40'><td align='center' class='tbl2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_058']."</span></td></tr>\n";
echo "<tr><td class='tbl1' align='center' width='35%'>\n<p style='padding:2em;'>";
while ($data = dbarray($result)) {
echo $locale['ram_056']."<span style='font-weight:bold;'>".$data['ram_name']."</span>?<br /><br />\n";
}
echo "</p></td></tr>\n";
echo "<tr><td align='center' class='tbl1'>\n";
echo "<input type='submit' name='select_del_button' value='".$locale['ram_034']."' class='button' />\n";
echo "<input type='button' onclick=\"history.go(-1);\" value='".$locale['ram_036']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>";
}
break;
case 'delall':
if (isset($_POST['select_del_button'])) {
dbquery("DELETE FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='1' OR ram_stala='0'");
redirect (FUSION_SELF.$aidlink, "script");
} else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='1' OR ram_stala='0'");
echo "<form action='".FUSION_SELF.$aidlink."&axn=delall' method='post' style='margin:2em;'>\n";
echo "<table width='50%' cellpadding='3' cellspacing='1' border='0' align='center'>\n";
echo "<tr height='40'><td align='center' class='tbl2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_059']."</span></td></tr>\n";
echo "<tr><td class='tbl1' align='center' width='35%'>\n<p style='padding:2em;'>";
while ($data = dbarray($result)) {
echo $locale['ram_056']."<span style='font-weight:bold;'>".$data['ram_name']."</span>?<br /><br />\n";
}
echo "</p></td></tr>\n";
echo "<tr><td align='center' class='tbl1'>\n";
echo "<input type='submit' name='select_del_button' value='".$locale['ram_057']."' class='button' />\n";
echo "<input type='button' onclick=\"history.go(-1);\" value='".$locale['ram_036']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>";
}
break;
case 'settings':
if (isset($_POST['save_settings'])) {
$srama_group = stripinput($_POST['srama_group']);
$srama_manternance = stripinput($_POST['srama_manternance']);
$ssrama_manternance_text = stripinput($_POST['srama_manternance_text']);
$srama_data_pon = stripinput($_POST['srama_data_pon']);
$srama_data_wto = stripinput($_POST['srama_data_wto']);
$srama_data_sro = stripinput($_POST['srama_data_sro']);
$srama_data_czw = stripinput($_POST['srama_data_czw']);
$srama_data_pio = stripinput($_POST['srama_data_pio']);
$srama_data_sob = stripinput($_POST['srama_data_sob']);
$srama_data_nie = stripinput($_POST['srama_data_nie']);
if (dbrows(dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_day ='1'")) == 0) {
dbquery("INSERT INTO ".DB_PREFIX."ramowka_settings VALUES('1', '$srama_group', '$srama_manternance', '$ssrama_manternance_text', '$srama_data_pon', '$srama_data_wto', '$srama_data_sro', '$srama_data_czw', '$srama_data_pio', '$srama_data_sob', '$srama_data_nie')");
} else {
dbquery("UPDATE ".DB_RAMOWKAST." SET srama_group='$srama_group', srama_manternance='$srama_manternance', srama_manternance_text='$ssrama_manternance_text', srama_data_pon='$srama_data_pon', srama_data_wto='$srama_data_wto', srama_data_sro='$srama_data_sro', srama_data_czw='$srama_data_czw', srama_data_pio='$srama_data_pio', srama_data_sob='$srama_data_sob', srama_data_nie='$srama_data_nie' WHERE srama_id='1'");
}
echo "<center><div class='admin-message'>".$locale['ram_055']."</div><center>";
redirect (FUSION_SELF.$aidlink, "9000000");
}
else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data = dbarray($result);
$news_visibility = $data['srama_group'];
$visibility_opts = ""; $sel = "";
$user_groups = getusergroups();
while(list($key, $user_group) = each($user_groups)){
$sel = ($news_visibility == $user_group['0'] ? " selected='selected'" : "");
$visibility_opts .= "<option value='".$user_group['0']."'$sel>".$user_group['1']."</option>\n";
}
echo "<form name='editform' action='".FUSION_SELF.$aidlink."&axn=settings' method='post' style='margin:2em;'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>\n";
echo "<tr><td align='center' class='tbl2' colspan='2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_030']."</span></td></tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_037']."</td>\n";
echo "<td class='tbl'><select name='srama_group' class='textbox' style='width:200px;' />\n".$visibility_opts."</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_038']."</td>\n";
echo "<td class='tbl'><select name='srama_manternance' class='textbox' style='width:200px;' />\n";
echo "<option value='0'".($data['srama_manternance'] == "0" ? " selected='selected'" : "").">".$locale['ram_036']."</option>\n";
echo "<option value='1'".($data['srama_manternance'] == "1" ? " selected='selected'" : "").">".$locale['ram_035']."</option>\n";
echo "</tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_039']."</td>\n";
echo "<td class='tbl'><textarea name='srama_manternance_text' cols='50' rows='5' class='textbox' style='width:200px;'>".$data['srama_manternance_text']."</textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<tr>\n";
echo "<td width='130' class='tbl' colspan='2'>Ustawienie daty dni</td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Poniedziałek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_pon' value='".$data['srama_data_pon']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Wtorek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_wto' value='".$data['srama_data_wto']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Środa</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_sro' value='".$data['srama_data_sro']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Czwartek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_czw' value='".$data['srama_data_czw']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Piątek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_pio' value='".$data['srama_data_pio']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Sobota</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_sob' value='".$data['srama_data_sob']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Niedziela</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_nie' value='".$data['srama_data_nie']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<td align='center' class='tbl' colspan='2'>\n";
echo "<input type='submit' name='save_settings' value='".$locale['ram_031']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>\n";
}
break;
}
closetable();
require_once THEMES."templates/footer.php";
?>
Pozdrawiam i z góry dziękuje.
PW od moderatora:
- Przeniesienie tematu - Pieka 30.05.2018 22:34
|
Przedszkolak
Postów: 40 Pomógł: 5 Ostrzeżeń: 1
Data rejestracji: 10.05.2018 02:34
|
Podmień "ID GRUPY" na id grupy która ma mieć dostęp, możesz podać pare grup po przecinku.
Pozdrawiam
<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2010 Nick Jones
| http://www.php-fu...
+--------------------------------------------------------+
| Filename: site_team.php
| Author: Nick Jones (Digitanium)
+--------------------------------------------------------+
| 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 http://www.gnu.or...agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../../maincore.php";
if (!strpos($userdata['user_groups'], ' ID GRUPY ')) { redirect("../index.php"); }
require_once THEMES."templates/admin_header.php";
include INFUSIONS."ramowka/infusion_db.php";
include INC_RAMOWKA."ramowka_include.php";
include INFUSIONS."top_fixed_menu_panel/top_fixed_menu_panel.php";
if (file_exists(INFUSIONS."ramowka/locale/".$settings['locale'].".php")) {
include INFUSIONS."ramowka/locale/".$settings['locale'].".php";
} else {
include INFUSIONS."ramowka/locale/English.php";
}
if ($settings['tinymce_enabled']) {
echo "<script language='javascript' type='text/javascript'>advanced();</script>\n";
} else {
require_once INCLUDES."html_buttons_include.php";
}
$axn = isset($_REQUEST['axn']) ? $_REQUEST['axn'] : "";
$ram_id = (isset($_REQUEST['ram_id']) AND isnum($_REQUEST['ram_id'])) ? $_REQUEST['ram_id'] : "";
if (dbrows(dbquery("SELECT * FROM ".DB_PREFIX."ramowka_settings")) < 1) {
echo "<center><div class='admin-message'>".$locale['ram_20']." - ".$locale['ram_026']."</div><center>";
}
$result = dbquery("SELECT srama_manternance, srama_manternance_text FROM ".DB_PREFIX."ramowka_settings WHERE srama_id ='1'");
$ram_pa_st = dbarray($result);
if ($ram_pa_st['srama_manternance'] == '1') {
echo rammanternance();
}
opentable($locale['ram_000'].$locale['ram_067']);
switch ($axn) {
default:
$result = dbquery("SELECT a.*, b.user_id, b.user_name, b.user_status, ram_stgd FROM ".DB_RAMOWKA." AS a LEFT JOIN ".DB_USERS." AS b ON a.ram_user=b.user_id ORDER BY ram_day, ram_stgd ASC");
$rows = dbrows($result);
if ($rows > 0) {
echo "<table width='100%' cellpadding='1' cellspacing='1' border='0' align='center' style='margin-top:1em;margin-bottom:1em;'>\n";
echo "<tr>";
echo "<td align='right' class='tbl2' colspan='8'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=add'><input type='submit' value='".$locale['ram_032']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "<td align='center' class='tbl2'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=settings'><input type='submit' value='".$locale['ram_030']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "<table width='100%' cellpadding='1' cellspacing='1' border='0' align='center' style='margin-top:1em;margin-bottom:1em;'>\n";
echo "<tr>";
echo "<td align='center' width='20%' class='tbl2' style='font-weight:bold'>".$locale['ram_003']."</td>";
echo "<td align='center' width='5%' class='tbl2' style='font-weight:bold'>".$locale['ram_009']."</td>";
echo "<td align='center' width='15%' class='tbl2' style='font-weight:bold'>".$locale['ram_003a']."</td>";
echo "<td align='center' width='15%' class='tbl2' style='font-weight:bold'>".$locale['ram_004']."</td>";
echo "<td align='center' width='5%' class='tbl2' style='font-weight:bold'>".$locale['ram_028']."</td>";
echo "<td align='center' width='1%' class='tbl2' style='font-weight:bold'>".$locale['ram_029']."</td>";
echo "</tr>";
while ($data = dbarray($result)) {
echo "<tr>";
echo "<td align='center' class='tbl1' style='font-weight:bold'>".profile_link($data['user_id'], $data['user_name'], $data['user_status'])."</td>\n";
echo "<td align='center' class='tbl1'>";
$ramday = $data['ram_day'];
echo getramday($ramday);
echo "</td>\n";
echo "<td align='center' class='tbl1'>";
if($data['ram_day']=="1") {
$result1 = dbquery("SELECT srama_data_pon FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_pon'];
} elseif($data['ram_day']=="2") {
$result1 = dbquery("SELECT srama_data_wto FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_wto'];
} elseif($data['ram_day']=="3") {
$result1 = dbquery("SELECT srama_data_sro FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_sro'];
} elseif($data['ram_day']=="4") {
$result1 = dbquery("SELECT srama_data_czw FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_czw'];
} elseif($data['ram_day']=="5") {
$result1 = dbquery("SELECT srama_data_pio FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_pio'];
} elseif($data['ram_day']=="6") {
$result1 = dbquery("SELECT srama_data_sob FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_sob'];
} elseif($data['ram_day']=="0") {
$result1 = dbquery("SELECT srama_data_nie FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data1 = dbarray($result1);
echo $data1['srama_data_nie'];
}
echo "</td>\n";
echo "<td align='center' class='tbl1' style='font-size:12px;'>".$data['ram_stgd'].":".$data['ram_stmn']." - ".$data['ram_engd'].":".$data['ram_enmn']."</td>\n";
$addtime = $data['ram_addtime'];
echo "<td align='center' class='tbl1'>".date("Y.m.d H:i " , $addtime)."</td>\n";
echo "<td align='center' class='tbl1'>";
echo "<a class='tip_trigger' href='".FUSION_SELF.$aidlink."&axn=edit&ram_id=".$data['ram_id']."'><img src='".IMAGES."zapiszoff.png' onmouseover='src=\"".IMAGES."zapiszonn.png\"' onmouseout='src=\"".IMAGES."zapiszoff.png\"' style='border:0;'><span class='tip'>Edytuj</span></a>";
echo "<a class='tip_trigger' href='".FUSION_SELF.$aidlink."&axn=del&ram_id=".$data['ram_id']."'><img src='".IMAGES."usunoff.png' onmouseover='src=\"".IMAGES."usunonn.png\"' onmouseout='src=\"".IMAGES."usunoff.png\"' style='border:0;'><span class='tip'>Usuń</span></a>";
echo "</td></tr>";
}
echo "</table>";
echo "<table width='100%' cellpadding='1' cellspacing='1' border='0' align='center' style='margin-top:1em;margin-bottom:1em;'>\n";
echo "<tr>";
echo "<td align='right' class='tbl2' colspan='8'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=add'><input type='submit' value='".$locale['ram_032']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "<td align='center' class='tbl2'>";
echo "<p style='padding:0.4em;'>";
echo "<a href='".FUSION_SELF.$aidlink."&axn=settings'><input type='submit' value='".$locale['ram_030']."' class='button'></a>";
echo "</p>";
echo "</td>";
echo "</tr>";
echo "</table>";
}
else {
echo "<div style='text-align:center'><p style='margin-top:2em'><span style='color:#cc0000; weight:bold;font-size:1.5em;'>".$locale['ram_001']."</span></p><br><br>\n";
echo "<p style='margin-bottom:2em'><a href='".FUSION_SELF.$aidlink."&axn=add'><input type='submit' value='".$locale['ram_032']."' class='button'></a>
</p><p style='margin-bottom:2em'><a href='".FUSION_SELF.$aidlink."&axn=settings'><input type='submit' value='".$locale['ram_030']."' class='button'></a>
</p></div>\n";
}
break;
case 'add':
if (isset($_POST['add_button'])) {
$ram_prezenter = stripinput($_POST['prezenter']);
$ram_day = stripinput($_POST['ram_day']);
$ram_start_god = stripinput($_POST['ram_start_god']);
$ram_start_mn = stripinput($_POST['ram_start_mn']);
$ram_end_god = stripinput($_POST['ram_end_god']);
$ram_end_mn = stripinput($_POST['ram_end_mn']);
dbquery("INSERT INTO ".DB_RAMOWKA." VALUES('', '$ram_name', '$ram_prezenter', '$ram_day', '$ram_start_god', '$ram_start_mn', '$ram_end_god', '$ram_end_mn', '0', '$ram_grupowa', '$ram_gosc', '$ram_stala', '".time()."')");
redirect (FUSION_SELF.$aidlink, "script");
} else {
echo "<form name='addform' action='".FUSION_SELF.$aidlink."&axn=add' method='post'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>";
echo "<tr>";
echo "<td align='center' class='tbl2' colspan='2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_051']."</span></td>";
echo "</tr>";
echo "<tr>";
echo "<td width='130' class='tbl'>".$locale['ram_041']." <font color='red'>*</font></td>\n";
echo "<td class='tbl'>";
echo "<select name='prezenter' class='textbox' style='width:200px;' />";
include INC_RAMOWKA."ram_user_include.php";
echo"</select></td>";
echo "</td>";
echo "</tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_042']." <font color='red'>*</font></td>\n";
echo "<td class='tbl'><select name='ram_day' class='textbox' style='width:200px;' />\n";
include INC_RAMOWKA."ram_day_include.php";
echo"</select></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Audycje:</td>\n";
echo "<td class='tbl' >";
echo "<table width='200px' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>";
echo "<td class='tbl'>Od:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "<td class='tbl'>Do:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "</tr>";
echo "</table>";
echo"</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='130' class='tbl'>".$locale['ram_054']." <font color='red'>*</font></td>\n";
echo "<td class='tbl'><select name='ram_start_god' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_gd_include.php";
echo "</select> : <select name='ram_start_mn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_mn_include.php";
echo "</select> - <select name='ram_end_god' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_gd_include.php";
echo "</select> : <select name='ram_end_mn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_mn_include.php";
echo "</tr>";
echo "<tr>";
echo "<td align='center' colspan='2' class='tbl'><br />\n";
echo "<input type='submit' name='add_button' value='".$locale['ram_032']."' class='button' /></td>\n";
echo "</tr>\n</table>\n</form>\n";
}
break;
case 'edit':
if (isset($_POST['edit_button'])) {
$ram_prezenter = stripinput($_POST['prezenter']);
$ram_day = stripinput($_POST['ram_day']);
$ram_stgd = stripinput($_POST['ram_stgd']);
$ram_stmn = stripinput($_POST['ram_stmn']);
$ram_engd = stripinput($_POST['ram_engd']);
$ram_enmn = stripinput($_POST['ram_enmn']);
dbquery("UPDATE ".DB_RAMOWKA." SET
ram_user='$ram_prezenter',
ram_day='$ram_day',
ram_stgd='$ram_stgd',
ram_stmn='$ram_stmn',
ram_engd='$ram_engd',
ram_enmn='$ram_enmn',
WHERE ram_id='".$ram_id."'");
redirect (FUSION_SELF.$aidlink, "script");
} else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_id=".$ram_id."");
$data = dbarray($result);
echo "<form name='editform' action='".FUSION_SELF.$aidlink."&axn=edit' method='post' style='margin:2em;'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>";
echo "<tr>";
echo "<td align='center' class='tbl2' colspan='2'><span>".$locale['ram_052']."</span></td>";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_041']."</td>\n";
echo "<td class='tbl'><select name='prezenter' class='textbox' style='width:200px;' />\n";
include INC_RAMOWKA."ram_user_include.php";
echo"</select></td>\n";
echo "</td>\n";
echo "</tr>";
//--
//dzień
echo "<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_042']."</td>\n";
echo "<td class='tbl'><select name='ram_day' class='textbox' style='width:200px;' />\n";
include INC_RAMOWKA."ram_day_include.php";
echo"</select></td>\n";
echo "</tr>";
//--
//godziny
echo "<tr>\n";
echo "<td width='130' class='tbl'>Audycje:</td>\n";
echo "<td class='tbl' >";
echo "<table width='200px' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>";
echo "<td class='tbl'>Od:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "<td class='tbl'>Do:<br>Godziny</td>";
echo "<td class='tbl'><br>Minuty</td>";
echo "</tr>";
echo "</table>";
echo"</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='130' class='tbl'>".$locale['ram_054']."</td>\n";
echo "<td class='tbl'><select name='ram_stgd' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_gd_include.php";
echo "</select> : <select name='ram_stmn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_st_mn_include.php";
echo "</select> - <select name='ram_engd' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_gd_include.php";
echo "</select> : <select name='ram_enmn' class='textbox' style='width:40px;' />\n";
include INC_RAMOWKA."ram_ed_mn_include.php";
echo "</tr>";
echo "<tr>\n";
echo "<td align='center' class='tbl' colspan='2'>\n";
echo "<input type='hidden' name='ram_id' value='$ram_id'><input type='submit' name='edit_button' value='".$locale['ram_031']."' class='button' />\n";
echo "</td>";
echo "</tr></table>\n";
echo "</form>\n";
}
break;
case 'del':
if (isset($_POST['del_button'])) {
dbquery("DELETE FROM ".DB_RAMOWKA." WHERE ram_id=".$ram_id."");
redirect (FUSION_SELF.$aidlink, "script");
} else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_id=".$ram_id."");
$data = dbarray($result);
echo "<form action='".FUSION_SELF.$aidlink."&axn=del' method='post' style='margin:2em;'>\n";
echo "<table width='50%' cellpadding='3' cellspacing='1' border='0' align='center'>\n";
echo "<tr height='40'><td align='center' class='tbl2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_053']."</span></td></tr>\n";
echo "<tr><td class='tbl1' align='center' width='35%'>\n";
echo "<p style='padding:2em;'>".$locale['ram_056']."<span style='font-weight:bold;'>".$data['ram_name']."</span>?\n";
echo "</td></tr>\n";
echo "<tr><td align='center' class='tbl1'><input type='hidden' name='ram_id' value='$ram_id' />\n";
echo "<input type='submit' name='del_button' value='".$locale['ram_034']."' class='button' />\n";
echo "<input type='button' onclick=\"history.go(-1);\" value='".$locale['ram_036']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>";
}
break;
case 'delold':
if (isset($_POST['select_del_button'])) {
dbquery("DELETE FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='0'");
redirect (FUSION_SELF.$aidlink, "script");
}
else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='0'");
echo "<form action='".FUSION_SELF.$aidlink."&axn=delold' method='post' style='margin:2em;'>\n";
echo "<table width='50%' cellpadding='3' cellspacing='1' border='0' align='center'>\n";
echo "<tr height='40'><td align='center' class='tbl2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_058']."</span></td></tr>\n";
echo "<tr><td class='tbl1' align='center' width='35%'>\n<p style='padding:2em;'>";
while ($data = dbarray($result)) {
echo $locale['ram_056']."<span style='font-weight:bold;'>".$data['ram_name']."</span>?<br /><br />\n";
}
echo "</p></td></tr>\n";
echo "<tr><td align='center' class='tbl1'>\n";
echo "<input type='submit' name='select_del_button' value='".$locale['ram_034']."' class='button' />\n";
echo "<input type='button' onclick=\"history.go(-1);\" value='".$locale['ram_036']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>";
}
break;
case 'delall':
if (isset($_POST['select_del_button'])) {
dbquery("DELETE FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='1' OR ram_stala='0'");
redirect (FUSION_SELF.$aidlink, "script");
} else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_odwolana='1' OR ram_stala='1' OR ram_stala='0'");
echo "<form action='".FUSION_SELF.$aidlink."&axn=delall' method='post' style='margin:2em;'>\n";
echo "<table width='50%' cellpadding='3' cellspacing='1' border='0' align='center'>\n";
echo "<tr height='40'><td align='center' class='tbl2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_059']."</span></td></tr>\n";
echo "<tr><td class='tbl1' align='center' width='35%'>\n<p style='padding:2em;'>";
while ($data = dbarray($result)) {
echo $locale['ram_056']."<span style='font-weight:bold;'>".$data['ram_name']."</span>?<br /><br />\n";
}
echo "</p></td></tr>\n";
echo "<tr><td align='center' class='tbl1'>\n";
echo "<input type='submit' name='select_del_button' value='".$locale['ram_057']."' class='button' />\n";
echo "<input type='button' onclick=\"history.go(-1);\" value='".$locale['ram_036']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>";
}
break;
case 'settings':
if (isset($_POST['save_settings'])) {
$srama_group = stripinput($_POST['srama_group']);
$srama_manternance = stripinput($_POST['srama_manternance']);
$ssrama_manternance_text = stripinput($_POST['srama_manternance_text']);
$srama_data_pon = stripinput($_POST['srama_data_pon']);
$srama_data_wto = stripinput($_POST['srama_data_wto']);
$srama_data_sro = stripinput($_POST['srama_data_sro']);
$srama_data_czw = stripinput($_POST['srama_data_czw']);
$srama_data_pio = stripinput($_POST['srama_data_pio']);
$srama_data_sob = stripinput($_POST['srama_data_sob']);
$srama_data_nie = stripinput($_POST['srama_data_nie']);
if (dbrows(dbquery("SELECT * FROM ".DB_RAMOWKA." WHERE ram_day ='1'")) == 0) {
dbquery("INSERT INTO ".DB_PREFIX."ramowka_settings VALUES('1', '$srama_group', '$srama_manternance', '$ssrama_manternance_text', '$srama_data_pon', '$srama_data_wto', '$srama_data_sro', '$srama_data_czw', '$srama_data_pio', '$srama_data_sob', '$srama_data_nie')");
} else {
dbquery("UPDATE ".DB_RAMOWKAST." SET srama_group='$srama_group', srama_manternance='$srama_manternance', srama_manternance_text='$ssrama_manternance_text', srama_data_pon='$srama_data_pon', srama_data_wto='$srama_data_wto', srama_data_sro='$srama_data_sro', srama_data_czw='$srama_data_czw', srama_data_pio='$srama_data_pio', srama_data_sob='$srama_data_sob', srama_data_nie='$srama_data_nie' WHERE srama_id='1'");
}
echo "<center><div class='admin-message'>".$locale['ram_055']."</div><center>";
redirect (FUSION_SELF.$aidlink, "9000000");
}
else {
$result = dbquery("SELECT * FROM ".DB_RAMOWKAST." WHERE srama_id='1'");
$data = dbarray($result);
$news_visibility = $data['srama_group'];
$visibility_opts = ""; $sel = "";
$user_groups = getusergroups();
while(list($key, $user_group) = each($user_groups)){
$sel = ($news_visibility == $user_group['0'] ? " selected='selected'" : "");
$visibility_opts .= "<option value='".$user_group['0']."'$sel>".$user_group['1']."</option>\n";
}
echo "<form name='editform' action='".FUSION_SELF.$aidlink."&axn=settings' method='post' style='margin:2em;'>\n";
echo "<table cellpadding='0' cellspacing='0' width='400' class='center'>\n";
echo "<tr><td align='center' class='tbl2' colspan='2'><span style='font-weight:bold;font-size:1.5em;'>".$locale['ram_030']."</span></td></tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_037']."</td>\n";
echo "<td class='tbl'><select name='srama_group' class='textbox' style='width:200px;' />\n".$visibility_opts."</select></td>\n";
echo "</tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_038']."</td>\n";
echo "<td class='tbl'><select name='srama_manternance' class='textbox' style='width:200px;' />\n";
echo "<option value='0'".($data['srama_manternance'] == "0" ? " selected='selected'" : "").">".$locale['ram_036']."</option>\n";
echo "<option value='1'".($data['srama_manternance'] == "1" ? " selected='selected'" : "").">".$locale['ram_035']."</option>\n";
echo "</tr>\n<tr>\n";
echo "<td width='130' class='tbl'>".$locale['ram_039']."</td>\n";
echo "<td class='tbl'><textarea name='srama_manternance_text' cols='50' rows='5' class='textbox' style='width:200px;'>".$data['srama_manternance_text']."</textarea></td>\n";
echo "</tr>\n<tr>\n";
echo "<tr>\n";
echo "<td width='130' class='tbl' colspan='2'>Ustawienie daty dni</td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Poniedziałek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_pon' value='".$data['srama_data_pon']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Wtorek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_wto' value='".$data['srama_data_wto']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Środa</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_sro' value='".$data['srama_data_sro']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Czwartek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_czw' value='".$data['srama_data_czw']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Piątek</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_pio' value='".$data['srama_data_pio']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Sobota</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_sob' value='".$data['srama_data_sob']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<tr>\n";
echo "<td width='130' class='tbl'>Niedziela</td>\n";
echo "<td class='tbl'><input type='text' name='srama_data_nie' value='".$data['srama_data_nie']."' class='textbox' style='width:200px;' /></td>\n";
echo "</tr>";
echo "<td align='center' class='tbl' colspan='2'>\n";
echo "<input type='submit' name='save_settings' value='".$locale['ram_031']."' class='button' />\n";
echo "</td></tr></table>\n";
echo "</form>\n";
}
break;
}
closetable();
require_once THEMES."templates/footer.php";
?>
Kliknij i zaczekaj na załadowanie kodu ... |