00001 <?php if(!function_exists('startedIndexPhp')) { header("location:../index.php"); exit();}
00002 # streber - a php5 based project management system (c) 2005-2007 / www.streber-pm.org
00003 # Distributed under the terms and conditions of the GPL as stated in lang/license.html
00004
00013 require_once(confGet('DIR_STREBER') . 'db/class_task.inc.php');
00014 require_once(confGet('DIR_STREBER') . 'db/class_project.inc.php');
00015 require_once(confGet('DIR_STREBER') . 'render/render_list.inc.php');
00016 require_once(confGet('DIR_STREBER') . 'lists/list_tasks.inc.php');
00017
00018
00019
00020
00021 #header('WWW-Authenticate: Basic realm="blabl"');
00022
00023 #echo "username='" . $username ."'<br>";
00024 #echo "password='" . $password ."'<br>";
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00123 function playground() {
00124 global $PH;
00125 global $auth;
00126 if(
00127 !isset($_SERVER['REMOTE_USER'])
00128 &&
00129 !isset($_SERVER['REDIRECT_REDIRECT_REMOTE_USER'])
00130 &&
00131 !isset($_SERVER['PHP_AUTH_USER'])
00132 &&
00133 !get('HTTP_AUTHORIZATION')
00134 ){
00135 header('WWW-Authenticate: Basic realm="blabl"');
00136 header('HTTP/1.0 401 Unauthorized');
00137 echo 'Sorry. You need to authenticate';
00138 print("<pre>");
00139 print_r($_SERVER);
00140 print("</pre>");
00141 exit();
00142
00143 }
00144 else {
00145 $username='';
00146 $password= '';
00147 if(isset($_SERVER['PHP_AUTH_USER'])) {
00148 $username=asCleanString($_SERVER['PHP_AUTH_USER']);
00149 if(isset($_SERVER['PHP_AUTH_PW'])) {
00150 $password=asCleanString($_SERVER['PHP_AUTH_PW']);
00151 }
00152 }
00153
00158 else {
00159 $ha='';
00160 if(isset($_SERVER['REDIRECT_REDIRECT_REMOTE_USER'])) {
00161 $ha= $_SERVER['REDIRECT_REDIRECT_REMOTE_USER'];
00162 }
00163 else if(isset($_SERVER['REMOTE_USER'])) {
00164 $ha= $_SERVER['REMOTE_USER'];
00165 }
00166
00167 $tmp= base64_decode( substr($ha,6));
00168 list($username, $password) = explode(':', $tmp);
00169 }
00170 print("<br>username='" . $username . "'");
00171 print("<br>password='" . $password . "'");
00172
00173 print("<pre>");
00174 print_r($_SERVER);
00175 print("</pre>");
00176
00177
00178 }
00179
00180
00181
00182
00183
00184
00185 ### create from handle ###
00186 $PH->defineFromHandle(array());
00187
00188 ### set up page ####
00189 {
00190 $page= new Page();
00191 $page->cur_tab='home';
00192 $page->options=array(
00193 new NaviOption(array(
00194 'target_id'=>'home',
00195 'name'=>__('Today')
00196 )),
00197 #new NaviOption(array(
00198 # 'target_id' =>'personViewEfforts',
00199 # 'target_params' =>array('person' => $auth->cur_user->id),
00200 # 'name'=>__('Personal Efforts'),
00201 #
00202 #)),
00203
00204 );
00205
00206 $page->title=__("Today"); # $auth->cur_user->name;
00207 $page->type=__("At Home");
00208 $page->title_minor=renderTitleDate(time());
00209 echo(new PageHeader);
00210 }
00211 echo (new PageContentOpen_Columns);
00212 measure_stop('init2');
00213
00214 echo "Column-Right";
00215
00216 echo(new PageContentNextCol);
00217
00218 ### some tabs ###
00219 {
00220 ?>
00221 <div id="pm3">
00222
00223 <style type="text/css">
00224
00225 .form_tabgroup {
00226 display:table;
00227 }
00228 .form_tabgroup UL {
00229 margin:0;
00230 padding:0;
00231 list-style:none;
00232 }
00233 .form_tabgroup LI.form_tab A {
00234 color:#777;
00235 border:0;
00236 display:block;
00237 padding:.3em .6em;
00238 }
00239 .form_tabgroup LI.form_tab {
00240 background-color:#eee;
00241 float:left;
00242 margin-right:.3em;
00243 }
00244 .form_tabgroup LI.Active {
00245 background-color:#ddd;
00246 }
00247 .form_tabgroup LI.Active A {
00248 color:#000;
00249 }
00250 .form_tabgroup DIV {
00251 padding:.5em .7em;
00252 background-color:#ddd;
00253 clear:both;
00254 }
00255 </style>
00256
00257 <div class="form_tabgroup">
00258 <ul>
00259 <li class="form_tab" id="tab1"><a href="#">One</a></li>
00260 <li class="form_tab" id="tab2"><a href="#">Two</a></li>
00261 <li class="form_tab" id="tab3"><a href="#">Three</a></li>
00262 </ul>
00263 <div id="tab1-body">I'm the one's tab content.</div>
00264 <div id="tab2-body">I'm the two's tab content<br />and a 2nd line.</div>
00265 <div id="tab3-body">Guess who am I -- says the three's tab content.</div>
00266 </div>
00267 <div class="form_tabgroup">
00268 <ul>
00269 <li class="form_tab" id="tab1a"><a href="#">One</a></li>
00270 <li class="form_tab" id="tab2a"><a href="#">Two</a></li>
00271 <li class="form_tab" id="tab3a"><a href="#">Three</a></li>
00272 </ul>
00273 <div id="tab1a-body">I'm the one's tab content.</div>
00274 <div id="tab2a-body">I'm the two's tab content<br />and a 2nd line.</div>
00275 <div id="tab3a-body">Guess who am I -- says the three's tab content.</div>
00276 </div>
00277 </div>
00278
00279
00280 <?php
00281 }
00282
00283 echo (new PageContentClose);
00284 echo (new PageHtmlEnd);
00285
00286 }
00287
00288 ?>