DmitrMakeev commited on
Commit
37857fc
1 Parent(s): b8b8ea7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +62 -21
app.py CHANGED
@@ -561,6 +561,8 @@ def add_data_ras():
561
 
562
 
563
 
 
 
564
  @app.route('/data_gc')
565
  def show_data_gc():
566
  try:
@@ -571,7 +573,11 @@ def show_data_gc():
571
 
572
  conn = sqlite3.connect('data_gc.db')
573
  cursor = conn.cursor()
574
- cursor.execute('SELECT name, phone, email FROM contacts')
 
 
 
 
575
  contacts = cursor.fetchall()
576
  cursor.execute('SELECT COUNT(*) FROM contacts')
577
  total_users = cursor.fetchone()[0]
@@ -581,6 +587,61 @@ def show_data_gc():
581
  except Exception as e:
582
  print(f"Error showing contacts: {e}")
583
  return "Internal Server Error", 500
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
584
 
585
 
586
 
@@ -637,26 +698,6 @@ def data_gc_tab_out():
637
 
638
 
639
 
640
- @app.route('/data_ras')
641
- def show_data_ras():
642
- try:
643
- api_sys_control = request.args.get('api_sys')
644
-
645
- if api_sys_control != api_key_sys:
646
- return "EUR 22", 200
647
-
648
- conn = sqlite3.connect('data1.db')
649
- cursor = conn.cursor()
650
- cursor.execute('SELECT name, phone, email FROM contacts')
651
- contacts = cursor.fetchall()
652
- cursor.execute('SELECT COUNT(*) FROM contacts')
653
- total_users = cursor.fetchone()[0]
654
- conn.close()
655
-
656
- return render_template('data_ras.html', contacts=contacts, total_users=total_users)
657
- except Exception as e:
658
- print(f"Error showing contacts: {e}")
659
- return "Internal Server Error", 500
660
 
661
 
662
 
 
561
 
562
 
563
 
564
+
565
+
566
  @app.route('/data_gc')
567
  def show_data_gc():
568
  try:
 
573
 
574
  conn = sqlite3.connect('data_gc.db')
575
  cursor = conn.cursor()
576
+ cursor.execute('''
577
+ SELECT id, name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
578
+ shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, curator, key_pr, n_con, canal, data_t
579
+ FROM contacts
580
+ ''')
581
  contacts = cursor.fetchall()
582
  cursor.execute('SELECT COUNT(*) FROM contacts')
583
  total_users = cursor.fetchone()[0]
 
587
  except Exception as e:
588
  print(f"Error showing contacts: {e}")
589
  return "Internal Server Error", 500
590
+
591
+
592
+ @app.route('/data_ras')
593
+ def show_data_ras():
594
+ try:
595
+ api_sys_control = request.args.get('api_sys')
596
+
597
+ if api_sys_control != api_key_sys:
598
+ return "EUR 22", 200
599
+
600
+ conn = sqlite3.connect('data1.db')
601
+ cursor = conn.cursor()
602
+ cursor.execute('''
603
+ SELECT id, name, phone, email, vk_id, chat_id, ws_statys, ws_stop, web_statys, fin_progress,
604
+ shop_statys_full, pr1, pr2, pr3, pr4, pr5, ad_url, curator, key_pr, n_con, canal, data_t
605
+ FROM contacts
606
+ ''')
607
+ contacts = cursor.fetchall()
608
+ cursor.execute('SELECT COUNT(*) FROM contacts')
609
+ total_users = cursor.fetchone()[0]
610
+ conn.close()
611
+
612
+ return render_template('data_ras.html', contacts=contacts, total_users=total_users)
613
+ except Exception as e:
614
+ print(f"Error showing contacts: {e}")
615
+ return "Internal Server Error", 500
616
+
617
+
618
+
619
+
620
+
621
+
622
+
623
+
624
+
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+
640
+
641
+
642
+
643
+
644
+
645
 
646
 
647
 
 
698
 
699
 
700
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701
 
702
 
703