Changeset 414 for trunk/expressoAdmin1_2/inc/class.uisectors.inc.php
- Timestamp:
- 09/12/08 11:39:24 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.uisectors.inc.php
r396 r414 68 68 'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'], 69 69 'back_url' => $GLOBALS['phpgw']->link('/expressoAdmin1_2/index.php'), 70 'context_display' => $context_display, 71 'lang_context' => lang('context'), 72 'header_name' => lang('SECTORS'), 73 'lang_add_sub_sectors' => lang('Add Sub-Sectors'), 74 'header_edit' => lang('Edit'), 75 'lang_back' => lang('back'), 76 'header_delete' => lang('Delete') 77 ); 78 $p->set_var($var); 70 'context_display' => $context_display 71 ); 72 $p->set_var($var); 73 $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 79 74 80 75 if (!count($sectors_info)) … … 144 139 function add_sector($context='') 145 140 { 146 //_debug_array($_GET);147 //_debug_array($_POST);148 149 141 $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 150 142 $acl = $this->functions->read_acl($manager_lid); … … 166 158 $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 167 159 $p->set_file(Array('create_sector' => 'sectors_form.tpl')); 160 $p->set_block('create_sector','list','list'); 168 161 169 162 // Seta variaveis utilizadas pelo tpl. … … 175 168 'sector' => $_POST['sector'], 176 169 'sector_visible_checked'=> $_POST['sector_visible'] ? 'checked' : '', 177 178 'lang_add' => lang('Add'),179 'lang_save' => lang('Save'),180 'lang_back' => lang('Back'),181 'lang_context' => lang('Context'),182 'lang_sector_name' => lang('Sector name'),183 'lang_occult_ou' => lang('Occult Sector'),184 170 'error_messages' => $_POST['error_messages'] == '' ? '' : "<script type='text/javascript'>alert('".$_POST['error_messages']."')</script>", 185 171 ); 186 172 $p->set_var($var); 173 $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 187 174 188 175 $p->pfp('out','create_sector'); … … 191 178 function edit_sector() 192 179 { 193 //_debug_array($_POST);194 195 180 $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 196 181 $acl = $this->functions->read_acl($account_lid); … … 215 200 $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 216 201 $p->set_file(Array('edit_sector' => 'sectors_form.tpl')); 202 $p->set_block('edit_sector','list','list'); 217 203 218 204 if (!$_POST) … … 233 219 'lang_add' => lang('Add'), 234 220 'disable' => 'disabled', 235 'lang_save' => lang('Save'),236 'lang_back' => lang('Back'),237 'lang_context' => lang('Context'),238 'lang_sector_name' => lang('Sector name'),239 'lang_occult_ou' => lang('Occult Sector'),240 221 'error_messages' => $_POST['error_messages'] == '' ? '' : "<script type='text/javascript'>alert('".$_POST['error_messages']."')</script>", 241 222 ); 242 223 $p->set_var($var); 243 224 $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 225 244 226 $p->pfp('out','edit_sector'); 245 227 } … … 247 229 function validate_data_sectors_add() 248 230 { 249 //_debug_array($_POST);250 251 231 $sector_name = $_POST['sector']; 252 232 $context = $_POST['context']; … … 273 253 function delete_sector() 274 254 { 275 //_debug_array($_GET);276 277 255 $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 278 256 $acl = $this->functions->read_acl($account_lid); … … 293 271 $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 294 272 $p->set_file(Array('delete_sector' => 'sectors_delete.tpl')); 273 $p->set_block('delete_sector','list','list'); 295 274 296 275 $tmp_sector_name = $_GET['context']; … … 305 284 $sector_subsectors = $this->so->get_sector_subsectors($_GET['context']); 306 285 307 //_debug_array($sector_users);308 //_debug_array($sector_groups);309 //_debug_array($sector_subsectors);310 311 286 $users_list = ''; 312 287 foreach ($sector_users as $user) … … 331 306 $var = Array( 332 307 'color_bg1' => "#E8F0F0", 333 'lang_back' => lang('Back'),334 'lang_delete' => lang('Delete'),335 'lang_delete_sector' => lang('Do you realy want delete this sector?'),336 'lang_content_the_users' => lang('Content the folling users'),337 'lang_content_the_groups' => lang('Content the folling groups'),338 'lang_content_the_sectors' => lang('Content the folling sectors'),339 'lang_obs' => lang('All users, groups and sub-sectors of this sector will be DELETED!'),340 341 308 'manager_context' => $manager_context, 342 309 'dn' => $_GET['context'], … … 350 317 ); 351 318 $p->set_var($var); 319 $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 352 320 $p->pfp('out','delete_sector'); 353 321 }
Note: See TracChangeset
for help on using the changeset viewer.