קבצים ותוכנות לשימוש במערכות ימות המשיח
-
@אA זה יודע לשלוף נתונים מקובץ ApprovalAll.ymgr?
הגדרתי שלוחה 3 ששם יש את הקובץ הנ"ל ולאחר לחיצה על טען לא הופיעו נתונים... -
@אA הקובץ לגיבוי המערכת במחשב לא עובד לי

מה לא עשיתי נכון? -
-
@פישל
זה שולף רק מהקובץ הנ"ל...
זה קובץ לקבלת נתונים.
הגדרת טוקן? -
@מה
מוזר מאוד.
אני אבדוק את זה. -
@יצמח-פורקניה
ממש מוזר.
אבדוק את זה בלנ"ד. -
@אA
המערכת שואלים שאלות ומגדירה את המערכת לא עובד לי -
@אA
יש לך תוכנה שכותבים מספר מערכת וסיסמא לא טוקן
שאפשר להעלות קבצים? -
@לימוד-בתורת-מרן
אני יכול לנסות להתאים לזה אבל לא בטוח שזה יעבוד.
תנסה במקום טוקן להכניס מספר מערכת:סיסמא -
@אA
לעלת קבצי שמע -
@לימוד-בתורת-מרן
יש לי קובץ כזה.
תחפש בתחילת השירשור. -
@אA
דרך אג"ב
איך אתה יודע להכין
זה בינה מלאכותית? -
@אA
כתוב מפורש מספר מערכת סיסמא ולא טוקן
אז מה שאלתי

-
@לימוד-בתורת-מרן
זה לא שלי.
בהמשך יש קובץ העלאת והורדת קבצים. -
-
@R.E.T-מערכות
האמת שהתכוונתי להעלות לשם את כל הקבצים, אבל רציתי לעשות לפני כן סדר וגם להעלות בצורה של אתר ממש.
או שאולי עדיף להעלות כל אחד בדף נפרד ולהכניס דף ראשי שישלח אליהם? -
-
@ezerphone
אתה עורך את הקודים מחדש או מעלה כמו שהם (בPHP כמובן)? -
-
קובץ לפתיחת שלוחת טרוויה
הקוד
<!DOCTYPE html> <html lang="he" dir="rtl"> <head> <meta charset="UTF-8"> <title>מנהל טריוויה IVR2 - שליטה מלאה</title> <link href="https://fonts.googleapis.com/css2?family=Assistant:wght@400;700&family=Courier+Prime&display=swap" rel="stylesheet"> <style> :root { --primary: #1a73e8; --bg: #f8f9fa; --border: #dadce0; --log-bg: #1e1e1e; } body { font-family: 'Assistant', sans-serif; background: var(--bg); margin: 0; padding: 10px; height: 100vh; display: flex; flex-direction: column; overflow: hidden; } .app-wrapper { max-width: 1000px; margin: auto; background: white; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.1); display: flex; flex-direction: column; max-height: 95vh; width: 100%; } .header { padding: 15px 25px; border-bottom: 2px solid #eee; display: flex; justify-content: space-between; align-items: center; } .scroll-area { padding: 20px; overflow-y: auto; flex-grow: 1; } .grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; } .full { grid-column: span 3; } .half { grid-column: span 1.5; } .field { display: flex; flex-direction: column; } label { font-weight: 700; font-size: 12px; margin-bottom: 4px; color: #555; } input, select { padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; } .btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; } .btn-primary { background: var(--primary); color: white; } .btn-success { background: #1e8e3e; color: white; width: 100%; margin-top: 15px; } #log-area { background: var(--log-bg); color: #00ff00; font-family: 'Courier Prime', monospace; padding: 12px; height: 120px; overflow-y: auto; font-size: 12px; border-top: 4px solid #333; direction: ltr; text-align: left; } .modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 1000; justify-content: center; align-items: center; } .modal-content { background: white; width: 90%; max-width: 800px; border-radius: 12px; padding: 25px; overflow-y: auto; max-height: 90vh; } .section-title { grid-column: span 3; margin-top: 15px; padding: 6px 12px; background: #e8f0fe; color: #1a73e8; font-weight: bold; border-radius: 6px; font-size: 13px; border-right: 4px solid var(--primary); } .hidden { display: none; } </style> </head> <body> <div class="app-wrapper"> <div class="header"> <h2 style="margin:0; font-size: 1.2rem;">מנהל טריוויה IVR2 - הגדרות מלאות</h2> <button id="add-btn" class="btn btn-primary hidden" onclick="openModal()">+ הוספת שאלה</button> </div> <div id="login-screen" class="scroll-area"> <div class="grid" style="grid-template-columns: 1fr 1fr;"> <div class="field"><label>מספר מערכת</label><input type="text" id="user"></div> <div class="field"><label>סיסמה</label><input type="password" id="pass"></div> <div class="field full"><label>נתיב שלוחה</label><input type="text" id="path" value="/1"></div> <button class="btn btn-primary full" onclick="doLogin()">התחבר</button> </div> </div> <div id="manage-screen" class="scroll-area hidden"> <div class="grid"> <div class="section-title">הגדרות ניקוד ונסיונות</div> <div class="field"><label>ניקוד ניסיון 1 (points_1)</label><input type="text" id="trivia_questions_points_1" value="2"></div> <div class="field"><label>ניקוד ניסיון 2 (points_2)</label><input type="text" id="trivia_questions_points_2" value="1"></div> <div class="field"><label>ניסיון אחד בלבד?</label> <select id="trivia_questions_only_once"><option value="no">לא</option><option value="yes">כן (yes)</option></select> </div> <div class="section-title">הגדרות השמעה וחשיפה</div> <div class="field"><label>ללא חשיפת תשובה?</label> <select id="trivia_questions_without_reveals_answer"><option value="no">לא</option><option value="yes">כן (yes)</option></select> </div> <div class="field"><label>סדר אקראי?</label> <select id="trivia_questions_random"><option value="no">לא</option><option value="yes">כן (yes)</option></select> </div> <div class="field"><label>דילוג על הסבר?</label> <select id="trivia_questions_no_explanation"><option value="no">לא</option><option value="yes">כן (yes)</option></select> </div> <div class="section-title">ניהול זמנים וסיום</div> <div class="field"><label>זמן למענה (שניות)</label><input type="number" id="trivia_questions_time_to_answer" value="15"></div> <div class="field"><label>כמות שאלות למשחק</label><input type="number" id="trivia_questions_total_questions" value="0"></div> <div class="field"><label>סגירת השלוחה בסיום?</label> <select id="trivia_questions_hangup_at_end"><option value="no">לא</option><option value="yes">כן (yes)</option></select> </div> <div class="section-title">הגדרות מתקדמות</div> <div class="field"><label>השמעת ניקוד בסיום?</label> <select id="trivia_questions_play_points_at_end"><option value="yes">כן</option><option value="no">לא</option></select> </div> <div class="field"><label>מניעת כפל משחקים?</label> <select id="trivia_questions_once_a_day"><option value="no">לא</option><option value="yes">כן (פעם ביום)</option></select> </div> <div class="field"><label>הקלטת שם מאזין?</label> <select id="trivia_questions_record_name"><option value="no">לא</option><option value="yes">כן</option></select> </div> </div> </div> <div id="log-area"><div style="color:#aaa">> המערכת מוכנה לסנכרון.</div></div> </div> <div id="qModal" class="modal"> <div class="modal-content"> <div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; border-bottom:1px solid #eee; padding-bottom:10px;"> <h3 style="margin:0">הוספת שאלה (תיקייה)</h3> <button class="btn" style="background:#eee" onclick="closeModal()">X</button> </div> <div class="grid" style="grid-template-columns: 1fr 1fr;"> <div class="field full"><label>מספר תיקייה</label><input type="text" id="q_folder" placeholder="001"></div> <div class="field full"><label>סוג השאלה</label> <select id="ui_mode" onchange="updateUI()"> <option value="american">אמריקאי (Q, A, B, C, D)</option> <option value="yes_no">נכון / לא נכון (q_yes / q_no)</option> </select> </div> <div id="box-american" class="full grid" style="grid-template-columns: 1fr 1fr;"> <div class="field full"><label>שאלה (Q.wav)</label><input type="file" id="f_q"></div> <div class="field"><label>נכונה (A.wav)</label><input type="file" id="f_a"></div> <div class="field"><label>שגויה B</label><input type="file" id="f_b"></div> <div class="field"><label>שגויה C</label><input type="file" id="f_c"></div> <div class="field"><label>שגויה D</label><input type="file" id="f_d"></div> </div> <div id="box-yesno" class="full hidden grid" style="grid-template-columns: 1fr;"> <div class="field"><label>קובץ הקלטה</label><input type="file" id="f_yn"></div> <div class="field"><label>התשובה הנכונה</label> <select id="yn_val"> <option value="q_yes">נכון (1)</option> <option value="q_no">לא נכון (0)</option> </select> </div> </div> <button class="btn btn-success full" onclick="startUpload()">בצע סנכרון שלוחה ושאלה</button> </div> </div> </div> <script> let token = ''; const API = 'https://www.call2all.co.il/ym/api/'; function addLog(m, e=false) { const div = document.createElement('div'); if(e) div.style.color = '#ff5555'; div.innerText = `[${new Date().toLocaleTimeString()}] ${m}`; document.getElementById('log-area').appendChild(div); document.getElementById('log-area').scrollTop = document.getElementById('log-area').scrollHeight; } async function doLogin() { const u = document.getElementById('user').value, p = document.getElementById('pass').value; try { const r = await fetch(`${API}Login?username=${u}&password=${p}`); const d = await r.json(); if (d.responseStatus === 'OK') { token = d.token; addLog("חיבור הצליח."); document.getElementById('login-screen').classList.add('hidden'); document.getElementById('manage-screen').classList.remove('hidden'); document.getElementById('add-btn').classList.remove('hidden'); } else { addLog(d.message, true); } } catch (e) { addLog("שגיאת תקשורת/CORS", true); } } function updateUI() { const mode = document.getElementById('ui_mode').value; document.getElementById('box-american').className = (mode === 'american' ? 'full grid' : 'hidden'); document.getElementById('box-yesno').className = (mode === 'yes_no' ? 'full grid' : 'hidden'); } async function startUpload() { const folder = document.getElementById('q_folder').value, root = document.getElementById('path').value, mode = document.getElementById('ui_mode').value; if(!folder) return alert("הזן תיקייה"); addLog(`בונה ext.ini עם כל ההגדרות...`); // יצירת קובץ ה-ext.ini המלא עם כל מה שמופיע ב-Dashboard let ini = `type=trivia_questions\n`; const settings = [ 'trivia_questions_points_1', 'trivia_questions_points_2', 'trivia_questions_only_once', 'trivia_questions_without_reveals_answer', 'trivia_questions_random', 'trivia_questions_no_explanation', 'trivia_questions_time_to_answer', 'trivia_questions_total_questions', 'trivia_questions_hangup_at_end', 'trivia_questions_play_points_at_end', 'trivia_questions_once_a_day', 'trivia_questions_record_name' ]; settings.forEach(s => { const val = document.getElementById(s).value; if(val !== 'no' && val !== '0') ini += `${s}=${val}\n`; else if(val === 'no' || val === '0') { /* אפשר להשאיר ריק או לכתוב no לפי הצורך */ } }); await uploadFile(new Blob([ini], {type:'text/plain'}), root + "/ext.ini"); // העלאת קבצים if(mode === 'american') { const map = {'Q.wav': 'f_q', 'A.wav': 'f_a', 'B.wav': 'f_b', 'C.wav': 'f_c', 'D.wav': 'f_d'}; for(let [file, id] of Object.entries(map)) { const b = document.getElementById(id).files[0]; if(b) await uploadFile(b, `${root}/${folder}/${file}`); } } else { const b = document.getElementById('f_yn').files[0]; if(b) await uploadFile(b, `${root}/${folder}/${document.getElementById('yn_val').value}.wav`); } addLog(`סיום פעולה בתיקייה ${folder}.`); closeModal(); } async function uploadFile(blob, rawPath) { const path = 'ivr2:' + (rawPath.startsWith('/') ? rawPath : '/' + rawPath); const fd = new FormData(); fd.append('token', token); fd.append('path', path); fd.append('file', blob, path.split('/').pop()); try { const r = await fetch(`${API}UploadFile`, {method: 'POST', body: fd}); const d = await r.json(); if(d.responseStatus === 'OK') addLog(`הועלה בהצלחה: ${path}`); } catch(e) { addLog("שגיאת העלאה", true); } } function openModal() { document.getElementById('qModal').style.display = 'flex'; updateUI(); } function closeModal() { document.getElementById('qModal').style.display = 'none'; } </script> </body> </html>קרדיט:@אa