Ignore:
Timestamp:
Mar 21, 2006, 11:58:59 PM (18 years ago)
Author:
rub
Message:

[NBM] Step 3: Layout Model

o Rename mailtousers.php on notification_by_mail.php
o Deactivate temporary function on notification_by_mail.php
o First design layout, no function activated, it's only a model

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/admin/notification_by_mail.php

    r1088 r1091  
    2828
    2929// +-----------------------------------------------------------------------+
    30 // | include
     30// | include                                                               |
    3131// +-----------------------------------------------------------------------+
    3232
     
    4848
    4949// +-----------------------------------------------------------------------+
    50 // | functions
     50// | functions                                                             |
    5151// +-----------------------------------------------------------------------+
    5252/*
     
    253253
    254254// +-----------------------------------------------------------------------+
    255 // | Main
     255// | Main                                                                  |
    256256// +-----------------------------------------------------------------------+
    257257update_data_user_mail_notification();
    258 send_all_user_mail_notification();
    259 
    260 
    261 // +-----------------------------------------------------------------------+
    262 // |                        template initialization                        |
    263 // +-----------------------------------------------------------------------+
    264 
    265 $title = l10n('nbm_Send mail to users');
    266 
    267 // +-----------------------------------------------------------------------+
    268 // |                        infos & errors display                         |
     258//send_all_user_mail_notification();
     259
     260if (!isset($_GET['mode']))
     261{
     262  $page['mode'] = 'send';
     263}
     264else
     265{
     266  $page['mode'] = $_GET['mode'];
     267}
     268
     269// +-----------------------------------------------------------------------+
     270// | template initialization                                               |
     271// +-----------------------------------------------------------------------+
     272$template->set_filenames(
     273  array(
     274    'double_select' => 'admin/double_select.tpl',
     275    'notification_by_mail'=>'admin/notification_by_mail.tpl'
     276    )
     277  );
     278
     279$base_url = get_root_url().'admin.php';
     280
     281$template->assign_vars(
     282  array(
     283    'U_TABSHEET_TITLE' => l10n('nbm_'.$page['mode'].'_mode'),
     284    'U_HELP' => add_url_param(get_root_url().'/popuphelp.php', 'page=notification_by_mail'),
     285    'U_PARAM_MODE' => add_url_param($base_url.get_query_string_diff(array('mode')), 'mode=param'),
     286    'U_SUBSCRIBE_MODE' => add_url_param($base_url.get_query_string_diff(array('mode')), 'mode=subscribe'),
     287    'U_SEND_MODE' => add_url_param($base_url.get_query_string_diff(array('mode')), 'mode=send'),
     288    'F_ACTION'=> $base_url.get_query_string_diff(array())
     289    ));
     290
     291switch ($page['mode'])
     292{
     293  case 'param' :
     294  {
     295    $template->assign_block_vars(
     296      $page['mode'],
     297      array(
     298        //'HISTORY_YES'=>$history_yes
     299        ));
     300    break;
     301  }
     302  case 'subscribe' :
     303  {
     304    $template->assign_block_vars(
     305      $page['mode'],
     306      array(
     307        //'HISTORY_YES'=>$history_yes
     308        ));
     309
     310    $template->assign_vars(
     311      array(
     312        'L_CAT_OPTIONS_TRUE' => l10n('nbm_subscribe_col'),
     313        'L_CAT_OPTIONS_FALSE' => l10n('nbm_unsubscribe_col')
     314        )
     315      );
     316
     317
     318/*    $template->assign_block_vars(
     319      $blockname,
     320      array('SELECTED'=>$selected,
     321            'VALUE'=>$category['id'],
     322            'OPTION'=>$option
     323        ));*/
     324    $template->assign_block_vars(
     325      'category_option_true',
     326      array('SELECTED'=>'',
     327            'VALUE'=>'rub',
     328            'OPTION'=>'rub [rub@phpwebgallery.net]'
     329        ));
     330
     331    break;
     332  }
     333  case 'send' :
     334  {
     335    $template->assign_block_vars(
     336      $page['mode'],
     337      array(
     338        //'HISTORY_YES'=>$history_yes
     339        ));
     340
     341    $template->assign_vars(
     342      array(
     343        'L_CAT_OPTIONS_TRUE' => l10n('nbm_send_col'),
     344        'L_CAT_OPTIONS_FALSE' => l10n('nbm_nosend_col')
     345        )
     346      );
     347
     348
     349/*    $template->assign_block_vars(
     350      $blockname,
     351      array('SELECTED'=>$selected,
     352            'VALUE'=>$category['id'],
     353            'OPTION'=>$option
     354        ));*/
     355    $template->assign_block_vars(
     356      'category_option_true',
     357      array('SELECTED'=>' selected="selected"',
     358            'VALUE'=>'rub',
     359            'OPTION'=>'rub [2006-03-20 23:35:23]'
     360        ));
     361
     362    break;
     363  }
     364}
     365
     366// +-----------------------------------------------------------------------+
     367// | infos & errors display                                                |
    269368// +-----------------------------------------------------------------------+
    270369
     
    291390echo '</pre>';
    292391*/
     392
     393// +-----------------------------------------------------------------------+
     394// | Sending html code                                                     |
     395// +-----------------------------------------------------------------------+
     396$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
     397$template->assign_var_from_handle('ADMIN_CONTENT', 'notification_by_mail');
     398
    293399?>
Note: See TracChangeset for help on using the changeset viewer.