You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.6 KiB

  1. <?php
  2. if (!defined('_ECRIRE_INC_VERSION')) return;
  3. function formulaires_spipr_educ_configure_bloc_type_perso_charger_dist($nom,$id) {
  4. $req_sql=sql_select('*','spip_spipr_educ',"id='$id'");
  5. $tab_sql=sql_fetch($req_sql);
  6. $valeurs = array (
  7. 'id' => $id,
  8. 'nom' => $nom,
  9. 'titreBloc' => $tab_sql['parametre5'],
  10. 'texteBloc' => $tab_sql['parametre6'],
  11. );
  12. $req_sql2=sql_select('*','spip_spipr_educ',"nom='$nom' AND type='graphisme' AND nom_sauvegarde='en_cours_d_utilisation_SPIPr'");
  13. $tab_sql2=sql_fetch($req_sql2);
  14. $valeurs['blocFond']=$tab_sql2['parametre1'];
  15. $valeurs['blocBordure']=$tab_sql2['parametre2'];
  16. $valeurs['titreCouleur']=$tab_sql2['parametre3'];
  17. $valeurs['titreFond']=$tab_sql2['parametre4'];
  18. $valeurs['texteCouleur']=$tab_sql2['parametre5'];
  19. $valeurs['blocCSS']=$tab_sql2['parametre6'];
  20. return $valeurs;
  21. }
  22. function formulaires_spipr_educ_configure_bloc_type_perso_traiter_dist($nom,$id) {
  23. if (_request('hidden_'.$nom)=='ok') {
  24. sql_updateq(
  25. 'spip_spipr_educ',
  26. array(
  27. 'parametre5' => _request('titreBloc'),
  28. 'parametre6' => _request('texteBloc'),
  29. ),
  30. "id='$id'"
  31. );
  32. sql_updateq(
  33. 'spip_spipr_educ',
  34. array(
  35. 'parametre1' => _request('blocFond'),
  36. 'parametre2' => _request('blocBordure'),
  37. 'parametre3' => _request('titreCouleur'),
  38. 'parametre4' => _request('titreFond'),
  39. 'parametre5' => _request('texteCouleur'),
  40. 'parametre6' => _request('blocCSS'),
  41. ),
  42. "nom='$nom' AND type='graphisme' AND nom_sauvegarde='en_cours_d_utilisation_SPIPr'"
  43. );
  44. }
  45. $res['message_ok'] = _T('config_info_enregistree');
  46. return $res;
  47. }
  48. ?>