| [ PHPXref.com ] | [ Generated: Sun Jul 20 19:53:39 2008 ] | [ PHProjekt 5.0.1 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 3 // settings_selector.php - PHProjekt Version 5.0 4 // copyright © 2000-2005 Albrecht Guenther ag@phprojekt.com 5 // www.phprojekt.com 6 // Authors: Albrecht Guenther, Franz Graf, $Author: fgraf $ 7 // $Id: settings_selector.php,v 1.19.2.1 2005/09/07 14:02:33 fgraf Exp $ 8 9 // check whether the lib has been included - authentication! 10 if (!defined('lib_included')) die('Please use settings.php!'); 11 12 include_once($lib_path."/selector/selector.inc.php"); 13 14 echo ' 15 <div class="inner_content"> 16 <div class="boxContent"> 17 '; 18 19 // --------- Selektor config --------- 20 // Options for Quickaddings 21 // This isn't called quick_ADD_ for fun! If one of the 22 // entries is chosen it's put into the 'chosen'-box! 23 $usersextras = array( 24 //'names' => array('getform'=>'usersextra_names', 25 //'evalform' => 'userseval_extra_names', 26 //'formname' => array('usersextra_namevor','usersextra_namenach')), 27 'profiles' => array('getform' => 'usersextra_profiles', 28 'evalform' => 'userseval_extra_profiles', 29 'formname' => array('usersextra_profile','usersextra_profileglob')), 30 //'projects' => array('getform'=>'usersextra_projects', 31 //'evalform' => 'userseval_extra_projects', 32 //'formname' => array('usersextra_project','usersextra_projectglob','usersextra_projectbutton')), 33 'groups' => array('getform' => 'usersextra_groups', 34 'evalform' => 'userseval_extra_groups', 35 'formname' => array('usersextra_group')) 36 ); 37 38 // Options for datasource 39 $opt_where = array("g.grup_ID=$user_group", "g.user_ID=u.ID"); 40 $g_grup_ID = selector_get_groupIds(); 41 if (is_array($g_grup_ID) && count($g_grup_ID) > 0) { 42 $opt_where[] = "g.grup_ID IN ('".implode("','", $g_grup_ID)."')"; 43 } 44 unset($g_grup_ID); 45 $opt = array('title' => $_SESSION['settings_5']['formdata']['_title'], 46 'table' => array('users as u','grup_user as g'), 47 'where' => $opt_where, 48 'order' => 'u.nachname', 49 'direction' => 'asc', 50 'ID' => 'u.ID', 51 'display' => array('u.vorname','u.nachname','u.firma'), 52 //'filter' => array('text'=> array('u.vorname'=>'Vorname', 'u.nachname'=>'Familienname','u.firma'=>'Firma'), 'alternative' => array()), 53 'dstring' => '%s %s: %s', 54 'save' => array('table'=>'protokoll','field'=>'part_personen','method'=>'serialize','where'=>"ID=$ID"), 55 'extra' => array('projects'=>$row[14]), 56 'choose' => 'Benutzer', 57 //'reload' => "protokoll.php?mode=forms&ID=$ID&".$sid, 58 'reload' => '', 59 //'limit' => '100', 60 'filter' => array('text' => array('nachname' => __('Family Name'), 'vorname' => __('First Name')) ) 61 ); 62 63 $selector_name = "settings_selector_"; 64 if (isset($delete_selector_filters)) $filters[$selector_name] = array(); 65 include_once($lib_path."/selector/class.selector.php"); 66 echo "<script src='".$lib_path."/selector/dbl_select_mover.js' type='text/javascript'></script>\n"; 67 68 // new Selektor 69 $sel = new PHProjektSelector($selector_name, 'users', $opt, 'multiple', 'select'); 70 $sel->finishFormSubmitName = 'finishForm.'.$_SESSION['settings_5']['formdata']['_return']; 71 $sel->set_hidden_fields(array('mode' => $_SESSION['settings_5']['formdata']['_mode'], 'action_selector_to_selector' => 1 )); 72 73 74 settype($_SESSION['settings_5']['formdata']['_selector'], 'array'); 75 if (!isset($stuff['preselect'])) { 76 $stuff['preselect'] = array(); 77 foreach ($_SESSION['settings_5']['formdata']['_selector'] as $tmp_id) { 78 $stuff['preselect'][$tmp_id] = "1"; 79 } 80 unset($tmp_id); 81 } 82 include_once($lib_path."/selector/selector_filter_operations.php"); 83 84 // print all the stuff! 85 $sel->show_window($stuff['preselect'], 15, "./settings.php"); 86 // ---------- Selektor end --------- 87 88 89 90 // ---------- Finishform begin --------- 91 // Jetzt kommt das form, mit dem die Daten wieder in den Aufrufer zurückgeschossen 92 // werden sollen. 93 // Alle ursprünglichen REQUEST-Daten und die neuen Kontakte werden hier aufgeführt. 94 // Ein Extra-FORM wird hier deswegen gebraucht, da hier evtl noch ein separater "mode" 95 // übergeben werden soll 96 echo " 97 <br /> 98 <form action='".$_SERVER['PHP_SELF']."' method='post' name='finishForm'> 99 <input type='hidden' name='ID' value='".$_SESSION['settings_5']['formdata']['_ID']."' /> 100 <input type='hidden' name='mode' value='".$_SESSION['settings_5']['formdata']['_mode']."' /> 101 "; 102 103 if (SID) echo " <input type='hidden' name='".session_name()."' value='".session_id()."' />\n"; 104 105 // in get_chosen the shortnames are listed 106 foreach ($stuff['preselect'] as $tmp_ID => $tmp) { 107 echo " <input type='hidden' name='selector[]' value='".$tmp_ID."' />\n"; 108 } 109 unset($tmp, $tmp_ID); 110 echo " 111 <input class='submit' type='submit' name='".$_SESSION['settings_5']['formdata']['_return']."' value='".__('Undertake')."' /> 112 <input class='submit' type='submit' name='".$_SESSION['settings_5']['formdata']['_cancel']."' value='".__('Cancel')."' /> 113 </form> 114 "; 115 // ---------- Finishform end --------- 116 117 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |