Spaces:
Sleeping
Sleeping
Update app.py
Browse files139 unmodified lines140141142143144145146147148149150151152153154155143144145146147148149150151152153154155156157158159139 unmodified lines st.session_state.user_type = None st.session_state.username = "" st.rerun()if st.session_state.get("username") == "admin": st.subheader("🗃️ إدارة قاعدة البيانات") if os.path.exists("complaints_system.db"): with open("complaints_system.db", "rb") as f: st.download_button( label="📥 تحميل قاعدة البيانات", data=f, file_name="complaints_system.db", mime="application/octet-stream" ) else: st.error("⚠️ ملف قاعدة البيانات غير موجود!")import os
# زر لتحميل ملف قاعدة البيانات - يظهر دائمًاif os.path.exists("complaints_system.db"): with open("complaints_system.db", "rb") as db_file: st.download_button( label="📥 تحميل complaints_system.db", data=db_file, file_name="complaints_system.db", mime="application/octet-stream" )else: st.warning("⚠️ ملف قاعدة البيانات غير موجود في هذا المسار.")
app.py+14-13