Changeset 191
- Timestamp:
- 03/19/07 23:38:33 (16 years ago)
- Location:
- dev
- Files:
-
- 10 modified
Legend:
- Unmodified
- Added
- Removed
-
dev/common/admin/admin_roles.php
r190 r191 6 6 $page->setTitle('Administration - Role Management'); 7 7 8 $hardcoded = &role::get(true); 9 $softcoded = &role::get(); 8 if ($_REQUEST['action'] == 'search') 9 { 10 $hitlist = array(); 11 $search = slashfix($_REQUEST['search']); 12 $qry = new DBQuery(); 13 $qry->execute('select usr_login from kb3_user where usr_login like '."'%".$search."%'"); 14 while ($row = $qry->getRow()) 15 { 16 $hitlist[] = $row['usr_login']; 17 } 10 18 11 $smarty->assign_by_ref('hroles', $hardcoded); 12 $smarty->assign_by_ref('sroles', $softcoded); 19 $smarty->assign_by_ref('user', $hitlist); 13 20 14 $page->addContext($menubox->generate()); 15 $page->setContent($smarty->fetch(get_tpl('admin_roles'))); 16 $page->generate(); 21 $page->addContext($menubox->generate()); 22 $page->setContent($smarty->fetch(get_tpl('admin_roles_assign'))); 23 $page->generate(); 24 } 25 elseif ($_REQUEST['action'] == 'create') 26 { 27 $page->addContext($menubox->generate()); 28 $page->setContent('to be done'); 29 $page->generate(); 30 } 31 else 32 { 33 $hardcoded = &role::get(true); 34 $softcoded = &role::get(); 35 36 $smarty->assign_by_ref('hroles', $hardcoded); 37 $smarty->assign_by_ref('sroles', $softcoded); 38 39 $page->addContext($menubox->generate()); 40 $page->setContent($smarty->fetch(get_tpl('admin_roles'))); 41 $page->generate(); 42 } 17 43 ?> -
dev/common/admin/option_generic.php
r190 r191 23 23 options::fadd('Use gmdate instead of date', 'date_gmtime', 'checkbox'); 24 24 options::fadd('Classify kills for hours:', 'kill_classified', 'edit:size:4', '', '', '0 to disable, 1-24hrs'); 25 options::fadd('Display a summary line below a killsummarytable', 'summarytable_summary', 'checkbox'); 25 26 26 27 options::cat('Appearance', 'Generic', 'Posting'); … … 38 39 function createSelectBanner() 39 40 { 40 global $config;41 42 41 $options = array(); 43 42 $dir = "img/logo/"; … … 51 50 if (!is_dir($dir.$file)) 52 51 { 53 if ( $config->getConfig('style_banner') == $file)52 if (config::get('style_banner') == $file) 54 53 { 55 54 $state = 1; … … 71 70 function createSelectStyle() 72 71 { 73 global $config;74 75 72 $dir = "style/"; 76 73 if (is_dir($dir)) … … 86 83 continue; 87 84 } 88 if ( $config->getConfig('style_name') == $file)85 if (config::get('style_name') == $file) 89 86 { 90 87 $state = 1; … … 106 103 function dateSelector() 107 104 { 108 global $config; 109 $apply = $config->getConfig('filter_apply'); 110 $date = $config->getConfig('filter_date'); 105 $apply = config::get('filter_apply'); 106 $date = config::get('filter_date'); 111 107 112 108 if ($date > 0) … … 162 158 function postDateSelector() 163 159 { 164 global $config; 165 166 if ($_POST['options']['filter_apply'] == "on") 160 if ($_POST['option']['filter_apply'] == 'on') 167 161 { 168 $config->setConfig('filter_apply', '1');169 $config->setConfig('filter_date', mktime(0, 0, 0, $_POST['options']['filter_month'], ($_POST['options']['filter_day'] > 31 ? 31 : $_POST['options']['filter_day']), $_POST['options']['filter_year']));162 config::set('filter_apply', '1'); 163 config::set('filter_date', mktime(0, 0, 0, $_POST['option']['filter_month'], ($_POST['option']['filter_day'] > 31 ? 31 : $_POST['option']['filter_day']), $_POST['option']['filter_year'])); 170 164 } 171 165 else 172 166 { 173 $config->setConfig('filter_apply', '0');174 $config->setConfig('filter_date', 0);167 config::set('filter_apply', '0'); 168 config::set('filter_date', 0); 175 169 } 176 170 -
dev/common/includes/class.http.php
r190 r191 21 21 $this->postdata = array(); 22 22 $this->headers = array(); 23 $this->cookiedata = array(); 23 24 $this->socket_timeout = 5; 24 25 } … … 28 29 // scripts or compressed data streams 29 30 function setSockettimeout($int) 31 { 32 $this->socket_timeout = $int; 33 } 34 35 function set_timeout($int) 30 36 { 31 37 $this->socket_timeout = $int; … … 102 108 $request_string .= join($lf, $this->headers).$lf; 103 109 } 110 if (count($this->cookiedata)) 111 { 112 $request_string .= 'Cookie: '; 113 foreach ($this->cookiedata as $key => $value) 114 { 115 $request_string .= $key.'='.$value.'; '; 116 } 117 $request_string .= $lf; 118 } 104 119 if ($this->method == 'POST') 105 120 { … … 178 193 } 179 194 195 function set_cookie($name, $data) 196 { 197 $this->cookiedata[$name] = $data; 198 } 199 180 200 function set_useragent($string) 181 201 { -
dev/common/includes/class.killsummarytable.php
r190 r191 333 333 $html .= "</tr></table>"; 334 334 335 if (config::get('summarytable_summary')) 336 { 337 $html .= '<table width=100% border=0 cellspacing=2>' 338 .'<tr align=center><td width=51%><span align=right class="killcount">' 339 .$this->tkcount_.' Ships killed ('.round($this->tkisk_/1000000, 2).'M ISK)</span></td><td width=49%><span class="losscount">' 340 .$this->tlcount_.' Ships lost ('.round($this->tlisk_/1000000, 2).'M ISK)</span></td></tr></table>'; 341 } 335 342 if ($_GET['scl_id'] != "") 336 343 { -
dev/common/includes/class.options.php
r190 r191 64 64 { 65 65 // for callbacks we check their callback function on postdata to deal with it 66 if ($element[' callback'])67 { 68 if (!is_callable($element[' callback']))66 if ($element['onchange']) 67 { 68 if (!is_callable($element['onchange'])) 69 69 { 70 trigger_error('Unable to callback to '.$element[' callback'][0].'::'.$element['callback'][1], E_USER_ERROR);70 trigger_error('Unable to callback to '.$element['onchange'][0].'::'.$element['onchange'][1], E_USER_ERROR); 71 71 return false; 72 72 } 73 call_user_func($element[' callback']);73 call_user_func($element['onchange'], $element['name']); 74 74 continue; 75 75 } -
dev/common/kill_related.php
r190 r191 222 222 $pilots = array('a' => array(), 'e' => array()); 223 223 $kslist->rewind(); 224 $classified = false; 224 225 while ($kill = $kslist->getKill()) 225 226 { 226 227 handle_involved($kill, 'a'); 227 228 handle_destroyed($kill, 'e'); 229 if ($kill->isClassified()) 230 { 231 $classified = true; 232 } 228 233 } 229 234 $lslist->rewind(); … … 232 237 handle_involved($kill, 'e'); 233 238 handle_destroyed($kill, 'a'); 239 if ($kill->isClassified()) 240 { 241 $classified = true; 242 } 234 243 } 235 244 function cmp_func($a, $b) … … 360 369 $smarty->assign('friendlycnt', count($pilots['a'])); 361 370 $smarty->assign('hostilecnt', count($pilots['e'])); 362 $smarty->assign('system', $system->getName()); 371 if ($classified) 372 { 373 $smarty->assign('system', 'Classified System'); 374 } 375 else 376 { 377 $smarty->assign('system', $system->getName()); 378 } 363 379 $smarty->assign('firstts', $firstts); 364 380 $smarty->assign('lastts', $lastts); -
dev/style/blue/style.css
r132 r191 559 559 background-color:#39475F; 560 560 } 561 .killcount 562 { 563 color: #ffffff; 564 float:right; 565 font-weight: bold; 566 font-size:9px; 567 padding-right:4px; 568 } 569 .losscount 570 { 571 color: #dd0000; 572 float:left; 573 font-weight: bold; 574 font-size:9px; 575 } -
dev/style/default/style.css
r132 r191 559 559 background-color:#333333; 560 560 } 561 .killcount 562 { 563 color: #ffffff; 564 float:right; 565 font-weight: bold; 566 font-size:9px; 567 padding-right:4px; 568 } 569 .losscount 570 { 571 color: #dd0000; 572 float:left; 573 font-weight: bold; 574 font-size:9px; 575 } -
dev/style/revelations/style.css
r132 r191 590 590 .popup-table 591 591 { 592 filter: alpha(opacity=90); 593 -moz-opacity: 0.9; 594 background-color:#999999; 595 } 592 filter: alpha(opacity=90); 593 -moz-opacity: 0.9; 594 background-color:#999999; 595 } 596 .killcount 597 { 598 color: #ffffff; 599 float:right; 600 font-weight: bold; 601 font-size:9px; 602 padding-right:4px; 603 } 604 .losscount 605 { 606 color: #dd0000; 607 float:left; 608 font-weight: bold; 609 font-size:9px; 610 } -
dev/templates/admin_roles.tpl
r190 r191 4 4 {cycle reset=true print=false name=ccl values="kb-table-row-even,kb-table-row-odd"} 5 5 {foreach from=$hroles item=role key=name} 6 <tr class="{cycle name=ccl}"><td>{$name}</td><td>{$role}</td><td>option stuff</td></tr> 6 <tr class="{cycle name=ccl}"><td>{$name}</td><td>{$role}</td><td><form method="post" action="?a=admin_roles"> 7 <input type="hidden" name="a" value="admin_roles"/> 8 <input type="hidden" name="role" value="{$role}"/> 9 <input type="hidden" name="action" value="search"/> 10 <input type="text" name="search" size="8"/> 11 <input type="submit" value="Assign to"/></form></td></tr> 7 12 {/foreach} 8 13 </table> 14 <br/><br/> 15 <div class="block-header2">Softcoded roles</div> 16 <table class="kb-table"> 17 <tr class="kb-table-header"><td>Role</td><td>Description</td><td> </td></tr> 18 {cycle reset=true print=false name=ccl values="kb-table-row-even,kb-table-row-odd"} 19 {foreach from=$sroles item=role key=name} 20 <tr class="{cycle name=ccl}"><td>{$name}</td><td>{$role}</td><td><form method="post" action="?a=admin_roles"> 21 <input type="hidden" name="a" value="admin_roles"/> 22 <input type="hidden" name="role" value="{$role}"/> 23 <input type="text" name="search" size="8"/> 24 <input type="submit" value="Assign to"/></form></td></tr> 25 {/foreach} 26 <tr class="{cycle name=ccl}"><td colspan="3" align="center"><form method="post" action="?a=admin_roles"> 27 <input type="hidden" name="a" value="admin_roles"/> 28 <input type="hidden" name="action" value="create"/><input type="submit" value="Create Role"></form></td></tr> 29 </table>