Spaces:
Sleeping
Sleeping
Update app.py
Browse files139 unmodified lines140141142143144145146147148149150151152153154155156157139 unmodified linesst.session_state.user_type = Nonest.session_state.username = ""st.rerun()# في آخر ملفك (تحت كل شيء)# نتحقق من المستخدم الحالي إذا كان "admin"if st.session_state.get("username") == "admin":st.subheader("🗃️ إدارة قاعدة البيانات")# زر لتحميل ملف قاعدة البياناتwith open("complaints_system.db", "rb") as f:st.download_button(label="📥 تحميل قاعدة البيانات",data=f,file_name="complaints_system.db",mime="application/octet-stream")139 unmodified lines140141142143144145146147148149150151152153154155156157158139 unmodified linesst.session_state.user_type = Nonest.session_state.username = ""st.rerun()# زر تحميل قاعدة البيانات يظهر فقط للمشرف adminif st.session_state.get("username") == "admin":st.subheader("🗃️ إدارة قاعدة البيانات")try:with open("complaints_system.db", "rb") as f:st.download_button(label="📥 تحميل قاعدة البيانات",data=f,file_name="complaints_system.db",mime="application/octet-stream")except FileNotFoundError:st.error("⚠️ قاعدة البيانات غير موجودة!")
app.py+11-10