| [ 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 // project_options.php - PHProjekt Version 5.0 4 // copyright © 2000-2005 Albrecht Guenther ag@phprojekt.com 5 // www.phprojekt.com 6 // Author: Albrecht Guenther, $auth$ 7 // $Id: projects_options.php,v 1.13 2005/06/17 14:34:12 nina Exp $ 8 9 // check whether the lib has been included - authentication! 10 if (!defined("lib_included")) die("Please use index.php!"); 11 12 // check role 13 if (check_role('projects') < 1) die('You are not allowed to do this!'); 14 15 16 if ($action == 'cop_branch') { 17 include_once($lib_path.'/branches.inc.php'); 18 copy_branch($root_ID, $new_parent_ID); 19 include_once ('./projects_view.php'); 20 } 21 else if ($action == 'move_branch') { 22 include_once($lib_path.'/branches.inc.php'); 23 move_branch($ID, $field, $days); 24 include_once ('./projects_view.php'); 25 } 26 else { 27 // tabs 28 $tabs = array(); 29 $output .= get_tabs_area($tabs); 30 31 // button bar 32 $buttons = array(); 33 $buttons[] = array('type' => 'link', 'href' => 'projects.php?mode=forms&action=new'.$sid, 'text' => __('New'), 'active' => false); 34 $buttons[] = array('type' => 'link', 'href' => 'projects.php?mode=options'.$sid, 'text' => __('Options'), 'active' => true); 35 $buttons[] = array('type' => 'link', 'href' => 'projects.php?mode=stat'.$sid, 'text' => __('Statistics'), 'active' => false); 36 $buttons[] = array('type' => 'link', 'href' => 'projects.php?mode=stat&mode2=mystat'.$sid, 'text' => __('My Statistic'), 'active' => false); 37 $buttons[] = array('type' => 'link', 'href' => 'projects.php?mode=gantt'.$sid, 'text' => __('Gantt'), 'active' => false); 38 $buttons[] = array('type' => 'link', 'href' => 'projects.php?type='.$type.'&sort='.$sort.'&mode=view&up='.$up.'&filter='.$filter.'&keyword='.$keyword.'&perpage='.$perpage.'&page='.$page, 'text' => __('back'), 'active' => false); 39 $output .= get_buttons_area($buttons); 40 $output .= '<div class="hline"></div>'; 41 42 43 44 45 46 //prepare values for function 47 $where = "where (acc like 'system' or ((von = '$user_ID' or acc like 'group' or acc like '%\"$user_kurz\"%') and $sql_user_group))"; 48 // copy project branches 49 $copy_html = " 50 <br /> 51 <form action='projects.php' method='post'> 52 <input type='hidden' name='mode' value='options' /> 53 <input type='hidden' name='action' value='cop_branch' /> 54 <label for='root_ID' class='options'>".__('Copy this element<br> (and all elements below)').": </label> 55 <select name='root_ID' id='root_ID' class='options'><option value='0'></option> 56 ".show_elements_of_tree("projekte","name",$where,"personen"," order by name",'',"parent",0)." 57 </select> 58 <br class='clear' /><label class='options' for='new_parent_ID' >".__('And put it below this element').": </label> 59 <select name='new_parent_ID' id='new_parent_ID' class='options'><option value='0'></option> 60 ".show_elements_of_tree("projekte","name",$where,"personen"," order by name",'',"parent",0)." 61 </select>"; 62 if (SID) $copy_html .= "<input type='hidden' name='".session_name()."' value='".session_id()."' />\n"; 63 $copy_html .= "<br />".get_buttons(array(array('type' => 'submit', 'value' => __('go'), 'active' => false))) 64 ." </form>\n"; 65 66 67 //prepare values for function 68 $where = "where $sql_user_group"; 69 // move project branches 70 $edit_html .= " 71 <br /> 72 <form action='projects.php' method='post'> 73 <input type=hidden name='mode' value='options' /> 74 <input type=hidden name='action' value='move_branch' /> 75 <label class='options' for='field'>".__('Modify').":</label> 76 <select name='field' class='options'> 77 <option value='anfang'>".__('Begin')."</option><option value='ende'>".__('End')."</option> 78 </select> 79 80 <label class='options' for='ID'>".__('of this element<br> (and all elements below)').": </label> 81 <select name='ID' class='options'><option value='0'></option> 82 ".show_elements_of_tree("projekte", "name", $where, "personen", " ORDER BY name", '', "parent", 0)." 83 </select> 84 85 86 <label class='options' for='days' >".__('by')." </label><select name='days' class='options'>"; 87 for ($i=-100; $i<=-1; $i++) $edit_html .= "<option value='$i'>$i ".__('Days')."</option>"; 88 $edit_html .= "<option value='0' selected>0 ".__('Days')."</option>"; 89 for ($i=1; $i<101; $i++) $edit_html .= "<option value='$i'>$i ".__('Days')."</option>"; 90 $edit_html .= "</select>\n"; 91 if (SID) $edit_html .="<input type='hidden' name='".session_name()."' value='".session_id()."' />\n"; 92 $edit_html .= "<br />".get_buttons(array(array('type' => 'submit', 'value' => __('go'), 'active' => false)))." </form>\n"; 93 94 95 $form_fields = array(); 96 $form_fields[] = array('type' => 'parsed_html', 'html' => '<br /><form action="projects.php" method="post">'); 97 $form_fields[] = array('type' => 'hidden', 'name' => 'mode', 'value' => 'options'); 98 $form_fields[] = array('type' => 'hidden', 'name' => 'action', 'value' => 'move_branch'); 99 $options = array(); 100 $options[] = array('value' => 'anfang', 'text' => __('Begin')); 101 $options[] = array('value' => 'ende', 'text' => __('End')); 102 $form_fields[] = array('type' => 'select', 'name' => 'field', 'label' => __('Modify').__(':'), 'options' => $options); 103 104 $options = array(); 105 $options[] = array('value' => '0', 'text' => ''); 106 107 108 // missing show_elements_of_tree here ... 109 $tmp = get_elements_of_tree("projekte","name",$where,"personen"," order by name",'',"parent",0); 110 foreach($tmp as $option_data){ 111 $options[] = array('value' => $option_data['value'], 'text' => (str_repeat(' ', $option_data['depth'])).$option_data['text'], 'selected' => $option_data['selected']); 112 } 113 $form_fields[] = array('type' => 'select', 'name' => 'ID', 'label' => __('of this element<br> (and all elements below)').__(':'), 'options' => $options); 114 115 $options = array(); 116 $options[] = array('value' => '0', 'text' => ''); 117 $options[] = array('value' => 'ende', 'text' => __('End')); 118 for ($i=-100; $i<=-1; $i++){ 119 $options[] = array('value' => $i, 'text' => $i.' '.__('Days')); 120 } 121 $options[] = array('value' => '0', 'text' => '0 '.__('Days'), 'selected' => true); 122 for ($i=1; $i<101; $i++){ 123 $options[] = array('value' => $i, 'text' => $i.' '.__('Days')); 124 } 125 $form_fields[] = array('type' => 'select', 'name' => 'days', 'label' => __('by').__(':'), 'options' => $options); 126 if(SID) $form_fields[] = array('type' => 'hidden', 'name' => session_name(), 'value' => session_id()); 127 $form_fields[] = array('type' => 'parsed_html', 'html' => "<br />".get_buttons(array(array('type' => 'submit', 'value' => __('go'), 'active' => false)))." </form>\n"); 128 $edit_html = get_form_content($form_fields); 129 130 $output .= ' 131 <br /> 132 <div class="inner_content"> 133 <a name="content"></a> 134 <div class="boxHeader">'.__('Copy project branch').'</div> 135 <div class="boxContent">'.$copy_html.'</div> 136 <br style="clear:both" /><br /> 137 138 <div class="boxHeader">'.__('Edit timeframe of a project branch').'</div> 139 <div class="boxContent">'.$edit_html.'</div> 140 <br style="clear:both" /><br /> 141 </div> 142 <br style="clear:both" /><br /> 143 '; 144 145 echo $output; 146 } 147 148 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |