Changeset 47 for dev/common/admin.php

Show
Ignore:
Timestamp:
11/04/06 05:44:08 (14 years ago)
Author:
exi
Message:

Added Custom Shipvalue System, to be enabled in options, as always with autoupgrade(tm) ;)
Changed commenttablefield id to lowercase via autoupgrade.php, compat added in comments.php
Disabled immediate portrait update on IGB-Access

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/admin.php

    r33 r47  
    1414    $config->setStyleBanner($_POST['style_banner']); 
    1515    $config->setStyleName($_POST['style_name']); 
    16     if ($_POST['kill_points'] == "on") 
    17     { 
    18         $killpoints = 1; 
    19     } 
    20     else 
    21     { 
    22         $killpoints = 0; 
    23     } 
    24     if ($_POST['least_active'] == "on") 
    25     { 
    26         $leastactive = 1; 
    27     } 
    28     else 
    29     { 
    30         $leastactive = 0; 
    31     } 
    32     $config->setKillPoints($killpoints); 
    33     $config->setLeastActive($leastactive); 
    34     if ($_POST['comments'] == "on") 
     16 
     17    // new function checkCheckbox, checks $_POST[arg] and inserts 0 if != 'on' 
     18    $config->checkCheckbox('kill_points'); 
     19    $config->checkCheckbox('ship_values'); 
     20    $config->checkCheckbox('least_active'); 
     21 
     22    if ($config->checkCheckbox('comments')) 
    3523    { 
    3624        require_once('autoupgrade.php'); 
    3725        check_commenttable(); 
    38         $config->setConfig('comments', '1'); 
    39     } 
    40     else 
    41     { 
    42         $config->setConfig('comments', '0'); 
    43     } 
    44     if ($_POST['comments_pw'] == "on") 
    45     { 
    46         $config->setConfig('comments_pw', '1'); 
    47     } 
    48     else 
    49     { 
    50         $config->setConfig('comments_pw', '0'); 
    51     } 
    52     if ($_POST['comments_count'] == "on") 
    53     { 
    54         $config->setConfig('comments_count', '1'); 
    55     } 
    56     else 
    57     { 
    58         $config->setConfig('comments_count', '0'); 
    59     } 
     26    } 
     27    $config->checkCheckbox('comments_pw'); 
     28    $config->checkCheckbox('comments_count'); 
     29 
    6030    $config->setPostPassword($_POST['post_password']); 
    6131    $config->setPostMailto($_POST['post_mailto']); 
     
    144114} 
    145115$html .= "></td></tr>"; 
     116$html .= "<tr><td width=120><b>Use custom shipvalues:</b></td><td><input type=checkbox name=ship_values id=ship_values"; 
     117if ($config->getConfig('ship_values')) 
     118{ 
     119    $html .= " checked=\"checked\""; 
     120} 
     121$html .= "></td></tr>"; 
    146122$html .= "<tr><td width=120><b>Enable Comments:</b></td><td><input type=checkbox name=comments id=comments"; 
    147123if ($config->getConfig('comments'))