אתמול לראשונה הצטרכתי למודל אקסס פילטר והסתבכתי אם ההגדרות שלו החלטתי לתת לגימיני לבנות ממשק HTML מונגש שמחזיר לך הגדרות לשלוחה
מצורף קוד HTML בספוילר
<!DOCTYPE html>
<html lang="he" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>מחולל הגדרות מתקדם - פילטר גישה (Access Filter)</title>
<style>
:root {
--primary-color: #0284c7;
--primary-hover: #0369a1;
--secondary-color: #f1f5f9;
--border-color: #cbd5e1;
--text-main: #0f172a;
--text-muted: #475569;
--bg-main: #ffffff;
--card-bg: #f8fafc;
--danger: #ef4444;
--danger-hover: #dc2626;
--success-bg: #1e293b;
--success-text: #10b981;
}
* {
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--secondary-color);
color: var(--text-main);
margin: 0;
padding: 20px;
line-height: 1.6;
}
h1, h2, h3, h4 {
color: var(--primary-color);
margin-top: 0;
}
.container {
max-width: 1200px;
margin: 0 auto;
background: var(--bg-main);
padding: 40px;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.section {
background: var(--card-bg);
border: 1px solid var(--border-color);
padding: 25px;
border-radius: 10px;
margin-bottom: 30px;
}
.form-group {
margin-bottom: 20px;
}
.grid-2-col {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 25px;
}
label {
display: block;
font-weight: 600;
margin-bottom: 8px;
color: var(--text-main);
}
.help-text {
display: block;
font-size: 0.85em;
color: var(--text-muted);
margin-top: 4px;
}
input[type="text"],
input[type="number"],
select,
input[type="time"],
input[type="date"],
input[type="datetime-local"] {
width: 100%;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 6px;
font-family: inherit;
font-size: 15px;
transition: border-color 0.2s;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
border-color: var(--primary-color);
outline: none;
}
.checkbox-group {
display: flex;
flex-wrap: wrap;
gap: 12px;
background: var(--bg-main);
padding: 15px;
border: 1px solid var(--border-color);
border-radius: 8px;
}
.checkbox-group label {
display: flex;
align-items: center;
font-weight: normal;
background: #e2e8f0;
padding: 8px 16px;
border-radius: 20px;
cursor: pointer;
transition: all 0.2s;
margin: 0;
font-size: 14px;
}
.checkbox-group label:hover {
background: #cbd5e1;
}
.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
margin-left: 10px;
cursor: pointer;
}
.inline-group {
display: flex;
align-items: center;
gap: 15px;
background: var(--bg-main);
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 8px;
}
.filter-card {
background: var(--bg-main);
border: 2px solid var(--primary-color);
padding: 30px;
border-radius: 10px;
margin-bottom: 30px;
position: relative;
}
.filter-header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid var(--secondary-color);
padding-bottom: 15px;
margin-bottom: 25px;
}
button {
cursor: pointer;
font-family: inherit;
transition: background-color 0.2s;
}
.primary-btn {
background-color: var(--primary-color);
color: white;
border: none;
padding: 14px 28px;
border-radius: 8px;
font-size: 16px;
font-weight: bold;
display: inline-flex;
align-items: center;
gap: 10px;
}
.primary-btn:hover {
background-color: var(--primary-hover);
}
.danger-btn {
background-color: var(--danger);
color: white;
border: none;
padding: 8px 16px;
border-radius: 6px;
font-size: 14px;
font-weight: bold;
}
.danger-btn:hover {
background-color: var(--danger-hover);
}
.dynamic-fields-container {
margin-top: 12px;
padding: 15px;
background: #e0f2fe;
border-radius: 8px;
border: 1px dashed #7dd3fc;
display: none;
}
.output-section {
background: var(--success-bg);
color: var(--success-text);
padding: 25px;
border-radius: 10px;
margin-top: 40px;
}
textarea {
width: 100%;
height: 350px;
background: #0f172a;
color: var(--success-text);
border: 1px solid #334155;
padding: 20px;
font-family: 'Courier New', Courier, monospace;
font-size: 16px;
resize: vertical;
direction: ltr;
text-align: left;
border-radius: 8px;
}
</style>
</head>
<body>
<div class="container">
<h1>מחולל פילטר גישה מורחב (Access Filter)</h1>
<p>ממשק זה מאפשר יצירה ויזואלית של קובץ ה-<code>ext.ini</code>. סמן את האפשרויות, והקוד יתעדכן בזמן אמת בתחתית העמוד.</p>
<div class="section">
<h2>הגדרות בסיסיות וניתובים</h2>
<div class="form-group">
<label>1. סוג ההטמעה (חובה):</label>
<div class="checkbox-group" style="background: transparent; border: none; padding: 0;">
<label><input type="radio" name="module_type" value="standalone" checked onchange="updateOutput()"> שלוחה בפני עצמה (type=access_filter)</label>
<label><input type="radio" name="module_type" value="embedded" onchange="updateOutput()"> הטמעה בתוך שלוחה אחרת (check_access_filter=yes)</label>
</div>
</div>
<div class="grid-2-col">
<div class="form-group">
<label>2. הגדרות זיהוי ולוג:</label>
<div class="checkbox-group">
<label><input type="checkbox" id="enter_id" onchange="updateOutput()"> רישום הגבלות לפי ת.ז (enter_id=yes)</label>
<label><input type="checkbox" id="log_save" onchange="updateOutput()"> שמירת קובץ לוג בשלוחה (access_filter_log_save=yes)</label>
</div>
</div>
<div class="form-group">
<label>3. נתיב שמירת קובץ הלוג (אופציונלי):</label>
<input type="text" id="log_folder" placeholder="לדוגמה: /1/1" oninput="updateOutput()" dir="ltr">
</div>
<div class="form-group">
<label>4. לאן לעבור אם מאושר (ברירת מחדל):</label>
<input type="text" id="yes_goto" placeholder="לדוגמה: /2" oninput="updateOutput()" dir="ltr">
</div>
<div class="form-group">
<label>5. לאן לעבור אם נחסם / אין הרשאה:</label>
<input type="text" id="no_goto" placeholder="לדוגמה: enter או /3" oninput="updateOutput()" dir="ltr">
</div>
</div>
</div>
<div id="filters-container"></div>
<button type="button" class="primary-btn" onclick="addFilter()">
<span>+</span> הוסף תנאי פילטר נוסף (Access Filter Rule)
</button>
<div class="output-section">
<h2 style="color: white; margin-top:0;">הקוד שלך (מוכן להעתקה):</h2>
<textarea id="outputCode" readonly></textarea>
</div>
</div>
<script>
let filterCount = 0;
const daysArray = [
{ val: 'sun', label: 'ראשון' }, { val: 'mon', label: 'שני' },
{ val: 'tue', label: 'שלישי' }, { val: 'wed', label: 'רביעי' },
{ val: 'thu', label: 'חמישי' }, { val: 'fri', label: 'שישי' },
{ val: 'sat', label: 'שבת' }
];
const monthsGregorian = [
{ val: 'jan', label: 'ינואר' }, { val: 'feb', label: 'פברואר' },
{ val: 'mar', label: 'מרץ' }, { val: 'apr', label: 'אפריל' },
{ val: 'may', label: 'מאי' }, { val: 'jun', label: 'יוני' },
{ val: 'jul', label: 'יולי' }, { val: 'aug', label: 'אוגוסט' },
{ val: 'sep', label: 'ספטמבר' }, { val: 'oct', label: 'אוקטובר' },
{ val: 'nov', label: 'נובמבר' }, { val: 'dec', label: 'דצמבר' }
];
const monthsHebrew = [
{ val: '01', label: 'תשרי' }, { val: '02', label: 'חשוון' },
{ val: '03', label: 'כסלו' }, { val: '04', label: 'טבת' },
{ val: '05', label: 'שבט' }, { val: '06', label: 'אדר (רגיל)' },
{ val: '07', label: 'ניסן' }, { val: '08', label: 'אייר' },
{ val: '09', label: 'סיוון' }, { val: '10', label: 'תמוז' },
{ val: '11', label: 'אב' }, { val: '12', label: 'אלול' },
{ val: '13', label: 'אדר א\'' }, { val: '14', label: 'אדר ב\'' }
];
function addFilter() {
filterCount++;
const id = filterCount;
let daysHtml = daysArray.map(d => `<label><input type="checkbox" class="chk-day-${id}" value="${d.val}" onchange="updateOutput()"> ${d.label}</label>`).join('');
const filterHTML = `
<div class="filter-card" id="filter_${id}">
<div class="filter-header">
<h3>הגדרת זמנים - חוק מס' ${id} (access_filter_${id})</h3>
<button class="danger-btn" onclick="removeFilter(${id})">הסר חוק זה</button>
</div>
<div class="grid-2-col">
<div class="form-group">
<label>1. סוג תאריך (חובה):</label>
<select id="v1_${id}" onchange="toggleCalType(${id}); updateOutput()">
<option value="g">לועזי (g)</option>
<option value="h">עברי (h)</option>
</select>
</div>
<div class="form-group">
<label>2. טווח שעות ביממה (חובה):</label>
<div class="inline-group">
<input type="time" id="t_start_${id}" value="09:00" onchange="updateOutput()">
<span>עד</span>
<input type="time" id="t_end_${id}" value="17:00" onchange="updateOutput()">
<label style="margin-right: auto;"><input type="checkbox" id="t_all_${id}" checked onchange="toggleInputs(['t_start_${id}', 't_end_${id}'], this.checked); updateOutput()"> כל היממה (*)</label>
</div>
</div>
</div>
<div class="form-group">
<label>3. ימי שבוע מורשים (חובה):</label>
<div class="checkbox-group">${daysHtml}</div>
<label style="margin-top:10px; display:inline-block;"><input type="checkbox" checked onchange="toggleCheckboxes('chk-day-${id}', this.checked); updateOutput()"> סמן הכל (*)</label>
</div>
<div class="grid-2-col">
<div class="form-group">
<label>4. ימים בחודש (חובה):</label>
<div class="inline-group">
מיום: <input type="number" id="dm_start_${id}" min="1" max="31" placeholder="1" oninput="updateOutput()">
עד יום: <input type="number" id="dm_end_${id}" min="1" max="31" placeholder="31" oninput="updateOutput()">
<label><input type="checkbox" id="dm_all_${id}" checked onchange="toggleInputs(['dm_start_${id}', 'dm_end_${id}'], this.checked); updateOutput()"> הכל (*)</label>
</div>
</div>
<div class="form-group">
<label>6. שנות כניסה מורשות (חובה):</label>
<div class="inline-group">
משנה: <input type="number" id="y_start_${id}" placeholder="לדוגמה: 2024" oninput="updateOutput()">
עד שנה: <input type="number" id="y_end_${id}" placeholder="לדוגמה: 2025" oninput="updateOutput()">
<label><input type="checkbox" id="y_all_${id}" checked onchange="toggleInputs(['y_start_${id}', 'y_end_${id}'], this.checked); updateOutput()"> הכל (*)</label>
</div>
</div>
</div>
<div class="form-group">
<label>5. חודשים מורשים בשנה (חובה):</label>
<div class="checkbox-group" id="months_container_${id}"></div>
<label style="margin-top:10px; display:inline-block;"><input type="checkbox" checked onchange="toggleCheckboxes('chk-month-${id}', this.checked); updateOutput()"> בחר כל השנה (*)</label>
</div>
<hr style="border:0; border-top:2px dashed var(--border-color); margin: 30px 0;">
<h3 style="margin-top:0;">הגבלות זמן מתקדמות לפי היסטוריית המשתמש (ערכים 7 עד 10)</h3>
<div class="grid-2-col">
<div class="form-group">
<label>7. זמן המתנה בין כניסות (מתי ייתן לעבור שוב):</label>
<select id="v7_${id}" onchange="renderDynamicUi(this.value, 7, ${id}); updateOutput()">
<option value="">פעם אחת בכל שיחה - ברירת מחדל (thiscall)</option>
<option value="duration">משך זמן קצוב (שעות / ימים / חודשים)</option>
<option value="datetime">עד תאריך ושעה מדויקים</option>
<option value="date">עד תאריך ספציפי בחצות</option>
<option value="time">היום עד שעה ספציפית</option>
<option value="thisweek">עד סוף השבוע הנוכחי</option>
<option value="thismonth">עד סוף חודש לועזי נוכחי</option>
<option value="thismonth-x">עד יום ספציפי בחודש לועזי</option>
<option value="thishebmonth">עד סוף חודש עברי נוכחי</option>
<option value="thishebmonth-x">עד יום ספציפי בחודש עברי</option>
<option value="23:59:59">עד סוף היום הנוכחי - חצות</option>
<option value="none">חסימה קבועה לאחר כניסה (none)</option>
</select>
<div id="dyn_7_${id}" class="dynamic-fields-container"></div>
</div>
<div class="form-group">
<label>8. כמות כניסות מקסימלית למשתמש:</label>
<select id="v8_${id}" onchange="renderDynamicUi(this.value, 8, ${id}); updateOutput()">
<option value="">פעם אחת בלבד (ברירת מחדל)</option>
<option value="*">ללא הגבלת כמות פעמים (*)</option>
<option value="custom">מספר כניסות מוגדר מראש</option>
</select>
<div id="dyn_8_${id}" class="dynamic-fields-container"></div>
</div>
<div class="form-group">
<label>9. איפוס הספירה (מתי יתחיל לספור מחדש?):</label>
<select id="v9_${id}" onchange="renderDynamicUi(this.value, 9, ${id}); updateOutput()">
<option value="">אחרי חודש מהכניסה הראשונה (ברירת מחדל)</option>
<option value="*">אחרי 12 חודשים / שנה (*)</option>
<option value="duration">איפוס לאחר משך זמן קצוב (שעות / ימים / חודשים)</option>
<option value="datetime">איפוס בתאריך ושעה מדויקים</option>
<option value="date">איפוס בתאריך ספציפי בחצות</option>
<option value="time">איפוס כל יום בשעה ספציפית</option>
<option value="thisweek">איפוס בסוף השבוע הנוכחי</option>
<option value="thismonth">איפוס בסוף חודש לועזי נוכחי</option>
<option value="thismonth-x">איפוס ביום ספציפי בחודש לועזי</option>
<option value="thishebmonth">איפוס בסוף חודש עברי נוכחי</option>
<option value="thishebmonth-x">איפוס ביום ספציפי בחודש עברי</option>
<option value="23:59:59">איפוס בסוף היום הנוכחי - חצות</option>
<option value="none">ללא איפוס בכלל (none)</option>
</select>
<div id="dyn_9_${id}" class="dynamic-fields-container"></div>
</div>
<div class="form-group">
<label>10. זמן חסימה מוחלטת לשלוחה:</label>
<select id="v10_${id}" onchange="renderDynamicUi(this.value, 10, ${id}); updateOutput()">
<option value="">ללא חסימה מוחלטת (ברירת מחדל)</option>
<option value="duration">חסימה לאחר משך זמן קצוב מהכניסה הראשונה</option>
<option value="datetime">חסימה מתאריך ושעה מדויקים</option>
<option value="date">חסימה מתאריך ספציפי בחצות</option>
<option value="time">חסימה היום משעה ספציפית</option>
<option value="thisweek">חסימה בסוף השבוע בו בוצעה הכניסה</option>
<option value="thismonth">חסימה בסוף החודש הלועזי הנוכחי</option>
<option value="thismonth-x">חסימה ביום ספציפי בחודש לועזי</option>
<option value="thishebmonth">חסימה בסוף החודש העברי הנוכחי</option>
<option value="thishebmonth-x">חסימה ביום ספציפי בחודש עברי</option>
<option value="23:59:59">חסימה מוחלטת בסוף היום (חצות)</option>
</select>
<div id="dyn_10_${id}" class="dynamic-fields-container"></div>
</div>
</div>
<div class="form-group" style="margin-top:20px; background: var(--secondary-color); padding: 15px; border-radius: 8px;">
<label>ניתוב ספציפי (Divert) לעומדים בתנאי של חוק זה:</label>
<input type="text" id="spec_goto_${id}" placeholder="לדוגמה: /5 (ידרוס את הניתוב הכללי למאשרים)" oninput="updateOutput()" dir="ltr">
</div>
</div>
`;
document.getElementById('filters-container').insertAdjacentHTML('beforeend', filterHTML);
toggleCalType(id);
toggleInputs([`t_start_${id}`, `t_end_${id}`], true);
toggleInputs([`dm_start_${id}`, `dm_end_${id}`], true);
toggleInputs([`y_start_${id}`, `y_end_${id}`], true);
updateOutput();
}
function removeFilter(id) {
document.getElementById(`filter_${id}`).remove();
updateOutput();
}
function toggleCalType(id) {
const type = document.getElementById(`v1_${id}`).value;
const container = document.getElementById(`months_container_${id}`);
const activeArray = type === 'g' ? monthsGregorian : monthsHebrew;
container.innerHTML = activeArray.map(m =>
`<label><input type="checkbox" class="chk-month-${id}" value="${m.val}" onchange="updateOutput()"> ${m.label}</label>`
).join('');
toggleCheckboxes(`chk-month-${id}`, true);
}
function toggleInputs(ids, disable) {
ids.forEach(id => {
const el = document.getElementById(id);
if(el) {
el.disabled = disable;
if(disable) el.value = '';
}
});
}
function toggleCheckboxes(className, isChecked) {
document.querySelectorAll(`.${className}`).forEach(cb => {
cb.checked = isChecked;
cb.disabled = isChecked;
});
}
function renderDynamicUi(type, fieldNum, id) {
const container = document.getElementById(`dyn_${fieldNum}_${id}`);
if (!type || ['*', 'thiscall', 'thisweek', 'thismonth', 'thishebmonth', '23:59:59', 'none'].includes(type)) {
container.style.display = 'none';
container.innerHTML = '';
return;
}
container.style.display = 'block';
if (type === 'duration') {
container.innerHTML = `
<div class="inline-group" style="border:none; padding:0; background:transparent;">
<input type="number" id="dyn_val_${fieldNum}_${id}" min="1" placeholder="כמות" style="width:120px;" oninput="updateOutput()">
<select id="dyn_unit_${fieldNum}_${id}" onchange="updateOutput()">
<option value="s">שניות (s)</option>
<option value="m">דקות (m)</option>
<option value="h">שעות (h)</option>
<option value="d">ימים (d)</option>
<option value="M">חודשים (M)</option>
</select>
</div>`;
} else if (type === 'datetime') {
container.innerHTML = `<input type="datetime-local" id="dyn_val_${fieldNum}_${id}" step="1" oninput="updateOutput()">`;
} else if (type === 'date') {
container.innerHTML = `<input type="date" id="dyn_val_${fieldNum}_${id}" oninput="updateOutput()">`;
} else if (type === 'time') {
container.innerHTML = `<input type="time" id="dyn_val_${fieldNum}_${id}" step="1" oninput="updateOutput()">`;
} else if (type === 'thismonth-x' || type === 'thishebmonth-x') {
let maxDays = type === 'thismonth-x' ? 31 : 30;
container.innerHTML = `
<div class="inline-group" style="border:none; padding:0; background:transparent;">
יום ספציפי בחודש: <input type="number" id="dyn_val_${fieldNum}_${id}" min="1" max="${maxDays}" placeholder="1" style="width:100px;" oninput="updateOutput()">
</div>`;
} else if (type === 'custom') {
container.innerHTML = `<input type="number" id="dyn_val_${fieldNum}_${id}" min="1" placeholder="הכנס מספר מדוייק..." oninput="updateOutput()">`;
}
}
function calculateRangeFromCheckboxes(className, masterArray) {
const checkboxes = document.querySelectorAll(`.${className}:not(:disabled)`);
if(checkboxes.length === 0) return '*';
let checkedIndices = [];
checkboxes.forEach((cb, index) => {
if(cb.checked) checkedIndices.push(index);
});
if(checkedIndices.length === 0) return '*';
const minIndex = Math.min(...checkedIndices);
const maxIndex = Math.max(...checkedIndices);
if (minIndex === maxIndex) {
return `${masterArray[minIndex].val}-${masterArray[minIndex].val}`;
}
return `${masterArray[minIndex].val}-${masterArray[maxIndex].val}`;
}
function formatNumberRange(startId, endId, allCheckboxId) {
if (document.getElementById(allCheckboxId).checked) return '*';
const startVal = document.getElementById(startId).value;
const endVal = document.getElementById(endId).value;
if (!startVal && !endVal) return '*';
const pad = (num) => (num && num.length === 1) ? '0' + num : num;
if (startVal && !endVal) return `${pad(startVal)}-${pad(startVal)}`;
if (!startVal && endVal) return `${pad(endVal)}-${pad(endVal)}`;
return `${pad(startVal)}-${pad(endVal)}`;
}
function getDynamicFieldValue(fieldNum, id) {
const selectType = document.getElementById(`v${fieldNum}_${id}`).value;
if (!selectType) return "*";
if (['*', 'thiscall', 'thisweek', 'thismonth', 'thishebmonth', '23:59:59', 'none'].includes(selectType)) {
return selectType;
}
const inputEl = document.getElementById(`dyn_val_${fieldNum}_${id}`);
if (!inputEl || !inputEl.value) return "*";
if (selectType === 'duration') {
const unit = document.getElementById(`dyn_unit_${fieldNum}_${id}`).value;
return inputEl.value + unit;
} else if (selectType === 'datetime') {
let dt = inputEl.value.replace('T', ' ');
if (dt.length === 16) dt += ":00";
return dt;
} else if (selectType === 'time') {
let t = inputEl.value;
if (t.length === 5) t += ":00";
return t;
} else if (selectType === 'thismonth-x') {
return `thismonth-${inputEl.value}`;
} else if (selectType === 'thishebmonth-x') {
return `thishebmonth-${inputEl.value}`;
} else if (selectType === 'date' || selectType === 'custom') {
return inputEl.value;
}
return "*";
}
function updateOutput() {
let code = "";
code += "; --- הגדרות בסיסיות לפילטר ---\n";
const isStandalone = document.querySelector('input[name="module_type"]:checked').value === 'standalone';
code += isStandalone ? "type=access_filter\n" : "check_access_filter=yes\n";
if (document.getElementById('enter_id').checked) {
code += "enter_id=yes\n";
}
if (document.getElementById('log_save').checked) {
code += "access_filter_log_save=yes\n";
}
const logFolder = document.getElementById('log_folder').value.trim();
if (logFolder) {
code += `access_filter_log_time_folder=${logFolder}\n`;
}
const yesGoto = document.getElementById('yes_goto').value.trim();
if (yesGoto) code += `access_filter_yes_goto=${yesGoto}\n`;
const noGoto = document.getElementById('no_goto').value.trim();
if (noGoto) code += `access_filter_no_goto=${noGoto}\n`;
code += "\n; --- חוקי הפילטר (זמנים והגבלות) ---\n";
const filterCards = document.querySelectorAll('.filter-card');
filterCards.forEach((card, index) => {
const ruleNumber = index + 1;
const id = card.id.split('_')[1];
const specificGoto = document.getElementById(`spec_goto_${id}`).value.trim();
if (specificGoto) {
code += `access_filter_${ruleNumber}_yes_goto=${specificGoto}\n`;
}
const v1 = document.getElementById(`v1_${id}`).value;
const v2 = document.getElementById(`t_all_${id}`).checked ? '*' :
`${document.getElementById(`t_start_${id}`).value}-${document.getElementById(`t_end_${id}`).value}`;
const v3 = calculateRangeFromCheckboxes(`chk-day-${id}`, daysArray);
const v4 = formatNumberRange(`dm_start_${id}`, `dm_end_${id}`, `dm_all_${id}`);
const currentMonthsArray = v1 === 'g' ? monthsGregorian : monthsHebrew;
const v5 = calculateRangeFromCheckboxes(`chk-month-${id}`, currentMonthsArray);
const v6 = formatNumberRange(`y_start_${id}`, `y_end_${id}`, `y_all_${id}`);
const v7 = getDynamicFieldValue(7, id);
const v8 = getDynamicFieldValue(8, id);
const v9 = getDynamicFieldValue(9, id);
const v10 = getDynamicFieldValue(10, id);
let valuesArray = [v1, v2, v3, v4, v5, v6, v7, v8, v9, v10];
for (let i = 0; i < valuesArray.length; i++) {
if (!valuesArray[i] || valuesArray[i] === "" || valuesArray[i] === "-") {
valuesArray[i] = "*";
}
}
// יצירת השורה עצמה: שים לב לנקודה בסוף המחרוזת כפי שביקשת
code += `access_filter_${ruleNumber}=${valuesArray.join('.')}.\n`;
});
document.getElementById('outputCode').value = code;
}
window.onload = () => {
addFilter();
};
</script>
</body>
</html>
אני בדקתי אותו בפונקציות לא מידי מורכבות מי שמשתמש ומבין אשמח לשמוע האם יש דברים לתקן