~include('../site/admin.header.tmpl','Gestion sondages ~get_filenamevar(1)') ~include('filter.tmpl') ~if(~get_filenamevar(1)=='','

Changer le sondage

Anciens sondages

~list(~get('database'),"SELECT id,question,timestamp + 0 as timestamp FROM poll_questions WHERE state=~get('state_ok') ORDER BY id DESC", 'LF','','LM','
  • ~gfld('counter') [~format_timestamp('%d/%m %H:%M',~fld('timestamp'))] ~strip_tags(~ifne(~fld('question'),"pas de question"))
  • ') ') ~if(~get_filenamevar(1)=='editpoll','

    Question:
    Choix multiple possible ?

    ~set('i',1) ~while(~get('i') <= 12,' Réponse ~get('i') :
    ~set('i',~get('i')+1) ')

    ') ~if(~get_filenamevar(1)=='sendpoll',' ~list(~get('database')," INSERT INTO poll_questions (question,state,multiple) values ('~call('field_fi','question')',1,~bool_fi('multiple')) ") ~list(~get('database')," SELECT last_insert_id() as id FROM poll_questions","LM",~set('last_insert_id',~fld('id')) ) ~set('i',1) ~while(~getpost('reponse_~get('i')') != '', ' ~list(~get('database'),"INSERT INTO poll_answers (question_id, answer, answer_nb, number) values ( '~addslashes(~get('last_insert_id'))', '~call('field_fi','reponse_~get('i')')', '~addslashes(~get('i'))', 0)") ~set('i',~get('i')+1) ') ~uncache_include('../poll/box.tmpl') Le sondage a été changé... ') ~include("../site/admin.footer.tmpl")